Designer
Works from reviewed intent rather than redrawing decided problems.
Consumes
- semantic design decisions
- component anatomy
- variants
- composition rules
- responsive behavior
- accessibility guidance
Design contract
AI-native design system
AI-Created UI gives coding agents the same component contracts, design tokens, accessibility rules, page patterns, and governance used by human teams. Agents query the system instead of guessing from screenshots, documentation, or model memory.
The interface contract stays consistent regardless of who is building. Designers, engineers, and coding agents read different projections of one reviewed decision set, never three independent interpretations of it.
Works from reviewed intent rather than redrawing decided problems.
Consumes
Design contract
Works from the shipped implementation rather than a redrawn approximation.
Consumes
Runtime contract
Works from queryable contracts rather than screenshots or model memory.
Consumes
Machine contract
22 documented component families, 96 verified public exports, 7 principal guideline chapters, and 6 approved page templates, published as one versioned release.
A worked example, using the settings archetype that ships in templates/agent. Every command below exists in package.json today.
Product intent arrives in prose. Nothing about the design system is decided yet.
Build the account settings screen with profile information, notification preferences, and destructive account actions.
The agent reads canonical context instead of inferring APIs. Every source below ships inside the package and the published release.
npm run agent:query -- context
npm run agent:query -- templates
npm run agent:query -- component toggle
npm run agent:query -- guideline accessibilityThe settings brief matches one reviewed archetype. The template names its slots, its required states, and the primitives it composes.
npm run agent:query -- template settingsComposition happens against public exports and documented props. Local reinvention of a shared primitive is not an implementation detail; it is drift.
Uses
Rejected by validation
The same commands run for an agent, a contributor, and continuous integration. None of them are advisory.
npm run agent:check
npm run typecheck
npm run validateThere is no third outcome where a departure quietly ships. A justified departure is written down, scoped, owned, and given an expiry date.
Contract satisfied
Every blocking check exits zero and the work is publishable.
Design policy violation
The validator prints the rule, file, line, and required correction.
The system should never silently accept design-system drift. An agent either follows the contract, fails a blocking check, or records a narrowly scoped exception for human review.
Both examples below were run through scripts/validate-design-policy.mjs. The diagnostics are the validator's real output, not an illustration of it.
import Button from './ui/Button';
export function AccountActions() {
return (
<div className="rounded-xl bg-slate-800 p-[13px]">
<button
style={{ background: '#6633ff', borderRadius: 11 }}
className="text-white"
>
Save changes
</button>
<Button tone="danger">Delete account</Button>
</div>
);
}npm run policy:check output
no-local-primitiveline 1:1
Import Button from @ai-created/ui; local primitive imports can drift from the canonical implementation.
no-arbitrary-style-valueline 5:21
Replace unapproved radius utility "rounded-xl" with rounded-none, rounded-sm, rounded-md, rounded-lg, or rounded-full.
no-theme-paletteline 5:32
Replace stock palette utility "bg-slate-800" with a semantic utility that resolves through design-system tokens.
no-raw-colorline 7:31
Replace the raw color with a semantic design-system token or utility.
no-theme-paletteline 8:20
Replace stock palette utility "text-white" with a semantic utility that resolves through design-system tokens.
The undocumented tone prop is not a policy rule. It fails separately, and just as loudly, in npm run typecheck.
import { Button, Notice, Surface, Toggle } from '@ai-created/ui';
interface Props {
status: 'ready' | 'saving' | 'error';
productUpdates: boolean;
onChange: (next: boolean) => void;
onSave: () => void;
}
export function NotificationSettings({
status,
productUpdates,
onChange,
onSave,
}: Props) {
return (
<Surface padding="none" className="divide-y divide-border">
{status === 'error' ? (
<Notice variant="error" title="Settings were not saved">
Check your connection and try again.
</Notice>
) : null}
<div className="flex items-center justify-between gap-4 p-5">
<p className="text-sm text-text">Product updates</p>
<Toggle
label="Product updates"
checked={productUpdates}
onChange={onChange}
/>
</div>
<div className="flex justify-end p-5">
<Button
variant="primary"
disabled={status === 'saving'}
onClick={onSave}
>
Save settings
</Button>
</div>
</Surface>
);
}What the contract carries
The human documentation and the machine contract describe the same system from different angles. Both are generated from, or verified against, the same canonical sources.
Versioned projection of the public API, component contracts, guideline chapters, canonical source precedence, and every blocking validation command.
Concise routing context: the required sequence, canonical authority order, appearance contract, and machine resource map.
Expanded context for tasks that need complete component, accessibility, implementation, guideline, template, and validation detail.
DTCG-shaped export generated from styles/tokens.css, with reference, semantic, layout, radius, motion, and mode values.
The repository-level operating contract: canonical source precedence, required context, prohibited drift, and the missing-capability path.
6 approved page archetypes with declared slots, required states, imported primitives, and their own compile check.
The 6 rules that turn implementation drift into a failing command, plus the schema for scoped exceptions.
Consumer setup, query commands, required gates, repository enforcement, exception policy, and adapter guidance.
AI-written implementation enters the same engineering quality system as human-written implementation. Most of these gates are not agent features at all; they are ordinary package validation that agent output must also survive.
These exist whether or not an agent is involved. They are the reason agent output cannot ship on a design-system technicality alone.
npm run typechecknpm run lintnpm run testnpm run build:playgroundnpm run package:checkThese 8 checks are the machine contract itself. Together they run as npm run agent:check.
npm run tokens:checknpm run manifest:checknpm run tailwind:checknpm run api:checknpm run policy:checknpm run templates:checknpm run docs:checknpm run agent-context:checknpm run validate runs typecheck, lint, tests, the full agent contract, the portal build, and the package check in one command. Browser and visual coverage runs through npm run test:browser. Both are required on every pull request.
The boundary is not creativity versus obedience. It is product work, which stays flexible, versus system decisions, which stay governed.
Product work stays flexible. System decisions stay governed.
When a legitimate product requirement falls outside the current system, the correct outcome is not silent local divergence. It is a recorded decision with a name on it and a date attached.
A real, specific need appears in product work.
Composition and every approved template were tried first.
One rule, narrow file globs, a concrete reason, an owner, and a review date.
A person decides. The validator only enforces the shape and the expiry.
The departure stays product-local and expires. An expired entry fails the build with rule exception-expired.
Repeated evidence becomes a contribution through the governance workflow, and the exception is removed.
{
"exceptions": [
{
"rule": "no-raw-color",
"files": ["src/product/legacy-chart-theme.ts"],
"reason": "The charting vendor needs literal hex until the token adapter lands.",
"owner": "Design Systems",
"reviewBy": "2026-12-01"
}
]
}The schema at contracts/design-policy.schema.json requires all five fields, rejects catch-all globs, and limits the rule to one of the 6 policy rules. Read the full policy in the governance guideline.
Point a coding agent at the query interface before it writes a line of UI. The same JSON interface ships inside every installed release.
# Point an agent at the contract
npm run agent:query -- context
# Select an approved page archetype
npm run agent:query -- templates
npm run agent:query -- template settings
# Read one component contract before using it
npm run agent:query -- component button
# Run the blocking anti-drift contract
npm run agent:check# The same interface ships with the installed release
npx ai-created-ui-agent context
npx ai-created-ui-agent templates
npx ai-created-ui-agent template settings
# Report when the consumer falls behind a reviewed release
npx ai-created-ui-agent consumer-statusHumans and agents should build against the same decisions, APIs, and constraints. AI-Created UI turns those decisions into a versioned contract that can be read, implemented, and validated by both.