claude-code-workflow 7.2.30 → 7.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/.claude/commands/workflow-skill.md +130 -0
  2. package/.claude/skills/ccw-chain/SKILL.md +44 -71
  3. package/.claude/skills/ccw-chain/chains/ccw-cycle.json +13 -3
  4. package/.claude/skills/ccw-chain/chains/ccw-exploration.json +33 -22
  5. package/.claude/skills/ccw-chain/chains/ccw-issue.json +23 -12
  6. package/.claude/skills/ccw-chain/chains/ccw-lightweight.json +23 -9
  7. package/.claude/skills/ccw-chain/chains/ccw-main.json +15 -2
  8. package/.claude/skills/ccw-chain/chains/ccw-standard.json +28 -16
  9. package/.claude/skills/ccw-chain/chains/ccw-team.json +7 -2
  10. package/.claude/skills/ccw-chain/chains/ccw-with-file.json +25 -9
  11. package/.claude/skills/chain-loader/phases/01-analyze-skill.md +53 -53
  12. package/.claude/skills/chain-loader/specs/chain-schema.md +30 -3
  13. package/.claude/skills/chain-loader/templates/chain-json.md +63 -63
  14. package/.claude/skills/workflow-plan/SKILL.md +1 -0
  15. package/.claude/skills/workflow-plan/phases/01-session-discovery.md +19 -2
  16. package/.claude/skills/workflow-plan/phases/02-context-gathering.md +2 -2
  17. package/.claude/skills/workflow-plan/phases/04-task-generation.md +9 -1
  18. package/.codex/skills/analyze-with-file/SKILL.md +383 -134
  19. package/.codex/skills/brainstorm/SKILL.md +3 -3
  20. package/.codex/skills/brainstorm-with-file/SKILL.md +208 -88
  21. package/.codex/skills/clean/SKILL.md +1 -1
  22. package/.codex/skills/csv-wave-pipeline/SKILL.md +2 -2
  23. package/.codex/skills/investigate/orchestrator.md +24 -0
  24. package/.codex/skills/issue-discover/SKILL.md +374 -361
  25. package/.codex/skills/issue-discover/phases/01-issue-new.md +1 -1
  26. package/.codex/skills/issue-discover/phases/02-discover.md +2 -2
  27. package/.codex/skills/issue-discover/phases/03-discover-by-prompt.md +1 -1
  28. package/.codex/skills/issue-discover/phases/04-quick-execute.md +2 -2
  29. package/.codex/skills/parallel-dev-cycle/SKILL.md +44 -37
  30. package/.codex/skills/project-documentation-workflow/SKILL.md +1 -1
  31. package/.codex/skills/review-cycle/SKILL.md +31 -12
  32. package/.codex/skills/roadmap-with-file/SKILL.md +141 -133
  33. package/.codex/skills/security-audit/orchestrator.md +29 -0
  34. package/.codex/skills/session-sync/SKILL.md +1 -1
  35. package/.codex/skills/ship/orchestrator.md +24 -0
  36. package/.codex/skills/spec-add/SKILL.md +5 -5
  37. package/.codex/skills/spec-generator/SKILL.md +33 -2
  38. package/.codex/skills/spec-generator/phases/01-5-requirement-clarification.md +3 -3
  39. package/.codex/skills/spec-generator/phases/01-discovery.md +1 -1
  40. package/.codex/skills/spec-generator/phases/02-product-brief.md +1 -1
  41. package/.codex/skills/spec-generator/phases/03-requirements.md +1 -1
  42. package/.codex/skills/spec-generator/phases/04-architecture.md +1 -1
  43. package/.codex/skills/spec-generator/phases/05-epics-stories.md +1 -1
  44. package/.codex/skills/spec-generator/phases/06-readiness-check.md +1 -1
  45. package/.codex/skills/spec-generator/phases/07-issue-export.md +1 -1
  46. package/.codex/skills/spec-setup/SKILL.md +669 -669
  47. package/.codex/skills/team-arch-opt/specs/team-config.json +1 -1
  48. package/.codex/skills/team-brainstorm/SKILL.md +259 -259
  49. package/.codex/skills/team-coordinate/SKILL.md +359 -359
  50. package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +1 -1
  51. package/.codex/skills/team-designer/SKILL.md +27 -1
  52. package/.codex/skills/team-designer/phases/01-requirements-analysis.md +2 -2
  53. package/.codex/skills/team-designer/phases/02-scaffold-generation.md +1 -1
  54. package/.codex/skills/team-designer/phases/04-validation.md +1 -1
  55. package/.codex/skills/team-executor/SKILL.md +218 -218
  56. package/.codex/skills/team-frontend/SKILL.md +227 -227
  57. package/.codex/skills/team-frontend-debug/SKILL.md +278 -278
  58. package/.codex/skills/team-frontend-debug/roles/coordinator/commands/analyze.md +2 -2
  59. package/.codex/skills/team-interactive-craft/SKILL.md +220 -220
  60. package/.codex/skills/team-interactive-craft/roles/coordinator/role.md +209 -209
  61. package/.codex/skills/team-issue/SKILL.md +269 -269
  62. package/.codex/skills/team-issue/roles/coordinator/role.md +1 -1
  63. package/.codex/skills/team-lifecycle-v4/SKILL.md +305 -305
  64. package/.codex/skills/team-motion-design/SKILL.md +222 -222
  65. package/.codex/skills/team-motion-design/roles/coordinator/role.md +210 -210
  66. package/.codex/skills/team-perf-opt/SKILL.md +258 -258
  67. package/.codex/skills/team-perf-opt/specs/team-config.json +1 -1
  68. package/.codex/skills/team-planex/SKILL.md +216 -216
  69. package/.codex/skills/team-quality-assurance/SKILL.md +229 -229
  70. package/.codex/skills/team-review/SKILL.md +227 -227
  71. package/.codex/skills/team-roadmap-dev/SKILL.md +238 -238
  72. package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/roadmap-discuss.md +5 -5
  73. package/.codex/skills/team-tech-debt/SKILL.md +206 -206
  74. package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +1 -1
  75. package/.codex/skills/team-testing/SKILL.md +237 -237
  76. package/.codex/skills/team-ui-polish/SKILL.md +218 -218
  77. package/.codex/skills/team-ui-polish/roles/coordinator/role.md +213 -213
  78. package/.codex/skills/team-uidesign/SKILL.md +219 -219
  79. package/.codex/skills/team-uidesign/roles/coordinator/role.md +2 -2
  80. package/.codex/skills/team-ultra-analyze/SKILL.md +260 -260
  81. package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md +1 -1
  82. package/.codex/skills/team-ultra-analyze/roles/coordinator/role.md +1 -1
  83. package/.codex/skills/team-ux-improve/SKILL.md +227 -227
  84. package/.codex/skills/team-ux-improve/roles/coordinator/role.md +1 -1
  85. package/.codex/skills/team-ux-improve/specs/team-config.json +1 -1
  86. package/.codex/skills/team-visual-a11y/SKILL.md +319 -319
  87. package/.codex/skills/team-visual-a11y/roles/coordinator/role.md +213 -213
  88. package/.codex/skills/workflow-execute/SKILL.md +5 -5
  89. package/.codex/skills/workflow-lite-planex/SKILL.md +3 -3
  90. package/.codex/skills/workflow-plan/SKILL.md +3 -3
  91. package/.codex/skills/workflow-tdd-plan/SKILL.md +4 -4
  92. package/.codex/skills/workflow-test-fix-cycle/SKILL.md +403 -402
  93. package/ccw/dist/cli.d.ts.map +1 -1
  94. package/ccw/dist/cli.js +16 -0
  95. package/ccw/dist/cli.js.map +1 -1
  96. package/ccw/dist/commands/chain-loader.d.ts +2 -0
  97. package/ccw/dist/commands/chain-loader.d.ts.map +1 -0
  98. package/ccw/dist/commands/chain-loader.js +11 -0
  99. package/ccw/dist/commands/chain-loader.js.map +1 -0
  100. package/ccw/dist/commands/install.d.ts.map +1 -1
  101. package/ccw/dist/commands/install.js +52 -1
  102. package/ccw/dist/commands/install.js.map +1 -1
  103. package/ccw/dist/commands/launcher.d.ts +2 -0
  104. package/ccw/dist/commands/launcher.d.ts.map +1 -0
  105. package/ccw/dist/commands/launcher.js +434 -0
  106. package/ccw/dist/commands/launcher.js.map +1 -0
  107. package/ccw/dist/tools/chain-loader.d.ts.map +1 -1
  108. package/ccw/dist/tools/chain-loader.js +457 -45
  109. package/ccw/dist/tools/chain-loader.js.map +1 -1
  110. package/ccw/dist/tools/skill-context-loader.d.ts.map +1 -1
  111. package/ccw/dist/tools/skill-context-loader.js +12 -26
  112. package/ccw/dist/tools/skill-context-loader.js.map +1 -1
  113. package/ccw/dist/types/chain-types.d.ts +41 -1
  114. package/ccw/dist/types/chain-types.d.ts.map +1 -1
  115. package/ccw/dist/utils/chain-visualizer.d.ts +13 -0
  116. package/ccw/dist/utils/chain-visualizer.d.ts.map +1 -0
  117. package/ccw/dist/utils/chain-visualizer.js +164 -0
  118. package/ccw/dist/utils/chain-visualizer.js.map +1 -0
  119. package/package.json +1 -1
  120. package/.claude/commands/cli/cli-init.md +0 -441
  121. package/.claude/commands/cli/codex-review.md +0 -361
  122. package/.claude/commands/flow-create.md +0 -663
  123. package/.claude/skills/ccw-chain/phases/analyze-with-file.md +0 -788
  124. package/.claude/skills/ccw-chain/phases/brainstorm/SKILL.md +0 -408
  125. package/.claude/skills/ccw-chain/phases/brainstorm/phases/01-mode-routing.md +0 -207
  126. package/.claude/skills/ccw-chain/phases/brainstorm/phases/02-artifacts.md +0 -567
  127. package/.claude/skills/ccw-chain/phases/brainstorm/phases/03-role-analysis.md +0 -748
  128. package/.claude/skills/ccw-chain/phases/brainstorm/phases/04-synthesis.md +0 -827
  129. package/.claude/skills/ccw-chain/phases/brainstorm-with-file.md +0 -482
  130. package/.claude/skills/ccw-chain/phases/collaborative-plan-with-file.md +0 -639
  131. package/.claude/skills/ccw-chain/phases/debug-with-file.md +0 -656
  132. package/.claude/skills/ccw-chain/phases/integration-test-cycle.md +0 -936
  133. package/.claude/skills/ccw-chain/phases/issue-convert-to-plan.md +0 -720
  134. package/.claude/skills/ccw-chain/phases/issue-discover.md +0 -483
  135. package/.claude/skills/ccw-chain/phases/issue-execute.md +0 -629
  136. package/.claude/skills/ccw-chain/phases/issue-from-brainstorm.md +0 -382
  137. package/.claude/skills/ccw-chain/phases/issue-plan.md +0 -343
  138. package/.claude/skills/ccw-chain/phases/issue-queue.md +0 -464
  139. package/.claude/skills/ccw-chain/phases/refactor-cycle.md +0 -852
  140. package/.claude/skills/ccw-chain/phases/review-cycle/SKILL.md +0 -132
  141. package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-fix.md +0 -760
  142. package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-module.md +0 -764
  143. package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-session.md +0 -775
  144. package/.claude/skills/ccw-chain/phases/roadmap-with-file.md +0 -544
  145. package/.claude/skills/ccw-chain/phases/spec-generator/SKILL.md +0 -338
  146. package/.claude/skills/ccw-chain/phases/spec-generator/phases/01-5-requirement-clarification.md +0 -404
  147. package/.claude/skills/ccw-chain/phases/spec-generator/phases/01-discovery.md +0 -257
  148. package/.claude/skills/ccw-chain/phases/spec-generator/phases/02-product-brief.md +0 -274
  149. package/.claude/skills/ccw-chain/phases/spec-generator/phases/03-requirements.md +0 -184
  150. package/.claude/skills/ccw-chain/phases/spec-generator/phases/04-architecture.md +0 -248
  151. package/.claude/skills/ccw-chain/phases/spec-generator/phases/05-epics-stories.md +0 -178
  152. package/.claude/skills/ccw-chain/phases/spec-generator/phases/06-5-auto-fix.md +0 -144
  153. package/.claude/skills/ccw-chain/phases/spec-generator/phases/06-readiness-check.md +0 -480
  154. package/.claude/skills/ccw-chain/phases/team-planex.md +0 -123
  155. package/.claude/skills/ccw-chain/phases/ui-design-explore-auto.md +0 -678
  156. package/.claude/skills/ccw-chain/phases/unified-execute-with-file.md +0 -870
  157. package/.claude/skills/ccw-chain/phases/workflow-execute/SKILL.md +0 -625
  158. package/.claude/skills/ccw-chain/phases/workflow-execute/phases/06-review.md +0 -215
  159. package/.claude/skills/ccw-chain/phases/workflow-lite-plan.md +0 -616
  160. package/.claude/skills/ccw-chain/phases/workflow-multi-cli-plan.md +0 -424
  161. package/.claude/skills/ccw-chain/phases/workflow-plan/SKILL.md +0 -466
  162. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/01-session-discovery.md +0 -99
  163. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/02-context-gathering.md +0 -338
  164. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/03-conflict-resolution.md +0 -422
  165. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/04-task-generation.md +0 -440
  166. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/05-plan-verify.md +0 -395
  167. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/06-replan.md +0 -594
  168. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/SKILL.md +0 -527
  169. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/01-session-discovery.md +0 -57
  170. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/02-context-gathering.md +0 -407
  171. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/03-test-coverage-analysis.md +0 -172
  172. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/04-conflict-resolution.md +0 -426
  173. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/05-tdd-task-generation.md +0 -473
  174. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/06-tdd-structure-validation.md +0 -189
  175. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/07-tdd-verify.md +0 -635
  176. package/.claude/skills/ccw-chain/phases/workflow-test-fix/SKILL.md +0 -482
  177. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/01-session-start.md +0 -60
  178. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/02-test-context-gather.md +0 -493
  179. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/03-test-concept-enhanced.md +0 -150
  180. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/04-test-task-generate.md +0 -346
  181. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/05-test-cycle-execute.md +0 -538
  182. package/.claude/skills/ccw-chain/specs/intent-patterns.md +0 -60
  183. package/.claude/skills/team-edict.zip +0 -0
