mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-11 07:29:00 +02:00
feat(design-consultation): font procedure, role-scoped overused list, color strategies
The proposal section stops handing out a font menu. "Choosing faces: a
procedure, not a menu" names the subject's world, shortlists per role,
strikes the overused list for that role, verifies availability in-session,
and states the loading strategy. {{OVERUSED_FONTS}} renders the role-scoped
lists from lib/design-catalog.ts: overused as display (the detector's
overused-font set plus the training-data defaults), fine as body/UI on an
Operate or Read surface, mono for data and code, banned in any role, and a
short verified-free list with its verification date. Color approaches become
Restrained / Committed / Full palette / Drenched. The anti-convergence
directive drops light-vs-dark as a dial (it comes from the use scene) and the
three-looks calibration sits under Your Design Knowledge. The slop list is
{{DESIGN_SLOP_BULLETS}}: prose from the catalog, no rule ids, polish-level
tells omitted.
design-html's "Never include (AI slop blacklist)" list keeps its literal
(carve guard) and each line now carries a trailing <!-- id --> naming a
catalog entry, pinned by test/design-catalog.test.ts so the last surviving
duplicate is derived-by-test. Both resolvers are registered and listed in
ARCHITECTURE.md. No carve-guard or budget re-baseline needed.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
9825bfdbb7
commit
71505f8374
@@ -178,6 +178,22 @@ describe('renderCatalog', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('design-html blacklist is derived-by-test (decision 31)', () => {
|
||||
test('every <!-- id --> on the Never-include list names a catalog entry', () => {
|
||||
const tmpl = fs.readFileSync(path.join(ROOT, 'design-html', 'SKILL.md.tmpl'), 'utf-8');
|
||||
const start = tmpl.indexOf('**Never include (AI slop blacklist):**');
|
||||
expect(start).toBeGreaterThan(0);
|
||||
const block = tmpl.slice(start, tmpl.indexOf('\n\n', start + 10));
|
||||
const lines = block.split('\n').filter(l => l.startsWith('- '));
|
||||
expect(lines.length).toBeGreaterThanOrEqual(10);
|
||||
for (const line of lines) {
|
||||
const m = line.match(/<!-- ([a-z0-9-]+) -->$/);
|
||||
expect(m, line).not.toBeNull();
|
||||
expect(catalogEntry(m![1]), m![1]).toBeDefined();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('module purity', () => {
|
||||
test('imports nothing (no I/O, no scripts/); loading it prints nothing', () => {
|
||||
const file = path.join(ROOT, 'lib', 'design-catalog.ts');
|
||||
|
||||
@@ -1816,6 +1816,30 @@ describe('DESIGN_HARD_RULES resolver', () => {
|
||||
expect(content).not.toContain('[hero-metrics]');
|
||||
});
|
||||
|
||||
test('design-consultation carries the font procedure, role-scoped lists, color strategies, and catalog bullets', () => {
|
||||
const content = readSkillUnion('design-consultation');
|
||||
expect(content).toContain('Choosing faces: a procedure, not a menu');
|
||||
expect(content).toContain('**Overused as display**');
|
||||
expect(content).toContain('Fine as body/UI on an Operate or Read surface');
|
||||
expect(content).toContain('**Banned in any role:** Papyrus');
|
||||
expect(content).toContain('Restrained (1 accent + neutrals');
|
||||
expect(content).toContain('Drenched (color as the primary design tool');
|
||||
expect(content).toContain('Light vs dark is not one of the dials');
|
||||
expect(content).toContain('Calibration: the three looks');
|
||||
// Bullets are prose only: never a bracketed rule id in the proposal skill.
|
||||
expect(content).toContain('- A card inside a card is always wrong.');
|
||||
expect(content).not.toMatch(/^- \[[a-z-]+\] /m);
|
||||
// The old menu is gone.
|
||||
expect(content).not.toContain('Font recommendations by purpose');
|
||||
});
|
||||
|
||||
test('design-html blacklist lines carry catalog ids', () => {
|
||||
const content = fs.readFileSync(path.join(ROOT, 'design-html', 'SKILL.md'), 'utf-8');
|
||||
expect(content).toContain('**Never include (AI slop blacklist):**');
|
||||
expect(content).toContain('Purple/blue gradients as default <!-- ai-color-palette -->');
|
||||
expect(content).toContain('lib/design-catalog.ts');
|
||||
});
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user