feat(#1867): add UI Considerations section to UI-SPEC template (WIRE-02)
Record resolved UI-state considerations in the UI-SPEC, backward-compatibly (Phase 2, WIRE-02). templates/UI-SPEC.md gains a '## UI Considerations' section (analog of SPEC '## Edge Coverage') after '## Copywriting Contract' — a | Category | Element(s) | Status | Resolution / Reason | table with covered/backstop/unresolved rows in the locked probe-core projectTruths format the shipped plan-phase lift (plan-phase.md:921) reads. Empty/error COPY stays in Copywriting; this section covers shape-rooted STATE and references those rows (de-dup). Tests: docs-fixtures parsed-heading assertion (UI Considerations present + distinct from Copywriting Contract; allow-test-rule, parsed structure); typed backward-compat (projectTruths(undefined/[])===[], old UI-SPEC still plans — Hyrum), format-match, and idempotency (proposeElements determinism). The template-structure test was the RED driver. Install-parity cascade (INVENTORY-MANIFEST + 16 golden fixtures + agent-size-baseline) deferred to Phase 3 SHIP-01, as planned. Claude-Session: https://claude.ai/code/session_01BKt4hgNZwXSeJYJtYAQUSS
This commit is contained in:
@@ -15,6 +15,7 @@ const path = require('node:path');
|
||||
const uc = require(path.join(__dirname, '..', 'gsd-core', 'bin', 'lib', 'ui-consideration-probe.cjs'));
|
||||
const docPath = path.join(__dirname, '..', 'gsd-core', 'references', 'ui-consideration-probe.md');
|
||||
const domainPath = path.join(__dirname, '..', 'gsd-core', 'references', 'domain-probes.md');
|
||||
const templatePath = path.join(__dirname, '..', 'gsd-core', 'templates', 'UI-SPEC.md');
|
||||
|
||||
// Extract the first-column ids from the `## Taxonomy` markdown table (skips the `id` header
|
||||
// row and the `|----|` separator; an id is a lowercase-hyphen token).
|
||||
@@ -55,3 +56,13 @@ describe('ui-consideration-probe doc/code parity (ADPT-02)', () => {
|
||||
assert.match(md, /domain-probes\.md/);
|
||||
});
|
||||
});
|
||||
|
||||
describe('UI-SPEC template `## UI Considerations` section (WIRE-02 SC3 de-dup)', () => {
|
||||
// PARSED `##` headings only (never a raw copy substring) — a reformat that preserves the data
|
||||
// does not fail; a missing/merged section does. Reuses the domainTopics() heading parser.
|
||||
test('template ## headings include BOTH `UI Considerations` and `Copywriting Contract` as distinct sections', () => {
|
||||
const headings = domainTopics(fs.readFileSync(templatePath, 'utf8'));
|
||||
assert.ok(headings.includes('ui considerations'), 'template must gain a ## UI Considerations section');
|
||||
assert.ok(headings.includes('copywriting contract'), 'template must retain the distinct ## Copywriting Contract section (de-dup, not a rename)');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user