name: team-design-spec
description: "[Team] Create UI/UX design specifications from requirements or Figma designs. Covers component specs (Atom/Molecule/Organism), accessibility audits (WCAG 2.1 AA), design tokens, responsive behavior, and dev handoffs. Triggers on "design spec", "ui spec", "component spec", "accessibility audit", "design handoff", "design tokens", "wireframe", "mockup"."
argument-hint: ""
infer: true
allowed-tools: Read, Write, Edit, Grep, Glob, WebSearch, ai-multimodal, mcp__figma__*
Design Specification
Create comprehensive UI/UX specifications for implementation.
When to Use
- PBI needs design documentation
- Figma design ready for handoff
- Component specification required
- Accessibility audit needed
- Design system additions
MUST READ References
IMPORTANT: You MUST read these reference files for complete protocol. Do NOT skip.
- MUST READ
.claude/skills/team-design-spec/references/design-system-reference.md — component specs, accessibility audit template, design tokens, responsive breakpoints, handoff checklist
Workflow
Determine Source Type
- If URL starting with
figma.com: treat as direct Figma source
- If file path: read file and check for
figma_link in frontmatter
Load Source
- Read PBI/requirements file
- Parse YAML frontmatter
- Extract
figma_link field if present
Detect Figma Link
Sources (priority order):
1. Direct Figma URL argument
2. frontmatter.figma_link
3. Figma URLs in "Design Reference" section
Pattern: https?://(?:www\.)?figma\.com/(design|file)/([a-zA-Z0-9]+)(?:/[^?]*)?(?:\?node-id=([0-9]+:[0-9]+))?
Extract Figma Specs (if link found)
- Call
/team-figma-extract {url} internally
- Handle failures gracefully (continue without Figma data)
Define Components (use template from .claude/skills/team-design-spec/references/design-system-reference.md)
- Type classification: Atom / Molecule / Organism / Template
- States: default, hover, active, disabled, error, loading
- Design tokens mapping
- Accessibility requirements (WCAG 2.1 AA)
Specify Responsive Behavior (breakpoints in reference)
Generate Spec
Structure: Overview, Component Inventory, States, Design Tokens, Accessibility, Responsive, Figma Extracted Specs
Save Artifact
- Path:
team-artifacts/design-specs/{YYMMDD}-designspec-{feature}.md
Fallback Behavior
When Figma extraction unavailable:
- Log warning: "Figma specs not extracted: {reason}"
- Continue with manual spec creation
- Leave Section 7 with placeholder text
Design Token Format
$primary: #1976D2; // Colors
$heading: 24px/1.2 'Inter'; // Typography
$gap-sm: 8px; // Spacing
Example
/team-design-spec https://www.figma.com/design/ABC123/UserProfile
/team-design-spec team-artifacts/pbis/260119-pbi-user-profile.md
Output
Creates: team-artifacts/design-specs/{YYMMDD}-designspec-{feature}.md
IMPORTANT Task Planning Notes
- Always plan and break many small todo tasks
- Always add a final review todo task to review the works done at the end to find any fix or enhancement needed
1---2name: team-design-spec3description: Create comprehensive UI/UX specifications for implementation.4---5
6---
7name: team-design-spec
8description: "[Team] Create UI/UX design specifications from requirements or Figma designs. Covers component specs (Atom/Molecule/Organism), accessibility audits (WCAG 2.1 AA), design tokens, responsive behavior, and dev handoffs. Triggers on "design spec", "ui spec", "component spec", "accessibility audit", "design handoff", "design tokens", "wireframe", "mockup"."
9argument-hint: "<path-to-PBI-or-Figma-URL>"
10infer: true
11allowed-tools: Read, Write, Edit, Grep, Glob, WebSearch, ai-multimodal, mcp__figma__*
12---
13
14# Design Specification
15
16Create comprehensive UI/UX specifications for implementation.
17
18## When to Use
19- PBI needs design documentation
20- Figma design ready for handoff
21- Component specification required
22- Accessibility audit needed
23- Design system additions
24
25## MUST READ References
26
27**IMPORTANT: You MUST read these reference files for complete protocol. Do NOT skip.**
28
29- **MUST READ** `.claude/skills/team-design-spec/references/design-system-reference.md` — component specs, accessibility audit template, design tokens, responsive breakpoints, handoff checklist
30
31## Workflow
32
331. **Determine Source Type**
34 - If URL starting with `figma.com`: treat as direct Figma source
35 - If file path: read file and check for `figma_link` in frontmatter
36
372. **Load Source**
38 - Read PBI/requirements file
39 - Parse YAML frontmatter
40 - Extract `figma_link` field if present
41
423. **Detect Figma Link**
43 ```
44 Sources (priority order):
45 1. Direct Figma URL argument
46 2. frontmatter.figma_link
47 3. Figma URLs in "Design Reference" section
48 ```
49 Pattern: `https?://(?:www\.)?figma\.com/(design|file)/([a-zA-Z0-9]+)(?:/[^?]*)?(?:\?node-id=([0-9]+:[0-9]+))?`
50
514. **Extract Figma Specs (if link found)**
52 - Call `/team-figma-extract {url}` internally
53 - Handle failures gracefully (continue without Figma data)
54
555. **Define Components** (use template from `.claude/skills/team-design-spec/references/design-system-reference.md`)
56 - Type classification: Atom / Molecule / Organism / Template
57 - States: default, hover, active, disabled, error, loading
58 - Design tokens mapping
59 - Accessibility requirements (WCAG 2.1 AA)
60
616. **Specify Responsive Behavior** (breakpoints in reference)
62
637. **Generate Spec**
64 Structure: Overview, Component Inventory, States, Design Tokens, Accessibility, Responsive, Figma Extracted Specs
65
668. **Save Artifact**
67 - Path: `team-artifacts/design-specs/{YYMMDD}-designspec-{feature}.md`
68
69## Fallback Behavior
70When Figma extraction unavailable:
711. Log warning: "Figma specs not extracted: {reason}"
722. Continue with manual spec creation
733. Leave Section 7 with placeholder text
74
75## Design Token Format
76```scss
77$primary: #1976D2; // Colors
78$heading: 24px/1.2 'Inter'; // Typography
79$gap-sm: 8px; // Spacing
80```
81
82## Example
83```bash
84/team-design-spec https://www.figma.com/design/ABC123/UserProfile
85/team-design-spec team-artifacts/pbis/260119-pbi-user-profile.md
86```
87
88## Output
89Creates: `team-artifacts/design-specs/{YYMMDD}-designspec-{feature}.md`
90
91
92## IMPORTANT Task Planning Notes
93
94- Always plan and break many small todo tasks
95- Always add a final review todo task to review the works done at the end to find any fix or enhancement needed