/phase-runner:design-plannerfrom phase-runner
Establishes visual design language and screen contracts between project scope and phase planning. Produces DESIGN.md, screen specs, HTML mockups, and design-system.md for phase-builder.
Ships in phase-runner. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Establishes visual language and screen contracts after a scope/rebuild plan and before phase-planner. Output feeds phase-planner (screen references in sprints) and phase-builder (design-system.md for UI implementation and wave-test asserts).
Pipeline position:
product-planner plan or scope doc (what/why/architecture)
→ design-planner (this skill)
→ phase-planner (sprints)
→ phase-builder (build)
Not this skill: Architecture, API design, sprint breakdown, or implementation. Use scope docs + phase-planner + phase-builder for those. product-planner plans the product, and its wireframes fix layout and flow only. It is not a substitute for this step: a plan with UI Mockups comes here next, and phase-planner stops on one that has no design pass.
For file templates, token schema, and screen-spec format, see reference.md.
The build reads the files. Everything this skill decides lives under docs/design/, and that is all phase-planner and phase-builder ever read. In a session whose Artifact tool lists a Design System type, Step 7 also publishes the design system as a Design System artifact. Where it lists a Design type, Step 6 also publishes the screen mockups as artboards on one Design canvas. A published design can then be changed in two places: on its page, or in the files by asking in chat. Design sync copies each change to the other side without asking, so there is one design, not two: a screen's file on disk is its artboard on the canvas, and design-system.md is the design system's README. It runs at the start of every run of this skill, after every change this skill makes, before phase-planner creates a phase and before phase-builder starts a build. In a session without that tool the skill writes the same files and skips every artifact step. Mechanics are in artifacts.md and design-sync.md.
Run once at the start. Same rules as phase-builder's project-layout.md — read that file if this project also uses phase-builder, otherwise resolve directly:
| Path | Role |
|---|---|
| workspace_root | Folder containing docs/ — design artifacts live here |
| app_root | Folder with the stack manifest and src/ (often a subfolder like {name}-app/) |
Design output paths (all under workspace_root):
| File | Purpose |
|---|---|
docs/design/DESIGN.md | Canonical agent contract — Google design.md spec |
docs/design/design-system.md | Expanded patterns — phase-builder reads this path |
docs/design/screens/*.md | Per-surface screen specs (acceptance criteria for phase-planner) |
docs/design/screens/*.html | Reviewable HTML mockups — one per screen + index.html hub |
docs/design/screens/_theme.css | Shared styles for the mockups — this project's own visual direction, established in Step 4 |
Report layout before writing:
Design pass layout:
workspace_root: {path}
app_root: {path}
scope input: {path to scope doc or "conversation"}
If docs/design/ doesn't exist, create it and docs/design/screens/ under workspace_root. No setup script is needed first.
If docs/design/DESIGN.md records a published artifact, run Design sync (design-sync.md) first, before reading or changing anything else, so a change made on the page is in the files.
If docs/design/ already exists, read all files before editing. Preserve locked decisions unless the user asks to revise.
Read in order:
docs/). Extract product name, audience, UI surfaces mentioned, hard UX rules, stack (web framework, desktop shell, etc.). With no path given, use the newest docs/Plan-*.html from product-planner if there is one, and say which file you picked. Its UI Mockups section lists the screens; take layout and flow from the wireframes, never visual style.CLAUDE.md / README.md / equivalent, for terminology and conventions the project already uses (many products have their own vocabulary for core concepts — use whatever the scope doc or existing docs establish, don't invent new terms).docs/design/*, root DESIGN.md, prior prototypes.app_root's manifest file, existing routes/components if UI already exists. Note what to extend vs. replace.Do not re-interview on facts already in the scope doc. Ask only for gaps that block design decisions.
Produce a table before any visual work. Save it inside docs/design/DESIGN.md under ## Surfaces (extension section — allowed by design.md spec) or as a standalone docs/design/surface-inventory.md when the list is long.
| Surface | Route / shell | Phase | Priority | Notes |
|---|---|---|---|---|
| {e.g. Settings — Profile editor} | /settings/profile | 2 | P0 | {any notable constraint} |
| {e.g. Onboarding overlay} | Modal / full-screen | 1 | P0 | {any notable constraint} |
Scope rule: Spec surfaces for near-term phases only (typically Phase 1–3). Defer Phase 4+ to a later design pass unless the user explicitly asks.
Present the inventory to the user. Confirm missing surfaces or wrong priorities before locking direction.
Commit one aesthetic direction before writing tokens. If a frontend/visual-direction skill is available in this environment, read its design-thinking guidance for the direction workshop and apply its purpose/tone/constraints/differentiation framing to this product, not generic SaaS. If no such skill is available, run the workshop yourself using the same framing: what's the product's purpose, tone, and what should differentiate it visually from competitors.
Each direction is a short card:
Ask the user to pick one, blend two, or describe a reference (site, app, image). Do not lock tokens until they confirm.
When surfaces have different jobs (e.g. a control-panel shell vs. a public-facing web app), either:
colors.panel-* vs colors.public-*), orState the choice in DESIGN.md Overview.
If direction is ambiguous, write one static HTML file to docs/design/prototypes/{name}.html using the chosen direction. Inline CSS only. Present it to the user for review. Prototypes are throwaway — tokens in DESIGN.md are the contract once approved.
Write docs/design/DESIGN.md following the Google design.md spec. See reference.md for the full template.
Requirements:
name, version: alpha, token groups: colors, typography, spacing, rounded, components (minimum: primary button + one input), in the shapes reference.md gives under "The token shapes the linter reads"Design system artifact: {url} line (written by Step 7) or a Design canvas: {url} line (written by Step 6) under its title, every rewrite keeps them as they areAfter writing, run lint when available:
npx -p @google/design.md designmd lint docs/design/DESIGN.md
Use the designmd command as written. The package's other command is named design.md, and on Windows npx @google/design.md lint opens that file in a text editor and hangs instead of running.
If lint reports errors, fix them before proceeding. Read the warnings: fix the ones that point at a real gap, and leave the two reference.md lists as expected. If the CLI is unavailable or doesn't answer within a minute or so, stop waiting and self-check against the reference.md checklist.
Optional: Copy or symlink to {workspace_root}/DESIGN.md when the user wants root-level discovery — note both paths in the handoff.
For each P0/P1 surface, create both:
docs/design/screens/{kebab-name}.md (acceptance criteria for phase-builder)docs/design/screens/{kebab-name}.html (visual review for the user)Use the templates in reference.md. Shared styles live in docs/design/screens/_theme.css (tokens, panels, buttons — reuse from an existing repo if this is a rebuild).
Also write docs/design/screens/index.html — hub linking all mockups.
Each markdown spec must include:
Verification.assert.html mockupEach HTML mockup must:
_theme.css, with screen-specific styles only when neededWhich form a mockup takes. It depends on whether the project has, or is about to get, a Design canvas:
| Session | Form |
|---|---|
| The Artifact tool lists a Design type, or DESIGN.md already records a canvas | The canvas's own form (artifacts.md, Screen file form): the file on disk is the artboard, sent as it is. It carries a copy of _theme.css's rules and has no review bar |
| Anything else | The plain form in reference.md: links _theme.css, with a fixed review bar (screen name, phase, link back to index.html). A later session that can publish converts it once, in place |
Link each spec from DESIGN.md ## Surfaces table (Spec + Preview columns).
Do not duplicate token tables in screen specs — reference DESIGN.md sections instead.
Do this after the mockups and index.html are written, and only if the session's Artifact tool lists a Design type. If it doesn't — no Artifact tool, or no such type — skip this section: Step 6 ends at the files above, as it always has, and nothing later depends on the canvas. If DESIGN.md records a canvas from an earlier session, leave the line alone: the next sync in a session that can publish sends this run's changes.
The canvas shows every mockup as an artboard, laid out in rows, using the project's Design System artifact so its Theme menu shows the project's tokens by name. Each artboard is the mockup's own file, uploaded as it is: nothing is converted on the way up, and a screen edited on the canvas comes back down into the same file (Design sync). The files still open from disk.
Design canvas: {url}.Design system artifact: line and this session can publish one, go on to Step 7 now and come back to this section when its publish is done, before Step 8. If the header already has the line, publish the canvas here.{Product Name} — Screens, and write its URL into DESIGN.md's header (Design canvas: {url}) and into screens/index.html before filling it. A mockup still in the plain form is converted in place first._theme.css changed), add an artboard for a new one, and remove the artboard of a deleted one. If the URL can't be opened or edited, tell the user and ask what to do.If there is no Design System artifact to install (its publish failed, or the session lists no Design System type), publish the canvas without it, tell the user its Theme menu will show plain values for now, and install the system on the first later run that finds it recorded.
A publish that fails doesn't fail the design pass. The mockups on disk are the review fallback: report what happened and carry on.
Write or update docs/design/design-system.md. This is the operational doc phase-builder injects into UI implementation and wave-test.
Structure:
DESIGN.md, optional HTML gallery path:root block)Source-of-truth rule:
| File | Role |
|---|---|
DESIGN.md | Locked tokens + rationale — edit in design pass |
design-system.md | Expanded patterns — grows during early UI sprints; token changes must trace back to DESIGN.md |
| Design System artifact (when published) | The same two files on a page: its README is design-system.md, its tokens are DESIGN.md's. A change on either side is copied to the other by Design sync |
When both files exist and conflict on token values, DESIGN.md wins — update design-system.md to match. When the artifact and the files differ, Design sync settles it: the side that changed since the last sync is copied to the other, and the user is asked only when the same thing changed on both.
Do this after both files are written, and only if the session's Artifact tool lists a Design System type. If it doesn't — no Artifact tool, or no such type — skip this section: Step 7 ends at the two files, as it always has, and nothing later depends on the artifact. If DESIGN.md records a system from an earlier session, leave the line alone: the next sync in a session that can publish sends this run's changes.
# {Product Name} — Design System title, one per published artifact. A published system is recorded there as Design system artifact: {url}.Design system artifact: {url} into DESIGN.md's header before filling it.design-system.md as its README; a cover; and its index, written last. No components.A publish that fails doesn't fail the design pass. The files are complete; report what happened and go on.
Then the canvas. If Step 6 left the Design canvas waiting for this system, publish it now (Step 6, "Publish the Design canvas"), whether or not the system's publish succeeded. If a canvas is already recorded and this step republished the system with changed tokens, revise the canvas so its installed copy of the tokens matches. Then go on to Step 8.
Present saved paths and the review hub:
Design pass complete.
Review mockups (open in browser):
docs/design/screens/index.html
Artifacts:
docs/design/DESIGN.md
docs/design/design-system.md
docs/design/screens/*.md + *.html
Next steps:
1. **Generate phase plans** — hand off to phase-planner:
"Use docs/design/ and {scope doc path}. Generate phase plans.
UI sprints must reference screen spec paths in the Reference column.
Verification assert lines should come from screen spec acceptance bullets."
2. **Iterate** — revise direction, add a screen, or update tokens in DESIGN.md
With a Design canvas. When DESIGN.md's header records a canvas, give its link alongside the hub, as a second line under "Review mockups":
Review mockups (open in browser):
docs/design/screens/index.html
Design canvas: {url}
Tell the user they can change the design on the canvas and the design system page, or by asking in chat, and that either way the files follow: the change is picked up before the next design change, before a phase is planned and before a build starts. With no canvas recorded, the handoff is the block above, unchanged. The phase-planner handoff still names docs/design/ paths, never an artifact link.
If the user asks to proceed immediately, read the phase-planner skill and generate phase plans using design artifacts as constraints.
When invoking phase-planner, require:
docs/design/screens/{file}.mdassert: lines → from screen spec acceptance bulletsskip-ui: true; no design references needed| User says | Action |
|---|---|
| "revise direction" / "new aesthetic" | Re-run Step 4 → rewrite DESIGN.md tokens + design-system.md; flag screen specs that need layout updates |
| "add screen for X" | New screens/*.md; update screen index in design-system.md |
| "update tokens" / "change accent" | Edit DESIGN.md YAML + prose → sync design-system.md CSS block |
| "sync design-system from DESIGN" | Regenerate token/CSS sections from DESIGN.md; preserve component patterns |
| "design pass report" | List surfaces specced vs. deferred; lint status; files changed |
| "sync the design" / "I changed it on the canvas" | Design sync (below) |
Use targeted edits. One write pass per operation when possible.
Sync before and after a change. When DESIGN.md's header records an artifact, every operation in this table starts with Design sync, so it edits files that already hold what was changed on the page. After the operation, send what it changed: DESIGN.md or design-system.md to the Design System artifact (Step 7, later run), a screen file or _theme.css to the canvas (Step 6, later run). In a session that can't publish, finish the operation and say nothing more: the next sync in a session that can publish sends the change.
Copies what changed on a published page into the files, and what changed in the files onto the page, since the last time they matched. The whole procedure is in design-sync.md: what counts as the same on both sides, the sync record that tells which side changed, and what to do with each change.
| Skill / tool | When |
|---|---|
| Scope doc | Input — product/architecture only |
| design-planner | This skill — visual language + screens |
| phase-planner | Sprints — references screen specs |
| phase-builder | Build — reads design-system.md; wave-test asserts against it |
| A frontend-design-style skill, if available | Direction workshop + optional prototypes only — not production UI |
| A ui-pattern skill, if available | Implementation patterns during phase-builder — loses to project design docs |
| product-planner | The step before this one — product plan and wireframes, no visual design. Its plan is a valid scope doc |
| Artifact tool with a Design System type, if the session has one | Step 7 publishes the design system; Design sync keeps its page and the files the same. No skill builds from the artifact |
| Artifact tool with a Design type, if the session has one | Step 6 publishes the mockups as artboards on one canvas; Design sync keeps each artboard and its screen file the same. No skill builds from the canvas |
User confirmed design direction (Step 4)
DESIGN.md has valid YAML + all required body sections (or omitted with reason)
Lint passes or manual checklist complete
Every P0/P1 surface has a screen spec and HTML mockup with link from spec
docs/design/screens/index.html hub links all mockups
design-system.md exists with CSS tokens aligned to DESIGN.md
Scope UX hard rules appear in Do's and Don'ts
No sprint/task breakdown in design artifacts (that's phase-planner's job)
Artifacts saved under workspace_root/docs/design/, not inside app_root unless user explicitly uses single-folder layout
If a Design System artifact was published: its URL is in DESIGN.md's header, every DESIGN.md token is in it with the same value, and it passes the type's own checks — every token has a usage note, and text contrast is at least 4.5:1 in every theme (full list in artifacts.md)
If a Design canvas was published: its URL is in DESIGN.md's header and in screens/index.html, it has exactly one artboard per HTML mockup, each titled with its screen spec's name, the project's design system is installed on it, and each artboard is its screen file under docs/design/screens/, byte for byte (full list in artifacts.md)
If either was published or revised: docs/design/.sync.json records it as it is now
The last three checks apply only when this session published or revised that artifact. With no Artifact tool, or without the type listed, they are skipped, not failed.
docs/design/; Design sync is what puts a page edit thereWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ayejk/phase-runner --plugin phase-runner9 skills in this plugin
/phase-builderOrchestrates automated sprint implementation from phase plans — e.g. 'run phase 1', 'implement sprint 1.3', 'run phase 4 in a worktree'. Optional worktree mode isolates a phase run on its own branch so two phases can run at once. Spawns phase-ui-implement (UI sprints + docs/design/design-system.md), general implementation (data/mixed), phase-verify, phase-wave-test (design asserts), phase-doc-sync. Skill-router per sprint. Clean orchestrator thread. Max 3 retries per gate then escalate. Pauses at blockers and phase boundaries./phase-doc-syncApplies sprint implementation results to docs/phases/ phase plan files. Used by phase-builder as a sub-agent after each implementation wave — updates task Status columns from structured SPRINT RESULT payloads in batched edits. Orchestrator must never edit phase files directly during a phase run; spawn this instead. Also use when the user asks to sync phase docs from sprint results without re-implementing code./phase-plannerCreates and maintains phase plan documents in docs/phases/ files. Use when turning design chat into a structured phase plan, or when adding, removing, editing, moving, or changing task status in sprint plans, viewing sprint or phase progress, or restructuring sprints. Also used by the phase-doc-sync sub-agent when phase-builder applies SPRINT RESULT updates after each implementation wave.Other plugins' skills for the same job