Design foundation

From 5throck/ai-workspace-standards · View interactive version

Design foundation is an AI agent skill from the GitHub repository 5throck/ai-workspace-standards. Style-neutral procedure for deriving a project's own design system. Walks a project from domain evidence to design principles, recorded design decisions, and a 3-layer token architecture (Primitive → Semantic ← [data-theme] → Component). Use when: establishing design principles for a new project, cr

How to use this skill

Skill file

🎨 Skill: design-foundation

Purpose

Derive a project-specific design system through a traceable procedure. This skill is the

Procedure layer of the Design Foundation framework:

| Layer | Artifact |

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

| Specification (what to define) | docs/design-foundation.md (shipped inside a generated variant project's docs/; does not exist at workspace root) |

| Scaffold (how tokens are expressed) | docs/design-tokens.template.css |

| Procedure (this skill) | How to derive and apply |

| Project SSOT (what was chosen) | Project docs/design.md + token implementation |

Foundation ≠ Design System. Never copy values from another project (e.g. an existing

design system) unless the project explicitly decides to — and then record that as a decision

with rationale.

Procedure

Stage 1 — Domain Evidence

Read the project's PRD/SRS/context docs and user profiles. Produce an evidence list:

Stage 2 — Design Principles

From the evidence, derive 3–6 numbered principles, each with its rationale

(e.g. "Expert Density — the domain requires dense but legible consoles").

Optionally add operating rules (P1–P6 style) for machine-checkable constraints.

Stage 3 — Design Decision Record

Create docs/design.md containing the design_decisions YAML block

(see docs/design-foundation.md §4). Every selection — philosophy, color system,

typography (body/heading/numeric, each value carrying the fallback stack contract),

spacing, radius, motion, iconography (backed by a registered vocabulary) — MUST carry

a rationale tracing back to a principle. No arbitrary aesthetic choices.

Provenance chain to preserve:

Domain Evidence → Design Principle → Design Decision → Token → Component

Stage 4 — Token Architecture

Copy docs/design-tokens.template.css into the project (e.g. styles/design-tokens.css) and fill

every <value> placeholder according to the decisions. Enforce the architecture:

[data-theme="<name>"] (default theme on :root + at least one alternate, typically dark)

(--icon-size/--icon-stroke/--icon-color) and maintain the project's

machine-readable icon vocabulary registration

Stage 5 — Components

Build UI consuming component tokens only. Multi-encode status signals (color + icon + text);

aria-label on every icon-only control; visible :focus-visible state. Reference

components only from the declared component inventory (components.template.md);

new components enter via the design-phase gate.

Stage 6 — Validation

Run the Design Validation Contract (docs/design-foundation.md §7):

alternate theme; bg/fg/border triplets; typography roles; icon library; icon vocabulary

declared; component inventory declared; WCAG AA declared; focus state; non-color state

encoding

tabular numerals in numeric UI; no hard-coded values in governed components;

icon tokens, where activated, resolve from the registered icon vocabulary

Use token-usage-lint where available for hardcoded-value detection, and accessibility-audit

(axe-core, WCAG 2.1 AA) for accessibility verification.

Report the validation result in the project docs/design.md (or a linked validation section)

before the design foundation is considered complete.

Boundaries

ui-ux-design-intelligence (this skill precedes it).

architecture (3 layers, [data-theme], decision record) and validation contract hold.

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.