Build UI Prototype
Trigger
Use when the user asks for a prototype, mock, demo, clickable flow, app shell, a
component built from a screenshot, or a redesign of existing UI.
When To Use
- Product value or a user journey needs to be seen before it is built.
- Requirements, UX flows or a screen inventory exist and need a visual check.
- An existing component needs redesigning.
When Not To Use
- Production implementation. Use
implement-feature-safely.
- Defining reusable standards. Use
create-design-system.
- Backend or data work.
Step 0: State The Design Read
Before any code, say in one line what you are building and for whom:
Reading this as: <page kind> for <audience>, in a <style> language, using
<design system or preset>.
If the design read genuinely diverges, ask one question. If it can be inferred,
do not ask.
Step 1: Resolve The Mode
| Flag |
Behaviour |
--image-to-component |
Rebuild an attached image as a component. Describe the structure you see (layout, grid, type scale, spacing rhythm, states) before writing any markup, and name what you cannot determine from the image rather than inventing it. |
--component-redesign |
Audit first: read the existing component, list what it does, what it gets right, and what is actually wrong. Preserve behaviour, props and accessibility. Change appearance only. |
--web-page-design |
A full page composition: hero, sections, footer, real copy. |
--clickable-prototype |
Multi-screen navigable flow with local state. No real persistence. |
--scaffold-app |
App shell: routing, layout, navigation, empty states. Not features. |
No flag: infer the mode, state it, proceed.
Step 2: Resolve The Design Language
Never invent a visual language when one exists.
Look for a design system in this order:
.project/.engineering/initiatives/<id>/design-system/design-tokens.md
- repo token files:
tokens.ts, theme.json, tailwind.config.*, src/design-system/
- existing components under
src/components/ui/, resources/views/components/
context/stack.json for the framework and styling approach
If one exists, use it. Do not introduce a second visual language into a
codebase that already has one. Say which system you found.
If none exists, offer create-design-system first when the work is durable.
If the user declines, or this is throwaway, ask one style question and apply
a preset from references/design-styles/:
--brutalist --minimalist --glassmorphism --neumorphism
--material-design --flat-design --editorial --futuristic
Each preset has style.md (the rules and its specific failure modes) and
starter.html (a self-contained, token-driven page). Read style.md before
using the starter. Copy the :root token block into the project rather than
linking to the reference folder.
Step 3: Read The Anti-Slop Register
Read references/anti-slop-register.md before generating.
It is not a ban list. Every entry names the pattern, why it reads as
machine-made, when it is legitimate, and what to do instead. Check the override
condition before rejecting a pattern: if the brief genuinely calls for it, use it
deliberately and say why.
The register's sections 7 to 10 cover the specific failure modes of the eight
presets. If you picked a preset, read its section.
Step 4: Scope
Build the smallest prototype that demonstrates the value. One complete journey
beats five partial screens. Write the scope statement before the code:
- Mode and style, and why.
- The user journey in one sentence.
- Screens included; screens excluded and why.
- What is mocked versus real.
- Known limitations and what productionising would need.
Step 5: Build
- Match existing repo conventions: framework, styling, file layout, naming.
- Keep mock data in a clearly named fixture location, visibly separate from real
data paths. Never present a mock integration as a real connection.
- Cover the states that make a demo credible: empty, loading, error, populated,
and the permission variants that matter.
- Accessibility is not deferred to production: semantic elements, labelled
controls, visible focus, 4.5:1 body contrast, 44px targets, keyboard reachable.
- Do not add dependencies unless the repo already uses them or the prototype
genuinely cannot work without them.
Step 6: Check
python "${CLAUDE_PLUGIN_ROOT}/scripts/anti-slop-check.py" <files you wrote>
Findings are advisory. For each one, either fix it or state which override
condition applies. Then walk the register's pre-flight list.
Run the project's own checks (lint, typecheck, build) from context/stack.json.
python "${CLAUDE_PLUGIN_ROOT}/scripts/validate-artifact.py" <artifact paths>
Outputs
Under .project/.engineering/initiatives/<initiative-id>/prototype/:
prototype-plan.md — scope statement, mode, style, journey, inclusions
prototype-implementation-log.md — what was built and where
prototype-qa-checklist.md — states and accessibility checks covered
prototype-limitations.md — what is mocked, what productionising needs
Plus the prototype source, in the repo's own conventional location.
Safety Constraints
- Never present mocked behaviour as real.
- Never write real credentials, keys or production endpoints into a prototype.
- Do not modify production code paths, migrations or data.
- Do not introduce a second design language into a codebase that has one.
- State every assumption made about content, brand or data that was not given.
Related Agents
frontend-engineer
ux-flow-designer
qa-test-strategist
1---2name: build-ui-prototype3description: Use when the user asks to build a UI prototype, clickable MVP, app shell, dashboard mock, product demo, or frontend proof-of-concept; to recreate a design from an image; to redesign an existing component; or to scaffold an app from requirements, UX flows, or an implementation plan.4---56# Build UI Prototype78## Trigger910Use when the user asks for a prototype, mock, demo, clickable flow, app shell, a11component built from a screenshot, or a redesign of existing UI.1213## When To Use1415- Product value or a user journey needs to be seen before it is built.16- Requirements, UX flows or a screen inventory exist and need a visual check.17- An existing component needs redesigning.1819## When Not To Use2021- Production implementation. Use `implement-feature-safely`.22- Defining reusable standards. Use `create-design-system`.23- Backend or data work.2425## Step 0: State The Design Read2627Before any code, say in one line what you are building and for whom:2829> *Reading this as: `<page kind>` for `<audience>`, in a `<style>` language, using30> `<design system or preset>`.*3132If the design read genuinely diverges, ask **one** question. If it can be inferred,33do not ask.3435## Step 1: Resolve The Mode3637| Flag | Behaviour |38| --- | --- |39| `--image-to-component` | Rebuild an attached image as a component. Describe the structure you see (layout, grid, type scale, spacing rhythm, states) before writing any markup, and name what you cannot determine from the image rather than inventing it. |40| `--component-redesign` | Audit first: read the existing component, list what it does, what it gets right, and what is actually wrong. Preserve behaviour, props and accessibility. Change appearance only. |41| `--web-page-design` | A full page composition: hero, sections, footer, real copy. |42| `--clickable-prototype` | Multi-screen navigable flow with local state. No real persistence. |43| `--scaffold-app` | App shell: routing, layout, navigation, empty states. Not features. |4445No flag: infer the mode, state it, proceed.4647## Step 2: Resolve The Design Language4849Never invent a visual language when one exists.50511. **Look for a design system** in this order:52 - `.project/.engineering/initiatives/<id>/design-system/design-tokens.md`53 - repo token files: `tokens.ts`, `theme.json`, `tailwind.config.*`, `src/design-system/`54 - existing components under `src/components/ui/`, `resources/views/components/`55 - `context/stack.json` for the framework and styling approach562. **If one exists, use it.** Do not introduce a second visual language into a57 codebase that already has one. Say which system you found.583. **If none exists**, offer `create-design-system` first when the work is durable.594. **If the user declines, or this is throwaway**, ask one style question and apply60 a preset from `references/design-styles/`:6162 `--brutalist` `--minimalist` `--glassmorphism` `--neumorphism`63 `--material-design` `--flat-design` `--editorial` `--futuristic`6465 Each preset has `style.md` (the rules and its specific failure modes) and66 `starter.html` (a self-contained, token-driven page). Read `style.md` before67 using the starter. Copy the `:root` token block into the project rather than68 linking to the reference folder.6970## Step 3: Read The Anti-Slop Register7172Read `references/anti-slop-register.md` before generating.7374It is **not a ban list**. Every entry names the pattern, why it reads as75machine-made, **when it is legitimate**, and what to do instead. Check the override76condition before rejecting a pattern: if the brief genuinely calls for it, use it77deliberately and say why.7879The register's sections 7 to 10 cover the specific failure modes of the eight80presets. If you picked a preset, read its section.8182## Step 4: Scope8384Build the smallest prototype that demonstrates the value. One complete journey85beats five partial screens. Write the scope statement before the code:8687- Mode and style, and why.88- The user journey in one sentence.89- Screens included; screens excluded and why.90- What is mocked versus real.91- Known limitations and what productionising would need.9293## Step 5: Build9495- Match existing repo conventions: framework, styling, file layout, naming.96- Keep mock data in a clearly named fixture location, visibly separate from real97 data paths. Never present a mock integration as a real connection.98- Cover the states that make a demo credible: empty, loading, error, populated,99 and the permission variants that matter.100- Accessibility is not deferred to production: semantic elements, labelled101 controls, visible focus, 4.5:1 body contrast, 44px targets, keyboard reachable.102- Do not add dependencies unless the repo already uses them or the prototype103 genuinely cannot work without them.104105## Step 6: Check106107```bash108python "${CLAUDE_PLUGIN_ROOT}/scripts/anti-slop-check.py" <files you wrote>109```110111Findings are advisory. For each one, either fix it or state which override112condition applies. Then walk the register's pre-flight list.113114Run the project's own checks (lint, typecheck, build) from `context/stack.json`.115116```bash117python "${CLAUDE_PLUGIN_ROOT}/scripts/validate-artifact.py" <artifact paths>118```119120## Outputs121122Under `.project/.engineering/initiatives/<initiative-id>/prototype/`:123124- `prototype-plan.md` — scope statement, mode, style, journey, inclusions125- `prototype-implementation-log.md` — what was built and where126- `prototype-qa-checklist.md` — states and accessibility checks covered127- `prototype-limitations.md` — what is mocked, what productionising needs128129Plus the prototype source, in the repo's own conventional location.130131## Safety Constraints132133- Never present mocked behaviour as real.134- Never write real credentials, keys or production endpoints into a prototype.135- Do not modify production code paths, migrations or data.136- Do not introduce a second design language into a codebase that has one.137- State every assumption made about content, brand or data that was not given.138139## Related Agents140141- `frontend-engineer`142- `ux-flow-designer`143- `qa-test-strategist`