Repository navigation
Enforce constitution delegation policies at spawn time - #380
Open
tylerreckart wants to merge 2 commits into
Open
tylerreckart wants to merge 2 commits into
tylerreckart wants to merge 2 commits into
Conversation
Add an optional delegation object (max_depth, allowed_callees, denied_callees, subtree token/USD caps) that the runtime fail-closes on /agent, /parallel, and JIT run_ephemeral — the same ERR: posture as the global depth cap of 2. Stock agents stay unrestricted without an explicit block; malformed policy fields throw at parse. Co-authored-by: Tyler Reckart <tylerreckart@users.noreply.github.com>
tylerreckart
marked this pull request as ready for review
September 22, 2026 11:33
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.
Phase C2 leftover from ROADMAP Phase 5: constitutions can declare runtime spawn gates so the model cannot
/agent forge(or re-delegate past a per-agent depth) just by ignoring the prompt.What
Optional
delegationobject onConstitution:max_depthallowed_calleesdenied_calleesforgewithout listing the roster)max_subtree_tokens/max_subtree_usdmax_tokens)Unknown/malformed policy fields throw at parse (admit fail closed). Stock
agents/*.jsonomit the block, so today’s roster is unchanged.Enforcement
Same fail-closed
ERR:posture as the existingdepth >= 2guard, in:make_invoker(/agent)make_parallel_invoker(/parallel)run_ephemeral(JIT ensure covers, caller = index, child depth 1)Caller policy applies when spawning (index cannot send work to a forbidden callee). The child’s own
max_depthapplies when it tries to re-delegate or when it would run deeper than it is allowed. Budget denial stops further spawn; the in-flight child is not killed mid-turn.Presence review does not consult this gate (still fail-open, cannot halt).
Tests
unit_constitution)unit_delegation): forbidden callee,max_depth0/1, budget exceeded,/agent,/parallel, JITrun_ephemeralDocs
New delegation policies; constitution / writ / reconcile / architecture / SSE / create-agent schema; ROADMAP checkbox + “Consitutions” typo; CHANGELOG.