@@ -0,0 +1,130 @@
1
+ ---
2
+ name: workflow-skill
3
+ description: Direct workflow skill launcher - invoke any registered skill by name with arguments
4
+ argument-hint: "<skill-name> [arguments]"
5
+ allowed-tools: Skill(*), AskUserQuestion(*), Read(*), Glob(*)
6
+ ---
7
+
8
+ # Workflow Skill Launcher
9
+
10
+ Direct entry point to invoke any workflow skill by name. Bypasses CCW intent analysis and routing — execute exactly the skill the user specifies.
11
+
12
+ ## Usage
13
+
14
+ ```
15
+ /workflow-skill <skill-name> [arguments]
16
+ ```
17
+
18
+ ## Execution
19
+
20
+ 1. **Parse** `$ARGUMENTS` → extract `skill_name` (first token) and `args` (remaining)
21
+ 2. **Validate** skill exists (check skill list below)
22
+ 3. **Invoke** `Skill(skill_name, args)`
23
+
24
+ ```javascript
25
+ const [skillName, ...rest] = $ARGUMENTS.trim().split(/\s+/);
26
+ const args = rest.join(' ');
27
+
28
+ // Validate
29
+ if (!skillName) {
30
+ // Show skill catalog (see below)
31
+ return;
32
+ }
33
+
34
+ // Execute
35
+ Skill(skillName, args);
36
+ ```
37
+
38
+ ## Skill Catalog
39
+
40
+ If no arguments provided, show this catalog for user selection.
41
+
42
+ ### Planning Skills
43
+ | Skill | Description |
44
+ |-------|-------------|
45
+ | `workflow-lite-plan` | Lightweight planning — explore → plan → confirm → handoff |
46
+ | `workflow-plan` | Full planning — session → context → convention → gen → verify |
47
+ | `workflow-tdd-plan` | TDD planning — 6-phase TDD plan → verify |
48
+ | `workflow-multi-cli-plan` | Multi-CLI collaborative planning with codebase context |
49
+
50
+ ### Execution Skills
51
+ | Skill | Description |
52
+ |-------|-------------|
53
+ | `workflow-lite-execute` | Lightweight execution — task grouping → batch → review → sync |
54
+ | `workflow-execute` | Full execution — session discovery → task processing → commit |
55
+ | `team-executor` | Resume existing team session and execute remaining tasks |
56
+ | `team-planex` | Plan-and-execute wave pipeline (planner + executor) |
57
+
58
+ ### Review & Test Skills
59
+ | Skill | Description |
60
+ |-------|-------------|
61
+ | `workflow-test-fix` | Test generation + fix cycle |
62
+ | `workflow-lite-test-review` | Post-execution test review and fix |
63
+ | `review-cycle` | Multi-dimensional code review with automated fix |
64
+ | `review-code` | Code review with structured report (read-only) |
65
+
66
+ ### Exploration Skills
67
+ | Skill | Description |
68
+ |-------|-------------|
69
+ | `brainstorm` | Multi-perspective brainstorming |
70
+ | `spec-generator` | Specification generator — 7-phase document chain |
71
+ | `investigate` | Systematic debugging with Iron Law methodology |
72
+
73
+ ### Workflow Commands (slash-style)
74
+ | Skill | Description |
75
+ |-------|-------------|
76
+ | `workflow:analyze-with-file` | Collaborative analysis with documented discussions |
77
+ | `workflow:brainstorm-with-file` | Interactive brainstorming with multi-CLI collaboration |
78
+ | `workflow:collaborative-plan-with-file` | Multi-agent collaborative planning |
79
+ | `workflow:debug-with-file` | Hypothesis-driven debugging |
80
+ | `workflow:roadmap-with-file` | Strategic requirement roadmap |
81
+ | `workflow:unified-execute-with-file` | Universal execution engine for any planning output |
82
+ | `workflow:integration-test-cycle` | Self-iterating integration test workflow |
83
+ | `workflow:refactor-cycle` | Tech debt discovery and refactoring cycle |
84
+ | `workflow:clean` | Intelligent code cleanup |
85
+
86
+ ### Team Skills
87
+ | Skill | Description |
88
+ |-------|-------------|
89
+ | `team-frontend` | Frontend development team |
90
+ | `team-issue` | Issue resolution team |
91
+ | `team-review` | Code review team (3-role pipeline) |
92
+ | `team-testing` | Testing team (progressive coverage) |
93
+ | `team-lifecycle-v4` | Full lifecycle team (plan → develop → test → review) |
94
+ | `team-brainstorm` | Brainstorming team |
95
+ | `team-arch-opt` | Architecture optimization team |
96
+ | `team-perf-opt` | Performance optimization team |
97
+ | `team-quality-assurance` | Quality assurance team |
98
+ | `team-tech-debt` | Tech debt identification and removal |
99
+ | `team-roadmap-dev` | Roadmap-driven development |
100
+ | `team-uidesign` | UI design team |
101
+ | `team-ui-polish` | UI polish team |
102
+ | `team-ultra-analyze` | Deep collaborative analysis team |
103
+ | `team-coordinate` | Universal team coordination with dynamic roles |
104
+
105
+ ### Meta Skills
106
+ | Skill | Description |
107
+ |-------|-------------|
108
+ | `skill-generator` | Create new Claude Code skills |
109
+ | `workflow-skill-designer` | Design orchestrator+phases structured skills |
110
+ | `wf-composer` | Semantic workflow composer from natural language |
111
+ | `wf-player` | Workflow template player |
112
+
113
+ ## Examples
114
+
115
+ ```bash
116
+ # Direct skill invocation
117
+ /workflow-skill workflow-lite-plan "Add user authentication"
118
+ /workflow-skill workflow-plan "Refactor payment module"
119
+ /workflow-skill brainstorm "Notification system architecture"
120
+ /workflow-skill workflow-test-fix --session WFS-123
121
+ /workflow-skill team-planex "Implement OAuth2 + 2FA"
122
+ /workflow-skill workflow:analyze-with-file "认证架构分析"
123
+ /workflow-skill review-cycle
124
+
125
+ # With auto mode
126
+ /workflow-skill workflow-lite-plan -y "Fix login timeout"
127
+
128
+ # No arguments → show catalog
129
+ /workflow-skill
130
+ ```
@@ -6,69 +6,31 @@ allowed-tools: Skill(*), TodoWrite(*), AskUserQuestion(*), Read(*), Grep(*), Glo
6
6
 
