import {test} from 'node:test'; import assert from 'node:assert/strict'; import {readFileSync} from 'node:fs'; const read = path => readFileSync(path, 'utf8'); test('Roadmap visibly assesses code and real delivery before adoption', () => { const page = read('docs/strategy/roadmap.mdx'); const visible = page.split('
')[0]; const headings = [...visible.matchAll(/^## (.+)$/gm)].map(match => match[1]); assert.deepEqual(headings, ['1. Understand code quality and delivery', '2. Fix critical readiness gaps', '3. Run a bounded pilot', '4. Expand only on evidence', '5. Sustain and improve']); assert(visible.indexOf(' story />') < visible.indexOf('## 1.')); for (const marker of ['representative repositories', 'tests and CI', 'maintainability', 'technical debt', 'security findings', 'actual SDLC', 'ownership', 'review and release', 'bottlenecks', 'baseline findings', 'process map', 'prioritized gaps', 'alongside the pilot', './measurement.mdx', './target-operating-model.mdx']) assert(visible.includes(marker), marker); assert.equal((visible.match(/\*\*Output:/g) || []).length, 5); assert.match(visible, /Recommended sequence/); assert(!page.includes('### Foundation')); for (const marker of ['revocation', 'exact-artifact approvals', 'idempotency', 'human takeover', 'sensitive decisions']) assert(page.includes(marker), marker); }); test('both roadmap diagrams make assessment and readiness prerequisites to the pilot', () => { const ids = ['assessment', 'readiness', 'pilot', 'expansion', 'sustain']; for (const suffix of ['', '-mobile']) { const diagram = JSON.parse(read(`diagrams/strategy-roadmap${suffix}.architecture.json`)); assert.deepEqual(diagram.components.map(n => n.id), ids); assert.deepEqual(diagram.connections.map(e => [e.from,e.to]), ids.slice(1).map((id, i) => [ids[i],id])); assert.match(diagram.components[0].sublabel, /Code quality \+ delivery flow/); assert.match(diagram.components[1].sublabel, /Critical gaps/); assert.match(diagram.components[4].label, /Sustain/); } });