claude-code-workflow 6.3.48 → 6.3.49

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 (211) hide show
  1. package/.claude/CLAUDE.md +6 -8
  2. package/.claude/agents/action-planning-agent.md +28 -45
  3. package/.claude/agents/cli-lite-planning-agent.md +93 -1
  4. package/.claude/agents/code-developer.md +144 -27
  5. package/.claude/commands/ccw-coordinator.md +175 -21
  6. package/.claude/commands/ccw-debug.md +832 -0
  7. package/.claude/commands/ccw.md +90 -9
  8. package/.claude/commands/cli/cli-init.md +1 -0
  9. package/.claude/commands/issue/convert-to-plan.md +718 -0
  10. package/.claude/commands/issue/from-brainstorm.md +382 -0
  11. package/.claude/commands/memory/tips.md +332 -0
  12. package/.claude/commands/workflow/analyze-with-file.md +804 -0
  13. package/.claude/commands/workflow/brainstorm/auto-parallel.md +18 -43
  14. package/.claude/commands/workflow/brainstorm/role-analysis.md +705 -0
  15. package/.claude/commands/workflow/brainstorm-with-file.md +1153 -0
  16. package/.claude/commands/workflow/debug-with-file.md +7 -5
  17. package/.claude/commands/workflow/execute.md +6 -4
  18. package/.claude/commands/workflow/lite-plan.md +2 -2
  19. package/.claude/commands/workflow/plan-verify.md +162 -327
  20. package/.claude/commands/workflow/plan.md +162 -26
  21. package/.claude/commands/workflow/replan.md +78 -2
  22. package/.claude/commands/workflow/{review-fix.md → review-cycle-fix.md} +6 -6
  23. package/.claude/commands/workflow/review-module-cycle.md +2 -2
  24. package/.claude/commands/workflow/review-session-cycle.md +2 -2
  25. package/.claude/commands/workflow/tools/conflict-resolution.md +16 -26
  26. package/.claude/commands/workflow/tools/context-gather.md +81 -118
  27. package/.claude/commands/workflow/tools/task-generate-agent.md +94 -10
  28. package/.claude/skills/ccw-help/command.json +4 -4
  29. package/.claude/skills/lite-skill-generator/SKILL.md +650 -0
  30. package/.claude/skills/lite-skill-generator/templates/simple-skill.md +68 -0
  31. package/.claude/skills/lite-skill-generator/templates/style-guide.md +64 -0
  32. package/.claude/skills/skill-generator/SKILL.md +277 -85
  33. package/.claude/skills/skill-generator/phases/01-requirements-discovery.md +4 -15
  34. package/.claude/skills/skill-generator/phases/02-structure-generation.md +72 -17
  35. package/.claude/skills/skill-generator/phases/03-phase-generation.md +218 -51
  36. package/.claude/skills/skill-generator/phases/04-specs-templates.md +111 -41
  37. package/.claude/skills/skill-generator/phases/05-validation.md +139 -56
  38. package/.claude/skills/skill-generator/templates/autonomous-action.md +78 -268
  39. package/.claude/skills/skill-generator/templates/autonomous-orchestrator.md +14 -0
  40. package/.claude/skills/skill-generator/templates/code-analysis-action.md +12 -0
  41. package/.claude/skills/skill-generator/templates/llm-action.md +12 -0
  42. package/.claude/skills/skill-generator/templates/script-template.md +368 -0
  43. package/.claude/skills/skill-generator/templates/sequential-phase.md +14 -0
  44. package/.claude/skills/skill-generator/templates/skill-md.md +14 -0
  45. package/.claude/skills/skill-tuning/SKILL.md +130 -266
  46. package/.claude/skills/skill-tuning/phases/orchestrator.md +95 -283
  47. package/.claude/skills/skill-tuning/specs/problem-taxonomy.md +90 -198
  48. package/.claude/skills/skill-tuning/specs/tuning-strategies.md +193 -1345
  49. package/.claude/workflows/cli-templates/schemas/plan-verify-agent-schema.json +47 -0
  50. package/.claude/workflows/cli-templates/schemas/verify-json-schema.json +158 -0
  51. package/.claude/workflows/cli-tools-usage.md +1 -1
  52. package/.codex/AGENTS.md +1 -3
  53. package/.codex/prompts/analyze-with-file.md +607 -0
  54. package/.codex/prompts/brainstorm-to-cycle.md +455 -0
  55. package/.codex/prompts/brainstorm-with-file.md +933 -0
  56. package/.codex/prompts/debug-with-file.md +15 -20
  57. package/.codex/skills/ccw-cli-tools/SKILL.md +559 -0
  58. package/ccw/dist/commands/cli.d.ts.map +1 -1
  59. package/ccw/dist/commands/cli.js +29 -5
  60. package/ccw/dist/commands/cli.js.map +1 -1
  61. package/ccw/dist/commands/issue.d.ts +2 -0
  62. package/ccw/dist/commands/issue.d.ts.map +1 -1
  63. package/ccw/dist/commands/issue.js +62 -20
  64. package/ccw/dist/commands/issue.js.map +1 -1
  65. package/ccw/dist/config/litellm-api-config-manager.d.ts.map +1 -1
  66. package/ccw/dist/config/litellm-api-config-manager.js +5 -3
  67. package/ccw/dist/config/litellm-api-config-manager.js.map +1 -1
  68. package/ccw/dist/config/litellm-provider-models.d.ts +73 -0
  69. package/ccw/dist/config/litellm-provider-models.d.ts.map +1 -0
  70. package/ccw/dist/config/litellm-provider-models.js +172 -0
  71. package/ccw/dist/config/litellm-provider-models.js.map +1 -0
  72. package/ccw/dist/config/provider-models.d.ts +25 -51
  73. package/ccw/dist/config/provider-models.d.ts.map +1 -1
  74. package/ccw/dist/config/provider-models.js +84 -149
  75. package/ccw/dist/config/provider-models.js.map +1 -1
  76. package/ccw/dist/config/storage-paths.d.ts.map +1 -1
  77. package/ccw/dist/config/storage-paths.js +23 -5
  78. package/ccw/dist/config/storage-paths.js.map +1 -1
  79. package/ccw/dist/core/auth/csrf-middleware.js +3 -3
  80. package/ccw/dist/core/auth/csrf-middleware.js.map +1 -1
  81. package/ccw/dist/core/dashboard-generator.d.ts.map +1 -1
  82. package/ccw/dist/core/dashboard-generator.js +3 -1
  83. package/ccw/dist/core/dashboard-generator.js.map +1 -1
  84. package/ccw/dist/core/routes/claude-routes.d.ts.map +1 -1
  85. package/ccw/dist/core/routes/claude-routes.js +206 -14
  86. package/ccw/dist/core/routes/claude-routes.js.map +1 -1
  87. package/ccw/dist/core/routes/cli-routes.d.ts.map +1 -1
  88. package/ccw/dist/core/routes/cli-routes.js.map +1 -1
  89. package/ccw/dist/core/routes/commands-routes.d.ts +7 -0
  90. package/ccw/dist/core/routes/commands-routes.d.ts.map +1 -0
  91. package/ccw/dist/core/routes/commands-routes.js +480 -0
  92. package/ccw/dist/core/routes/commands-routes.js.map +1 -0
  93. package/ccw/dist/core/routes/model-routes.d.ts +11 -0
  94. package/ccw/dist/core/routes/model-routes.d.ts.map +1 -0
  95. package/ccw/dist/core/routes/model-routes.js +112 -0
  96. package/ccw/dist/core/routes/model-routes.js.map +1 -0
  97. package/ccw/dist/core/routes/nav-status-routes.d.ts.map +1 -1
  98. package/ccw/dist/core/routes/nav-status-routes.js +84 -1
  99. package/ccw/dist/core/routes/nav-status-routes.js.map +1 -1
  100. package/ccw/dist/core/routes/provider-routes.d.ts +11 -0
  101. package/ccw/dist/core/routes/provider-routes.d.ts.map +1 -0
  102. package/ccw/dist/core/routes/provider-routes.js +67 -0
  103. package/ccw/dist/core/routes/provider-routes.js.map +1 -0
  104. package/ccw/dist/core/routes/skills-routes.d.ts.map +1 -1
  105. package/ccw/dist/core/routes/skills-routes.js +219 -7
  106. package/ccw/dist/core/routes/skills-routes.js.map +1 -1
  107. package/ccw/dist/core/routes/system-routes.d.ts.map +1 -1
  108. package/ccw/dist/core/routes/system-routes.js +58 -6
  109. package/ccw/dist/core/routes/system-routes.js.map +1 -1
  110. package/ccw/dist/core/server.d.ts.map +1 -1
  111. package/ccw/dist/core/server.js +13 -0
  112. package/ccw/dist/core/server.js.map +1 -1
  113. package/ccw/dist/mcp-server/index.js +2 -2
  114. package/ccw/dist/mcp-server/index.js.map +1 -1
  115. package/ccw/dist/tools/claude-cli-tools.d.ts +48 -11
  116. package/ccw/dist/tools/claude-cli-tools.d.ts.map +1 -1
  117. package/ccw/dist/tools/claude-cli-tools.js +146 -50
  118. package/ccw/dist/tools/claude-cli-tools.js.map +1 -1
  119. package/ccw/dist/tools/cli-config-manager.d.ts +1 -13
  120. package/ccw/dist/tools/cli-config-manager.d.ts.map +1 -1
  121. package/ccw/dist/tools/cli-config-manager.js +3 -27
  122. package/ccw/dist/tools/cli-config-manager.js.map +1 -1
  123. package/ccw/dist/tools/cli-executor-core.d.ts.map +1 -1
  124. package/ccw/dist/tools/cli-executor-core.js +7 -2
  125. package/ccw/dist/tools/cli-executor-core.js.map +1 -1
  126. package/ccw/dist/tools/cli-executor-state.d.ts.map +1 -1
  127. package/ccw/dist/tools/cli-history-store.d.ts +11 -0
  128. package/ccw/dist/tools/cli-history-store.d.ts.map +1 -1
  129. package/ccw/dist/tools/cli-history-store.js +82 -2
  130. package/ccw/dist/tools/cli-history-store.js.map +1 -1
  131. package/ccw/dist/tools/command-registry.d.ts +7 -0
  132. package/ccw/dist/tools/command-registry.d.ts.map +1 -1
  133. package/ccw/dist/tools/command-registry.js +14 -1
  134. package/ccw/dist/tools/command-registry.js.map +1 -1
  135. package/ccw/dist/tools/generate-module-docs.d.ts.map +1 -1
  136. package/ccw/dist/tools/generate-module-docs.js +11 -7
  137. package/ccw/dist/tools/generate-module-docs.js.map +1 -1
  138. package/ccw/dist/tools/litellm-executor.d.ts +1 -0
  139. package/ccw/dist/tools/litellm-executor.d.ts.map +1 -1
  140. package/ccw/dist/tools/litellm-executor.js +11 -9
  141. package/ccw/dist/tools/litellm-executor.js.map +1 -1
  142. package/ccw/dist/types/skill-types.d.ts +97 -0
  143. package/ccw/dist/types/skill-types.d.ts.map +1 -0
  144. package/ccw/dist/types/skill-types.js +6 -0
  145. package/ccw/dist/types/skill-types.js.map +1 -0
  146. package/ccw/src/commands/cli.ts +36 -5
  147. package/ccw/src/commands/issue.ts +81 -26
  148. package/ccw/src/config/litellm-api-config-manager.ts +5 -3
  149. package/ccw/src/config/litellm-provider-models.ts +222 -0
  150. package/ccw/src/config/provider-models.ts +91 -190
  151. package/ccw/src/config/storage-paths.ts +20 -5
  152. package/ccw/src/core/auth/csrf-middleware.ts +3 -3
  153. package/ccw/src/core/dashboard-generator.ts +3 -1
  154. package/ccw/src/core/routes/claude-routes.ts +233 -15
  155. package/ccw/src/core/routes/cli-routes.ts +2 -3
  156. package/ccw/src/core/routes/commands-routes.ts +620 -0
  157. package/ccw/src/core/routes/nav-status-routes.ts +95 -1
  158. package/ccw/src/core/routes/provider-routes.ts +78 -0
  159. package/ccw/src/core/routes/skills-routes.ts +266 -45
  160. package/ccw/src/core/routes/system-routes.ts +102 -50
  161. package/ccw/src/core/server.ts +13 -0
  162. package/ccw/src/mcp-server/index.ts +2 -2
  163. package/ccw/src/templates/dashboard-css/18-cli-settings.css +35 -0
  164. package/ccw/src/templates/dashboard-css/37-commands.css +193 -0
  165. package/ccw/src/templates/dashboard-js/components/navigation.js +4 -0
  166. package/ccw/src/templates/dashboard-js/i18n.js +116 -0
  167. package/ccw/src/templates/dashboard-js/views/cli-manager.js +249 -4
  168. package/ccw/src/templates/dashboard-js/views/commands-manager.js +503 -0
  169. package/ccw/src/templates/dashboard-js/views/issue-manager.js +7 -7
  170. package/ccw/src/templates/dashboard-js/views/mcp-manager.js +2 -7
  171. package/ccw/src/templates/dashboard-js/views/skills-manager.js +164 -23
  172. package/ccw/src/templates/dashboard.html +7 -0
  173. package/ccw/src/tools/claude-cli-tools.ts +170 -56
  174. package/ccw/src/tools/cli-config-manager.ts +2 -33
  175. package/ccw/src/tools/cli-executor-core.ts +8 -2
  176. package/ccw/src/tools/cli-history-store.ts +92 -2
  177. package/ccw/src/tools/command-registry.ts +16 -1
  178. package/ccw/src/tools/generate-module-docs.ts +11 -7
  179. package/ccw/src/tools/litellm-executor.ts +13 -9
  180. package/ccw/src/types/skill-types.ts +99 -0
  181. package/package.json +1 -1
  182. package/.claude/commands/enhance-prompt.md +0 -93
  183. package/.claude/commands/memory/code-map-memory.md +0 -687
  184. package/.claude/commands/memory/docs.md +0 -615
  185. package/.claude/commands/memory/load-skill-memory.md +0 -182
  186. package/.claude/commands/memory/skill-memory.md +0 -525
  187. package/.claude/commands/memory/swagger-docs.md +0 -773
  188. package/.claude/commands/memory/tech-research-rules.md +0 -310
  189. package/.claude/commands/memory/workflow-skill-memory.md +0 -517
  190. package/.claude/commands/task/breakdown.md +0 -208
  191. package/.claude/commands/task/create.md +0 -152
  192. package/.claude/commands/task/execute.md +0 -270
  193. package/.claude/commands/task/replan.md +0 -441
  194. package/.claude/commands/version.md +0 -254
  195. package/.claude/commands/workflow/action-plan-verify.md +0 -485
  196. package/.claude/commands/workflow/brainstorm/api-designer.md +0 -587
  197. package/.claude/commands/workflow/brainstorm/data-architect.md +0 -220
  198. package/.claude/commands/workflow/brainstorm/product-manager.md +0 -200
  199. package/.claude/commands/workflow/brainstorm/product-owner.md +0 -200
  200. package/.claude/commands/workflow/brainstorm/scrum-master.md +0 -200
  201. package/.claude/commands/workflow/brainstorm/subject-matter-expert.md +0 -200
  202. package/.claude/commands/workflow/brainstorm/system-architect.md +0 -389
  203. package/.claude/commands/workflow/brainstorm/ui-designer.md +0 -221
  204. package/.claude/commands/workflow/brainstorm/ux-expert.md +0 -221
  205. package/.claude/commands/workflow/debug.md +0 -331
  206. package/.claude/commands/workflow/develop-with-file.md +0 -1044
  207. package/.claude/skills/ccw-loop/README.md +0 -303
  208. package/.claude/skills/skill-generator/templates/script-bash.md +0 -277
  209. package/.claude/skills/skill-generator/templates/script-python.md +0 -198
  210. package/.codex/prompts/debug.md +0 -318
  211. package/ccw/src/core/routes/mcp-routes.ts.backup +0 -549
