SpecUI

Schema

Required files and folders in .specui/ — the reference both humans and validate use.

A SpecUI contract is just a directory — usually .specui/ inside an app, or the repo root in the flat layout. specui validate enforces the schema described here.


Required files

FilePurpose
COPYRIGHTProprietary / attribution notice — do not remove
LICENSE-SPECUI.mdHuman-readable SpecUI terms
SPEC.mdIndex + YAML front matter (scope, readOrder, registry pointer)
00-principles.md11-platform-notes.mdNumbered normative design narrative
AGENT-DESIGN-RULES.mdAgent sync protocol (7-step)
AGENTS-GUIDE.mdCLI + tooling for agents; pairs with root AGENTS.md
DOS-DONTs.mdShort do / don't rules for AI UI
TOKENS.yamlSemantic tokens (themed colors, type, space, motion, …)
manifests/registry.jsonGenerated index — run specui sync

Also expected in a healthy project:

FilePurpose
DECISIONS-LOG.mdDated design decisions (ADR-style)

Front matter (SPEC.md)

The key fields:

schema: specui
schemaVersion: 0.2.0
product:
  name: "My Product"
themes: ["light", "dark"]
platformsInScope: ["web"]
componentsRequired: [button, card, ]
patternsRequired: [empty-state, ]
readOrder:
  - SPEC.md
  - 00-principles.md
  # … through 11-platform-notes.md
  - DOS-DONTs.md
  - AGENT-DESIGN-RULES.md
  - AGENTS-GUIDE.md
registryIndex: manifests/registry.json

validate checks that readOrder matches the canonical list.


Components

.specui/components/<kebab-name>/
  MANIFEST.yaml    # id, status, links, syncTargets
  SPEC.md          # behavior, anatomy, platform notes
  VARIANTS.md      # variant matrix
  STATES.md        # state coverage
  vendor/          # optional — from specui get

A component is not valid in code until this folder exists — see Concepts.


Assets

.specui/assets/<type>/<kebab-name>/
  MANIFEST.yaml

Types: icon, illustration, photo, logo.


Patterns

.specui/patterns/<kebab-name>.md

Multi-step UX flows (confirmation, empty state, validation, …).


Rules and skills (optional)

PathCreated by
rules/<name>.mdspecui rules add
skills/<name>/SKILL.mdspecui skills add

Location may be at the SpecUI root (flat) or project-relative, depending on layout.


Consumer vs flat

LayoutContract root
Consumer<app>/.specui/
Flat<ds-repo>/ ( SPEC.md at root )

.specui-sources.yml lives at the project root (apps only), not inside .specui/.


Project root (not inside .specui/)

FilePurpose
AGENTS.mdSpecUI block — specui init --agents-md
.specui-sources.ymlInstalled / linked sources

Generated vs hand-edited

Worth internalizing which files are yours and which belong to the tool:

Hand-editGenerate
Markdown, YAML, manifestsmanifests/registry.json via specui sync
TOKENS.yamlExport formats via specui export

Deeper reference

Normative standard: Specification.
Repo maintainer schema doc: docs/schema.md.


Next steps

Edit this page on GitHub
On this page

On this page