7
7
  # CCW Chain Orchestrator
8
8
 
9
- Chain-based version of the CCW workflow orchestrator. Uses the chain_loader tool for progressive step loading and LLM-driven decision routing. Each step node loads the **actual command/skill document** for that pipeline stage.
9
+ Chain-based workflow orchestrator using `chain_loader` for progressive step loading and LLM-driven decision routing.
10
10
 
11
- ## Architecture
11
+ ## Discovery
12
12
 
13
- ```
14
- User Input ccw-main (intent clarity route)
15
-
16
- ccw-{category} (select flow step sequence)
17
-
18
- Each step loads actual skill/command doc from phases/
19
-
20
- LLM executes via Skill() call per loaded doc
21
- ```
22
-
23
- ## Chain Files (8 chains)
24
-
25
- | Chain | Nodes | Purpose |
26
- |-------|-------|---------|
27
- | `ccw-main` | 5 | Entry: intent analysis → clarity check → category routing |
28
- | `ccw-lightweight` | 8 | Level 2: rapid, bugfix, hotfix, docs |
29
- | `ccw-standard` | 17 | Level 3: coupled, tdd, test-fix, review, multi-cli, ui |
30
- | `ccw-exploration` | 22 | Level 4: brainstorm, spec-driven, full, greenfield |
31
- | `ccw-with-file` | 9 | With-File: analyze, debug, collab-plan, roadmap |
32
- | `ccw-cycle` | 4 | Cycle: integration-test, refactor |
33
- | `ccw-issue` | 13 | Issue: batch, rapid-to-issue, brainstorm-to-issue |
34
- | `ccw-team` | 1 | Team: team-planex |
35
-
36
- ## phases/ — Actual Command/Skill Documents
37
-
38
- Step nodes reference actual docs via `content_ref`. The `phases/` directory contains:
39
-
40
- **Commands** (flat files — copied from `.claude/commands/`):
41
- - `analyze-with-file.md`, `brainstorm-with-file.md`, `collaborative-plan-with-file.md`
42
- - `debug-with-file.md`, `integration-test-cycle.md`, `refactor-cycle.md`
43
- - `roadmap-with-file.md`, `unified-execute-with-file.md`, `ui-design-explore-auto.md`
44
- - `issue-discover.md`, `issue-plan.md`, `issue-queue.md`, `issue-execute.md`
45
- - `issue-convert-to-plan.md`, `issue-from-brainstorm.md`
46
-
47
- **Skills without phases** (flat files — copied from SKILL.md):
48
- - `workflow-lite-plan.md`, `workflow-multi-cli-plan.md`, `team-planex.md`
49
-
50
- **Skills with phases** (subdirectories — SKILL.md + phases/):
51
- - `workflow-plan/`, `workflow-execute/`, `workflow-tdd-plan/`
52
- - `workflow-test-fix/`, `review-cycle/`, `brainstorm/`, `spec-generator/`
13
+ 1. `chain_loader list` — list all chains with triggers, entries, and descriptions
14
+ 2. Match user intent to chain `triggers.task_types` / `triggers.keywords`
15
+ 3. `chain_loader inspect` — preview chain node graph and available entries
16
+ 4. `chain_loader start` — begin from default entry, named entry (`entry_name`), or any node (`node`)
53
17
 
