fix(docs): no doc claims an opus orchestrator any more; research spawns use the resolved model

D-07 had been closed on CLAUDE.md alone. The same false claim lived on elsewhere:
- README.md's "Switch the planning model" said four commands default to opus.
- The same README section offered a sed recipe for `model: opus` frontmatter lines, which
  0 of 7 command files have.
- commands/trekresearch.md said "the orchestrator runs on Opus".
Since v5.9.0 no command pins model:, so the orchestrator follows the session model.

- README: the section now says how it actually works. You pick the orchestrator's model with
  the session model (`claude --model sonnet` or `/model`). Sub-agent models are resolved at
  the spawn sites: brief phase_signals, then profile phase_models, then the agents/*.md pins
  as fallback. `--profile economy` still moves the sub-agents to Sonnet.
- trekresearch Launch rules: "Use model: "opus" for all sub-agents" contradicted the same
  file's own three-layer resolution, which v5.9.0 wired into the spawn sites and the file
  documents in Phase 1 and Hard rules -> Cost. The rule now injects
  `phase_signal_result.model` with agent frontmatter as the fallback, and says the
  orchestrator follows the session model. Nothing changes under the default premium
  profile: it still resolves to opus. The engine=swarm note now names the resolved-model
  injection as the anchor, instead of the removed literal.
- Two doc-consistency pins were written first and failed before this change:
  - no opus-orchestrator claim in README/CLAUDE.md/trekresearch, and no `^model: opus$`
    recipe;
  - the Launch rules name `phase_signal_result.model` and carry no blanket opus rule.
- Not touched: the follow-up agent in the default-off STORM phase still says model: "opus".
  That is part of an experiment whose fate is an operator decision.

End-state gate D-07: open -> closed. Defects 3 -> 2 of 7 (D-03, D-04 remain, by design);
registry integrity intact. Suite 1081 (1079/0/2), run on a clean export of the index.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-09-17 17:00:30 +02:00
commit e1d4425053
3 changed files with 42 additions and 18 deletions

View file

@ -885,22 +885,15 @@ synthesis.
### Switch the planning model ### Switch the planning model
The default for `/trekbrief`, `/trekresearch`, The command orchestrators pin no model: `/trekbrief`, `/trekresearch`,
`/trekplan`, and `/trekexecute` is `opus` (deep `/trekplan`, and `/trekexecute` run on whatever model the session runs on.
reasoning). To run on Sonnet for cost or latency, search-and-replace To run them on Sonnet for cost or latency, start the session on Sonnet
the frontmatter in these four command files: (`claude --model sonnet`) or switch with `/model` inside the session.
```bash The exploration and review sub-agents are chosen separately, at the spawn
sed -i.bak 's/^model: opus$/model: sonnet/' \ sites: brief `phase_signals` first, then the profile's `phase_models`, with the
commands/trekbrief.md \ `model: opus` pins in `agents/*.md` as the fallback. Run `--profile economy`
commands/trekresearch.md \ to put the sub-agents on Sonnet as well.
commands/trekplan.md \
commands/trekexecute.md
```
This flips only the four command orchestrators. The exploration and review
sub-agents in `agents/*.md` are separately `opus`-pinned — flip those too, or
just run `--profile economy`, to put the whole pipeline on Sonnet.
### Disable external research ### Disable external research

View file

@ -327,7 +327,7 @@ Profile below). The profile's on/off switch wins. Initialize
**engine = swarm (default):** run the `### External agents` block below **engine = swarm (default):** run the `### External agents` block below
unchanged. This is byte-for-byte the current path, so `--engine swarm` unchanged. This is byte-for-byte the current path, so `--engine swarm`
changes nothing (SC1). Keep the native-swarm anchors intact ("in parallel", changes nothing (SC1). Keep the native-swarm anchors intact ("in parallel",
"single message", `model: "opus"`). "single message", and the resolved-model injection in the Launch rules).
**engine = deep-research:** **engine = deep-research:**
@ -394,7 +394,9 @@ investigate, and any context from the interview.
### Launch rules ### Launch rules
- Launch ALL selected agents **in parallel** in a single message - Launch ALL selected agents **in parallel** in a single message
- Use model: "opus" for all sub-agents (the orchestrator runs on Opus) - Inject the resolved model at every spawn: `phase_signal_result.model` (brief
signal > profile), with the agent's frontmatter `model:` as the fallback — see
Hard rules → Cost. The orchestrator itself follows the session model.
- **Never pass the Agent tool's `name` parameter — at this or any other spawn - **Never pass the Agent tool's `name` parameter — at this or any other spawn
site in this command.** `name` does not label a subagent, it changes its site in this command.** `name` does not label a subagent, it changes its
kind: the spawn is recorded as `taskKind: "in_process_teammate"` kind: the spawn is recorded as `taskKind: "in_process_teammate"`

View file

@ -1800,3 +1800,32 @@ test('S95: gemini_used survives as a vestigial stats field (export schema unbrok
'gemini_used stays in the trekresearch export allowlist — the agent is dropped, the field is pinned false, and removing it would break existing consumers', 'gemini_used stays in the trekresearch export allowlist — the agent is dropped, the field is pinned false, and removing it would break existing consumers',
); );
}); });
// End-state defect D-07: since v5.9.0 no command pins `model:`, so the orchestrator follows
// the session model, and sub-agent models are resolved at the spawn sites (brief signal >
// profile > agent frontmatter). No user-facing doc may claim otherwise. Fix the SOURCE.
test('D-07: no doc claims an opus orchestrator or ships a recipe for model: lines no command has', () => {
const readme = read('README.md');
assert.ok(
!/\^model: opus\$/.test(readme),
'README.md must not ship a sed recipe for `model: opus` frontmatter lines — 0 of 7 command files have one',
);
assert.ok(
!/default for `\/trekbrief`[\s\S]{0,80}?is `opus`/.test(readme),
'README.md must not claim the command orchestrators default to opus — they follow the session model',
);
for (const f of ['README.md', 'CLAUDE.md', 'commands/trekresearch.md']) {
assert.ok(!/orchestrator runs on Opus/i.test(read(f)), `${f}: the orchestrator follows the session model`);
}
});
test('D-07: trekresearch launch rules inject the resolved model instead of a blanket opus', () => {
const t = read('commands/trekresearch.md');
const rules = (t.split('\n### Launch rules\n')[1] || '').split('\n## ')[0];
assert.ok(rules.length > 0, 'trekresearch.md must still carry the Launch rules sub-section');
assert.ok(
!/model: "opus" for all sub-agents/i.test(rules),
'a blanket opus rule contradicts the file\'s own resolution (brief > profile > agent frontmatter, wired in v5.9.0)',
);
assert.match(rules, /phase_signal_result\.model/, 'the launch rules must name the resolved model the spawn sites inject');
});