Design intelligence

From event4u-app/agent-config · View interactive version

Design intelligence is an AI agent skill from the GitHub repository event4u-app/agent-config. Grounded design brief from the corpus — style, WCAG color tokens, typography, layout, anti-patterns. Use on ui-design-brief or any which-style/palette/font/chart call; feeds fe-design.

How to use this skill

Skill file

design-intelligence

The grounded source for frontend design decisions (ADR-061; first

consumer of CODE0). When the

UI directive set's design step emits @agent-directive: ui-design-brief,

consult this corpus FIRST and pre-fill the brief candidates — then the

human confirms (design_confirmed). Corpus output is a **constraint

set**, never final microcopy; the placeholder lock in

directives/ui/design.ts is unaffected.

Boundary (council-locked): design.ts stays a pure orchestration

gate and never imports the engine — the corpus call lives HERE, in the

skill layer, keeping the engine an optional dependency.

Corpus: 11 tabular CSVs under CODE0 (161-row ui-reasoning

decision map, WCAG-adjusted color token sets, 84 styles, 73 font

pairings, 25 chart rules, UX/react/mobile guidelines) + 16 prose

design-language specs (CODE0)

(CODE0).

Provenance + licenses: CODE0; manifest:

CODE0.

When to use

design step found state.ui_design empty).

layout pattern / chart type / icon system fits this product.

Section index — load on demand

Load the reference file whose sections the task needs — never all of them by default:

Honesty / real-system grounding

When the brief maps to an official design system (Material Design, Fluent,

Carbon, Polaris, GOV.UK, shadcn, Tailwind UI, Radix, etc.):

  1. Canon grounding first. If the brief names a system OR

components.json/deps signal one (@mui/material, antd, @fluentui/*,

@carbon/*, @atlaskit/*), pull

CODE0,

surface the matching one-line summary, and offer to fetch the live spec

before committing to the system's conventions — rather than improvising.

The canon index is thin + lazy: do not load it for a generic, unnamed brief.

  1. Install the real package — do not hand-recreate its CSS or components.

Surface the install command for the project's package manager (the

system's official package, e.g. the shadcn CLI or the @mui/material

distribution) and link the canonical documentation URL.

  1. Never label an approximation as the official system. If generating

approximate CSS for a system the project does not yet depend on, label it

explicitly: *"Approximation of Material Design elevation — not the official

@mui/material package; install the package for production use."*

  1. If no official system is relevant: pick a deliberate creative direction

(see Design Read above); never fall back to an unnamed generic aesthetic

(per source-discovery-gate: real source before guessing).

Grounding precedence (consistent with brand-source-of-truth): consumer

brand tokens > confirmed session decisions > named canon

(CODE0) > generated

corpus. Canon is a gap-filler, never an override of a registered brand value.

Procedure: Produce a grounded design brief (`ui-design-brief` rebound)

  1. Ground (one call — engine runs the manifest's plan

product → style → color → landing → typography with decision rules):

```bash

node <skills-root>/corpus-grounding/scripts/ground.mjs ground \

--manifest <skills-root>/design-intelligence/data/manifest.json \

"<product type + mood + platform>" --json

```

  1. Translate selections into the brief for state.ui_design:

over corpus suggestions — never propose a new component the audit

already has);

styled per the selected design language;

supplies microcopy;

checklist's CRITICAL rows + accessibility-auditor method;

verbatim, with alternatives listed.

  1. Always surface the grounded output's confidence + evidence_gap

lines in the brief summary — the user signs off on what the corpus

could NOT support, not only on what it could.

  1. On design_confirmed: true the directive engine advances; revisions

loop back here.

Font delivery columns — which one is the answer

font-pairings-reference.csv carries three delivery-adjacent columns and they

are not interchangeable. This is the arbitration between them, so the file

and its sibling data/stacks/nextjs.csv (row 22: a font-CDN <link> sits in

that row's Don't column) no longer read as opposite instructions:

| Column | What it answers | Status |

|---|---|---|

| Google Fonts URL | where do I find / verify this font? | discovery + availability check |

| Self-Hosted Route | how does it get onto the page? | the default answer — @fontsource/* package ids derived from the row's own Google-Fonts families; two rows name a foundry file instead (Fontshare pairs with a Google alternative) |

| CSS Import | the third-party CDN @import | opt-in only — emitting it transmits the visitor's IP to the third party; policy owner is CODE2 § Asset & imagery discipline (CODE3) |

Per-stack route resolution (Next / bundler / asset-pipeline / plain) lives in

CODE0 § Delivery — one table, not

two.

Font fallback (no google-fonts index — by design)

The 745 KB Google-Fonts index was rejected (ADR-061 §8): it duplicates a

public API. When a requested font is outside font-pairings-reference.csv's 73

pairings: query https://fonts.google.com/specimen/<Family> (or the

webfonts API) for metadata, OR propose the nearest curated pairing and

say why. Never invent pairing metadata.

Output format

  1. Grounded brief candidates per state.ui_design slot (layout,

components, states, microcopy placeholder-free, a11y) — selections

cited per corpus row.

  1. The grounded output's confidence label + every evidence_gap line,

verbatim, in the brief summary.

  1. Alternatives list per domain so the human can swap before

design_confirmed.

Do NOT

final strings are agent-written (placeholder lock stays in force).

boundary; the corpus call lives in this skill layer.

already covers — audit findings outrank corpus suggestions.

Gotchas

reference (open references/ instead) or as a validator (rules own that).

mobile") — the detect map routes generic words to style.

Anti-slop discipline

Before finalizing any design brief, cross-check against

CODE0

— especially the Color (C1–C5), Typography (T7–T8), and Layout (L1–L2) sections.

If the grounded corpus selection lands on a pattern in the catalog, either invoke

the override condition or adjust the selection.

For typography this is a field, not a memory test: a

font-pairings-reference.csv row whose heading or body font is a T7 overused-AI

default carries it in its AI-Default Flag column (T7:<font>; 15 of 73 rows) —

read the field. An empty flag means the row carries no T7 font, so a pairing is

never "flagged by association" (Poppins + Open Sans, the example most often

cited as flagged, carries none). T8 (single typeface for everything) needs no

column: it is Heading Font == Body Font on the row. A flag is a visible

conflict to resolve, never a ban — the catalog's override condition still

applies. Run the AI-slop originality

self-test (catalog § "The AI-slop originality self-test") on the chosen aesthetic

direction before emitting design_confirmed.

Why this skill is rich

This skill carries 11 tabular CSVs (161-row UI-reasoning decision map,

WCAG-adjusted color token sets, 84 styles, 73 font pairings, 25 chart rules, UX/

react/mobile guidelines) plus 16 prose design-language specs and a 10-category

pre-delivery checklist. Agents need to see the full corpus to make grounded

selections — condensing to a summary destroys the evidence trail ("corpus

row 47 justifies the palette choice") that the skill's output contract requires.

Compressing the 16 design-language specs into fragments makes the style

selection unreproducible and audit-unfriendly.

Policies

every refresh (ADR-061 §6).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.