54
18
  ## Execution Protocol
55
19
 
56
- When chain_loader delivers a step node with a skill/command doc:
20
+ When `chain_loader` delivers a step node with a skill/command doc:
57
21
 
58
22
  1. **Read** the loaded doc content to understand the skill's purpose and interface
59
23
  2. **Assemble** the Skill call: `Skill(skill_name, args)`
60
- - First step in pipeline: `args = "${analysis.goal}"`
61
- - Subsequent steps: `args = ""` (auto-receives session context from prior step)
24
+ - First step: `args = "${analysis.goal}"`
25
+ - Subsequent steps: `args = ""` (auto-receives session context)
62
26
  - Special args noted in step name (e.g., `--bugfix`, `--hotfix`, `--plan-only`)
63
27
  3. **Propagate -y**: If auto mode active, append `-y` to args
64
28
  4. **Execute**: `Skill(skill_name, args)` — blocking, wait for completion
65
- 5. **Track**: Update TodoWrite status, proceed to next step via `done`
29
+ 5. **Advance**: `chain_loader done` to proceed to next step
66
30
 
67
31
  ```javascript
68
- // Auto mode detection
69
32
  const autoYes = /\b(-y|--yes)\b/.test($ARGUMENTS);
70
33
 
71
- // Skill call assembly with -y propagation
72
34
  function assembleCommand(skillName, args, previousResult) {
73
35
  if (!args && previousResult?.session_id) {
74
36
  args = `--session="${previousResult.session_id}"`;
@@ -87,33 +49,44 @@ function assembleCommand(skillName, args, previousResult) {
87
49
  - Error handling: auto-skip failed steps, continue pipeline
88
50
  - Propagation: `-y` injected into every downstream Skill call
89
51
 
90
- ## Intent Analysis (ccw-main S1)
52
+ ## Delegation Protocol
91
53
 
92
- Detect task_type by regex priority — see `specs/intent-patterns.md` for full patterns.
54
+ When `chain_loader` returns `delegate_depth > 0`:
55
+ 1. Continue normal execution (read content, assemble Skill, execute)
56
+ 2. On `returned_from_delegate: true`, resume parent chain context
57
+ 3. Variables received from child chain are available for subsequent steps
93
58
 
94
- Key mappings: task_type → category chain → specific flow
59
+ ## Preloaded Context
95
60
 
96
- ## Execution via chain_loader
61
+ When `chain_loader start` returns `preloaded_keys`:
62
+ 1. Preloaded content is available via `chain_loader content` for the entire session
63
+ 2. Reference preloaded context when assembling Skill calls
64
+ 3. Use preloaded memory/project context to inform all downstream steps
97
65
 
98
- ```bash
99
- # Start
100
- ccw tool exec chain_loader '{"cmd":"start","skill":"ccw-chain","chain":"ccw-main"}'
66
+ ## Progress Visualization
101
67
 
102
- # Progress through steps
103
- ccw tool exec chain_loader '{"cmd":"done","session_id":"CL-ccw-chain-..."}'
68
+ After each `chain_loader done`, call `chain_loader visualize` to show progress.
69
+ Display the visualization in execution log for user awareness.
104
70
 