@@ -17,6 +17,8 @@ Enhanced evidence-based debugging with **documented exploration process**. Recor
17
17
 
18
18
  **Core workflow**: Explore → Document → Log → Analyze → Correct Understanding → Fix → Verify
19
19
 
20
+ **Scope**: Adds temporary debug logging to observe program state; cleans up all instrumentation after resolution. Does NOT execute code injection, security testing, or modify program behavior.
21
+
20
22
  **Key enhancements over /workflow:debug**:
21
23
  - **understanding.md**: Timeline of exploration and learning
22
24
  - **Gemini-assisted correction**: Validates and corrects hypotheses
@@ -44,7 +46,7 @@ Explore Mode:
44
46
  ├─ Locate error source in codebase
45
47
  ├─ Document initial understanding in understanding.md
46
48
  ├─ Generate testable hypotheses with Gemini validation
47
- ├─ Add NDJSON logging instrumentation
49
+ ├─ Add NDJSON debug logging statements
48
50
  └─ Output: Hypothesis list + await user reproduction
49
51
 
50
52
  Analyze Mode:
@@ -216,9 +218,9 @@ Save Gemini output to `hypotheses.json`:
216
218
  }
217
219
  ```
218
220
 
219
- **Step 1.4: Add NDJSON Instrumentation**
221
+ **Step 1.4: Add NDJSON Debug Logging**
220
222
 
221
- For each hypothesis, add logging (same as original debug command).
223
+ For each hypothesis, add temporary logging statements to observe program state at key execution points. Use NDJSON format for structured log parsing. These are read-only observations that do not modify program behavior.
222
224
 
223
225
  **Step 1.5: Update understanding.md**
224
226
 
@@ -441,7 +443,7 @@ What we learned from this debugging session:
441
443
 
442
444
  **Step 3.3: Cleanup**
443
445
 
444
- Remove debug instrumentation (same as original command).
446
+ Remove all temporary debug logging statements added during investigation. Verify no instrumentation code remains in production code.
445
447
 
446
448
  ---
447
449
 
@@ -647,7 +649,7 @@ Why is config value None during update?
647
649
 
648
650
  | Feature | /workflow:debug | /workflow:debug-with-file |
649
651
  |---------|-----------------|---------------------------|
650
- | NDJSON logging | ✅ | ✅ |
652
+ | NDJSON debug logging | ✅ | ✅ |
651
653
  | Hypothesis generation | Manual | Gemini-assisted |
652
654
  | Exploration documentation | ❌ | ✅ understanding.md |
653
655
  | Understanding evolution | ❌ | ✅ Timeline + corrections |
@@ -477,7 +477,7 @@ Task(subagent_type="{meta.agent}",
477
477
  - TODO List: {session.todo_list_path}
478
478
  - Summaries: {session.summaries_dir}
479
479
 
480
- **Execution**: Read task JSON → Parse flow_controlExecute implementation_approach → Update TODO_LIST.md → Generate summary",
480
+ **Execution**: Read task JSON → Execute pre_analysisCheck execution_config.method(CLI: handoff to CLI tool | Agent: direct implementation) → Update TODO_LIST.md → Generate summary",
481
481
  description="Implement: {task.id}")
482
482
  ```
483
483
 
@@ -486,9 +486,11 @@ Task(subagent_type="{meta.agent}",
486
486
  - `[FLOW_CONTROL]`: Triggers flow_control.pre_analysis execution
487
487
 
488
488
  **Why Path-Based**: Agent (code-developer.md) autonomously:
489
- - Reads and parses task JSON (requirements, acceptance, flow_control)
490
- - Loads tech stack guidelines based on detected language
491
- - Executes pre_analysis steps and implementation_approach
489
+ - Reads and parses task JSON (requirements, acceptance, flow_control, execution_config)
490
+ - Executes pre_analysis steps (Phase 1: context gathering)
491
+ - Checks execution_config.method (Phase 2: determine mode)
492
+ - CLI mode: Builds handoff prompt and executes via ccw cli with resume strategy
493
+ - Agent mode: Directly implements using modification_points and logic_flow
492
494
  - Generates structured summary with integration points
493
495
 
494
496
  Embedding task content in prompt creates duplication and conflicts with agent's parsing logic.
@@ -72,8 +72,8 @@ Phase 2: Clarification (optional, multi-round)
72
72
 
73
73
  Phase 3: Planning (NO CODE EXECUTION - planning only)
74
74
  └─ Decision (based on Phase 1 complexity):
75
- ├─ Low → Load schema: cat ~/.claude/workflows/cli-templates/schemas/plan-json-schema.json → Direct Claude planning (following schema) → plan.json → MUST proceed to Phase 4
76
- └─ Medium/High → cli-lite-planning-agent → plan.json MUST proceed to Phase 4
75
+ ├─ Low → Load schema: cat ~/.claude/workflows/cli-templates/schemas/plan-json-schema.json → Direct Claude planning (following schema) → plan.json
76
+ └─ Medium/High → cli-lite-planning-agent → plan.json (agent internally executes quality check)
77
77
 
78
78
  Phase 4: Confirmation & Selection
79
79
  ├─ Display plan summary (tasks, complexity, estimated time)
@@ -150,378 +150,213 @@ Create internal representations (do not include raw artifacts in output):
150
150
  - Task-to-task dependencies (depends_on, blocks)
151
151
  - Requirement-level dependencies (from synthesis)
152
152
 
153
- ### 4. Detection Passes (Token-Efficient Analysis)
153
+ ### 4. Detection Passes (Agent-Driven Multi-Dimensional Analysis)
154
154
 
155
- **Token Budget Strategy**:
156
- - **Total Limit**: 50 findings maximum (aggregate remainder in overflow summary)
157
- - **Priority Allocation**: CRITICAL (unlimited) HIGH (15) MEDIUM (20) → LOW (15)
158
- - **Early Exit**: If CRITICAL findings > 0 in User Intent/Requirements Coverage, skip LOW/MEDIUM priority checks
155
+ **Execution Strategy**:
156
+ - Single `cli-explore-agent` invocation
157
+ - Agent executes multiple CLI analyses internally (different dimensions: A-H)
158
+ - Token Budget: 50 findings maximum (aggregate remainder in overflow summary)
159
+ - Priority Allocation: CRITICAL (unlimited) → HIGH (15) → MEDIUM (20) → LOW (15)
160
+ - Early Exit: If CRITICAL findings > 0 in User Intent/Requirements Coverage, skip LOW/MEDIUM checks
159
161
 
160
- **Execution Order** (Process in sequence; skip if token budget exhausted):
162
+ **Execution Order** (Agent orchestrates internally):
161
163
 
162
- 1. **Tier 1 (CRITICAL Path)**: A, B, C - User intent, coverage, consistency (process fully)
163
- 2. **Tier 2 (HIGH Priority)**: D, E - Dependencies, synthesis alignment (limit 15 findings total)
164
+ 1. **Tier 1 (CRITICAL Path)**: A, B, C - User intent, coverage, consistency (full analysis)
165
+ 2. **Tier 2 (HIGH Priority)**: D, E - Dependencies, synthesis alignment (limit 15 findings)
164
166
  3. **Tier 3 (MEDIUM Priority)**: F - Specification quality (limit 20 findings)
165
- 4. **Tier 4 (LOW Priority)**: G, H - Duplication, feasibility (limit 15 findings total)
167
+ 4. **Tier 4 (LOW Priority)**: G, H - Duplication, feasibility (limit 15 findings)
166
168
 
167
169
  ---
168
170
 
169
- #### A. User Intent Alignment (CRITICAL - Tier 1)
170
-
171
- - **Goal Alignment**: IMPL_PLAN objectives match user's original intent
172
- - **Scope Drift**: Plan covers user's stated scope without unauthorized expansion
173
- - **Success Criteria Match**: Plan's success criteria reflect user's expectations
174
- - **Intent Conflicts**: Tasks contradicting user's original objectives
175
-
176
- #### B. Requirements Coverage Analysis
177
-
178
- - **Orphaned Requirements**: Requirements in synthesis with zero associated tasks
179
- - **Unmapped Tasks**: Tasks with no clear requirement linkage
180
- - **NFR Coverage Gaps**: Non-functional requirements (performance, security, scalability) not reflected in tasks
181
-
182
- #### C. Consistency Validation
183
-
184
- - **Requirement Conflicts**: Tasks contradicting synthesis requirements
185
- - **Architecture Drift**: IMPL_PLAN architecture not matching synthesis ADRs
186
- - **Terminology Drift**: Same concept named differently across IMPL_PLAN and tasks
187
- - **Data Model Inconsistency**: Tasks referencing entities/fields not in synthesis data model
188
-
189
- #### D. Dependency Integrity
190
-
191
- - **Circular Dependencies**: Task A depends on B, B depends on C, C depends on A
192
- - **Missing Dependencies**: Task requires outputs from another task but no explicit dependency
193
- - **Broken Dependencies**: Task depends on non-existent task ID
194
- - **Logical Ordering Issues**: Implementation tasks before foundational setup without dependency note
195
-
196
- #### E. Synthesis Alignment
197
-
198
- - **Priority Conflicts**: High-priority synthesis requirements mapped to low-priority tasks
199
- - **Success Criteria Mismatch**: IMPL_PLAN success criteria not covering synthesis acceptance criteria
200
- - **Risk Mitigation Gaps**: Critical risks in synthesis without corresponding mitigation tasks
201
-
202
- #### F. Task Specification Quality
203
-
204
- - **Ambiguous Focus Paths**: Tasks with vague or missing focus_paths
205
- - **Underspecified Acceptance**: Tasks without clear acceptance criteria
206
- - **Missing Artifacts References**: Tasks not referencing relevant brainstorming artifacts in context.artifacts
207
- - **Weak Flow Control**: Tasks without clear implementation_approach or pre_analysis steps
208
- - **Missing Target Files**: Tasks without flow_control.target_files specification
209
-
210
- #### G. Duplication Detection
211
-
212
- - **Overlapping Task Scope**: Multiple tasks with nearly identical descriptions
213
- - **Redundant Requirements Coverage**: Same requirement covered by multiple tasks without clear partitioning
214
-
215
- #### H. Feasibility Assessment
216
-
217
- - **Complexity Misalignment**: Task marked "simple" but requires multiple file modifications
218
- - **Resource Conflicts**: Parallel tasks requiring same resources/files
219
- - **Skill Gap Risks**: Tasks requiring skills not in team capability assessment (from synthesis)
220
-
221
- ### 5. Severity Assignment
222
-
223
- Use this heuristic to prioritize findings:
224
-
225
- - **CRITICAL**:
226
- - Violates user's original intent (goal misalignment, scope drift)
227
- - Violates synthesis authority (requirement conflict)
228
- - Core requirement with zero coverage
229
- - Circular dependencies
230
- - Broken dependencies
231
-
232
- - **HIGH**:
233
- - NFR coverage gaps
234
- - Priority conflicts
235
- - Missing risk mitigation tasks
236
- - Ambiguous acceptance criteria
171
+ #### Phase 4.1: Launch Unified Verification Agent
172
+
173
+ ```javascript
174
+ Task(
175
+ subagent_type="cli-explore-agent",
176
+ run_in_background=false,
177
+ description="Multi-dimensional plan verification",
178
+ prompt=`
179
+ ## Plan Verification Task
180
+
181
+ ### MANDATORY FIRST STEPS
182
+ 1. Read: ~/.claude/workflows/cli-templates/schemas/plan-verify-agent-schema.json (dimensions & rules)
183
+ 2. Read: ~/.claude/workflows/cli-templates/schemas/verify-json-schema.json (output schema)
184
+ 3. Read: ${session_file} (user intent)
185
+ 4. Read: ${IMPL_PLAN} (implementation plan)
186
+ 5. Glob: ${task_dir}/*.json (task files)
187
+ 6. Glob: ${SYNTHESIS_DIR}/*/analysis.md (role analyses)
188
+
189
+ ### Execution Flow
190
+
191
+ **Load schema Execute tiered CLI analysis → Aggregate findings → Write JSON**
192
+
193
+ FOR each tier in [1, 2, 3, 4]:
194
+ - Load tier config from plan-verify-agent-schema.json
195
+ - Execute: ccw cli -p "PURPOSE: Verify dimensions {tier.dimensions}
196
+ TASK: {tier.checks from schema}
197
+ CONTEXT: @${session_dir}/**/*
198
+ EXPECTED: Findings JSON with dimension, severity, location, summary, recommendation
199
+ CONSTRAINTS: Limit {tier.limit} findings
200
+ " --tool gemini --mode analysis --rule {tier.rule}
201
+ - Parse findings, check early exit condition
202
+ - IF tier == 1 AND critical_count > 0: skip tier 3-4
203
+
204
+ ### Output
205
+ Write: ${process_dir}/verification-findings.json (follow verify-json-schema.json)
206
+ Return: Quality gate decision + 2-3 sentence summary
207
+ `
208
+ )
209
+ ```
237
210
 
238
- - **MEDIUM**:
239
- - Terminology drift
240
- - Missing artifacts references
241
- - Weak flow control
242
- - Logical ordering issues
211
+ ---
243
212
 
244
- - **LOW**:
245
- - Style/wording improvements
246
- - Minor redundancy not affecting execution
213
+ #### Phase 4.2: Load and Organize Findings
247
214
 
248
- ### 6. Produce Compact Analysis Report
215
+ ```javascript
216
+ // Load findings (single parse for all subsequent use)
217
+ const data = JSON.parse(Read(`${process_dir}/verification-findings.json`))
218
+ const { session_id, timestamp, verification_tiers_completed, findings, summary } = data
219
+ const { critical_count, high_count, medium_count, low_count, total_findings, coverage_percentage, recommendation } = summary
249
220
 
250
- **Report Generation**: Generate report content and save to file.
221
+ // Group by severity and dimension
222
+ const bySeverity = Object.groupBy(findings, f => f.severity)
223
+ const byDimension = Object.groupBy(findings, f => f.dimension)
251
224
 
252
- Output a Markdown report with the following structure:
225
+ // Dimension metadata (from schema)
226
+ const DIMS = {
227
+ A: "User Intent Alignment", B: "Requirements Coverage", C: "Consistency Validation",
228
+ D: "Dependency Integrity", E: "Synthesis Alignment", F: "Task Specification Quality",
229
+ G: "Duplication Detection", H: "Feasibility Assessment"
230
+ }
231
+ ```
253
232
 
254
- ```markdown
233
+ ### 5. Generate Report
234
+
235
+ ```javascript
236
+ // Helper: render dimension section
237
+ const renderDimension = (dim) => {
238
+ const items = byDimension[dim] || []
239
+ return items.length > 0
240
+ ? items.map(f => `### ${f.id}: ${f.summary}\n- **Severity**: ${f.severity}\n- **Location**: ${f.location.join(', ')}\n- **Recommendation**: ${f.recommendation}`).join('\n\n')
241
+ : `> ✅ No ${DIMS[dim]} issues detected.`
242
+ }
243
+
244
+ // Helper: render severity section
245
+ const renderSeverity = (severity, impact) => {
246
+ const items = bySeverity[severity] || []
247
+ return items.length > 0
248
+ ? items.map(f => `#### ${f.id}: ${f.summary}\n- **Dimension**: ${f.dimension_name}\n- **Location**: ${f.location.join(', ')}\n- **Impact**: ${impact}\n- **Recommendation**: ${f.recommendation}`).join('\n\n')
249
+ : `> ✅ No ${severity.toLowerCase()}-severity issues detected.`
250
+ }
251
+
252
+ // Build Markdown report
253
+ const fullReport = `
255
254
  # Plan Verification Report
256
255
 
257
- **Session**: WFS-{session-id}
258
- **Generated**: {timestamp}
259
- **Artifacts Analyzed**: role analysis documents, IMPL_PLAN.md, {N} task files
260
- **User Intent Analysis**: {user_intent_analysis or "SKIPPED: workflow-session.json not found"}
256
+ **Session**: WFS-${session_id} | **Generated**: ${timestamp}
257
+ **Tiers Completed**: ${verification_tiers_completed.join(', ')}
261
258
 
262
259
  ---
263
260
 
264
261
  ## Executive Summary
265
262
 
266
- ### Quality Gate Decision
267
-
268
263
  | Metric | Value | Status |
269
264
  |--------|-------|--------|
270
- | Overall Risk Level | CRITICAL \| HIGH \| MEDIUM \| LOW | {status_emoji} |
271
- | Critical Issues | {count} | 🔴 |
272
- | High Issues | {count} | 🟠 |
273
- | Medium Issues | {count} | 🟡 |
274
- | Low Issues | {count} | 🟢 |
275
-
276
- ### Recommendation
265
+ | Risk Level | ${critical_count > 0 ? 'CRITICAL' : high_count > 0 ? 'HIGH' : medium_count > 0 ? 'MEDIUM' : 'LOW'} | ${critical_count > 0 ? '🔴' : high_count > 0 ? '🟠' : medium_count > 0 ? '🟡' : '🟢'} |
266
+ | Critical/High/Medium/Low | ${critical_count}/${high_count}/${medium_count}/${low_count} | |
267
+ | Coverage | ${coverage_percentage}% | ${coverage_percentage >= 90 ? '🟢' : coverage_percentage >= 75 ? '🟡' : '🔴'} |
277
268
 
278
- **{RECOMMENDATION}**
279
-
280
- **Decision Rationale**:
281
- {brief explanation based on severity criteria}
282
-
283
- **Quality Gate Criteria**:
284
- - **BLOCK_EXECUTION**: Critical issues > 0 (must fix before proceeding)
285
- - **PROCEED_WITH_FIXES**: Critical = 0, High > 0 (fix recommended before execution)
286
- - **PROCEED_WITH_CAUTION**: Critical = 0, High = 0, Medium > 0 (proceed with awareness)
287
- - **PROCEED**: Only Low issues or None (safe to execute)
269
+ **Recommendation**: **${recommendation}**
288
270
 
289
271
  ---
290
272
 
291
273
  ## Findings Summary
292
274
 
293
- | ID | Category | Severity | Location(s) | Summary | Recommendation |
294
- |----|----------|----------|-------------|---------|----------------|
295
- | C1 | Coverage | CRITICAL | synthesis:FR-03 | Requirement "User auth" has zero task coverage | Add authentication implementation task |
296
- | H1 | Consistency | HIGH | IMPL-1.2 vs synthesis:ADR-02 | Task uses REST while synthesis specifies GraphQL | Align task with ADR-02 decision |
297
- | M1 | Specification | MEDIUM | IMPL-2.1 | Missing context.artifacts reference | Add @synthesis reference |
298
- | L1 | Duplication | LOW | IMPL-3.1, IMPL-3.2 | Similar scope | Consider merging |
299
-
300
- (Generate stable IDs prefixed by severity initial: C/H/M/L + number)
301
-
302
- ---
303
-
304
- ## User Intent Alignment Analysis
305
-
306
- {IF user_intent_analysis != "SKIPPED"}
307
-
308
- ### Goal Alignment
309
- - **User Intent**: {user_original_intent}
310
- - **IMPL_PLAN Objectives**: {plan_objectives}
311
- - **Alignment Status**: {ALIGNED/MISALIGNED/PARTIAL}
312
- - **Findings**: {specific alignment issues}
313
-
314
- ### Scope Verification
315
- - **User Scope**: {user_defined_scope}
316
- - **Plan Scope**: {plan_actual_scope}
317
- - **Drift Detection**: {NONE/MINOR/MAJOR}
318
- - **Findings**: {specific scope issues}
319
-
320
- {ELSE}
321
- > ⚠️ User intent alignment analysis was skipped because workflow-session.json was not found.
322
-
323
- {END IF}
275
+ | ID | Dimension | Severity | Location | Summary |
276
+ |----|-----------|----------|----------|---------|
277
+ ${findings.map(f => `| ${f.id} | ${f.dimension_name} | ${f.severity} | ${f.location.join(', ')} | ${f.summary} |`).join('\n')}
324
278
 
325
279
  ---
326
280
 
327
- ## Requirements Coverage Analysis
328
-
329
- ### Functional Requirements
281
+ ## Analysis by Dimension
330
282
 
331
- | Requirement ID | Requirement Summary | Has Task? | Task IDs | Priority Match | Notes |
332
- |----------------|---------------------|-----------|----------|----------------|-------|
333
- | FR-01 | User authentication | Yes | IMPL-1.1, IMPL-1.2 | Match | Complete |
334
- | FR-02 | Data export | Yes | IMPL-2.3 | Mismatch | High req → Med priority task |
335
- | FR-03 | Profile management | No | - | - | **CRITICAL: Zero coverage** |
336
-
337
- ### Non-Functional Requirements
338
-
339
- | Requirement ID | Requirement Summary | Has Task? | Task IDs | Notes |
340
- |----------------|---------------------|-----------|----------|-------|
341
- | NFR-01 | Response time <200ms | No | - | **HIGH: No performance tasks** |
342
- | NFR-02 | Security compliance | Yes | IMPL-4.1 | Complete |
343
-
344
- ### Business Requirements
345
-
346
- | Requirement ID | Requirement Summary | Has Task? | Task IDs | Notes |
347
- |----------------|---------------------|-----------|----------|-------|
348
- | BR-01 | Launch by Q2 | Yes | IMPL-1.* through IMPL-5.* | Timeline realistic |
349
-
350
- ### Coverage Metrics
351
-
352
- | Requirement Type | Total | Covered | Coverage % |
353
- |------------------|-------|---------|------------|
354
- | Functional | {count} | {count} | {percent}% |
355
- | Non-Functional | {count} | {count} | {percent}% |
356
- | Business | {count} | {count} | {percent}% |
357
- | **Overall** | **{total}** | **{covered}** | **{percent}%** |
283
+ ${['A','B','C','D','E','F','G','H'].map(d => `### ${d}. ${DIMS[d]}\n\n${renderDimension(d)}`).join('\n\n---\n\n')}
358
284
 
359
285
  ---
360
286
 
361
- ## Dependency Integrity
287
+ ## Findings by Severity
362
288
 
363
- ### Dependency Graph Analysis
289
+ ### CRITICAL (${critical_count})
290
+ ${renderSeverity('CRITICAL', 'Blocks execution')}
364
291
 
365
- **Circular Dependencies**: {None or List}
292
+ ### HIGH (${high_count})
293
+ ${renderSeverity('HIGH', 'Fix before execution recommended')}
366
294
 
367
- **Broken Dependencies**:
368
- - IMPL-2.3 depends on "IMPL-2.4" (non-existent)
295
+ ### MEDIUM (${medium_count})
296
+ ${renderSeverity('MEDIUM', 'Address during/after implementation')}
369
297
 
370
- **Missing Dependencies**:
371
- - IMPL-5.1 (integration test) has no dependency on IMPL-1.* (implementation tasks)
372
-
373
- **Logical Ordering Issues**:
374
- {List or "None detected"}
375
-
376
- ---
377
-
378
- ## Synthesis Alignment Issues
379
-
380
- | Issue Type | Synthesis Reference | IMPL_PLAN/Task | Impact | Recommendation |
381
- |------------|---------------------|----------------|--------|----------------|
382
- | Architecture Conflict | synthesis:ADR-01 (JWT auth) | IMPL_PLAN uses session cookies | HIGH | Update IMPL_PLAN to use JWT |
383
- | Priority Mismatch | synthesis:FR-02 (High) | IMPL-2.3 (Medium) | MEDIUM | Elevate task priority |
384
- | Missing Risk Mitigation | synthesis:Risk-03 (API rate limits) | No mitigation tasks | HIGH | Add rate limiting implementation task |
298
+ ### LOW (${low_count})
299
+ ${renderSeverity('LOW', 'Optional improvement')}
385
300
 
386
301
  ---
387
302
 
388
- ## Task Specification Quality
389
-
390
- ### Aggregate Statistics
303
+ ## Next Steps
391
304
 
392
- | Quality Dimension | Tasks Affected | Percentage |
393
- |-------------------|----------------|------------|
394
- | Missing Artifacts References | {count} | {percent}% |
395
- | Weak Flow Control | {count} | {percent}% |
396
- | Missing Target Files | {count} | {percent}% |
397
- | Ambiguous Focus Paths | {count} | {percent}% |
305
+ ${recommendation === 'BLOCK_EXECUTION' ? '🛑 **BLOCK**: Fix critical issues → Re-verify' :
306
+ recommendation === 'PROCEED_WITH_FIXES' ? '⚠️ **FIX RECOMMENDED**: Address high issues → Re-verify or Execute' :
307
+ '✅ **READY**: Proceed to /workflow:execute'}
398
308
 
399
- ### Sample Issues
309
+ Re-verify: \`/workflow:plan-verify --session ${session_id}\`
310
+ Execute: \`/workflow:execute --resume-session="${session_id}"\`
311
+ `
400
312
 
401
- - **IMPL-1.2**: No context.artifacts reference to synthesis
402
- - **IMPL-3.1**: Missing flow_control.target_files specification
403
- - **IMPL-4.2**: Vague focus_paths ["src/"] - needs refinement
404
-
405
- ---
406
-
407
- ## Feasibility Concerns
408
-
409
- | Concern | Tasks Affected | Issue | Recommendation |
410
- |---------|----------------|-------|----------------|
411
- | Skill Gap | IMPL-6.1, IMPL-6.2 | Requires Kubernetes expertise not in team | Add training task or external consultant |
412
- | Resource Conflict | IMPL-3.1, IMPL-3.2 | Both modify src/auth/service.ts in parallel | Add dependency or serialize |
413
-
414
- ---
415
-
416
- ## Detailed Findings by Severity
417
-
418
- ### CRITICAL Issues ({count})
419
-
420
- {Detailed breakdown of each critical issue with location, impact, and recommendation}
421
-
422
- ### HIGH Issues ({count})
423
-
424
- {Detailed breakdown of each high issue with location, impact, and recommendation}
425
-
426
- ### MEDIUM Issues ({count})
427
-
428
- {Detailed breakdown of each medium issue with location, impact, and recommendation}
429
-
430
- ### LOW Issues ({count})
431
-
432
- {Detailed breakdown of each low issue with location, impact, and recommendation}
433
-
434
- ---
435
-
436
- ## Metrics Summary
437
-
438
- | Metric | Value |
439
- |--------|-------|
440
- | Total Requirements | {count} ({functional} functional, {nonfunctional} non-functional, {business} business) |
441
- | Total Tasks | {count} |
442
- | Overall Coverage | {percent}% ({covered}/{total} requirements with ≥1 task) |
443
- | Critical Issues | {count} |
444
- | High Issues | {count} |
445
- | Medium Issues | {count} |
446
- | Low Issues | {count} |
447
- | Total Findings | {total_findings} |
448
-
449
- ---
450
-
451
- ## Remediation Recommendations
452
-
453
- ### Priority Order
454
-
455
- 1. **CRITICAL** - Must fix before proceeding
456
- 2. **HIGH** - Fix before execution
457
- 3. **MEDIUM** - Fix during or after implementation
458
- 4. **LOW** - Optional improvements
459
-
460
- ### Next Steps
461
-
462
- Based on the quality gate recommendation ({RECOMMENDATION}):
463
-
464
- {IF BLOCK_EXECUTION}
465
- **🛑 BLOCK EXECUTION**
466
-
467
- You must resolve all CRITICAL issues before proceeding with implementation:
468
-
469
- 1. Review each critical issue in detail
470
- 2. Determine remediation approach (modify IMPL_PLAN.md, update task.json, or add new tasks)
471
- 3. Apply fixes systematically
472
- 4. Re-run verification to confirm resolution
473
-
474
- {ELSE IF PROCEED_WITH_FIXES}
475
- **⚠️ PROCEED WITH FIXES RECOMMENDED**
476
-
477
- No critical issues detected, but HIGH issues exist. Recommended workflow:
478
-
479
- 1. Review high-priority issues
480
- 2. Apply fixes before execution for optimal results
481
- 3. Re-run verification (optional)
482
-
483
- {ELSE IF PROCEED_WITH_CAUTION}
484
- **✅ PROCEED WITH CAUTION**
485
-
486
- Only MEDIUM issues detected. You may proceed with implementation:
487
-
488
- - Address medium issues during or after implementation
489
- - Maintain awareness of identified concerns
490
-
491
- {ELSE}
492
- **✅ PROCEED**
493
-
494
- No significant issues detected. Safe to execute implementation workflow.
495
-
496
- {END IF}
497
-
498
- ---
499
-
500
- **Report End**
313
+ // Write report
314
+ Write(`${process_dir}/PLAN_VERIFICATION.md`, fullReport)
315
+ console.log(`✅ Report: ${process_dir}/PLAN_VERIFICATION.md\n📊 ${recommendation} | C:${critical_count} H:${high_count} M:${medium_count} L:${low_count} | Coverage:${coverage_percentage}%`)
501
316
  ```
502
317
 
503
- ### 7. Save and Display Report
504
-
505
- **Step 7.1: Save Report**:
506
- ```bash
507
- report_path = ".workflow/active/WFS-{session}/.process/PLAN_VERIFICATION.md"
508
- Write(report_path, full_report_content)
318
+ ### 6. Next Step Selection
319
+
320
+ ```javascript
321
+ const autoYes = $ARGUMENTS.includes('--yes') || $ARGUMENTS.includes('-y')
322
+ const canExecute = recommendation !== 'BLOCK_EXECUTION'
323
+
324
+ // Auto mode
325
+ if (autoYes) {
326
+ if (canExecute) {
327
+ SlashCommand("/workflow:execute --yes --resume-session=\"${session_id}\"")
328
+ } else {
329
+ console.log(`[--yes] BLOCK_EXECUTION - Fix ${critical_count} critical issues first.`)
330
+ }
331
+ return
332
+ }
333
+
334
+ // Interactive mode - build options based on quality gate
335
+ const options = canExecute
336
+ ? [
337
+ { label: canExecute && recommendation === 'PROCEED_WITH_FIXES' ? "Execute Anyway" : "Execute (Recommended)",
338
+ description: "Proceed to /workflow:execute" },
339
+ { label: "Review Report", description: "Review findings before deciding" },
340
+ { label: "Re-verify", description: "Re-run after manual fixes" }
341
+ ]
342
+ : [
343
+ { label: "Review Report", description: "Review critical issues" },
344
+ { label: "Re-verify", description: "Re-run after fixing issues" }
345
+ ]
346
+
347
+ const selection = AskUserQuestion({
348
+ questions: [{
349
+ question: `Quality gate: ${recommendation}. Next step?`,
350
+ header: "Action",
351
+ multiSelect: false,
352
+ options
353
+ }]
354
+ })
355
+
356
+ // Handle selection
357
+ if (selection.includes("Execute")) {
358
+ SlashCommand("/workflow:execute --resume-session=\"${session_id}\"")
359
+ } else if (selection === "Re-verify") {
360
+ SlashCommand("/workflow:plan-verify --session ${session_id}")
361
+ }
509
362
  ```
510
-
511
- **Step 7.2: Display Summary to User**:
512
- ```bash
513
- # Display executive summary in terminal
514
- echo "=== Plan Verification Complete ==="
515
- echo "Report saved to: {report_path}"
516
- echo ""
517
- echo "Quality Gate: {RECOMMENDATION}"
518
- echo "Critical: {count} | High: {count} | Medium: {count} | Low: {count}"
519
- echo ""
520
- echo "Next: Review full report for detailed findings and recommendations"
521
- ```
522
-
523
- **Step 7.3: Completion**:
524
- - Report is saved to `.process/PLAN_VERIFICATION.md`
525
- - User can review findings and decide on remediation approach
526
- - No automatic modifications are made to source artifacts
527
- - User can manually apply fixes or use separate remediation command (if available)