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
@@ -102,6 +102,25 @@ Determine mode from user request before spawning any agent.
102
102
 
103
103
  ## Phase Execution
104
104
 
105
+ ### Progress Tracking Initialization
106
+
107
+ Before spawning any agent, initialize progress tracking. For comprehensive mode, all 4 phases; for quick-scan, Phase 1 only:
108
+
109
+ ```
110
+ // Comprehensive mode
111
+ functions.update_plan([
112
+ { id: "phase-1", title: "Phase 1: Supply Chain Scan", status: "in_progress" },
113
+ { id: "phase-2", title: "Phase 2: OWASP Review", status: "pending" },
114
+ { id: "phase-3", title: "Phase 3: Threat Modeling (STRIDE)", status: "pending" },
115
+ { id: "phase-4", title: "Phase 4: Report & Tracking", status: "pending" }
116
+ ])
117
+
118
+ // Quick-scan mode
119
+ functions.update_plan([
120
+ { id: "phase-1", title: "Phase 1: Supply Chain Scan", status: "in_progress" }
121
+ ])
122
+ ```
123
+
105
124
  ### Phase 1: Supply Chain Scan
106
125
 
107
126
  **Objective**: Detect low-hanging security risks in dependencies, secrets, CI/CD pipelines, and LLM integrations.
