The design language that makes your AI harness better at design.
JavaScript
Cover provider seed markers
Paul Bakausa3d7b247aabd
diff --git a/skill/scripts/lib/staleness-deep.mjs b/skill/scripts/lib/staleness-deep.mjsindex 53beb1b4b..2c8d6a82f 100644--- a/skill/scripts/lib/staleness-deep.mjs+++ b/skill/scripts/lib/staleness-deep.mjs@@ -129,8 +129,10 @@ function hasCoverageValue(value) {return false;}-const SEED_DESIGN_MARKER = '<!-- SEED: established with the user before implementation; '- + "re-run /impeccable document once there's code to capture the actual tokens and components. -->";+const SEED_DESIGN_MARKERS = ['/', '$'].map((prefix) =>+ '<!-- SEED: established with the user before implementation; '+ + `re-run ${prefix}impeccable document once there's code to capture the actual tokens and components. -->`+);export function checkDesignCoverage({ design, designPath, parseDesignMd }) {if (!design || typeof parseDesignMd !== 'function') return [];@@ -140,7 +142,8 @@ export function checkDesignCoverage({ design, designPath, parseDesignMd }) {} catch {return [];}- const requiredSections = design.includes(SEED_DESIGN_MARKER)+ const isSeed = SEED_DESIGN_MARKERS.some((marker) => design.includes(marker));+ const requiredSections = isSeed? ['colors', 'typography']: ['colors', 'typography', 'components'];const missing = requiredSectionsdiff --git a/tests/doctor.test.mjs b/tests/doctor.test.mjsindex 2063da2c3..7d801dfb8 100644--- a/tests/doctor.test.mjs+++ b/tests/doctor.test.mjs@@ -173,31 +173,35 @@ describe('checkDesignCoverage', () => {});it('allows Components to be absent from a marked seed document', () => {- const design = [- '<!-- SEED: established with the user before implementation; re-run /impeccable document once there\'s code to capture the actual tokens and components. -->',- '',- '# Design System: X',- '',- '## Colors', '', '### Primary', '- **Ink** (#111): Text.', '',- '## Typography', '', '**Body Font:** Inter', '',- '### Hierarchy', '- **Body** (400, 16px, 1.5): Paragraphs.', '',- ].join('\n');- assert.deepEqual(checkDesignCoverage({ design, designPath: 'DESIGN.md', parseDesignMd }), []);+ for (const command of ['/impeccable', '$impeccable']) {+ const design = [+ `<!-- SEED: established with the user before implementation; re-run ${command} document once there's code to capture the actual tokens and components. -->`,+ '',+ '# Design System: X',+ '',+ '## Colors', '', '### Primary', '- **Ink** (#111): Text.', '',+ '## Typography', '', '**Body Font:** Inter', '',+ '### Hierarchy', '- **Body** (400, 16px, 1.5): Paragraphs.', '',+ ].join('\n');+ assert.deepEqual(checkDesignCoverage({ design, designPath: 'DESIGN.md', parseDesignMd }), []);+ }});it('still requires seed documents to cover Colors and Typography', () => {- const design = [- '<!-- SEED: established with the user before implementation; re-run /impeccable document once there\'s code to capture the actual tokens and components. -->',- '',- '# Design System: X',- '',- '## Typography', '', '**Body Font:** Inter', '',- '### Hierarchy', '- **Body** (400, 16px, 1.5): Paragraphs.', '',- ].join('\n');- const findings = checkDesignCoverage({ design, designPath: 'DESIGN.md', parseDesignMd });- assert.deepEqual(ids(findings), ['design-md-coverage']);- assert.match(findings[0].summary, /no colors section/);- assert.doesNotMatch(findings[0].summary, /components/);+ for (const command of ['/impeccable', '$impeccable']) {+ const design = [+ `<!-- SEED: established with the user before implementation; re-run ${command} document once there's code to capture the actual tokens and components. -->`,+ '',+ '# Design System: X',+ '',+ '## Typography', '', '**Body Font:** Inter', '',+ '### Hierarchy', '- **Body** (400, 16px, 1.5): Paragraphs.', '',+ ].join('\n');+ const findings = checkDesignCoverage({ design, designPath: 'DESIGN.md', parseDesignMd });+ assert.deepEqual(ids(findings), ['design-md-coverage']);+ assert.match(findings[0].summary, /no colors section/);+ assert.doesNotMatch(findings[0].summary, /components/);+ }});it('counts machine-readable frontmatter as section coverage', () => {