claude-code-workflow 7.2.30 → 7.3.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 (183) hide show
  1. package/.claude/commands/workflow-skill.md +130 -0
  2. package/.claude/skills/ccw-chain/SKILL.md +44 -71
  3. package/.claude/skills/ccw-chain/chains/ccw-cycle.json +13 -3
  4. package/.claude/skills/ccw-chain/chains/ccw-exploration.json +33 -22
  5. package/.claude/skills/ccw-chain/chains/ccw-issue.json +23 -12
  6. package/.claude/skills/ccw-chain/chains/ccw-lightweight.json +23 -9
  7. package/.claude/skills/ccw-chain/chains/ccw-main.json +15 -2
  8. package/.claude/skills/ccw-chain/chains/ccw-standard.json +28 -16
  9. package/.claude/skills/ccw-chain/chains/ccw-team.json +7 -2
  10. package/.claude/skills/ccw-chain/chains/ccw-with-file.json +25 -9
  11. package/.claude/skills/chain-loader/phases/01-analyze-skill.md +53 -53
  12. package/.claude/skills/chain-loader/specs/chain-schema.md +30 -3
  13. package/.claude/skills/chain-loader/templates/chain-json.md +63 -63
  14. package/.claude/skills/workflow-plan/SKILL.md +1 -0
  15. package/.claude/skills/workflow-plan/phases/01-session-discovery.md +19 -2
  16. package/.claude/skills/workflow-plan/phases/02-context-gathering.md +2 -2
  17. package/.claude/skills/workflow-plan/phases/04-task-generation.md +9 -1
  18. package/.codex/skills/analyze-with-file/SKILL.md +383 -134
  19. package/.codex/skills/brainstorm/SKILL.md +3 -3
  20. package/.codex/skills/brainstorm-with-file/SKILL.md +208 -88
  21. package/.codex/skills/clean/SKILL.md +1 -1
  22. package/.codex/skills/csv-wave-pipeline/SKILL.md +2 -2
  23. package/.codex/skills/investigate/orchestrator.md +24 -0
  24. package/.codex/skills/issue-discover/SKILL.md +374 -361
  25. package/.codex/skills/issue-discover/phases/01-issue-new.md +1 -1
  26. package/.codex/skills/issue-discover/phases/02-discover.md +2 -2
  27. package/.codex/skills/issue-discover/phases/03-discover-by-prompt.md +1 -1
  28. package/.codex/skills/issue-discover/phases/04-quick-execute.md +2 -2
  29. package/.codex/skills/parallel-dev-cycle/SKILL.md +44 -37
  30. package/.codex/skills/project-documentation-workflow/SKILL.md +1 -1
  31. package/.codex/skills/review-cycle/SKILL.md +31 -12
  32. package/.codex/skills/roadmap-with-file/SKILL.md +141 -133
  33. package/.codex/skills/security-audit/orchestrator.md +29 -0
  34. package/.codex/skills/session-sync/SKILL.md +1 -1
  35. package/.codex/skills/ship/orchestrator.md +24 -0
  36. package/.codex/skills/spec-add/SKILL.md +5 -5
  37. package/.codex/skills/spec-generator/SKILL.md +33 -2
  38. package/.codex/skills/spec-generator/phases/01-5-requirement-clarification.md +3 -3
  39. package/.codex/skills/spec-generator/phases/01-discovery.md +1 -1
  40. package/.codex/skills/spec-generator/phases/02-product-brief.md +1 -1
  41. package/.codex/skills/spec-generator/phases/03-requirements.md +1 -1
  42. package/.codex/skills/spec-generator/phases/04-architecture.md +1 -1
  43. package/.codex/skills/spec-generator/phases/05-epics-stories.md +1 -1
  44. package/.codex/skills/spec-generator/phases/06-readiness-check.md +1 -1
  45. package/.codex/skills/spec-generator/phases/07-issue-export.md +1 -1
  46. package/.codex/skills/spec-setup/SKILL.md +669 -669
  47. package/.codex/skills/team-arch-opt/specs/team-config.json +1 -1
  48. package/.codex/skills/team-brainstorm/SKILL.md +259 -259
  49. package/.codex/skills/team-coordinate/SKILL.md +359 -359
  50. package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +1 -1
  51. package/.codex/skills/team-designer/SKILL.md +27 -1
  52. package/.codex/skills/team-designer/phases/01-requirements-analysis.md +2 -2
  53. package/.codex/skills/team-designer/phases/02-scaffold-generation.md +1 -1
  54. package/.codex/skills/team-designer/phases/04-validation.md +1 -1
  55. package/.codex/skills/team-executor/SKILL.md +218 -218
  56. package/.codex/skills/team-frontend/SKILL.md +227 -227
  57. package/.codex/skills/team-frontend-debug/SKILL.md +278 -278
  58. package/.codex/skills/team-frontend-debug/roles/coordinator/commands/analyze.md +2 -2
  59. package/.codex/skills/team-interactive-craft/SKILL.md +220 -220
  60. package/.codex/skills/team-interactive-craft/roles/coordinator/role.md +209 -209
  61. package/.codex/skills/team-issue/SKILL.md +269 -269
  62. package/.codex/skills/team-issue/roles/coordinator/role.md +1 -1
  63. package/.codex/skills/team-lifecycle-v4/SKILL.md +305 -305
  64. package/.codex/skills/team-motion-design/SKILL.md +222 -222
  65. package/.codex/skills/team-motion-design/roles/coordinator/role.md +210 -210
  66. package/.codex/skills/team-perf-opt/SKILL.md +258 -258
  67. package/.codex/skills/team-perf-opt/specs/team-config.json +1 -1
  68. package/.codex/skills/team-planex/SKILL.md +216 -216
  69. package/.codex/skills/team-quality-assurance/SKILL.md +229 -229
  70. package/.codex/skills/team-review/SKILL.md +227 -227
  71. package/.codex/skills/team-roadmap-dev/SKILL.md +238 -238
  72. package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/roadmap-discuss.md +5 -5
  73. package/.codex/skills/team-tech-debt/SKILL.md +206 -206
  74. package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +1 -1
  75. package/.codex/skills/team-testing/SKILL.md +237 -237
  76. package/.codex/skills/team-ui-polish/SKILL.md +218 -218
  77. package/.codex/skills/team-ui-polish/roles/coordinator/role.md +213 -213
  78. package/.codex/skills/team-uidesign/SKILL.md +219 -219
  79. package/.codex/skills/team-uidesign/roles/coordinator/role.md +2 -2
  80. package/.codex/skills/team-ultra-analyze/SKILL.md +260 -260
  81. package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md +1 -1
  82. package/.codex/skills/team-ultra-analyze/roles/coordinator/role.md +1 -1
  83. package/.codex/skills/team-ux-improve/SKILL.md +227 -227
  84. package/.codex/skills/team-ux-improve/roles/coordinator/role.md +1 -1
  85. package/.codex/skills/team-ux-improve/specs/team-config.json +1 -1
  86. package/.codex/skills/team-visual-a11y/SKILL.md +319 -319
  87. package/.codex/skills/team-visual-a11y/roles/coordinator/role.md +213 -213
  88. package/.codex/skills/workflow-execute/SKILL.md +5 -5
  89. package/.codex/skills/workflow-lite-planex/SKILL.md +3 -3
  90. package/.codex/skills/workflow-plan/SKILL.md +3 -3
  91. package/.codex/skills/workflow-tdd-plan/SKILL.md +4 -4
  92. package/.codex/skills/workflow-test-fix-cycle/SKILL.md +403 -402
  93. package/ccw/dist/cli.d.ts.map +1 -1
  94. package/ccw/dist/cli.js +16 -0
  95. package/ccw/dist/cli.js.map +1 -1
  96. package/ccw/dist/commands/chain-loader.d.ts +2 -0
  97. package/ccw/dist/commands/chain-loader.d.ts.map +1 -0
  98. package/ccw/dist/commands/chain-loader.js +11 -0
  99. package/ccw/dist/commands/chain-loader.js.map +1 -0
  100. package/ccw/dist/commands/install.d.ts.map +1 -1
  101. package/ccw/dist/commands/install.js +52 -1
  102. package/ccw/dist/commands/install.js.map +1 -1
  103. package/ccw/dist/commands/launcher.d.ts +2 -0
  104. package/ccw/dist/commands/launcher.d.ts.map +1 -0
  105. package/ccw/dist/commands/launcher.js +434 -0
  106. package/ccw/dist/commands/launcher.js.map +1 -0
  107. package/ccw/dist/tools/chain-loader.d.ts.map +1 -1
  108. package/ccw/dist/tools/chain-loader.js +457 -45
  109. package/ccw/dist/tools/chain-loader.js.map +1 -1
  110. package/ccw/dist/tools/skill-context-loader.d.ts.map +1 -1
  111. package/ccw/dist/tools/skill-context-loader.js +12 -26
  112. package/ccw/dist/tools/skill-context-loader.js.map +1 -1
  113. package/ccw/dist/types/chain-types.d.ts +41 -1
  114. package/ccw/dist/types/chain-types.d.ts.map +1 -1
  115. package/ccw/dist/utils/chain-visualizer.d.ts +13 -0
  116. package/ccw/dist/utils/chain-visualizer.d.ts.map +1 -0
  117. package/ccw/dist/utils/chain-visualizer.js +164 -0
  118. package/ccw/dist/utils/chain-visualizer.js.map +1 -0
  119. package/package.json +1 -1
  120. package/.claude/commands/cli/cli-init.md +0 -441
  121. package/.claude/commands/cli/codex-review.md +0 -361
  122. package/.claude/commands/flow-create.md +0 -663
  123. package/.claude/skills/ccw-chain/phases/analyze-with-file.md +0 -788
  124. package/.claude/skills/ccw-chain/phases/brainstorm/SKILL.md +0 -408
  125. package/.claude/skills/ccw-chain/phases/brainstorm/phases/01-mode-routing.md +0 -207
  126. package/.claude/skills/ccw-chain/phases/brainstorm/phases/02-artifacts.md +0 -567
  127. package/.claude/skills/ccw-chain/phases/brainstorm/phases/03-role-analysis.md +0 -748
  128. package/.claude/skills/ccw-chain/phases/brainstorm/phases/04-synthesis.md +0 -827
  129. package/.claude/skills/ccw-chain/phases/brainstorm-with-file.md +0 -482
  130. package/.claude/skills/ccw-chain/phases/collaborative-plan-with-file.md +0 -639
  131. package/.claude/skills/ccw-chain/phases/debug-with-file.md +0 -656
  132. package/.claude/skills/ccw-chain/phases/integration-test-cycle.md +0 -936
  133. package/.claude/skills/ccw-chain/phases/issue-convert-to-plan.md +0 -720
  134. package/.claude/skills/ccw-chain/phases/issue-discover.md +0 -483
  135. package/.claude/skills/ccw-chain/phases/issue-execute.md +0 -629
  136. package/.claude/skills/ccw-chain/phases/issue-from-brainstorm.md +0 -382
  137. package/.claude/skills/ccw-chain/phases/issue-plan.md +0 -343
  138. package/.claude/skills/ccw-chain/phases/issue-queue.md +0 -464
  139. package/.claude/skills/ccw-chain/phases/refactor-cycle.md +0 -852
  140. package/.claude/skills/ccw-chain/phases/review-cycle/SKILL.md +0 -132
  141. package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-fix.md +0 -760
  142. package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-module.md +0 -764
  143. package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-session.md +0 -775
  144. package/.claude/skills/ccw-chain/phases/roadmap-with-file.md +0 -544
  145. package/.claude/skills/ccw-chain/phases/spec-generator/SKILL.md +0 -338
  146. package/.claude/skills/ccw-chain/phases/spec-generator/phases/01-5-requirement-clarification.md +0 -404
  147. package/.claude/skills/ccw-chain/phases/spec-generator/phases/01-discovery.md +0 -257
  148. package/.claude/skills/ccw-chain/phases/spec-generator/phases/02-product-brief.md +0 -274
  149. package/.claude/skills/ccw-chain/phases/spec-generator/phases/03-requirements.md +0 -184
  150. package/.claude/skills/ccw-chain/phases/spec-generator/phases/04-architecture.md +0 -248
  151. package/.claude/skills/ccw-chain/phases/spec-generator/phases/05-epics-stories.md +0 -178
  152. package/.claude/skills/ccw-chain/phases/spec-generator/phases/06-5-auto-fix.md +0 -144
  153. package/.claude/skills/ccw-chain/phases/spec-generator/phases/06-readiness-check.md +0 -480
  154. package/.claude/skills/ccw-chain/phases/team-planex.md +0 -123
  155. package/.claude/skills/ccw-chain/phases/ui-design-explore-auto.md +0 -678
  156. package/.claude/skills/ccw-chain/phases/unified-execute-with-file.md +0 -870
  157. package/.claude/skills/ccw-chain/phases/workflow-execute/SKILL.md +0 -625
  158. package/.claude/skills/ccw-chain/phases/workflow-execute/phases/06-review.md +0 -215
  159. package/.claude/skills/ccw-chain/phases/workflow-lite-plan.md +0 -616
  160. package/.claude/skills/ccw-chain/phases/workflow-multi-cli-plan.md +0 -424
  161. package/.claude/skills/ccw-chain/phases/workflow-plan/SKILL.md +0 -466
  162. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/01-session-discovery.md +0 -99
  163. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/02-context-gathering.md +0 -338
  164. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/03-conflict-resolution.md +0 -422
  165. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/04-task-generation.md +0 -440
  166. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/05-plan-verify.md +0 -395
  167. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/06-replan.md +0 -594
  168. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/SKILL.md +0 -527
  169. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/01-session-discovery.md +0 -57
  170. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/02-context-gathering.md +0 -407
  171. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/03-test-coverage-analysis.md +0 -172
  172. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/04-conflict-resolution.md +0 -426
  173. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/05-tdd-task-generation.md +0 -473
  174. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/06-tdd-structure-validation.md +0 -189
  175. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/07-tdd-verify.md +0 -635
  176. package/.claude/skills/ccw-chain/phases/workflow-test-fix/SKILL.md +0 -482
  177. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/01-session-start.md +0 -60
  178. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/02-test-context-gather.md +0 -493
  179. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/03-test-concept-enhanced.md +0 -150
  180. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/04-test-task-generate.md +0 -346
  181. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/05-test-cycle-execute.md +0 -538
  182. package/.claude/skills/ccw-chain/specs/intent-patterns.md +0 -60
  183. package/.claude/skills/team-edict.zip +0 -0