@@ -154,6 +173,10 @@ const phase1Result = wait_agent({ targets: ["security-auditor"], timeout_ms: 120
154
173
  |----------|-------------|
155
174
  | `.workflow/.security/supply-chain-report.json` | Dependency, secrets, CI/CD, and LLM findings |
156
175
 
176
+ **Progress (comprehensive)**: `functions.update_plan([{id: "phase-1", status: "completed"}, {id: "phase-2", status: "in_progress"}])`
177
+
178
+ **Progress (quick-scan)**: `functions.update_plan([{id: "phase-1", status: "completed"}])`
179
+
157
180
  ---
158
181
 
159
182
  ### Quick-Scan Gate (quick-scan mode only)
@@ -210,6 +233,8 @@ const phase2Result = wait_agent({ targets: ["security-auditor"], timeout_ms: 360
210
233
  |----------|-------------|
211
234
  | `.workflow/.security/owasp-findings.json` | OWASP findings with owasp_id, severity, file:line, evidence, remediation |
212
235
 
236
+ **Progress**: `functions.update_plan([{id: "phase-2", status: "completed"}, {id: "phase-3", status: "in_progress"}])`
237
+
213
238
  ---
214
239
 
215
240
  ### Phase 3: Threat Modeling (comprehensive mode only)
@@ -250,6 +275,8 @@ const phase3Result = wait_agent({ targets: ["security-auditor"], timeout_ms: 360
250
275
  |----------|-------------|
251
276
  | `.workflow/.security/threat-model.json` | STRIDE threat model with components, trust boundaries, attack surface |
252
277
 
278
+ **Progress**: `functions.update_plan([{id: "phase-3", status: "completed"}, {id: "phase-4", status: "in_progress"}])`
279
+
253
280
  ---
254
281
 
255
282
  ### Phase 4: Report & Tracking (comprehensive mode only)
@@ -297,6 +324,8 @@ const phase4Result = wait_agent({ targets: ["security-auditor"], timeout_ms: 300
297
324
  |----------|-------------|
298
325
  | `.workflow/.security/audit-report-<date>.json` | Full scored report with trend, top risks, remediation priority |
299
326
 
327
+ **Progress**: `functions.update_plan([{id: "phase-4", status: "completed"}])`
328
+
300
329
  ---
301
330
 
302
331
  ### Comprehensive Gate (comprehensive mode only)
@@ -136,7 +136,7 @@ Target files:
136
136
  `)
137
137
 
138
138
  if (!AUTO_YES) {
139
- const answer = request_user_input({
139
+ const answer = functions.request_user_input({
140
140
  questions: [{
141
141
  header: "确认同步",
142
142
  id: "confirm_sync",
@@ -83,6 +83,20 @@ Utility subagents callable by ship-operator (not separate pipeline stages):
83
83
 
84
84
  ## Phase Execution
85
85
 
86
+ ### Progress Tracking Initialization
87
+
88
+ Before spawning any agent, initialize progress tracking for all phases:
89
+
90
+ ```
91
+ functions.update_plan([
92
+ { id: "phase-1", title: "Phase 1: Pre-Flight Checks", status: "in_progress" },
93
+ { id: "phase-2", title: "Phase 2: Code Review", status: "pending" },
94
+ { id: "phase-3", title: "Phase 3: Version Bump", status: "pending" },
95
+ { id: "phase-4", title: "Phase 4: Changelog & Commit", status: "pending" },
96
+ { id: "phase-5", title: "Phase 5: PR Creation", status: "pending" }
97
+ ])
98
+ ```
99
+
86
100
  ### Phase 1: Pre-Flight Checks
87
101
 
88
102
  **Objective**: Validate that the repository is in a shippable state — confirm clean working tree, appropriate branch, passing tests, and successful build.
@@ -135,6 +149,8 @@ const phase1Result = wait_agent({ targets: ["ship-operator"], timeout_ms: 300000
135
149
  | preflight-report JSON | Pass/fail per check, blockers list |
136
150
  | Gate status | pass / fail / blocked |
137
151
 
152
+ **Progress**: `functions.update_plan([{id: "phase-1", status: "completed"}, {id: "phase-2", status: "in_progress"}])`
153
+
138
154
  ---
139
155
 
140
156
  ### Phase 2: Code Review
@@ -187,6 +203,8 @@ const phase2Result = wait_agent({ targets: ["ship-operator"], timeout_ms: 600000
187
203
  | Review summary JSON | Risk level, risk factors, AI review recommendation, issues |
188
204
  | Gate status | pass / fail / warn / blocked |
189
205
 
206
+ **Progress**: `functions.update_plan([{id: "phase-2", status: "completed"}, {id: "phase-3", status: "in_progress"}])`
207
+
190
208
  ---
191
209
 
192
210
  ### Phase 3: Version Bump
@@ -239,6 +257,8 @@ const phase3Result = wait_agent({ targets: ["ship-operator"], timeout_ms: 300000
239
257
  | Version change record JSON | version_file, previous_version, new_version, bump_type, bump_source |
240
258
  | Gate status | pass / fail / needs_context / blocked |
241
259
 
260
+ **Progress**: `functions.update_plan([{id: "phase-3", status: "completed"}, {id: "phase-4", status: "in_progress"}])`
261
+
242
262
  ---
243
263
 
244
264
  ### Phase 4: Changelog & Commit
@@ -294,6 +314,8 @@ const phase4Result = wait_agent({ targets: ["ship-operator"], timeout_ms: 300000
294
314
  | Commit record JSON | changelog_entry, commit_sha, commit_message, pushed_to |
295
315
  | Gate status | pass / fail / blocked |
296
316
 
317
+ **Progress**: `functions.update_plan([{id: "phase-4", status: "completed"}, {id: "phase-5", status: "in_progress"}])`
318
+
297
319
  ---
298
320
 
299
321
  ### Phase 5: PR Creation
@@ -353,6 +375,8 @@ const phase5Result = wait_agent({ targets: ["ship-operator"], timeout_ms: 300000
353
375
  | PR record JSON | pr_url, pr_title, target_branch, source_branch, linked_issues |
354
376
  | Final completion status | DONE / DONE_WITH_CONCERNS / BLOCKED |
355
377
 
378
+ **Progress**: `functions.update_plan([{id: "phase-5", status: "completed"}])`
379
+
356
380
  ---
357
381
 
358
382
  ## Lifecycle Management
@@ -196,7 +196,7 @@ if (useInteractiveWizard) {
196
196
  if (AUTO_YES) {
197
197
  dimension = 'specs' // Default to project specs in auto mode
198
198
  } else {
199
- const dimensionAnswer = request_user_input({
199
+ const dimensionAnswer = functions.request_user_input({
200
200
  questions: [{
201
201
  header: "Dimension",
202
202
  id: "dimension",
@@ -216,7 +216,7 @@ if (useInteractiveWizard) {
216
216
  if (AUTO_YES) {
217
217
  scope = 'project' // Default to project scope in auto mode
218
218
  } else {
219
- const scopeAnswer = request_user_input({
219
+ const scopeAnswer = functions.request_user_input({
220
220
  questions: [{
221
221
  header: "Scope",
222
222
  id: "scope",
@@ -236,7 +236,7 @@ if (useInteractiveWizard) {
236
236
  if (AUTO_YES) {
237
237
  category = 'general' // Default to general in auto mode
238
238
  } else {
239
- const categoryAnswer = request_user_input({
239
+ const categoryAnswer = functions.request_user_input({
240
240
  questions: [{
241
241
  header: "Category",
242
242
  id: "category",
@@ -261,7 +261,7 @@ if (useInteractiveWizard) {
261
261
  if (AUTO_YES) {
262
262
  type = 'convention' // Default to convention in auto mode
263
263
  } else {
264
- const typeAnswer = request_user_input({
264
+ const typeAnswer = functions.request_user_input({
265
265
  questions: [{
266
266
  header: "Rule Type",
267
267
  id: "rule_type",
@@ -286,7 +286,7 @@ if (useInteractiveWizard) {
286
286
  console.log("Error: Rule text is required in auto mode. Provide rule text as argument.")
287
287
  return
288
288
  }
289
- const contentAnswer = request_user_input({
289
+ const contentAnswer = functions.request_user_input({
290
290
  questions: [{
291
291
  header: "Content",
292
292
  id: "content",
@@ -117,6 +117,8 @@ Input Parsing:
117
117
  |- If continue: read spec-config.json, resume from first incomplete phase
118
118
  |- If new: proceed to Phase 1
119
119
 
120
+ Phase 0 → 1: functions.update_plan([{id:"phase-0",status:"completed"},{id:"phase-1",status:"in_progress"}])
121
+
120
122
  Phase 1: Discovery & Seed Analysis
121
123
  |- Ref: phases/01-discovery.md
122
124
  |- Generate session ID: SPEC-{slug}-{YYYY-MM-DD}
@@ -130,6 +132,8 @@ Phase 1: Discovery & Seed Analysis
130
132
  |- User confirmation (interactive, -y skips)
131
133
  |- Output: spec-config.json, discovery-context.json (optional)
132
134
 
135
+ Phase 1 → 1.5: functions.update_plan([{id:"phase-1",status:"completed"},{id:"phase-1.5",status:"in_progress"}])
136
+
133
137
  Phase 1.5: Requirement Expansion & Clarification
134
138
  |- Ref: phases/01-5-requirement-clarification.md
135
139
  |- CLI gap analysis: completeness scoring, missing dimensions detection
@@ -140,6 +144,8 @@ Phase 1.5: Requirement Expansion & Clarification
140
144
  |- Auto mode (-y): CLI auto-expansion without interaction
141
145
  |- Output: refined-requirements.json
142
146
 
147
+ Phase 1.5 → 2: functions.update_plan([{id:"phase-1.5",status:"completed"},{id:"phase-2",status:"in_progress"}])
148
+
143
149
  Phase 2: Product Brief [AGENT: doc-generator]
144
150
  |- spawn_agent({ task_name: "doc-gen-p2", fork_context: false, message: <context envelope> })
145
151
  |- Agent reads: phases/02-product-brief.md
@@ -149,6 +155,8 @@ Phase 2: Product Brief [AGENT: doc-generator]
149
155
  |- close_agent({ target: "doc-gen-p2" })
150
156
  |- Orchestrator validates: files exist, spec-config.json updated
151
157
 
158
+ Phase 2 → 3: functions.update_plan([{id:"phase-2",status:"completed"},{id:"phase-3",status:"in_progress"}])
159
+
152
160
  Phase 3: Requirements / PRD [AGENT: doc-generator]
153
161
  |- spawn_agent({ task_name: "doc-gen-p3", fork_context: false, message: <context envelope> })
154
162
  |- Agent reads: phases/03-requirements.md
@@ -158,6 +166,8 @@ Phase 3: Requirements / PRD [AGENT: doc-generator]
158
166
  |- close_agent({ target: "doc-gen-p3" })
159
167
  |- Orchestrator validates: directory exists, file count matches
160
168
 
169
+ Phase 3 → 4: functions.update_plan([{id:"phase-3",status:"completed"},{id:"phase-4",status:"in_progress"}])
170
+
161
171
  Phase 4: Architecture [AGENT: doc-generator]
162
172
  |- spawn_agent({ task_name: "doc-gen-p4", fork_context: false, message: <context envelope> })
163
173
  |- Agent reads: phases/04-architecture.md
@@ -167,6 +177,8 @@ Phase 4: Architecture [AGENT: doc-generator]
167
177
  |- close_agent({ target: "doc-gen-p4" })
168
178
  |- Orchestrator validates: directory exists, ADR files present
169
179
 
180
+ Phase 4 → 5: functions.update_plan([{id:"phase-4",status:"completed"},{id:"phase-5",status:"in_progress"}])
181
+
170
182
  Phase 5: Epics & Stories [AGENT: doc-generator]
171
183
  |- spawn_agent({ task_name: "doc-gen-p5", fork_context: false, message: <context envelope> })
172
184
  |- Agent reads: phases/05-epics-stories.md
@@ -176,6 +188,8 @@ Phase 5: Epics & Stories [AGENT: doc-generator]
176
188
  |- close_agent({ target: "doc-gen-p5" })
177
189
  |- Orchestrator validates: directory exists, MVP epics present
178
190
 
191
+ Phase 5 → 6: functions.update_plan([{id:"phase-5",status:"completed"},{id:"phase-6",status:"in_progress"}])
192
+
179
193
  Phase 6: Readiness Check [INLINE + ENHANCED]
180
194
  |- Ref: phases/06-readiness-check.md
181
195
  |- Gemini CLI: cross-document validation (completeness, consistency, traceability)
@@ -196,6 +210,8 @@ Phase 6.5: Auto-Fix (conditional) [AGENT: doc-generator]
196
210
  |- Re-run Phase 6 validation
197
211
  |- Max 2 iterations, then force handoff
198
212
 
213
+ Phase 6 → 7: functions.update_plan([{id:"phase-6",status:"completed"},{id:"phase-7",status:"in_progress"}])
214
+
199
215
  Phase 7: Issue Export [INLINE]
200
216
  |- Ref: phases/07-issue-export.md
201
217
  |- Read EPIC-*.md files, assign waves (MVP->wave-1, others->wave-2)
@@ -205,6 +221,8 @@ Phase 7: Issue Export [INLINE]
205
221
  |- Update spec-config.json with issue_ids
206
222
  |- Handoff: team-planex, wave-1 only, view issues, done
207
223
 
224
+ Phase 7 complete: functions.update_plan([{id:"phase-7",status:"completed"}])
225
+
208
226
  Complete: Full specification package with issues ready for execution
209
227
 
210
228
  Phase 6/7 -> Handoff Bridge (conditional, based on user selection):
@@ -221,7 +239,7 @@ Phase 6/7 -> Handoff Bridge (conditional, based on user selection):
221
239
 
222
240
  ## Directory Setup
223
241
 
224
- ```
242
+ ```javascript
225
243
  // Session ID generation
226
244
  const slug = topic.toLowerCase().replace(/[^a-z0-9\u4e00-\u9fff]+/g, '-').slice(0, 40);
227
245
  const date = new Date().toISOString().slice(0, 10);
@@ -229,6 +247,19 @@ const sessionId = `SPEC-${slug}-${date}`;
229
247
  const workDir = `.workflow/.spec/${sessionId}`;
230
248
 
231
249
  Bash(`mkdir -p "${workDir}"`);
250
+
251
+ // Initialize progress tracking (MANDATORY)
252
+ functions.update_plan([
253
+ { id: "phase-0", title: "Phase 0: Specification Study", status: "in_progress" },
254
+ { id: "phase-1", title: "Phase 1: Discovery", status: "pending" },
255
+ { id: "phase-1.5", title: "Phase 1.5: Req Expansion", status: "pending" },
256
+ { id: "phase-2", title: "Phase 2: Product Brief", status: "pending" },
257
+ { id: "phase-3", title: "Phase 3: Requirements (PRD)", status: "pending" },
258
+ { id: "phase-4", title: "Phase 4: Architecture", status: "pending" },
259
+ { id: "phase-5", title: "Phase 5: Epics & Stories", status: "pending" },
260
+ { id: "phase-6", title: "Phase 6: Readiness Check", status: "pending" },
261
+ { id: "phase-7", title: "Phase 7: Issue Export", status: "pending" }
262
+ ])
232
263
  ```
233
264
 
234
265
  ## Output Structure
@@ -294,7 +325,7 @@ Bash(`mkdir -p "${workDir}"`);
294
325
 
295
326
  ## Core Rules
296
327
 
297
- 1. **Start Immediately**: First action is Phase 0 (spec study), then Phase 1
328
+ 1. **Start Immediately**: First action is `functions.update_plan` initialization, then Phase 0 (spec study), then Phase 1
298
329
  2. **Progressive Phase Loading**: Read phase docs ONLY when that phase is about to execute
299
330
  3. **Auto-Continue**: All phases run autonomously; proceed to next phase after current completes
300
331
  4. **Parse Every Output**: Extract required data from each phase for next phase context
@@ -139,7 +139,7 @@ while (!userSatisfied && requirementState.discussion_rounds < 5) {
139
139
  // Format questions and suggestions from gapAnalysis for display
140
140
  // Present as a structured summary to the user
141
141
 
142
- request_user_input({
142
+ functions.request_user_input({
143
143
  questions: [
144
144
  {
145
145
  header: "Req Expand",
@@ -192,7 +192,7 @@ CONSTRAINTS: 避免重复已回答的问题,聚焦未覆盖的领域
192
192
  // If status === "ready_for_confirmation", break to confirmation step
193
193
  // If status === "need_more_discussion", present follow-up questions
194
194
 
195
- request_user_input({
195
+ functions.request_user_input({
196
196
  questions: [
197
197
  {
198
198
  header: "Follow-up",
@@ -297,7 +297,7 @@ if (!autoMode) {
297
297
  // Build confirmation summary from requirementState
298
298
  const summary = buildConfirmationSummary(requirementState);
299
299
 
300
- request_user_input({
300
+ functions.request_user_input({
301
301
  questions: [
302
302
  {
303
303
  header: "Confirm",
@@ -178,7 +178,7 @@ Schema:
178
178
  ```javascript
179
179
  if (!autoMode) {
180
180
  // Confirm problem statement and select depth
181
- request_user_input({
181
+ functions.request_user_input({
182
182
  questions: [
183
183
  {
184
184
  header: "Problem",
@@ -175,7 +175,7 @@ if (!autoMode) {
175
175
  // - Confirm vision statement
176
176
  // - Resolve any conflicts between perspectives
177
177
  // - Adjust scope if needed
178
- request_user_input({
178
+ functions.request_user_input({
179
179
  questions: [
180
180
  {
181
181
  header: "Review",
@@ -121,7 +121,7 @@ CONSTRAINTS: Be genuinely critical. Focus on requirements that would block imple
121
121
  if (!autoMode) {
122
122
  // Present requirements grouped by initial priority
123
123
  // Allow user to adjust MoSCoW labels
124
- request_user_input({
124
+ functions.request_user_input({
125
125
  questions: [
126
126
  {
127
127
  header: "Must-Have",
@@ -152,7 +152,7 @@ CONSTRAINTS: Be genuinely critical, not just validating. Focus on actionable imp
152
152
  if (!autoMode) {
153
153
  // Present ADRs with review feedback to user
154
154
  // For each ADR where review raised concerns:
155
- request_user_input({
155
+ functions.request_user_input({
156
156
  questions: [
157
157
  {
158
158
  header: "ADR Review",
@@ -131,7 +131,7 @@ CONSTRAINTS: Focus on issues that would block execution planning. Be specific ab
131
131
  ```javascript
132
132
  if (!autoMode) {
133
133
  // Present Epic overview table and dependency diagram
134
- request_user_input({
134
+ functions.request_user_input({
135
135
  questions: [
136
136
  {
137
137
  header: "Epics",
@@ -310,7 +310,7 @@ Write(`${workDir}/spec-config.json`, JSON.stringify(specConfig, null, 2));
310
310
  ### Step 6: Handoff Options
311
311
 
312
312
  ```javascript
313
- request_user_input({
313
+ functions.request_user_input({
314
314
  questions: [
315
315
  {
316
316
  header: "Next Step",
@@ -253,7 +253,7 @@ Write(`${workDir}/spec-config.json`, JSON.stringify(specConfig, null, 2));
253
253
  ### Step 7: Handoff Options
254
254
 
255
255
  ```javascript
256
- const answer = request_user_input({
256
+ const answer = functions.request_user_input({
257
257
  questions: [
258
258
  {
259
259
  header: "Next Step",