feat(design): catalog never-lines in the mockup prompt

Ten catalog ids carry `mockupNever` (kicker-above-heading, icon-tile-stack,
gradient-text, ai-color-palette, cream-palette, nested-cards, dark-glow,
pulsing-dot, identical-cards, hero-metrics) and lib/design-catalog.ts exports
their deduped plain-English names as MOCKUP_NEVER_NAMES. briefToPrompt() in
the design binary appends "Never: <names>." before its fixed tail, so `$D
generate | variants | evolve` stop reaching for purple gradients, icon tiles,
and cream defaults before the comparison board opens. The binary still
bundles (`bun build --compile design/src/cli.ts`); ./setup rebuilds it.

design-html's Never-include list now covers every mockupNever id (kicker /
icon tile, hero metric rows, gradient text, cream palette, nested and
identical cards, glow and pulsing dots), each line tagged with its catalog
ids; test/design-catalog.test.ts pins the exact ten flags, the deduped names,
and that the template list is a superset. New design/test/brief.test.ts pins
the prompt shape.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-09-08 16:15:57 +00:00
co-authored by Claude Fable 5.1
parent 3522073ef0
commit d3c3ea27b9
6 changed files with 125 additions and 13 deletions
+5
View File
@@ -1,6 +1,7 @@
/**
* Structured design brief — the interface between skill prose and image generation.
*/
import { MOCKUP_NEVER_NAMES } from "../../lib/design-catalog";
export interface DesignBrief {
goal: string; // "Dashboard for coding assessment tool"
@@ -31,6 +32,10 @@ export function briefToPrompt(brief: DesignBrief): string {
lines.push(`Design reference: ${brief.reference}`);
}
// Generation-time slop guard: the catalog's mockupNever names, so the model
// never reaches for purple gradients, icon tiles, or cream defaults on its own.
lines.push(`Never: ${MOCKUP_NEVER_NAMES.join(", ")}.`);
lines.push(
"The mockup should look like a real production UI, not a wireframe or concept art.",
"All text must be readable. Layout must be clean and intentional.",