devtronic 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +5 -3
  2. package/dist/{chunk-B6Q6YVID.js → chunk-V4QEAL7Y.js} +53 -23
  3. package/dist/index.js +1070 -220
  4. package/dist/{plugin-JTDPHWUF.js → plugin-SGSFVXPA.js} +5 -1
  5. package/package.json +1 -1
  6. package/templates/claude-code/.claude/agents/a11y-auditor.md +82 -0
  7. package/templates/claude-code/.claude/agents/design-critic.md +77 -0
  8. package/templates/claude-code/.claude/agents/design-system-guardian.md +78 -0
  9. package/templates/claude-code/.claude/agents/design-token-extractor.md +53 -0
  10. package/templates/claude-code/.claude/agents/ia-architect.md +81 -0
  11. package/templates/claude-code/.claude/agents/ux-researcher.md +69 -0
  12. package/templates/claude-code/.claude/agents/visual-qa.md +74 -0
  13. package/templates/claude-code/.claude/skills/audit/SKILL.md +1 -1
  14. package/templates/claude-code/.claude/skills/backlog/SKILL.md +1 -1
  15. package/templates/claude-code/.claude/skills/brief/SKILL.md +1 -1
  16. package/templates/claude-code/.claude/skills/briefing/SKILL.md +1 -1
  17. package/templates/claude-code/.claude/skills/checkpoint/SKILL.md +1 -1
  18. package/templates/claude-code/.claude/skills/create-plan/SKILL.md +1 -1
  19. package/templates/claude-code/.claude/skills/create-skill/SKILL.md +1 -1
  20. package/templates/claude-code/.claude/skills/design/SKILL.md +48 -0
  21. package/templates/claude-code/.claude/skills/design-audit/SKILL.md +114 -0
  22. package/templates/claude-code/.claude/skills/design-define/SKILL.md +109 -0
  23. package/templates/claude-code/.claude/skills/design-ia/SKILL.md +103 -0
  24. package/templates/claude-code/.claude/skills/design-research/SKILL.md +116 -0
  25. package/templates/claude-code/.claude/skills/design-review/SKILL.md +99 -0
  26. package/templates/claude-code/.claude/skills/design-spec/SKILL.md +136 -0
  27. package/templates/claude-code/.claude/skills/design-system/SKILL.md +39 -0
  28. package/templates/claude-code/.claude/skills/design-system-audit/SKILL.md +106 -0
  29. package/templates/claude-code/.claude/skills/design-system-define/SKILL.md +141 -0
  30. package/templates/claude-code/.claude/skills/design-system-sync/SKILL.md +105 -0
  31. package/templates/claude-code/.claude/skills/design-wireframe/SKILL.md +120 -0
  32. package/templates/claude-code/.claude/skills/execute-plan/SKILL.md +1 -1
  33. package/templates/claude-code/.claude/skills/generate-tests/SKILL.md +1 -1
  34. package/templates/claude-code/.claude/skills/handoff/SKILL.md +1 -1
  35. package/templates/claude-code/.claude/skills/investigate/SKILL.md +1 -1
  36. package/templates/claude-code/.claude/skills/learn/SKILL.md +1 -1
  37. package/templates/claude-code/.claude/skills/opensrc/SKILL.md +1 -1
  38. package/templates/claude-code/.claude/skills/post-review/SKILL.md +1 -1
  39. package/templates/claude-code/.claude/skills/quick/SKILL.md +1 -1
  40. package/templates/claude-code/.claude/skills/recap/SKILL.md +1 -1
  41. package/templates/claude-code/.claude/skills/research/SKILL.md +1 -1
  42. package/templates/claude-code/.claude/skills/scaffold/SKILL.md +1 -1
  43. package/templates/claude-code/.claude/skills/setup/SKILL.md +1 -1
  44. package/templates/claude-code/.claude/skills/spec/SKILL.md +1 -1
  45. package/templates/claude-code/.claude/skills/summary/SKILL.md +1 -1
  46. package/templates/claude-code/.claude/skills/worktree/SKILL.md +1 -1
