claude-code-workflow 7.2.29 → 7.2.30

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 (124) hide show
  1. package/.ccw/workflows/cli-templates/schemas/plan-overview-base-schema.json +2 -2
  2. package/.ccw/workflows/cli-templates/schemas/task-schema.json +14 -7
  3. package/.claude/agents/action-planning-agent.md +7 -4
  4. package/.claude/agents/cli-explore-agent.md +77 -63
  5. package/.claude/agents/cli-lite-planning-agent.md +11 -10
  6. package/.claude/agents/issue-plan-agent.md +421 -426
  7. package/.claude/commands/workflow/spec/setup.md +1 -1
  8. package/.claude/skills/ccw-chain/SKILL.md +119 -0
  9. package/.claude/skills/ccw-chain/chains/ccw-cycle.json +21 -0
  10. package/.claude/skills/ccw-chain/chains/ccw-exploration.json +47 -0
  11. package/.claude/skills/ccw-chain/chains/ccw-issue.json +33 -0
  12. package/.claude/skills/ccw-chain/chains/ccw-lightweight.json +57 -0
  13. package/.claude/skills/ccw-chain/chains/ccw-main.json +52 -0
  14. package/.claude/skills/ccw-chain/chains/ccw-standard.json +39 -0
  15. package/.claude/skills/ccw-chain/chains/ccw-team.json +10 -0
  16. package/.claude/skills/ccw-chain/chains/ccw-with-file.json +31 -0
  17. package/.claude/skills/ccw-chain/phases/analyze-with-file.md +788 -0
  18. package/.claude/skills/ccw-chain/phases/brainstorm/SKILL.md +408 -0
  19. package/.claude/skills/ccw-chain/phases/brainstorm/phases/01-mode-routing.md +207 -0
  20. package/.claude/skills/ccw-chain/phases/brainstorm/phases/02-artifacts.md +567 -0
  21. package/.claude/skills/ccw-chain/phases/brainstorm/phases/03-role-analysis.md +748 -0
  22. package/.claude/skills/ccw-chain/phases/brainstorm/phases/04-synthesis.md +827 -0
  23. package/.claude/skills/ccw-chain/phases/brainstorm-with-file.md +482 -0
  24. package/.claude/skills/ccw-chain/phases/collaborative-plan-with-file.md +639 -0
  25. package/.claude/skills/ccw-chain/phases/debug-with-file.md +656 -0
  26. package/.claude/skills/ccw-chain/phases/integration-test-cycle.md +936 -0
  27. package/.claude/skills/ccw-chain/phases/issue-convert-to-plan.md +720 -0
  28. package/.claude/skills/ccw-chain/phases/issue-discover.md +483 -0
  29. package/.claude/skills/ccw-chain/phases/issue-execute.md +629 -0
  30. package/.claude/skills/ccw-chain/phases/issue-from-brainstorm.md +382 -0
  31. package/.claude/skills/ccw-chain/phases/issue-plan.md +343 -0
  32. package/.claude/skills/ccw-chain/phases/issue-queue.md +464 -0
  33. package/.claude/skills/ccw-chain/phases/refactor-cycle.md +852 -0
  34. package/.claude/skills/ccw-chain/phases/review-cycle/SKILL.md +132 -0
  35. package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-fix.md +760 -0
  36. package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-module.md +764 -0
  37. package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-session.md +775 -0
  38. package/.claude/skills/ccw-chain/phases/roadmap-with-file.md +544 -0
  39. package/.claude/skills/ccw-chain/phases/spec-generator/SKILL.md +338 -0
  40. package/.claude/skills/ccw-chain/phases/spec-generator/phases/01-5-requirement-clarification.md +404 -0
  41. package/.claude/skills/ccw-chain/phases/spec-generator/phases/01-discovery.md +257 -0
  42. package/.claude/skills/ccw-chain/phases/spec-generator/phases/02-product-brief.md +274 -0
  43. package/.claude/skills/ccw-chain/phases/spec-generator/phases/03-requirements.md +184 -0
  44. package/.claude/skills/ccw-chain/phases/spec-generator/phases/04-architecture.md +248 -0
  45. package/.claude/skills/ccw-chain/phases/spec-generator/phases/05-epics-stories.md +178 -0
  46. package/.claude/skills/ccw-chain/phases/spec-generator/phases/06-5-auto-fix.md +144 -0
  47. package/.claude/skills/ccw-chain/phases/spec-generator/phases/06-readiness-check.md +480 -0
  48. package/.claude/skills/ccw-chain/phases/team-planex.md +123 -0
  49. package/.claude/skills/ccw-chain/phases/ui-design-explore-auto.md +678 -0
  50. package/.claude/skills/ccw-chain/phases/unified-execute-with-file.md +870 -0
  51. package/.claude/skills/ccw-chain/phases/workflow-execute/SKILL.md +625 -0
  52. package/.claude/skills/ccw-chain/phases/workflow-execute/phases/06-review.md +215 -0
  53. package/.claude/skills/ccw-chain/phases/workflow-lite-plan.md +616 -0
  54. package/.claude/skills/ccw-chain/phases/workflow-multi-cli-plan.md +424 -0
  55. package/.claude/skills/ccw-chain/phases/workflow-plan/SKILL.md +466 -0
  56. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/01-session-discovery.md +99 -0
  57. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/02-context-gathering.md +338 -0
  58. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/03-conflict-resolution.md +422 -0
  59. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/04-task-generation.md +440 -0
  60. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/05-plan-verify.md +395 -0
  61. package/.claude/skills/ccw-chain/phases/workflow-plan/phases/06-replan.md +594 -0
  62. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/SKILL.md +527 -0
  63. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/01-session-discovery.md +57 -0
  64. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/02-context-gathering.md +407 -0
  65. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/03-test-coverage-analysis.md +172 -0
  66. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/04-conflict-resolution.md +426 -0
  67. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/05-tdd-task-generation.md +473 -0
  68. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/06-tdd-structure-validation.md +189 -0
  69. package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/07-tdd-verify.md +635 -0
  70. package/.claude/skills/ccw-chain/phases/workflow-test-fix/SKILL.md +482 -0
  71. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/01-session-start.md +60 -0
  72. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/02-test-context-gather.md +493 -0
  73. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/03-test-concept-enhanced.md +150 -0
  74. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/04-test-task-generate.md +346 -0
  75. package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/05-test-cycle-execute.md +538 -0
  76. package/.claude/skills/ccw-chain/specs/auto-mode.md +47 -0
  77. package/.claude/skills/ccw-chain/specs/intent-patterns.md +60 -0
  78. package/.claude/skills/chain-loader/SKILL.md +78 -0
  79. package/.claude/skills/chain-loader/phases/01-analyze-skill.md +53 -0
  80. package/.claude/skills/chain-loader/phases/02-design-graph.md +73 -0
  81. package/.claude/skills/chain-loader/phases/03-generate-validate.md +75 -0
  82. package/.claude/skills/chain-loader/specs/chain-schema.md +99 -0
  83. package/.claude/skills/chain-loader/specs/design-patterns.md +99 -0
  84. package/.claude/skills/chain-loader/templates/chain-json.md +63 -0
  85. package/.claude/skills/review-cycle/phases/review-module.md +764 -764
  86. package/.claude/skills/review-cycle/phases/review-session.md +775 -775
  87. package/.claude/skills/workflow-multi-cli-plan/SKILL.md +2 -2
  88. package/.claude/skills/workflow-plan/phases/03-conflict-resolution.md +422 -422
  89. package/.claude/skills/workflow-plan/phases/05-plan-verify.md +395 -395
  90. package/.claude/skills/workflow-tdd-plan/phases/02-context-gathering.md +407 -407
  91. package/.claude/skills/workflow-tdd-plan/phases/04-conflict-resolution.md +426 -426
  92. package/.claude/skills/workflow-test-fix/phases/02-test-context-gather.md +493 -493
  93. package/README.md +14 -0
  94. package/ccw/dist/core/routes/litellm-api-routes.d.ts.map +1 -1
  95. package/ccw/dist/core/routes/litellm-api-routes.js +0 -23
  96. package/ccw/dist/core/routes/litellm-api-routes.js.map +1 -1
  97. package/ccw/dist/tools/chain-loader.d.ts +10 -0
  98. package/ccw/dist/tools/chain-loader.d.ts.map +1 -0
  99. package/ccw/dist/tools/chain-loader.js +642 -0
  100. package/ccw/dist/tools/chain-loader.js.map +1 -0
  101. package/ccw/dist/tools/index.d.ts.map +1 -1
  102. package/ccw/dist/tools/index.js +2 -0
  103. package/ccw/dist/tools/index.js.map +1 -1
  104. package/ccw/dist/tools/json-builder.js +20 -0
  105. package/ccw/dist/tools/json-builder.js.map +1 -1
  106. package/ccw/dist/types/chain-types.d.ts +72 -0
  107. package/ccw/dist/types/chain-types.d.ts.map +1 -0
  108. package/ccw/dist/types/chain-types.js +5 -0
  109. package/ccw/dist/types/chain-types.js.map +1 -0
  110. package/ccw/scripts/prepublish-clean.mjs +0 -1
  111. package/package.json +1 -3
  112. package/ccw-litellm/README.md +0 -180
  113. package/ccw-litellm/pyproject.toml +0 -35
  114. package/ccw-litellm/src/ccw_litellm/__init__.py +0 -47
  115. package/ccw-litellm/src/ccw_litellm/cli.py +0 -108
  116. package/ccw-litellm/src/ccw_litellm/clients/__init__.py +0 -12
  117. package/ccw-litellm/src/ccw_litellm/clients/litellm_embedder.py +0 -270
  118. package/ccw-litellm/src/ccw_litellm/clients/litellm_llm.py +0 -198
  119. package/ccw-litellm/src/ccw_litellm/config/__init__.py +0 -22
  120. package/ccw-litellm/src/ccw_litellm/config/loader.py +0 -343
  121. package/ccw-litellm/src/ccw_litellm/config/models.py +0 -162
  122. package/ccw-litellm/src/ccw_litellm/interfaces/__init__.py +0 -14
  123. package/ccw-litellm/src/ccw_litellm/interfaces/embedder.py +0 -52
  124. package/ccw-litellm/src/ccw_litellm/interfaces/llm.py +0 -45
