| name | kta-design-spec |
| description | Per-screen design spec generator for AI design tools (Stitch / Figma AI / Claude artifacts). Consumes per-feature PRDs from kta-prd-pipeline. Emits tool-agnostic markdown specs. Triggers โ design spec, AI design prompt, screen mockup brief, Figma AI input, Stitch prompt, design system tokens, post-PRD design phase, generate design specs, design brief, mockup spec. DOES NOT generate Compose code, Kotlin code, or @Preview stubs. |
Platform Tooling
- Use AskUserQuestion for blocking user choices or confirmations.
- Use WebFetch/WebSearch for current external docs or public web research.
- Use Task tool with subagent_type for delegation.
- Use Skill tool when chaining to another installed skill.
Design Spec Pipeline (Per-Screen)
Three phases โ style-foundation (once) โ per-screen spec (loop) โ bundle into single upload file.
Consumes plans/{slug}/prd/*.md, emits plans/{slug}/design/ with per-screen specs plus one
consolidated design-bundle.md ready to upload to any Design AI Tool.
When to Use
- After running
kta-prd-pipeline โ per-feature PRDs with screen lists exist
- "Generate design specs for my AI design tool"
- "Write Stitch / Figma AI / Claude design prompts for these screens"
- "I need design briefs to feed into a text-to-UI tool"
- Re-running per-screen to refresh after PRD changes
CRITICAL CONSTRAINTS
- SKILL EMITS DESIGN SPECS ONLY โ NEVER GENERATE COMPOSE CODE, KOTLIN, OR @PREVIEW STUBS
- COMPONENT-STATES LIST IS MANDATORY โ SKILL REFUSES INCOMPLETE SPEC
- REAL COPY ONLY โ NO LOREM IPSUM
These rules are absolute. Every reference file reinforces them. If the LLM is tempted to produce
Kotlin / @Composable / @Preview, STOP and re-read this section.
How the pipeline works
The pipeline pre-fills sensible defaults (component-state defaults, copy options) and walks the
student through each screen step by step. There are no modes, no levels, no toggles โ pre-fill, the
student picks from options, move forward.
Pre-flight Validation (GATE โ runs FIRST, before Phase 1)
Before any phase runs, validate the input. If validation fails, STOP and return โ do NOT proceed
to Phase 1.
Run these checks in order, in plans/{slug}/:
- PRD directory exists โ
plans/{slug}/prd/ is a directory.
- At least one feature PRD file โ at least one
prd/{NN}-{feature-slug}.md exists (NN =
2-digit prefix).
prd/INDEX.md exists โ produced by kta-prd-pipeline Phase 3.
- Every feature PRD has a
## Screens section with โฅ1 screen named in PascalCase.
- No empty PRD files โ each feature PRD is >200 chars (sanity check, not a TBD-only stub).
If any check fails, STOP and emit (no further phases run):
[kta-design-spec] Cannot proceed โ input not qualified.
Failed checks:
- {check that failed} โ {what was found vs expected}
- ...
Required input shape:
plans/{slug}/prd/
INDEX.md
01-{feature}.md (with `## Screens` section, screens in PascalCase)
02-{feature}.md
...
Fix path:
โ Run `kta-prd-pipeline` first to generate the PRD set.
โ Or check the slug โ passed dir must point to a plans/{slug}/ root.
This skill emits no design specs until input is qualified.
Then return. Do NOT prompt the user to "fix and continue inline" โ the upstream skill (
kta-prd-pipeline) is the right place to repair PRD shape. The student can re-invoke
kta-design-spec after.
Workflow
- Phase 1 โ Style Foundation (once per app) โ read
references/phase-1-style-foundation.md.
Capture mood/voice, color tokens (or "use Material 3 default"), typography,
spacing/radii/elevation, references (3 inspirations + 1 anti), motion intent, a11y floor. Save
plans/{slug}/design/style-foundation.md. Phase 2 GATES on this file existing.
- Phase 2 โ Per-Screen Spec โ read
references/phase-2-screen-spec.md. Loop screens across all
PRDs. Emit one spec per screen at plans/{slug}/design/{NN-feature-slug}/{NN-screen-slug}.md.
Component-states list MANDATORY. Validate before emit.
- Phase 3 โ Bundle (MANDATORY) โ after all per-screen specs are written, run
scripts/bundle_design_specs.py to concatenate style-foundation.md + INDEX.md + every
per-screen spec into a single plans/{slug}/design/design-bundle.md. This single file is the
canonical output the student uploads to Stitch / Claude / Figma AI. See "Bundle Step" section
below.
There is no per-tool reformatting phase. Modern Design AI tools accept generic markdown; the
bundle is tool-agnostic by design. If a specific tool ever chokes on bundle size, paste a single
feature folder's screens instead โ the per-screen files are still on disk for that.
Bundle Step (Phase 3)
Run after Phase 2 completes โ non-optional unless the student explicitly opts out.
Command (use the project venv Python; fallback to python3 if venv missing):
python3 .claude/skills/kta-design-spec/scripts/bundle_design_specs.py plans/{slug}/design/
The script produces plans/{slug}/design/design-bundle.md containing, in order:
- Bundle header (title + generation timestamp + upload instructions)
style-foundation.md (full content)
INDEX.md (full content if present)
- Each feature directory in NN order, each per-screen spec inside in NN order, with separator
comments between sections
After the script runs, surface the absolute output path back to the student in one line, then
call AskUserQuestion:
header: "Next Step"
question: "Bundle written to {abs path}. What next?"
multiSelect: false
options:
- label: "Open in tool", description: "Print upload instructions for Stitch/Claude/Figma AI"
- label: "Exit", description: "Stop here โ I'll upload the bundle myself"
If the script fails (missing style-foundation.md or no feature dirs), surface stderr and DO NOT
proceed to the handoff prompt. Re-run Phase 2 first.
Inputs
plans/{slug}/prd/*.md (required) โ feature PRDs with screens
plans/{slug}/idea-brief.md (recommended) โ for value-prop context
Outputs
plans/{slug}/design/style-foundation.md โ once per app
plans/{slug}/design/INDEX.md โ feature โ screens โ spec file map
plans/{slug}/design/{NN-feature-slug}/{NN-screen-slug}.md โ one per screen
plans/{slug}/design/design-bundle.md โ single concatenated file ready to upload to Stitch /
Claude / Figma AI (produced by scripts/bundle_design_specs.py in Phase 3)
Integration
- Previous stage โ
kta-prd-pipeline (provides per-feature PRDs)
- Next stage โ paste spec into AI design tool (Stitch / Figma AI / Claude artifacts) to generate
mockups. NOT into a code generator.
Constraints
- Pre-flight gate โ input MUST pass all pre-flight checks (PRD dir, โฅ1 feature PRD, INDEX.md,
screens section in each PRD, non-stub files). If not qualified, skill returns immediately with a
fix path; no design specs emitted.
- Design spec only โ no Compose / Kotlin /
@Preview / DSL snippets. Reinforced in every
reference file.
- Component-states list mandatory โ every component must list 6 states (default / pressed /
disabled / loading / empty / error). Skill refuses incomplete spec.
- Real copy โ every visible string spelled out; no lorem ipsum, no placeholders like
{title}.
- Style-foundation gate โ Phase 2 refuses to run if
style-foundation.md missing.
- Tool-agnostic โ Phase 2 output is pure markdown. Phase 3 bundle is the canonical upload
artifact for any AI design tool. No per-tool reformatting phase.
- No project-stack-specific tokens leaking in โ generic Material 3 defaults are fine; "
DRE-KT" / "Compose" mentions forbidden.
- Skill emits markdown only.
- Default working directory โ
plans/{slug}/.