feat: authorize coordination-layer dispatch in the scaffold - #87
Merged
radiusred-cody[bot] merged 1 commit intoAug 25, 2026
Merged
Conversation
There was a problem hiding this comment.
Independent review (diff read before description; task #81 plan, milestone #67 M5-R1, and finding 9 on #73 checked; head extracted clean and go test ./... run green).
Verified:
- The scaffold bullet in
agentsScaffold(internal/cli/init.go) is genuinely conditional: the authorization is scoped to "the operator's primary session — not dispatched as any specific role", and the same bullet carries the prohibition ("a session dispatched as a role never dispatches another role… never chooses or briefs its own judge"). A platform-dispatched agent reading this fails the condition and finds the prohibition in the same breath — the structure finding 9's remedy asked for, and the operator-confirmed conditional form (2026-08-25 note on #73). - identities.md's new tier-gradient paragraph slots into the existing "Dispatching a role session" section coherently: it correctly points at "the fixed dispatch prompt below" (the numberguess-proven prompt is indeed below it), and the platform half — every session dispatched as a role, none meeting the condition — matches the plan's step 2 and the doc's existing webhook-dispatch text it follows.
- The scaffold test renders via
scaffold()and asserts the load-bearing phrases whitespace-normalized, so reflowing the string won't break it. All three plan steps delivered, no undeclared deviations. - Merge-simulated against the sibling PRs (#88, #89) touching identities.md: clean.
One consequence worth having on the record, and the PR body already carries it: existing hubs' committed AGENTS.md (this hub's included, and numberguess's) do not gain the bullet — propagation is explicitly deferred to #85. Until then, finding 9's guardrail stall can still recur on pre-existing scaffolds; that is a known, recorded boundary, not a defect of this change.
davison
approved these changes
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #81.
Folds back finding 9 on #73: harness guardrails defer to AGENTS.md for sub-agent authorization, and the scaffold said nothing — so the M3 session correctly waited for the operator instead of dispatching the routed reviewer.
The scaffold's AGENTS.md now carries the conditional standing authorization (wording operator-confirmed 2026-08-25): if you are the operator's primary session — not dispatched as any role — dispatching a clean-context sub-agent as a routed App, via the identities doc's dispatch prompt, is authorized and expected. The same bullet carries the prohibition: a session dispatched as a role never dispatches another role, and never chooses or briefs its own judge. A platform-dispatched agent therefore reads a prohibition, not a licence — every Paperclip session fails the condition, preserving the implementer-never-dispatches invariant structurally.
identities.md states the tier gradient: solo is one session changing hats through the fixed dispatch template (the template is what keeps the hat-switch honest); a platform separates the hats into processes, watches the webhooks it registered at minting, and does all dispatching itself.
Scaffold test rides along per #46 (whitespace-normalized phrase assertions on the generated AGENTS.md).
Note for existing hubs: numberguess's AGENTS.md predates this and won't update itself — that propagation story is #85's virtual-
_latestdesign.