@@ -1,480 +0,0 @@
1
- # Phase 6: Readiness Check
2
-
3
- Validate the complete specification package, generate quality report and executive summary, provide execution handoff options.
4
-
5
- ## Objective
6
-
7
- - Cross-document validation: completeness, consistency, traceability, depth
8
- - Generate quality scores per dimension
9
- - Produce readiness-report.md with issue list and traceability matrix
10
- - Produce spec-summary.md as one-page executive summary
11
- - Update all document frontmatter to `status: complete`
12
- - Present handoff options to execution workflows
13
-
14
- ## Input
15
-
16
- - All Phase 2-5 outputs: `product-brief.md`, `requirements/_index.md` (+ `REQ-*.md`, `NFR-*.md`), `architecture/_index.md` (+ `ADR-*.md`), `epics/_index.md` (+ `EPIC-*.md`)
17
- - Config: `{workDir}/spec-config.json`
18
- - Reference: `specs/quality-gates.md`
19
-
20
- ## Execution Steps
21
-
22
- ### Step 1: Load All Documents
23
-
24
- ```javascript
25
- const specConfig = JSON.parse(Read(`${workDir}/spec-config.json`));
26
- const productBrief = Read(`${workDir}/product-brief.md`);
27
- const requirementsIndex = Read(`${workDir}/requirements/_index.md`);
28
- const architectureIndex = Read(`${workDir}/architecture/_index.md`);
29
- const epicsIndex = Read(`${workDir}/epics/_index.md`);
30
- const qualityGates = Read('specs/quality-gates.md');
31
-
32
- // Load individual files for deep validation
33
- const reqFiles = Glob(`${workDir}/requirements/REQ-*.md`);
34
- const nfrFiles = Glob(`${workDir}/requirements/NFR-*.md`);
35
- const adrFiles = Glob(`${workDir}/architecture/ADR-*.md`);
36
- const epicFiles = Glob(`${workDir}/epics/EPIC-*.md`);
37
- ```
38
-
39
- ### Step 2: Cross-Document Validation via Gemini CLI
40
-
41
- ```javascript
42
- Bash({
43
- command: `ccw cli -p "PURPOSE: Validate specification package for completeness, consistency, traceability, and depth.
44
- Success: Comprehensive quality report with scores, issues, and traceability matrix.
45
-
46
- DOCUMENTS TO VALIDATE:
47
-
48
- === PRODUCT BRIEF ===
49
- ${productBrief.slice(0, 3000)}
50
-
51
- === REQUIREMENTS INDEX (${reqFiles.length} REQ + ${nfrFiles.length} NFR files) ===
52
- ${requirementsIndex.slice(0, 3000)}
53
-
54
- === ARCHITECTURE INDEX (${adrFiles.length} ADR files) ===
55
- ${architectureIndex.slice(0, 2500)}
56
-
57
- === EPICS INDEX (${epicFiles.length} EPIC files) ===
58
- ${epicsIndex.slice(0, 2500)}
59
-
60
- QUALITY CRITERIA (from quality-gates.md):
61
- ${qualityGates.slice(0, 2000)}
62
-
63
- TASK:
64
- Perform 4-dimension validation:
65
-
66
- 1. COMPLETENESS (25%):
67
- - All required sections present in each document?
68
- - All template fields filled with substantive content?
69
- - Score 0-100 with specific gaps listed
70
-
71
- 2. CONSISTENCY (25%):
72
- - Terminology uniform across documents?
73
- - Terminology glossary compliance: all core terms used consistently per glossary.json definitions?
74
- - No synonym drift (e.g., "user" vs "client" vs "consumer" for same concept)?
75
- - User personas consistent?
76
- - Scope consistent (PRD does not exceed brief)?
77
- - Scope containment: PRD requirements do not exceed product brief's defined scope?
78
- - Non-Goals respected: no requirement or story contradicts explicit Non-Goals?
79
- - Tech stack references match between architecture and epics?
80
- - Score 0-100 with inconsistencies listed
81
-
82
- 3. TRACEABILITY (25%):
83
- - Every goal has >= 1 requirement?
84
- - Every Must requirement has architecture coverage?
85
- - Every Must requirement appears in >= 1 story?
86
- - ADR choices reflected in epics?
87
- - Build traceability matrix: Goal -> Requirement -> Architecture -> Epic/Story
88
- - Score 0-100 with orphan items listed
89
-
90
- 4. DEPTH (25%):
91
- - Acceptance criteria specific and testable?
92
- - Architecture decisions justified with alternatives?
93
- - Stories estimable by dev team?
94
- - Score 0-100 with vague areas listed
95
-
96
- ALSO:
97
- - List all issues found, classified as Error/Warning/Info
98
- - Generate overall weighted score
99
- - Determine gate: Pass (>=80) / Review (60-79) / Fail (<60)
100
-
101
- MODE: analysis
102
- EXPECTED: JSON-compatible output with: dimension scores, overall score, gate, issues list (severity + description + location), traceability matrix
103
- CONSTRAINTS: Be thorough but fair. Focus on actionable issues.
104
- " --tool gemini --mode analysis`,
105
- run_in_background: true
106
- });
107
-
108
- // Wait for CLI result
109
- ```
110
-
111
- ### Step 3: Generate readiness-report.md
112
-
113
- ```javascript
114
- const frontmatterReport = `---
115
- session_id: ${specConfig.session_id}
116
- phase: 6
117
- document_type: readiness-report
118
- status: complete
119
- generated_at: ${new Date().toISOString()}
120
- stepsCompleted: ["load-all", "cross-validation", "scoring", "report-generation"]
121
- version: 1
122
- dependencies:
123
- - product-brief.md
124
- - requirements/_index.md
125
- - architecture/_index.md
126
- - epics/_index.md
127
- ---`;
128
-
129
- // Report content from CLI validation output:
130
- // - Quality Score Summary (4 dimensions + overall)
131
- // - Gate Decision (Pass/Review/Fail)
132
- // - Issue List (grouped by severity: Error, Warning, Info)
133
- // - Traceability Matrix (Goal -> Req -> Arch -> Epic/Story)
134
- // - Recommendations for improvement
135
-
136
- Write(`${workDir}/readiness-report.md`, `${frontmatterReport}\n\n${reportContent}`);
137
- ```
138
-
139
- ### Step 4: Generate spec-summary.md
140
-
141
- ```javascript
142
- const frontmatterSummary = `---
143
- session_id: ${specConfig.session_id}
144
- phase: 6
145
- document_type: spec-summary
146
- status: complete
147
- generated_at: ${new Date().toISOString()}
148
- stepsCompleted: ["synthesis"]
149
- version: 1
150
- dependencies:
151
- - product-brief.md
152
- - requirements/_index.md
153
- - architecture/_index.md
154
- - epics/_index.md
155
- - readiness-report.md
156
- ---`;
157
-
158
- // One-page executive summary:
159
- // - Product Name & Vision (from product-brief.md)
160
- // - Problem & Target Users (from product-brief.md)
161
- // - Key Requirements count (Must/Should/Could from requirements.md)
162
- // - Architecture Style & Tech Stack (from architecture.md)
163
- // - Epic Overview (count, MVP scope from epics.md)
164
- // - Quality Score (from readiness-report.md)
165
- // - Recommended Next Step
166
- // - File manifest with links
167
-
168
- Write(`${workDir}/spec-summary.md`, `${frontmatterSummary}\n\n${summaryContent}`);
169
- ```
170
-
171
- ### Step 5: Update All Document Status
172
-
173
- ```javascript
174
- // Update frontmatter status to 'complete' in all documents (directories + single files)
175
- // product-brief.md is a single file
176
- const singleFiles = ['product-brief.md'];
177
- singleFiles.forEach(doc => {
178
- const content = Read(`${workDir}/${doc}`);
179
- Write(`${workDir}/${doc}`, content.replace(/status: draft/, 'status: complete'));
180
- });
181
-
182
- // Update all files in directories (index + individual files)
183
- const dirFiles = [
184
- ...Glob(`${workDir}/requirements/*.md`),
185
- ...Glob(`${workDir}/architecture/*.md`),
186
- ...Glob(`${workDir}/epics/*.md`)
187
- ];
188
- dirFiles.forEach(filePath => {
189
- const content = Read(filePath);
190
- if (content.includes('status: draft')) {
191
- Write(filePath, content.replace(/status: draft/, 'status: complete'));
192
- }
193
- });
194
-
195
- // Update spec-config.json
196
- specConfig.phasesCompleted.push({
197
- phase: 6,
198
- name: "readiness-check",
199
- output_file: "readiness-report.md",
200
- completed_at: new Date().toISOString()
201
- });
202
- Write(`${workDir}/spec-config.json`, JSON.stringify(specConfig, null, 2));
203
- ```
204
-
205
- ### Step 6: Handoff Options
206
-
207
- ```javascript
208
- AskUserQuestion({
209
- questions: [
210
- {
211
- question: "Specification package is complete. What would you like to do next?",
212
- header: "Next Step",
213
- multiSelect: false,
214
- options: [
215
- {
216
- label: "Execute via lite-plan",
217
- description: "Start implementing with /workflow-lite-plan, one Epic at a time"
218
- },
219
- {
220
- label: "Create roadmap",
221
- description: "Generate execution roadmap with /workflow:req-plan-with-file"
222
- },
223
- {
224
- label: "Full planning",
225
- description: "Detailed planning with /workflow-plan for the full scope"
226
- },
227
- {
228
- label: "Create Issues",
229
- description: "Generate issues for each Epic via /issue:new"
230
- },
231
- {
232
- label: "Iterate & improve",
233
- description: "Re-run failed phases based on readiness report issues (max 2 iterations)"
234
- }
235
- ]
236
- }
237
- ]
238
- });
239
-
240
- // Based on user selection, execute the corresponding handoff:
241
-
242
- if (selection === "Execute via lite-plan") {
243
- // lite-plan accepts a text description directly
244
- // Read first MVP Epic from individual EPIC-*.md files
245
- const epicFiles = Glob(`${workDir}/epics/EPIC-*.md`);
246
- const firstMvpFile = epicFiles.find(f => {
247
- const content = Read(f);
248
- return content.includes('mvp: true');
249
- });
250
- const epicContent = Read(firstMvpFile);
251
- const title = extractTitle(epicContent); // First # heading
252
- const description = extractSection(epicContent, "Description");
253
- Skill(skill="workflow-lite-plan", args=`"${title}: ${description}"`)
254
- }
255
-
256
- if (selection === "Full planning" || selection === "Create roadmap") {
257
- // === Bridge: Build brainstorm_artifacts compatible structure ===
258
- // Reads from directory-based outputs (individual files), maps to .brainstorming/ format
259
- // for context-search-agent auto-discovery → action-planning-agent consumption.
260
-
261
- // Step A: Read spec documents from directories
262
- const specSummary = Read(`${workDir}/spec-summary.md`);
263
- const productBrief = Read(`${workDir}/product-brief.md`);
264
- const requirementsIndex = Read(`${workDir}/requirements/_index.md`);
265
- const architectureIndex = Read(`${workDir}/architecture/_index.md`);
266
- const epicsIndex = Read(`${workDir}/epics/_index.md`);
267
-
268
- // Read individual EPIC files (already split — direct mapping to feature-specs)
269
- const epicFiles = Glob(`${workDir}/epics/EPIC-*.md`);
270
-
271
- // Step B: Build structured description from spec-summary
272
- const structuredDesc = `GOAL: ${extractGoal(specSummary)}
273
- SCOPE: ${extractScope(specSummary)}
274
- CONTEXT: Generated from spec session ${specConfig.session_id}. Source: ${workDir}/`;
275
-
276
- // Step C: Create WFS session (provides session directory + .brainstorming/)
277
- Skill(skill="workflow:session:start", args=`--auto "${structuredDesc}"`)
278
- // → Produces sessionId (WFS-xxx) and session directory at .workflow/active/{sessionId}/
279
-
280
- // Step D: Create .brainstorming/ bridge files
281
- const brainstormDir = `.workflow/active/${sessionId}/.brainstorming`;
282
- Bash(`mkdir -p "${brainstormDir}/feature-specs"`);
283
-
284
- // D.1: guidance-specification.md (highest priority — action-planning-agent reads first)
285
- // Synthesized from spec-summary + product-brief + architecture/requirements indexes
286
- Write(`${brainstormDir}/guidance-specification.md`, `
287
- # ${specConfig.seed_analysis.problem_statement} - Confirmed Guidance Specification
288
-
289
- **Source**: spec-generator session ${specConfig.session_id}
290
- **Generated**: ${new Date().toISOString()}
291
- **Spec Directory**: ${workDir}
292
-
293
- ## 1. Project Positioning & Goals
294
- ${extractSection(productBrief, "Vision")}
295
- ${extractSection(productBrief, "Goals")}
296
-
297
- ## 2. Requirements Summary
298
- ${extractSection(requirementsIndex, "Functional Requirements")}
299
-
300
- ## 3. Architecture Decisions
301
- ${extractSection(architectureIndex, "Architecture Decision Records")}
302
- ${extractSection(architectureIndex, "Technology Stack")}
303
-
304
- ## 4. Implementation Scope
305
- ${extractSection(epicsIndex, "Epic Overview")}
306
- ${extractSection(epicsIndex, "MVP Scope")}
307
-
308
- ## Feature Decomposition
309
- ${extractSection(epicsIndex, "Traceability Matrix")}
310
-
311
- ## Appendix: Source Documents
312
- | Document | Path | Description |
313
- |----------|------|-------------|
314
- | Product Brief | ${workDir}/product-brief.md | Vision, goals, scope |
315
- | Requirements | ${workDir}/requirements/ | _index.md + REQ-*.md + NFR-*.md |
316
- | Architecture | ${workDir}/architecture/ | _index.md + ADR-*.md |
317
- | Epics | ${workDir}/epics/ | _index.md + EPIC-*.md |
318
- | Readiness Report | ${workDir}/readiness-report.md | Quality validation |
319
- `);
320
-
321
- // D.2: feature-index.json (each EPIC file mapped to a Feature)
322
- // Path: feature-specs/feature-index.json (matches context-search-agent discovery)
323
- // Directly read from individual EPIC-*.md files (no monolithic parsing needed)
324
- const features = epicFiles.map(epicFile => {
325
- const content = Read(epicFile);
326
- const fm = parseFrontmatter(content); // Extract YAML frontmatter
327
- const basename = path.basename(epicFile, '.md'); // EPIC-001-slug
328
- const epicNum = fm.id.replace('EPIC-', ''); // 001
329
- const slug = basename.replace(/^EPIC-\d+-/, ''); // slug
330
- return {
331
- id: `F-${epicNum}`,
332
- slug: slug,
333
- name: extractTitle(content),
334
- description: extractSection(content, "Description"),
335
- priority: fm.mvp ? "High" : "Medium",
336
- spec_path: `${brainstormDir}/feature-specs/F-${epicNum}-${slug}.md`,
337
- source_epic: fm.id,
338
- source_file: epicFile
339
- };
340
- });
341
- Write(`${brainstormDir}/feature-specs/feature-index.json`, JSON.stringify({
342
- version: "1.0",
343
- source: "spec-generator",
344
- spec_session: specConfig.session_id,
345
- features,
346
- cross_cutting_specs: []
347
- }, null, 2));
348
-
349
- // D.3: Feature-spec files — directly adapt from individual EPIC-*.md files
350
- // Since Epics are already individual documents, transform format directly
351
- // Filename pattern: F-{num}-{slug}.md (matches context-search-agent glob F-*-*.md)
352
- features.forEach(feature => {
353
- const epicContent = Read(feature.source_file);
354
- Write(feature.spec_path, `
355
- # Feature Spec: ${feature.source_epic} - ${feature.name}
356
-
357
- **Source**: ${feature.source_file}
358
- **Priority**: ${feature.priority === "High" ? "MVP" : "Post-MVP"}
359
-
360
- ## Description
361
- ${extractSection(epicContent, "Description")}
362
-
363
- ## Stories
364
- ${extractSection(epicContent, "Stories")}
365
-
366
- ## Requirements
367
- ${extractSection(epicContent, "Requirements")}
368
-
369
- ## Architecture
370
- ${extractSection(epicContent, "Architecture")}
371
- `);
372
- });
373
-
374
- // Step E: Invoke downstream workflow
375
- // context-search-agent will auto-discover .brainstorming/ files
376
- // → context-package.json.brainstorm_artifacts populated
377
- // → action-planning-agent loads guidance_specification (P1) + feature_index (P2)
378
- if (selection === "Full planning") {
379
- Skill(skill="workflow-plan", args=`"${structuredDesc}"`)
380
- } else {
381
- Skill(skill="workflow:req-plan-with-file", args=`"${extractGoal(specSummary)}"`)
382
- }
383
- }
384
-
385
- if (selection === "Create Issues") {
386
- // For each EPIC file, create an issue (read directly from individual files)
387
- const epicFiles = Glob(`${workDir}/epics/EPIC-*.md`);
388
- epicFiles.forEach(epicFile => {
389
- const content = Read(epicFile);
390
- const title = extractTitle(content);
391
- const description = extractSection(content, "Description");
392
- Skill(skill="issue:new", args=`"${title}: ${description}"`)
393
- });
394
- }
395
-
396
- // If user selects "Other": Export only or return to specific phase
397
-
398
- if (selection === "Iterate & improve") {
399
- // Check iteration count
400
- if (specConfig.iteration_count >= 2) {
401
- // Max iterations reached, force handoff
402
- // Present handoff options again without iterate
403
- return;
404
- }
405
-
406
- // Update iteration tracking
407
- specConfig.iteration_count = (specConfig.iteration_count || 0) + 1;
408
- specConfig.iteration_history.push({
409
- iteration: specConfig.iteration_count,
410
- timestamp: new Date().toISOString(),
411
- readiness_score: overallScore,
412
- errors_found: errorCount,
413
- phases_to_fix: affectedPhases
414
- });
415
- Write(`${workDir}/spec-config.json`, JSON.stringify(specConfig, null, 2));
416
-
417
- // Proceed to Phase 6.5: Auto-Fix
418
- // Read phases/06-5-auto-fix.md and execute
419
- }
420
- ```
421
-
422
- #### Helper Functions Reference (pseudocode)
423
-
424
- The following helper functions are used in the handoff bridge. They operate on markdown content from individual spec files:
425
-
426
- ```javascript
427
- // Extract title from a markdown document (first # heading)
428
- function extractTitle(markdown) {
429
- // Return the text after the first # heading (e.g., "# EPIC-001: Title" → "Title")
430
- }
431
-
432
- // Parse YAML frontmatter from markdown (between --- markers)
433
- function parseFrontmatter(markdown) {
434
- // Return object with: id, priority, mvp, size, requirements, architecture, dependencies
435
- }
436
-
437
- // Extract GOAL/SCOPE from spec-summary frontmatter or ## sections
438
- function extractGoal(specSummary) { /* Return the Vision/Goal line */ }
439
- function extractScope(specSummary) { /* Return the Scope/MVP boundary */ }
440
-
441
- // Extract a named ## section from a markdown document
442
- function extractSection(markdown, sectionName) {
443
- // Return content between ## {sectionName} and next ## heading
444
- }
445
- ```
446
-
447
- ## Output
448
-
449
- - **File**: `readiness-report.md` - Quality validation report
450
- - **File**: `spec-summary.md` - One-page executive summary
451
- - **Format**: Markdown with YAML frontmatter
452
-
453
- ## Quality Checklist
454
-
455
- - [ ] All document directories validated (product-brief, requirements/, architecture/, epics/)
456
- - [ ] All frontmatter parseable and valid (index + individual files)
457
- - [ ] Cross-references checked (relative links between directories)
458
- - [ ] Overall quality score calculated
459
- - [ ] No unresolved Error-severity issues
460
- - [ ] Traceability matrix generated
461
- - [ ] spec-summary.md created
462
- - [ ] All document statuses updated to 'complete' (all files in all directories)
463
- - [ ] Handoff options presented
464
-
465
- ## Completion
466
-
467
- This is the final phase. The specification package is ready for execution handoff.
468
-
469
- ### Output Files Manifest
470
-
471
- | Path | Phase | Description |
472
- |------|-------|-------------|
473
- | `spec-config.json` | 1 | Session configuration and state |
474
- | `discovery-context.json` | 1 | Codebase exploration (optional) |
475
- | `product-brief.md` | 2 | Product brief with multi-perspective synthesis |
476
- | `requirements/` | 3 | Directory: `_index.md` + `REQ-*.md` + `NFR-*.md` |
477
- | `architecture/` | 4 | Directory: `_index.md` + `ADR-*.md` |
478
- | `epics/` | 5 | Directory: `_index.md` + `EPIC-*.md` |
479
- | `readiness-report.md` | 6 | Quality validation report |
480
- | `spec-summary.md` | 6 | One-page executive summary |
@@ -1,123 +0,0 @@
1
- ---
2
- name: team-planex
3
- description: Unified team skill for plan-and-execute pipeline. Pure router — coordinator always. Beat model is coordinator-only in monitor.md. Triggers on "team planex".
4
- allowed-tools: Agent(*), TaskCreate(*), TaskList(*), TaskGet(*), TaskUpdate(*), TeamCreate(*), TeamDelete(*), SendMessage(*), AskUserQuestion(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*), mcp__ccw-tools__team_msg(*)
5
- ---
6
-
7
- # Team PlanEx
8
-
9
- Unified team skill: plan-and-execute pipeline for issue-based development. Built on **team-worker agent architecture** — coordinator orchestrates, workers are team-worker agents loading role-specific instructions from `roles/<role>/role.md`.
10
-
11
- ## Architecture
12
-
13
- ```
14
- Skill(skill="team-planex", args="task description")
15
- |
16
- SKILL.md (this file) = Router
17
- |
18
- +--------------+--------------+
19
- | |
20
- no --role flag --role <name>
21
- | |
22
- Coordinator Worker
23
- roles/coordinator/role.md roles/<name>/role.md
24
- |
25
- +-- analyze -> dispatch -> spawn workers -> STOP
26
- |
27
- +---------------+---------------+
28
- v v
29
- [planner] [executor]
30
- (team-worker agent, (team-worker agent,
31
- loads roles/planner/role.md) loads roles/executor/role.md)
32
- ```
33
-
34
- ## Role Registry
35
-
36
- | Role | Path | Prefix | Inner Loop |
37
- |------|------|--------|------------|
38
- | coordinator | [roles/coordinator/role.md](roles/coordinator/role.md) | — | — |
39
- | planner | [roles/planner/role.md](roles/planner/role.md) | PLAN-* | true |
40
- | executor | [roles/executor/role.md](roles/executor/role.md) | EXEC-* | true |
41
-
42
- ## Role Router
43
-
44
- Parse `$ARGUMENTS`:
45
- - Has `--role <name>` → Read `roles/<name>/role.md`, execute Phase 2-4
46
- - No `--role` → `@roles/coordinator/role.md`, execute entry router
47
-
48
- ## Shared Constants
49
-
50
- - **Session prefix**: `PEX`
51
- - **Session path**: `.workflow/.team/PEX-<slug>-<date>/`
52
- - **CLI tools**: `ccw cli --mode analysis` (read-only), `ccw cli --mode write` (modifications)
53
- - **Message bus**: `mcp__ccw-tools__team_msg(session_id=<session-id>, ...)`
54
-
55
- ## Worker Spawn Template
56
-
57
- Coordinator spawns workers using this template:
58
-
59
- ```
60
- Agent({
61
- subagent_type: "team-worker",
62
- description: "Spawn <role> worker",
63
- team_name: "planex",
64
- name: "<role>",
65
- run_in_background: true,
66
- prompt: `## Role Assignment
67
- role: <role>
68
- role_spec: <skill_root>/roles/<role>/role.md
69
- session: <session-folder>
70
- session_id: <session-id>
71
- team_name: planex
72
- requirement: <task-description>
73
- inner_loop: <true|false>
74
- execution_method: <codex|gemini>
75
-
76
- Read role_spec file (@<skill_root>/roles/<role>/role.md) to load Phase 2-4 domain instructions.
77
- Execute built-in Phase 1 (task discovery) -> role Phase 2-4 -> built-in Phase 5 (report).`
78
- })
79
- ```
80
-
81
- ## User Commands
82
-
83
- | Command | Action |
84
- |---------|--------|
85
- | `check` / `status` | View execution status graph |
86
- | `resume` / `continue` | Advance to next step |
87
- | `add <issue-ids or --text '...' or --plan path>` | Append new tasks to planner queue |
88
-
89
- ## Session Directory
90
-
91
- ```
92
- .workflow/.team/PEX-<slug>-<YYYY-MM-DD>/
93
- ├── .msg/
94
- │ ├── messages.jsonl # Message bus log
95
- │ └── meta.json # Session state
96
- ├── task-analysis.json # Coordinator analyze output
97
- ├── artifacts/
98
- │ └── solutions/ # Planner solution output per issue
99
- │ ├── <issueId-1>.json
100
- │ └── <issueId-N>.json
101
- └── wisdom/ # Cross-task knowledge
102
- ├── learnings.md
103
- ├── decisions.md
104
- ├── conventions.md
105
- └── issues.md
106
- ```
107
-
108
- ## Specs Reference
109
-
110
- - [specs/pipelines.md](specs/pipelines.md) — Pipeline definitions, task metadata registry, execution method selection
111
-
112
- ## Error Handling
113
-
114
- | Scenario | Resolution |
115
- |----------|------------|
116
- | Unknown command | Error with available command list |
117
- | Role not found | Error with role registry |
118
- | Role spec file not found | Error with expected path (roles/<name>/role.md) |
119
- | team-worker agent unavailable | Error: requires .claude/agents/team-worker.md |
120
- | Planner issue planning failure | Retry once, then skip to next issue |
121
- | Executor impl failure | Report to coordinator, continue with next EXEC-* task |
122
- | Pipeline stall | Coordinator monitors, escalate to user |
123
- | Worker no response | Report waiting task, suggest user `resume` |