cc-devflow 1.0.1

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.
Files changed (277) hide show
  1. package/.claude/CLAUDE.md +83 -0
  2. package/.claude/agents/architecture-designer.md +443 -0
  3. package/.claude/agents/bug-analyzer.md +382 -0
  4. package/.claude/agents/checklist-agent.md +175 -0
  5. package/.claude/agents/clarify-analyst.md +50 -0
  6. package/.claude/agents/code-reviewer.md +71 -0
  7. package/.claude/agents/codex-analyzer.md +39 -0
  8. package/.claude/agents/compatibility-checker.md +580 -0
  9. package/.claude/agents/consistency-checker.md +532 -0
  10. package/.claude/agents/impact-analyzer.md +441 -0
  11. package/.claude/agents/planner.md +230 -0
  12. package/.claude/agents/prd-writer.md +320 -0
  13. package/.claude/agents/project-guidelines-generator.md +1329 -0
  14. package/.claude/agents/qa-tester.md +313 -0
  15. package/.claude/agents/release-manager.md +295 -0
  16. package/.claude/agents/security-reviewer.md +314 -0
  17. package/.claude/agents/style-guide-generator.md +458 -0
  18. package/.claude/agents/tech-architect.md +516 -0
  19. package/.claude/agents/ui-designer.md +485 -0
  20. package/.claude/commands/code-review-high.md +58 -0
  21. package/.claude/commands/core-architecture.md +429 -0
  22. package/.claude/commands/core-guidelines.md +486 -0
  23. package/.claude/commands/core-roadmap.md +439 -0
  24. package/.claude/commands/core-style.md +293 -0
  25. package/.claude/commands/flow-archive.md +245 -0
  26. package/.claude/commands/flow-checklist.md +260 -0
  27. package/.claude/commands/flow-clarify.md +136 -0
  28. package/.claude/commands/flow-constitution.md +82 -0
  29. package/.claude/commands/flow-dev.md +134 -0
  30. package/.claude/commands/flow-epic.md +150 -0
  31. package/.claude/commands/flow-fix.md +104 -0
  32. package/.claude/commands/flow-ideate.md +214 -0
  33. package/.claude/commands/flow-init.md +313 -0
  34. package/.claude/commands/flow-new.md +394 -0
  35. package/.claude/commands/flow-prd.md +131 -0
  36. package/.claude/commands/flow-qa.md +93 -0
  37. package/.claude/commands/flow-release.md +92 -0
  38. package/.claude/commands/flow-restart.md +98 -0
  39. package/.claude/commands/flow-status.md +64 -0
  40. package/.claude/commands/flow-tech.md +142 -0
  41. package/.claude/commands/flow-ui.md +189 -0
  42. package/.claude/commands/flow-update.md +111 -0
  43. package/.claude/commands/flow-upgrade.md +115 -0
  44. package/.claude/commands/flow-verify.md +96 -0
  45. package/.claude/commands/problem-analyzer.md +60 -0
  46. package/.claude/config/quality-rules.yml +161 -0
  47. package/.claude/docs/SPEC_KIT_CONSTITUTION_ANALYSIS.md +426 -0
  48. package/.claude/docs/design/consistency-conflict-detection-algorithms.md +658 -0
  49. package/.claude/docs/design/intent-driven-input-design.md +380 -0
  50. package/.claude/docs/design/prd-version-management-design.md +437 -0
  51. package/.claude/docs/guides/INIT_TROUBLESHOOTING.md +117 -0
  52. package/.claude/docs/guides/NEW_TROUBLESHOOTING.md +151 -0
  53. package/.claude/docs/guides/ROADMAP_TROUBLESHOOTING.md +188 -0
  54. package/.claude/docs/guides/TASK_COMPLETION_MARKING.md +338 -0
  55. package/.claude/docs/templates/ARCHITECTURE_TEMPLATE.md +633 -0
  56. package/.claude/docs/templates/BACKLOG_TEMPLATE.md +261 -0
  57. package/.claude/docs/templates/CHECKLIST_TEMPLATE.md +52 -0
  58. package/.claude/docs/templates/CLARIFICATION_REPORT_TEMPLATE.md +206 -0
  59. package/.claude/docs/templates/CODE_REVIEW_TEMPLATE.md +71 -0
  60. package/.claude/docs/templates/EPIC_TEMPLATE.md +805 -0
  61. package/.claude/docs/templates/INIT_FLOW_TEMPLATE.md +213 -0
  62. package/.claude/docs/templates/INTENT_CLARIFICATION_TEMPLATE.md +57 -0
  63. package/.claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md +148 -0
  64. package/.claude/docs/templates/PRD_TEMPLATE.md +562 -0
  65. package/.claude/docs/templates/RESEARCH_TEMPLATE.md +276 -0
  66. package/.claude/docs/templates/REVIEW-HIGH.md +57 -0
  67. package/.claude/docs/templates/ROADMAP_DIALOGUE_TEMPLATE.md +198 -0
  68. package/.claude/docs/templates/ROADMAP_TEMPLATE.md +310 -0
  69. package/.claude/docs/templates/STYLE_TEMPLATE.md +1266 -0
  70. package/.claude/docs/templates/TASKS_TEMPLATE.md +523 -0
  71. package/.claude/docs/templates/TECH_DESIGN_TEMPLATE.md +1019 -0
  72. package/.claude/docs/templates/UI_PROTOTYPE_TEMPLATE.md +1436 -0
  73. package/.claude/guides/agent-guides/agent-coordination-guide.md +459 -0
  74. package/.claude/guides/project-guidelines-system.md +463 -0
  75. package/.claude/guides/technical-guides/datetime-handling-guide.md +563 -0
  76. package/.claude/guides/technical-guides/git-github-guide.md +642 -0
  77. package/.claude/guides/technical-guides/test-execution-guide.md +618 -0
  78. package/.claude/guides/workflow-guides/bug-fix-orchestrator.md +217 -0
  79. package/.claude/guides/workflow-guides/flow-orchestrator.md +282 -0
  80. package/.claude/hooks/checklist-gate.js +397 -0
  81. package/.claude/hooks/error-handling-reminder.sh +12 -0
  82. package/.claude/hooks/error-handling-reminder.ts +459 -0
  83. package/.claude/hooks/post-tool-use-tracker.sh +280 -0
  84. package/.claude/hooks/pre-tool-use-guardrail.sh +36 -0
  85. package/.claude/hooks/pre-tool-use-guardrail.ts +342 -0
  86. package/.claude/hooks/skill-activation-prompt.sh +36 -0
  87. package/.claude/hooks/skill-activation-prompt.ts +214 -0
  88. package/.claude/hooks/state/skills-used-test-guard.json +3 -0
  89. package/.claude/rules/devflow-conventions.md +305 -0
  90. package/.claude/rules/project-constitution.md +748 -0
  91. package/.claude/schemas/constitution.schema.json +43 -0
  92. package/.claude/scripts/analyze-upgrade-impact.sh +200 -0
  93. package/.claude/scripts/archive-requirement.sh +351 -0
  94. package/.claude/scripts/calculate-checklist-completion.sh +243 -0
  95. package/.claude/scripts/calculate-quarter.sh +206 -0
  96. package/.claude/scripts/check-dependencies.sh +409 -0
  97. package/.claude/scripts/check-prerequisites.sh +232 -0
  98. package/.claude/scripts/check-task-status.sh +264 -0
  99. package/.claude/scripts/checklist-errors.sh +131 -0
  100. package/.claude/scripts/common.sh +570 -0
  101. package/.claude/scripts/consolidate-research.sh +182 -0
  102. package/.claude/scripts/create-requirement.sh +426 -0
  103. package/.claude/scripts/export-contracts.sh +117 -0
  104. package/.claude/scripts/extract-data-model.sh +78 -0
  105. package/.claude/scripts/generate-clarification-questions.sh +377 -0
  106. package/.claude/scripts/generate-clarification-report.sh +463 -0
  107. package/.claude/scripts/generate-quickstart.sh +146 -0
  108. package/.claude/scripts/generate-research-tasks.sh +157 -0
  109. package/.claude/scripts/generate-status-report.sh +523 -0
  110. package/.claude/scripts/generate-tech-analysis.sh +46 -0
  111. package/.claude/scripts/locate-requirement-in-roadmap.sh +233 -0
  112. package/.claude/scripts/manage-constitution.sh +602 -0
  113. package/.claude/scripts/mark-task-complete.sh +198 -0
  114. package/.claude/scripts/populate-research-tasks.sh +259 -0
  115. package/.claude/scripts/recover-workflow.sh +460 -0
  116. package/.claude/scripts/run-clarify-scan.sh +601 -0
  117. package/.claude/scripts/run-high-review.sh +62 -0
  118. package/.claude/scripts/run-problem-analysis.sh +68 -0
  119. package/.claude/scripts/setup-epic.sh +173 -0
  120. package/.claude/scripts/sync-roadmap-progress.sh +300 -0
  121. package/.claude/scripts/sync-task-marks.sh +199 -0
  122. package/.claude/scripts/test-clarify-scan.sh +515 -0
  123. package/.claude/scripts/update-agent-context.sh +806 -0
  124. package/.claude/scripts/validate-constitution.sh +567 -0
  125. package/.claude/scripts/validate-hooks.sh +487 -0
  126. package/.claude/scripts/validate-research.sh +332 -0
  127. package/.claude/scripts/validate-scope-boundary.sh +493 -0
  128. package/.claude/scripts/verify-setup.sh +37 -0
  129. package/.claude/settings.json +76 -0
  130. package/.claude/skills/_reference-implementations/README.md +96 -0
  131. package/.claude/skills/_reference-implementations/backend-express-prisma/SKILL.md +302 -0
  132. package/.claude/skills/_reference-implementations/backend-express-prisma/resources/architecture-overview.md +451 -0
  133. package/.claude/skills/_reference-implementations/backend-express-prisma/resources/async-and-errors.md +307 -0
  134. package/.claude/skills/_reference-implementations/backend-express-prisma/resources/complete-examples.md +638 -0
  135. package/.claude/skills/_reference-implementations/backend-express-prisma/resources/configuration.md +275 -0
  136. package/.claude/skills/_reference-implementations/backend-express-prisma/resources/database-patterns.md +224 -0
  137. package/.claude/skills/_reference-implementations/backend-express-prisma/resources/middleware-guide.md +213 -0
  138. package/.claude/skills/_reference-implementations/backend-express-prisma/resources/routing-and-controllers.md +756 -0
  139. package/.claude/skills/_reference-implementations/backend-express-prisma/resources/sentry-and-monitoring.md +336 -0
  140. package/.claude/skills/_reference-implementations/backend-express-prisma/resources/services-and-repositories.md +789 -0
  141. package/.claude/skills/_reference-implementations/backend-express-prisma/resources/testing-guide.md +235 -0
  142. package/.claude/skills/_reference-implementations/backend-express-prisma/resources/validation-patterns.md +754 -0
  143. package/.claude/skills/_reference-implementations/frontend-react-mui/SKILL.md +399 -0
  144. package/.claude/skills/_reference-implementations/frontend-react-mui/resources/common-patterns.md +331 -0
  145. package/.claude/skills/_reference-implementations/frontend-react-mui/resources/complete-examples.md +872 -0
  146. package/.claude/skills/_reference-implementations/frontend-react-mui/resources/component-patterns.md +502 -0
  147. package/.claude/skills/_reference-implementations/frontend-react-mui/resources/data-fetching.md +767 -0
  148. package/.claude/skills/_reference-implementations/frontend-react-mui/resources/file-organization.md +502 -0
  149. package/.claude/skills/_reference-implementations/frontend-react-mui/resources/loading-and-error-states.md +501 -0
  150. package/.claude/skills/_reference-implementations/frontend-react-mui/resources/performance.md +406 -0
  151. package/.claude/skills/_reference-implementations/frontend-react-mui/resources/routing-guide.md +364 -0
  152. package/.claude/skills/_reference-implementations/frontend-react-mui/resources/styling-guide.md +428 -0
  153. package/.claude/skills/_reference-implementations/frontend-react-mui/resources/typescript-standards.md +418 -0
  154. package/.claude/skills/cc-devflow-orchestrator/SKILL.md +229 -0
  155. package/.claude/skills/constitution-guardian/SKILL.md +306 -0
  156. package/.claude/skills/devflow-constitution-quick-ref/SKILL.md +374 -0
  157. package/.claude/skills/devflow-file-standards/SKILL.md +353 -0
  158. package/.claude/skills/devflow-tdd-enforcer/SKILL.md +192 -0
  159. package/.claude/skills/skill-developer/ADVANCED.md +197 -0
  160. package/.claude/skills/skill-developer/HOOK_MECHANISMS.md +306 -0
  161. package/.claude/skills/skill-developer/PATTERNS_LIBRARY.md +152 -0
  162. package/.claude/skills/skill-developer/SKILL.md +426 -0
  163. package/.claude/skills/skill-developer/SKILL_RULES_REFERENCE.md +315 -0
  164. package/.claude/skills/skill-developer/TRIGGER_TYPES.md +305 -0
  165. package/.claude/skills/skill-developer/TROUBLESHOOTING.md +514 -0
  166. package/.claude/skills/skill-rules.json +213 -0
  167. package/.claude/tests/README.md +300 -0
  168. package/.claude/tests/TODO.md +69 -0
  169. package/.claude/tests/__pycache__/test_analyze_upgrade_impact.cpython-311-pytest-7.2.2.pyc +0 -0
  170. package/.claude/tests/__pycache__/test_consolidate_research.cpython-311-pytest-7.2.2.pyc +0 -0
  171. package/.claude/tests/__pycache__/test_export_contracts.cpython-311-pytest-7.2.2.pyc +0 -0
  172. package/.claude/tests/__pycache__/test_extract_data_model.cpython-311-pytest-7.2.2.pyc +0 -0
  173. package/.claude/tests/__pycache__/test_generate_quickstart.cpython-311-pytest-7.2.2.pyc +0 -0
  174. package/.claude/tests/__pycache__/test_generate_research_tasks.cpython-311-pytest-7.2.2.pyc +0 -0
  175. package/.claude/tests/constitution/run_all_constitution_tests.sh +111 -0
  176. package/.claude/tests/constitution/test_agent_assignment.sh +207 -0
  177. package/.claude/tests/constitution/test_article_coverage.sh +201 -0
  178. package/.claude/tests/constitution/test_template_completeness.sh +150 -0
  179. package/.claude/tests/constitution/test_version_consistency.sh +120 -0
  180. package/.claude/tests/fixtures/spec_delta_full.md +16 -0
  181. package/.claude/tests/fixtures/tasks_progress_sample.md +5 -0
  182. package/.claude/tests/run-all-tests.sh +229 -0
  183. package/.claude/tests/scripts/run.sh +30 -0
  184. package/.claude/tests/scripts/test-framework.sh +128 -0
  185. package/.claude/tests/scripts/test_check_prerequisites.sh +511 -0
  186. package/.claude/tests/scripts/test_check_prerequisites.sh.bak +504 -0
  187. package/.claude/tests/scripts/test_check_prerequisites.sh.bak2 +505 -0
  188. package/.claude/tests/scripts/test_check_prerequisites.sh.bak3 +506 -0
  189. package/.claude/tests/scripts/test_check_prerequisites.sh.bak4 +507 -0
  190. package/.claude/tests/scripts/test_check_prerequisites.sh.bak5 +508 -0
  191. package/.claude/tests/scripts/test_check_task_status.sh +499 -0
  192. package/.claude/tests/scripts/test_common.sh +244 -0
  193. package/.claude/tests/scripts/test_generate_status_report.sh +71 -0
  194. package/.claude/tests/scripts/test_mark_task_complete.sh +441 -0
  195. package/.claude/tests/scripts/test_mark_task_complete.sh.backup +410 -0
  196. package/.claude/tests/scripts/test_recover_workflow.sh +304 -0
  197. package/.claude/tests/scripts/test_setup_epic.sh +437 -0
  198. package/.claude/tests/scripts/test_sync_task_marks.sh +196 -0
  199. package/.claude/tests/scripts/test_validate_constitution.sh +74 -0
  200. package/.claude/tests/scripts/test_validate_research.sh +462 -0
  201. package/.claude/tests/slugify.bats +82 -0
  202. package/.claude/tests/test-framework.sh +732 -0
  203. package/.claude/tests/test_analyze_upgrade_impact.py +34 -0
  204. package/.claude/tests/test_consolidate_research.py +48 -0
  205. package/.claude/tests/test_export_contracts.py +43 -0
  206. package/.claude/tests/test_extract_data_model.py +33 -0
  207. package/.claude/tests/test_generate_quickstart.py +50 -0
  208. package/.claude/tests/test_generate_research_tasks.py +52 -0
  209. package/.claude/tsc-cache/6e64f818-6398-49ca-8623-581a9af85c44/edited-files.log +1 -0
  210. package/.claude/tsc-cache/795ba6e3-b98a-423b-bab2-51aa62812569/affected-repos.txt +1 -0
  211. package/.claude/tsc-cache/795ba6e3-b98a-423b-bab2-51aa62812569/edited-files.log +1 -0
  212. package/.claude/tsc-cache/ae335694-be5a-4ba4-a1a0-b676c09a7906/affected-repos.txt +1 -0
  213. package/.claude/tsc-cache/ae335694-be5a-4ba4-a1a0-b676c09a7906/edited-files.log +1 -0
  214. package/CHANGELOG.md +507 -0
  215. package/LICENSE +21 -0
  216. package/README.md +534 -0
  217. package/README.zh-CN.md +530 -0
  218. package/bin/adapt.js +240 -0
  219. package/bin/cc-devflow-cli.js +185 -0
  220. package/bin/cc-devflow.js +78 -0
  221. package/config/adapters.yml +5 -0
  222. package/config/schema/adapters.schema.json +44 -0
  223. package/docs/CLAUDE.md +26 -0
  224. package/docs/commands/README.md +61 -0
  225. package/docs/commands/README.zh-CN.md +55 -0
  226. package/docs/commands/core-roadmap.md +106 -0
  227. package/docs/commands/core-roadmap.zh-CN.md +102 -0
  228. package/docs/commands/core-style.md +405 -0
  229. package/docs/commands/core-style.zh-CN.md +405 -0
  230. package/docs/commands/flow-init.md +134 -0
  231. package/docs/commands/flow-init.zh-CN.md +163 -0
  232. package/docs/commands/flow-new.md +274 -0
  233. package/docs/commands/flow-new.zh-CN.md +270 -0
  234. package/docs/guides/getting-started.md +204 -0
  235. package/docs/guides/getting-started.zh-CN.md +152 -0
  236. package/lib/adapters/adapter-interface.js +57 -0
  237. package/lib/adapters/claude-adapter.js +74 -0
  238. package/lib/adapters/codex-adapter.js +40 -0
  239. package/lib/adapters/config-validator.js +68 -0
  240. package/lib/adapters/logger.js +42 -0
  241. package/lib/adapters/registry.js +153 -0
  242. package/lib/compiler/CLAUDE.md +92 -0
  243. package/lib/compiler/__tests__/drift.test.js +215 -0
  244. package/lib/compiler/__tests__/errors.test.js +184 -0
  245. package/lib/compiler/__tests__/incremental.test.js +174 -0
  246. package/lib/compiler/__tests__/integration.test.js +174 -0
  247. package/lib/compiler/__tests__/manifest.test.js +233 -0
  248. package/lib/compiler/__tests__/parser.test.js +456 -0
  249. package/lib/compiler/__tests__/schemas.test.js +301 -0
  250. package/lib/compiler/__tests__/skills-registry.test.js +125 -0
  251. package/lib/compiler/__tests__/transformer.test.js +286 -0
  252. package/lib/compiler/emitters/antigravity-emitter.js +171 -0
  253. package/lib/compiler/emitters/base-emitter.js +73 -0
  254. package/lib/compiler/emitters/codex-emitter.js +52 -0
  255. package/lib/compiler/emitters/cursor-emitter.js +31 -0
  256. package/lib/compiler/emitters/index.js +50 -0
  257. package/lib/compiler/emitters/qwen-emitter.js +39 -0
  258. package/lib/compiler/errors.js +119 -0
  259. package/lib/compiler/index.js +256 -0
  260. package/lib/compiler/manifest.js +242 -0
  261. package/lib/compiler/parser.js +258 -0
  262. package/lib/compiler/platforms.js +113 -0
  263. package/lib/compiler/resource-copier.js +320 -0
  264. package/lib/compiler/rules-emitters/__tests__/antigravity-rules-emitter.test.js +191 -0
  265. package/lib/compiler/rules-emitters/__tests__/codex-rules-emitter.test.js +109 -0
  266. package/lib/compiler/rules-emitters/__tests__/cursor-rules-emitter.test.js +123 -0
  267. package/lib/compiler/rules-emitters/__tests__/qwen-rules-emitter.test.js +123 -0
  268. package/lib/compiler/rules-emitters/antigravity-rules-emitter.js +253 -0
  269. package/lib/compiler/rules-emitters/base-rules-emitter.js +83 -0
  270. package/lib/compiler/rules-emitters/codex-rules-emitter.js +116 -0
  271. package/lib/compiler/rules-emitters/cursor-rules-emitter.js +98 -0
  272. package/lib/compiler/rules-emitters/index.js +71 -0
  273. package/lib/compiler/rules-emitters/qwen-rules-emitter.js +70 -0
  274. package/lib/compiler/schemas.js +144 -0
  275. package/lib/compiler/skills-registry.js +225 -0
  276. package/lib/compiler/transformer.js +236 -0
  277. package/package.json +50 -0
