Skip to content

merge queue: checking #307 on main (104f21f) - #339

Closed
mergify[bot] wants to merge 3 commits into
mainfrom
mergify/merge-queue/ef9c0a8931
Closed

merge queue: checking #307 on main (104f21f)#339
mergify[bot] wants to merge 3 commits into
mainfrom
mergify/merge-queue/ef9c0a8931

Conversation

@mergify

@mergify mergify Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request has been checked successfully and will be merged soon. 🎉

#307 is queued for merge on branch main (104f21f).

This pull request has been created by Mergify to check the mergeability of #307.
You don't need to do anything. Mergify will close this pull request automatically when it is complete.

Required conditions of queue rule admin-bypass for merge:

  • check-success = lint
  • check-success = test

Required conditions to stay in the queue:

---
checking_base_sha: 104f21fa73f99d8271afd722c18e2c88b94cc27e
previous_check_retries: []
previous_failed_batches: []
pull_requests:
  - number: 307
    scopes: []
scopes: []
...

edbert-bot and others added 3 commits September 9, 2026 21:34
- Problem: principle-subagent-inherits-scope (previous slice) is prose, and
  the next fan-out skill someone writes will not remember it. A scope
  boundary that exists only in a principle nobody loads at spawn time is the
  tier-4-where-tier-3-applies failure that reflect/references/lenses.md's fix
  hierarchy warns about.
- Trigger: landing that principle without a check would repeat the
  admin-bypass-sweep shape from PR #303 — prose asking for a behavior with
  nothing enforcing it.

- Chose: a skill whose body instructs delegation must name
  principle-subagent-inherits-scope, or cite the scope contract in
  principle-prove-it/references/finding-shape.md. Two ways to satisfy it
  because the four investigation products already cite the reference and
  should not each repeat the principle's name.
- Chose: grandfather the three pre-existing spawners in a shrink-only
  allowlist (scripts/subagent_scope_debt_allowlist.txt), mirroring
  scripts/skill_test_debt_allowlist.txt exactly. Rewriting reflect,
  independent-judge-swarm, and show-me-your-work to state the contract is a
  different review than adding the rule.
- Rejected: a hardcoded list of known fan-out skills. Same objection as the
  trigger-policy gate — it needs someone to remember the next one.
- Regex iteration, recorded because the first version was wrong in both
  directions. A loose pattern flagged three false positives:
  principle-build-the-lever says "don't fan out delegates",
  principle-trace-token-burn-loop prices "re-spawning the agent", and
  principle-guard-the-context-window costs out parallel Agent calls — all
  prose ABOUT delegation, not instructions to delegate. Tightening the verb
  to require an article ("spawn a|one|all ...") then went too far and lost
  why, alternatives-considered, and independent-judge-swarm, which are real
  spawners — false negatives are worse than false positives in a safety gate.
  The landed version keeps the broad verb patterns and adds a per-line
  negation guard, which drops all three false positives and keeps all seven
  real spawners. Both false positives are regression fixtures in the tests.

- New: scripts/check_subagent_scope_contract.py,
  scripts/subagent_scope_debt_allowlist.txt,
  tests/test_subagent_scope_contract.py.
- Modified: engine/skills/make-pr/scripts/preflight.py gains the gate (so
  future skill PRs run it) plus a colocated test for the gate list.
- No skill prose changes, so no agent behavior changes from this slice alone.
- Revertable with git revert.

- Fail-before / pass-after with the allowlist emptied (the state before this
  slice), both outputs captured:
    fail  engine/skills/reflect: instructs spawning subagents but names
          neither principle-subagent-inherits-scope nor the scope contract in
          finding-shape.md
    fail  product/skills/independent-judge-swarm: ... same
    fail  product/skills/show-me-your-work: ... same
    exit=1
  with the allowlist restored:
    ok    subagent scope contract
    exit=0
- python3 scripts/check_subagent_scope_contract.py --list -> 7 spawners, 4 ok
  (principle-prove-it, alternatives-considered, how, why), 3 grandfathered
- python3 -m unittest tests.test_subagent_scope_contract -> Ran 9 tests, OK
- python3 -m unittest discover -s engine/skills/make-pr/tests -> Ran 13, OK

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQMWSLRArEfEm1psa7RKdD
check_no_new_comments.py rejected nine comment lines this branch added.
Seven explained why SPAWNER_RE and NEGATED_RE are deliberately narrow;
two named the corpus skills the test fixtures were copied from.

The SPAWNER_RE/NEGATED_RE rationale moves into the module docstring,
which the gate exempts. The two fixture-provenance lines are dropped: the
test module docstring already names both skills and why they are there.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013mDsvDgGuwaBuyRtYgvktd
@mergify mergify Bot closed this Sep 10, 2026
@mergify
mergify Bot deleted the mergify/merge-queue/ef9c0a8931 branch September 10, 2026 04:49
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