feat(agents): W2/S2 doc pipeline two-mode + last inline conversions (BDR-077)

doc-syncer: ONE agent, TWO dispatch modes around the dispatcher's gate —
MODE: audit (model="opus" call-site override, READ-ONLY, drafts + PATCH
PLAN) / MODE: patch (sonnet pin, applies the APPROVED plan, shape oracle
w/ revert-on-fail, emits CHANGE SUMMARY + PATCHED_FILES). Deviation from
plan's 2-file split, per the challenge's own commit-changer mode
precedent: zero text duplication, zero lock moves. Fixes a LATENT DEFECT:
/doc dispatched an agent whose STEP 8 gate could never fire (dispatched
agents cannot ask) — the gate now lives in the dispatcher (DISPATCHER
PROTOCOL section). doc-commit.md consumes the patcher's CHANGE SUMMARY
(the in-thread context now crosses the dispatch boundary, LRN-126).
Consumers rewired: /doc (audit→gate→patch→commit), onboard (audit
report-only, opus), doc-commit steps in bugfix/hotfix/feat/ship-feature/
init-project(5b+10c); scaffolder loses PHASE 6 (README = init 5b's job);
scaffolder + onboarder now DISPATCHED in init-project/onboard (pins live,
was inline on session model). In-wave planted-drift smoke PASSED
end-to-end, disk-verified (audit caught npm-run-dev drift → [MINOR] plan
→ patch applied → summary crossed). Census §14-15 (103 pass), make test
exit 0. Typed plugin-probe dispatch resolution verified post-restart.
This commit is contained in:
Bastien Chanot
2026-07-19 22:28:09 +02:00
parent 74528a6910
commit 18075a38db
11 changed files with 213 additions and 97 deletions
+28
View File
@@ -97,6 +97,34 @@ for s in plugin-check onboard init-project ship-feature; do
# shellcheck disable=SC2016 # literal $HOME wanted: matching the exact inline-load string
lacks "skills/$s/SKILL.md" 'Load `$HOME/.claude/agents/plugin-advisor.md`'
done
# 14) BDR-077 W2/S2 — doc pipeline: ONE agent, TWO modes around the
# dispatcher's gate (audit = opus via call-site override — documented
# precedence over the sonnet pin; patch = sonnet pin). Gate hoisted out
# of the agent (a dispatched agent cannot ask); CHANGE SUMMARY crosses
# the dispatch boundary into doc-commit (LRN-126); scaffolder carries no
# doc step; no consumer inline-loads doc-syncer anymore.
has "agents/doc-syncer.md" 'MODE: audit'
has "agents/doc-syncer.md" 'MODE: patch'
has "agents/doc-syncer.md" 'CHANGE SUMMARY'
has "agents/doc-syncer.md" 'DISPATCHER PROTOCOL'
has "lib/doc-commit.md" 'CHANGE SUMMARY'
has "skills/doc/SKILL.md" 'model="opus"'
has "skills/doc/SKILL.md" 'MODE: patch'
lacks "agents/scaffolder.md" 'INLINE-LOAD'
for s in bugfix hotfix feat ship-feature init-project; do
has "skills/$s/SKILL.md" 'MODE: audit'
# shellcheck disable=SC2016 # literal $HOME wanted: matching the exact inline-load string
lacks "skills/$s/SKILL.md" 'Load `$HOME/.claude/agents/doc-syncer.md`'
done
# 15) BDR-077 W2 — last inline execution converted: scaffolder + onboarder
# are DISPATCHED (pins live); their gates/arbitration stay in the
# orchestrator loop
has "skills/init-project/SKILL.md" 'subagent_type="scaffolder"'
has "skills/onboard/SKILL.md" 'subagent_type="onboarder"'
# shellcheck disable=SC2016
lacks "skills/init-project/SKILL.md" 'Load `$HOME/.claude/agents/scaffolder.md`'
# shellcheck disable=SC2016
lacks "skills/onboard/SKILL.md" 'Load `$HOME/.claude/agents/onboarder.md`'
printf 'model-routing census: %d pass, %d fail\n' "$pass" "$fail"
[ "$fail" -eq 0 ]