105
- # Decision nodes: pass choice index (1-based)
106
- ccw tool exec chain_loader '{"cmd":"done","session_id":"CL-ccw-chain-...","choice":1}'
107
- ```
71
+ ## Variable Propagation
72
+
73
+ Intent analysis results (`task_type`, `goal`, `auto_yes`) are stored as chain variables.
74
+ `assembleCommand()` reads variables from `chain_loader status` for Skill args.
75
+ Variables automatically flow through delegation via `pass_variables`/`receive_variables`.
76
+
77
+ ## Phase-Level Execution (Skill Chain Delegation)
78
+
79
+ When the current chain is a skill-level chain (entered via delegation from a category chain):
80
+ 1. Each step delivers **phase doc content** directly (not SKILL.md)
81
+ 2. **Execute phase instructions inline** — do NOT wrap in `Skill()` call
82
+ 3. Reference preloaded `skill-context` for orchestration patterns (TodoWrite, data flow, error handling)
83
+ 4. Phase execution produces artifacts (files, session state) consumed by the next phase
84
+ 5. The chain system controls phase progression — no need for internal phase orchestration
85
+
86
+ ## Architecture: Chain Definition Layers
108
87
 
109
- ## Pipeline Examples
110
-
111
- | Input | Chain Path | Pipeline |
112
- |-------|-----------|----------|
113
- | "Add API endpoint" | main→lightweight→Rapid | lite-plan test-fix |
114
- | "Fix login timeout" | main→lightweight→Bugfix | lite-plan(--bugfix) → test-fix |
115
- | "OAuth2 system" (high) | main→standard→Coupled | plan → execute → review → test-fix |
116
- | "brainstorm: notifications" | main→exploration→Brainstorm | brainstorm-file → plan → execute → test-fix |
117
- | "debug WebSocket" | main→with-file→Debug | debug-with-file |
118
- | "integration test: payments" | main→cycle→Integration | integration-test-cycle |
119
- | "roadmap: OAuth + 2FA" | main→with-file→Roadmap | roadmap-file → team-planex |
88
+ - **Category chains** (8): `ccw-chain/chains/` — routing and orchestration (ccw-main, ccw-standard, etc.)
89
+ - **Workflow skill chains** (7): `.claude/workflow-skills/*/chains/` — skill-level chains with phase content
90
+ - **Phase content**: `.claude/skills/*/phases/` original phase files, referenced via `@skills/` prefix
91
+ - Category chains delegate to workflow skill chains via `findChainAcrossSkills()` fallback
92
+ - Content refs: `@phases/` = skill-relative, `@skills/` = project `.claude/skills/` relative
@@ -2,8 +2,18 @@
2
2
  "chain_id": "ccw-cycle",
3
3
  "name": "CCW Cycle Workflows",
4
4
  "description": "Self-iterating cycle workflows: integration-test-cycle, refactor-cycle",
5
- "version": "2.0",
5
+ "version": "2.1",
6
6
  "entry": "D1",
7
+ "entries": [
8
+ { "name": "default", "node": "D1", "description": "Select flow via decision node" },
9
+ { "name": "integration-test", "node": "S_IT1", "description": "Direct: Integration Test Cycle" },
10
+ { "name": "refactor", "node": "S_RC1", "description": "Direct: Refactor Cycle" }
11
+ ],
12
+ "triggers": {
13
+ "task_types": ["integration-test", "refactor"],
14
+ "keywords": ["integration.*test|e2e.*test", "refactor|tech.*debt"],
15
+ "scope": "Cycle: self-iterating integration-test and refactor workflows"
16
+ },
7
17
  "nodes": {
8
18
  "D1": {
9
19
  "type": "decision",
@@ -15,7 +25,7 @@
15
25
  ],
16
26
  "default": "S_IT1"
17
27
  },
18
- "S_IT1": { "type": "step", "name": "Integration Test: integration-test-cycle", "content_ref": "@phases/integration-test-cycle.md", "next": null },
19
- "S_RC1": { "type": "step", "name": "Refactor: refactor-cycle", "content_ref": "@phases/refactor-cycle.md", "next": null }
28
+ "S_IT1": { "type": "step", "name": "Integration Test: integration-test-cycle", "content_ref": "@commands/workflow/integration-test-cycle.md", "next": null },
29
+ "S_RC1": { "type": "step", "name": "Refactor: refactor-cycle", "content_ref": "@commands/workflow/refactor-cycle.md", "next": null }
20
30
  }
21
31
  }
@@ -2,8 +2,19 @@
2
2
  "chain_id": "ccw-exploration",
3
3
  "name": "CCW Exploration Workflows (Level 4)",
4
4
  "description": "Level 4 workflow routing: brainstorm, spec-driven, full exploration, greenfield",
5
- "version": "2.0",
5
+ "version": "2.1",
6
6
  "entry": "D1",
7
+ "entries": [
8
+ { "name": "default", "node": "D1", "description": "Select flow via decision node" },
9
+ { "name": "brainstorm", "node": "S_BP1", "description": "Direct: Brainstorm → Plan flow" },
10
+ { "name": "spec-driven", "node": "S_SD1", "description": "Direct: Spec-Driven flow" },
11
+ { "name": "full", "node": "S_FE1", "description": "Direct: Full Exploration flow" }
12
+ ],
13
+ "triggers": {
14
+ "task_types": ["brainstorm", "spec-driven", "greenfield", "exploration"],
15
+ "keywords": ["brainstorm|ideation|creative thinking", "spec.*gen|specification|PRD", "from scratch|greenfield|new project", "uncertain|explore|research|what if"],
16
+ "scope": "Level 4: brainstorm, spec-driven, greenfield, full exploration"
17
+ },
7
18
  "nodes": {
8
19
  "D1": {
9
20
  "type": "decision",
@@ -18,30 +29,30 @@
18
29
  ],
19
30
  "default": "S_BP1"
20
31
  },
21
- "S_BP1": { "type": "step", "name": "Brainstorm: brainstorm-with-file", "content_ref": "@phases/brainstorm-with-file.md", "next": "S_BP2" },
22
- "S_BP2": { "type": "step", "name": "Brainstorm: workflow-plan", "content_ref": "@phases/workflow-plan/SKILL.md", "next": "S_BP3" },
23
- "S_BP3": { "type": "step", "name": "Brainstorm: workflow-execute", "content_ref": "@phases/workflow-execute/SKILL.md", "next": "S_BP4" },
24
- "S_BP4": { "type": "step", "name": "Brainstorm: workflow-test-fix", "content_ref": "@phases/workflow-test-fix/SKILL.md", "next": null },
32
+ "S_BP1": { "type": "step", "name": "Brainstorm: brainstorm-with-file", "content_ref": "@commands/workflow/brainstorm-with-file.md", "next": "S_BP2" },
33
+ "S_BP2": { "type": "delegate", "name": "Brainstorm: workflow-plan", "chain": "workflow-plan", "pass_variables": ["auto_yes", "goal"], "next": "S_BP3" },
34
+ "S_BP3": { "type": "step", "name": "Brainstorm: workflow-execute", "content_ref": "@skills/workflow-execute/SKILL.md", "next": "S_BP4" },
35
+ "S_BP4": { "type": "delegate", "name": "Brainstorm: workflow-test-fix", "chain": "workflow-test-fix", "pass_variables": ["auto_yes", "goal"], "next": null },
25
36
 
26
- "S_SD1": { "type": "step", "name": "Spec: spec-generator", "content_ref": "@phases/spec-generator/SKILL.md", "next": "S_SD2" },
27
- "S_SD2": { "type": "step", "name": "Spec: workflow-plan", "content_ref": "@phases/workflow-plan/SKILL.md", "next": "S_SD3" },
28
- "S_SD3": { "type": "step", "name": "Spec: workflow-execute", "content_ref": "@phases/workflow-execute/SKILL.md", "next": "S_SD4" },
29
- "S_SD4": { "type": "step", "name": "Spec: workflow-test-fix", "content_ref": "@phases/workflow-test-fix/SKILL.md", "next": null },
37
+ "S_SD1": { "type": "delegate", "name": "Spec: spec-generator", "chain": "spec-generator", "pass_variables": ["auto_yes", "goal"], "next": "S_SD2" },
38
+ "S_SD2": { "type": "delegate", "name": "Spec: workflow-plan", "chain": "workflow-plan", "pass_variables": ["auto_yes", "goal"], "next": "S_SD3" },
39
+ "S_SD3": { "type": "step", "name": "Spec: workflow-execute", "content_ref": "@skills/workflow-execute/SKILL.md", "next": "S_SD4" },
40
+ "S_SD4": { "type": "delegate", "name": "Spec: workflow-test-fix", "chain": "workflow-test-fix", "pass_variables": ["auto_yes", "goal"], "next": null },
30
41
 
31
- "S_FE1": { "type": "step", "name": "Full: brainstorm", "content_ref": "@phases/brainstorm/SKILL.md", "next": "S_FE2" },
32
- "S_FE2": { "type": "step", "name": "Full: workflow-plan", "content_ref": "@phases/workflow-plan/SKILL.md", "next": "S_FE3" },
33
- "S_FE3": { "type": "step", "name": "Full: workflow-execute", "content_ref": "@phases/workflow-execute/SKILL.md", "next": "S_FE4" },
34
- "S_FE4": { "type": "step", "name": "Full: workflow-test-fix", "content_ref": "@phases/workflow-test-fix/SKILL.md", "next": null },
42
+ "S_FE1": { "type": "delegate", "name": "Full: brainstorm", "chain": "brainstorm", "pass_variables": ["auto_yes", "goal"], "next": "S_FE2" },
43
+ "S_FE2": { "type": "delegate", "name": "Full: workflow-plan", "chain": "workflow-plan", "pass_variables": ["auto_yes", "goal"], "next": "S_FE3" },
44
+ "S_FE3": { "type": "step", "name": "Full: workflow-execute", "content_ref": "@skills/workflow-execute/SKILL.md", "next": "S_FE4" },
45
+ "S_FE4": { "type": "delegate", "name": "Full: workflow-test-fix", "chain": "workflow-test-fix", "pass_variables": ["auto_yes", "goal"], "next": null },
35
46
 
36
- "S_GM1": { "type": "step", "name": "Greenfield-M: brainstorm-with-file", "content_ref": "@phases/brainstorm-with-file.md", "next": "S_GM2" },
37
- "S_GM2": { "type": "step", "name": "Greenfield-M: workflow-plan", "content_ref": "@phases/workflow-plan/SKILL.md", "next": "S_GM3" },
38
- "S_GM3": { "type": "step", "name": "Greenfield-M: workflow-execute", "content_ref": "@phases/workflow-execute/SKILL.md", "next": "S_GM4" },
39
- "S_GM4": { "type": "step", "name": "Greenfield-M: workflow-test-fix", "content_ref": "@phases/workflow-test-fix/SKILL.md", "next": null },
47
+ "S_GM1": { "type": "step", "name": "Greenfield-M: brainstorm-with-file", "content_ref": "@commands/workflow/brainstorm-with-file.md", "next": "S_GM2" },
48
+ "S_GM2": { "type": "delegate", "name": "Greenfield-M: workflow-plan", "chain": "workflow-plan", "pass_variables": ["auto_yes", "goal"], "next": "S_GM3" },
49
+ "S_GM3": { "type": "step", "name": "Greenfield-M: workflow-execute", "content_ref": "@skills/workflow-execute/SKILL.md", "next": "S_GM4" },
50
+ "S_GM4": { "type": "delegate", "name": "Greenfield-M: workflow-test-fix", "chain": "workflow-test-fix", "pass_variables": ["auto_yes", "goal"], "next": null },
40
51
 
41
- "S_GL1": { "type": "step", "name": "Greenfield-L: brainstorm-with-file", "content_ref": "@phases/brainstorm-with-file.md", "next": "S_GL2" },
42
- "S_GL2": { "type": "step", "name": "Greenfield-L: workflow-plan", "content_ref": "@phases/workflow-plan/SKILL.md", "next": "S_GL3" },
43
- "S_GL3": { "type": "step", "name": "Greenfield-L: workflow-execute", "content_ref": "@phases/workflow-execute/SKILL.md", "next": "S_GL4" },
44
- "S_GL4": { "type": "step", "name": "Greenfield-L: review-cycle", "content_ref": "@phases/review-cycle/SKILL.md", "next": "S_GL5" },
45
- "S_GL5": { "type": "step", "name": "Greenfield-L: workflow-test-fix", "content_ref": "@phases/workflow-test-fix/SKILL.md", "next": null }
52
+ "S_GL1": { "type": "step", "name": "Greenfield-L: brainstorm-with-file", "content_ref": "@commands/workflow/brainstorm-with-file.md", "next": "S_GL2" },
53
+ "S_GL2": { "type": "delegate", "name": "Greenfield-L: workflow-plan", "chain": "workflow-plan", "pass_variables": ["auto_yes", "goal"], "next": "S_GL3" },
54
+ "S_GL3": { "type": "step", "name": "Greenfield-L: workflow-execute", "content_ref": "@skills/workflow-execute/SKILL.md", "next": "S_GL4" },
55
+ "S_GL4": { "type": "delegate", "name": "Greenfield-L: review-cycle", "chain": "ccw-review-cycle", "pass_variables": ["auto_yes", "goal"], "next": "S_GL5" },
56
+ "S_GL5": { "type": "delegate", "name": "Greenfield-L: workflow-test-fix", "chain": "workflow-test-fix", "pass_variables": ["auto_yes", "goal"], "next": null }
46
57
  }
47
58
  }
@@ -2,8 +2,19 @@
2
2
  "chain_id": "ccw-issue",
3
3
  "name": "CCW Issue Workflows",
4
4
  "description": "Issue management workflows: batch processing, rapid-to-issue bridge, brainstorm-to-issue conversion",
5
- "version": "2.0",
5
+ "version": "2.1",
6
6
  "entry": "D1",
7
+ "entries": [
8
+ { "name": "default", "node": "D1", "description": "Select flow via decision node" },
9
+ { "name": "batch", "node": "S_IB1", "description": "Direct: Issue Batch (discover → plan → queue → execute)" },
10
+ { "name": "rapid-to-issue", "node": "S_RI1", "description": "Direct: Rapid-to-Issue bridge" },
11
+ { "name": "brainstorm-to-issue", "node": "S_BI1", "description": "Direct: Brainstorm-to-Issue" }
12
+ ],
13
+ "triggers": {
14
+ "task_types": ["issue-batch", "issue-transition", "brainstorm-to-issue"],
15
+ "keywords": ["issues?.*batch|batch.*fix|batch.*resolve", "issue workflow|structured workflow|queue", "brainstorm.*issue|idea.*issue"],
16
+ "scope": "Issue: batch processing, rapid-to-issue, brainstorm-to-issue conversion"
17
+ },
7
18
  "nodes": {
8
19
  "D1": {
9
20
  "type": "decision",
@@ -16,18 +27,18 @@
16
27
  ],
17
28
  "default": "S_IB1"
18
29
  },
19
- "S_IB1": { "type": "step", "name": "Issue Batch: issue-discover", "content_ref": "@phases/issue-discover.md", "next": "S_IB2" },
20
- "S_IB2": { "type": "step", "name": "Issue Batch: issue-plan", "content_ref": "@phases/issue-plan.md", "next": "S_IB3" },
21
- "S_IB3": { "type": "step", "name": "Issue Batch: issue-queue", "content_ref": "@phases/issue-queue.md", "next": "S_IB4" },
22
- "S_IB4": { "type": "step", "name": "Issue Batch: issue-execute", "content_ref": "@phases/issue-execute.md", "next": null },
30
+ "S_IB1": { "type": "step", "name": "Issue Batch: issue-discover", "content_ref": "@commands/issue/discover.md", "next": "S_IB2" },
31
+ "S_IB2": { "type": "step", "name": "Issue Batch: issue-plan", "content_ref": "@commands/issue/plan.md", "next": "S_IB3" },
32
+ "S_IB3": { "type": "step", "name": "Issue Batch: issue-queue", "content_ref": "@commands/issue/queue.md", "next": "S_IB4" },
33
+ "S_IB4": { "type": "step", "name": "Issue Batch: issue-execute", "content_ref": "@commands/issue/execute.md", "next": null },
23
34
 
24
- "S_RI1": { "type": "step", "name": "Rapid-to-Issue: workflow-lite-plan", "content_ref": "@phases/workflow-lite-plan.md", "next": "S_RI2" },
25
- "S_RI2": { "type": "step", "name": "Rapid-to-Issue: issue-convert-to-plan", "content_ref": "@phases/issue-convert-to-plan.md", "next": "S_RI3" },
26
- "S_RI3": { "type": "step", "name": "Rapid-to-Issue: issue-queue", "content_ref": "@phases/issue-queue.md", "next": "S_RI4" },
27
- "S_RI4": { "type": "step", "name": "Rapid-to-Issue: issue-execute", "content_ref": "@phases/issue-execute.md", "next": null },
35
+ "S_RI1": { "type": "step", "name": "Rapid-to-Issue: workflow-lite-plan", "content_ref": "@skills/workflow-lite-plan/SKILL.md", "next": "S_RI2" },
36
+ "S_RI2": { "type": "step", "name": "Rapid-to-Issue: issue-convert-to-plan", "content_ref": "@commands/issue/convert-to-plan.md", "next": "S_RI3" },
37
+ "S_RI3": { "type": "step", "name": "Rapid-to-Issue: issue-queue", "content_ref": "@commands/issue/queue.md", "next": "S_RI4" },
38
+ "S_RI4": { "type": "step", "name": "Rapid-to-Issue: issue-execute", "content_ref": "@commands/issue/execute.md", "next": null },
28
39
 
29
- "S_BI1": { "type": "step", "name": "Brainstorm-to-Issue: from-brainstorm", "content_ref": "@phases/issue-from-brainstorm.md", "next": "S_BI2" },
30
- "S_BI2": { "type": "step", "name": "Brainstorm-to-Issue: issue-queue", "content_ref": "@phases/issue-queue.md", "next": "S_BI3" },
31
- "S_BI3": { "type": "step", "name": "Brainstorm-to-Issue: issue-execute", "content_ref": "@phases/issue-execute.md", "next": null }
40
+ "S_BI1": { "type": "step", "name": "Brainstorm-to-Issue: from-brainstorm", "content_ref": "@commands/issue/from-brainstorm.md", "next": "S_BI2" },
41
+ "S_BI2": { "type": "step", "name": "Brainstorm-to-Issue: issue-queue", "content_ref": "@commands/issue/queue.md", "next": "S_BI3" },
42
+ "S_BI3": { "type": "step", "name": "Brainstorm-to-Issue: issue-execute", "content_ref": "@commands/issue/execute.md", "next": null }
32
43
  }
33
44
  }
@@ -2,8 +2,20 @@
2
2
  "chain_id": "ccw-lightweight",
3
3
  "name": "CCW Lightweight Workflows (Level 2)",
4
4
  "description": "Level 2 workflow routing: rapid, bugfix, hotfix, docs — simple single/dual-skill pipelines",
5
- "version": "2.0",
5
+ "version": "2.1",
6
6
  "entry": "D1",
7
+ "entries": [
8
+ { "name": "default", "node": "D1", "description": "Select flow via decision node" },
9
+ { "name": "rapid", "node": "S_R1", "description": "Direct: Rapid flow (lite-plan → test-fix)" },
10
+ { "name": "bugfix", "node": "S_B1", "description": "Direct: Bugfix flow (lite-plan --bugfix → test-fix)" },
11
+ { "name": "hotfix", "node": "S_H1", "description": "Direct: Hotfix flow (lite-plan --hotfix)" },
12
+ { "name": "docs", "node": "S_D1", "description": "Direct: Docs flow (lite-plan)" }
13
+ ],
14
+ "triggers": {
15
+ "task_types": ["bugfix", "bugfix-hotfix", "quick-task", "documentation", "feature"],
16
+ "keywords": ["fix|bug|error|crash|fail", "quick|simple|small", "docs|documentation|readme", "urgent|production|critical"],
17
+ "scope": "Level 2: rapid, bugfix, hotfix, docs — simple single/dual-skill pipelines"
18
+ },
7
19
  "nodes": {
8
20
  "D1": {
9
21
  "type": "decision",
@@ -20,37 +32,39 @@
20
32
  "S_R1": {
21
33
  "type": "step",
22
34
  "name": "Rapid: workflow-lite-plan",
23
- "content_ref": "@phases/workflow-lite-plan.md",
35
+ "content_ref": "@skills/workflow-lite-plan/SKILL.md",
24
36
  "next": "S_R2"
25
37
  },
26
38
  "S_R2": {
27
- "type": "step",
39
+ "type": "delegate",
28
40
  "name": "Rapid: workflow-test-fix",
29
- "content_ref": "@phases/workflow-test-fix/SKILL.md",
41
+ "chain": "workflow-test-fix",
42
+ "pass_variables": ["auto_yes", "goal"],
30
43
  "next": null
31
44
  },
32
45
  "S_B1": {
33
46
  "type": "step",
34
47
  "name": "Bugfix: workflow-lite-plan --bugfix",
35
- "content_ref": "@phases/workflow-lite-plan.md",
48
+ "content_ref": "@skills/workflow-lite-plan/SKILL.md",
36
49
  "next": "S_B2"
37
50
  },
38
51
  "S_B2": {
39
- "type": "step",
52
+ "type": "delegate",
40
53
  "name": "Bugfix: workflow-test-fix",
41
- "content_ref": "@phases/workflow-test-fix/SKILL.md",
54
+ "chain": "workflow-test-fix",
55
+ "pass_variables": ["auto_yes", "goal"],
42
56
  "next": null
43
57
  },
44
58
  "S_H1": {
45
59
  "type": "step",
46
60
  "name": "Hotfix: workflow-lite-plan --hotfix",
47
- "content_ref": "@phases/workflow-lite-plan.md",
61
+ "content_ref": "@skills/workflow-lite-plan/SKILL.md",
48
62
  "next": null
49
63
  },
50
64
  "S_D1": {
51
65
  "type": "step",
52
66
  "name": "Docs: workflow-lite-plan",
53
- "content_ref": "@phases/workflow-lite-plan.md",
67
+ "content_ref": "@skills/workflow-lite-plan/SKILL.md",
54
68
  "next": null
55
69
  }
56
70
  }
@@ -2,13 +2,26 @@
2
2
  "chain_id": "ccw-main",
3
3
  "name": "CCW Main Orchestrator",
4
4
  "description": "Main workflow orchestrator: intent analysis → clarity check → workflow category routing",
5
- "version": "2.0",
5
+ "version": "2.2",
6
+ "preload": [
7
+ { "key": "memory", "source": "memory:MEMORY.md", "required": false },
8
+ { "key": "chain-list", "source": "@chains/_index.md", "required": false }
9
+ ],
10
+ "variables": {
11
+ "task_type": { "type": "string", "description": "Detected task type" },
12
+ "goal": { "type": "string", "description": "User's goal" },
13
+ "auto_yes": { "type": "boolean", "default": false, "description": "Auto-confirm mode" }
14
+ },
6
15
  "entry": "S1",
16
+ "entries": [
17
+ { "name": "default", "node": "S1", "description": "Full flow: intent analysis → clarity check → routing" },
18
+ { "name": "skip-analysis", "node": "D2", "description": "Skip analysis, directly select workflow category" }
19
+ ],
7
20
  "nodes": {
8
21
  "S1": {
9
22
  "type": "step",
10
23
  "name": "Analyze Intent",
11
- "content_inline": "## Phase 1: Analyze Intent\n\nAnalyze the user's input ($ARGUMENTS) to determine:\n\n```javascript\nconst analysis = {\n goal: extractGoal(input),\n scope: extractScope(input),\n constraints: extractConstraints(input),\n task_type: detectTaskType(input),\n complexity: assessComplexity(input), // low|medium|high\n clarity_score: calculateClarity(input) // 0-3 (>=2 = clear)\n};\n\nconst autoYes = /\\b(-y|--yes)\\b/.test($ARGUMENTS);\n```\n\nDetect task_type by priority (see specs/intent-patterns.md for full regex list):\n- bugfix-hotfix, greenfield, brainstorm, brainstorm-to-issue, debug-file, analyze-file\n- collaborative-plan, roadmap, spec-driven, integration-test, refactor, team-planex\n- multi-cli, bugfix, issue-batch, issue-transition, exploration, quick-task\n- ui-design, tdd, test-fix, test-gen, review, documentation, feature (default)\n\nOutput: `Type: [task_type] | Goal: [goal] | Complexity: [complexity] | Clarity: [clarity_score]/3`",
24
+ "content_inline": "## Phase 1: Analyze Intent\n\nAnalyze the user's input ($ARGUMENTS) to determine:\n\n```javascript\nconst analysis = {\n goal: extractGoal(input),\n scope: extractScope(input),\n constraints: extractConstraints(input),\n task_type: detectTaskType(input),\n complexity: assessComplexity(input), // low|medium|high\n clarity_score: calculateClarity(input) // 0-3 (>=2 = clear)\n};\n\nconst autoYes = /\\b(-y|--yes)\\b/.test($ARGUMENTS);\n```\n\nDetect task_type by priority (use `chain_loader list` to see each chain's triggers):\n- bugfix-hotfix, greenfield, brainstorm, brainstorm-to-issue, debug-file, analyze-file\n- collaborative-plan, roadmap, spec-driven, integration-test, refactor, team-planex\n- multi-cli, bugfix, issue-batch, issue-transition, exploration, quick-task\n- ui-design, tdd, test-fix, test-gen, review, documentation, feature (default)\n\nOutput: `Type: [task_type] | Goal: [goal] | Complexity: [complexity] | Clarity: [clarity_score]/3`",
12
25
  "next": "D1"
13
26
  },