@@ -129,7 +129,7 @@ Task(
129
129
  Analyze project for workflow initialization and generate .workflow/project-tech.json.
130
130
 
131
131
  ## MANDATORY FIRST STEPS
132
- 1. Execute: ccw tool exec json_builder '{"cmd":"info","schema":"tech"}' (get schema summary)
132
+ 1. Execute: cat ~/.ccw/workflows/cli-templates/schemas/project-tech-schema.json (get schema reference)
133
133
  2. Execute: ccw tool exec get_modules_by_depth '{}' (get project structure)
134
134
 
135
135
  ## Task
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: ccw-chain
3
+ description: Chain-based CCW workflow orchestrator. Intent analysis, workflow routing, and Skill pipeline execution via progressive chain loading. Triggers on "ccw chain", "chain ccw", "workflow chain".
4
+ allowed-tools: Skill(*), TodoWrite(*), AskUserQuestion(*), Read(*), Grep(*), Glob(*), Bash(*)
5
+ ---
6
+
7
+ # CCW Chain Orchestrator
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.
10
+
11
+ ## Architecture
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/`
53
+
54
+ ## Execution Protocol
55
+
56
+ When chain_loader delivers a step node with a skill/command doc:
57
+
58
+ 1. **Read** the loaded doc content to understand the skill's purpose and interface
59
+ 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)
62
+ - Special args noted in step name (e.g., `--bugfix`, `--hotfix`, `--plan-only`)
63
+ 3. **Propagate -y**: If auto mode active, append `-y` to args
64
+ 4. **Execute**: `Skill(skill_name, args)` — blocking, wait for completion
65
+ 5. **Track**: Update TodoWrite status, proceed to next step via `done`
66
+
67
+ ```javascript
68
+ // Auto mode detection
69
+ const autoYes = /\b(-y|--yes)\b/.test($ARGUMENTS);
70
+
71
+ // Skill call assembly with -y propagation
72
+ function assembleCommand(skillName, args, previousResult) {
73
+ if (!args && previousResult?.session_id) {
74
+ args = `--session="${previousResult.session_id}"`;
75
+ }
76
+ if (autoYes && !args.includes('-y') && !args.includes('--yes')) {
77
+ args = args ? `${args} -y` : '-y';
78
+ }
79
+ return { skill: skillName, args };
80
+ }
81
+ ```
82
+
83
+ ## Auto Mode (`-y` / `--yes`)
84
+
85
+ - D1 Clarity Check: always choose "Clear" (skip clarification)
86
+ - Confirmation: skip, execute directly
87
+ - Error handling: auto-skip failed steps, continue pipeline
88
+ - Propagation: `-y` injected into every downstream Skill call
89
+
90
+ ## Intent Analysis (ccw-main S1)
91
+
92
+ Detect task_type by regex priority — see `specs/intent-patterns.md` for full patterns.
93
+
94
+ Key mappings: task_type → category chain → specific flow
95
+
96
+ ## Execution via chain_loader
97
+
98
+ ```bash
99
+ # Start
100
+ ccw tool exec chain_loader '{"cmd":"start","skill":"ccw-chain","chain":"ccw-main"}'
101
+
102
+ # Progress through steps
103
+ ccw tool exec chain_loader '{"cmd":"done","session_id":"CL-ccw-chain-..."}'
104
+
105
+ # Decision nodes: pass choice index (1-based)
106
+ ccw tool exec chain_loader '{"cmd":"done","session_id":"CL-ccw-chain-...","choice":1}'
107
+ ```
108
+
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 |
@@ -0,0 +1,21 @@
1
+ {
2
+ "chain_id": "ccw-cycle",
3
+ "name": "CCW Cycle Workflows",
4
+ "description": "Self-iterating cycle workflows: integration-test-cycle, refactor-cycle",
5
+ "version": "2.0",
6
+ "entry": "D1",
7
+ "nodes": {
8
+ "D1": {
9
+ "type": "decision",
10
+ "name": "Select Cycle Flow",
11
+ "prompt": "Based on the detected task_type, select the specific cycle workflow:\n1. Integration Test Cycle — explore → test dev → test-fix → reflection (self-iterating)\n2. Refactor Cycle — discover tech debt → prioritize → execute → validate",
12
+ "choices": [
13
+ { "label": "Integration Test Cycle", "description": "Self-iterating with max-iterations and reflection", "next": "S_IT1" },
14
+ { "label": "Refactor Cycle", "description": "Multi-dimensional analysis + regression validation", "next": "S_RC1" }
15
+ ],
16
+ "default": "S_IT1"
17
+ },
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 }
20
+ }
21
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "chain_id": "ccw-exploration",
3
+ "name": "CCW Exploration Workflows (Level 4)",
4
+ "description": "Level 4 workflow routing: brainstorm, spec-driven, full exploration, greenfield",
5
+ "version": "2.0",
6
+ "entry": "D1",
7
+ "nodes": {
8
+ "D1": {
9
+ "type": "decision",
10
+ "name": "Select Exploration Flow",
11
+ "prompt": "Based on the detected task_type and complexity, select the specific exploration workflow:\n1. Brainstorm → Plan → Execute — multi-perspective ideation followed by formal planning\n2. Spec-Driven — specification/PRD generation followed by plan and execute\n3. Full Exploration — uncertain tasks: brainstorm → formal plan → execute → test\n4. Greenfield (medium) — 0→1 development: brainstorm → plan → execute → test\n5. Greenfield (large/phased) — 0→1 large scale: brainstorm → plan → execute → review → test",
12
+ "choices": [
13
+ { "label": "Brainstorm → Plan", "description": "brainstorm-with-file → plan → execute → test-fix", "next": "S_BP1" },
14
+ { "label": "Spec-Driven", "description": "spec-generator → plan → execute → test-fix", "next": "S_SD1" },
15
+ { "label": "Full Exploration", "description": "brainstorm → plan → execute → test-fix", "next": "S_FE1" },
16
+ { "label": "Greenfield (medium)", "description": "brainstorm-with-file → plan → execute → test-fix", "next": "S_GM1" },
17
+ { "label": "Greenfield (large)", "description": "brainstorm-with-file → plan → execute → review → test-fix", "next": "S_GL1" }
18
+ ],
19
+ "default": "S_BP1"
20
+ },
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 },
25
+
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 },
30
+
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 },
35
+
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 },
40
+
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 }
46
+ }
47
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "chain_id": "ccw-issue",
3
+ "name": "CCW Issue Workflows",
4
+ "description": "Issue management workflows: batch processing, rapid-to-issue bridge, brainstorm-to-issue conversion",
5
+ "version": "2.0",
6
+ "entry": "D1",
7
+ "nodes": {
8
+ "D1": {
9
+ "type": "decision",
10
+ "name": "Select Issue Flow",
11
+ "prompt": "Based on the detected task_type, select the specific issue workflow:\n1. Issue Batch — full issue lifecycle: discover → plan → queue → execute\n2. Rapid-to-Issue — lightweight plan converted to structured issue execution\n3. Brainstorm-to-Issue — convert brainstorm session ideas into issues and execute",
12
+ "choices": [
13
+ { "label": "Issue Batch", "description": "discover → plan → queue → execute", "next": "S_IB1" },
14
+ { "label": "Rapid-to-Issue", "description": "lite-plan(plan-only) → convert → queue → execute", "next": "S_RI1" },
15
+ { "label": "Brainstorm-to-Issue", "description": "from-brainstorm → queue → execute", "next": "S_BI1" }
16
+ ],
17
+ "default": "S_IB1"
18
+ },
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 },
23
+
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 },
28
+
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 }
32
+ }
33
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "chain_id": "ccw-lightweight",
3
+ "name": "CCW Lightweight Workflows (Level 2)",
4
+ "description": "Level 2 workflow routing: rapid, bugfix, hotfix, docs — simple single/dual-skill pipelines",
5
+ "version": "2.0",
6
+ "entry": "D1",
7
+ "nodes": {
8
+ "D1": {
9
+ "type": "decision",
10
+ "name": "Select Lightweight Flow",
11
+ "prompt": "Based on the detected task_type, select the specific lightweight workflow:\n1. Rapid — feature (low complexity), quick-task\n2. Bugfix (standard) — fix, bug, error, crash, fail, debug\n3. Hotfix (urgent) — urgent/production/critical + fix/bug\n4. Docs — documentation, readme\n\nChoose the flow that best matches the intent analysis.",
12
+ "choices": [
13
+ { "label": "Rapid", "description": "workflow-lite-plan → workflow-test-fix", "next": "S_R1" },
14
+ { "label": "Bugfix", "description": "workflow-lite-plan(--bugfix) → workflow-test-fix", "next": "S_B1" },
15
+ { "label": "Hotfix", "description": "workflow-lite-plan(--hotfix) only", "next": "S_H1" },
16
+ { "label": "Docs", "description": "workflow-lite-plan only", "next": "S_D1" }
17
+ ],
18
+ "default": "S_R1"
19
+ },
20
+ "S_R1": {
21
+ "type": "step",
22
+ "name": "Rapid: workflow-lite-plan",
23
+ "content_ref": "@phases/workflow-lite-plan.md",
24
+ "next": "S_R2"
25
+ },
26
+ "S_R2": {
27
+ "type": "step",
28
+ "name": "Rapid: workflow-test-fix",
29
+ "content_ref": "@phases/workflow-test-fix/SKILL.md",
30
+ "next": null
31
+ },
32
+ "S_B1": {
33
+ "type": "step",
34
+ "name": "Bugfix: workflow-lite-plan --bugfix",
35
+ "content_ref": "@phases/workflow-lite-plan.md",
36
+ "next": "S_B2"
37
+ },
38
+ "S_B2": {
39
+ "type": "step",
40
+ "name": "Bugfix: workflow-test-fix",
41
+ "content_ref": "@phases/workflow-test-fix/SKILL.md",
42
+ "next": null
43
+ },
44
+ "S_H1": {
45
+ "type": "step",
46
+ "name": "Hotfix: workflow-lite-plan --hotfix",
47
+ "content_ref": "@phases/workflow-lite-plan.md",
48
+ "next": null
49
+ },
50
+ "S_D1": {
51
+ "type": "step",
52
+ "name": "Docs: workflow-lite-plan",
53
+ "content_ref": "@phases/workflow-lite-plan.md",
54
+ "next": null
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "chain_id": "ccw-main",
3
+ "name": "CCW Main Orchestrator",
4
+ "description": "Main workflow orchestrator: intent analysis → clarity check → workflow category routing",
5
+ "version": "2.0",
6
+ "entry": "S1",
7
+ "nodes": {
8
+ "S1": {
9
+ "type": "step",
10
+ "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`",
12
+ "next": "D1"
13
+ },
14
+ "D1": {
15
+ "type": "decision",
16
+ "name": "Clarity Check",
17
+ "prompt": "Based on the intent analysis results, assess the clarity score:\n1. Clear (clarity_score >= 2) — goal, scope, and constraints are sufficiently defined\n2. Unclear (clarity_score < 2) — need more information from user\n\nIf auto mode (-y) is active, always choose 1 (Clear) regardless of score.",
18
+ "choices": [
19
+ { "label": "Clear", "description": "Clarity score >= 2, proceed to workflow selection", "next": "S3" },
20
+ { "label": "Unclear", "description": "Clarity score < 2, need requirement clarification", "next": "S2" }
21
+ ],
22
+ "default": "S2"
23
+ },
24
+ "S2": {
25
+ "type": "step",
26
+ "name": "Clarify Requirements",
27
+ "content_inline": "## Phase 1.5: Requirement Clarification\n\nUse AskUserQuestion to clarify missing info:\n\n```javascript\nconst questions = [\n { question: 'What is the primary goal?', header: 'Goal', options: [\n { label: 'Create', description: 'New feature' },\n { label: 'Fix', description: 'Bug fix' },\n { label: 'Optimize', description: 'Performance/refactor' },\n { label: 'Analyze', description: 'Research/explore' }\n ]},\n { question: 'What is the scope?', header: 'Scope', options: [\n { label: 'Single file', description: '1 file change' },\n { label: 'Module', description: 'One module' },\n { label: 'Cross-module', description: 'Multiple modules' },\n { label: 'System', description: 'System-wide' }\n ]},\n { question: 'Any constraints?', header: 'Constraints', options: [\n { label: 'Backward compat', description: 'Must not break existing' },\n { label: 'Skip tests', description: 'No test generation' },\n { label: 'Urgent hotfix', description: 'Fast track' }\n ]}\n];\n```\n\nUpdate analysis with answers, then proceed to workflow selection.",
28
+ "next": "S3"
29
+ },
30
+ "S3": {
31
+ "type": "step",
32
+ "name": "Select Workflow & Build Chain",
33
+ "content_inline": "## Phase 2: Select Workflow & Build Command Chain\n\nMap task_type to workflow flow:\n\n| task_type | level | flow | category chain |\n|-----------|-------|------|----------------|\n| bugfix-hotfix | 2 | bugfix.hotfix | lightweight |\n| greenfield | 3-4 | greenfield-plan/phased | exploration |\n| brainstorm | 4 | brainstorm-to-plan | exploration |\n| brainstorm-to-issue | 4 | brainstorm-to-issue | issue |\n| debug-file | 3 | debug-with-file | with-file |\n| analyze-file | 3 | analyze-to-plan | with-file |\n| collaborative-plan | 3 | collaborative-plan | with-file |\n| roadmap | 4 | roadmap | with-file |\n| spec-driven | 4 | spec-driven | exploration |\n| integration-test | 3 | integration-test-cycle | cycle |\n| refactor | 3 | refactor-cycle | cycle |\n| team-planex | Team | team-planex | team |\n| multi-cli | 3 | multi-cli-plan | standard |\n| bugfix | 2 | bugfix.standard | lightweight |\n| issue-batch | Issue | issue | issue |\n| issue-transition | 2.5 | rapid-to-issue | issue |\n| quick-task | 2 | rapid | lightweight |\n| ui-design | 3-4 | ui | standard |\n| tdd | 3 | tdd | standard |\n| test-gen/test-fix | 3 | test-gen/test-fix-gen | standard |\n| review | 3 | review-cycle-fix | standard |\n| documentation | 2 | docs | lightweight |\n| feature | 2-3 | rapid/coupled | lightweight/standard |\n| exploration | 4 | full | exploration |\n\nRoute to the appropriate category chain via D2.",
34
+ "next": "D2"
35
+ },
36
+ "D2": {
37
+ "type": "decision",
38
+ "name": "Route by Workflow Category",
39
+ "prompt": "Based on the task_type detected in Phase 1, route to the appropriate workflow category:\n1. Lightweight (Level 2) — rapid, bugfix, hotfix, docs\n2. Standard (Level 3) — coupled feature, tdd, test-fix, review, multi-cli, ui\n3. Exploration (Level 4) — brainstorm-to-plan, spec-driven, full exploration, greenfield\n4. With-File — analyze-to-plan, debug-with-file, collaborative-plan, roadmap\n5. Cycle — integration-test-cycle, refactor-cycle\n6. Issue — issue batch, rapid-to-issue, brainstorm-to-issue\n7. Team — team-planex\n\nMatch the task_type from intent analysis to the correct category.",
40
+ "choices": [
41
+ { "label": "Lightweight (Level 2)", "description": "rapid, bugfix, hotfix, docs", "next": "\u2192ccw-lightweight" },
42
+ { "label": "Standard (Level 3)", "description": "coupled, tdd, test-fix, review, multi-cli, ui", "next": "\u2192ccw-standard" },
43
+ { "label": "Exploration (Level 4)", "description": "brainstorm, spec-driven, full, greenfield", "next": "\u2192ccw-exploration" },
44
+ { "label": "With-File", "description": "analyze, debug, collab-plan, roadmap", "next": "\u2192ccw-with-file" },
45
+ { "label": "Cycle", "description": "integration-test, refactor", "next": "\u2192ccw-cycle" },
46
+ { "label": "Issue", "description": "issue batch, rapid-to-issue, brainstorm-to-issue", "next": "\u2192ccw-issue" },
47
+ { "label": "Team", "description": "team-planex", "next": "\u2192ccw-team" }
48
+ ],
49
+ "default": "\u2192ccw-lightweight"
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "chain_id": "ccw-standard",
3
+ "name": "CCW Standard Workflows (Level 3)",
4
+ "description": "Level 3 workflow routing: coupled, tdd, test-fix, review, multi-cli, ui",
5
+ "version": "2.0",
6
+ "entry": "D1",
7
+ "nodes": {
8
+ "D1": {
9
+ "type": "decision",
10
+ "name": "Select Standard Flow",
11
+ "prompt": "Based on the detected task_type, select the specific standard workflow:\n1. Coupled Feature — feature (high complexity)\n2. TDD — test-driven development\n3. Test Generation — generate tests for existing code\n4. Test Fix — fix failing tests\n5. Review Cycle + Fix — code review then test-fix\n6. Multi-CLI Plan — multi-model collaborative planning\n7. UI Design — UI component development\n\nChoose the flow that best matches the intent analysis.",
12
+ "choices": [
13
+ { "label": "Coupled Feature", "description": "plan → execute → review → test-fix", "next": "S_C1" },
14
+ { "label": "TDD", "description": "tdd-plan → execute", "next": "S_T1" },
15
+ { "label": "Test Generation", "description": "test-fix only", "next": "S_TG1" },
16
+ { "label": "Test Fix", "description": "test-fix only", "next": "S_TF1" },
17
+ { "label": "Review + Fix", "description": "review-cycle → test-fix", "next": "S_RF1" },
18
+ { "label": "Multi-CLI Plan", "description": "multi-cli-plan → test-fix", "next": "S_MC1" },
19
+ { "label": "UI Design", "description": "ui-explore → plan → execute", "next": "S_UI1" }
20
+ ],
21
+ "default": "S_C1"
22
+ },
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 }
38
+ }
39
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "chain_id": "ccw-team",
3
+ "name": "CCW Team Workflows",
4
+ "description": "Team workflow: team-planex planner + executor wave pipeline",
5
+ "version": "2.0",
6
+ "entry": "S1",
7
+ "nodes": {
8
+ "S1": { "type": "step", "name": "Team: team-planex", "content_ref": "@phases/team-planex.md", "next": null }
9
+ }
10
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "chain_id": "ccw-with-file",
3
+ "name": "CCW With-File Workflows",
4
+ "description": "With-File workflow routing: documented exploration with auto-chain to downstream skills",
5
+ "version": "2.0",
6
+ "entry": "D1",
7
+ "nodes": {
8
+ "D1": {
9
+ "type": "decision",
10
+ "name": "Select With-File Flow",
11
+ "prompt": "Based on the detected task_type, select the specific With-File workflow:\n1. Analyze → Plan — collaborative analysis auto-chaining to lite-plan\n2. Debug (standalone) — hypothesis-driven debugging, self-contained\n3. Collaborative Plan → Execute — multi-agent planning with unified execution\n4. Roadmap → Team — strategic requirement roadmap with team-planex execution\n\nDetection keywords:\n- analyze-file: collaborative analysis, explore concept\n- debug-file: hypothesis debug, systematic debug\n- collaborative-plan: multi-agent plan, Plan Note\n- roadmap: roadmap (explicit only)",
12
+ "choices": [
13
+ { "label": "Analyze → Plan", "description": "analyze-with-file → lite-plan", "next": "S_AP1" },
14
+ { "label": "Debug", "description": "debug-with-file (standalone)", "next": "S_DB1" },
15
+ { "label": "Collaborative Plan", "description": "collaborative-plan → unified-execute", "next": "S_CP1" },
16
+ { "label": "Roadmap → Team", "description": "roadmap-with-file → team-planex", "next": "S_RM1" }
17
+ ],
18
+ "default": "S_AP1"
19
+ },
20
+ "S_AP1": { "type": "step", "name": "Analyze: analyze-with-file", "content_ref": "@phases/analyze-with-file.md", "next": "S_AP2" },
21
+ "S_AP2": { "type": "step", "name": "Analyze: workflow-lite-plan", "content_ref": "@phases/workflow-lite-plan.md", "next": null },
22
+
23
+ "S_DB1": { "type": "step", "name": "Debug: debug-with-file", "content_ref": "@phases/debug-with-file.md", "next": null },
24
+
25
+ "S_CP1": { "type": "step", "name": "Collab: collaborative-plan-with-file", "content_ref": "@phases/collaborative-plan-with-file.md", "next": "S_CP2" },
26
+ "S_CP2": { "type": "step", "name": "Collab: unified-execute-with-file", "content_ref": "@phases/unified-execute-with-file.md", "next": null },
27
+
28
+ "S_RM1": { "type": "step", "name": "Roadmap: roadmap-with-file", "content_ref": "@phases/roadmap-with-file.md", "next": "S_RM2" },
29
+ "S_RM2": { "type": "step", "name": "Roadmap: team-planex", "content_ref": "@phases/team-planex.md", "next": null }
30
+ }
31
+ }