@@ -0,0 +1,114 @@
1
+ ---
2
+ name: devtronic:design-audit
3
+ description: UX audit — evaluates designs against Nielsen's 10 heuristics and WCAG 2.1 AA accessibility. Consolidates findings with severity.
4
+ allowed-tools: Task, Read, Glob, Write, Bash
5
+ argument-hint: "[--wireframes|--code|--both]"
6
+ ---
7
+
8
+ # Design:Audit - UX Heuristics & Accessibility
9
+
10
+ Evaluates design artifacts or implementation against UX heuristics and accessibility standards.
11
+
12
+ ## When to Use
13
+ - After wireframing — audit the spec before building
14
+ - Before a release — audit the implementation
15
+ - When onboarding to a codebase with unknown UX quality
16
+ - Proactively during design review cycles
17
+
18
+ ## Modes
19
+
20
+ | Flag | Input | What runs |
21
+ |------|-------|----------|
22
+ | `--wireframes` | `thoughts/design/wireframes.md` | Heuristics only (no code) |
23
+ | `--code` | Source files (src/, app/) | Heuristics + accessibility on code |
24
+ | `--both` | Wireframes + code | Full audit |
25
+ | no flag | auto-detect | Checks what exists |
26
+
27
+ ---
28
+
29
+ ## Process
30
+
31
+ ```
32
+ 1. LOAD CONTEXT
33
+ ├── Detect mode from $ARGUMENTS or auto-detect
34
+ └── Load thoughts/design/wireframes.md and/or source files
35
+
36
+ 2. PARALLEL AUDIT
37
+ ├── Invoke design-critic (heuristic evaluation)
38
+ └── Invoke a11y-auditor (accessibility checks)
39
+
40
+ 3. CONSOLIDATE
41
+ └── Merge findings, deduplicate, sort by severity
42
+
43
+ 4. GENERATE REPORT
44
+ └── Write thoughts/design/audit.md
45
+ └── Print summary
46
+ ```
47
+
48
+ ## Step 2: What each agent checks
49
+
50
+ **design-critic** evaluates:
51
+ - Nielsen's 10 heuristics applied to screen flows and interactions
52
+ - Works on text wireframe specs or UI code descriptions
53
+ - Returns severity: blocker / warning / suggestion per heuristic
54
+
55
+ **a11y-auditor** checks (WCAG 2.1 AA):
56
+ - Color contrast (4.5:1 text, 3:1 large text, 3:1 UI components)
57
+ - Touch targets minimum 44x44px
58
+ - Alt text on images
59
+ - Form labels and associations
60
+ - Keyboard navigation and focus order
61
+ - ARIA roles and landmark regions
62
+ - Reduced motion support
63
+
64
+ ## Output: `thoughts/design/audit.md`
65
+
66
+ ```markdown
67
+ # UX Audit: [Feature/Product]
68
+
69
+ **Date**: YYYY-MM-DD
70
+ **Mode**: wireframes | code | both
71
+ **Status**: N blockers, M warnings, K suggestions
72
+
73
+ ---
74
+
75
+ ## Heuristic Evaluation
76
+
77
+ | # | Heuristic | Status | Finding | Recommendation |
78
+ |---|-----------|--------|---------|----------------|
79
+ | 1 | Visibility of system status | pass | - | - |
80
+ | 4 | Consistency and standards | warn | Navigation labels differ between mobile and desktop | Unify labels |
81
+ | 8 | Aesthetic and minimalist design | blocker | Dashboard shows 14 metrics on first load | Prioritize top 5, collapse rest |
82
+
83
+ ## Accessibility
84
+
85
+ | Check | Status | Finding | Fix |
86
+ |-------|--------|---------|-----|
87
+ | Color contrast | fail | Button text #999 on #FFF = 2.85:1 (need 4.5:1) | Use #767676 minimum |
88
+ | Touch targets | warn | Icon buttons are 32x32px | Increase to 44x44px |
89
+ | Form labels | pass | All inputs have associated labels | - |
90
+
91
+ ---
92
+
93
+ ## Consolidated Findings
94
+
95
+ ### Blockers (must fix before launch)
96
+ 1. [Finding with file:line if from code]
97
+
98
+ ### Warnings (should fix)
99
+ 1. [Finding]
100
+
101
+ ### Suggestions (nice to have)
102
+ 1. [Finding]
103
+
104
+ ---
105
+
106
+ ## Next Steps
107
+ - Fix blockers before proceeding to implementation
108
+ - Warnings can be filed as issues and addressed in parallel
109
+ ```
110
+
111
+ ## Tips
112
+ - Run `--wireframes` early — cheaper to fix in spec than in code
113
+ - Run `--code` before PR — catches what code review misses
114
+ - Blockers from accessibility are non-negotiable for public-facing products
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: devtronic:design-define
3
+ description: Synthesis phase — generates personas, user journey maps, and HMW problem statements from research.
4
+ allowed-tools: Task, Read, Write, AskUserQuestion
5
+ argument-hint: "[topic]"
6
+ ---
7
+
8
+ # Design:Define - Personas, Journeys & Problem Framing
9
+
10
+ ## When to Use
11
+ - After `/design:research` (reads thoughts/design/research.md)
12
+ - When you have enough context to model the user
13
+ - Before jumping to wireframes or IA
14
+
15
+ **Skip for:** B2B internal tools where users are well-known, or when define artifacts already exist.
16
+
17
+ ---
18
+
19
+ ## Process
20
+ ```
21
+ 1. LOAD CONTEXT
22
+ └── Read thoughts/design/research.md (required or ask for input)
23
+ └── Read thoughts/specs/ for functional requirements
24
+
25
+ 2. CLARIFY (if research is thin)
26
+ └── AskUserQuestion: fill gaps in audience / pain points
27
+
28
+ 3. INVOKE ux-researcher
29
+ └── Input: research doc + any additional context
30
+ └── Output: personas, journeys, HMW questions
31
+
32
+ 4. REVIEW & REFINE
33
+ └── Present output to user for validation
34
+ └── Adjust persona names, priorities if needed
35
+
36
+ 5. PERSIST
37
+ └── Write thoughts/design/define.md
38
+ └── Append status to thoughts/design/design.md
39
+ ```
40
+
41
+ ## Step 3: What ux-researcher produces
42
+
43
+ Ask the `ux-researcher` subagent to generate:
44
+
45
+ **Personas (2-3 max)**:
46
+ - Name, role, age range
47
+ - Goals (what they want to achieve)
48
+ - Frustrations (pain points)
49
+ - Context of use (device, environment, frequency)
50
+ - Quote that captures their mindset
51
+
52
+ **User Journey Maps (per primary persona)**:
53
+ - Stages: Discover → Onboard → Use → Return
54
+ - Actions per stage
55
+ - Touchpoints
56
+ - Pain points at each stage
57
+ - Opportunities for improvement
58
+
59
+ **How Might We questions**:
60
+ - 5-8 HMW questions from the pain points
61
+ - Format: "How might we [solve pain point] for [persona] so that [outcome]?"
62
+
63
+ **Problem Statement**:
64
+ - One crisp sentence: "[Persona] needs a way to [action] because [insight]"
65
+
66
+ ## Output: `thoughts/design/define.md`
67
+
68
+ ```markdown
69
+ # Design Define: [Feature/Product]
70
+
71
+ **Date**: YYYY-MM-DD
72
+ **Status**: draft
73
+
74
+ ## Personas
75
+
76
+ ### [Name] — [Role]
77
+ - **Goals**: ...
78
+ - **Frustrations**: ...
79
+ - **Context**: ...
80
+ - **Quote**: "..."
81
+
82
+ ### [Name 2] — [Role]
83
+ ...
84
+
85
+ ## User Journey: [Primary Persona]
86
+
87
+ | Stage | Actions | Touchpoints | Pain Points | Opportunities |
88
+ |-------|---------|-------------|-------------|---------------|
89
+ | Discover | ... | ... | ... | ... |
90
+ | Onboard | ... | ... | ... | ... |
91
+ | Use | ... | ... | ... | ... |
92
+ | Return | ... | ... | ... | ... |
93
+
94
+ ## Problem Statement
95
+ "[Persona] needs a way to [action] because [insight]."
96
+
97
+ ## How Might We...
98
+ 1. HMW [question 1]?
99
+ 2. HMW [question 2]?
100
+ ...
101
+
102
+ ## Next Step
103
+ Run `/design:ia` to define navigation structure and information architecture.
104
+ ```
105
+
106
+ ## Tips
107
+ - 2 personas is usually better than 5 — focus over completeness
108
+ - HMW questions should be optimistic but not solution-prescriptive
109
+ - The Problem Statement is the single most important output — get it right
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: devtronic:design-ia
3
+ description: Information architecture phase — defines navigation structure, sitemap, and user flows from personas and journeys.
4
+ allowed-tools: Task, Read, Write, AskUserQuestion
5
+ argument-hint: "[scope]"
6
+ ---
7
+
8
+ # Design:IA - Information Architecture & Navigation
9
+
10
+ ## When to Use
11
+ - After `/design:define` — reads thoughts/design/define.md
12
+ - Before wireframing — IA is the skeleton that wireframes flesh out
13
+ - When navigation structure is unclear or complex
14
+
15
+ **Skip for:** Single-screen tools or features with no navigation.
16
+
17
+ ---
18
+
19
+ ## Process
20
+ ```
21
+ 1. LOAD CONTEXT
22
+ ├── Read thoughts/design/define.md (personas, journeys)
23
+ ├── Read thoughts/design/research.md (if exists)
24
+ └── Read thoughts/specs/ for functional scope
25
+
26
+ 2. CLARIFY SCOPE
27
+ └── AskUserQuestion: how many screens? any existing navigation to respect?
28
+
29
+ 3. INVOKE ia-architect
30
+ └── Input: personas + journeys + functional requirements
31
+ └── Output: sitemap, navigation model, content hierarchy, user flows
32
+
33
+ 4. PRESENT & VALIDATE
34
+ └── Show sitemap and primary flows to user
35
+ └── Iterate if needed
36
+
37
+ 5. PERSIST
38
+ └── Write thoughts/design/ia.md
39
+ └── Append to thoughts/design/design.md
40
+ ```
41
+
42
+ ## Step 3: What ia-architect produces
43
+
44
+ **Sitemap**: all screens/pages in hierarchical text format
45
+ **Navigation model**: primary nav, secondary nav, entry points
46
+ **Content hierarchy**: per screen — what content/actions appear and in what order
47
+ **User flows**: critical paths from persona journeys as step-by-step flows
48
+ **Dead-end check**: are there screens with no way back? Missing empty states?
49
+
50
+ ## Output: `thoughts/design/ia.md`
51
+
52
+ ```markdown
53
+ # Information Architecture: [Feature/Product]
54
+
55
+ **Date**: YYYY-MM-DD
56
+ **Status**: draft
57
+
58
+ ## Sitemap
59
+
60
+ ```
61
+ Home
62
+ ├── [Section 1]
63
+ │ ├── [Screen 1.1]
64
+ │ └── [Screen 1.2]
65
+ └── [Section 2]
66
+ └── [Screen 2.1]
67
+ ```
68
+
69
+ ## Navigation Model
70
+
71
+ - **Primary nav**: [items]
72
+ - **Secondary nav**: [items or "none"]
73
+ - **Entry points**: [how users arrive at key screens]
74
+ - **Exit points**: [where users go after completing main task]
75
+
76
+ ## Content Hierarchy
77
+
78
+ ### [Screen Name]
79
+ 1. [Most important element]
80
+ 2. [Secondary element]
81
+ 3. [Supporting content]
82
+ 4. [Actions]
83
+
84
+ ## User Flows
85
+
86
+ ### Flow: [Primary Task from Persona Journey]
87
+ ```
88
+ [Step 1] → [Step 2] → [Step 3] → [Success State]
89
+
90
+ [Error State] → [Recovery]
91
+ ```
92
+
93
+ ## IA Issues Found
94
+ - [ ] [Any dead-ends, missing states, or inconsistencies]
95
+
96
+ ## Next Step
97
+ Run `/design:wireframe` to specify layout for each screen.
98
+ ```
99
+
100
+ ## Tips
101
+ - Sitemap depth beyond 3 levels usually indicates a UX problem
102
+ - Every flow needs an error/empty state
103
+ - Navigation should match users' mental model, not the technical structure
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: devtronic:design-research
3
+ description: Discovery phase — synthesizes competitive analysis, target audience, and business context into a research document.
4
+ allowed-tools: Task, Read, Glob, AskUserQuestion, Write, WebFetch
5
+ argument-hint: "[topic]"
6
+ ---
7
+
8
+ # Design:Research - Discovery & Competitive Analysis
9
+
10
+ Runs the discovery phase for a new product or feature. Gathers context, analyzes competitors, and produces a structured research document to inform design decisions.
11
+
12
+ ## When to Use
13
+ - Starting a new product or feature with no prior research
14
+ - After `/spec` to enrich requirements with market context
15
+ - When competitive landscape is unknown
16
+
17
+ **Skip for:** Internal tools with no competition, or when research already exists in `thoughts/design/research.md`.
18
+
19
+ ---
20
+
21
+ ## Process
22
+ ```
23
+ 1. LOAD CONTEXT
24
+ └── Read thoughts/specs/ (if exists) for requirements
25
+ └── Read thoughts/design/design.md (if exists) for prior decisions
26
+
27
+ 2. GATHER INPUT (AskUserQuestion)
28
+ ├── Who is the target user? (demographics, technical level, context of use)
29
+ ├── What problem does this solve? (pain point, current workarounds)
30
+ ├── Competitors or reference products? (URLs or names)
31
+ └── Business constraints? (timeline, budget, platform, team size)
32
+
33
+ 3. COMPETITIVE ANALYSIS
34
+ └── Invoke ux-researcher subagent with competitor list
35
+ └── Analyze: features, UX patterns, strengths, weaknesses, differentiation opportunities
36
+
37
+ 4. SYNTHESIS
38
+ └── Key insights from research
39
+ └── Target audience definition
40
+ └── Differentiation opportunities
41
+ └── Research questions for user interviews (if applicable)
42
+
43
+ 5. PERSIST
44
+ └── Write thoughts/design/research.md
45
+ └── Append status to thoughts/design/design.md
46
+ ```
47
+
48
+ ## Step 2: Gather Input
49
+
50
+ Ask these questions via AskUserQuestion (combine into 2-3 questions max):
51
+ - Target audience and their context
52
+ - Core problem and current workarounds
53
+ - Competitor names or URLs (3-5 max)
54
+ - Any known constraints
55
+
56
+ ## Step 3: Competitive Analysis
57
+
58
+ For each competitor:
59
+ - Core value proposition
60
+ - Key UX patterns (navigation, onboarding, key flows)
61
+ - Strengths from user perspective
62
+ - Weaknesses / gaps
63
+
64
+ Invoke the `ux-researcher` subagent with the gathered data.
65
+
66
+ ## Step 4: Synthesis
67
+
68
+ Produce:
69
+ - **Target Audience**: primary persona sketch (expand in `/design:define`)
70
+ - **Key Insights**: 3-5 bullets from competitive analysis
71
+ - **Differentiation Opportunities**: where the product can win
72
+ - **Open Questions**: what we don't know yet, for user interviews
73
+
74
+ ## Output: `thoughts/design/research.md`
75
+
76
+ ```markdown
77
+ # Design Research: [Feature/Product]
78
+
79
+ **Date**: YYYY-MM-DD
80
+ **Status**: draft
81
+
82
+ ## Target Audience
83
+ [Who, context of use, technical level]
84
+
85
+ ## Problem Statement
86
+ [Core pain point and current workarounds]
87
+
88
+ ## Competitive Analysis
89
+
90
+ ### [Competitor 1]
91
+ - Value prop: ...
92
+ - UX patterns: ...
93
+ - Strengths: ...
94
+ - Weaknesses: ...
95
+
96
+ ### [Competitor 2]
97
+ ...
98
+
99
+ ## Key Insights
100
+ 1. ...
101
+ 2. ...
102
+
103
+ ## Differentiation Opportunities
104
+ - ...
105
+
106
+ ## Open Questions
107
+ - ...
108
+
109
+ ## Next Step
110
+ Run `/design:define` to build personas and user journeys.
111
+ ```
112
+
113
+ ## Tips
114
+ - Keep competitor analysis factual, not opinionated
115
+ - 3 competitors is usually enough — depth over breadth
116
+ - Open Questions become the agenda for user interviews
@@ -0,0 +1,99 @@
1
+ ---
2
+ name: devtronic:design-review
3
+ description: QA visual review — compares implementation against wireframe specs and design system. Surfaces deviations with severity.
4
+ allowed-tools: Task, Read, Glob, Bash, Write
5
+ argument-hint: "[component-name|--all]"
6
+ ---
7
+
8
+ # Design:Review - Implementation vs Design QA
9
+
10
+ Compares what was built against what was designed. Uses `thoughts/design/wireframes.md` and `thoughts/design/design-system.md` as ground truth.
11
+
12
+ ## When to Use
13
+ - After `/execute-plan` completes UI implementation
14
+ - Before PR — catch design deviations before code review
15
+ - In the post-review step of the workflow
16
+
17
+ **This is NOT a code quality review** — use `/post-review` for that. This reviews visual/UX fidelity.
18
+
19
+ ---
20
+
21
+ ## Process
22
+
23
+ ```
24
+ 1. LOAD GROUND TRUTH
25
+ ├── Read thoughts/design/wireframes.md (layout, components, states)
26
+ └── Read thoughts/design/design-system.md (tokens, components)
27
+
28
+ 2. DETERMINE SCOPE
29
+ └── $ARGUMENTS: specific component name or --all
30
+ └── If --all: review all screens from wireframes
31
+
32
+ 3. PER COMPONENT/SCREEN:
33
+ ├── Read implementation file(s)
34
+ ├── Compare: components present? layout correct? tokens used?
35
+ ├── Check: all states implemented? (empty/loading/error/success)
36
+ └── Invoke visual-qa if screenshots are available
37
+
38
+ 4. CONSOLIDATE FINDINGS
39
+ └── Severity: blocker / warning / suggestion
40
+
41
+ 5. OUTPUT
42
+ └── Print findings per component
43
+ └── Overall compliance summary
44
+ ```
45
+
46
+ ## Step 3: What Gets Compared
47
+
48
+ For each screen/component from wireframes.md:
49
+
50
+ | Aspect | Check |
51
+ |--------|-------|
52
+ | **Components present** | All listed components exist in implementation |
53
+ | **Content hierarchy** | Order of elements matches spec priority |
54
+ | **Interactive elements** | All buttons/inputs present with correct labels |
55
+ | **States** | Empty, loading, error, success all handled |
56
+ | **Token usage** | No hardcoded values that should be tokens |
57
+ | **Responsive** | Does it break at mobile widths? |
58
+ | **Copy** | Placeholder copy replaced with real or meaningful copy |
59
+
60
+ ## Step 3b: visual-qa (when screenshots available)
61
+
62
+ If the user provides screenshot paths or URLs:
63
+ - Pass design screenshot vs implementation screenshot to visual-qa
64
+ - visual-qa returns a diff table: element | expected | found | severity
65
+
66
+ ## Severity
67
+
68
+ - **Blocker**: Missing component, broken state, wrong primary action
69
+ - **Warning**: Minor layout deviation, token not used, missing state
70
+ - **Suggestion**: Copy tweak, spacing polish, animation missing
71
+
72
+ ## Output Format
73
+
74
+ ```
75
+ ## Design Review: [Component/Screen]
76
+
77
+ **Spec**: thoughts/design/wireframes.md#[screen]
78
+ **File**: src/components/[File]
79
+ **Status**: N blockers, M warnings
80
+
81
+ ### Blockers
82
+ - [ ] Error state not implemented (spec requires: "Show inline error below field")
83
+
84
+ ### Warnings
85
+ - [ ] Button uses `#3B82F6` instead of `var(--color-primary)`
86
+ - [ ] Card padding is 12px, spec says 16px (space.4)
87
+
88
+ ### Passing
89
+ - ✓ All form fields present
90
+ - ✓ Loading skeleton implemented
91
+ - ✓ Empty state with CTA present
92
+
93
+ ---
94
+ ```
95
+
96
+ ## Tips
97
+ - Run immediately after `/execute-plan` — easier to fix before PR
98
+ - Blockers from design review → add to current PR
99
+ - Warnings → file as follow-up issues, don't block the PR
@@ -0,0 +1,136 @@
1
+ ---
2
+ name: devtronic:design-spec
3
+ description: Generates a developer-ready design specification from design artifacts. Bridges design phase and implementation planning.
4
+ allowed-tools: Task, Read, Write, Glob
5
+ argument-hint: "[screen-name|--all]"
6
+ ---
7
+
8
+ # Design:Spec - Developer Handoff Specification
9
+
10
+ Generates a structured design specification from `thoughts/design/` artifacts, consumable by `/create-plan` and developers.
11
+
12
+ ## When to Use
13
+ - After design phase is complete (wireframes + design system defined)
14
+ - Before `/create-plan` — spec informs component breakdown
15
+ - When handing off design to a developer unfamiliar with the design decisions
16
+
17
+ ---
18
+
19
+ ## Process
20
+
21
+ ```
22
+ 1. LOAD DESIGN ARTIFACTS
23
+ ├── thoughts/design/wireframes.md (screen layouts, components, states)
24
+ ├── thoughts/design/design-system.md (tokens, component specs)
25
+ ├── thoughts/design/define.md (personas, for context)
26
+ └── thoughts/design/ia.md (navigation, for routing)
27
+
28
+ 2. SCOPE
29
+ └── $ARGUMENTS: specific screen name, or --all for full spec
30
+
31
+ 3. GENERATE SPEC
32
+ Per screen:
33
+ ├── Component breakdown (what to build)
34
+ ├── Props and variants for each component
35
+ ├── Token references (which tokens to use, not raw values)
36
+ ├── Interaction specs (hover, click, keyboard behavior)
37
+ ├── State specs (all 4 states with expected behavior)
38
+ └── Edge cases (empty, error, boundary conditions)
39
+
40
+ 4. WRITE
41
+ └── thoughts/design/spec.md (full handoff document)
42
+ ```
43
+
44
+ ## Output: `thoughts/design/spec.md`
45
+
46
+ ```markdown
47
+ # Design Specification: [Feature/Product]
48
+
49
+ **Date**: YYYY-MM-DD
50
+ **Personas**: [from define.md]
51
+ **Status**: ready-for-implementation
52
+
53
+ ---
54
+
55
+ ## Component Inventory
56
+
57
+ | Component | Screen(s) | Variants | Priority |
58
+ |-----------|-----------|----------|----------|
59
+ | Button | All | primary, secondary, ghost, destructive | P0 |
60
+ | Card | Dashboard, List | default, selected, loading | P0 |
61
+ | EmptyState | List, Search | with-cta, without-cta | P1 |
62
+
63
+ ---
64
+
65
+ ## Screen: [Name]
66
+
67
+ **Route**: /[path]
68
+ **Persona**: [primary user]
69
+
70
+ ### Components
71
+
72
+ #### [ComponentName]
73
+
74
+ **Purpose**: [what it does in this screen]
75
+
76
+ **Props**:
77
+ | Prop | Type | Values | Default |
78
+ |------|------|--------|---------|
79
+ | variant | string | 'primary' \| 'secondary' | 'primary' |
80
+ | size | string | 'sm' \| 'md' \| 'lg' | 'md' |
81
+ | disabled | boolean | true \| false | false |
82
+
83
+ **Tokens**:
84
+ - Background: `color.primary`
85
+ - Text: `color.neutral.50`
86
+ - Padding: `space.4` (vertical) × `space.6` (horizontal)
87
+ - Border radius: `radius.md`
88
+
89
+ **Interactions**:
90
+ | Trigger | Action |
91
+ |---------|--------|
92
+ | Hover | Background → `color.primary.hover` |
93
+ | Focus | Outline `color.primary` 2px offset |
94
+ | Click | [what happens] |
95
+ | Keyboard Enter/Space | Same as click |
96
+
97
+ **States**:
98
+ | State | Appearance | Behavior |
99
+ |-------|-----------|----------|
100
+ | Default | [description] | [behavior] |
101
+ | Hover | [description] | [behavior] |
102
+ | Loading | Spinner replaces label | Disabled interactions |
103
+ | Error | [description] | [behavior] |
104
+ | Success | [description] | [behavior] |
105
+ | Disabled | 40% opacity | No interactions |
106
+
107
+ **Edge Cases**:
108
+ - Long text: truncate with ellipsis at 200px
109
+ - [Other edge cases]
110
+
111
+ ---
112
+
113
+ ## Routing & Navigation
114
+
115
+ [From ia.md — summarized for implementation]
116
+
117
+ ---
118
+
119
+ ## Implementation Notes
120
+
121
+ - [Key decisions or constraints developers should know]
122
+ - [Known tradeoffs made in the design]
123
+ - [Anything that deviates from common patterns and why]
124
+
125
+ ---
126
+
127
+ ## Next Step
128
+
129
+ Run `/create-plan` — this spec file can be passed as context to inform the component breakdown.
130
+ ```
131
+
132
+ ## Tips
133
+ - Specs should be implementation-ready — no ambiguity about what to build
134
+ - Token references not raw values — let the token system handle theming
135
+ - Edge cases are the most valuable part — developers often skip them
136
+ - Keep it concise — long specs don't get read