claude-code-workflow 7.2.29 → 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.
- package/.ccw/workflows/cli-templates/schemas/plan-overview-base-schema.json +2 -2
- package/.ccw/workflows/cli-templates/schemas/task-schema.json +14 -7
- package/.claude/agents/action-planning-agent.md +7 -4
- package/.claude/agents/cli-explore-agent.md +77 -63
- package/.claude/agents/cli-lite-planning-agent.md +11 -10
- package/.claude/agents/issue-plan-agent.md +421 -426
- package/.claude/commands/workflow/spec/setup.md +1 -1
- package/.claude/commands/workflow-skill.md +130 -0
- package/.claude/skills/ccw-chain/SKILL.md +92 -0
- package/.claude/skills/ccw-chain/chains/ccw-cycle.json +31 -0
- package/.claude/skills/ccw-chain/chains/ccw-exploration.json +58 -0
- package/.claude/skills/ccw-chain/chains/ccw-issue.json +44 -0
- package/.claude/skills/ccw-chain/chains/ccw-lightweight.json +71 -0
- package/.claude/skills/ccw-chain/chains/ccw-main.json +65 -0
- package/.claude/skills/ccw-chain/chains/ccw-standard.json +51 -0
- package/.claude/skills/ccw-chain/chains/ccw-team.json +15 -0
- package/.claude/skills/ccw-chain/chains/ccw-with-file.json +47 -0
- package/.claude/skills/ccw-chain/specs/auto-mode.md +47 -0
- package/.claude/skills/chain-loader/SKILL.md +78 -0
- package/.claude/skills/chain-loader/phases/01-analyze-skill.md +53 -0
- package/.claude/skills/chain-loader/phases/02-design-graph.md +73 -0
- package/.claude/skills/chain-loader/phases/03-generate-validate.md +75 -0
- package/.claude/skills/chain-loader/specs/chain-schema.md +126 -0
- package/.claude/skills/chain-loader/specs/design-patterns.md +99 -0
- package/.claude/skills/chain-loader/templates/chain-json.md +63 -0
- package/.claude/skills/review-cycle/phases/review-module.md +764 -764
- package/.claude/skills/review-cycle/phases/review-session.md +775 -775
- package/.claude/skills/workflow-multi-cli-plan/SKILL.md +2 -2
- package/.claude/skills/workflow-plan/SKILL.md +1 -0
- package/.claude/skills/workflow-plan/phases/01-session-discovery.md +19 -2
- package/.claude/skills/workflow-plan/phases/02-context-gathering.md +2 -2
- package/.claude/skills/workflow-plan/phases/03-conflict-resolution.md +422 -422
- package/.claude/skills/workflow-plan/phases/04-task-generation.md +9 -1
- package/.claude/skills/workflow-plan/phases/05-plan-verify.md +395 -395
- package/.claude/skills/workflow-tdd-plan/phases/02-context-gathering.md +407 -407
- package/.claude/skills/workflow-tdd-plan/phases/04-conflict-resolution.md +426 -426
- package/.claude/skills/workflow-test-fix/phases/02-test-context-gather.md +493 -493
- package/.codex/skills/analyze-with-file/SKILL.md +383 -134
- package/.codex/skills/brainstorm/SKILL.md +3 -3
- package/.codex/skills/brainstorm-with-file/SKILL.md +208 -88
- package/.codex/skills/clean/SKILL.md +1 -1
- package/.codex/skills/csv-wave-pipeline/SKILL.md +2 -2
- package/.codex/skills/investigate/orchestrator.md +24 -0
- package/.codex/skills/issue-discover/SKILL.md +374 -361
- package/.codex/skills/issue-discover/phases/01-issue-new.md +1 -1
- package/.codex/skills/issue-discover/phases/02-discover.md +2 -2
- package/.codex/skills/issue-discover/phases/03-discover-by-prompt.md +1 -1
- package/.codex/skills/issue-discover/phases/04-quick-execute.md +2 -2
- package/.codex/skills/parallel-dev-cycle/SKILL.md +44 -37
- package/.codex/skills/project-documentation-workflow/SKILL.md +1 -1
- package/.codex/skills/review-cycle/SKILL.md +31 -12
- package/.codex/skills/roadmap-with-file/SKILL.md +141 -133
- package/.codex/skills/security-audit/orchestrator.md +29 -0
- package/.codex/skills/session-sync/SKILL.md +1 -1
- package/.codex/skills/ship/orchestrator.md +24 -0
- package/.codex/skills/spec-add/SKILL.md +5 -5
- package/.codex/skills/spec-generator/SKILL.md +33 -2
- package/.codex/skills/spec-generator/phases/01-5-requirement-clarification.md +3 -3
- package/.codex/skills/spec-generator/phases/01-discovery.md +1 -1
- package/.codex/skills/spec-generator/phases/02-product-brief.md +1 -1
- package/.codex/skills/spec-generator/phases/03-requirements.md +1 -1
- package/.codex/skills/spec-generator/phases/04-architecture.md +1 -1
- package/.codex/skills/spec-generator/phases/05-epics-stories.md +1 -1
- package/.codex/skills/spec-generator/phases/06-readiness-check.md +1 -1
- package/.codex/skills/spec-generator/phases/07-issue-export.md +1 -1
- package/.codex/skills/spec-setup/SKILL.md +669 -669
- package/.codex/skills/team-arch-opt/specs/team-config.json +1 -1
- package/.codex/skills/team-brainstorm/SKILL.md +259 -259
- package/.codex/skills/team-coordinate/SKILL.md +359 -359
- package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +1 -1
- package/.codex/skills/team-designer/SKILL.md +27 -1
- package/.codex/skills/team-designer/phases/01-requirements-analysis.md +2 -2
- package/.codex/skills/team-designer/phases/02-scaffold-generation.md +1 -1
- package/.codex/skills/team-designer/phases/04-validation.md +1 -1
- package/.codex/skills/team-executor/SKILL.md +218 -218
- package/.codex/skills/team-frontend/SKILL.md +227 -227
- package/.codex/skills/team-frontend-debug/SKILL.md +278 -278
- package/.codex/skills/team-frontend-debug/roles/coordinator/commands/analyze.md +2 -2
- package/.codex/skills/team-interactive-craft/SKILL.md +220 -220
- package/.codex/skills/team-interactive-craft/roles/coordinator/role.md +209 -209
- package/.codex/skills/team-issue/SKILL.md +269 -269
- package/.codex/skills/team-issue/roles/coordinator/role.md +1 -1
- package/.codex/skills/team-lifecycle-v4/SKILL.md +305 -305
- package/.codex/skills/team-motion-design/SKILL.md +222 -222
- package/.codex/skills/team-motion-design/roles/coordinator/role.md +210 -210
- package/.codex/skills/team-perf-opt/SKILL.md +258 -258
- package/.codex/skills/team-perf-opt/specs/team-config.json +1 -1
- package/.codex/skills/team-planex/SKILL.md +216 -216
- package/.codex/skills/team-quality-assurance/SKILL.md +229 -229
- package/.codex/skills/team-review/SKILL.md +227 -227
- package/.codex/skills/team-roadmap-dev/SKILL.md +238 -238
- package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/roadmap-discuss.md +5 -5
- package/.codex/skills/team-tech-debt/SKILL.md +206 -206
- package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +1 -1
- package/.codex/skills/team-testing/SKILL.md +237 -237
- package/.codex/skills/team-ui-polish/SKILL.md +218 -218
- package/.codex/skills/team-ui-polish/roles/coordinator/role.md +213 -213
- package/.codex/skills/team-uidesign/SKILL.md +219 -219
- package/.codex/skills/team-uidesign/roles/coordinator/role.md +2 -2
- package/.codex/skills/team-ultra-analyze/SKILL.md +260 -260
- package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md +1 -1
- package/.codex/skills/team-ultra-analyze/roles/coordinator/role.md +1 -1
- package/.codex/skills/team-ux-improve/SKILL.md +227 -227
- package/.codex/skills/team-ux-improve/roles/coordinator/role.md +1 -1
- package/.codex/skills/team-ux-improve/specs/team-config.json +1 -1
- package/.codex/skills/team-visual-a11y/SKILL.md +319 -319
- package/.codex/skills/team-visual-a11y/roles/coordinator/role.md +213 -213
- package/.codex/skills/workflow-execute/SKILL.md +5 -5
- package/.codex/skills/workflow-lite-planex/SKILL.md +3 -3
- package/.codex/skills/workflow-plan/SKILL.md +3 -3
- package/.codex/skills/workflow-tdd-plan/SKILL.md +4 -4
- package/.codex/skills/workflow-test-fix-cycle/SKILL.md +403 -402
- package/README.md +14 -0
- package/ccw/dist/cli.d.ts.map +1 -1
- package/ccw/dist/cli.js +16 -0
- package/ccw/dist/cli.js.map +1 -1
- package/ccw/dist/commands/chain-loader.d.ts +2 -0
- package/ccw/dist/commands/chain-loader.d.ts.map +1 -0
- package/ccw/dist/commands/chain-loader.js +11 -0
- package/ccw/dist/commands/chain-loader.js.map +1 -0
- package/ccw/dist/commands/install.d.ts.map +1 -1
- package/ccw/dist/commands/install.js +52 -1
- package/ccw/dist/commands/install.js.map +1 -1
- package/ccw/dist/commands/launcher.d.ts +2 -0
- package/ccw/dist/commands/launcher.d.ts.map +1 -0
- package/ccw/dist/commands/launcher.js +434 -0
- package/ccw/dist/commands/launcher.js.map +1 -0
- package/ccw/dist/core/routes/litellm-api-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/litellm-api-routes.js +0 -23
- package/ccw/dist/core/routes/litellm-api-routes.js.map +1 -1
- package/ccw/dist/tools/chain-loader.d.ts +10 -0
- package/ccw/dist/tools/chain-loader.d.ts.map +1 -0
- package/ccw/dist/tools/chain-loader.js +1054 -0
- package/ccw/dist/tools/chain-loader.js.map +1 -0
- package/ccw/dist/tools/index.d.ts.map +1 -1
- package/ccw/dist/tools/index.js +2 -0
- package/ccw/dist/tools/index.js.map +1 -1
- package/ccw/dist/tools/json-builder.js +20 -0
- package/ccw/dist/tools/json-builder.js.map +1 -1
- package/ccw/dist/tools/skill-context-loader.d.ts.map +1 -1
- package/ccw/dist/tools/skill-context-loader.js +12 -26
- package/ccw/dist/tools/skill-context-loader.js.map +1 -1
- package/ccw/dist/types/chain-types.d.ts +112 -0
- package/ccw/dist/types/chain-types.d.ts.map +1 -0
- package/ccw/dist/types/chain-types.js +5 -0
- package/ccw/dist/types/chain-types.js.map +1 -0
- package/ccw/dist/utils/chain-visualizer.d.ts +13 -0
- package/ccw/dist/utils/chain-visualizer.d.ts.map +1 -0
- package/ccw/dist/utils/chain-visualizer.js +164 -0
- package/ccw/dist/utils/chain-visualizer.js.map +1 -0
- package/ccw/scripts/prepublish-clean.mjs +0 -1
- package/package.json +1 -3
- package/.claude/commands/cli/cli-init.md +0 -441
- package/.claude/commands/cli/codex-review.md +0 -361
- package/.claude/commands/flow-create.md +0 -663
- package/.claude/skills/team-edict.zip +0 -0
- package/ccw-litellm/README.md +0 -180
- package/ccw-litellm/pyproject.toml +0 -35
- package/ccw-litellm/src/ccw_litellm/__init__.py +0 -47
- package/ccw-litellm/src/ccw_litellm/cli.py +0 -108
- package/ccw-litellm/src/ccw_litellm/clients/__init__.py +0 -12
- package/ccw-litellm/src/ccw_litellm/clients/litellm_embedder.py +0 -270
- package/ccw-litellm/src/ccw_litellm/clients/litellm_llm.py +0 -198
- package/ccw-litellm/src/ccw_litellm/config/__init__.py +0 -22
- package/ccw-litellm/src/ccw_litellm/config/loader.py +0 -343
- package/ccw-litellm/src/ccw_litellm/config/models.py +0 -162
- package/ccw-litellm/src/ccw_litellm/interfaces/__init__.py +0 -14
- package/ccw-litellm/src/ccw_litellm/interfaces/embedder.py +0 -52
- 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
|
|
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,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
|
+
```
|
|
@@ -0,0 +1,92 @@
|
|
|
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 workflow orchestrator using `chain_loader` for progressive step loading and LLM-driven decision routing.
|
|
10
|
+
|
|
11
|
+
## Discovery
|
|
12
|
+
|
|
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`)
|
|
17
|
+
|
|
18
|
+
## Execution Protocol
|
|
19
|
+
|
|
20
|
+
When `chain_loader` delivers a step node with a skill/command doc:
|
|
21
|
+
|
|
22
|
+
1. **Read** the loaded doc content to understand the skill's purpose and interface
|
|
23
|
+
2. **Assemble** the Skill call: `Skill(skill_name, args)`
|
|
24
|
+
- First step: `args = "${analysis.goal}"`
|
|
25
|
+
- Subsequent steps: `args = ""` (auto-receives session context)
|
|
26
|
+
- Special args noted in step name (e.g., `--bugfix`, `--hotfix`, `--plan-only`)
|
|
27
|
+
3. **Propagate -y**: If auto mode active, append `-y` to args
|
|
28
|
+
4. **Execute**: `Skill(skill_name, args)` — blocking, wait for completion
|
|
29
|
+
5. **Advance**: `chain_loader done` to proceed to next step
|
|
30
|
+
|
|
31
|
+
```javascript
|
|
32
|
+
const autoYes = /\b(-y|--yes)\b/.test($ARGUMENTS);
|
|
33
|
+
|
|
34
|
+
function assembleCommand(skillName, args, previousResult) {
|
|
35
|
+
if (!args && previousResult?.session_id) {
|
|
36
|
+
args = `--session="${previousResult.session_id}"`;
|
|
37
|
+
}
|
|
38
|
+
if (autoYes && !args.includes('-y') && !args.includes('--yes')) {
|
|
39
|
+
args = args ? `${args} -y` : '-y';
|
|
40
|
+
}
|
|
41
|
+
return { skill: skillName, args };
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Auto Mode (`-y` / `--yes`)
|
|
46
|
+
|
|
47
|
+
- D1 Clarity Check: always choose "Clear" (skip clarification)
|
|
48
|
+
- Confirmation: skip, execute directly
|
|
49
|
+
- Error handling: auto-skip failed steps, continue pipeline
|
|
50
|
+
- Propagation: `-y` injected into every downstream Skill call
|
|
51
|
+
|
|
52
|
+
## Delegation Protocol
|
|
53
|
+
|
|
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
|
|
58
|
+
|
|
59
|
+
## Preloaded Context
|
|
60
|
+
|
|
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
|
|
65
|
+
|
|
66
|
+
## Progress Visualization
|
|
67
|
+
|
|
68
|
+
After each `chain_loader done`, call `chain_loader visualize` to show progress.
|
|
69
|
+
Display the visualization in execution log for user awareness.
|
|
70
|
+
|
|
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
|
|
87
|
+
|
|
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
|
|
@@ -0,0 +1,31 @@
|
|
|
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.1",
|
|
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
|
+
},
|
|
17
|
+
"nodes": {
|
|
18
|
+
"D1": {
|
|
19
|
+
"type": "decision",
|
|
20
|
+
"name": "Select Cycle Flow",
|
|
21
|
+
"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",
|
|
22
|
+
"choices": [
|
|
23
|
+
{ "label": "Integration Test Cycle", "description": "Self-iterating with max-iterations and reflection", "next": "S_IT1" },
|
|
24
|
+
{ "label": "Refactor Cycle", "description": "Multi-dimensional analysis + regression validation", "next": "S_RC1" }
|
|
25
|
+
],
|
|
26
|
+
"default": "S_IT1"
|
|
27
|
+
},
|
|
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 }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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.1",
|
|
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
|
+
},
|
|
18
|
+
"nodes": {
|
|
19
|
+
"D1": {
|
|
20
|
+
"type": "decision",
|
|
21
|
+
"name": "Select Exploration Flow",
|
|
22
|
+
"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",
|
|
23
|
+
"choices": [
|
|
24
|
+
{ "label": "Brainstorm → Plan", "description": "brainstorm-with-file → plan → execute → test-fix", "next": "S_BP1" },
|
|
25
|
+
{ "label": "Spec-Driven", "description": "spec-generator → plan → execute → test-fix", "next": "S_SD1" },
|
|
26
|
+
{ "label": "Full Exploration", "description": "brainstorm → plan → execute → test-fix", "next": "S_FE1" },
|
|
27
|
+
{ "label": "Greenfield (medium)", "description": "brainstorm-with-file → plan → execute → test-fix", "next": "S_GM1" },
|
|
28
|
+
{ "label": "Greenfield (large)", "description": "brainstorm-with-file → plan → execute → review → test-fix", "next": "S_GL1" }
|
|
29
|
+
],
|
|
30
|
+
"default": "S_BP1"
|
|
31
|
+
},
|
|
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 },
|
|
36
|
+
|
|
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 },
|
|
41
|
+
|
|
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 },
|
|
46
|
+
|
|
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 },
|
|
51
|
+
|
|
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 }
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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.1",
|
|
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
|
+
},
|
|
18
|
+
"nodes": {
|
|
19
|
+
"D1": {
|
|
20
|
+
"type": "decision",
|
|
21
|
+
"name": "Select Issue Flow",
|
|
22
|
+
"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",
|
|
23
|
+
"choices": [
|
|
24
|
+
{ "label": "Issue Batch", "description": "discover → plan → queue → execute", "next": "S_IB1" },
|
|
25
|
+
{ "label": "Rapid-to-Issue", "description": "lite-plan(plan-only) → convert → queue → execute", "next": "S_RI1" },
|
|
26
|
+
{ "label": "Brainstorm-to-Issue", "description": "from-brainstorm → queue → execute", "next": "S_BI1" }
|
|
27
|
+
],
|
|
28
|
+
"default": "S_IB1"
|
|
29
|
+
},
|
|
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 },
|
|
34
|
+
|
|
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 },
|
|
39
|
+
|
|
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 }
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
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.1",
|
|
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
|
+
},
|
|
19
|
+
"nodes": {
|
|
20
|
+
"D1": {
|
|
21
|
+
"type": "decision",
|
|
22
|
+
"name": "Select Lightweight Flow",
|
|
23
|
+
"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.",
|
|
24
|
+
"choices": [
|
|
25
|
+
{ "label": "Rapid", "description": "workflow-lite-plan → workflow-test-fix", "next": "S_R1" },
|
|
26
|
+
{ "label": "Bugfix", "description": "workflow-lite-plan(--bugfix) → workflow-test-fix", "next": "S_B1" },
|
|
27
|
+
{ "label": "Hotfix", "description": "workflow-lite-plan(--hotfix) only", "next": "S_H1" },
|
|
28
|
+
{ "label": "Docs", "description": "workflow-lite-plan only", "next": "S_D1" }
|
|
29
|
+
],
|
|
30
|
+
"default": "S_R1"
|
|
31
|
+
},
|
|
32
|
+
"S_R1": {
|
|
33
|
+
"type": "step",
|
|
34
|
+
"name": "Rapid: workflow-lite-plan",
|
|
35
|
+
"content_ref": "@skills/workflow-lite-plan/SKILL.md",
|
|
36
|
+
"next": "S_R2"
|
|
37
|
+
},
|
|
38
|
+
"S_R2": {
|
|
39
|
+
"type": "delegate",
|
|
40
|
+
"name": "Rapid: workflow-test-fix",
|
|
41
|
+
"chain": "workflow-test-fix",
|
|
42
|
+
"pass_variables": ["auto_yes", "goal"],
|
|
43
|
+
"next": null
|
|
44
|
+
},
|
|
45
|
+
"S_B1": {
|
|
46
|
+
"type": "step",
|
|
47
|
+
"name": "Bugfix: workflow-lite-plan --bugfix",
|
|
48
|
+
"content_ref": "@skills/workflow-lite-plan/SKILL.md",
|
|
49
|
+
"next": "S_B2"
|
|
50
|
+
},
|
|
51
|
+
"S_B2": {
|
|
52
|
+
"type": "delegate",
|
|
53
|
+
"name": "Bugfix: workflow-test-fix",
|
|
54
|
+
"chain": "workflow-test-fix",
|
|
55
|
+
"pass_variables": ["auto_yes", "goal"],
|
|
56
|
+
"next": null
|
|
57
|
+
},
|
|
58
|
+
"S_H1": {
|
|
59
|
+
"type": "step",
|
|
60
|
+
"name": "Hotfix: workflow-lite-plan --hotfix",
|
|
61
|
+
"content_ref": "@skills/workflow-lite-plan/SKILL.md",
|
|
62
|
+
"next": null
|
|
63
|
+
},
|
|
64
|
+
"S_D1": {
|
|
65
|
+
"type": "step",
|
|
66
|
+
"name": "Docs: workflow-lite-plan",
|
|
67
|
+
"content_ref": "@skills/workflow-lite-plan/SKILL.md",
|
|
68
|
+
"next": null
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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.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
|
+
},
|
|
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
|
+
],
|
|
20
|
+
"nodes": {
|
|
21
|
+
"S1": {
|
|
22
|
+
"type": "step",
|
|
23
|
+
"name": "Analyze Intent",
|
|
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`",
|
|
25
|
+
"next": "D1"
|
|
26
|
+
},
|
|
27
|
+
"D1": {
|
|
28
|
+
"type": "decision",
|
|
29
|
+
"name": "Clarity Check",
|
|
30
|
+
"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.",
|
|
31
|
+
"choices": [
|
|
32
|
+
{ "label": "Clear", "description": "Clarity score >= 2, proceed to workflow selection", "next": "S3" },
|
|
33
|
+
{ "label": "Unclear", "description": "Clarity score < 2, need requirement clarification", "next": "S2" }
|
|
34
|
+
],
|
|
35
|
+
"default": "S2"
|
|
36
|
+
},
|
|
37
|
+
"S2": {
|
|
38
|
+
"type": "step",
|
|
39
|
+
"name": "Clarify Requirements",
|
|
40
|
+
"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.",
|
|
41
|
+
"next": "S3"
|
|
42
|
+
},
|
|
43
|
+
"S3": {
|
|
44
|
+
"type": "step",
|
|
45
|
+
"name": "Select Workflow & Build Chain",
|
|
46
|
+
"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.",
|
|
47
|
+
"next": "D2"
|
|
48
|
+
},
|
|
49
|
+
"D2": {
|
|
50
|
+
"type": "decision",
|
|
51
|
+
"name": "Route by Workflow Category",
|
|
52
|
+
"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.",
|
|
53
|
+
"choices": [
|
|
54
|
+
{ "label": "Lightweight (Level 2)", "description": "rapid, bugfix, hotfix, docs", "next": "\u2192ccw-lightweight" },
|
|
55
|
+
{ "label": "Standard (Level 3)", "description": "coupled, tdd, test-fix, review, multi-cli, ui", "next": "\u2192ccw-standard" },
|
|
56
|
+
{ "label": "Exploration (Level 4)", "description": "brainstorm, spec-driven, full, greenfield", "next": "\u2192ccw-exploration" },
|
|
57
|
+
{ "label": "With-File", "description": "analyze, debug, collab-plan, roadmap", "next": "\u2192ccw-with-file" },
|
|
58
|
+
{ "label": "Cycle", "description": "integration-test, refactor", "next": "\u2192ccw-cycle" },
|
|
59
|
+
{ "label": "Issue", "description": "issue batch, rapid-to-issue, brainstorm-to-issue", "next": "\u2192ccw-issue" },
|
|
60
|
+
{ "label": "Team", "description": "team-planex", "next": "\u2192ccw-team" }
|
|
61
|
+
],
|
|
62
|
+
"default": "\u2192ccw-lightweight"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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.2",
|
|
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
|
+
},
|
|
19
|
+
"nodes": {
|
|
20
|
+
"D1": {
|
|
21
|
+
"type": "decision",
|
|
22
|
+
"name": "Select Standard Flow",
|
|
23
|
+
"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.",
|
|
24
|
+
"choices": [
|
|
25
|
+
{ "label": "Coupled Feature", "description": "plan → execute → review → test-fix", "next": "S_C1" },
|
|
26
|
+
{ "label": "TDD", "description": "tdd-plan → execute", "next": "S_T1" },
|
|
27
|
+
{ "label": "Test Generation", "description": "test-fix only", "next": "S_TG1" },
|
|
28
|
+
{ "label": "Test Fix", "description": "test-fix only", "next": "S_TF1" },
|
|
29
|
+
{ "label": "Review + Fix", "description": "review-cycle → test-fix", "next": "S_RF1" },
|
|
30
|
+
{ "label": "Multi-CLI Plan", "description": "multi-cli-plan → test-fix", "next": "S_MC1" },
|
|
31
|
+
{ "label": "UI Design", "description": "ui-explore → plan → execute", "next": "S_UI1" }
|
|
32
|
+
],
|
|
33
|
+
"default": "S_C1"
|
|
34
|
+
},
|
|
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 }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"chain_id": "ccw-team",
|
|
3
|
+
"name": "CCW Team Workflows",
|
|
4
|
+
"description": "Team workflow: team-planex planner + executor wave pipeline",
|
|
5
|
+
"version": "2.1",
|
|
6
|
+
"entry": "S1",
|
|
7
|
+
"triggers": {
|
|
8
|
+
"task_types": ["team-planex"],
|
|
9
|
+
"keywords": ["team.*plan.*exec|team.*planex|wave.*pipeline"],
|
|
10
|
+
"scope": "Team: planner + executor wave pipeline"
|
|
11
|
+
},
|
|
12
|
+
"nodes": {
|
|
13
|
+
"S1": { "type": "step", "name": "Team: team-planex", "content_ref": "@skills/team-planex/SKILL.md", "next": null }
|
|
14
|
+
}
|
|
15
|
+
}
|