|
| 1 | +Break down the plan into executable tasks. |
| 2 | + |
| 3 | +This is the third step in the Spec-Driven Development lifecycle. |
| 4 | + |
| 5 | +Given the context provided as an argument, do this: |
| 6 | + |
| 7 | +1. Run `scripts/check-task-prerequisites.sh --json` from repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute. |
| 8 | +2. Load and analyze available design documents: |
| 9 | + - Always read plan.md for tech stack and libraries |
| 10 | + - IF EXISTS: Read data-model.md for entities |
| 11 | + - IF EXISTS: Read contracts/ for API endpoints |
| 12 | + - IF EXISTS: Read research.md for technical decisions |
| 13 | + - IF EXISTS: Read quickstart.md for test scenarios |
| 14 | + |
| 15 | + Note: Not all projects have all documents. For example: |
| 16 | + - CLI tools might not have contracts/ |
| 17 | + - Simple libraries might not need data-model.md |
| 18 | + - Generate tasks based on what's available |
| 19 | + |
| 20 | +3. Generate tasks following the template: |
| 21 | + - Use `/templates/tasks-template.md` as the base |
| 22 | + - Replace example tasks with actual tasks based on: |
| 23 | + - **Setup tasks**: Project init, dependencies, linting |
| 24 | + - **Test tasks [P]**: One per contract, one per integration scenario |
| 25 | + - **Core tasks**: One per entity, service, CLI command, endpoint |
| 26 | + - **Integration tasks**: DB connections, middleware, logging |
| 27 | + - **Polish tasks [P]**: Unit tests, performance, docs |
| 28 | + |
| 29 | +4. Task generation rules: |
| 30 | + - Each contract file → contract test task marked [P] |
| 31 | + - Each entity in data-model → model creation task marked [P] |
| 32 | + - Each endpoint → implementation task (not parallel if shared files) |
| 33 | + - Each user story → integration test marked [P] |
| 34 | + - Different files = can be parallel [P] |
| 35 | + - Same file = sequential (no [P]) |
| 36 | + |
| 37 | +5. Order tasks by dependencies: |
| 38 | + - Setup before everything |
| 39 | + - Tests before implementation (TDD) |
| 40 | + - Models before services |
| 41 | + - Services before endpoints |
| 42 | + - Core before integration |
| 43 | + - Everything before polish |
| 44 | + |
| 45 | +6. Include parallel execution examples: |
| 46 | + - Group [P] tasks that can run together |
| 47 | + - Show actual Task agent commands |
| 48 | + |
| 49 | +7. Create FEATURE_DIR/tasks.md with: |
| 50 | + - Correct feature name from implementation plan |
| 51 | + - Numbered tasks (T001, T002, etc.) |
| 52 | + - Clear file paths for each task |
| 53 | + - Dependency notes |
| 54 | + - Parallel execution guidance |
| 55 | + |
| 56 | +Context for task generation: $ARGUMENTS |
| 57 | + |
| 58 | +The tasks.md should be immediately executable - each task must be specific enough that an LLM can complete it without additional context. |
0 commit comments