frontend-task-breakdown
npx skills add https://github.com/parhumm/jaan-to --skill frontend-task-breakdown
Agent 安装分布
Skill 文档
frontend-task-breakdown
Transform UX design handoffs into production-ready frontend task breakdowns.
Context Files
$JAAN_CONTEXT_DIR/tech.md– Tech stack context (optional, auto-imported if exists)- Uses sections:
#current-stack,#frameworks,#constraints
- Uses sections:
$JAAN_CONTEXT_DIR/config.md– Project configuration$JAAN_TEMPLATES_DIR/jaan-to-frontend-task-breakdown.template.md– Output template$JAAN_LEARN_DIR/jaan-to-frontend-task-breakdown.learn.md– Past lessons (loaded in Pre-Execution)${CLAUDE_PLUGIN_ROOT}/docs/extending/language-protocol.md– Language resolution protocol
Input
UX Handoff: $ARGUMENTS
Accepts any of:
- Figma link â URL to design file or prototype
- Design description â Free text describing screens and flows
- Screenshot path â Path to screenshot image(s)
- PRD reference â Path to PRD file with frontend requirements
- Feature name â Brief feature description for breakdown
If no input provided, ask: “What feature or UX handoff should I break down?”
Pre-Execution Protocol
MANDATORY â Read and execute ALL steps in: ${CLAUDE_PLUGIN_ROOT}/docs/extending/pre-execution-protocol.md
Skill name: frontend-task-breakdown
Execute: Step 0 (Init Guard) â A (Load Lessons) â B (Resolve Template) â C (Offer Template Seeding)
Also read tech context if available:
$JAAN_CONTEXT_DIR/tech.md– Know the tech stack for framework-specific patterns
Language Settings
Read and apply language protocol: ${CLAUDE_PLUGIN_ROOT}/docs/extending/language-protocol.md
Override field for this skill: language_frontend-task-breakdown
PHASE 1: Analysis (Read-Only)
Thinking Mode
ultrathink
Use extended reasoning for:
- Analyzing UX handoff to extract components and flows
- Mapping components to atomic design levels
- Enumerating states and edge cases
- Building dependency graphs
- Assessing risks
Step 1: Parse UX Handoff Input
Analyze the provided input to extract:
If Figma link:
- Note the URL
- Ask user to describe key screens/flows (Claude cannot access Figma directly)
- Ask for screenshot exports if available
If design description / feature name:
- Extract screens mentioned
- Extract user flows and interactions
- Identify data requirements
- Note any specified components
If screenshot path:
- Read the image file(s)
- Identify visible components and layout structure
- Infer interaction patterns from visual cues
- Note areas needing clarification
If PRD reference:
- Read the PRD file
- Extract frontend-relevant user stories
- Identify screens and flows from acceptance criteria
- Note technical constraints mentioned
Build an initial understanding:
INPUT SUMMARY
âââââââââââââ
Type: {figma/description/screenshot/prd}
Screens: {list of identified screens}
Flows: {list of user flows}
Data: {data requirements identified}
Unknown: {areas needing clarification}
Step 2: Clarify Scope
Ask up to 5 smart questions based on what’s unclear from Step 1. Skip questions already answered by the input.
Scope questions (ask if ambiguous):
- “Which screens/flows should I break down?” â only if input covers multiple areas
- “Is this a new feature or extending existing UI?” â affects component reuse
Framework questions (ask if tech.md unavailable or incomplete): 3. “Any specific framework constraints? (React, Vue, Next.js, etc.)” â if not in tech.md
Depth question (always ask): 4. Use AskUserQuestion:
- Question: “What’s the target scope for this breakdown?”
- Header: “Scope”
- Options:
- “MVP” â Core functionality, happy path, basic states
- “Production” â Full states, a11y, performance budgets, edge cases
- “In between” â Core + error/loading states, basic a11y
Coverage question (ask if scope is Production or In between): 5. Use AskUserQuestion:
- Question: “Include accessibility + performance task details?”
- Header: “Coverage”
- Options:
- “Full coverage” â All 50+ checklist items evaluated
- “Essential only” â Key a11y + core performance
- “Skip” â Focus on functional tasks only
Step 3: Component Identification
For each screen/flow, identify components using Atomic Design taxonomy:
Reference: Full taxonomy table with estimate bands in
docs/extending/frontend-task-breakdown-reference.mdâ Atomic Design Taxonomy.
For each component, record:
- Name (descriptive, BEM-style)
- Atomic level
- Estimate band (T-shirt size)
- Reusable? (yes = shared component, no = feature-specific)
- Exists already? (check against known design system if tech.md describes one)
Present component inventory:
COMPONENT INVENTORY
âââââââââââââââââââ
Atoms: {count} ({reusable}/{new})
Molecules: {count} ({reusable}/{new})
Organisms: {count} ({reusable}/{new})
Templates: {count}
Pages: {count}
Total: {total_count} components
Step 4: State Enumeration
For every component at molecule level and above, enumerate states:
| State | What to Define | UI Element |
|---|---|---|
| Default | Initial render appearance | Standard view |
| Loading | During data fetch | Skeleton shimmer or spinner |
| Success | Happy path with data | Populated view |
| Error | API failure or validation error | Error message + retry action |
| Empty | No data available | Illustration + CTA |
| Partial | Cached data while refreshing | Stale data + refresh indicator |
For screens/pages, also enumerate:
Edge cases:
- Long text (100+ characters) â truncation with tooltip
- Missing images â fallback placeholder
- Slow network (3G) â timeout handling
- Very long lists â virtualization consideration
- Special characters / unicode â encoding handling
- Browser back/forward â navigation state
Browser compatibility (if scope includes it):
- Safari iOS: position:fixed in scroll containers, 100vh, date inputs
- Safari Desktop: flexbox gaps, backdrop-filter
- Firefox: form autofill styling
Build a state matrix:
STATE MATRIX (screens x states)
âââââââââââââââââââââââââââââââ
Default Loading Success Error Empty Partial
Screen A: [x] [x] [x] [x] [x] [ ]
Screen B: [x] [x] [x] [x] [ ] [x]
...
Step 5: Coverage Analysis
Apply the coverage checklist based on scope selected in Step 2.
Reference: Full coverage checklist (53 items across 7 domains: Accessibility, Responsive, Interaction, Performance, SEO, Infrastructure, Testing) in
docs/extending/frontend-task-breakdown-reference.mdâ Coverage Checklist.
For each item, mark: Included / Not applicable / Deferred
Count coverage:
COVERAGE SUMMARY
ââââââââââââââââ
Included: {n} tasks
Not applicable: {n} items
Deferred: {n} items (list reasons)
Step 6: Dependency Mapping
Build the dependency graph for all identified components:
Standard dependency chains:
- Design tokens â Atom components â Molecule components â Organism components â Page assembly
- API client setup â Data fetching hooks â Components that consume data
- Shared state (context/store) â Components that read/write state
- Route configuration â Page components
Identify:
- Critical path â longest chain of sequential dependencies (determines minimum duration)
- Parallel tracks â independent component groups that different developers can build simultaneously
- Shared infrastructure â tasks that unblock multiple downstream components
Format as Mermaid:
graph TD
A[Design Tokens] --> B[Atom Components]
B --> C[Molecule Components]
C --> D[Organism Components]
E[API Client] --> F[Data Hooks]
F --> D
D --> G[Page Assembly]
G --> H[Integration Testing]
Step 7: Risk Assessment
Categorize and rate risks:
Technical risks:
- New framework features (React Server Components, Suspense boundaries)
- Complex state management (cross-component, optimistic updates)
- Performance targets (large datasets, real-time updates)
- Browser compatibility requirements
Integration risks:
- API contracts not yet defined (frontend blocked)
- Third-party dependency instability
- Authentication/authorization integration
- Backend not ready for frontend consumption
UX risks:
- Unclear requirements (missing design states)
- Design changes during development
- Accessibility gaps in designs
- Localization/i18n requirements unclear
Rate each: Likelihood (Low/Medium/High) x Impact (Low/Medium/High)
Propose mitigation for every Medium+ impact risk.
HARD STOP â Review Breakdown Plan
Present the complete analysis summary:
TASK BREAKDOWN PLAN
âââââââââââââââââââ
COMPONENTS
ââââââââââ
Atoms: {count} (XS) Molecules: {count} (S)
Organisms: {count} (M) Templates: {count} (L)
Pages: {count} (XL) Total: {total}
ESTIMATES
âââââââââ
Total tasks: {task_count}
Critical path: {n} sequential tasks
Parallel tracks: {n} independent streams
COVERAGE
ââââââââ
Scope: {MVP/Production/In between}
Included: {n} coverage items
Deferred: {n} items
TOP RISKS
âââââââââ
1. {risk_1} â {likelihood}/{impact} â {mitigation_summary}
2. {risk_2} â {likelihood}/{impact} â {mitigation_summary}
3. {risk_3} â {likelihood}/{impact} â {mitigation_summary}
Use AskUserQuestion:
- Question: “Proceed with generating the task breakdown document?”
- Header: “Generate”
- Options:
- “Yes” â Generate the full task breakdown
- “No” â Cancel
- “Edit” â Let me revise the scope or components first
Do NOT proceed to Phase 2 without explicit approval.
PHASE 2: Generation (Write Phase)
Step 8: Generate Task Breakdown Document
-
Read template:
$JAAN_TEMPLATES_DIR/jaan-to-frontend-task-breakdown.template.md -
If tech stack needed, extract sections from tech.md:
- Current Stack:
#current-stack - Frameworks:
#frameworks - Constraints:
#constraints
- Current Stack:
-
Fill all template sections with analysis from Phase 1:
Overview section:
- Feature name, epic (if provided), scope level, date
Component Inventory section:
- If screenshots were provided as input, embed them in the Component Inventory using
alongside relevant component groups - For each component: name, atomic level, estimate band, risk level
- States table (6 states per component)
- Tasks table with: task description, size, complexity, dependencies, acceptance criteria
Task naming convention:
[Action Verb] + [Component/Feature] + [Specific Detail]
- Create/Build/Implement â new work
- Add/Extend â enhancements
- Configure/Setup â infrastructure
Estimate bands (T-shirt sizes, not hours):
Reference: Full estimate bands table (XSâXL with meanings and typical work) in
docs/extending/frontend-task-breakdown-reference.mdâ Estimate Bands.
State Machine stubs (for organisms and above):
Reference: State machine stub template (states, events, transitions format) in
docs/extending/frontend-task-breakdown-reference.mdâ State Machine Stubs.
Dependency Graph â Mermaid diagram from Step 6
Performance Budget (if scope = Production or In between):
Reference: Performance budget table (LCP, INP, CLS, Bundle targets and optimization tasks) in
docs/extending/frontend-task-breakdown-reference.mdâ Performance Budget.
Risk Register â table from Step 7
Coverage Checklist â applicable items from Step 5
Definition of Ready / Definition of Done:
Reference: Full checklists (6 Ready items, 8 Done items) in
docs/extending/frontend-task-breakdown-reference.mdâ Definition of Ready / Definition of Done.
Step 9: Quality Check
Before preview, verify:
- Every component (molecule+) has all 6 states listed
- No component without an estimate band
- Dependency graph is acyclic (no circular dependencies)
- At least 1 accessibility task per organism-level component
- Performance budget present (if scope = Production or In between)
- Risk register has mitigation for every High-impact risk
- Task names follow verb + component + detail pattern
- No hardcoded paths (all use
$JAAN_*variables) - State machine stubs present for complex components
- Definition of Ready and Done sections populated
- If screenshots provided: images embedded with
syntax and URL-encoded paths
If any check fails, fix before preview.
Step 10: Preview & Approval
Show the complete task breakdown document.
Use AskUserQuestion:
- Question: “Write task breakdown to output?”
- Header: “Write”
- Options:
- “Yes” â Write the file
- “No” â Cancel
Step 10.5: Generate ID and Folder Structure
If approved, set up the output structure:
- Source ID generator utility:
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/id-generator.sh"
- Generate sequential ID and output paths:
# Define subdomain directory
SUBDOMAIN_DIR="$JAAN_OUTPUTS_DIR/frontend/task-breakdown"
mkdir -p "$SUBDOMAIN_DIR"
# Generate next ID
NEXT_ID=$(generate_next_id "$SUBDOMAIN_DIR")
# Create folder and file paths (slug from feature name)
slug="{lowercase-hyphenated-feature-name}"
OUTPUT_FOLDER="${SUBDOMAIN_DIR}/${NEXT_ID}-${slug}"
MAIN_FILE="${OUTPUT_FOLDER}/${NEXT_ID}-${slug}.md"
- Preview output configuration:
Output Configuration
- ID: {NEXT_ID}
- Folder: $JAAN_OUTPUTS_DIR/frontend/task-breakdown/{NEXT_ID}-{slug}/
- Main file: {NEXT_ID}-{slug}.md
Step 10.7: Resolve & Copy Assets
If screenshot paths were provided as input:
Reference: See
${CLAUDE_PLUGIN_ROOT}/docs/extending/asset-embedding-reference.mdfor the asset resolution protocol (path detection, copy rules, markdown embedding).
Source ${CLAUDE_PLUGIN_ROOT}/scripts/lib/asset-handler.sh. For each screenshot: check is_jaan_path â if inside $JAAN_*, reference in-place; if external, ask user before copying. Use resolve_asset_path for markdown-relative paths.
Step 11: Write Output
- Create output folder:
mkdir -p "$OUTPUT_FOLDER"
- Write task breakdown to main file:
cat > "$MAIN_FILE" <<'EOF'
{generated task breakdown with Executive Summary}
EOF
- Update subdomain index:
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/index-updater.sh"
add_to_index \
"$SUBDOMAIN_DIR/README.md" \
"$NEXT_ID" \
"${NEXT_ID}-${slug}" \
"{Feature Title}" \
"{1-2 sentence summary: frontend task breakdown for feature}"
- Confirm completion:
â Task breakdown written to: $JAAN_OUTPUTS_DIR/frontend/task-breakdown/{NEXT_ID}-{slug}/{NEXT_ID}-{slug}.md â Index updated: $JAAN_OUTPUTS_DIR/frontend/task-breakdown/README.md
Step 12: Suggest Next Skill
“Task breakdown complete.”
Note: For detailed state machine definitions skill (
/jaan-to:frontend-state-machine), see roadmap – coming in future release.
Step 13: Capture Feedback
Use AskUserQuestion:
-
Question: “Any feedback on the task breakdown?”
-
Header: “Feedback”
-
Options:
- “No” â All good, done
- “Fix now” â Update something in the breakdown
- “Learn” â Save lesson for future runs
- “Both” â Fix now AND save lesson
-
Fix now: Update the output file, re-preview, re-write
-
Learn: Run
/jaan-to:learn-add frontend-task-breakdown "{feedback}" -
Both: Do both
Skill Alignment
- Two-phase workflow with HARD STOP for human approval
- Framework-agnostic with
tech.mddetection - Template-driven output structure
- Output to standardized
$JAAN_OUTPUTS_DIRpath
Definition of Done
- UX handoff parsed and scope confirmed with user
- Components identified with atomic design levels
- States enumerated for every component (molecule+)
- Coverage checklist applied per scope level
- Dependencies mapped with Mermaid diagram
- Risks assessed with mitigations for High-impact items
- Task breakdown document written to
$JAAN_OUTPUTS_DIR/frontend/task-breakdown/{id}-{slug}/{id}-{slug}.md - Quality checks passed
- User approved final result