Skip to content

feat(reason): read-only tool registry, bounded loop and audit trail for unit 6 - #56

Merged
agenticode merged 1 commit into
mainfrom
wave/u3-reason
Aug 26, 2026
Merged

agenticode merged 1 commit into
mainfrom
wave/u3-reason

Conversation

@agenticode

Copy link
Copy Markdown
Owner

pkg/reason is the unit-6 core from design §9: a read-only tool registry, the
reasoning loop, an audit trail, budget enforcement and injection defence.

No SDK, no network, no go.mod change. Provider is an interface; the only
implementation in-tree is a test fake. Write-capable tools are not merely
unregistered — the type makes them unregisterable, so adding one requires
editing Register's predicate in a visible diff. Every string a tool returns is
attacker-controlled and is treated as such against an adversarial corpus.

The budget bounds the loop, not the individual call: budget exhaustion is a
first-class terminal outcome carrying partial evidence, so callers must not
infer success from err == nil. airgap_test.go parses the package's own AST to
seal its import set rather than tracking a maintained list.

…or unit 6

pkg/reason is the unit-6 core from design §9: a read-only tool registry, the
reasoning loop, an audit trail, budget enforcement and injection defence.

No SDK, no network, no go.mod change. Provider is an interface; the only
implementation in-tree is a test fake. Write-capable tools are not merely
unregistered — the type makes them unregisterable, so adding one requires
editing Register's predicate in a visible diff. Every string a tool returns is
attacker-controlled and is treated as such against an adversarial corpus.

The budget bounds the loop, not the individual call: budget exhaustion is a
first-class terminal outcome carrying partial evidence, so callers must not
infer success from err == nil. airgap_test.go parses the package's own AST to
seal its import set rather than tracking a maintained list.

Co-authored-by: kording <74226694+kording@users.noreply.github.com>
@agenticode
agenticode merged commit 8c7a398 into main Aug 26, 2026
2 checks passed
@agenticode
agenticode deleted the wave/u3-reason branch August 26, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant