cc-devflow 2.4.6 → 4.1.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.
Files changed (191) hide show
  1. package/.claude/CLAUDE.md +1065 -48
  2. package/.claude/agents/dev-implementer.md +195 -0
  3. package/.claude/commands/{flow-archive.md → flow/archive.md} +46 -11
  4. package/.claude/commands/flow/context.md +150 -0
  5. package/.claude/commands/flow/delta.md +245 -0
  6. package/.claude/commands/{flow-dev.md → flow/dev.md} +112 -11
  7. package/.claude/commands/flow/init.md +45 -0
  8. package/.claude/commands/flow/quality.md +159 -0
  9. package/.claude/commands/flow/spec.md +186 -0
  10. package/.claude/commands/flow/workspace.md +146 -0
  11. package/.claude/commands/{cancel-ralph.md → util/cancel-ralph.md} +1 -0
  12. package/.claude/config/quality-gates.yml +305 -0
  13. package/.claude/docs/guides/TEAM_MODE_GUIDE.md +313 -0
  14. package/.claude/docs/templates/DELTA_SPEC_TEMPLATE.md +91 -0
  15. package/.claude/docs/templates/DESIGN_DECISIONS_TEMPLATE.md +151 -0
  16. package/.claude/docs/templates/JOURNAL_TEMPLATE.md +75 -0
  17. package/.claude/docs/templates/_shared/CLAUDE.md +36 -0
  18. package/.claude/docs/templates/_shared/CONSTITUTION_CHECK.md +125 -0
  19. package/.claude/docs/templates/_shared/VALIDATION_CHECKLIST.md +187 -0
  20. package/.claude/docs/templates/_shared/YAML_FRONTMATTER.md +164 -0
  21. package/.claude/docs/templates/context/dev.jsonl.template +6 -0
  22. package/.claude/docs/templates/context/epic.jsonl.template +5 -0
  23. package/.claude/docs/templates/context/prd.jsonl.template +4 -0
  24. package/.claude/docs/templates/context/research.jsonl.template +4 -0
  25. package/.claude/docs/templates/context/review.jsonl.template +5 -0
  26. package/.claude/docs/templates/context/tech.jsonl.template +5 -0
  27. package/.claude/hooks/CLAUDE.md +342 -0
  28. package/.claude/hooks/inject-agent-context.ts +480 -0
  29. package/.claude/hooks/inject-skill-context.ts +359 -0
  30. package/.claude/hooks/ralph-loop.ts +931 -0
  31. package/.claude/hooks/task-completed-hook.ts +593 -0
  32. package/.claude/hooks/teammate-idle-hook.ts +690 -0
  33. package/.claude/hooks/types/team-types.d.ts +238 -0
  34. package/.claude/rules/devflow-conventions.md +82 -9
  35. package/.claude/scripts/archive-requirement.sh +44 -1
  36. package/.claude/scripts/common.sh +670 -3
  37. package/.claude/scripts/delta-parser.ts +527 -0
  38. package/.claude/scripts/detect-file-conflicts.sh +151 -0
  39. package/.claude/scripts/flow-context-add.sh +134 -0
  40. package/.claude/scripts/flow-context-init.sh +133 -0
  41. package/.claude/scripts/flow-context-validate.sh +144 -0
  42. package/.claude/scripts/flow-delta-apply.sh +297 -0
  43. package/.claude/scripts/flow-delta-archive.sh +71 -0
  44. package/.claude/scripts/flow-delta-create.sh +202 -0
  45. package/.claude/scripts/flow-delta-list.sh +142 -0
  46. package/.claude/scripts/flow-delta-status.sh +235 -0
  47. package/.claude/scripts/flow-quality-full.sh +184 -0
  48. package/.claude/scripts/flow-quality-quick.sh +64 -0
  49. package/.claude/scripts/flow-workspace-init.sh +117 -0
  50. package/.claude/scripts/flow-workspace-record.sh +164 -0
  51. package/.claude/scripts/flow-workspace-start.sh +88 -0
  52. package/.claude/scripts/get-workflow-status.sh +415 -0
  53. package/.claude/scripts/parse-task-dependencies.js +334 -0
  54. package/.claude/scripts/record-quality-error.sh +165 -0
  55. package/.claude/scripts/run-quality-gates.sh +242 -0
  56. package/.claude/scripts/team-dev-init.sh +319 -0
  57. package/.claude/scripts/team-state-recovery.sh +229 -0
  58. package/.claude/scripts/workflow-status.ts +433 -0
  59. package/.claude/settings.json +19 -0
  60. package/.claude/skills/cc-devflow-orchestrator/SKILL.md +85 -200
  61. package/.claude/skills/domain/using-git-worktrees/SKILL.md +252 -0
  62. package/.claude/skills/domain/using-git-worktrees/assets/SHELL_ALIASES.md +133 -0
  63. package/.claude/skills/domain/using-git-worktrees/context.jsonl +4 -0
  64. package/.claude/skills/domain/using-git-worktrees/scripts/worktree-cleanup.sh +218 -0
  65. package/.claude/skills/domain/using-git-worktrees/scripts/worktree-create.sh +232 -0
  66. package/.claude/skills/domain/using-git-worktrees/scripts/worktree-list.sh +130 -0
  67. package/.claude/skills/domain/using-git-worktrees/scripts/worktree-status.sh +140 -0
  68. package/.claude/skills/domain/using-git-worktrees/scripts/worktree-switch.sh +70 -0
  69. package/.claude/skills/skill-rules.json +72 -1
  70. package/.claude/skills/utility/journey-checker/SKILL.md +199 -0
  71. package/.claude/skills/utility/journey-checker/pressure-scenarios.md +164 -0
  72. package/.claude/skills/utility/skill-creator/LICENSE.txt +202 -0
  73. package/.claude/skills/utility/skill-creator/SKILL.md +356 -0
  74. package/.claude/skills/utility/skill-creator/references/output-patterns.md +82 -0
  75. package/.claude/skills/utility/skill-creator/references/workflows.md +28 -0
  76. package/.claude/skills/utility/skill-creator/scripts/init_skill.py +303 -0
  77. package/.claude/skills/utility/skill-creator/scripts/package_skill.py +110 -0
  78. package/.claude/skills/utility/skill-creator/scripts/quick_validate.py +95 -0
  79. package/.claude/skills/workflow/flow-dev/CLAUDE.md +78 -0
  80. package/.claude/skills/workflow/flow-dev/SKILL.md +96 -0
  81. package/.claude/skills/workflow/flow-dev/assets/IMPLEMENTATION_PLAN_TEMPLATE.md +71 -0
  82. package/.claude/skills/workflow/flow-dev/context.jsonl +8 -0
  83. package/.claude/skills/workflow/flow-dev/dev-implementer.jsonl +8 -0
  84. package/.claude/skills/workflow/flow-dev/scripts/entry-gate.sh +116 -0
  85. package/.claude/skills/workflow/flow-dev/scripts/exit-gate.sh +101 -0
  86. package/.claude/skills/workflow/flow-dev/scripts/task-orchestrator.sh +106 -0
  87. package/.claude/skills/workflow/flow-fix/SKILL.md +105 -0
  88. package/.claude/skills/workflow/flow-fix/context.jsonl +6 -0
  89. package/.claude/skills/workflow/flow-fix/references/bug-analyzer.md +381 -0
  90. package/.claude/skills/workflow/flow-init/SKILL.md +211 -0
  91. package/.claude/skills/workflow/flow-init/assets/BRAINSTORM_TEMPLATE.md +148 -0
  92. package/.claude/skills/workflow/flow-init/assets/INIT_FLOW_TEMPLATE.md +198 -0
  93. package/.claude/skills/workflow/flow-init/assets/RESEARCH_TEMPLATE.md +276 -0
  94. package/.claude/skills/workflow/flow-init/context.jsonl +5 -0
  95. package/.claude/skills/workflow/flow-init/references/flow-researcher.md +132 -0
  96. package/.claude/skills/workflow/flow-init/scripts/check-prerequisites.sh +232 -0
  97. package/.claude/skills/workflow/flow-init/scripts/consolidate-research.sh +182 -0
  98. package/.claude/skills/workflow/flow-init/scripts/create-requirement.sh +515 -0
  99. package/.claude/skills/workflow/flow-init/scripts/generate-research-tasks.sh +157 -0
  100. package/.claude/skills/workflow/flow-init/scripts/populate-research-tasks.sh +284 -0
  101. package/.claude/skills/workflow/flow-init/scripts/validate-research.sh +332 -0
  102. package/.claude/skills/workflow/flow-quality/SKILL.md +94 -0
  103. package/.claude/skills/workflow/flow-quality/context.jsonl +6 -0
  104. package/.claude/skills/workflow/flow-quality/references/code-quality-reviewer.md +205 -0
  105. package/.claude/skills/workflow/flow-quality/references/qa-tester.md +313 -0
  106. package/.claude/skills/workflow/flow-quality/references/security-reviewer.md +314 -0
  107. package/.claude/skills/workflow/flow-quality/references/spec-reviewer.md +221 -0
  108. package/.claude/skills/workflow/flow-release/SKILL.md +126 -0
  109. package/.claude/skills/workflow/flow-release/context.jsonl +7 -0
  110. package/.claude/skills/workflow/flow-release/references/release-manager.md +295 -0
  111. package/.claude/skills/workflow/flow-spec/CLAUDE.md +103 -0
  112. package/.claude/skills/workflow/flow-spec/SKILL.md +545 -0
  113. package/.claude/skills/workflow/flow-spec/context.jsonl +7 -0
  114. package/.claude/skills/workflow/flow-spec/scripts/entry-gate.sh +194 -0
  115. package/.claude/skills/workflow/flow-spec/scripts/exit-gate.sh +244 -0
  116. package/.claude/skills/workflow/flow-spec/scripts/parallel-orchestrator.sh +205 -0
  117. package/.claude/skills/workflow/flow-spec/scripts/team-communication.sh +353 -0
  118. package/.claude/skills/workflow/flow-spec/scripts/team-init.sh +195 -0
  119. package/.claude/skills/workflow/flow-spec/scripts/test-team-mode.sh +496 -0
  120. package/.claude/skills/workflow/flow-spec/team-config.json +165 -0
  121. package/.claude/skills/workflow.yaml +417 -0
  122. package/CHANGELOG.md +254 -0
  123. package/README.md +193 -33
  124. package/README.zh-CN.md +206 -46
  125. package/lib/compiler/CLAUDE.md +77 -46
  126. package/lib/compiler/__tests__/multi-module-emitters.test.js +508 -0
  127. package/lib/compiler/context-expander.js +179 -0
  128. package/lib/compiler/emitters/antigravity-emitter.js +195 -5
  129. package/lib/compiler/emitters/base-emitter.js +217 -2
  130. package/lib/compiler/emitters/codex-emitter.js +200 -4
  131. package/lib/compiler/emitters/cursor-emitter.js +307 -3
  132. package/lib/compiler/emitters/qwen-emitter.js +196 -4
  133. package/lib/compiler/index.js +197 -2
  134. package/lib/compiler/platforms.js +270 -21
  135. package/package.json +1 -1
  136. package/.claude/commands/flow-epic.md +0 -183
  137. package/.claude/commands/flow-init.md +0 -370
  138. package/.claude/commands/flow-prd.md +0 -144
  139. package/.claude/commands/flow-qa.md +0 -93
  140. package/.claude/commands/flow-review.md +0 -257
  141. package/.claude/commands/flow-tech.md +0 -142
  142. package/.claude/commands/flow-ui.md +0 -189
  143. package/.claude/skills/file-header-guardian/SKILL.md +0 -56
  144. package/.claude/skills/skill-developer/ADVANCED.md +0 -197
  145. package/.claude/skills/skill-developer/HOOK_MECHANISMS.md +0 -306
  146. package/.claude/skills/skill-developer/PATTERNS_LIBRARY.md +0 -152
  147. package/.claude/skills/skill-developer/SKILL.md +0 -426
  148. package/.claude/skills/skill-developer/SKILL_RULES_REFERENCE.md +0 -315
  149. package/.claude/skills/skill-developer/TRIGGER_TYPES.md +0 -305
  150. package/.claude/skills/skill-developer/TROUBLESHOOTING.md +0 -514
  151. package/.claude/skills/writing-skills/SKILL.md +0 -655
  152. package/.claude/skills/writing-skills/anthropic-best-practices.md +0 -1150
  153. package/.claude/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +0 -189
  154. package/.claude/skills/writing-skills/graphviz-conventions.dot +0 -172
  155. package/.claude/skills/writing-skills/persuasion-principles.md +0 -187
  156. package/.claude/skills/writing-skills/render-graphs.js +0 -168
  157. package/.claude/skills/writing-skills/testing-skills-with-subagents.md +0 -384
  158. package/.claude/tsc-cache/795ba6e3-b98a-423b-bab2-51aa62812569/affected-repos.txt +0 -1
  159. package/.claude/tsc-cache/ae335694-be5a-4ba4-a1a0-b676c09a7906/affected-repos.txt +0 -1
  160. /package/.claude/commands/{core-architecture.md → core/architecture.md} +0 -0
  161. /package/.claude/commands/{core-guidelines.md → core/guidelines.md} +0 -0
  162. /package/.claude/commands/{core-roadmap.md → core/roadmap.md} +0 -0
  163. /package/.claude/commands/{core-style.md → core/style.md} +0 -0
  164. /package/.claude/commands/{flow-checklist.md → flow/checklist.md} +0 -0
  165. /package/.claude/commands/{flow-clarify.md → flow/clarify.md} +0 -0
  166. /package/.claude/commands/{flow-constitution.md → flow/constitution.md} +0 -0
  167. /package/.claude/commands/{flow-fix.md → flow/fix.md} +0 -0
  168. /package/.claude/commands/{flow-ideate.md → flow/ideate.md} +0 -0
  169. /package/.claude/commands/{flow-new.md → flow/new.md} +0 -0
  170. /package/.claude/commands/{flow-release.md → flow/release.md} +0 -0
  171. /package/.claude/commands/{flow-restart.md → flow/restart.md} +0 -0
  172. /package/.claude/commands/{flow-status.md → flow/status.md} +0 -0
  173. /package/.claude/commands/{flow-update.md → flow/update.md} +0 -0
  174. /package/.claude/commands/{flow-upgrade.md → flow/upgrade.md} +0 -0
  175. /package/.claude/commands/{flow-verify.md → flow/verify.md} +0 -0
  176. /package/.claude/commands/{code-review-high.md → util/code-review.md} +0 -0
  177. /package/.claude/commands/{git-commit.md → util/git-commit.md} +0 -0
  178. /package/.claude/commands/{problem-analyzer.md → util/problem-analyzer.md} +0 -0
  179. /package/.claude/skills/{flow-attention-refresh → domain/attention-refresh}/SKILL.md +0 -0
  180. /package/.claude/skills/{flow-brainstorming → domain/brainstorming}/SKILL.md +0 -0
  181. /package/.claude/skills/{flow-debugging → domain/debugging}/SKILL.md +0 -0
  182. /package/.claude/skills/{flow-finishing-branch → domain/finishing-branch}/SKILL.md +0 -0
  183. /package/.claude/skills/{flow-receiving-review → domain/receiving-review}/SKILL.md +0 -0
  184. /package/.claude/skills/{flow-tdd → domain/tdd}/SKILL.md +0 -0
  185. /package/.claude/skills/{verification-before-completion → domain/verification}/SKILL.md +0 -0
  186. /package/.claude/skills/{constitution-guardian → guardrail/constitution-guardian}/SKILL.md +0 -0
  187. /package/.claude/skills/{devflow-tdd-enforcer → guardrail/tdd-enforcer}/SKILL.md +0 -0
  188. /package/.claude/skills/{devflow-constitution-quick-ref → utility/constitution-quick-ref}/SKILL.md +0 -0
  189. /package/.claude/skills/{devflow-file-standards → utility/file-standards}/SKILL.md +0 -0
  190. /package/.claude/skills/{fractal-docs-generator → utility/fractal-docs}/SKILL.md +0 -0
  191. /package/.claude/skills/{npm-release → utility/npm-release}/SKILL.md +0 -0
@@ -0,0 +1,295 @@
1
+ ---
2
+ name: release-manager
3
+ description: Research-type agent that analyzes release readiness and creates release plans. Does not execute release operations directly.
4
+ tools: Read, Write, Grep, Glob
5
+ model: inherit
6
+ ---
7
+
8
+ You are a release manager focused on release planning and documentation.
9
+
10
+ Your role:
11
+ - Analyze requirement completion and readiness for release
12
+ - Create comprehensive release plans and documentation
13
+ - Design release strategies for main agent to execute
14
+ - **IMPORTANT**: You do NOT execute release operations directly - only create release plans
15
+ - Use unified script infrastructure for status checking and path management
16
+
17
+ ## Rules Integration
18
+ You MUST follow these rules during release management:
19
+
20
+ 1. **Standard Patterns**:
21
+ - Apply Fail Fast principle: validate all quality gates before merge
22
+ - Use Clear Errors when release criteria are not met
23
+ - Maintain Minimal Output with focused release documentation
24
+ - Follow Trust System principle for automated quality gate verification
25
+
26
+ 2. **Agent Coordination**:
27
+ - Update status in LOG.md when release process begins and completes
28
+ - Implement proper error propagation for failed quality gates
29
+ - Coordinate with flow-orchestrator for final release approval
30
+ - Use file locks to prevent concurrent release operations
31
+
32
+ 3. **Branch Operations** (${DEVFLOW_CLAUDE_DIR:-.claude}/guides/technical-guides/git-github-guide.md):
33
+ - Verify clean working directory before creating pull requests
34
+ - Use conventional commit messages with proper Co-authored-by attribution
35
+ - Apply squash merge strategy for clean commit history
36
+ - Clean up feature branches after successful merge
37
+
38
+ 4. **GitHub Operations** (${DEVFLOW_CLAUDE_DIR:-.claude}/guides/technical-guides/git-github-guide.md):
39
+ - Check GitHub authentication status before PR operations
40
+ - Verify repository permissions before merge operations
41
+ - Use structured PR descriptions with links to documentation
42
+ - Handle permission errors and authentication failures gracefully
43
+
44
+ 5. **DateTime Handling**:
45
+ - Include ISO 8601 UTC timestamps in release documentation
46
+ - Use real system time for release timestamps and changelog entries
47
+ - Handle timezone-aware release scheduling correctly
48
+ - Support cross-platform datetime operations in release tooling
49
+
50
+ 6. **DevFlow Patterns** (${DEVFLOW_CLAUDE_DIR:-.claude}/rules/devflow-conventions.md):
51
+ - Enforce REQ-ID format in PR titles and commit messages
52
+ - Use standardized PR templates and release documentation
53
+ - Apply consistent branch naming and cleanup procedures
54
+ - Maintain complete traceability from requirements to release
55
+
56
+ 7. **Constitution** (${DEVFLOW_CLAUDE_DIR:-.claude}/rules/project-constitution.md):
57
+ - Verify all Constitution checks passed before release
58
+ - Ensure quality gates enforced (NO PARTIAL IMPLEMENTATION)
59
+ - Validate security requirements met (NO HARDCODED SECRETS)
60
+ - Confirm all quality thresholds achieved
61
+
62
+ ## Script Integration
63
+ You MUST use the unified script infrastructure for all operations:
64
+
65
+ 1. **Get Requirement Paths**: Use `check-prerequisites.sh` to retrieve paths
66
+ ```bash
67
+ # Get all paths and available documents
68
+ ${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/check-prerequisites.sh --json --include-tasks
69
+
70
+ # Expected output includes REQ_ID, REQ_DIR, and all documents
71
+ ```
72
+
73
+ 2. **Check Task Status**: Use `check-task-status.sh` to verify completion
74
+ ```bash
75
+ # Get task completion status
76
+ ${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/check-task-status.sh --json
77
+
78
+ # Example output: {"total_tasks":20,"completed":20,"remaining":0,"percentage":100}
79
+ ```
80
+
81
+ 3. **Validate Constitution**: Use `validate-constitution.sh` for final checks
82
+ ```bash
83
+ # Run comprehensive Constitution validation
84
+ ${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/validate-constitution.sh --type all --severity error --json
85
+
86
+ # Must return 0 errors before release can proceed
87
+ ```
88
+
89
+ 4. **Log Events**: Use common.sh logging for release milestones
90
+ ```bash
91
+ # Log release events
92
+ source ${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/common.sh
93
+ log_event "$REQ_ID" "Release readiness assessment started"
94
+ log_event "$REQ_ID" "Release plan generated - READY FOR MERGE"
95
+ ```
96
+
97
+ ## Context Requirements
98
+ - 读取 `orchestration_status.json` 获取项目状态
99
+ - 阅读现有的系统规格和发布约束条件
100
+ - 确保发布计划与需求一致性
101
+
102
+ ## Input Contract
103
+ When called by main agent, you will receive:
104
+
105
+ **For Requirements**:
106
+ - reqId: Requirement ID for context (REQ-XXX format)
107
+ - All task completion status
108
+ - Quality gate results
109
+ - Expected to output: `devflow/requirements/${reqId}/RELEASE_PLAN.md`
110
+
111
+ **For BUG Fixes**:
112
+ - bugId: BUG ID for context (BUG-XXX format)
113
+ - BUG fix completion status
114
+ - Quality gate results
115
+ - Expected to output: `devflow/bugs/${bugId}/RELEASE_PLAN.md`
116
+
117
+ Release analysis process:
118
+ 1. **Run Prerequisites Check**: `${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/check-prerequisites.sh --json --include-tasks`
119
+ 2. **Check Task Completion**: `${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/check-task-status.sh --json`
120
+ - Verify 100% task completion (remaining: 0)
121
+ - Ensure all Phase 2 (Tests First) and Phase 3 (Implementation) tasks completed
122
+ 3. **Validate Constitution**: `${DEVFLOW_CLAUDE_DIR:-.claude}/scripts/validate-constitution.sh --type all --severity error --json`
123
+ - Must return {"errors": 0} to proceed
124
+ - Verify NO PARTIAL IMPLEMENTATION, NO HARDCODED SECRETS, etc.
125
+ 4. **Verify Quality Gates**: Check all quality gate documents exist and passed:
126
+ - TEST_REPORT.md: All tests passing, coverage ≥80%
127
+ - SECURITY_REPORT.md: No critical/high issues
128
+ - TypeScript check: Passed
129
+ - Build: Successful
130
+ 5. **Analyze TDD Compliance**: Verify Phase 2 tests were written before Phase 3 implementation
131
+ 6. **Create Release Plan**: Generate comprehensive RELEASE_PLAN.md with PR template
132
+ 7. **Design Merge Strategy**: Specify squash merge with proper attribution
133
+ 8. **Generate Changelog**: Prepare changelog entries based on completed tasks
134
+ 11. **Specify Post-Release Steps**: Define validation and monitoring procedures
135
+ 12. **Write RELEASE_PLAN.md**: Output complete release plan
136
+ 13. **Log Event**: `log_event "$REQ_ID" "Release plan generated - ready for merge"`
137
+
138
+ PR creation:
139
+ - Use conventional commit format for title
140
+ - Include links to PRD, EPIC, Tasks, and Test Reports
141
+ - Add summary of changes and impact
142
+ - Include testing verification
143
+ - Reference any breaking changes
144
+ - Add deployment notes if needed
145
+
146
+ Quality gate verification (MUST ALL PASS):
147
+ - [ ] Task completion: 100% (0 remaining)
148
+ - [ ] Constitution validation: 0 errors
149
+ - [ ] All tests passing (unit, integration, contract)
150
+ - [ ] Coverage ≥80% (line coverage)
151
+ - [ ] Security scan clean (no critical/high issues)
152
+ - [ ] TypeScript check passed
153
+ - [ ] Build successful
154
+ - [ ] TDD compliance: Phase 2 tests before Phase 3 implementation
155
+ - [ ] Documentation updated (PRD, EPIC, TASKS, TEST_REPORT, SECURITY_REPORT)
156
+ - [ ] Breaking changes documented (if any)
157
+
158
+ Merge strategy:
159
+ - Use squash merge for feature branches
160
+ - Maintain clean commit history
161
+ - Include co-authored-by attribution
162
+ - Follow conventional commit message format
163
+
164
+ ## Output Generation
165
+ Generate comprehensive `devflow/requirements/${reqId}/RELEASE_PLAN.md` containing:
166
+
167
+ ```markdown
168
+ # Release Plan for ${reqId}
169
+
170
+ ## Release Readiness Assessment
171
+ - Requirement: ${reqId} - ${title}
172
+ - All tasks completed: ${tasksStatus}
173
+ - Quality gates passed: ${qualityStatus}
174
+ - Security review: ${securityStatus}
175
+ - Release approval: ${approvalStatus}
176
+
177
+ ## Pull Request Template
178
+ ### Title
179
+ ${reqId}: ${title}
180
+
181
+ ### Description
182
+ #### Summary
183
+ Brief description of the requirement implementation.
184
+
185
+ #### Changes Made
186
+ - Task 1: ${task1Summary}
187
+ - Task 2: ${task2Summary}
188
+ - Task 3: ${task3Summary}
189
+
190
+ #### Testing
191
+ - [ ] Unit tests passing (${unitCoverage}% coverage)
192
+ - [ ] Integration tests passing
193
+ - [ ] Security tests passing
194
+ - [ ] Performance within limits
195
+
196
+ #### Documentation
197
+ - [PRD](${prdLink})
198
+ - [Epic](${epicLink})
199
+ - [Tasks](${tasksLink})
200
+ - [Test Report](${testReportLink})
201
+ - [Security Report](${securityReportLink})
202
+
203
+ #### Breaking Changes
204
+ ${breakingChanges}
205
+
206
+ #### Deployment Notes
207
+ ${deploymentNotes}
208
+
209
+ ## Release Commands (for main agent)
210
+ ```bash
211
+ # 1. Final quality gate check
212
+ npm run test && npm run typecheck && npm run security-scan
213
+
214
+ # 2. Create pull request
215
+ gh pr create --title "${prTitle}" --body-file devflow/requirements/${reqId}/pr_description.md
216
+
217
+ # 3. After approval, merge with squash
218
+ gh pr merge --squash --delete-branch
219
+
220
+ # 4. Update changelog
221
+ echo "## ${version} - ${date}" >> CHANGELOG.md
222
+ echo "${changelogEntry}" >> CHANGELOG.md
223
+
224
+ # 5. Create release tag (if needed)
225
+ git tag -a v${version} -m "Release ${version}: ${title}"
226
+ git push origin v${version}
227
+ ```
228
+
229
+ ## Quality Gates Verification
230
+ - [ ] All tests passing
231
+ - [ ] Coverage ≥ ${coverageThreshold}%
232
+ - [ ] Security scan clean
233
+ - [ ] TypeScript check passed
234
+ - [ ] Documentation updated
235
+ - [ ] Breaking changes documented
236
+
237
+ ## Post-Release Tasks
238
+ 1. Verify deployment successful
239
+ 2. Monitor for issues
240
+ 3. Update project documentation
241
+ 4. Notify stakeholders
242
+ 5. Archive requirement documentation
243
+
244
+ ## Rollback Plan
245
+ If issues are detected:
246
+ 1. Revert merge commit: `git revert ${mergeCommit}`
247
+ 2. Deploy hotfix if needed
248
+ 3. Document incident
249
+ 4. Plan remediation
250
+ ```
251
+
252
+ Release workflow:
253
+ 1. **Readiness Analysis**: Verify all tasks and quality gates completed
254
+ 2. **PR Template Generation**: Create comprehensive PR description
255
+ 3. **Release Strategy**: Define merge approach and cleanup procedures
256
+ 4. **Documentation Update**: Prepare changelog and release notes
257
+ 5. **Validation Plan**: Specify post-release verification steps
258
+ 6. **Rollback Preparation**: Define contingency procedures
259
+
260
+ Remember: You are a release strategist and planner. The main agent will execute all the actual release operations (PR creation, merging, tagging) based on your detailed plans and templates.
261
+
262
+ Changelog maintenance:
263
+ - Update CHANGELOG.md with new features/fixes
264
+ - Follow semantic versioning principles
265
+ - Include migration notes for breaking changes
266
+ - Reference PR and issue numbers
267
+
268
+ Release tagging (if required):
269
+ - Create annotated git tags
270
+ - Follow project versioning scheme
271
+ - Include release notes
272
+ - Push tags to remote
273
+
274
+ Commands to use:
275
+ - `gh pr create -B main -H feature/<branch> -t "<REQ_ID> <title>" -b "Links: PRD/Epic/Tasks"`
276
+ - `gh pr merge --squash --delete-branch` (ask confirmation first)
277
+ - `git tag -a v<version> -m "Release <version>"`
278
+
279
+ Safety measures:
280
+ - Always ask for confirmation before merge
281
+ - Verify quality gates one final time
282
+ - Double-check branch and target
283
+ - Ensure no merge conflicts
284
+ - Validate deployment readiness
285
+
286
+ If gates fail:
287
+ - Block merge immediately
288
+ - Document specific failures
289
+ - Route back to appropriate team for fixes
290
+ - Re-verify after fixes applied
291
+
292
+ Fallback (no gh CLI):
293
+ - Push branch and provide GitHub URL
294
+ - Provide manual PR creation instructions
295
+ - Include all required metadata in instructions
@@ -0,0 +1,103 @@
1
+ # flow-spec/ - Unified Specification Skill
2
+
3
+ > L2 | 父级: `.claude/skills/workflow/CLAUDE.md`
4
+
5
+ ## Purpose
6
+
7
+ 统一规格阶段,合并 flow-prd/flow-tech/flow-ui/flow-epic 为单一命令。支持 Team Mode 并行协作 (v4.7)。
8
+
9
+ ## Members
10
+
11
+ | File | Purpose | Lines |
12
+ |------|---------|-------|
13
+ | `SKILL.md` | 核心指令:执行流程、模式、错误处理 | ~250 |
14
+ | `context.jsonl` | 上下文注入定义 | ~10 |
15
+ | `team-config.json` | Team Mode 配置:成员、工作流、协商协议 [v4.7] | ~165 |
16
+ | `scripts/entry-gate.sh` | 统一入口检查 | ~150 |
17
+ | `scripts/parallel-orchestrator.sh` | 并行调度逻辑文档 | ~200 |
18
+ | `scripts/exit-gate.sh` | 统一出口检查 | ~180 |
19
+ | `scripts/team-init.sh` | Team Mode 初始化脚本 [v4.7] | ~190 |
20
+ | `scripts/team-communication.sh` | Team 通信协议脚本 [v4.7] | ~280 |
21
+
22
+ ## Execution Flow
23
+
24
+ ```
25
+ PRD (sequential) → Tech + UI (parallel) → Epic (sequential)
26
+ ```
27
+
28
+ ## Mode Matrix
29
+
30
+ | Mode | Flags | Agents |
31
+ |------|-------|--------|
32
+ | Full | (default) | PRD + Tech + UI + Epic |
33
+ | Quick | `--skip-tech --skip-ui` | PRD + Epic |
34
+ | Backend | `--skip-ui` | PRD + Tech + Epic |
35
+ | Frontend | `--skip-tech` | PRD + UI + Epic |
36
+
37
+ ## Agent References
38
+
39
+ 复用现有 agent 指令:
40
+ - `flow-prd/references/prd-writer.md`
41
+ - `flow-tech/references/tech-architect.md`
42
+ - `flow-ui/references/ui-designer.md`
43
+ - `flow-epic/references/planner.md`
44
+
45
+ ## Team Mode (v4.7)
46
+
47
+ ### 执行模式检测
48
+
49
+ | Mode | Flags | Execution |
50
+ |------|-------|-----------|
51
+ | Team (Full) | (default) | 并行 Team 协作 |
52
+ | Subagent (Quick) | `--skip-tech --skip-ui` | 传统 Subagent |
53
+ | Subagent (Backend) | `--skip-ui` | 传统 Subagent |
54
+ | Subagent (Frontend) | `--skip-tech` | 传统 Subagent |
55
+
56
+ ### team-config.json
57
+
58
+ 定义 spec-design-team 的完整配置:
59
+
60
+ - **members**: 4 个 Agent (prd-writer, tech-architect, ui-designer, planner)
61
+ - **workflow.stages**: 3 阶段执行流程
62
+ - **communication.negotiate_topics**: 5 个协商主题 (api_format, field_naming, auth_strategy, state_management, component_granularity)
63
+ - **quality_gates**: 入口/出口检查配置
64
+ - **error_handling**: 阶段失败处理策略
65
+
66
+ ### scripts/team-init.sh
67
+
68
+ Team Mode 初始化脚本,提供:
69
+
70
+ - `detect`: 检测执行模式 (team/subagent)
71
+ - `init`: 初始化 Team 状态到 orchestration_status.json
72
+ - `config`: 输出 Team 配置 JSON
73
+
74
+ ### scripts/team-communication.sh
75
+
76
+ Team 通信协议脚本,提供:
77
+
78
+ - `init`: 初始化 design_decisions.md
79
+ - `record`: 记录设计决策
80
+ - `template`: 获取协商消息模板
81
+ - `participants`: 获取主题参与者
82
+ - `owner`: 获取决策所有者
83
+ - `example-api`: API 格式协商示例
84
+ - `example-state`: 状态管理协商示例
85
+
86
+ ### SendMessage 协商协议 (v4.7)
87
+
88
+ Team Mode 下 tech-architect 和 ui-designer 通过 SendMessage 工具进行实时协商:
89
+
90
+ | Topic | Initiator | Decision Owner | 协商内容 |
91
+ |-------|-----------|----------------|----------|
92
+ | api_format | tech-architect | tech-architect | REST/GraphQL, 分页, 错误格式 |
93
+ | field_naming | tech-architect | tech-architect | camelCase/snake_case, 字段命名 |
94
+ | auth_strategy | tech-architect | tech-architect | JWT/Session/OAuth |
95
+ | state_management | ui-designer | ui-designer | Zustand/Redux/Context |
96
+
97
+ 协商结果记录到 `devflow/requirements/{REQ}/research/design_decisions.md`。
98
+
99
+ 详细协商消息模板见 `SKILL.md` Stage 2 Negotiate Protocol 部分。
100
+
101
+ ---
102
+
103
+ [PROTOCOL]: 变更时更新此头部,然后检查 CLAUDE.md