claude-code-orchestrator-kit 1.0.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.
- package/.claude/agents/database/workers/api-builder.md +155 -0
- package/.claude/agents/database/workers/database-architect.md +193 -0
- package/.claude/agents/database/workers/supabase-auditor.md +1070 -0
- package/.claude/agents/development/workers/code-reviewer.md +968 -0
- package/.claude/agents/development/workers/cost-calculator-specialist.md +683 -0
- package/.claude/agents/development/workers/llm-service-specialist.md +999 -0
- package/.claude/agents/development/workers/skill-builder-v2.md +480 -0
- package/.claude/agents/development/workers/typescript-types-specialist.md +649 -0
- package/.claude/agents/development/workers/utility-builder.md +582 -0
- package/.claude/agents/documentation/workers/technical-writer.md +152 -0
- package/.claude/agents/frontend/workers/fullstack-nextjs-specialist.md +206 -0
- package/.claude/agents/frontend/workers/visual-effects-creator.md +159 -0
- package/.claude/agents/health/orchestrators/bug-orchestrator.md +1045 -0
- package/.claude/agents/health/orchestrators/dead-code-orchestrator.md +1045 -0
- package/.claude/agents/health/orchestrators/dependency-orchestrator.md +1045 -0
- package/.claude/agents/health/orchestrators/security-orchestrator.md +1045 -0
- package/.claude/agents/health/workers/bug-fixer.md +525 -0
- package/.claude/agents/health/workers/bug-hunter.md +649 -0
- package/.claude/agents/health/workers/dead-code-hunter.md +446 -0
- package/.claude/agents/health/workers/dead-code-remover.md +437 -0
- package/.claude/agents/health/workers/dependency-auditor.md +379 -0
- package/.claude/agents/health/workers/dependency-updater.md +436 -0
- package/.claude/agents/health/workers/security-scanner.md +700 -0
- package/.claude/agents/health/workers/vulnerability-fixer.md +524 -0
- package/.claude/agents/infrastructure/workers/infrastructure-specialist.md +156 -0
- package/.claude/agents/infrastructure/workers/orchestration-logic-specialist.md +1260 -0
- package/.claude/agents/infrastructure/workers/qdrant-specialist.md +503 -0
- package/.claude/agents/infrastructure/workers/quality-validator-specialist.md +984 -0
- package/.claude/agents/meta/workers/meta-agent-v3.md +503 -0
- package/.claude/agents/research/workers/problem-investigator.md +507 -0
- package/.claude/agents/research/workers/research-specialist.md +423 -0
- package/.claude/agents/testing/workers/accessibility-tester.md +813 -0
- package/.claude/agents/testing/workers/integration-tester.md +188 -0
- package/.claude/agents/testing/workers/mobile-fixes-implementer.md +252 -0
- package/.claude/agents/testing/workers/mobile-responsiveness-tester.md +180 -0
- package/.claude/agents/testing/workers/performance-optimizer.md +262 -0
- package/.claude/agents/testing/workers/test-writer.md +800 -0
- package/.claude/commands/health-bugs.md +297 -0
- package/.claude/commands/health-cleanup.md +297 -0
- package/.claude/commands/health-deps.md +297 -0
- package/.claude/commands/health-metrics.md +747 -0
- package/.claude/commands/health-security.md +297 -0
- package/.claude/commands/push.md +21 -0
- package/.claude/commands/speckit.analyze.md +184 -0
- package/.claude/commands/speckit.checklist.md +294 -0
- package/.claude/commands/speckit.clarify.md +178 -0
- package/.claude/commands/speckit.constitution.md +78 -0
- package/.claude/commands/speckit.implement.md +182 -0
- package/.claude/commands/speckit.plan.md +87 -0
- package/.claude/commands/speckit.specify.md +250 -0
- package/.claude/commands/speckit.tasks.md +137 -0
- package/.claude/commands/translate-doc.md +95 -0
- package/.claude/commands/worktree-cleanup.md +382 -0
- package/.claude/commands/worktree-create.md +287 -0
- package/.claude/commands/worktree-list.md +239 -0
- package/.claude/commands/worktree-remove.md +339 -0
- package/.claude/schemas/base-plan.schema.json +82 -0
- package/.claude/schemas/bug-plan.schema.json +71 -0
- package/.claude/schemas/dead-code-plan.schema.json +71 -0
- package/.claude/schemas/dependency-plan.schema.json +74 -0
- package/.claude/schemas/security-plan.schema.json +71 -0
- package/.claude/scripts/gates/check-bundle-size.sh +47 -0
- package/.claude/scripts/gates/check-coverage.sh +67 -0
- package/.claude/scripts/gates/check-security.sh +46 -0
- package/.claude/scripts/release.sh +740 -0
- package/.claude/settings.local.json +21 -0
- package/.claude/settings.local.json.example +20 -0
- package/.claude/skills/calculate-priority-score/SKILL.md +229 -0
- package/.claude/skills/calculate-priority-score/scoring-matrix.json +83 -0
- package/.claude/skills/extract-version/SKILL.md +228 -0
- package/.claude/skills/format-commit-message/SKILL.md +189 -0
- package/.claude/skills/format-commit-message/template.md +64 -0
- package/.claude/skills/format-markdown-table/SKILL.md +202 -0
- package/.claude/skills/format-markdown-table/examples.md +84 -0
- package/.claude/skills/format-todo-list/SKILL.md +222 -0
- package/.claude/skills/format-todo-list/template.json +30 -0
- package/.claude/skills/generate-changelog/SKILL.md +258 -0
- package/.claude/skills/generate-changelog/commit-mapping.json +47 -0
- package/.claude/skills/generate-report-header/SKILL.md +228 -0
- package/.claude/skills/generate-report-header/template.md +66 -0
- package/.claude/skills/parse-error-logs/SKILL.md +286 -0
- package/.claude/skills/parse-error-logs/patterns.json +26 -0
- package/.claude/skills/parse-git-status/SKILL.md +164 -0
- package/.claude/skills/parse-package-json/SKILL.md +151 -0
- package/.claude/skills/parse-package-json/schema.json +43 -0
- package/.claude/skills/render-template/SKILL.md +245 -0
- package/.claude/skills/rollback-changes/SKILL.md +582 -0
- package/.claude/skills/rollback-changes/changes-log-schema.json +101 -0
- package/.claude/skills/run-quality-gate/SKILL.md +404 -0
- package/.claude/skills/run-quality-gate/gate-mappings.json +97 -0
- package/.claude/skills/validate-plan-file/SKILL.md +327 -0
- package/.claude/skills/validate-plan-file/schema.json +35 -0
- package/.claude/skills/validate-report-file/SKILL.md +256 -0
- package/.claude/skills/validate-report-file/schema.json +67 -0
- package/.env.example +49 -0
- package/.github/BRANCH_PROTECTION.md +137 -0
- package/.github/workflows/build.yml +70 -0
- package/.github/workflows/claude-code-review.yml +255 -0
- package/.github/workflows/claude.yml +79 -0
- package/.github/workflows/deploy-staging.yml +90 -0
- package/.github/workflows/test.yml +104 -0
- package/.gitignore +116 -0
- package/CLAUDE.md +137 -0
- package/LICENSE +72 -0
- package/README.md +1098 -0
- package/docs/ARCHITECTURE.md +746 -0
- package/docs/Agents Ecosystem/AGENT-ORCHESTRATION.md +568 -0
- package/docs/Agents Ecosystem/AI-AGENT-ECOSYSTEM-README.md +658 -0
- package/docs/Agents Ecosystem/ARCHITECTURE.md +606 -0
- package/docs/Agents Ecosystem/QUALITY-GATES-SPECIFICATION.md +1315 -0
- package/docs/Agents Ecosystem/REPORT-TEMPLATE-STANDARD.md +1324 -0
- package/docs/Agents Ecosystem/spec-kit-comprehensive-updates.md +478 -0
- package/docs/FAQ.md +572 -0
- package/docs/MIGRATION-GUIDE.md +542 -0
- package/docs/PERFORMANCE-OPTIMIZATION.md +494 -0
- package/docs/ROADMAP.md +439 -0
- package/docs/TUTORIAL-CUSTOM-AGENTS.md +2041 -0
- package/docs/USE-CASES.md +706 -0
- package/index.js +96 -0
- package/mcp/.mcp.base.json +21 -0
- package/mcp/.mcp.frontend.json +29 -0
- package/mcp/.mcp.full.json +67 -0
- package/mcp/.mcp.local.example.json +7 -0
- package/mcp/.mcp.local.json +7 -0
- package/mcp/.mcp.n8n.json +45 -0
- package/mcp/.mcp.supabase-full.json +35 -0
- package/mcp/.mcp.supabase-only.json +28 -0
- package/package.json +78 -0
- package/postinstall.js +71 -0
- package/switch-mcp.sh +101 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Execute the implementation plan by processing and executing all tasks defined in tasks.md
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
> **ORCHESTRATION REMINDER**: You are the orchestrator, not the implementer. Delegate all complex tasks to subagents with complete context. Gather full context before delegation (read code, search patterns, review docs, check commits). Verify results thoroughly (read files, run type-check). Re-delegate with corrections if validation fails. Execute directly only for trivial tasks (1-2 line fixes, imports, single npm install).
|
|
6
|
+
|
|
7
|
+
## User Input
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
$ARGUMENTS
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
You **MUST** consider the user input before proceeding (if not empty).
|
|
14
|
+
|
|
15
|
+
## Outline
|
|
16
|
+
|
|
17
|
+
1. Run `.specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks` from repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute. For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").
|
|
18
|
+
|
|
19
|
+
2. **Check checklists status** (if FEATURE_DIR/checklists/ exists):
|
|
20
|
+
- Scan all checklist files in the checklists/ directory
|
|
21
|
+
- For each checklist, count:
|
|
22
|
+
- Total items: All lines matching `- [ ]` or `- [X]` or `- [x]`
|
|
23
|
+
- Completed items: Lines matching `- [X]` or `- [x]`
|
|
24
|
+
- Incomplete items: Lines matching `- [ ]`
|
|
25
|
+
- Create a status table:
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
| Checklist | Total | Completed | Incomplete | Status |
|
|
29
|
+
|-----------|-------|-----------|------------|--------|
|
|
30
|
+
| ux.md | 12 | 12 | 0 | ✓ PASS |
|
|
31
|
+
| test.md | 8 | 5 | 3 | ✗ FAIL |
|
|
32
|
+
| security.md | 6 | 6 | 0 | ✓ PASS |
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- Calculate overall status:
|
|
36
|
+
- **PASS**: All checklists have 0 incomplete items
|
|
37
|
+
- **FAIL**: One or more checklists have incomplete items
|
|
38
|
+
|
|
39
|
+
- **If any checklist is incomplete**:
|
|
40
|
+
- Display the table with incomplete item counts
|
|
41
|
+
- **STOP** and ask: "Some checklists are incomplete. Do you want to proceed with implementation anyway? (yes/no)"
|
|
42
|
+
- Wait for user response before continuing
|
|
43
|
+
- If user says "no" or "wait" or "stop", halt execution
|
|
44
|
+
- If user says "yes" or "proceed" or "continue", proceed to step 3
|
|
45
|
+
|
|
46
|
+
- **If all checklists are complete**:
|
|
47
|
+
- Display the table showing all checklists passed
|
|
48
|
+
- Automatically proceed to step 3
|
|
49
|
+
|
|
50
|
+
3. Load and analyze the implementation context:
|
|
51
|
+
- **REQUIRED**: Read tasks.md for the complete task list and execution plan
|
|
52
|
+
- **REQUIRED**: Read plan.md for tech stack, architecture, and file structure
|
|
53
|
+
- **IF EXISTS**: Read data-model.md for entities and relationships
|
|
54
|
+
- **IF EXISTS**: Read contracts/ for API specifications and test requirements
|
|
55
|
+
- **IF EXISTS**: Read research.md for technical decisions and constraints
|
|
56
|
+
- **IF EXISTS**: Read research/ for complex research findings and decisions
|
|
57
|
+
- **IF EXISTS**: Read quickstart.md for integration scenarios
|
|
58
|
+
|
|
59
|
+
4. **PLANNING PHASE** (Execute Before Implementation):
|
|
60
|
+
- Review all tasks and classify execution model (parallel vs sequential)
|
|
61
|
+
- **Subagent Assignment** (Phase 0):
|
|
62
|
+
* [EXECUTOR: MAIN] - ONLY for trivial tasks (1-2 line fixes, simple imports, single dependency install)
|
|
63
|
+
* For complex tasks: thoroughly examine existing subagents, assign only if 100% match
|
|
64
|
+
* If no 100% match: assign FUTURE agent name (to be created) - `[EXECUTOR: future-agent-name]`
|
|
65
|
+
* After all assignments: if FUTURE agents exist, launch N meta-agent-v3 calls in single message
|
|
66
|
+
* After agent creation: ask user to restart claude-code
|
|
67
|
+
- Annotate tasks with `[EXECUTOR: name]` and `[SEQUENTIAL]`/`[PARALLEL-GROUP-X]`
|
|
68
|
+
- Handle research tasks:
|
|
69
|
+
* Simple: solve with agent tools (Grep, Read, WebSearch, Context7, Supabase docs)
|
|
70
|
+
* Complex: create research prompt in research/, wait for user deepresearch, then incorporate results
|
|
71
|
+
- Output: Updated tasks.md with executor annotations
|
|
72
|
+
- **Atomicity Rule (CRITICAL)**: 1 Task = 1 Agent Invocation
|
|
73
|
+
* Never give multiple tasks to one agent in single run
|
|
74
|
+
* **Parallel execution**: Launch N agent calls in single message (not sequentially)
|
|
75
|
+
* Example: 3 parallel tasks for meta-agent → 3 meta-agent calls in single message
|
|
76
|
+
* Example: 5 parallel tasks for fullstack → 5 fullstack calls in single message
|
|
77
|
+
* Sequential tasks: 1 agent run, wait for completion, then next agent run
|
|
78
|
+
|
|
79
|
+
5. **Project Setup Verification**:
|
|
80
|
+
- **REQUIRED**: Create/verify ignore files based on actual project setup:
|
|
81
|
+
|
|
82
|
+
**Detection & Creation Logic**:
|
|
83
|
+
- Check if the following command succeeds to determine if the repository is a git repo (create/verify .gitignore if so):
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
git rev-parse --git-dir 2>/dev/null
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
- Check if Dockerfile* exists or Docker in plan.md → create/verify .dockerignore
|
|
90
|
+
- Check if .eslintrc*or eslint.config.* exists → create/verify .eslintignore
|
|
91
|
+
- Check if .prettierrc* exists → create/verify .prettierignore
|
|
92
|
+
- Check if .npmrc or package.json exists → create/verify .npmignore (if publishing)
|
|
93
|
+
- Check if terraform files (*.tf) exist → create/verify .terraformignore
|
|
94
|
+
- Check if .helmignore needed (helm charts present) → create/verify .helmignore
|
|
95
|
+
|
|
96
|
+
**If ignore file already exists**: Verify it contains essential patterns, append missing critical patterns only
|
|
97
|
+
**If ignore file missing**: Create with full pattern set for detected technology
|
|
98
|
+
|
|
99
|
+
**Common Patterns by Technology** (from plan.md tech stack):
|
|
100
|
+
- **Node.js/JavaScript/TypeScript**: `node_modules/`, `dist/`, `build/`, `*.log`, `.env*`
|
|
101
|
+
- **Python**: `__pycache__/`, `*.pyc`, `.venv/`, `venv/`, `dist/`, `*.egg-info/`
|
|
102
|
+
- **Java**: `target/`, `*.class`, `*.jar`, `.gradle/`, `build/`
|
|
103
|
+
- **C#/.NET**: `bin/`, `obj/`, `*.user`, `*.suo`, `packages/`
|
|
104
|
+
- **Go**: `*.exe`, `*.test`, `vendor/`, `*.out`
|
|
105
|
+
- **Ruby**: `.bundle/`, `log/`, `tmp/`, `*.gem`, `vendor/bundle/`
|
|
106
|
+
- **PHP**: `vendor/`, `*.log`, `*.cache`, `*.env`
|
|
107
|
+
- **Rust**: `target/`, `debug/`, `release/`, `*.rs.bk`, `*.rlib`, `*.prof*`, `.idea/`, `*.log`, `.env*`
|
|
108
|
+
- **Kotlin**: `build/`, `out/`, `.gradle/`, `.idea/`, `*.class`, `*.jar`, `*.iml`, `*.log`, `.env*`
|
|
109
|
+
- **C++**: `build/`, `bin/`, `obj/`, `out/`, `*.o`, `*.so`, `*.a`, `*.exe`, `*.dll`, `.idea/`, `*.log`, `.env*`
|
|
110
|
+
- **C**: `build/`, `bin/`, `obj/`, `out/`, `*.o`, `*.a`, `*.so`, `*.exe`, `Makefile`, `config.log`, `.idea/`, `*.log`, `.env*`
|
|
111
|
+
- **Swift**: `.build/`, `DerivedData/`, `*.swiftpm/`, `Packages/`
|
|
112
|
+
- **R**: `.Rproj.user/`, `.Rhistory`, `.RData`, `.Ruserdata`, `*.Rproj`, `packrat/`, `renv/`
|
|
113
|
+
- **Universal**: `.DS_Store`, `Thumbs.db`, `*.tmp`, `*.swp`, `.vscode/`, `.idea/`
|
|
114
|
+
|
|
115
|
+
**Tool-Specific Patterns**:
|
|
116
|
+
- **Docker**: `node_modules/`, `.git/`, `Dockerfile*`, `.dockerignore`, `*.log*`, `.env*`, `coverage/`
|
|
117
|
+
- **ESLint**: `node_modules/`, `dist/`, `build/`, `coverage/`, `*.min.js`
|
|
118
|
+
- **Prettier**: `node_modules/`, `dist/`, `build/`, `coverage/`, `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`
|
|
119
|
+
- **Terraform**: `.terraform/`, `*.tfstate*`, `*.tfvars`, `.terraform.lock.hcl`
|
|
120
|
+
- **Kubernetes/k8s**: `*.secret.yaml`, `secrets/`, `.kube/`, `kubeconfig*`, `*.key`, `*.crt`
|
|
121
|
+
|
|
122
|
+
6. Parse tasks.md structure and extract:
|
|
123
|
+
- **Task phases**: Setup, Tests, Core, Integration, Polish
|
|
124
|
+
- **Task dependencies**: Sequential vs parallel execution rules
|
|
125
|
+
- **Task details**: ID, description, file paths, parallel markers [P]
|
|
126
|
+
- **Execution flow**: Order and dependency requirements
|
|
127
|
+
|
|
128
|
+
7. Execute implementation following the task plan:
|
|
129
|
+
- **Task Discovery**: Find FIRST incomplete task (respect phase order)
|
|
130
|
+
- **Phase-by-phase execution**: Complete each phase before moving to the next
|
|
131
|
+
- **Respect dependencies**: Run sequential tasks in order, parallel tasks [P] can run together
|
|
132
|
+
- **Follow TDD approach**: Execute test tasks before their corresponding implementation tasks
|
|
133
|
+
- **File-based coordination**: Tasks affecting the same files must run sequentially
|
|
134
|
+
- **Validation checkpoints**: Verify each phase completion before proceeding
|
|
135
|
+
|
|
136
|
+
8. Atomic Task Execution (Per Task):
|
|
137
|
+
1. UPDATE TODO: Mark task `in_progress` in TodoWrite
|
|
138
|
+
2. CHECK EXECUTOR:
|
|
139
|
+
- [EXECUTOR: MAIN]? → Execute directly if trivial, else delegate
|
|
140
|
+
- [EXECUTOR: subagent-name]? → Delegate to specified subagent
|
|
141
|
+
3. GATHER CONTEXT: Read existing code, search patterns, review docs, check commits
|
|
142
|
+
4. EXECUTE:
|
|
143
|
+
- Direct: Use Edit/Write tools for trivial tasks only
|
|
144
|
+
- Delegated: Launch Task tool with complete context (code snippets, file paths, patterns, validation criteria)
|
|
145
|
+
5. VERIFY: Read ALL modified files, run type-check, check for regressions
|
|
146
|
+
6. ACCEPT/REJECT:
|
|
147
|
+
- Accept? → Continue to step 7
|
|
148
|
+
- Reject? → Re-delegate with corrections and error messages, go to step 4
|
|
149
|
+
7. UPDATE TODO: Mark task `completed` in TodoWrite
|
|
150
|
+
8. UPDATE tasks.md: Mark task `[X]`, add artifacts: `→ Artifacts: [file1](path), [file2](path)`
|
|
151
|
+
9. COMMIT: Run `/push patch`
|
|
152
|
+
10. NEXT TASK: Move to next incomplete task, go to step 1
|
|
153
|
+
|
|
154
|
+
9. Implementation execution rules:
|
|
155
|
+
- **Setup first**: Initialize project structure, dependencies, configuration
|
|
156
|
+
- **Tests before code**: If you need to write tests for contracts, entities, and integration scenarios
|
|
157
|
+
- **Core development**: Implement models, services, CLI commands, endpoints
|
|
158
|
+
- **Integration work**: Database connections, middleware, logging, external services
|
|
159
|
+
- **Polish and validation**: Unit tests, performance optimization, documentation
|
|
160
|
+
|
|
161
|
+
10. Progress tracking and error handling:
|
|
162
|
+
- Report progress after each completed task
|
|
163
|
+
- **Commit after each task**: Run `/push patch` before moving to next
|
|
164
|
+
- Halt execution if any non-parallel task fails
|
|
165
|
+
- For parallel tasks [P], continue with successful tasks, report failed ones
|
|
166
|
+
- Provide clear error messages with context for debugging
|
|
167
|
+
- Suggest next steps if implementation cannot proceed
|
|
168
|
+
- **IMPORTANT** For completed tasks, make sure to mark the task off as [X] in the tasks file
|
|
169
|
+
- **Critical Rules**:
|
|
170
|
+
* NEVER skip verification
|
|
171
|
+
* NEVER proceed if task failed
|
|
172
|
+
* NEVER batch commits (1 task = 1 commit)
|
|
173
|
+
* ONE task in_progress at a time (atomic execution)
|
|
174
|
+
|
|
175
|
+
11. Completion validation:
|
|
176
|
+
- Verify all required tasks are completed
|
|
177
|
+
- Check that implemented features match the original specification
|
|
178
|
+
- Validate that tests pass and coverage meets requirements
|
|
179
|
+
- Confirm the implementation follows the technical plan
|
|
180
|
+
- Report final status with summary of completed work
|
|
181
|
+
|
|
182
|
+
Note: This command assumes a complete task breakdown exists in tasks.md. If tasks are incomplete or missing, suggest running `/speckit.tasks` first to regenerate the task list.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Execute the implementation planning workflow using the plan template to generate design artifacts.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## User Input
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
$ARGUMENTS
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
You **MUST** consider the user input before proceeding (if not empty).
|
|
12
|
+
|
|
13
|
+
## Outline
|
|
14
|
+
|
|
15
|
+
1. **Setup**: Run `.specify/scripts/bash/setup-plan.sh --json` from repo root and parse JSON for FEATURE_SPEC, IMPL_PLAN, SPECS_DIR, BRANCH. For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").
|
|
16
|
+
|
|
17
|
+
2. **Load context**: Read FEATURE_SPEC and `.specify/memory/constitution.md`. Load IMPL_PLAN template (already copied).
|
|
18
|
+
|
|
19
|
+
3. **Execute plan workflow**: Follow the structure in IMPL_PLAN template to:
|
|
20
|
+
- Fill Technical Context (mark unknowns as "NEEDS CLARIFICATION")
|
|
21
|
+
- Fill Constitution Check section from constitution
|
|
22
|
+
- Evaluate gates (ERROR if violations unjustified)
|
|
23
|
+
- Phase 0: Generate research.md (resolve all NEEDS CLARIFICATION)
|
|
24
|
+
- Phase 1: Generate data-model.md, contracts/, quickstart.md
|
|
25
|
+
- Phase 1: Update agent context by running the agent script
|
|
26
|
+
- Re-evaluate Constitution Check post-design
|
|
27
|
+
|
|
28
|
+
4. **Stop and report**: Command ends after Phase 2 planning. Report branch, IMPL_PLAN path, and generated artifacts.
|
|
29
|
+
|
|
30
|
+
## Phases
|
|
31
|
+
|
|
32
|
+
### Phase 0: Outline & Research
|
|
33
|
+
|
|
34
|
+
**Research Considerations**:
|
|
35
|
+
- If tech decisions unclear, classify as research task
|
|
36
|
+
- Document research questions in plan with classification (simple/complex)
|
|
37
|
+
- Simple research: Agent tools (Grep, Read, WebSearch, Context7, Supabase docs)
|
|
38
|
+
- Complex research: Create prompt → deepresearch → incorporate
|
|
39
|
+
|
|
40
|
+
1. **Extract unknowns from Technical Context** above:
|
|
41
|
+
- For each NEEDS CLARIFICATION → research task
|
|
42
|
+
- For each dependency → best practices task
|
|
43
|
+
- For each integration → patterns task
|
|
44
|
+
|
|
45
|
+
2. **Generate and dispatch research agents**:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
For each unknown in Technical Context:
|
|
49
|
+
Task: "Research {unknown} for {feature context}"
|
|
50
|
+
For each technology choice:
|
|
51
|
+
Task: "Find best practices for {tech} in {domain}"
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
3. **Consolidate findings** in `research.md` using format:
|
|
55
|
+
- Decision: [what was chosen]
|
|
56
|
+
- Rationale: [why chosen]
|
|
57
|
+
- Alternatives considered: [what else evaluated]
|
|
58
|
+
|
|
59
|
+
**Output**: research.md with all NEEDS CLARIFICATION resolved
|
|
60
|
+
|
|
61
|
+
### Phase 1: Design & Contracts
|
|
62
|
+
|
|
63
|
+
**Prerequisites:** `research.md` complete
|
|
64
|
+
|
|
65
|
+
1. **Extract entities from feature spec** → `data-model.md`:
|
|
66
|
+
- Entity name, fields, relationships
|
|
67
|
+
- Validation rules from requirements
|
|
68
|
+
- State transitions if applicable
|
|
69
|
+
|
|
70
|
+
2. **Generate API contracts** from functional requirements:
|
|
71
|
+
- For each user action → endpoint
|
|
72
|
+
- Use standard REST/GraphQL patterns
|
|
73
|
+
- Output OpenAPI/GraphQL schema to `/contracts/`
|
|
74
|
+
|
|
75
|
+
3. **Agent context update**:
|
|
76
|
+
- Run `.specify/scripts/bash/update-agent-context.sh claude`
|
|
77
|
+
- These scripts detect which AI agent is in use
|
|
78
|
+
- Update the appropriate agent-specific context file
|
|
79
|
+
- Add only new technology from current plan
|
|
80
|
+
- Preserve manual additions between markers
|
|
81
|
+
|
|
82
|
+
**Output**: data-model.md, /contracts/*, quickstart.md, agent-specific file
|
|
83
|
+
|
|
84
|
+
## Key rules
|
|
85
|
+
|
|
86
|
+
- Use absolute paths
|
|
87
|
+
- ERROR on gate failures or unresolved clarifications
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create or update the feature specification from a natural language feature description.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## User Input
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
$ARGUMENTS
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
You **MUST** consider the user input before proceeding (if not empty).
|
|
12
|
+
|
|
13
|
+
## Outline
|
|
14
|
+
|
|
15
|
+
The text the user typed after `/speckit.specify` in the triggering message **is** the feature description. Assume you always have it available in this conversation even if `$ARGUMENTS` appears literally below. Do not ask the user to repeat it unless they provided an empty command.
|
|
16
|
+
|
|
17
|
+
Given that feature description, do this:
|
|
18
|
+
|
|
19
|
+
1. **Generate a concise short name** (2-4 words) for the branch:
|
|
20
|
+
- Analyze the feature description and extract the most meaningful keywords
|
|
21
|
+
- Create a 2-4 word short name that captures the essence of the feature
|
|
22
|
+
- Use action-noun format when possible (e.g., "add-user-auth", "fix-payment-bug")
|
|
23
|
+
- Preserve technical terms and acronyms (OAuth2, API, JWT, etc.)
|
|
24
|
+
- Keep it concise but descriptive enough to understand the feature at a glance
|
|
25
|
+
- Examples:
|
|
26
|
+
- "I want to add user authentication" → "user-auth"
|
|
27
|
+
- "Implement OAuth2 integration for the API" → "oauth2-api-integration"
|
|
28
|
+
- "Create a dashboard for analytics" → "analytics-dashboard"
|
|
29
|
+
- "Fix payment processing timeout bug" → "fix-payment-timeout"
|
|
30
|
+
|
|
31
|
+
2. **Check for existing branches before creating new one**:
|
|
32
|
+
|
|
33
|
+
a. First, fetch all remote branches to ensure we have the latest information:
|
|
34
|
+
```bash
|
|
35
|
+
git fetch --all --prune
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
b. Find the highest feature number across all sources for the short-name:
|
|
39
|
+
- Remote branches: `git ls-remote --heads origin | grep -E 'refs/heads/[0-9]+-<short-name>$'`
|
|
40
|
+
- Local branches: `git branch | grep -E '^[* ]*[0-9]+-<short-name>$'`
|
|
41
|
+
- Specs directories: Check for directories matching `specs/[0-9]+-<short-name>`
|
|
42
|
+
|
|
43
|
+
c. Determine the next available number:
|
|
44
|
+
- Extract all numbers from all three sources
|
|
45
|
+
- Find the highest number N
|
|
46
|
+
- Use N+1 for the new branch number
|
|
47
|
+
|
|
48
|
+
d. Run the script `.specify/scripts/bash/create-new-feature.sh --json "$ARGUMENTS"` with the calculated number and short-name:
|
|
49
|
+
- Pass `--number N+1` and `--short-name "your-short-name"` along with the feature description
|
|
50
|
+
- Bash example: `.specify/scripts/bash/create-new-feature.sh --json "$ARGUMENTS" --json --number 5 --short-name "user-auth" "Add user authentication"`
|
|
51
|
+
- PowerShell example: `.specify/scripts/bash/create-new-feature.sh --json "$ARGUMENTS" -Json -Number 5 -ShortName "user-auth" "Add user authentication"`
|
|
52
|
+
|
|
53
|
+
**IMPORTANT**:
|
|
54
|
+
- Check all three sources (remote branches, local branches, specs directories) to find the highest number
|
|
55
|
+
- Only match branches/directories with the exact short-name pattern
|
|
56
|
+
- If no existing branches/directories found with this short-name, start with number 1
|
|
57
|
+
- You must only ever run this script once per feature
|
|
58
|
+
- The JSON is provided in the terminal as output - always refer to it to get the actual content you're looking for
|
|
59
|
+
- The JSON output will contain BRANCH_NAME and SPEC_FILE paths
|
|
60
|
+
- For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot")
|
|
61
|
+
|
|
62
|
+
3. Load `.specify/templates/spec-template.md` to understand required sections.
|
|
63
|
+
|
|
64
|
+
4. Follow this execution flow:
|
|
65
|
+
|
|
66
|
+
1. Parse user description from Input
|
|
67
|
+
If empty: ERROR "No feature description provided"
|
|
68
|
+
2. Extract key concepts from description
|
|
69
|
+
Identify: actors, actions, data, constraints
|
|
70
|
+
3. For unclear aspects:
|
|
71
|
+
- Make informed guesses based on context and industry standards
|
|
72
|
+
- Only mark with [NEEDS CLARIFICATION: specific question] if:
|
|
73
|
+
- The choice significantly impacts feature scope or user experience
|
|
74
|
+
- Multiple reasonable interpretations exist with different implications
|
|
75
|
+
- No reasonable default exists
|
|
76
|
+
- **LIMIT: Maximum 3 [NEEDS CLARIFICATION] markers total**
|
|
77
|
+
- Prioritize clarifications by impact: scope > security/privacy > user experience > technical details
|
|
78
|
+
- **Note**: If clarifications reveal complex unknowns, flag for research phase
|
|
79
|
+
4. Fill User Scenarios & Testing section
|
|
80
|
+
If no clear user flow: ERROR "Cannot determine user scenarios"
|
|
81
|
+
5. Generate Functional Requirements
|
|
82
|
+
Each requirement must be testable
|
|
83
|
+
Use reasonable defaults for unspecified details (document assumptions in Assumptions section)
|
|
84
|
+
6. Define Success Criteria
|
|
85
|
+
Create measurable, technology-agnostic outcomes
|
|
86
|
+
Include both quantitative metrics (time, performance, volume) and qualitative measures (user satisfaction, task completion)
|
|
87
|
+
Each criterion must be verifiable without implementation details
|
|
88
|
+
7. Identify Key Entities (if data involved)
|
|
89
|
+
8. Return: SUCCESS (spec ready for planning)
|
|
90
|
+
|
|
91
|
+
5. Write the specification to SPEC_FILE using the template structure, replacing placeholders with concrete details derived from the feature description (arguments) while preserving section order and headings.
|
|
92
|
+
|
|
93
|
+
6. **Specification Quality Validation**: After writing the initial spec, validate it against quality criteria:
|
|
94
|
+
|
|
95
|
+
a. **Create Spec Quality Checklist**: Generate a checklist file at `FEATURE_DIR/checklists/requirements.md` using the checklist template structure with these validation items:
|
|
96
|
+
|
|
97
|
+
```markdown
|
|
98
|
+
# Specification Quality Checklist: [FEATURE NAME]
|
|
99
|
+
|
|
100
|
+
**Purpose**: Validate specification completeness and quality before proceeding to planning
|
|
101
|
+
**Created**: [DATE]
|
|
102
|
+
**Feature**: [Link to spec.md]
|
|
103
|
+
|
|
104
|
+
## Content Quality
|
|
105
|
+
|
|
106
|
+
- [ ] No implementation details (languages, frameworks, APIs)
|
|
107
|
+
- [ ] Focused on user value and business needs
|
|
108
|
+
- [ ] Written for non-technical stakeholders
|
|
109
|
+
- [ ] All mandatory sections completed
|
|
110
|
+
|
|
111
|
+
## Requirement Completeness
|
|
112
|
+
|
|
113
|
+
- [ ] No [NEEDS CLARIFICATION] markers remain
|
|
114
|
+
- [ ] Requirements are testable and unambiguous
|
|
115
|
+
- [ ] Success criteria are measurable
|
|
116
|
+
- [ ] Success criteria are technology-agnostic (no implementation details)
|
|
117
|
+
- [ ] All acceptance scenarios are defined
|
|
118
|
+
- [ ] Edge cases are identified
|
|
119
|
+
- [ ] Scope is clearly bounded
|
|
120
|
+
- [ ] Dependencies and assumptions identified
|
|
121
|
+
|
|
122
|
+
## Feature Readiness
|
|
123
|
+
|
|
124
|
+
- [ ] All functional requirements have clear acceptance criteria
|
|
125
|
+
- [ ] User scenarios cover primary flows
|
|
126
|
+
- [ ] Feature meets measurable outcomes defined in Success Criteria
|
|
127
|
+
- [ ] No implementation details leak into specification
|
|
128
|
+
|
|
129
|
+
## Notes
|
|
130
|
+
|
|
131
|
+
- Items marked incomplete require spec updates before `/speckit.clarify` or `/speckit.plan`
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
b. **Run Validation Check**: Review the spec against each checklist item:
|
|
135
|
+
- For each item, determine if it passes or fails
|
|
136
|
+
- Document specific issues found (quote relevant spec sections)
|
|
137
|
+
|
|
138
|
+
c. **Handle Validation Results**:
|
|
139
|
+
|
|
140
|
+
- **If all items pass**: Mark checklist complete and proceed to step 6
|
|
141
|
+
|
|
142
|
+
- **If items fail (excluding [NEEDS CLARIFICATION])**:
|
|
143
|
+
1. List the failing items and specific issues
|
|
144
|
+
2. Update the spec to address each issue
|
|
145
|
+
3. Re-run validation until all items pass (max 3 iterations)
|
|
146
|
+
4. If still failing after 3 iterations, document remaining issues in checklist notes and warn user
|
|
147
|
+
|
|
148
|
+
- **If [NEEDS CLARIFICATION] markers remain**:
|
|
149
|
+
1. Extract all [NEEDS CLARIFICATION: ...] markers from the spec
|
|
150
|
+
2. **LIMIT CHECK**: If more than 3 markers exist, keep only the 3 most critical (by scope/security/UX impact) and make informed guesses for the rest
|
|
151
|
+
3. For each clarification needed (max 3), present options to user in this format:
|
|
152
|
+
|
|
153
|
+
```markdown
|
|
154
|
+
## Question [N]: [Topic]
|
|
155
|
+
|
|
156
|
+
**Context**: [Quote relevant spec section]
|
|
157
|
+
|
|
158
|
+
**What we need to know**: [Specific question from NEEDS CLARIFICATION marker]
|
|
159
|
+
|
|
160
|
+
**Suggested Answers**:
|
|
161
|
+
|
|
162
|
+
| Option | Answer | Implications |
|
|
163
|
+
|--------|--------|--------------|
|
|
164
|
+
| A | [First suggested answer] | [What this means for the feature] |
|
|
165
|
+
| B | [Second suggested answer] | [What this means for the feature] |
|
|
166
|
+
| C | [Third suggested answer] | [What this means for the feature] |
|
|
167
|
+
| Custom | Provide your own answer | [Explain how to provide custom input] |
|
|
168
|
+
|
|
169
|
+
**Your choice**: _[Wait for user response]_
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
4. **CRITICAL - Table Formatting**: Ensure markdown tables are properly formatted:
|
|
173
|
+
- Use consistent spacing with pipes aligned
|
|
174
|
+
- Each cell should have spaces around content: `| Content |` not `|Content|`
|
|
175
|
+
- Header separator must have at least 3 dashes: `|--------|`
|
|
176
|
+
- Test that the table renders correctly in markdown preview
|
|
177
|
+
5. Number questions sequentially (Q1, Q2, Q3 - max 3 total)
|
|
178
|
+
6. Present all questions together before waiting for responses
|
|
179
|
+
7. Wait for user to respond with their choices for all questions (e.g., "Q1: A, Q2: Custom - [details], Q3: B")
|
|
180
|
+
8. Update the spec by replacing each [NEEDS CLARIFICATION] marker with the user's selected or provided answer
|
|
181
|
+
9. Re-run validation after all clarifications are resolved
|
|
182
|
+
|
|
183
|
+
d. **Update Checklist**: After each validation iteration, update the checklist file with current pass/fail status
|
|
184
|
+
|
|
185
|
+
7. Report completion with branch name, spec file path, checklist results, and readiness for the next phase (`/speckit.clarify` or `/speckit.plan`).
|
|
186
|
+
|
|
187
|
+
**NOTE:** The script creates and checks out the new branch and initializes the spec file before writing.
|
|
188
|
+
|
|
189
|
+
## General Guidelines
|
|
190
|
+
|
|
191
|
+
## Quick Guidelines
|
|
192
|
+
|
|
193
|
+
- Focus on **WHAT** users need and **WHY**.
|
|
194
|
+
- Avoid HOW to implement (no tech stack, APIs, code structure).
|
|
195
|
+
- Written for business stakeholders, not developers.
|
|
196
|
+
- DO NOT create any checklists that are embedded in the spec. That will be a separate command.
|
|
197
|
+
|
|
198
|
+
### Section Requirements
|
|
199
|
+
|
|
200
|
+
- **Mandatory sections**: Must be completed for every feature
|
|
201
|
+
- **Optional sections**: Include only when relevant to the feature
|
|
202
|
+
- When a section doesn't apply, remove it entirely (don't leave as "N/A")
|
|
203
|
+
|
|
204
|
+
### For AI Generation
|
|
205
|
+
|
|
206
|
+
When creating this spec from a user prompt:
|
|
207
|
+
|
|
208
|
+
1. **Make informed guesses**: Use context, industry standards, and common patterns to fill gaps
|
|
209
|
+
2. **Document assumptions**: Record reasonable defaults in the Assumptions section
|
|
210
|
+
3. **Limit clarifications**: Maximum 3 [NEEDS CLARIFICATION] markers - use only for critical decisions that:
|
|
211
|
+
- Significantly impact feature scope or user experience
|
|
212
|
+
- Have multiple reasonable interpretations with different implications
|
|
213
|
+
- Lack any reasonable default
|
|
214
|
+
4. **Prioritize clarifications**: scope > security/privacy > user experience > technical details
|
|
215
|
+
5. **Think like a tester**: Every vague requirement should fail the "testable and unambiguous" checklist item
|
|
216
|
+
6. **Common areas needing clarification** (only if no reasonable default exists):
|
|
217
|
+
- Feature scope and boundaries (include/exclude specific use cases)
|
|
218
|
+
- User types and permissions (if multiple conflicting interpretations possible)
|
|
219
|
+
- Security/compliance requirements (when legally/financially significant)
|
|
220
|
+
|
|
221
|
+
**Examples of reasonable defaults** (don't ask about these):
|
|
222
|
+
|
|
223
|
+
- Data retention: Industry-standard practices for the domain
|
|
224
|
+
- Performance targets: Standard web/mobile app expectations unless specified
|
|
225
|
+
- Error handling: User-friendly messages with appropriate fallbacks
|
|
226
|
+
- Authentication method: Standard session-based or OAuth2 for web apps
|
|
227
|
+
- Integration patterns: RESTful APIs unless specified otherwise
|
|
228
|
+
|
|
229
|
+
### Success Criteria Guidelines
|
|
230
|
+
|
|
231
|
+
Success criteria must be:
|
|
232
|
+
|
|
233
|
+
1. **Measurable**: Include specific metrics (time, percentage, count, rate)
|
|
234
|
+
2. **Technology-agnostic**: No mention of frameworks, languages, databases, or tools
|
|
235
|
+
3. **User-focused**: Describe outcomes from user/business perspective, not system internals
|
|
236
|
+
4. **Verifiable**: Can be tested/validated without knowing implementation details
|
|
237
|
+
|
|
238
|
+
**Good examples**:
|
|
239
|
+
|
|
240
|
+
- "Users can complete checkout in under 3 minutes"
|
|
241
|
+
- "System supports 10,000 concurrent users"
|
|
242
|
+
- "95% of searches return results in under 1 second"
|
|
243
|
+
- "Task completion rate improves by 40%"
|
|
244
|
+
|
|
245
|
+
**Bad examples** (implementation-focused):
|
|
246
|
+
|
|
247
|
+
- "API response time is under 200ms" (too technical, use "Users see results instantly")
|
|
248
|
+
- "Database can handle 1000 TPS" (implementation detail, use user-facing metric)
|
|
249
|
+
- "React components render efficiently" (framework-specific)
|
|
250
|
+
- "Redis cache hit rate above 80%" (technology-specific)
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Generate an actionable, dependency-ordered tasks.md for the feature based on available design artifacts.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## User Input
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
$ARGUMENTS
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
You **MUST** consider the user input before proceeding (if not empty).
|
|
12
|
+
|
|
13
|
+
## Outline
|
|
14
|
+
|
|
15
|
+
1. **Setup**: Run `.specify/scripts/bash/check-prerequisites.sh --json` from repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute. For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").
|
|
16
|
+
|
|
17
|
+
2. **Load design documents**: Read from FEATURE_DIR:
|
|
18
|
+
- **Required**: plan.md (tech stack, libraries, structure), spec.md (user stories with priorities)
|
|
19
|
+
- **Optional**: data-model.md (entities), contracts/ (API endpoints), research.md (decisions), quickstart.md (test scenarios)
|
|
20
|
+
- Note: Not all projects have all documents. Generate tasks based on what's available.
|
|
21
|
+
|
|
22
|
+
3. **Execute task generation workflow**:
|
|
23
|
+
- Load plan.md and extract tech stack, libraries, project structure
|
|
24
|
+
- Load spec.md and extract user stories with their priorities (P1, P2, P3, etc.)
|
|
25
|
+
- If data-model.md exists: Extract entities and map to user stories
|
|
26
|
+
- If contracts/ exists: Map endpoints to user stories
|
|
27
|
+
- If research.md exists: Extract decisions for setup tasks
|
|
28
|
+
- Generate tasks organized by user story (see Task Generation Rules below)
|
|
29
|
+
- Generate dependency graph showing user story completion order
|
|
30
|
+
- Create parallel execution examples per user story
|
|
31
|
+
- Validate task completeness (each user story has all needed tasks, independently testable)
|
|
32
|
+
|
|
33
|
+
4. **Generate tasks.md**: Use `.specify.specify/templates/tasks-template.md` as structure, fill with:
|
|
34
|
+
- Correct feature name from plan.md
|
|
35
|
+
- Phase 1: Setup tasks (project initialization)
|
|
36
|
+
- Phase 2: Foundational tasks (blocking prerequisites for all user stories)
|
|
37
|
+
- Phase 3+: One phase per user story (in priority order from spec.md)
|
|
38
|
+
- Each phase includes: story goal, independent test criteria, tests (if requested), implementation tasks
|
|
39
|
+
- Final Phase: Polish & cross-cutting concerns
|
|
40
|
+
- All tasks must follow the strict checklist format (see Task Generation Rules below)
|
|
41
|
+
- Clear file paths for each task
|
|
42
|
+
- Dependencies section showing story completion order
|
|
43
|
+
- Parallel execution examples per story
|
|
44
|
+
- Implementation strategy section (MVP first, incremental delivery)
|
|
45
|
+
|
|
46
|
+
5. **Report**: Output path to generated tasks.md and summary:
|
|
47
|
+
- Total task count
|
|
48
|
+
- Task count per user story
|
|
49
|
+
- Parallel opportunities identified
|
|
50
|
+
- Independent test criteria for each story
|
|
51
|
+
- Suggested MVP scope (typically just User Story 1)
|
|
52
|
+
- Format validation: Confirm ALL tasks follow the checklist format (checkbox, ID, labels, file paths)
|
|
53
|
+
|
|
54
|
+
Context for task generation: $ARGUMENTS
|
|
55
|
+
|
|
56
|
+
The tasks.md should be immediately executable - each task must be specific enough that an LLM can complete it without additional context.
|
|
57
|
+
|
|
58
|
+
**Research Tasks**: Questions without obvious answers
|
|
59
|
+
- **Simple**: Agent solves with available tools (Grep, Read, WebSearch, Context7, Supabase docs)
|
|
60
|
+
- **Complex**: Create research prompt in research/ → wait for deepresearch → incorporate
|
|
61
|
+
|
|
62
|
+
**Planning Phase**: After generating tasks, Phase 0: Planning will be added automatically by the template. This phase includes:
|
|
63
|
+
- **P001**: Executor assignment (MAIN for trivial only, existing if 100% match, FUTURE otherwise)
|
|
64
|
+
- **P002**: Research resolution (simple vs complex)
|
|
65
|
+
- **P003**: FUTURE agent creation via meta-agent-v3 in single message, then ask restart
|
|
66
|
+
|
|
67
|
+
## Task Generation Rules
|
|
68
|
+
|
|
69
|
+
**CRITICAL**: Tasks MUST be organized by user story to enable independent implementation and testing.
|
|
70
|
+
|
|
71
|
+
**Tests are OPTIONAL**: Only generate test tasks if explicitly requested in the feature specification or if user requests TDD approach.
|
|
72
|
+
|
|
73
|
+
### Checklist Format (REQUIRED)
|
|
74
|
+
|
|
75
|
+
Every task MUST strictly follow this format:
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
- [ ] [TaskID] [P?] [Story?] Description with file path
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Format Components**:
|
|
82
|
+
|
|
83
|
+
1. **Checkbox**: ALWAYS start with `- [ ]` (markdown checkbox)
|
|
84
|
+
2. **Task ID**: Sequential number (T001, T002, T003...) in execution order
|
|
85
|
+
3. **[P] marker**: Include ONLY if task is parallelizable (different files, no dependencies on incomplete tasks)
|
|
86
|
+
4. **[Story] label**: REQUIRED for user story phase tasks only
|
|
87
|
+
- Format: [US1], [US2], [US3], etc. (maps to user stories from spec.md)
|
|
88
|
+
- Setup phase: NO story label
|
|
89
|
+
- Foundational phase: NO story label
|
|
90
|
+
- User Story phases: MUST have story label
|
|
91
|
+
- Polish phase: NO story label
|
|
92
|
+
5. **Description**: Clear action with exact file path
|
|
93
|
+
|
|
94
|
+
**Examples**:
|
|
95
|
+
|
|
96
|
+
- ✅ CORRECT: `- [ ] T001 Create project structure per implementation plan`
|
|
97
|
+
- ✅ CORRECT: `- [ ] T005 [P] Implement authentication middleware in src/middleware/auth.py`
|
|
98
|
+
- ✅ CORRECT: `- [ ] T012 [P] [US1] Create User model in src/models/user.py`
|
|
99
|
+
- ✅ CORRECT: `- [ ] T014 [US1] Implement UserService in src/services/user_service.py`
|
|
100
|
+
- ❌ WRONG: `- [ ] Create User model` (missing ID and Story label)
|
|
101
|
+
- ❌ WRONG: `T001 [US1] Create model` (missing checkbox)
|
|
102
|
+
- ❌ WRONG: `- [ ] [US1] Create User model` (missing Task ID)
|
|
103
|
+
- ❌ WRONG: `- [ ] T001 [US1] Create model` (missing file path)
|
|
104
|
+
|
|
105
|
+
### Task Organization
|
|
106
|
+
|
|
107
|
+
1. **From User Stories (spec.md)** - PRIMARY ORGANIZATION:
|
|
108
|
+
- Each user story (P1, P2, P3...) gets its own phase
|
|
109
|
+
- Map all related components to their story:
|
|
110
|
+
- Models needed for that story
|
|
111
|
+
- Services needed for that story
|
|
112
|
+
- Endpoints/UI needed for that story
|
|
113
|
+
- If tests requested: Tests specific to that story
|
|
114
|
+
- Mark story dependencies (most stories should be independent)
|
|
115
|
+
|
|
116
|
+
2. **From Contracts**:
|
|
117
|
+
- Map each contract/endpoint → to the user story it serves
|
|
118
|
+
- If tests requested: Each contract → contract test task [P] before implementation in that story's phase
|
|
119
|
+
|
|
120
|
+
3. **From Data Model**:
|
|
121
|
+
- Map each entity to the user story(ies) that need it
|
|
122
|
+
- If entity serves multiple stories: Put in earliest story or Setup phase
|
|
123
|
+
- Relationships → service layer tasks in appropriate story phase
|
|
124
|
+
|
|
125
|
+
4. **From Setup/Infrastructure**:
|
|
126
|
+
- Shared infrastructure → Setup phase (Phase 1)
|
|
127
|
+
- Foundational/blocking tasks → Foundational phase (Phase 2)
|
|
128
|
+
- Story-specific setup → within that story's phase
|
|
129
|
+
|
|
130
|
+
### Phase Structure
|
|
131
|
+
|
|
132
|
+
- **Phase 1**: Setup (project initialization)
|
|
133
|
+
- **Phase 2**: Foundational (blocking prerequisites - MUST complete before user stories)
|
|
134
|
+
- **Phase 3+**: User Stories in priority order (P1, P2, P3...)
|
|
135
|
+
- Within each story: Tests (if requested) → Models → Services → Endpoints → Integration
|
|
136
|
+
- Each phase should be a complete, independently testable increment
|
|
137
|
+
- **Final Phase**: Polish & Cross-Cutting Concerns
|