@@ -0,0 +1,523 @@
1
+ # Tasks: {{REQ_ID}} - {{TITLE}}
2
+
3
+ **Input**: PRD.md, EPIC.md from `devflow/requirements/{{REQ_ID}}/`
4
+ **Prerequisites**: PRD.md (required), EPIC.md (required), research/ (optional)
5
+
6
+ ## Execution Flow (任务生成主流程)
7
+ ```
8
+ 1. Load PRD.md and EPIC.md from requirement directory
9
+ → If PRD not found: ERROR "Run prd-writer first"
10
+ → If EPIC not found: ERROR "Run planner first"
11
+ → Extract: user stories with priorities (P1, P2, P3), technical components, data entities
12
+
13
+ 2. Load optional design documents:
14
+ → research/: Extract technology decisions → setup tasks
15
+ → data-model section in EPIC: Extract entities → map to user stories
16
+ → API contracts in EPIC: Each endpoint → map to user stories
17
+ → UI_PROTOTYPE.html (if exists): Extract pages/components → map to user stories
18
+ • Check for UI_PROTOTYPE.html existence
19
+ • If exists: Extract page list, component inventory, design system
20
+ • Map each page to corresponding user story
21
+ • Generate frontend implementation tasks with UI prototype references
22
+
23
+ 3. Generate tasks organized by USER STORY (NEW STRUCTURE):
24
+ → Phase 1 Setup: shared infrastructure needed by ALL stories
25
+ → Phase 2 Foundational: blocking prerequisites (必须完成后才能开始任何用户故事)
26
+ → Phase 3+: One phase PER USER STORY (P1, P2, P3... order)
27
+ - Each phase includes: story goal, independent test, tests, implementation
28
+ - Clear [US#] labels for each task
29
+ - [P] markers for parallelizable tasks within story
30
+ - Checkpoint after each story phase
31
+ - **新增**: 在每个阶段末尾插入 Code Review Checkpoint,指派 `/code-reviewer` 子代理生成审查报告
32
+ - **审查聚焦**: 所有 Code Review 必须对照 PRD.md 与 EPIC.md,禁止扩展需求,发现偏离需退回整改
33
+ → Final Phase: Polish & cross-cutting concerns
34
+
35
+ 4. Apply task rules:
36
+ → Different files = mark [P] for parallel execution
37
+ → Same file = sequential (no [P])
38
+ → Tests (if requested) ALWAYS before implementation (TDD principle)
39
+ → Mark test verification checkpoint before implementation
40
+ → 确保每个阶段都包含唯一的 Code Review 任务,输出路径使用 `reviews/phase-*-*_code_review.md`
41
+
42
+ 5. Number tasks sequentially (T001, T002, T003...)
43
+
44
+ 6. Generate dependency graph showing user story completion order
45
+
46
+ 7. Create parallel execution examples per story
47
+
48
+ 8. Validate task completeness:
49
+ → Each user story has all needed tasks?
50
+ → Each story independently testable?
51
+ → All tests come before implementation?
52
+ → If validation fails: ERROR "Fix task breakdown"
53
+
54
+ 9. Update Constitution Check section
55
+
56
+ 10. Return: SUCCESS (tasks.md ready for execution)
57
+ ```
58
+
59
+ **重要**: 这是一个自执行模板。Planner agent 应该按照 Execution Flow 生成完整的 tasks.md 文件。
60
+
61
+ ## Format: `[ID] [P?] [Story] Description`
62
+ - **[P]**: Can run in parallel (different files, no dependencies)
63
+ - **[Story]**: Which user story this task belongs to (US1, US2, US3...)
64
+ - **ID**: T001, T002, T003... (sequential numbering)
65
+ - Include exact file paths in task descriptions
66
+
67
+ ## Path Conventions
68
+ 根据项目类型调整路径:
69
+ - **单体项目**: `src/`, `tests/` 在仓库根目录
70
+ - **Web 应用**: `backend/src/`, `frontend/src/`
71
+ - **移动应用**: `api/src/`, `ios/src/` 或 `android/src/`
72
+
73
+ ---
74
+
75
+ ## Phase 1: Setup (共享基础设施)
76
+
77
+ **Purpose**: 项目初始化和所有用户故事共用的基础结构
78
+
79
+ ### 任务清单
80
+ - [ ] **T001** 创建项目结构按照 EPIC 中定义的架构
81
+ - [ ] **T002** 初始化 {{LANGUAGE}} 项目并安装 {{FRAMEWORK}} 依赖
82
+ - [ ] **T003** [P] 配置代码检查工具(linting, formatting)
83
+
84
+ ### Constitution Check (Phase 1)
85
+ - [ ] **Article VII - Simplicity Gate**: 只安装必需的依赖,≤3个主要项目/模块
86
+ - [ ] **Article VIII - Anti-Abstraction**: 避免不必要的抽象和封装
87
+ - [ ] **Article II - Architectural Consistency**: 遵循项目现有的结构模式和命名约定
88
+
89
+ ### Code Review Checkpoint (Phase 1)
90
+ - [ ] **T004** 触发 `/code-reviewer` 子代理生成 `reviews/phase-1-setup_code_review.md`(报告需返回 `Phase Gate Result: Pass` 且 `decision` ∈ {approve, comment} 方可进入下一阶段)
91
+
92
+ ---
93
+
94
+ ## Phase 2: Foundational (阻塞性前置条件)
95
+
96
+ **Purpose**: 所有用户故事的必需前置条件,必须完成后才能开始任何用户故事
97
+
98
+ **⚠️ CRITICAL**: No user story work can begin until this phase is complete
99
+
100
+ **Foundational 任务示例**(根据项目实际情况调整):
101
+ - [ ] **T005** Setup database schema and migrations framework
102
+ - [ ] **T006** [P] Implement authentication/authorization framework
103
+ - [ ] **T007** [P] Setup API routing and middleware structure
104
+ - [ ] **T008** Create base models/entities that all stories depend on
105
+ - [ ] **T009** Configure error handling and logging infrastructure
106
+ - [ ] **T010** Setup environment configuration management
107
+
108
+ **Checkpoint**: Foundation ready - user story implementation can now begin in parallel
109
+
110
+ ### Code Review Checkpoint (Phase 2)
111
+ - [ ] **T011** 触发 `/code-reviewer` 子代理生成 `reviews/phase-2-foundational_code_review.md`(若 `Phase Gate Result: Fail` → 必须整改并重跑审查)
112
+
113
+ ---
114
+
115
+ ## Phase 3: User Story 1 - {{STORY_1_TITLE}} (Priority: P1) 🎯 MVP
116
+
117
+ **Goal**: {{STORY_1_GOAL}}
118
+ <!-- 示例: Enable users to register and log in -->
119
+
120
+ **Independent Test**: {{STORY_1_INDEPENDENT_TEST}}
121
+ <!-- 示例: User can register with email/password and log in successfully -->
122
+
123
+ ### Tests for User Story 1 (OPTIONAL - only if tests requested) ⚠️
124
+
125
+ **NOTE: Write these tests FIRST, ensure they FAIL before implementation**
126
+
127
+ - [ ] **T012** [P] [US1] Contract test for {{ENDPOINT_1}} in `tests/contract/test_{{NAME}}.{{EXT}}`
128
+ - [ ] **T013** [P] [US1] Contract test for {{ENDPOINT_2}} in `tests/contract/test_{{NAME}}.{{EXT}}`
129
+ - [ ] **T014** [P] [US1] Integration test for {{USER_JOURNEY}} in `tests/integration/test_{{NAME}}.{{EXT}}`
130
+
131
+ ### Implementation for User Story 1
132
+
133
+ - [ ] **T015** [P] [US1] Create {{Entity1}} model in `src/models/{{entity1}}.{{EXT}}`
134
+ - [ ] **T016** [P] [US1] Create {{Entity2}} model in `src/models/{{entity2}}.{{EXT}}`
135
+ - [ ] **T017** [US1] Implement {{Service}} in `src/services/{{service}}.{{EXT}}` (depends on T015, T016)
136
+ - [ ] **T018** [US1] Implement {{endpoint/feature}} in `src/{{location}}/{{file}}.{{EXT}}`
137
+ - [ ] **T019** [US1] Add validation and error handling
138
+ - [ ] **T020** [US1] Add logging for user story 1 operations
139
+
140
+ **Checkpoint**: At this point, User Story 1 should be fully functional and testable independently
141
+
142
+ ### Code Review Checkpoint (Phase 3)
143
+ - [ ] **T021** 触发 `/code-reviewer` 子代理生成 `reviews/phase-3-user-story-1_code_review.md`(任何整改项未关闭不得启动下一用户故事)
144
+
145
+ ---
146
+
147
+ ## Phase 4: User Story 2 - {{STORY_2_TITLE}} (Priority: P2)
148
+
149
+ **Goal**: {{STORY_2_GOAL}}
150
+
151
+ **Independent Test**: {{STORY_2_INDEPENDENT_TEST}}
152
+
153
+ ### Tests for User Story 2 (OPTIONAL - only if tests requested) ⚠️
154
+
155
+ - [ ] **T022** [P] [US2] Contract test for {{ENDPOINT}} in `tests/contract/test_{{NAME}}.{{EXT}}`
156
+ - [ ] **T023** [P] [US2] Integration test for {{USER_JOURNEY}} in `tests/integration/test_{{NAME}}.{{EXT}}`
157
+
158
+ ### Implementation for User Story 2
159
+
160
+ - [ ] **T024** [P] [US2] Create {{Entity}} model in `src/models/{{entity}}.{{EXT}}`
161
+ - [ ] **T025** [US2] Implement {{Service}} in `src/services/{{service}}.{{EXT}}`
162
+ - [ ] **T026** [US2] Implement {{endpoint/feature}} in `src/{{location}}/{{file}}.{{EXT}}`
163
+ - [ ] **T027** [US2] Integrate with User Story 1 components (if needed)
164
+
165
+ **Checkpoint**: At this point, User Stories 1 AND 2 should both work independently
166
+
167
+ ### Code Review Checkpoint (Phase 4)
168
+ - [ ] **T028** 触发 `/code-reviewer` 子代理生成 `reviews/phase-4-user-story-2_code_review.md`(确保审查结果在 PRD/EPIC 范围内全部通过)
169
+
170
+ ---
171
+
172
+ ## Phase 5: User Story X - {{STORY_UI_TITLE}} (Priority: PX) - Frontend UI Implementation ⚡️
173
+
174
+ **Note**: 此阶段仅在存在 UI_PROTOTYPE.html 时生成
175
+
176
+ **Goal**: {{STORY_UI_GOAL}}
177
+ <!-- 示例: Display order list and details with responsive design -->
178
+
179
+ **Independent Test**: {{STORY_UI_INDEPENDENT_TEST}}
180
+ <!-- 示例: User can view orders on mobile/tablet/desktop with consistent styling -->
181
+
182
+ **UI Prototype Reference**: `devflow/requirements/{{REQ_ID}}/UI_PROTOTYPE.html`
183
+
184
+ ### Implementation for User Story X (Frontend UI)
185
+
186
+ **Phase 3 任务前置条件**:
187
+ - [ ] 确认 UI_PROTOTYPE.html 存在
188
+ - [ ] 读取 UI_PROTOTYPE.html 提取设计系统和页面结构
189
+
190
+ #### Frontend Setup (如需要)
191
+ - [ ] **TXXX** [P] [USX] Setup frontend framework ({{React|Vue|Vanilla}}) in `frontend/`
192
+ - [ ] **TXXX** [P] [USX] Configure CSS solution ({{CSS Modules|Styled Components|Tailwind}})
193
+ - [ ] **TXXX** [USX] Extract design system variables from UI_PROTOTYPE.html to `src/styles/design-system.css`
194
+
195
+ #### Page Components (Based on UI_PROTOTYPE.html)
196
+ - [ ] **TXXX** [P] [USX] Implement {{Page1}} page component in `src/pages/{{Page1}}.{{jsx|vue}}`
197
+ - **UI Prototype Ref**: See UI_PROTOTYPE.html `#page-{{page1}}`
198
+ - **Design System**: Use CSS variables from `--primary-color`, `--spacing-md`, etc.
199
+ - **Responsive**: Implement 320px (mobile), 768px (tablet), 1024px (desktop) breakpoints
200
+ - **Interactive States**: Implement hover/active/disabled states
201
+
202
+ - [ ] **TXXX** [P] [USX] Implement {{Page2}} page component in `src/pages/{{Page2}}.{{jsx|vue}}`
203
+ - **UI Prototype Ref**: See UI_PROTOTYPE.html `#page-{{page2}}`
204
+
205
+ #### Reusable Components (From UI_PROTOTYPE.html component inventory)
206
+ - [ ] **TXXX** [P] [USX] Create {{Component1}} component in `src/components/{{Component1}}.{{jsx|vue}}`
207
+ - **UI Prototype Ref**: See UI_PROTOTYPE.html `<!-- Component: {{Component1}} -->`
208
+ - **Props**: Based on component usage in prototype
209
+ - **Styling**: Use design system variables
210
+
211
+ - [ ] **TXXX** [P] [USX] Create {{Component2}} component in `src/components/{{Component2}}.{{jsx|vue}}`
212
+
213
+ #### API Integration
214
+ - [ ] **TXXX** [USX] Connect {{Page1}} to backend API endpoint {{/api/endpoint}}
215
+ - [ ] **TXXX** [USX] Connect {{Page2}} to backend API endpoint {{/api/endpoint}}
216
+
217
+ #### Responsive & Accessibility
218
+ - [ ] **TXXX** [P] [USX] Test responsive design on mobile (320px-767px)
219
+ - [ ] **TXXX** [P] [USX] Test responsive design on tablet (768px-1023px)
220
+ - [ ] **TXXX** [P] [USX] Test responsive design on desktop (1024px+)
221
+ - [ ] **TXXX** [USX] Add ARIA labels and accessibility attributes
222
+ - [ ] **TXXX** [USX] Test keyboard navigation
223
+
224
+ **Checkpoint**: At this point, UI should match prototype with responsive design working
225
+
226
+ **Constitution Check (Frontend UI)**:
227
+ - [ ] **Article I.1 - NO PARTIAL IMPLEMENTATION**: All pages and components fully implemented
228
+ - [ ] **Article II.1 - NO CODE DUPLICATION**: Reusable components extracted
229
+ - [ ] **Article V.4 - File Size Limits**: Single component ≤500 lines
230
+ - [ ] **UI Prototype Alignment**: Visual design matches UI_PROTOTYPE.html
231
+ - [ ] **Responsive Design**: All breakpoints tested and working
232
+ - [ ] **Interactive States**: All hover/active/disabled states implemented
233
+
234
+ ### Code Review Checkpoint (Phase 5)
235
+ - [ ] **TXXX** 触发 `/code-reviewer` 子代理生成 `reviews/phase-5-user-story-x_code_review.md`(继续前必须得到通过并确认无需求扩张)
236
+
237
+ ---
238
+
239
+ ## Phase 6: User Story 3 - {{STORY_3_TITLE}} (Priority: P3)
240
+
241
+ **Goal**: {{STORY_3_GOAL}}
242
+
243
+ **Independent Test**: {{STORY_3_INDEPENDENT_TEST}}
244
+
245
+ ### Tests for User Story 3 (OPTIONAL - only if tests requested) ⚠️
246
+
247
+ - [ ] **T029** [P] [US3] Contract test for {{ENDPOINT}} in `tests/contract/test_{{NAME}}.{{EXT}}`
248
+ - [ ] **T030** [P] [US3] Integration test for {{USER_JOURNEY}} in `tests/integration/test_{{NAME}}.{{EXT}}`
249
+
250
+ ### Implementation for User Story 3
251
+
252
+ - [ ] **T031** [P] [US3] Create {{Entity}} model in `src/models/{{entity}}.{{EXT}}`
253
+ - [ ] **T032** [US3] Implement {{Service}} in `src/services/{{service}}.{{EXT}}`
254
+ - [ ] **T033** [US3] Implement {{endpoint/feature}} in `src/{{location}}/{{file}}.{{EXT}}`
255
+
256
+ **Checkpoint**: All user stories should now be independently functional
257
+
258
+ ### Code Review Checkpoint (Phase 6)
259
+ - [ ] **T034** 触发 `/code-reviewer` 子代理生成 `reviews/phase-6-user-story-3_code_review.md`(报告如含阻塞项,需完成整改再提交复审)
260
+
261
+ ---
262
+
263
+ [Add more user story phases as needed, following the same pattern]
264
+
265
+ ---
266
+
267
+ ## Phase N: Polish & Cross-Cutting Concerns
268
+
269
+ **Purpose**: 跨用户故事的改进
270
+
271
+ - [ ] **TXXX** [P] Documentation updates in `docs/`
272
+ - [ ] **TXXX** Code cleanup and refactoring
273
+ - [ ] **TXXX** Performance optimization across all stories
274
+ - [ ] **TXXX** [P] Additional unit tests (if requested) in `tests/unit/`
275
+ - [ ] **TXXX** Security hardening
276
+ - [ ] **TXXX** Run quickstart.md validation
277
+
278
+ ### Code Review Checkpoint (Phase N)
279
+ - [ ] **TXXX** 触发 `/code-reviewer` 子代理生成 `reviews/phase-n-polish_code_review.md`(必须 Pass 方可切换至 QA 流程)
280
+
281
+ ---
282
+
283
+ ## Dependencies & Execution Order (依赖关系与执行顺序)
284
+
285
+ ### Phase Dependencies
286
+
287
+ - **Setup (Phase 1)**: No dependencies - can start immediately
288
+ - **Foundational (Phase 2)**: Depends on Setup completion - BLOCKS all user stories
289
+ - **User Stories (Phase 3+)**: All depend on Foundational phase completion
290
+ - User stories can then proceed in parallel (if staffed)
291
+ - Or sequentially in priority order (P1 → P2 → P3)
292
+ - **Polish (Final Phase)**: Depends on all desired user stories being complete
293
+
294
+ ### User Story Dependencies
295
+
296
+ - **User Story 1 (P1)**: Can start after Foundational (Phase 2) - No dependencies on other stories
297
+ - **User Story 2 (P2)**: Can start after Foundational (Phase 2) - May integrate with US1 but should be independently testable
298
+ - **User Story 3 (P3)**: Can start after Foundational (Phase 2) - May integrate with US1/US2 but should be independently testable
299
+
300
+ ### Within Each User Story
301
+
302
+ - Tests (if included) MUST be written and FAIL before implementation
303
+ - Models before services
304
+ - Services before endpoints
305
+ - Core implementation before integration
306
+ - Story complete before moving to next priority
307
+
308
+ ### Parallel Opportunities
309
+
310
+ - All Setup tasks marked [P] can run in parallel
311
+ - All Foundational tasks marked [P] can run in parallel (within Phase 2)
312
+ - Once Foundational phase completes, all user stories can start in parallel (if team capacity allows)
313
+ - All tests for a user story marked [P] can run in parallel
314
+ - Models within a story marked [P] can run in parallel
315
+ - Different user stories can be worked on in parallel by different team members
316
+
317
+ ---
318
+
319
+ ## Parallel Example: User Story 1
320
+
321
+ ```bash
322
+ # Launch all tests for User Story 1 together (if tests requested):
323
+ Task: "Contract test for [endpoint] in tests/contract/test_[name].py"
324
+ Task: "Integration test for [user journey] in tests/integration/test_[name].py"
325
+
326
+ # Launch all models for User Story 1 together:
327
+ Task: "Create [Entity1] model in src/models/[entity1].py"
328
+ Task: "Create [Entity2] model in src/models/[entity2].py"
329
+ ```
330
+
331
+ ---
332
+
333
+ ## Implementation Strategy (实施策略)
334
+
335
+ ### MVP First (User Story 1 Only)
336
+
337
+ 1. Complete Phase 1: Setup
338
+ 2. Complete Phase 2: Foundational (CRITICAL - blocks all stories)
339
+ 3. Complete Phase 3: User Story 1
340
+ 4. **STOP and VALIDATE**: Test User Story 1 independently
341
+ 5. Deploy/demo if ready
342
+
343
+ ### Incremental Delivery
344
+
345
+ 1. Complete Setup + Foundational → Foundation ready
346
+ 2. Add User Story 1 → Test independently → Deploy/Demo (MVP!)
347
+ 3. Add User Story 2 → Test independently → Deploy/Demo
348
+ 4. Add User Story 3 → Test independently → Deploy/Demo
349
+ 5. Each story adds value without breaking previous stories
350
+
351
+ ### Parallel Team Strategy
352
+
353
+ With multiple developers:
354
+
355
+ 1. Team completes Setup + Foundational together
356
+ 2. Once Foundational is done:
357
+ - Developer A: User Story 1
358
+ - Developer B: User Story 2
359
+ - Developer C: User Story 3
360
+ 3. Stories complete and integrate independently
361
+
362
+ ---
363
+
364
+ ## Notes (注意事项)
365
+
366
+ ### Critical Rules
367
+ - **[P] = Parallel**: 只有不同文件、无依赖的任务才能标记 [P]
368
+ - **[US#] = Story Label**: 所有任务必须标记所属用户故事
369
+ - **Story Independence**: 每个用户故事应该独立可测试
370
+ - **Foundational First**: Phase 2 必须完成才能开始用户故事
371
+ - **Tests Optional**: 只有用户明确要求时才生成测试任务
372
+ - **Commit Early**: 每完成一个任务就提交
373
+
374
+ ### Common Pitfalls (常见陷阱)
375
+ - ❌ 跨用户故事的依赖(破坏独立性)
376
+ - ❌ 标记 [P] 但任务修改同一文件
377
+ - ❌ 任务描述模糊,没有指定具体文件路径
378
+ - ❌ 忘记标记 [US#] 用户故事标签
379
+ - ❌ Foundational 包含特定用户故事的功能
380
+
381
+ ### Best Practices (最佳实践)
382
+ - ✅ 每个用户故事独立可测试
383
+ - ✅ 一次只做一个用户故事
384
+ - ✅ 频繁提交,小步前进
385
+ - ✅ 运行测试套件验证
386
+ - ✅ 每个故事完成后 demo
387
+
388
+ ---
389
+
390
+ ## Task Generation Rules (任务生成规则)
391
+ *这些规则由 planner agent 在执行 Execution Flow 时应用*
392
+
393
+ ### 1. From User Stories (PRIMARY ORGANIZATION)
394
+ - 每个用户故事 (P1, P2, P3...) 得到自己的 Phase
395
+ - 映射所有相关组件到其故事:
396
+ - 该故事需要的 Models
397
+ - 该故事需要的 Services
398
+ - 该故事需要的 Endpoints/UI
399
+ - 如果请求了测试: 该故事特定的测试
400
+ - 标记故事依赖(大多数故事应该独立)
401
+
402
+ ### 2. From API Contracts
403
+ - 映射每个 contract/endpoint → 到它服务的用户故事
404
+ - 如果请求了测试: 每个 contract → contract test 任务 [P] 在该故事的阶段之前
405
+
406
+ ### 3. From Data Model
407
+ - 映射每个 entity → 到需要它的用户故事
408
+ - 如果 entity 服务多个故事: 放入最早的故事或 Setup phase
409
+ - Relationships → service layer 任务在适当的故事阶段
410
+
411
+ ### 4. From Setup/Infrastructure
412
+ - 共享基础设施 → Setup phase (Phase 1)
413
+ - Foundational/blocking 任务 → Foundational phase (Phase 2)
414
+ - 示例: Database schema setup, authentication framework, core libraries, base configurations
415
+ - 这些必须在任何用户故事可以实现之前完成
416
+ - 故事特定的 setup → 在该故事的阶段内
417
+
418
+ ### 5. Ordering
419
+ - Phase 1: Setup (project initialization)
420
+ - Phase 2: Foundational (blocking prerequisites - must complete before user stories)
421
+ - Phase 3+: User Stories in priority order (P1, P2, P3...)
422
+ - Within each story: Tests (if requested) → Models → Services → Endpoints → Integration
423
+ - Final Phase: Polish & Cross-Cutting Concerns
424
+ - Each user story phase should be a complete, independently testable increment
425
+
426
+ ---
427
+
428
+ ## Validation Checklist (验证清单)
429
+ *GATE: 由 planner 在生成 tasks.md 后检查*
430
+
431
+ ### User Story Organization ⚠️ CRITICAL
432
+ - [ ] 每个用户故事有自己的 Phase (Phase 3, 4, 5...)
433
+ - [ ] 所有任务都有 [US#] 标签标记所属故事
434
+ - [ ] 每个故事有 Independent Test 标准
435
+ - [ ] 每个故事有 Checkpoint 验证点
436
+ - [ ] Foundational phase 只包含所有故事共需的前置条件
437
+
438
+ ### Completeness (完整性)
439
+ - [ ] 所有 API contracts 都映射到用户故事
440
+ - [ ] 所有 data entities 都映射到用户故事
441
+ - [ ] 所有用户故事都有对应的任务集合
442
+ - [ ] Setup 和 Foundational phase 明确定义
443
+
444
+ ### Story Independence (故事独立性)
445
+ - [ ] US1 可以独立实现和测试
446
+ - [ ] US2 可以独立实现和测试
447
+ - [ ] US3 可以独立实现和测试
448
+ - [ ] 故事间依赖已明确标注(应该最小化)
449
+
450
+ ### Parallel Safety (并行安全性)
451
+ - [ ] 所有 [P] 标记的任务都操作不同文件
452
+ - [ ] 同一文件的任务没有 [P] 标记
453
+ - [ ] 有依赖关系的任务没有 [P] 标记
454
+
455
+ ### Path Specificity (路径明确性)
456
+ - [ ] 每个任务都指定了具体的文件路径
457
+ - [ ] 路径使用了正确的项目结构约定
458
+ - [ ] 测试文件路径遵循 tests/ 目录结构
459
+
460
+ ### Constitution Alignment (宪法符合性)
461
+
462
+ **Reference**: `.claude/constitution/project-constitution.md` (v2.0.0)
463
+
464
+ - [ ] **Article I - Quality First**: 没有违反 NO PARTIAL IMPLEMENTATION,所有任务完整定义
465
+ - [ ] **Article II - Architectural Consistency**: 没有违反 NO CODE DUPLICATION,复用现有组件
466
+ - [ ] **Article II - Anti-Over-Engineering**: 没有违反 NO OVER-ENGINEERING,架构适度
467
+ - [ ] **Article III - Security First**: 所有安全原则都有对应的任务(密钥管理、输入验证等)
468
+ - [ ] **Article VI - Test-First Development**: TDD顺序正确(Phase 2测试 → Phase 3实现)
469
+ - [ ] **Article X - Requirement Boundary**: 任务仅实现PRD明确的需求,无推测性功能
470
+
471
+ ---
472
+
473
+ ## Progress Tracking (进度跟踪)
474
+ *在执行过程中更新*
475
+
476
+ ### Overall Progress
477
+ - [ ] Phase 1: Setup ({{SETUP_TASKS_COUNT}} tasks)
478
+ - [ ] Phase 2: Foundational ({{FOUNDATIONAL_TASKS_COUNT}} tasks)
479
+ - [ ] **CHECKPOINT**: Foundation ready ✓
480
+ - [ ] Phase 3: User Story 1 ({{US1_TASKS_COUNT}} tasks) 🎯 MVP
481
+ - [ ] Phase 4: User Story 2 ({{US2_TASKS_COUNT}} tasks)
482
+ - [ ] Phase 5: User Story 3 ({{US3_TASKS_COUNT}} tasks)
483
+ - [ ] Phase N: Polish ({{POLISH_TASKS_COUNT}} tasks)
484
+
485
+ ### Test Coverage Status (if tests requested)
486
+ - Contract Tests: {{CONTRACT_TESTS_PASSED}} / {{CONTRACT_TESTS_TOTAL}}
487
+ - Integration Tests: {{INTEGRATION_TESTS_PASSED}} / {{INTEGRATION_TESTS_TOTAL}}
488
+ - Unit Tests: {{UNIT_TESTS_PASSED}} / {{UNIT_TESTS_TOTAL}}
489
+ - Coverage: {{COVERAGE_PERCENTAGE}}%
490
+
491
+ ### User Story Completion
492
+ - [ ] US1 (P1): {{COMPLETED}} / {{TOTAL}} tasks - Independent Test: {{PASS|FAIL}}
493
+ - [ ] US2 (P2): {{COMPLETED}} / {{TOTAL}} tasks - Independent Test: {{PASS|FAIL}}
494
+ - [ ] US3 (P3): {{COMPLETED}} / {{TOTAL}} tasks - Independent Test: {{PASS|FAIL}}
495
+
496
+ ### Constitution Compliance
497
+
498
+ **Reference**: `.claude/constitution/project-constitution.md` (v2.0.0)
499
+
500
+ - [ ] **Initial Check**: All 10 Articles validated at planning stage
501
+ - [ ] **Article I-V**: Core principles checked (Quality, Architecture, Security, Performance, Maintainability)
502
+ - [ ] **Article VI**: TDD sequence enforced (Tests First → Implementation)
503
+ - [ ] **Article VII-IX**: Phase -1 Gates passed (Simplicity, Anti-Abstraction, Integration-First)
504
+ - [ ] **Article X**: Requirement boundary validated (No speculative features)
505
+ - [ ] **Post-Implementation**: Constitution Check re-run after all tasks complete
506
+ - [ ] **Security Scan**: No high-severity issues
507
+ - [ ] **Code Review**: Architectural consistency verified
508
+
509
+ ---
510
+
511
+ **Generated by**: planner agent
512
+ **Based on**: PRD.md, EPIC.md
513
+ **Constitution**: `.claude/constitution/project-constitution.md` v2.0.0
514
+ **Template Version**: 3.0.0 (Spec-Kit inspired - User Story Centric + Article-based Constitution)
515
+
516
+ ---
517
+
518
+ ## 相关文档
519
+
520
+ - **PRD**: `devflow/requirements/{{REQ_ID}}/PRD.md`
521
+ - **EPIC**: `devflow/requirements/{{REQ_ID}}/EPIC.md`
522
+ - **Constitution**: `.claude/constitution/project-constitution.md`
523
+ - **Execution Log**: `devflow/requirements/{{REQ_ID}}/EXECUTION_LOG.md`