14
27
  "D1": {
@@ -2,8 +2,20 @@
2
2
  "chain_id": "ccw-standard",
3
3
  "name": "CCW Standard Workflows (Level 3)",
4
4
  "description": "Level 3 workflow routing: coupled, tdd, test-fix, review, multi-cli, ui",
5
- "version": "2.0",
5
+ "version": "2.2",
6
6
  "entry": "D1",
7
+ "entries": [
8
+ { "name": "default", "node": "D1", "description": "Select flow via decision node" },
9
+ { "name": "coupled", "node": "S_C1", "description": "Direct: Coupled feature (plan → execute → review → test-fix)" },
10
+ { "name": "tdd", "node": "S_T1", "description": "Direct: TDD (tdd-plan → execute)" },
11
+ { "name": "test-gen", "node": "S_TG1", "description": "Direct: Test generation" },
12
+ { "name": "review", "node": "S_RV1", "description": "Direct: Review cycle + fix" }
13
+ ],
14
+ "triggers": {
15
+ "task_types": ["tdd", "test-fix", "test-gen", "review", "multi-cli", "ui-design"],
16
+ "keywords": ["tdd|test-driven|test first", "test fail|fix test|failing test", "generate test|add test", "review|code review", "multi.*cli|multi.*model", "ui|design|component|style"],
17
+ "scope": "Level 3: coupled feature, TDD, test-fix, review, multi-cli, UI design"
18
+ },
7
19
  "nodes": {
8
20
  "D1": {
9
21
  "type": "decision",
@@ -20,20 +32,20 @@
20
32
  ],
21
33
  "default": "S_C1"
22
34
  },
23
- "S_C1": { "type": "step", "name": "Coupled: workflow-plan", "content_ref": "@phases/workflow-plan/SKILL.md", "next": "S_C2" },
24
- "S_C2": { "type": "step", "name": "Coupled: workflow-execute", "content_ref": "@phases/workflow-execute/SKILL.md", "next": "S_C3" },
25
- "S_C3": { "type": "step", "name": "Coupled: review-cycle", "content_ref": "@phases/review-cycle/SKILL.md", "next": "S_C4" },
26
- "S_C4": { "type": "step", "name": "Coupled: workflow-test-fix", "content_ref": "@phases/workflow-test-fix/SKILL.md", "next": null },
27
- "S_T1": { "type": "step", "name": "TDD: workflow-tdd-plan", "content_ref": "@phases/workflow-tdd-plan/SKILL.md", "next": "S_T2" },
28
- "S_T2": { "type": "step", "name": "TDD: workflow-execute", "content_ref": "@phases/workflow-execute/SKILL.md", "next": null },
29
- "S_TG1": { "type": "step", "name": "Test Gen: workflow-test-fix", "content_ref": "@phases/workflow-test-fix/SKILL.md", "next": null },
30
- "S_TF1": { "type": "step", "name": "Test Fix: workflow-test-fix", "content_ref": "@phases/workflow-test-fix/SKILL.md", "next": null },
31
- "S_RF1": { "type": "step", "name": "Review: review-cycle", "content_ref": "@phases/review-cycle/SKILL.md", "next": "S_RF2" },
32
- "S_RF2": { "type": "step", "name": "Review: workflow-test-fix", "content_ref": "@phases/workflow-test-fix/SKILL.md", "next": null },
33
- "S_MC1": { "type": "step", "name": "Multi-CLI: workflow-multi-cli-plan", "content_ref": "@phases/workflow-multi-cli-plan.md", "next": "S_MC2" },
34
- "S_MC2": { "type": "step", "name": "Multi-CLI: workflow-test-fix", "content_ref": "@phases/workflow-test-fix/SKILL.md", "next": null },
35
- "S_UI1": { "type": "step", "name": "UI: ui-design-explore-auto", "content_ref": "@phases/ui-design-explore-auto.md", "next": "S_UI2" },
36
- "S_UI2": { "type": "step", "name": "UI: workflow-plan", "content_ref": "@phases/workflow-plan/SKILL.md", "next": "S_UI3" },
37
- "S_UI3": { "type": "step", "name": "UI: workflow-execute", "content_ref": "@phases/workflow-execute/SKILL.md", "next": null }
35
+ "S_C1": { "type": "delegate", "name": "Coupled: workflow-plan", "chain": "workflow-plan", "pass_variables": ["auto_yes", "goal"], "receive_variables": ["session_id"], "next": "S_C2" },
36
+ "S_C2": { "type": "step", "name": "Coupled: workflow-execute", "content_ref": "@skills/workflow-execute/SKILL.md", "next": "S_C3" },
37
+ "S_C3": { "type": "delegate", "name": "Coupled: review-cycle", "chain": "ccw-review-cycle", "pass_variables": ["auto_yes", "goal"], "receive_variables": ["review_status", "fix_count"], "next": "S_C4" },
38
+ "S_C4": { "type": "delegate", "name": "Coupled: workflow-test-fix", "chain": "workflow-test-fix", "pass_variables": ["auto_yes", "goal", "session_id"], "next": null },
39
+ "S_T1": { "type": "delegate", "name": "TDD: workflow-tdd-plan", "chain": "workflow-tdd-plan", "pass_variables": ["auto_yes", "goal"], "next": "S_T2" },
40
+ "S_T2": { "type": "step", "name": "TDD: workflow-execute", "content_ref": "@skills/workflow-execute/SKILL.md", "next": null },
41
+ "S_TG1": { "type": "delegate", "name": "Test Gen: workflow-test-fix", "chain": "workflow-test-fix", "pass_variables": ["auto_yes", "goal"], "next": null },
42
+ "S_TF1": { "type": "delegate", "name": "Test Fix: workflow-test-fix", "chain": "workflow-test-fix", "pass_variables": ["auto_yes", "goal"], "next": null },
43
+ "S_RF1": { "type": "delegate", "name": "Review: review-cycle", "chain": "ccw-review-cycle", "pass_variables": ["auto_yes", "goal"], "next": "S_RF2" },
44
+ "S_RF2": { "type": "delegate", "name": "Review: workflow-test-fix", "chain": "workflow-test-fix", "pass_variables": ["auto_yes", "goal"], "next": null },
45
+ "S_MC1": { "type": "step", "name": "Multi-CLI: workflow-multi-cli-plan", "content_ref": "@skills/workflow-multi-cli-plan/SKILL.md", "next": "S_MC2" },
46
+ "S_MC2": { "type": "delegate", "name": "Multi-CLI: workflow-test-fix", "chain": "workflow-test-fix", "pass_variables": ["auto_yes", "goal"], "next": null },
47
+ "S_UI1": { "type": "step", "name": "UI: ui-design-explore-auto", "content_ref": "@commands/workflow/ui-design/explore-auto.md", "next": "S_UI2" },
48
+ "S_UI2": { "type": "delegate", "name": "UI: workflow-plan", "chain": "workflow-plan", "pass_variables": ["auto_yes", "goal"], "next": "S_UI3" },
49
+ "S_UI3": { "type": "step", "name": "UI: workflow-execute", "content_ref": "@skills/workflow-execute/SKILL.md", "next": null }
38
50
  }
39
51
  }