claude-code-workflow 6.0.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 (350) hide show
  1. package/.claude/agents/action-planning-agent.md +778 -0
  2. package/.claude/agents/cli-execution-agent.md +270 -0
  3. package/.claude/agents/cli-explore-agent.md +182 -0
  4. package/.claude/agents/cli-lite-planning-agent.md +396 -0
  5. package/.claude/agents/cli-planning-agent.md +558 -0
  6. package/.claude/agents/code-developer.md +310 -0
  7. package/.claude/agents/conceptual-planning-agent.md +308 -0
  8. package/.claude/agents/context-search-agent.md +582 -0
  9. package/.claude/agents/doc-generator.md +330 -0
  10. package/.claude/agents/memory-bridge.md +94 -0
  11. package/.claude/agents/test-context-search-agent.md +399 -0
  12. package/.claude/agents/test-fix-agent.md +343 -0
  13. package/.claude/agents/ui-design-agent.md +593 -0
  14. package/.claude/agents/universal-executor.md +131 -0
  15. package/.claude/commands/cli/cli-init.md +440 -0
  16. package/.claude/commands/enhance-prompt.md +93 -0
  17. package/.claude/commands/memory/code-map-memory.md +687 -0
  18. package/.claude/commands/memory/docs-full-cli.md +471 -0
  19. package/.claude/commands/memory/docs-related-cli.md +386 -0
  20. package/.claude/commands/memory/docs.md +615 -0
  21. package/.claude/commands/memory/load-skill-memory.md +182 -0
  22. package/.claude/commands/memory/load.md +240 -0
  23. package/.claude/commands/memory/skill-memory.md +525 -0
  24. package/.claude/commands/memory/style-skill-memory.md +396 -0
  25. package/.claude/commands/memory/tech-research.md +477 -0
  26. package/.claude/commands/memory/update-full.md +332 -0
  27. package/.claude/commands/memory/update-related.md +332 -0
  28. package/.claude/commands/memory/workflow-skill-memory.md +517 -0
  29. package/.claude/commands/task/breakdown.md +204 -0
  30. package/.claude/commands/task/create.md +152 -0
  31. package/.claude/commands/task/execute.md +270 -0
  32. package/.claude/commands/task/replan.md +437 -0
  33. package/.claude/commands/version.md +254 -0
  34. package/.claude/commands/workflow/action-plan-verify.md +447 -0
  35. package/.claude/commands/workflow/brainstorm/api-designer.md +585 -0
  36. package/.claude/commands/workflow/brainstorm/artifacts.md +452 -0
  37. package/.claude/commands/workflow/brainstorm/auto-parallel.md +443 -0
  38. package/.claude/commands/workflow/brainstorm/data-architect.md +220 -0
  39. package/.claude/commands/workflow/brainstorm/product-manager.md +200 -0
  40. package/.claude/commands/workflow/brainstorm/product-owner.md +200 -0
  41. package/.claude/commands/workflow/brainstorm/scrum-master.md +200 -0
  42. package/.claude/commands/workflow/brainstorm/subject-matter-expert.md +200 -0
  43. package/.claude/commands/workflow/brainstorm/synthesis.md +398 -0
  44. package/.claude/commands/workflow/brainstorm/system-architect.md +387 -0
  45. package/.claude/commands/workflow/brainstorm/ui-designer.md +221 -0
  46. package/.claude/commands/workflow/brainstorm/ux-expert.md +221 -0
  47. package/.claude/commands/workflow/execute.md +460 -0
  48. package/.claude/commands/workflow/init.md +164 -0
  49. package/.claude/commands/workflow/lite-execute.md +686 -0
  50. package/.claude/commands/workflow/lite-fix.md +621 -0
  51. package/.claude/commands/workflow/lite-plan.md +592 -0
  52. package/.claude/commands/workflow/plan.md +551 -0
  53. package/.claude/commands/workflow/replan.md +515 -0
  54. package/.claude/commands/workflow/review-fix.md +646 -0
  55. package/.claude/commands/workflow/review-module-cycle.md +795 -0
  56. package/.claude/commands/workflow/review-session-cycle.md +805 -0
  57. package/.claude/commands/workflow/review.md +291 -0
  58. package/.claude/commands/workflow/session/complete.md +500 -0
  59. package/.claude/commands/workflow/session/list.md +96 -0
  60. package/.claude/commands/workflow/session/resume.md +61 -0
  61. package/.claude/commands/workflow/session/start.md +200 -0
  62. package/.claude/commands/workflow/status.md +352 -0
  63. package/.claude/commands/workflow/tdd-plan.md +460 -0
  64. package/.claude/commands/workflow/tdd-verify.md +386 -0
  65. package/.claude/commands/workflow/test-cycle-execute.md +498 -0
  66. package/.claude/commands/workflow/test-fix-gen.md +699 -0
  67. package/.claude/commands/workflow/test-gen.md +529 -0
  68. package/.claude/commands/workflow/tools/conflict-resolution.md +680 -0
  69. package/.claude/commands/workflow/tools/context-gather.md +434 -0
  70. package/.claude/commands/workflow/tools/task-generate-agent.md +291 -0
  71. package/.claude/commands/workflow/tools/task-generate-tdd.md +518 -0
  72. package/.claude/commands/workflow/tools/tdd-coverage-analysis.md +309 -0
  73. package/.claude/commands/workflow/tools/test-concept-enhanced.md +163 -0
  74. package/.claude/commands/workflow/tools/test-context-gather.md +235 -0
  75. package/.claude/commands/workflow/tools/test-task-generate.md +256 -0
  76. package/.claude/commands/workflow/ui-design/animation-extract.md +1150 -0
  77. package/.claude/commands/workflow/ui-design/codify-style.md +652 -0
  78. package/.claude/commands/workflow/ui-design/design-sync.md +454 -0
  79. package/.claude/commands/workflow/ui-design/explore-auto.md +678 -0
  80. package/.claude/commands/workflow/ui-design/generate.md +504 -0
  81. package/.claude/commands/workflow/ui-design/imitate-auto.md +745 -0
  82. package/.claude/commands/workflow/ui-design/import-from-code.md +537 -0
  83. package/.claude/commands/workflow/ui-design/layout-extract.md +788 -0
  84. package/.claude/commands/workflow/ui-design/reference-page-generator.md +356 -0
  85. package/.claude/commands/workflow/ui-design/style-extract.md +773 -0
  86. package/.claude/scripts/classify-folders.sh +35 -0
  87. package/.claude/scripts/convert_tokens_to_css.sh +225 -0
  88. package/.claude/scripts/detect_changed_modules.sh +157 -0
  89. package/.claude/scripts/discover-design-files.sh +83 -0
  90. package/.claude/scripts/extract-animations.js +243 -0
  91. package/.claude/scripts/extract-computed-styles.js +118 -0
  92. package/.claude/scripts/extract-layout-structure.js +411 -0
  93. package/.claude/scripts/generate_module_docs.sh +713 -0
  94. package/.claude/scripts/get_modules_by_depth.sh +166 -0
  95. package/.claude/scripts/ui-generate-preview.sh +391 -0
  96. package/.claude/scripts/ui-instantiate-prototypes.sh +811 -0
  97. package/.claude/scripts/update_module_claude.sh +333 -0
  98. package/.claude/skills/command-guide/SKILL.md +388 -0
  99. package/.claude/skills/command-guide/UPDATE-GUIDELINE.md +592 -0
  100. package/.claude/skills/command-guide/guides/cli-tools-guide.md +410 -0
  101. package/.claude/skills/command-guide/guides/examples.md +537 -0
  102. package/.claude/skills/command-guide/guides/getting-started.md +242 -0
  103. package/.claude/skills/command-guide/guides/implementation-details.md +1010 -0
  104. package/.claude/skills/command-guide/guides/index-structure.md +326 -0
  105. package/.claude/skills/command-guide/guides/troubleshooting.md +92 -0
  106. package/.claude/skills/command-guide/guides/ui-design-workflow-guide.md +316 -0
  107. package/.claude/skills/command-guide/guides/workflow-patterns.md +662 -0
  108. package/.claude/skills/command-guide/index/all-commands.json +783 -0
  109. package/.claude/skills/command-guide/index/by-category.json +811 -0
  110. package/.claude/skills/command-guide/index/by-use-case.json +797 -0
  111. package/.claude/skills/command-guide/index/command-relationships.json +307 -0
  112. package/.claude/skills/command-guide/index/essential-commands.json +123 -0
  113. package/.claude/skills/command-guide/reference/agents/action-planning-agent.md +722 -0
  114. package/.claude/skills/command-guide/reference/agents/cli-execution-agent.md +270 -0
  115. package/.claude/skills/command-guide/reference/agents/cli-explore-agent.md +182 -0
  116. package/.claude/skills/command-guide/reference/agents/cli-lite-planning-agent.md +396 -0
  117. package/.claude/skills/command-guide/reference/agents/cli-planning-agent.md +558 -0
  118. package/.claude/skills/command-guide/reference/agents/code-developer.md +310 -0
  119. package/.claude/skills/command-guide/reference/agents/conceptual-planning-agent.md +328 -0
  120. package/.claude/skills/command-guide/reference/agents/context-search-agent.md +577 -0
  121. package/.claude/skills/command-guide/reference/agents/doc-generator.md +330 -0
  122. package/.claude/skills/command-guide/reference/agents/memory-bridge.md +94 -0
  123. package/.claude/skills/command-guide/reference/agents/test-context-search-agent.md +399 -0
  124. package/.claude/skills/command-guide/reference/agents/test-fix-agent.md +343 -0
  125. package/.claude/skills/command-guide/reference/agents/ui-design-agent.md +593 -0
  126. package/.claude/skills/command-guide/reference/agents/universal-executor.md +131 -0
  127. package/.claude/skills/command-guide/reference/commands/cli/cli-init.md +440 -0
  128. package/.claude/skills/command-guide/reference/commands/enhance-prompt.md +93 -0
  129. package/.claude/skills/command-guide/reference/commands/memory/code-map-memory.md +687 -0
  130. package/.claude/skills/command-guide/reference/commands/memory/docs-full-cli.md +471 -0
  131. package/.claude/skills/command-guide/reference/commands/memory/docs-related-cli.md +386 -0
  132. package/.claude/skills/command-guide/reference/commands/memory/docs.md +610 -0
  133. package/.claude/skills/command-guide/reference/commands/memory/load-skill-memory.md +182 -0
  134. package/.claude/skills/command-guide/reference/commands/memory/load.md +240 -0
  135. package/.claude/skills/command-guide/reference/commands/memory/skill-memory.md +525 -0
  136. package/.claude/skills/command-guide/reference/commands/memory/style-skill-memory.md +396 -0
  137. package/.claude/skills/command-guide/reference/commands/memory/tech-research.md +477 -0
  138. package/.claude/skills/command-guide/reference/commands/memory/update-full.md +332 -0
  139. package/.claude/skills/command-guide/reference/commands/memory/update-related.md +332 -0
  140. package/.claude/skills/command-guide/reference/commands/memory/workflow-skill-memory.md +517 -0
  141. package/.claude/skills/command-guide/reference/commands/task/breakdown.md +204 -0
  142. package/.claude/skills/command-guide/reference/commands/task/create.md +152 -0
  143. package/.claude/skills/command-guide/reference/commands/task/execute.md +270 -0
  144. package/.claude/skills/command-guide/reference/commands/task/replan.md +437 -0
  145. package/.claude/skills/command-guide/reference/commands/version.md +254 -0
  146. package/.claude/skills/command-guide/reference/commands/workflow/action-plan-verify.md +447 -0
  147. package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/api-designer.md +585 -0
  148. package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/artifacts.md +604 -0
  149. package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/auto-parallel.md +466 -0
  150. package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/data-architect.md +220 -0
  151. package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/product-manager.md +200 -0
  152. package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/product-owner.md +200 -0
  153. package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/scrum-master.md +200 -0
  154. package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/subject-matter-expert.md +200 -0
  155. package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/synthesis.md +496 -0
  156. package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/system-architect.md +387 -0
  157. package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/ui-designer.md +221 -0
  158. package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/ux-expert.md +221 -0
  159. package/.claude/skills/command-guide/reference/commands/workflow/execute.md +460 -0
  160. package/.claude/skills/command-guide/reference/commands/workflow/init.md +164 -0
  161. package/.claude/skills/command-guide/reference/commands/workflow/lite-execute.md +634 -0
  162. package/.claude/skills/command-guide/reference/commands/workflow/lite-fix.md +602 -0
  163. package/.claude/skills/command-guide/reference/commands/workflow/lite-plan.md +582 -0
  164. package/.claude/skills/command-guide/reference/commands/workflow/plan.md +551 -0
  165. package/.claude/skills/command-guide/reference/commands/workflow/replan.md +515 -0
  166. package/.claude/skills/command-guide/reference/commands/workflow/review-fix.md +646 -0
  167. package/.claude/skills/command-guide/reference/commands/workflow/review-module-cycle.md +795 -0
  168. package/.claude/skills/command-guide/reference/commands/workflow/review-session-cycle.md +805 -0
  169. package/.claude/skills/command-guide/reference/commands/workflow/review.md +291 -0
  170. package/.claude/skills/command-guide/reference/commands/workflow/session/complete.md +500 -0
  171. package/.claude/skills/command-guide/reference/commands/workflow/session/list.md +96 -0
  172. package/.claude/skills/command-guide/reference/commands/workflow/session/resume.md +61 -0
  173. package/.claude/skills/command-guide/reference/commands/workflow/session/start.md +180 -0
  174. package/.claude/skills/command-guide/reference/commands/workflow/status.md +352 -0
  175. package/.claude/skills/command-guide/reference/commands/workflow/tdd-plan.md +460 -0
  176. package/.claude/skills/command-guide/reference/commands/workflow/tdd-verify.md +386 -0
  177. package/.claude/skills/command-guide/reference/commands/workflow/test-cycle-execute.md +498 -0
  178. package/.claude/skills/command-guide/reference/commands/workflow/test-fix-gen.md +699 -0
  179. package/.claude/skills/command-guide/reference/commands/workflow/test-gen.md +529 -0
  180. package/.claude/skills/command-guide/reference/commands/workflow/tools/conflict-resolution.md +680 -0
  181. package/.claude/skills/command-guide/reference/commands/workflow/tools/context-gather.md +434 -0
  182. package/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-agent.md +151 -0
  183. package/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-tdd.md +518 -0
  184. package/.claude/skills/command-guide/reference/commands/workflow/tools/tdd-coverage-analysis.md +309 -0
  185. package/.claude/skills/command-guide/reference/commands/workflow/tools/test-concept-enhanced.md +163 -0
  186. package/.claude/skills/command-guide/reference/commands/workflow/tools/test-context-gather.md +235 -0
  187. package/.claude/skills/command-guide/reference/commands/workflow/tools/test-task-generate.md +256 -0
  188. package/.claude/skills/command-guide/reference/commands/workflow/ui-design/animation-extract.md +1150 -0
  189. package/.claude/skills/command-guide/reference/commands/workflow/ui-design/codify-style.md +652 -0
  190. package/.claude/skills/command-guide/reference/commands/workflow/ui-design/design-sync.md +454 -0
  191. package/.claude/skills/command-guide/reference/commands/workflow/ui-design/explore-auto.md +678 -0
  192. package/.claude/skills/command-guide/reference/commands/workflow/ui-design/generate.md +504 -0
  193. package/.claude/skills/command-guide/reference/commands/workflow/ui-design/imitate-auto.md +745 -0
  194. package/.claude/skills/command-guide/reference/commands/workflow/ui-design/import-from-code.md +537 -0
  195. package/.claude/skills/command-guide/reference/commands/workflow/ui-design/layout-extract.md +788 -0
  196. package/.claude/skills/command-guide/reference/commands/workflow/ui-design/reference-page-generator.md +356 -0
  197. package/.claude/skills/command-guide/reference/commands/workflow/ui-design/style-extract.md +773 -0
  198. package/.claude/skills/command-guide/scripts/analyze_commands.py +502 -0
  199. package/.claude/skills/command-guide/scripts/update-index.sh +130 -0
  200. package/.claude/skills/command-guide/templates/issue-bug.md +104 -0
  201. package/.claude/skills/command-guide/templates/issue-diagnosis.md +275 -0
  202. package/.claude/skills/command-guide/templates/issue-feature.md +97 -0
  203. package/.claude/skills/command-guide/templates/issue-question.md +141 -0
  204. package/.claude/skills/prompt-enhancer/SKILL.md +124 -0
  205. package/.claude/workflows/_template-compare-matrix.html +692 -0
  206. package/.claude/workflows/cli-templates/fix-plan-template.json +75 -0
  207. package/.claude/workflows/cli-templates/fix-progress-template.json +48 -0
  208. package/.claude/workflows/cli-templates/memory/style-skill-memory/skill-md-template.md +299 -0
  209. package/.claude/workflows/cli-templates/planning-roles/data-architect.md +120 -0
  210. package/.claude/workflows/cli-templates/planning-roles/product-manager.md +119 -0
  211. package/.claude/workflows/cli-templates/planning-roles/product-owner.md +261 -0
  212. package/.claude/workflows/cli-templates/planning-roles/scrum-master.md +186 -0
  213. package/.claude/workflows/cli-templates/planning-roles/subject-matter-expert.md +281 -0
  214. package/.claude/workflows/cli-templates/planning-roles/synthesis-role.md +414 -0
  215. package/.claude/workflows/cli-templates/planning-roles/system-architect.md +106 -0
  216. package/.claude/workflows/cli-templates/planning-roles/test-strategist.md +124 -0
  217. package/.claude/workflows/cli-templates/planning-roles/ui-designer.md +379 -0
  218. package/.claude/workflows/cli-templates/planning-roles/ux-expert.md +240 -0
  219. package/.claude/workflows/cli-templates/prompts/analysis/01-diagnose-bug-root-cause.txt +127 -0
  220. package/.claude/workflows/cli-templates/prompts/analysis/01-trace-code-execution.txt +115 -0
  221. package/.claude/workflows/cli-templates/prompts/analysis/02-analyze-code-patterns.txt +37 -0
  222. package/.claude/workflows/cli-templates/prompts/analysis/02-analyze-technical-document.txt +33 -0
  223. package/.claude/workflows/cli-templates/prompts/analysis/02-review-architecture.txt +29 -0
  224. package/.claude/workflows/cli-templates/prompts/analysis/02-review-code-quality.txt +28 -0
  225. package/.claude/workflows/cli-templates/prompts/analysis/03-analyze-performance.txt +29 -0
  226. package/.claude/workflows/cli-templates/prompts/analysis/03-assess-security-risks.txt +29 -0
  227. package/.claude/workflows/cli-templates/prompts/analysis/03-review-quality-standards.txt +29 -0
  228. package/.claude/workflows/cli-templates/prompts/development/02-generate-tests.txt +70 -0
  229. package/.claude/workflows/cli-templates/prompts/development/02-implement-component-ui.txt +55 -0
  230. package/.claude/workflows/cli-templates/prompts/development/02-implement-feature.txt +58 -0
  231. package/.claude/workflows/cli-templates/prompts/development/02-refactor-codebase.txt +55 -0
  232. package/.claude/workflows/cli-templates/prompts/development/03-debug-runtime-issues.txt +55 -0
  233. package/.claude/workflows/cli-templates/prompts/documentation/api.txt +15 -0
  234. package/.claude/workflows/cli-templates/prompts/documentation/folder-navigation.txt +27 -0
  235. package/.claude/workflows/cli-templates/prompts/documentation/module-readme.txt +49 -0
  236. package/.claude/workflows/cli-templates/prompts/documentation/project-architecture.txt +41 -0
  237. package/.claude/workflows/cli-templates/prompts/documentation/project-examples.txt +35 -0
  238. package/.claude/workflows/cli-templates/prompts/documentation/project-readme.txt +35 -0
  239. package/.claude/workflows/cli-templates/prompts/memory/02-document-module-structure.txt +165 -0
  240. package/.claude/workflows/cli-templates/prompts/planning/01-plan-architecture-design.txt +109 -0
  241. package/.claude/workflows/cli-templates/prompts/planning/02-breakdown-task-steps.txt +30 -0
  242. package/.claude/workflows/cli-templates/prompts/planning/02-design-component-spec.txt +28 -0
  243. package/.claude/workflows/cli-templates/prompts/planning/03-evaluate-concept-feasibility.txt +127 -0
  244. package/.claude/workflows/cli-templates/prompts/planning/03-plan-migration-strategy.txt +30 -0
  245. package/.claude/workflows/cli-templates/prompts/tech/tech-module-format.txt +359 -0
  246. package/.claude/workflows/cli-templates/prompts/tech/tech-skill-index.txt +185 -0
  247. package/.claude/workflows/cli-templates/prompts/test/test-concept-analysis.txt +179 -0
  248. package/.claude/workflows/cli-templates/prompts/universal/00-universal-creative-style.txt +95 -0
  249. package/.claude/workflows/cli-templates/prompts/universal/00-universal-rigorous-style.txt +92 -0
  250. package/.claude/workflows/cli-templates/prompts/verification/codex-technical.txt +28 -0
  251. package/.claude/workflows/cli-templates/prompts/verification/cross-validation.txt +28 -0
  252. package/.claude/workflows/cli-templates/prompts/verification/gemini-strategic.txt +27 -0
  253. package/.claude/workflows/cli-templates/prompts/workflow/analysis-results-structure.txt +224 -0
  254. package/.claude/workflows/cli-templates/prompts/workflow/codex-feasibility-validation.txt +176 -0
  255. package/.claude/workflows/cli-templates/prompts/workflow/gemini-solution-design.txt +131 -0
  256. package/.claude/workflows/cli-templates/prompts/workflow/impl-plan-template.txt +286 -0
  257. package/.claude/workflows/cli-templates/prompts/workflow/skill-aggregation.txt +172 -0
  258. package/.claude/workflows/cli-templates/prompts/workflow/skill-conflict-patterns.txt +98 -0
  259. package/.claude/workflows/cli-templates/prompts/workflow/skill-index.txt +224 -0
  260. package/.claude/workflows/cli-templates/prompts/workflow/skill-lessons-learned.txt +98 -0
  261. package/.claude/workflows/cli-templates/prompts/workflow/skill-sessions-timeline.txt +53 -0
  262. package/.claude/workflows/cli-templates/prompts/workflow/task-json-agent-mode.txt +123 -0
  263. package/.claude/workflows/cli-templates/prompts/workflow/task-json-cli-mode.txt +182 -0
  264. package/.claude/workflows/cli-templates/schemas/diagnosis-json-schema.json +234 -0
  265. package/.claude/workflows/cli-templates/schemas/explore-json-schema.json +124 -0
  266. package/.claude/workflows/cli-templates/schemas/fix-plan-json-schema.json +273 -0
  267. package/.claude/workflows/cli-templates/schemas/plan-json-schema.json +219 -0
  268. package/.claude/workflows/cli-templates/schemas/project-json-schema.json +221 -0
  269. package/.claude/workflows/cli-templates/schemas/review-deep-dive-results-schema.json +82 -0
  270. package/.claude/workflows/cli-templates/schemas/review-dimension-results-schema.json +51 -0
  271. package/.claude/workflows/cli-templates/tech-stacks/go-dev.md +91 -0
  272. package/.claude/workflows/cli-templates/tech-stacks/java-dev.md +107 -0
  273. package/.claude/workflows/cli-templates/tech-stacks/javascript-dev.md +58 -0
  274. package/.claude/workflows/cli-templates/tech-stacks/python-dev.md +79 -0
  275. package/.claude/workflows/cli-templates/tech-stacks/react-dev.md +103 -0
  276. package/.claude/workflows/cli-templates/tech-stacks/typescript-dev.md +83 -0
  277. package/.claude/workflows/cli-templates/ui-design/systems/animation-tokens.json +247 -0
  278. package/.claude/workflows/cli-templates/ui-design/systems/design-tokens.json +342 -0
  279. package/.claude/workflows/cli-templates/ui-design/systems/layout-templates.json +145 -0
  280. package/.claude/workflows/context-search-strategy.md +77 -0
  281. package/.claude/workflows/intelligent-tools-strategy.md +662 -0
  282. package/.claude/workflows/review-directory-specification.md +336 -0
  283. package/.claude/workflows/task-core.md +214 -0
  284. package/.claude/workflows/tool-strategy.md +71 -0
  285. package/.claude/workflows/workflow-architecture.md +942 -0
  286. package/.codex/AGENTS.md +330 -0
  287. package/.gemini/GEMINI.md +164 -0
  288. package/.qwen/QWEN.md +164 -0
  289. package/CLAUDE.md +91 -0
  290. package/LICENSE +21 -0
  291. package/README.md +219 -0
  292. package/ccw/README.md +121 -0
  293. package/ccw/bin/ccw.js +10 -0
  294. package/ccw/src/cli.js +100 -0
  295. package/ccw/src/commands/install.js +324 -0
  296. package/ccw/src/commands/list.js +37 -0
  297. package/ccw/src/commands/serve.js +67 -0
  298. package/ccw/src/commands/uninstall.js +238 -0
  299. package/ccw/src/commands/upgrade.js +307 -0
  300. package/ccw/src/commands/view.js +14 -0
  301. package/ccw/src/core/dashboard-generator-patch.js +29 -0
  302. package/ccw/src/core/dashboard-generator.js +667 -0
  303. package/ccw/src/core/data-aggregator.js +409 -0
  304. package/ccw/src/core/lite-scanner.js +290 -0
  305. package/ccw/src/core/manifest.js +201 -0
  306. package/ccw/src/core/server.js +1327 -0
  307. package/ccw/src/core/server.js.bak +385 -0
  308. package/ccw/src/core/server_original.bak +385 -0
  309. package/ccw/src/core/session-scanner.js +235 -0
  310. package/ccw/src/index.js +9 -0
  311. package/ccw/src/templates/dashboard-js/api.js +200 -0
  312. package/ccw/src/templates/dashboard-js/components/_conflict_tab.js +112 -0
  313. package/ccw/src/templates/dashboard-js/components/_exp_helpers.js +54 -0
  314. package/ccw/src/templates/dashboard-js/components/_review_tab.js +640 -0
  315. package/ccw/src/templates/dashboard-js/components/carousel.js +398 -0
  316. package/ccw/src/templates/dashboard-js/components/flowchart.js +493 -0
  317. package/ccw/src/templates/dashboard-js/components/hook-manager.js +273 -0
  318. package/ccw/src/templates/dashboard-js/components/mcp-manager.js +506 -0
  319. package/ccw/src/templates/dashboard-js/components/modals.js +260 -0
  320. package/ccw/src/templates/dashboard-js/components/navigation.js +239 -0
  321. package/ccw/src/templates/dashboard-js/components/notifications.js +194 -0
  322. package/ccw/src/templates/dashboard-js/components/sidebar.js +31 -0
  323. package/ccw/src/templates/dashboard-js/components/tabs-context.js +1093 -0
  324. package/ccw/src/templates/dashboard-js/components/tabs-other.js +273 -0
  325. package/ccw/src/templates/dashboard-js/components/task-drawer-core.js +477 -0
  326. package/ccw/src/templates/dashboard-js/components/task-drawer-renderers.js +447 -0
  327. package/ccw/src/templates/dashboard-js/components/theme.js +21 -0
  328. package/ccw/src/templates/dashboard-js/main.js +57 -0
  329. package/ccw/src/templates/dashboard-js/state.js +37 -0
  330. package/ccw/src/templates/dashboard-js/utils.js +153 -0
  331. package/ccw/src/templates/dashboard-js/views/fix-session.js +180 -0
  332. package/ccw/src/templates/dashboard-js/views/home.js +193 -0
  333. package/ccw/src/templates/dashboard-js/views/hook-manager.js +387 -0
  334. package/ccw/src/templates/dashboard-js/views/lite-tasks.js +390 -0
  335. package/ccw/src/templates/dashboard-js/views/mcp-manager.js +271 -0
  336. package/ccw/src/templates/dashboard-js/views/project-overview.js +246 -0
  337. package/ccw/src/templates/dashboard-js/views/review-session.js +711 -0
  338. package/ccw/src/templates/dashboard-js/views/session-detail.js +770 -0
  339. package/ccw/src/templates/dashboard.css +7660 -0
  340. package/ccw/src/templates/dashboard.html +630 -0
  341. package/ccw/src/templates/dashboard_tailwind.html +42 -0
  342. package/ccw/src/templates/dashboard_test.html +37 -0
  343. package/ccw/src/templates/review-cycle-dashboard.html +1930 -0
  344. package/ccw/src/templates/tailwind-base.css +212 -0
  345. package/ccw/src/templates/workflow-dashboard.html +401 -0
  346. package/ccw/src/utils/browser-launcher.js +49 -0
  347. package/ccw/src/utils/file-utils.js +48 -0
  348. package/ccw/src/utils/path-resolver.js +279 -0
  349. package/ccw/src/utils/ui.js +148 -0
  350. package/package.json +66 -0
@@ -0,0 +1,805 @@
1
+ ---
2
+ name: review-session-cycle
3
+ description: Session-based comprehensive multi-dimensional code review. Analyzes git changes from workflow session across 7 dimensions with hybrid parallel-iterative execution, aggregates findings, and performs focused deep-dives on critical issues until quality gates met.
4
+ argument-hint: "[session-id] [--dimensions=security,architecture,...] [--max-iterations=N]"
5
+ allowed-tools: SlashCommand(*), TodoWrite(*), Read(*), Bash(*), Task(*)
6
+ ---
7
+
8
+ # Workflow Review-Session-Cycle Command
9
+
10
+ ## Quick Start
11
+
12
+ ```bash
13
+ # Execute comprehensive session review (all 7 dimensions)
14
+ /workflow:review-session-cycle
15
+
16
+ # Review specific session with custom dimensions
17
+ /workflow:review-session-cycle WFS-payment-integration --dimensions=security,architecture,quality
18
+
19
+ # Specify session and iteration limit
20
+ /workflow:review-session-cycle WFS-payment-integration --max-iterations=5
21
+ ```
22
+
23
+ **Review Scope**: Git changes from session creation to present (via `git log --since`)
24
+ **Session Requirement**: Requires active or completed workflow session
25
+ **Output Directory**: `.workflow/active/WFS-{session-id}/.review/` (session-based)
26
+ **Default Dimensions**: Security, Architecture, Quality, Action-Items, Performance, Maintainability, Best-Practices
27
+ **Max Iterations**: 3 (adjustable via --max-iterations)
28
+ **Default Iterations**: 1 (deep-dive runs once; use --max-iterations=0 to skip)
29
+ **CLI Tools**: Gemini → Qwen → Codex (fallback chain)
30
+
31
+ ## What & Why
32
+
33
+ ### Core Concept
34
+ Session-based multi-dimensional code review orchestrator with **hybrid parallel-iterative execution** for comprehensive quality assessment of **git changes within a workflow session**.
35
+
36
+ **Review Scope**:
37
+ - **Session-based**: Reviews only files changed during the workflow session (via `git log --since="${sessionCreatedAt}"`)
38
+ - **For independent module review**: Use `/workflow:review-module-cycle` command instead
39
+
40
+ **vs Standard Review**:
41
+ - **Standard**: Sequential manual reviews → Inconsistent coverage → Missed cross-cutting concerns
42
+ - **Review-Session-Cycle**: **Parallel automated analysis → Aggregate findings → Deep-dive critical issues** → Comprehensive coverage
43
+
44
+ ### Value Proposition
45
+ 1. **Comprehensive Coverage**: 7 specialized dimensions analyze all quality aspects simultaneously
46
+ 2. **Intelligent Prioritization**: Automatic identification of critical issues and cross-cutting concerns
47
+ 3. **Actionable Insights**: Deep-dive iterations provide step-by-step remediation plans
48
+ 4. **Real-time Visibility**: JSON-based progress tracking with interactive HTML dashboard
49
+
50
+ ### Orchestrator Boundary (CRITICAL)
51
+ - **ONLY command** for comprehensive multi-dimensional review
52
+ - Manages: dimension coordination, aggregation, iteration control, progress tracking
53
+ - Delegates: Code exploration and analysis to @cli-explore-agent, dimension-specific reviews via Deep Scan mode
54
+ - **⚠️ DASHBOARD CONSTRAINT**: Dashboard is generated ONCE during Phase 1 initialization. After initialization, orchestrator and agents MUST NOT read, write, or modify dashboard.html - it remains static for user interaction only.
55
+
56
+ ## How It Works
57
+
58
+ ### Execution Flow (Simplified)
59
+
60
+ ```
61
+ Phase 1: Discovery & Initialization
62
+ └─ Validate session, initialize state, create output structure → Generate dashboard.html
63
+
64
+ Phase 2: Parallel Reviews (for each dimension)
65
+ ├─ Launch 7 review agents simultaneously
66
+ ├─ Each executes CLI analysis via Gemini/Qwen
67
+ ├─ Generate dimension JSON + markdown reports
68
+ └─ Update review-progress.json
69
+
70
+ Phase 3: Aggregation
71
+ ├─ Load all dimension JSON files
72
+ ├─ Calculate severity distribution (critical/high/medium/low)
73
+ ├─ Identify cross-cutting concerns (files in 3+ dimensions)
74
+ └─ Decision:
75
+ ├─ Critical findings OR high > 5 OR critical files → Phase 4 (Iterate)
76
+ └─ Else → Phase 5 (Complete)
77
+
78
+ Phase 4: Iterative Deep-Dive (optional)
79
+ ├─ Select critical findings (max 5 per iteration)
80
+ ├─ Launch deep-dive agents for root cause analysis
81
+ ├─ Generate remediation plans with impact assessment
82
+ ├─ Re-assess severity based on analysis
83
+ └─ Loop until no critical findings OR max iterations
84
+
85
+ Phase 5: Completion
86
+ └─ Finalize review-progress.json → Output dashboard path
87
+ ```
88
+
89
+ ### Agent Roles
90
+
91
+ | Agent | Responsibility |
92
+ |-------|---------------|
93
+ | **Orchestrator** | Phase control, session discovery, state management, aggregation logic, iteration control |
94
+ | **@cli-explore-agent** (Review) | Execute dimension-specific code analysis via Deep Scan mode, generate findings JSON with dual-source strategy (Bash + Gemini), create structured analysis reports |
95
+ | **@cli-explore-agent** (Deep-dive) | Focused root cause analysis using dependency mapping, remediation planning with architectural insights, impact assessment, severity re-assessment |
96
+
97
+ ## Enhanced Features
98
+
99
+ ### 1. Review Dimensions Configuration
100
+
101
+ **7 Specialized Dimensions** with priority-based allocation:
102
+
103
+ | Dimension | Template | Priority | Timeout |
104
+ |-----------|----------|----------|---------|
105
+ | **Security** | 03-assess-security-risks.txt | 1 (Critical) | 60min |
106
+ | **Architecture** | 02-review-architecture.txt | 2 (High) | 60min |
107
+ | **Quality** | 02-review-code-quality.txt | 3 (Medium) | 40min |
108
+ | **Action-Items** | 02-analyze-code-patterns.txt | 2 (High) | 40min |
109
+ | **Performance** | 03-analyze-performance.txt | 3 (Medium) | 60min |
110
+ | **Maintainability** | 02-review-code-quality.txt* | 3 (Medium) | 40min |
111
+ | **Best-Practices** | 03-review-quality-standards.txt | 3 (Medium) | 40min |
112
+
113
+ *Custom focus: "Assess technical debt and maintainability"
114
+
115
+ **Category Definitions by Dimension**:
116
+
117
+ ```javascript
118
+ const CATEGORIES = {
119
+ security: ['injection', 'authentication', 'authorization', 'encryption', 'input-validation', 'access-control', 'data-exposure'],
120
+ architecture: ['coupling', 'cohesion', 'layering', 'dependency', 'pattern-violation', 'scalability', 'separation-of-concerns'],
121
+ quality: ['code-smell', 'duplication', 'complexity', 'naming', 'error-handling', 'testability', 'readability'],
122
+ 'action-items': ['requirement-coverage', 'acceptance-criteria', 'documentation', 'deployment-readiness', 'missing-functionality'],
123
+ performance: ['n-plus-one', 'inefficient-query', 'memory-leak', 'blocking-operation', 'caching', 'resource-usage'],
124
+ maintainability: ['technical-debt', 'magic-number', 'long-method', 'large-class', 'dead-code', 'commented-code'],
125
+ 'best-practices': ['convention-violation', 'anti-pattern', 'deprecated-api', 'missing-validation', 'inconsistent-style']
126
+ };
127
+ ```
128
+
129
+ ### 2. Aggregation Logic
130
+
131
+ **Cross-Cutting Concern Detection**:
132
+ 1. Files appearing in 3+ dimensions = **Critical Files**
133
+ 2. Same issue pattern across dimensions = **Systemic Issue**
134
+ 3. Severity clustering in specific files = **Hotspots**
135
+
136
+ **Deep-Dive Selection Criteria**:
137
+ - All critical severity findings (priority 1)
138
+ - Top 3 high-severity findings in critical files (priority 2)
139
+ - Max 5 findings per iteration (prevent overwhelm)
140
+
141
+ ### 3. Severity Assessment
142
+
143
+ **Severity Levels**:
144
+ - **Critical**: Security vulnerabilities, data corruption risks, system-wide failures, authentication/authorization bypass
145
+ - **High**: Feature degradation, performance bottlenecks, architecture violations, significant technical debt
146
+ - **Medium**: Code smells, minor performance issues, style inconsistencies, maintainability concerns
147
+ - **Low**: Documentation gaps, minor refactoring opportunities, cosmetic issues
148
+
149
+ **Iteration Trigger**:
150
+ - Critical findings > 0 OR
151
+ - High findings > 5 OR
152
+ - Critical files count > 0
153
+
154
+ ## Core Responsibilities
155
+
156
+ ### Orchestrator
157
+
158
+ **Phase 1: Discovery & Initialization**
159
+
160
+ **Step 1: Session Discovery**
161
+ ```javascript
162
+ // If session ID not provided, auto-detect
163
+ if (!providedSessionId) {
164
+ // Check for active sessions
165
+ const activeSessions = Glob('.workflow/active/WFS-*');
166
+ if (activeSessions.length === 1) {
167
+ sessionId = activeSessions[0].match(/WFS-[^/]+/)[0];
168
+ } else if (activeSessions.length > 1) {
169
+ // List sessions and prompt user
170
+ error("Multiple active sessions found. Please specify session ID.");
171
+ } else {
172
+ error("No active session found. Create session first with /workflow:session:start");
173
+ }
174
+ } else {
175
+ sessionId = providedSessionId;
176
+ }
177
+
178
+ // Validate session exists
179
+ Bash(`test -d .workflow/active/${sessionId} && echo "EXISTS"`);
180
+ ```
181
+
182
+ **Step 2: Session Validation**
183
+ - Ensure session has implementation artifacts (check `.summaries/` or `.task/` directory)
184
+ - Extract session creation timestamp from `workflow-session.json`
185
+ - Use timestamp for git log filtering: `git log --since="${sessionCreatedAt}"`
186
+
187
+ **Step 3: Changed Files Detection**
188
+ ```bash
189
+ # Get files changed since session creation
190
+ git log --since="${sessionCreatedAt}" --name-only --pretty=format: | sort -u
191
+ ```
192
+
193
+ **Step 4: Output Directory Setup**
194
+ - Output directory: `.workflow/active/${sessionId}/.review/`
195
+ - Create directory structure:
196
+ ```bash
197
+ mkdir -p ${sessionDir}/.review/{dimensions,iterations,reports}
198
+ ```
199
+
200
+ **Step 5: Initialize Review State**
201
+ - State initialization: Create `review-state.json` with metadata, dimensions, max_iterations (merged metadata + state)
202
+ - Progress tracking: Create `review-progress.json` for dashboard polling
203
+
204
+ **Step 6: Dashboard Generation**
205
+
206
+ **Constraints**:
207
+ - **MANDATORY**: Dashboard MUST be generated from template: `~/.claude/templates/review-cycle-dashboard.html`
208
+ - **PROHIBITED**: Direct creation or custom generation without template
209
+ - **POST-GENERATION**: Orchestrator and agents MUST NOT read/write/modify dashboard.html after creation
210
+
211
+ **Generation Commands** (3 independent steps):
212
+ ```bash
213
+ # Step 1: Copy template to output location
214
+ cp ~/.claude/templates/review-cycle-dashboard.html ${sessionDir}/.review/dashboard.html
215
+
216
+ # Step 2: Replace SESSION_ID placeholder
217
+ sed -i "s|{{SESSION_ID}}|${sessionId}|g" ${sessionDir}/.review/dashboard.html
218
+
219
+ # Step 3: Replace REVIEW_TYPE placeholder
220
+ sed -i "s|{{REVIEW_TYPE}}|session|g" ${sessionDir}/.review/dashboard.html
221
+
222
+ # Step 4: Replace REVIEW_DIR placeholder
223
+ sed -i "s|{{REVIEW_DIR}}|${reviewDir}|g" ${sessionDir}/.review/dashboard.html
224
+
225
+ # Output: Start local server and output dashboard URL
226
+ cd ${sessionDir}/.review && python -m http.server 8765 --bind 127.0.0.1 &
227
+ echo "📊 Dashboard: http://127.0.0.1:8765/dashboard.html"
228
+ echo " (Press Ctrl+C to stop server when done)"
229
+ ```
230
+
231
+ **Step 7: TodoWrite Initialization**
232
+ - Set up progress tracking with hierarchical structure
233
+ - Mark Phase 1 completed, Phase 2 in_progress
234
+
235
+ **Phase 2: Parallel Review Coordination**
236
+ - Launch 7 @cli-explore-agent instances simultaneously (Deep Scan mode)
237
+ - Pass dimension-specific context (template, timeout, custom focus)
238
+ - Monitor completion via review-progress.json updates
239
+ - TodoWrite updates: Mark dimensions as completed
240
+ - CLI tool fallback: Gemini → Qwen → Codex (on error/timeout)
241
+
242
+ **Phase 3: Aggregation**
243
+ - Load all dimension JSON files from dimensions/
244
+ - Calculate severity distribution: Count by critical/high/medium/low
245
+ - Identify cross-cutting concerns: Files in 3+ dimensions
246
+ - Select deep-dive findings: Critical + high in critical files (max 5)
247
+ - Decision logic: Iterate if critical > 0 OR high > 5 OR critical files exist
248
+ - Update review-state.json with aggregation results
249
+
250
+ **Phase 4: Iteration Control**
251
+ - Check iteration count < max_iterations (default 3)
252
+ - Launch deep-dive agents for selected findings
253
+ - Collect remediation plans and re-assessed severities
254
+ - Update severity distribution based on re-assessments
255
+ - Record iteration in review-state.json
256
+ - Loop back to aggregation if still have critical/high findings
257
+
258
+ **Phase 5: Completion**
259
+ - Finalize review-progress.json with completion statistics
260
+ - Update review-state.json with completion_time and phase=complete
261
+ - TodoWrite completion: Mark all tasks done
262
+ - Output: Dashboard path to user
263
+
264
+
265
+
266
+ ### Session File Structure
267
+
268
+ ```
269
+ .workflow/active/WFS-{session-id}/.review/
270
+ ├── review-state.json # Orchestrator state machine (includes metadata)
271
+ ├── review-progress.json # Real-time progress for dashboard
272
+ ├── dimensions/ # Per-dimension results
273
+ │ ├── security.json
274
+ │ ├── architecture.json
275
+ │ ├── quality.json
276
+ │ ├── action-items.json
277
+ │ ├── performance.json
278
+ │ ├── maintainability.json
279
+ │ └── best-practices.json
280
+ ├── iterations/ # Deep-dive results
281
+ │ ├── iteration-1-finding-{uuid}.json
282
+ │ └── iteration-2-finding-{uuid}.json
283
+ ├── reports/ # Human-readable reports
284
+ │ ├── security-analysis.md
285
+ │ ├── security-cli-output.txt
286
+ │ ├── deep-dive-1-{uuid}.md
287
+ │ └── ...
288
+ └── dashboard.html # Interactive dashboard (primary output)
289
+ ```
290
+
291
+ **Session Context**:
292
+ ```
293
+ .workflow/active/WFS-{session-id}/
294
+ ├── workflow-session.json
295
+ ├── IMPL_PLAN.md
296
+ ├── TODO_LIST.md
297
+ ├── .task/
298
+ ├── .summaries/
299
+ └── .review/ # Review results (this command)
300
+ └── (structure above)
301
+ ```
302
+
303
+ ### Review State JSON
304
+
305
+ **Purpose**: Unified state machine and metadata (merged from metadata + state)
306
+
307
+ ```json
308
+ {
309
+ "session_id": "WFS-payment-integration",
310
+ "review_id": "review-20250125-143022",
311
+ "review_type": "session",
312
+ "metadata": {
313
+ "created_at": "2025-01-25T14:30:22Z",
314
+ "git_changes": {
315
+ "commit_range": "abc123..def456",
316
+ "files_changed": 15,
317
+ "insertions": 342,
318
+ "deletions": 128
319
+ },
320
+ "dimensions": ["security", "architecture", "quality", "action-items", "performance", "maintainability", "best-practices"],
321
+ "max_iterations": 3
322
+ },
323
+ "phase": "parallel|aggregate|iterate|complete",
324
+ "current_iteration": 1,
325
+ "dimensions_reviewed": ["security", "architecture", "quality", "action-items", "performance", "maintainability", "best-practices"],
326
+ "selected_strategy": "comprehensive",
327
+ "next_action": "execute_parallel_reviews|aggregate_findings|execute_deep_dive|generate_final_report|complete",
328
+ "severity_distribution": {
329
+ "critical": 2,
330
+ "high": 5,
331
+ "medium": 12,
332
+ "low": 8
333
+ },
334
+ "critical_files": [
335
+ {
336
+ "file": "src/payment/processor.ts",
337
+ "finding_count": 5,
338
+ "dimensions": ["security", "architecture", "quality"]
339
+ }
340
+ ],
341
+ "iterations": [
342
+ {
343
+ "iteration": 1,
344
+ "findings_analyzed": ["uuid-1", "uuid-2"],
345
+ "findings_resolved": 1,
346
+ "findings_escalated": 1,
347
+ "severity_change": {
348
+ "before": {"critical": 2, "high": 5, "medium": 12, "low": 8},
349
+ "after": {"critical": 1, "high": 6, "medium": 12, "low": 8}
350
+ },
351
+ "timestamp": "2025-01-25T14:30:00Z"
352
+ }
353
+ ],
354
+ "completion_criteria": {
355
+ "target": "no_critical_findings_and_high_under_5",
356
+ "current_status": "in_progress",
357
+ "estimated_completion": "2 iterations remaining"
358
+ }
359
+ }
360
+ ```
361
+
362
+ **Field Descriptions**:
363
+ - `phase`: Current execution phase (state machine pointer)
364
+ - `current_iteration`: Iteration counter (used for max check)
365
+ - `next_action`: Next step orchestrator should execute
366
+ - `severity_distribution`: Aggregated counts across all dimensions
367
+ - `critical_files`: Files appearing in 3+ dimensions with metadata
368
+ - `iterations[]`: Historical log for trend analysis
369
+
370
+ ### Review Progress JSON
371
+
372
+ **Purpose**: Real-time dashboard updates via polling
373
+
374
+ ```json
375
+ {
376
+ "review_id": "review-20250125-143022",
377
+ "last_update": "2025-01-25T14:35:10Z",
378
+ "phase": "parallel|aggregate|iterate|complete",
379
+ "current_iteration": 1,
380
+ "progress": {
381
+ "parallel_review": {
382
+ "total_dimensions": 7,
383
+ "completed": 5,
384
+ "in_progress": 2,
385
+ "percent_complete": 71
386
+ },
387
+ "deep_dive": {
388
+ "total_findings": 6,
389
+ "analyzed": 2,
390
+ "in_progress": 1,
391
+ "percent_complete": 33
392
+ }
393
+ },
394
+ "agent_status": [
395
+ {
396
+ "agent_type": "review-agent",
397
+ "dimension": "security",
398
+ "status": "completed",
399
+ "started_at": "2025-01-25T14:30:00Z",
400
+ "completed_at": "2025-01-25T15:15:00Z",
401
+ "duration_ms": 2700000
402
+ },
403
+ {
404
+ "agent_type": "deep-dive-agent",
405
+ "finding_id": "sec-001-uuid",
406
+ "status": "in_progress",
407
+ "started_at": "2025-01-25T14:32:00Z"
408
+ }
409
+ ],
410
+ "estimated_completion": "2025-01-25T16:00:00Z"
411
+ }
412
+ ```
413
+
414
+ ### Agent Output Schemas
415
+
416
+ **Agent-produced JSON files follow standardized schemas**:
417
+
418
+ 1. **Dimension Results** (cli-explore-agent output from parallel reviews)
419
+ - Schema: `~/.claude/workflows/cli-templates/schemas/review-dimension-results-schema.json`
420
+ - Output: `.review-cycle/dimensions/{dimension}.json`
421
+ - Contains: findings array, summary statistics, cross_references
422
+
423
+ 2. **Deep-Dive Results** (cli-explore-agent output from iterations)
424
+ - Schema: `~/.claude/workflows/cli-templates/schemas/review-deep-dive-results-schema.json`
425
+ - Output: `.review-cycle/iterations/iteration-{N}-finding-{uuid}.json`
426
+ - Contains: root_cause, remediation_plan, impact_assessment, reassessed_severity
427
+
428
+ ### Agent Invocation Template
429
+
430
+ **Review Agent** (parallel execution, 7 instances):
431
+
432
+ ```javascript
433
+ Task(
434
+ subagent_type="cli-explore-agent",
435
+ description=`Execute ${dimension} review analysis via Deep Scan`,
436
+ prompt=`
437
+ ## Task Objective
438
+ Conduct comprehensive ${dimension} code exploration and analysis using Deep Scan mode (Bash + Gemini dual-source strategy) for completed implementation in session ${sessionId}
439
+
440
+ ## Analysis Mode Selection
441
+ Use **Deep Scan mode** for this review:
442
+ - Phase 1: Bash structural scan for standard patterns (classes, functions, imports)
443
+ - Phase 2: Gemini semantic analysis for design intent, non-standard patterns, ${dimension}-specific concerns
444
+ - Phase 3: Synthesis with attribution (bash-discovered vs gemini-discovered findings)
445
+
446
+ ## MANDATORY FIRST STEPS (Execute by Agent)
447
+ **You (cli-explore-agent) MUST execute these steps in order:**
448
+ 1. Read session metadata: ${sessionMetadataPath}
449
+ 2. Read completed task summaries: bash(find ${summariesDir} -name "IMPL-*.md" -type f)
450
+ 3. Get changed files: bash(cd ${workflowDir} && git log --since="${sessionCreatedAt}" --name-only --pretty=format: | sort -u)
451
+ 4. Read review state: ${reviewStateJsonPath}
452
+ 5. Execute: cat ~/.claude/workflows/cli-templates/schemas/review-dimension-results-schema.json (get output schema reference)
453
+
454
+ ## Session Context
455
+ - Session ID: ${sessionId}
456
+ - Review Dimension: ${dimension}
457
+ - Review ID: ${reviewId}
458
+ - Implementation Phase: Complete (all tests passing)
459
+ - Output Directory: ${outputDir}
460
+
461
+ ## CLI Configuration
462
+ - Tool Priority: gemini → qwen → codex (fallback chain)
463
+ - Template: ~/.claude/workflows/cli-templates/prompts/analysis/${dimensionTemplate}
464
+ - Custom Focus: ${customFocus || 'Standard dimension analysis'}
465
+ - Timeout: ${timeout}ms
466
+ - Mode: analysis (READ-ONLY)
467
+
468
+ ## Expected Deliverables
469
+
470
+ **Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 5, follow schema exactly
471
+
472
+ 1. Dimension Results JSON: ${outputDir}/dimensions/${dimension}.json
473
+
474
+ **⚠️ CRITICAL JSON STRUCTURE REQUIREMENTS**:
475
+
476
+ Root structure MUST be array: \`[{ ... }]\` NOT \`{ ... }\`
477
+
478
+ Required top-level fields:
479
+ - dimension, review_id, analysis_timestamp (NOT timestamp/analyzed_at)
480
+ - cli_tool_used (gemini|qwen|codex), model, analysis_duration_ms
481
+ - summary (FLAT structure), findings, cross_references
482
+
483
+ Summary MUST be FLAT (NOT nested by_severity):
484
+ \`{ "total_findings": N, "critical": N, "high": N, "medium": N, "low": N, "files_analyzed": N, "lines_reviewed": N }\`
485
+
486
+ Finding required fields:
487
+ - id: format \`{dim}-{seq}-{uuid8}\` e.g., \`sec-001-a1b2c3d4\` (lowercase)
488
+ - severity: lowercase only (critical|high|medium|low)
489
+ - snippet (NOT code_snippet), impact (NOT exploit_scenario)
490
+ - metadata, iteration (0), status (pending_remediation), cross_references
491
+
492
+ 2. Analysis Report: ${outputDir}/reports/${dimension}-analysis.md
493
+ - Human-readable summary with recommendations
494
+ - Grouped by severity: critical → high → medium → low
495
+ - Include file:line references for all findings
496
+
497
+ 3. CLI Output Log: ${outputDir}/reports/${dimension}-cli-output.txt
498
+ - Raw CLI tool output for debugging
499
+ - Include full analysis text
500
+
501
+ ## Dimension-Specific Guidance
502
+ ${getDimensionGuidance(dimension)}
503
+
504
+ ## Success Criteria
505
+ - [ ] Schema obtained via cat review-dimension-results-schema.json
506
+ - [ ] All changed files analyzed for ${dimension} concerns
507
+ - [ ] All findings include file:line references with code snippets
508
+ - [ ] Severity assessment follows established criteria (see reference)
509
+ - [ ] Recommendations are actionable with code examples
510
+ - [ ] JSON output follows schema exactly
511
+ - [ ] Report is comprehensive and well-organized
512
+ `
513
+ )
514
+ ```
515
+
516
+ **Deep-Dive Agent** (iteration execution):
517
+
518
+ ```javascript
519
+ Task(
520
+ subagent_type="cli-explore-agent",
521
+ description=`Deep-dive analysis for critical finding: ${findingTitle} via Dependency Map + Deep Scan`,
522
+ prompt=`
523
+ ## Task Objective
524
+ Perform focused root cause analysis using Dependency Map mode (for impact analysis) + Deep Scan mode (for semantic understanding) to generate comprehensive remediation plan for critical ${dimension} issue
525
+
526
+ ## Analysis Mode Selection
527
+ Use **Dependency Map mode** first to understand dependencies:
528
+ - Build dependency graph around ${file} to identify affected components
529
+ - Detect circular dependencies or tight coupling related to this finding
530
+ - Calculate change risk scores for remediation impact
531
+
532
+ Then apply **Deep Scan mode** for semantic analysis:
533
+ - Understand design intent and architectural context
534
+ - Identify non-standard patterns or implicit dependencies
535
+ - Extract remediation insights from code structure
536
+
537
+ ## Finding Context
538
+ - Finding ID: ${findingId}
539
+ - Original Dimension: ${dimension}
540
+ - Title: ${findingTitle}
541
+ - File: ${file}:${line}
542
+ - Severity: ${severity}
543
+ - Category: ${category}
544
+ - Original Description: ${description}
545
+ - Iteration: ${iteration}
546
+
547
+ ## MANDATORY FIRST STEPS (Execute by Agent)
548
+ **You (cli-explore-agent) MUST execute these steps in order:**
549
+ 1. Read original finding: ${dimensionJsonPath}
550
+ 2. Read affected file: ${file}
551
+ 3. Identify related code: bash(grep -r "import.*${basename(file)}" ${workflowDir}/src --include="*.ts")
552
+ 4. Read test files: bash(find ${workflowDir}/tests -name "*${basename(file, '.ts')}*" -type f)
553
+ 5. Execute: cat ~/.claude/workflows/cli-templates/schemas/review-deep-dive-results-schema.json (get output schema reference)
554
+
555
+ ## CLI Configuration
556
+ - Tool Priority: gemini → qwen → codex
557
+ - Template: ~/.claude/workflows/cli-templates/prompts/analysis/01-diagnose-bug-root-cause.txt
558
+ - Timeout: 2400000ms (40 minutes)
559
+ - Mode: analysis (READ-ONLY)
560
+
561
+ ## Expected Deliverables
562
+
563
+ **Schema Reference**: Schema obtained in MANDATORY FIRST STEPS step 5, follow schema exactly
564
+
565
+ 1. Deep-Dive Results JSON: ${outputDir}/iterations/iteration-${iteration}-finding-${findingId}.json
566
+
567
+ **⚠️ CRITICAL JSON STRUCTURE REQUIREMENTS**:
568
+
569
+ Root structure MUST be array: \`[{ ... }]\` NOT \`{ ... }\`
570
+
571
+ Required top-level fields:
572
+ - finding_id, dimension, iteration, analysis_timestamp
573
+ - cli_tool_used, model, analysis_duration_ms
574
+ - original_finding, root_cause, remediation_plan
575
+ - impact_assessment, reassessed_severity, confidence_score, cross_references
576
+
577
+ All nested objects must follow schema exactly - read schema for field names
578
+
579
+ 2. Analysis Report: ${outputDir}/reports/deep-dive-${iteration}-${findingId}.md
580
+ - Detailed root cause analysis
581
+ - Step-by-step remediation plan
582
+ - Impact assessment and rollback strategy
583
+
584
+ ## Success Criteria
585
+ - [ ] Schema obtained via cat review-deep-dive-results-schema.json
586
+ - [ ] Root cause clearly identified with supporting evidence
587
+ - [ ] Remediation plan is step-by-step actionable with exact file:line references
588
+ - [ ] Each step includes specific commands and validation tests
589
+ - [ ] Impact fully assessed (files, tests, breaking changes, dependencies)
590
+ - [ ] Severity re-evaluation justified with evidence
591
+ - [ ] Confidence score accurately reflects certainty of analysis
592
+ - [ ] JSON output follows schema exactly
593
+ - [ ] References include project-specific and external documentation
594
+ `
595
+ )
596
+ ```
597
+
598
+ ### Dimension Guidance Reference
599
+
600
+ ```javascript
601
+ function getDimensionGuidance(dimension) {
602
+ const guidance = {
603
+ security: `
604
+ Focus Areas:
605
+ - Input validation and sanitization
606
+ - Authentication and authorization mechanisms
607
+ - Data encryption (at-rest and in-transit)
608
+ - SQL/NoSQL injection vulnerabilities
609
+ - XSS, CSRF, and other web vulnerabilities
610
+ - Sensitive data exposure
611
+ - Access control and privilege escalation
612
+
613
+ Severity Criteria:
614
+ - Critical: Authentication bypass, SQL injection, RCE, sensitive data exposure
615
+ - High: Missing authorization checks, weak encryption, exposed secrets
616
+ - Medium: Missing input validation, insecure defaults, weak password policies
617
+ - Low: Security headers missing, verbose error messages, outdated dependencies
618
+ `,
619
+ architecture: `
620
+ Focus Areas:
621
+ - Layering and separation of concerns
622
+ - Coupling and cohesion
623
+ - Design pattern adherence
624
+ - Dependency management
625
+ - Scalability and extensibility
626
+ - Module boundaries
627
+ - API design consistency
628
+
629
+ Severity Criteria:
630
+ - Critical: Circular dependencies, god objects, tight coupling across layers
631
+ - High: Violated architectural principles, scalability bottlenecks
632
+ - Medium: Missing abstractions, inconsistent patterns, suboptimal design
633
+ - Low: Minor coupling issues, documentation gaps, naming inconsistencies
634
+ `,
635
+ quality: `
636
+ Focus Areas:
637
+ - Code duplication
638
+ - Complexity (cyclomatic, cognitive)
639
+ - Naming conventions
640
+ - Error handling patterns
641
+ - Code readability
642
+ - Comment quality
643
+ - Dead code
644
+
645
+ Severity Criteria:
646
+ - Critical: Severe complexity (CC > 20), massive duplication (>50 lines)
647
+ - High: High complexity (CC > 10), significant duplication, poor error handling
648
+ - Medium: Moderate complexity (CC > 5), naming issues, code smells
649
+ - Low: Minor duplication, documentation gaps, cosmetic issues
650
+ `,
651
+ 'action-items': `
652
+ Focus Areas:
653
+ - Requirements coverage verification
654
+ - Acceptance criteria met
655
+ - Documentation completeness
656
+ - Deployment readiness
657
+ - Missing functionality
658
+ - Test coverage gaps
659
+ - Configuration management
660
+
661
+ Severity Criteria:
662
+ - Critical: Core requirements not met, deployment blockers
663
+ - High: Significant functionality missing, acceptance criteria not met
664
+ - Medium: Minor requirements gaps, documentation incomplete
665
+ - Low: Nice-to-have features missing, minor documentation gaps
666
+ `,
667
+ performance: `
668
+ Focus Areas:
669
+ - N+1 query problems
670
+ - Inefficient algorithms (O(n²) where O(n log n) possible)
671
+ - Memory leaks
672
+ - Blocking operations on main thread
673
+ - Missing caching opportunities
674
+ - Resource usage (CPU, memory, network)
675
+ - Database query optimization
676
+
677
+ Severity Criteria:
678
+ - Critical: Memory leaks, O(n²) in hot path, blocking main thread
679
+ - High: N+1 queries, missing indexes, inefficient algorithms
680
+ - Medium: Suboptimal caching, unnecessary computations, lazy loading issues
681
+ - Low: Minor optimization opportunities, redundant operations
682
+ `,
683
+ maintainability: `
684
+ Focus Areas:
685
+ - Technical debt indicators
686
+ - Magic numbers and hardcoded values
687
+ - Long methods (>50 lines)
688
+ - Large classes (>500 lines)
689
+ - Dead code and commented code
690
+ - Code documentation
691
+ - Test coverage
692
+
693
+ Severity Criteria:
694
+ - Critical: Massive methods (>200 lines), severe technical debt blocking changes
695
+ - High: Large methods (>100 lines), significant dead code, undocumented complex logic
696
+ - Medium: Magic numbers, moderate technical debt, missing tests
697
+ - Low: Minor refactoring opportunities, cosmetic improvements
698
+ `,
699
+ 'best-practices': `
700
+ Focus Areas:
701
+ - Framework conventions adherence
702
+ - Language idioms
703
+ - Anti-patterns
704
+ - Deprecated API usage
705
+ - Coding standards compliance
706
+ - Error handling patterns
707
+ - Logging and monitoring
708
+
709
+ Severity Criteria:
710
+ - Critical: Severe anti-patterns, deprecated APIs with security risks
711
+ - High: Major convention violations, poor error handling, missing logging
712
+ - Medium: Minor anti-patterns, style inconsistencies, suboptimal patterns
713
+ - Low: Cosmetic style issues, minor convention deviations
714
+ `
715
+ };
716
+
717
+ return guidance[dimension] || 'Standard code review analysis';
718
+ }
719
+ ```
720
+
721
+ ### Completion Conditions
722
+
723
+ **Full Success**:
724
+ - All dimensions reviewed
725
+ - Critical findings = 0
726
+ - High findings ≤ 5
727
+ - Action: Generate final report, mark phase=complete
728
+
729
+ **Partial Success**:
730
+ - All dimensions reviewed
731
+ - Max iterations reached
732
+ - Still have critical/high findings
733
+ - Action: Generate report with warnings, recommend follow-up
734
+
735
+ ### Error Handling
736
+
737
+ **Phase-Level Error Matrix**:
738
+
739
+ | Phase | Error | Blocking? | Action |
740
+ |-------|-------|-----------|--------|
741
+ | Phase 1 | Session not found | Yes | Error and exit |
742
+ | Phase 1 | No completed tasks | Yes | Error and exit |
743
+ | Phase 1 | No changed files | Yes | Error and exit |
744
+ | Phase 2 | Single dimension fails | No | Log warning, continue other dimensions |
745
+ | Phase 2 | All dimensions fail | Yes | Error and exit |
746
+ | Phase 3 | Missing dimension JSON | No | Skip in aggregation, log warning |
747
+ | Phase 4 | Deep-dive agent fails | No | Skip finding, continue others |
748
+ | Phase 4 | Max iterations reached | No | Generate partial report |
749
+
750
+ **CLI Fallback Chain**: Gemini → Qwen → Codex → degraded mode
751
+
752
+ **Fallback Triggers**:
753
+ 1. HTTP 429, 5xx errors, connection timeout
754
+ 2. Invalid JSON output (parse error, missing required fields)
755
+ 3. Low confidence score < 0.4
756
+ 4. Analysis too brief (< 100 words in report)
757
+
758
+ **Fallback Behavior**:
759
+ - On trigger: Retry with next tool in chain
760
+ - After Codex fails: Enter degraded mode (skip analysis, log error)
761
+ - Degraded mode: Continue workflow with available results
762
+
763
+ ### TodoWrite Structure
764
+
765
+ ```javascript
766
+ TodoWrite({
767
+ todos: [
768
+ { content: "Phase 1: Discovery & Initialization", status: "completed", activeForm: "Initializing" },
769
+ { content: "Phase 2: Parallel Reviews (7 dimensions)", status: "in_progress", activeForm: "Reviewing" },
770
+ { content: " → Security review", status: "in_progress", activeForm: "Analyzing security" },
771
+ // ... other dimensions as sub-items
772
+ { content: "Phase 3: Aggregation", status: "pending", activeForm: "Aggregating" },
773
+ { content: "Phase 4: Deep-dive", status: "pending", activeForm: "Deep-diving" },
774
+ { content: "Phase 5: Completion", status: "pending", activeForm: "Completing" }
775
+ ]
776
+ });
777
+ ```
778
+
779
+ ## Best Practices
780
+
781
+ 1. **Default Settings Work**: 7 dimensions + 3 iterations sufficient for most cases
782
+ 2. **Parallel Execution**: ~60 minutes for full initial review (7 dimensions)
783
+ 3. **Trust Aggregation Logic**: Auto-selection based on proven heuristics
784
+ 4. **Monitor Logs**: Check reports/ directory for CLI analysis insights
785
+ 5. **Dashboard Polling**: Refresh every 5 seconds for real-time updates
786
+ 6. **Export Results**: Use dashboard export for external tracking tools
787
+
788
+ ## Related Commands
789
+
790
+ ### Automated Fix Workflow
791
+ After completing a review, use the dashboard to select findings and export them for automated fixing:
792
+
793
+ ```bash
794
+ # Step 1: Complete review (this command)
795
+ /workflow:review-session-cycle
796
+
797
+ # Step 2: Open dashboard, select findings, and export
798
+ # Dashboard generates: fix-export-{timestamp}.json
799
+
800
+ # Step 3: Run automated fixes
801
+ /workflow:review-fix .workflow/active/WFS-{session-id}/.review/fix-export-{timestamp}.json
802
+ ```
803
+
804
+ See `/workflow:review-fix` for automated fixing with smart grouping, parallel execution, and test verification.
805
+