test(voyage): extend doc-consistency.test.mjs — pin --profile + phase_models on 6 commands SC #20
Step 21 of v4.1 — extend-in-place per Plan-critic Blocker 2 split:
commands-only assertions land here; CLAUDE.md / README.md pinning is
deferred to Step 22 (post-write).
Changes:
1. CLAUDE.md command coverage loop now spans all SIX pipeline commands
(added /trekcontinue — was 5 of 6 pre-v4.1 per HIGH risk-assessor).
2. New: every pipeline command-file (trekbrief/research/plan/execute/
review/continue.md) must document the --profile flag.
3. New: forbidden-alias check — no command-file may use the legacy
names model_per_phase / phase_to_model / profile_phase_models.
Canonical name is "phase_models" (locked in brief).
4. New: at least one command-file must mention "phase_models" by name
so the regression detects total removal of the canonical-name
reference.
Tests: 482 pass + 2 skipped (Docker not installed).
This commit is contained in:
parent
e98eba88c9
commit
e440ca858c
1 changed files with 65 additions and 2 deletions
|
|
@ -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');
|
'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');
|
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}`);
|
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', () => {
|
test('commands/trekplan.md Phase 8 seals Opus-4.7 schema-drift defense', () => {
|
||||||
const cmd = read('commands/trekplan.md');
|
const cmd = read('commands/trekplan.md');
|
||||||
// Locate Phase 8 section
|
// Locate Phase 8 section
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue