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:
+13
-8
@@ -17,23 +17,28 @@ and any SIGNIFICANT-gated patch), with the code already committed.
|
||||
- Orchestrators (ship-feature / init-project): run it BEFORE the FINISH step — otherwise
|
||||
the doc commit strands outside the merge/PR (the exact bug this fixes). See ORDERING.
|
||||
|
||||
doc-syncer runs IN-THREAD (the orchestrator loads it), so the list of files it patched is
|
||||
already in hand — surfaced as `PATCHED_FILES:` in doc-syncer's OUTPUT, ONE PATH PER LINE.
|
||||
Pass each line as a SEPARATE argument (see DO step 3).
|
||||
doc-syncer runs DISPATCHED (BDR-077: `MODE: audit` on opus → dispatcher gate
|
||||
→ `MODE: patch` on sonnet); its patch-mode report hands the orchestrator BOTH
|
||||
machine blocks: `PATCHED_FILES:` (ONE PATH PER LINE — pass each line as a
|
||||
SEPARATE argument, see DO step 3) and `CHANGE SUMMARY` (one line per patched
|
||||
file — the patch context that used to be in-thread now crosses the dispatch
|
||||
boundary through this block, LRN-126).
|
||||
|
||||
## DO
|
||||
|
||||
1. Collect `PATCHED_FILES` — the public-doc paths doc-syncer wrote this run (its OUTPUT
|
||||
block, ONE PATH PER LINE). Empty → nothing to commit; the helper no-ops.
|
||||
|
||||
2. Compose — from the patch context the AGENT holds (doc-syncer ran in-thread, so the
|
||||
agent knows exactly what changed) — BOTH artifacts:
|
||||
2. Compose — from doc-syncer's `CHANGE SUMMARY` block (the patcher held the
|
||||
patch context and reported it; a dispatched patcher with NO summary block
|
||||
in its report = incomplete report, re-dispatch rather than invent) —
|
||||
BOTH artifacts:
|
||||
- the COMMIT MESSAGE, repo style `docs: <summary> — <flow>`
|
||||
(`docs: README features + USAGE flags — ship-feature dark-mode`);
|
||||
- the CHANGE SUMMARY for the rc 0 surface (e.g. "README features section + USAGE
|
||||
--export flag").
|
||||
Both are the AGENT's to write — the helper produces NEITHER (its only stdout is the
|
||||
hash). This is the load-bearing point of the visible surface: see the rc 0 row.
|
||||
--export flag") — derived from the block, never a bare file count.
|
||||
Both are the ORCHESTRATOR's to write — the helper produces NEITHER (its only stdout
|
||||
is the hash). This is the load-bearing point of the visible surface: see the rc 0 row.
|
||||
|
||||
3. Commit surgically via the helper, passing EXACTLY the patched files — each path as a
|
||||
SEPARATE argument (split `PATCHED_FILES` on NEWLINES only), capturing the hash:
|
||||
|
||||
Reference in New Issue
Block a user