feat(design): modes, craft-floor reflexes, calibration, catalog in doctrine

DESIGN_HARD_RULES: the classifier names four visitor modes (Persuade,
Operate, Read, Experience, plus Hybrid per section) and keeps the
MARKETING/LANDING PAGE and APP UI aliases; Read and Experience get three
rules each; a "Reflexes no detector catches" block (browser surfaces, one
authored motion moment, depth has an offset, tinted secondary text, space
above headings, light-or-dark from the use scene) and the three-looks
calibration follow the universal rules. The slop section renders the 11
legacy lines plus the detector rule ids and judgment tells from the catalog;
in design-review, which also renders DESIGN_METHODOLOGY, it becomes a
one-line pointer so the catalog is paid for once. Header counts are
computed, not hardcoded.

DESIGN_METHODOLOGY: category 9 renders the catalog in three registers
(legacy lines verbatim, detector rules that need judgment with bracketed
ids, gstack-only judgment tells as prose, polish-level ids on one line);
categories 5 and 7 carry the browser-surface and one-motion-moment reflexes;
the typography overused-face item points at [overused-font] with the
role-scoped exception. The consultation Codex prompt's anti-slop line reads
from the catalog.

Budget: design-review eager 25.6K -> 27.0K (ceiling 27,984), plan-design-review
unchanged at 17.4K; no carve-guard or context-budget re-baseline needed; ship
goldens unchanged (ship never renders the hard rules).

Derived from pbakaus/impeccable reference/craft-floor.md + new-work.md
(Apache-2.0), rewritten. See NOTICE.md (commit 12).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-09-08 15:43:33 +00:00
co-authored by Claude Fable 5.1
parent 11c2a33ae9
commit 9825bfdbb7
5 changed files with 219 additions and 47 deletions
+41
View File
@@ -1789,6 +1789,47 @@ describe('DESIGN_HARD_RULES resolver', () => {
expect(content).toContain('Universal rules');
});
test('classifier names the four visitor modes and keeps the legacy aliases', () => {
const content = readSkillUnion('plan-design-review');
for (const mode of ['PERSUADE', 'OPERATE', 'READ', 'EXPERIENCE', 'HYBRID']) expect(content).toContain(`**${mode}**`);
expect(content).toContain('Read rules');
expect(content).toContain('Experience rules');
expect(content).toContain('classify per section, not per page');
});
test('carries the craft-floor reflexes and the three-looks calibration', () => {
const content = readSkillUnion('plan-design-review');
expect(content).toContain('Reflexes no detector catches');
expect(content).toContain('Browser surfaces carry the design');
expect(content).toContain('One authored motion moment');
expect(content).toContain('Depth has an offset');
expect(content).toContain('Light or dark comes from the use scene');
expect(content).toContain('Calibration: the three looks');
});
test('slop section lists detector rule ids and judgment tells outside design-review', () => {
const content = readSkillUnion('plan-design-review');
expect(content).toContain('Detector rule ids for the rest of the catalog');
expect(content).toContain('nested-cards: Nested cards');
expect(content).toContain('Judgment tells with no detector rule');
// Never a bracketed gstack-only id.
expect(content).not.toContain('[hero-metrics]');
});
test('design-review renders the catalog once: Methodology category 9 carries it, Hard Rules points at it', () => {
const content = fs.readFileSync(path.join(ROOT, 'design-review', 'SKILL.md'), 'utf-8');
expect(content.split('### Design Hard Rules').length - 1).toBe(1);
// Category 9 lists the rule once; Typography points at the same id from its overused-face item.
expect(content.split('- [overused-font] ').length - 1).toBe(1);
expect(content.split('[overused-font]').length - 1).toBe(2);
expect(content).toContain('are Methodology category 9');
expect(content).toContain('**9. AI Slop Detection**');
expect(content).toContain('- [nested-cards] ');
expect(content).toContain('Judgment tells (no detector rule');
// The legacy blacklist is not repeated as a numbered list in design-review.
expect(content).not.toMatch(/^1\. Purple\/violet\/indigo/m);
});
test('references shared AI slop blacklist items', () => {
const content = readSkillUnion('plan-design-review');
expect(content).toContain('3-column feature grid');