diff --git a/plugins/voyage/tests/lib/doc-consistency.test.mjs b/plugins/voyage/tests/lib/doc-consistency.test.mjs index 84c1caf..42d4f22 100644 --- a/plugins/voyage/tests/lib/doc-consistency.test.mjs +++ b/plugins/voyage/tests/lib/doc-consistency.test.mjs @@ -94,9 +94,17 @@ test('settings.json no longer carries vestigial exploration block', () => { 'agentTeam block was vestigial — should be deleted in v3.1.0 Spor 0'); }); -test('CLAUDE.md mentions all five pipeline commands', () => { +test('CLAUDE.md mentions all six pipeline commands', () => { + // Step 21 of v4.1 — added /trekcontinue to coverage (was 5/6 before). const md = read('CLAUDE.md'); - for (const c of ['/trekbrief', '/trekresearch', '/trekplan', '/trekexecute', '/trekreview']) { + for (const c of [ + '/trekbrief', + '/trekresearch', + '/trekplan', + '/trekexecute', + '/trekreview', + '/trekcontinue', + ]) { assert.ok(md.includes(c), `CLAUDE.md missing reference to ${c}`); } }); @@ -238,6 +246,61 @@ test('Phase 9 prose mandates parallel single-message dispatch + inline dedup', ( ); }); +// --- 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 +// those documents). Step 21 only verifies command-file content, which +// was written in Step 7 (Wave 3). + +const PIPELINE_COMMANDS = [ + 'trekbrief.md', + 'trekresearch.md', + 'trekplan.md', + 'trekexecute.md', + 'trekreview.md', + 'trekcontinue.md', +]; + +test('every pipeline command-file documents the --profile flag (SC #20)', () => { + for (const f of PIPELINE_COMMANDS) { + const text = read(`commands/${f}`); + assert.match( + text, + /--profile\b/, + `commands/${f}: --profile flag is required documentation in v4.1`, + ); + } +}); + +test('command-files mentioning model profiles use canonical name `phase_models`', () => { + // Reject legacy / brainstormed alternatives that would confuse readers. + const FORBIDDEN = ['model_per_phase', 'phase_to_model', 'profile_phase_models']; + for (const f of PIPELINE_COMMANDS) { + const text = read(`commands/${f}`); + for (const bad of FORBIDDEN) { + assert.ok( + !text.includes(bad), + `commands/${f}: forbidden alias "${bad}" — canonical name is "phase_models"`, + ); + } + } +}); + +test('at least one pipeline command-file references `phase_models` canonical name', () => { + // Sanity: not every command has to enumerate phase_models inline (e.g. + // trekbrief and trekcontinue may only mention --profile), but ≥ 1 + // command-file must spell out the canonical name so the regression test + // pins drift. + let mentioned = 0; + for (const f of PIPELINE_COMMANDS) { + if (read(`commands/${f}`).includes('phase_models')) mentioned += 1; + } + assert.ok( + mentioned >= 1, + `expected ≥ 1 command-file to mention canonical name "phase_models", got ${mentioned}`, + ); +}); + test('commands/trekplan.md Phase 8 seals Opus-4.7 schema-drift defense', () => { const cmd = read('commands/trekplan.md'); // Locate Phase 8 section