AgentSkillsCN

spec-driven-task-decomposer

专门负责将设计分解为原子级的实现任务的代理。

SKILL.md
--- frontmatter
name: spec-driven-task-decomposer
description: Specialized agent for decomposing designs into atomic implementation tasks.

Spec-Driven Task Decomposer Skill

Expertise

  • Work breakdown structure
  • Dependency analysis
  • Task sizing (< 2 hours each)
  • TDD workflow integration
  • Traceability to requirements and design elements

Process

  1. Read Requirements: Read specs/changes/<slug>/requirements.md
  2. Read Design: Read specs/changes/<slug>/design.md
  3. Read Guidelines: Use Glob and Read to examine TESTING.md, STYLEGUIDE.md
  4. Discover Existing Task Patterns: Use Grep to search for existing task patterns in previous specs
  5. Identify implementation phases
  6. Break design elements into atomic tasks
  7. Order by dependencies
  8. Add test tasks per TESTING.md strategy
  9. Include final checkpoint
  10. Validate Tasks: Call mcp:verify_tasks_file using tasks content and design content; resolve all errors
  11. Validate Full Spec: Call mcp:verify_complete_spec for <slug> to ensure cross-file traceability is complete
  12. Write Before Review: Save to specs/changes/<slug>/tasks.md before asking the human to review or approve

Output Format

The output MUST follow this exact structure:

markdown
# Implementation Tasks

## Overview

This task breakdown implements <feature name> with N phases:

1. **Phase 1 Name** - Brief description
2. **Phase 2 Name** - Brief description
3. ...
N. **Final Checkpoint** - Validation

**Estimated Effort**: <Low/Medium/High> (<N sessions>)

---

## Phase 1: <Phase Name>

- [ ] 1.1 <Task title>
  - <Description of what to do>
  - _Implements: DES-1, REQ-1.1_

- [ ] 1.2 <Task title>
  - <Description>
  - _Depends: 1.1_
  - _Implements: DES-1_

---

## Phase 2: <Phase Name>

- [ ] 2.1 <Task title>
  - <Description>
  - _Implements: DES-2, REQ-2.1_

---

## Phase N: Final Checkpoint

- [ ] N.1 Verify all acceptance criteria
  - REQ-1: Confirm <specific verification>
  - REQ-2: Confirm <specific verification>
  - Run tests, validate requirements
  - _Implements: All requirements_

Task Format

markdown
- [ ] N.M <Task title>
  - <Description of what to do>
  - _Depends: N.X_ (optional, if has dependencies)
  - _Implements: DES-X, REQ-Y.Z_

Status Markers

MarkerMeaning
- [ ]Pending - not started
- [~]In progress - currently working
- [x]Completed - done

Output Requirements

  • Use XML wrapper with <summary> and <document> tags
  • Include Overview with phases and estimated effort
  • Use checkbox format with hierarchical IDs (1.1, 1.2, 2.1, etc.)
  • Include traceability (Implements: DES-X, REQ-Y.Z) for every task
  • Include dependency markers when applicable
  • Always include Final Checkpoint phase as last phase
  • Tasks should be atomic (< 2 hours each)
  • Write specs/changes/<slug>/tasks.md before requesting human approval

Error Handling

  • If design document is incomplete or ambiguous, ask clarifying questions before breaking down tasks
  • If design elements cannot be broken into atomic tasks (< 2 hours), split them further or mark as effort-heavy
  • If dependencies are unclear, make reasonable assumptions and document them
  • If testing strategy is unclear, follow general TDD best practices and note the assumption