From 09e7fb936494bce5ce0a7b7590eee0ebdcff37ea Mon Sep 17 00:00:00 2001 From: Kjell Tore Guttormsen Date: Fri, 1 May 2026 17:18:51 +0200 Subject: [PATCH] test(ultraplan-local): extend doc-consistency with 4 ultrareview pins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modify "all four pipeline commands" → "all five" (adds /ultrareview-local). Add 3 new pins: Handover 6 section in HANDOVER-CONTRACTS.md, review-validator CLI shim, rule-catalogue 12-key size invariant. 11/11 doc-consistency tests pass. Co-Authored-By: Claude Opus 4.7 --- .../tests/lib/doc-consistency.test.mjs | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/plugins/ultraplan-local/tests/lib/doc-consistency.test.mjs b/plugins/ultraplan-local/tests/lib/doc-consistency.test.mjs index b2f9a34..56dc169 100644 --- a/plugins/ultraplan-local/tests/lib/doc-consistency.test.mjs +++ b/plugins/ultraplan-local/tests/lib/doc-consistency.test.mjs @@ -94,9 +94,35 @@ 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 four pipeline commands', () => { +test('CLAUDE.md mentions all five pipeline commands', () => { const md = read('CLAUDE.md'); - for (const c of ['/ultrabrief-local', '/ultraresearch-local', '/ultraplan-local', '/ultraexecute-local']) { + for (const c of ['/ultrabrief-local', '/ultraresearch-local', '/ultraplan-local', '/ultraexecute-local', '/ultrareview-local']) { assert.ok(md.includes(c), `CLAUDE.md missing reference to ${c}`); } }); + +test('HANDOVER-CONTRACTS.md contains Handover 6 section', () => { + const text = read('docs/HANDOVER-CONTRACTS.md'); + assert.ok( + text.includes('## Handover 6'), + 'docs/HANDOVER-CONTRACTS.md should document Handover 6 (review → plan)', + ); +}); + +test('review-validator has CLI shim', () => { + const text = read('lib/validators/review-validator.mjs'); + assert.ok( + text.includes('import.meta.url === '), + 'lib/validators/review-validator.mjs should expose the standard CLI shim ' + + '(if (import.meta.url === `file://${process.argv[1]}`)) so commands can call it from Bash', + ); +}); + +test('rule-catalogue has exactly 12 entries', async () => { + const mod = await import('../../lib/review/rule-catalogue.mjs'); + assert.strictEqual( + mod.RULE_CATALOGUE.length, + 12, + 'lib/review/rule-catalogue.mjs RULE_CATALOGUE size invariant: must be 12 (v1.0 baseline)', + ); +});