From 04063fe60ff09bbbe2dbce851e681e0c1ff7ffb6 Mon Sep 17 00:00:00 2001 From: Kjell Tore Guttormsen Date: Fri, 19 Jun 2026 14:27:03 +0200 Subject: [PATCH] =?UTF-8?q?docs(voyage):=20S20-fix=20=E2=80=94=20correct?= =?UTF-8?q?=20stale=20"Use=20Sonnet=20for=20all=20sub-agents"=20in=203=20o?= =?UTF-8?q?rchestrator=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to e7a58b0 (S20). Operator directive: errors found during a task must always be fixed, not flagged out-of-scope. The three orchestrator reference docs (review/research/planning) carried a pre-pinning "Cost: Use Sonnet for all sub-agents" rule that contradicts the operator-pinned all-opus reality (40d8742 — all 24 named agents are model: opus, guarded by agent-frontmatter.test.mjs). The authoritative command (trekresearch.md) was already correct. Corrected all three to mirror trekresearch.md: sub-agents use their pinned model: frontmatter (currently opus); a phase_signals model signal or the active --profile (e.g. economy) overrides per-phase. Legitimate sonnet uses (economy profile, low-effort path) are per-phase overrides, not a blanket default — left untouched. The two "(Sonnet, Explore)" ad-hoc follow-up/deep-dive hints are outside the 24-agent pinning and align with the global "Sonnet for retrieval" model strategy — left as-is. TDD: anti-false-claim doc-consistency pin written failing-first (3 hits) in doc-consistency.test.mjs, then the prose fixed. Suite 713->714 (712 pass / 2 skip / 0 fail); census doc-pins 69->70, total 670->671. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01LqBYc8Ltrk7LipyJmGxXiB --- agents/planning-orchestrator.md | 5 ++++- agents/research-orchestrator.md | 5 ++++- agents/review-orchestrator.md | 6 ++++-- tests/lib/doc-consistency.test.mjs | 19 +++++++++++++++++++ 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/agents/planning-orchestrator.md b/agents/planning-orchestrator.md index cfd576f..25965d7 100644 --- a/agents/planning-orchestrator.md +++ b/agents/planning-orchestrator.md @@ -477,7 +477,10 @@ You can: of the brief (Intent, Goal, Constraint, Preference, NFR, Success Criterion). A plan step with no brief basis is scope creep — flag it or remove it. - **Scope:** Only explore the current working directory. Never read files outside the repo. -- **Cost:** Use Sonnet for all sub-agents. You (the orchestrator) run on Opus. +- **Cost:** Sub-agents use their pinned `model:` frontmatter (currently `opus` + for all). A `phase_signals[].model` brief signal or the active + `--profile` (e.g. `economy`) overrides the model per-phase. You (the + orchestrator) run on Opus. - **Privacy:** Never log secrets, tokens, or credentials. - **Quality:** Every file path in the plan must be verified. Every "reuses" reference must point to real code. The plan must stand alone without exploration context. diff --git a/agents/research-orchestrator.md b/agents/research-orchestrator.md index 53e9ae2..51cd682 100644 --- a/agents/research-orchestrator.md +++ b/agents/research-orchestrator.md @@ -218,7 +218,10 @@ You can: - **Scope:** Codebase analysis is limited to the current working directory. External research has no such limit. -- **Cost:** Use Sonnet for all sub-agents. You (the orchestrator) run on Opus. +- **Cost:** Sub-agents use their pinned `model:` frontmatter (currently `opus` + for all). A `phase_signals[].model` brief signal or the active + `--profile` (e.g. `economy`) overrides the model per-phase. You (the + orchestrator) run on Opus. - **Privacy:** Never log secrets, tokens, or credentials in the brief. - **Sources:** Every claim in the brief must cite a source (URL or file path). Never invent findings. diff --git a/agents/review-orchestrator.md b/agents/review-orchestrator.md index 6169be0..aa1e8bf 100644 --- a/agents/review-orchestrator.md +++ b/agents/review-orchestrator.md @@ -242,8 +242,10 @@ Append a stats line to `${CLAUDE_PLUGIN_DATA}/trekreview-stats.jsonl`: - **No silent drops.** Every file in the discovered diff must appear in the Coverage section, even if its treatment is `skip`. Hidden truncation is COVERAGE_SILENT_SKIP (MAJOR). -- **Cost:** Use Sonnet for all sub-agents. The orchestrator (the - /trekreview command itself) runs on Opus. +- **Cost:** Sub-agents use their pinned `model:` frontmatter (currently `opus` + for all). A `phase_signals[].model` brief signal or the active + `--profile` (e.g. `economy`) overrides the model per-phase. The orchestrator + (the /trekreview command itself) runs on Opus. - **Privacy:** Never log secrets, tokens, or credentials. Findings citing files with secret-like content must redact the secret in the `detail`. - **Honesty:** If the diff is trivially small or all-skip, say so. Do diff --git a/tests/lib/doc-consistency.test.mjs b/tests/lib/doc-consistency.test.mjs index 9f45b1b..3951d2f 100644 --- a/tests/lib/doc-consistency.test.mjs +++ b/tests/lib/doc-consistency.test.mjs @@ -304,6 +304,25 @@ test('Phase 9 prose mandates parallel single-message dispatch + inline dedup', ( ); }); +// --- S20 — anti-false-claim: orchestrator docs must not claim ALL sub-agents run on Sonnet --- +// +// All named swarm agents are pinned `model: opus` (operator decision 40d8742; +// structural source-of-truth = agent-frontmatter.test.mjs). The orchestrator +// reference docs carried a pre-pinning "Use Sonnet for all sub-agents" cost rule +// that contradicts that pinning. This anti-false-claim pin keeps the prose honest. +// Legitimate sonnet uses (economy profile; low-effort `phase_signals.model`) are +// per-phase overrides, NOT a blanket "all sub-agents" default — unaffected here. +test('orchestrator docs do not claim ALL sub-agents run on Sonnet (agents are model: opus) [S20]', () => { + const orchestrators = listMd('agents').filter(f => f.endsWith('orchestrator.md')); + assert.ok(orchestrators.length >= 3, `expected ≥ 3 orchestrator reference docs, got ${orchestrators.length}`); + for (const f of orchestrators) { + assert.ok( + !/Use Sonnet for all sub-agents/i.test(read(`agents/${f}`)), + `agents/${f}: stale "Use Sonnet for all sub-agents" contradicts the all-opus agent pinning — fix the prose, not this test`, + ); + } +}); + // --- v4.1 Step 21 — pin --profile + phase_models on the 6 commands --- // // CLAUDE.md / README.md pinning is deferred to Step 22 (post-write of