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.
- package/.claude/commands/workflow-skill.md +130 -0
- package/.claude/skills/ccw-chain/SKILL.md +44 -71
- package/.claude/skills/ccw-chain/chains/ccw-cycle.json +13 -3
- package/.claude/skills/ccw-chain/chains/ccw-exploration.json +33 -22
- package/.claude/skills/ccw-chain/chains/ccw-issue.json +23 -12
- package/.claude/skills/ccw-chain/chains/ccw-lightweight.json +23 -9
- package/.claude/skills/ccw-chain/chains/ccw-main.json +15 -2
- package/.claude/skills/ccw-chain/chains/ccw-standard.json +28 -16
- package/.claude/skills/ccw-chain/chains/ccw-team.json +7 -2
- package/.claude/skills/ccw-chain/chains/ccw-with-file.json +25 -9
- package/.claude/skills/chain-loader/phases/01-analyze-skill.md +53 -53
- package/.claude/skills/chain-loader/specs/chain-schema.md +30 -3
- package/.claude/skills/chain-loader/templates/chain-json.md +63 -63
- 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/04-task-generation.md +9 -1
- 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/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/tools/chain-loader.d.ts.map +1 -1
- package/ccw/dist/tools/chain-loader.js +457 -45
- package/ccw/dist/tools/chain-loader.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 +41 -1
- package/ccw/dist/types/chain-types.d.ts.map +1 -1
- 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/package.json +1 -1
- 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/ccw-chain/phases/analyze-with-file.md +0 -788
- package/.claude/skills/ccw-chain/phases/brainstorm/SKILL.md +0 -408
- package/.claude/skills/ccw-chain/phases/brainstorm/phases/01-mode-routing.md +0 -207
- package/.claude/skills/ccw-chain/phases/brainstorm/phases/02-artifacts.md +0 -567
- package/.claude/skills/ccw-chain/phases/brainstorm/phases/03-role-analysis.md +0 -748
- package/.claude/skills/ccw-chain/phases/brainstorm/phases/04-synthesis.md +0 -827
- package/.claude/skills/ccw-chain/phases/brainstorm-with-file.md +0 -482
- package/.claude/skills/ccw-chain/phases/collaborative-plan-with-file.md +0 -639
- package/.claude/skills/ccw-chain/phases/debug-with-file.md +0 -656
- package/.claude/skills/ccw-chain/phases/integration-test-cycle.md +0 -936
- package/.claude/skills/ccw-chain/phases/issue-convert-to-plan.md +0 -720
- package/.claude/skills/ccw-chain/phases/issue-discover.md +0 -483
- package/.claude/skills/ccw-chain/phases/issue-execute.md +0 -629
- package/.claude/skills/ccw-chain/phases/issue-from-brainstorm.md +0 -382
- package/.claude/skills/ccw-chain/phases/issue-plan.md +0 -343
- package/.claude/skills/ccw-chain/phases/issue-queue.md +0 -464
- package/.claude/skills/ccw-chain/phases/refactor-cycle.md +0 -852
- package/.claude/skills/ccw-chain/phases/review-cycle/SKILL.md +0 -132
- package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-fix.md +0 -760
- package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-module.md +0 -764
- package/.claude/skills/ccw-chain/phases/review-cycle/phases/review-session.md +0 -775
- package/.claude/skills/ccw-chain/phases/roadmap-with-file.md +0 -544
- package/.claude/skills/ccw-chain/phases/spec-generator/SKILL.md +0 -338
- package/.claude/skills/ccw-chain/phases/spec-generator/phases/01-5-requirement-clarification.md +0 -404
- package/.claude/skills/ccw-chain/phases/spec-generator/phases/01-discovery.md +0 -257
- package/.claude/skills/ccw-chain/phases/spec-generator/phases/02-product-brief.md +0 -274
- package/.claude/skills/ccw-chain/phases/spec-generator/phases/03-requirements.md +0 -184
- package/.claude/skills/ccw-chain/phases/spec-generator/phases/04-architecture.md +0 -248
- package/.claude/skills/ccw-chain/phases/spec-generator/phases/05-epics-stories.md +0 -178
- package/.claude/skills/ccw-chain/phases/spec-generator/phases/06-5-auto-fix.md +0 -144
- package/.claude/skills/ccw-chain/phases/spec-generator/phases/06-readiness-check.md +0 -480
- package/.claude/skills/ccw-chain/phases/team-planex.md +0 -123
- package/.claude/skills/ccw-chain/phases/ui-design-explore-auto.md +0 -678
- package/.claude/skills/ccw-chain/phases/unified-execute-with-file.md +0 -870
- package/.claude/skills/ccw-chain/phases/workflow-execute/SKILL.md +0 -625
- package/.claude/skills/ccw-chain/phases/workflow-execute/phases/06-review.md +0 -215
- package/.claude/skills/ccw-chain/phases/workflow-lite-plan.md +0 -616
- package/.claude/skills/ccw-chain/phases/workflow-multi-cli-plan.md +0 -424
- package/.claude/skills/ccw-chain/phases/workflow-plan/SKILL.md +0 -466
- package/.claude/skills/ccw-chain/phases/workflow-plan/phases/01-session-discovery.md +0 -99
- package/.claude/skills/ccw-chain/phases/workflow-plan/phases/02-context-gathering.md +0 -338
- package/.claude/skills/ccw-chain/phases/workflow-plan/phases/03-conflict-resolution.md +0 -422
- package/.claude/skills/ccw-chain/phases/workflow-plan/phases/04-task-generation.md +0 -440
- package/.claude/skills/ccw-chain/phases/workflow-plan/phases/05-plan-verify.md +0 -395
- package/.claude/skills/ccw-chain/phases/workflow-plan/phases/06-replan.md +0 -594
- package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/SKILL.md +0 -527
- package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/01-session-discovery.md +0 -57
- package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/02-context-gathering.md +0 -407
- package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/03-test-coverage-analysis.md +0 -172
- package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/04-conflict-resolution.md +0 -426
- package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/05-tdd-task-generation.md +0 -473
- package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/06-tdd-structure-validation.md +0 -189
- package/.claude/skills/ccw-chain/phases/workflow-tdd-plan/phases/07-tdd-verify.md +0 -635
- package/.claude/skills/ccw-chain/phases/workflow-test-fix/SKILL.md +0 -482
- package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/01-session-start.md +0 -60
- package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/02-test-context-gather.md +0 -493
- package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/03-test-concept-enhanced.md +0 -150
- package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/04-test-task-generate.md +0 -346
- package/.claude/skills/ccw-chain/phases/workflow-test-fix/phases/05-test-cycle-execute.md +0 -538
- package/.claude/skills/ccw-chain/specs/intent-patterns.md +0 -60
- package/.claude/skills/team-edict.zip +0 -0
|
@@ -2,9 +2,14 @@
|
|
|
2
2
|
"chain_id": "ccw-team",
|
|
3
3
|
"name": "CCW Team Workflows",
|
|
4
4
|
"description": "Team workflow: team-planex planner + executor wave pipeline",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.1",
|
|
6
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
|
+
},
|
|
7
12
|
"nodes": {
|
|
8
|
-
"S1": { "type": "step", "name": "Team: team-planex", "content_ref": "@
|
|
13
|
+
"S1": { "type": "step", "name": "Team: team-planex", "content_ref": "@skills/team-planex/SKILL.md", "next": null }
|
|
9
14
|
}
|
|
10
15
|
}
|
|
@@ -2,8 +2,21 @@
|
|
|
2
2
|
"chain_id": "ccw-with-file",
|
|
3
3
|
"name": "CCW With-File Workflows",
|
|
4
4
|
"description": "With-File workflow routing: documented exploration with auto-chain to downstream skills",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.2",
|
|
6
6
|
"entry": "D1",
|
|
7
|
+
"entries": [
|
|
8
|
+
{ "name": "default", "node": "D1", "description": "Select flow via decision node" },
|
|
9
|
+
{ "name": "analyze", "node": "S_AP1", "description": "Direct: Analyze → Plan flow" },
|
|
10
|
+
{ "name": "debug", "node": "S_DB1", "description": "Direct: Debug flow (standalone)" },
|
|
11
|
+
{ "name": "collab-plan", "node": "S_CP1", "description": "Direct: Collaborative Plan → Execute" },
|
|
12
|
+
{ "name": "roadmap", "node": "S_RM1", "description": "Direct: Roadmap → Team flow" },
|
|
13
|
+
{ "name": "investigate", "node": "S_INV1", "description": "Direct: Systematic investigation with Iron Law gate" }
|
|
14
|
+
],
|
|
15
|
+
"triggers": {
|
|
16
|
+
"task_types": ["analyze-file", "debug-file", "collaborative-plan", "roadmap"],
|
|
17
|
+
"keywords": ["analyze.*document|collaborative analysis", "hypothesis.*debug|systematic debug|investigate", "collaborative.*plan|multi.*agent.*plan", "roadmap"],
|
|
18
|
+
"scope": "With-File: documented exploration with auto-chain to downstream skills"
|
|
19
|
+
},
|
|
7
20
|
"nodes": {
|
|
8
21
|
"D1": {
|
|
9
22
|
"type": "decision",
|
|
@@ -13,19 +26,22 @@
|
|
|
13
26
|
{ "label": "Analyze → Plan", "description": "analyze-with-file → lite-plan", "next": "S_AP1" },
|
|
14
27
|
{ "label": "Debug", "description": "debug-with-file (standalone)", "next": "S_DB1" },
|
|
15
28
|
{ "label": "Collaborative Plan", "description": "collaborative-plan → unified-execute", "next": "S_CP1" },
|
|
16
|
-
{ "label": "Roadmap → Team", "description": "roadmap-with-file → team-planex", "next": "S_RM1" }
|
|
29
|
+
{ "label": "Roadmap → Team", "description": "roadmap-with-file → team-planex", "next": "S_RM1" },
|
|
30
|
+
{ "label": "Investigate", "description": "Systematic investigation with Iron Law gate", "next": "S_INV1" }
|
|
17
31
|
],
|
|
18
32
|
"default": "S_AP1"
|
|
19
33
|
},
|
|
20
|
-
"S_AP1": { "type": "step", "name": "Analyze: analyze-with-file", "content_ref": "@
|
|
21
|
-
"S_AP2": { "type": "step", "name": "Analyze: workflow-lite-plan", "content_ref": "@
|
|
34
|
+
"S_AP1": { "type": "step", "name": "Analyze: analyze-with-file", "content_ref": "@commands/workflow/analyze-with-file.md", "next": "S_AP2" },
|
|
35
|
+
"S_AP2": { "type": "step", "name": "Analyze: workflow-lite-plan", "content_ref": "@skills/workflow-lite-plan/SKILL.md", "next": null },
|
|
22
36
|
|
|
23
|
-
"S_DB1": { "type": "step", "name": "Debug: debug-with-file", "content_ref": "@
|
|
37
|
+
"S_DB1": { "type": "step", "name": "Debug: debug-with-file", "content_ref": "@commands/workflow/debug-with-file.md", "next": null },
|
|
24
38
|
|
|
25
|
-
"S_CP1": { "type": "step", "name": "Collab: collaborative-plan-with-file", "content_ref": "@
|
|
26
|
-
"S_CP2": { "type": "step", "name": "Collab: unified-execute-with-file", "content_ref": "@
|
|
39
|
+
"S_CP1": { "type": "step", "name": "Collab: collaborative-plan-with-file", "content_ref": "@commands/workflow/collaborative-plan-with-file.md", "next": "S_CP2" },
|
|
40
|
+
"S_CP2": { "type": "step", "name": "Collab: unified-execute-with-file", "content_ref": "@commands/workflow/unified-execute-with-file.md", "next": null },
|
|
27
41
|
|
|
28
|
-
"S_RM1": { "type": "step", "name": "Roadmap: roadmap-with-file", "content_ref": "@
|
|
29
|
-
"S_RM2": { "type": "step", "name": "Roadmap: team-planex", "content_ref": "@
|
|
42
|
+
"S_RM1": { "type": "step", "name": "Roadmap: roadmap-with-file", "content_ref": "@commands/workflow/roadmap-with-file.md", "next": "S_RM2" },
|
|
43
|
+
"S_RM2": { "type": "step", "name": "Roadmap: team-planex", "content_ref": "@skills/team-planex/SKILL.md", "next": null },
|
|
44
|
+
|
|
45
|
+
"S_INV1": { "type": "delegate", "name": "Investigate: ccw-investigate", "chain": "ccw-investigate", "pass_variables": ["goal", "auto_yes"], "receive_variables": ["root_cause", "confidence"], "next": null }
|
|
30
46
|
}
|
|
31
47
|
}
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
# Phase 1: Analyze Target Skill
|
|
2
|
-
|
|
3
|
-
Understand the target skill's workflow to identify nodes, decision points, and content files.
|
|
4
|
-
|
|
5
|
-
## Step 1.1: Identify Target
|
|
6
|
-
|
|
7
|
-
Determine if adding chains to an existing skill or creating new:
|
|
8
|
-
|
|
9
|
-
**Existing skill**: Read its SKILL.md and list its phases/ directory
|
|
10
|
-
```bash
|
|
11
|
-
# Find the skill
|
|
12
|
-
ls .claude/skills/{skill-name}/SKILL.md
|
|
13
|
-
ls .claude/skills/{skill-name}/phases/
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
**New skill**: Collect requirements from user — what workflow steps, what branches, what content.
|
|
17
|
-
|
|
18
|
-
## Step 1.2: Map Workflow Steps
|
|
19
|
-
|
|
20
|
-
For existing skills, read each phase file and identify:
|
|
21
|
-
|
|
22
|
-
1. **Sequential steps** — each phase becomes a StepNode with `content_ref: "@phases/{file}"`
|
|
23
|
-
2. **Decision points** — look for conditional language ("if...", "based on...", "choose...") that implies branching
|
|
24
|
-
3. **Sub-workflows** — sections that reference other skills or could be extracted as separate chains
|
|
25
|
-
|
|
26
|
-
For new skills, work with the user to define:
|
|
27
|
-
- What are the execution steps?
|
|
28
|
-
- Where does the LLM need to make a routing decision?
|
|
29
|
-
- What content should each step load?
|
|
30
|
-
|
|
31
|
-
## Step 1.3: Inventory Content Files
|
|
32
|
-
|
|
33
|
-
List all files that chain nodes will reference:
|
|
34
|
-
|
|
35
|
-
| Type | Source | content_ref Format |
|
|
36
|
-
|------|--------|--------------------|
|
|
37
|
-
| Phase files | `phases/01-xxx.md` | `@phases/01-xxx.md` |
|
|
38
|
-
| Skill subdirs | `phases/workflow-plan/SKILL.md` | `@
|
|
39
|
-
| Commands | `.claude/commands/workflow/xxx.md` | Copy to phases/ first, then `@phases/xxx.md` |
|
|
40
|
-
| Inline content | Short instructions (<200 chars) | Use `content_inline` instead |
|
|
41
|
-
|
|
42
|
-
**Key lesson from ccw-chain**: phases/ should contain **actual command/skill documents** that the LLM executes, not orchestration pseudocode.
|
|
43
|
-
|
|
44
|
-
## Output
|
|
45
|
-
|
|
46
|
-
- Skill name and directory path
|
|
47
|
-
- List of workflow steps with their content file mappings
|
|
48
|
-
- Identified decision points with branch options
|
|
49
|
-
- List of content files that need to be created or copied
|
|
50
|
-
|
|
51
|
-
## Next Phase
|
|
52
|
-
|
|
53
|
-
Proceed to [Phase 2: Design Node Graph](02-design-graph.md).
|
|
1
|
+
# Phase 1: Analyze Target Skill
|
|
2
|
+
|
|
3
|
+
Understand the target skill's workflow to identify nodes, decision points, and content files.
|
|
4
|
+
|
|
5
|
+
## Step 1.1: Identify Target
|
|
6
|
+
|
|
7
|
+
Determine if adding chains to an existing skill or creating new:
|
|
8
|
+
|
|
9
|
+
**Existing skill**: Read its SKILL.md and list its phases/ directory
|
|
10
|
+
```bash
|
|
11
|
+
# Find the skill
|
|
12
|
+
ls .claude/skills/{skill-name}/SKILL.md
|
|
13
|
+
ls .claude/skills/{skill-name}/phases/
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
**New skill**: Collect requirements from user — what workflow steps, what branches, what content.
|
|
17
|
+
|
|
18
|
+
## Step 1.2: Map Workflow Steps
|
|
19
|
+
|
|
20
|
+
For existing skills, read each phase file and identify:
|
|
21
|
+
|
|
22
|
+
1. **Sequential steps** — each phase becomes a StepNode with `content_ref: "@phases/{file}"`
|
|
23
|
+
2. **Decision points** — look for conditional language ("if...", "based on...", "choose...") that implies branching
|
|
24
|
+
3. **Sub-workflows** — sections that reference other skills or could be extracted as separate chains
|
|
25
|
+
|
|
26
|
+
For new skills, work with the user to define:
|
|
27
|
+
- What are the execution steps?
|
|
28
|
+
- Where does the LLM need to make a routing decision?
|
|
29
|
+
- What content should each step load?
|
|
30
|
+
|
|
31
|
+
## Step 1.3: Inventory Content Files
|
|
32
|
+
|
|
33
|
+
List all files that chain nodes will reference:
|
|
34
|
+
|
|
35
|
+
| Type | Source | content_ref Format |
|
|
36
|
+
|------|--------|--------------------|
|
|
37
|
+
| Phase files | `phases/01-xxx.md` | `@phases/01-xxx.md` |
|
|
38
|
+
| Skill subdirs | `phases/workflow-plan/SKILL.md` | `@skills/workflow-plan/SKILL.md` |
|
|
39
|
+
| Commands | `.claude/commands/workflow/xxx.md` | Copy to phases/ first, then `@phases/xxx.md` |
|
|
40
|
+
| Inline content | Short instructions (<200 chars) | Use `content_inline` instead |
|
|
41
|
+
|
|
42
|
+
**Key lesson from ccw-chain**: phases/ should contain **actual command/skill documents** that the LLM executes, not orchestration pseudocode.
|
|
43
|
+
|
|
44
|
+
## Output
|
|
45
|
+
|
|
46
|
+
- Skill name and directory path
|
|
47
|
+
- List of workflow steps with their content file mappings
|
|
48
|
+
- Identified decision points with branch options
|
|
49
|
+
- List of content files that need to be created or copied
|
|
50
|
+
|
|
51
|
+
## Next Phase
|
|
52
|
+
|
|
53
|
+
Proceed to [Phase 2: Design Node Graph](02-design-graph.md).
|
|
@@ -12,9 +12,35 @@ Files live at `.claude/skills/{skill}/chains/{chain-name}.json`.
|
|
|
12
12
|
| `name` | string | Human-readable name |
|
|
13
13
|
| `description` | string | What this chain does |
|
|
14
14
|
| `version` | string | Semantic version |
|
|
15
|
-
| `entry` | string | Node ID of entry point (
|
|
15
|
+
| `entry` | string? | Node ID of single entry point (backward compat) |
|
|
16
|
+
| `entries` | array? | Multiple named entry points (preferred over `entry`) |
|
|
17
|
+
| `triggers` | object? | Self-describing trigger conditions |
|
|
16
18
|
| `nodes` | object | Map of node ID to node definition |
|
|
17
19
|
|
|
20
|
+
### Entries (multiple entry points)
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
"entries": [
|
|
24
|
+
{ "name": "default", "node": "D1", "description": "Select flow via decision" },
|
|
25
|
+
{ "name": "bugfix", "node": "S_B1", "description": "Direct: Bugfix flow" }
|
|
26
|
+
]
|
|
27
|
+
```
|
|
28
|
+
- First entry is the default when no `entry_name` or `node` specified in `start`
|
|
29
|
+
- Resolution priority: explicit `node` > `entry_name` lookup > `entries[0]` > `entry`
|
|
30
|
+
|
|
31
|
+
### Triggers (self-describing)
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
"triggers": {
|
|
35
|
+
"task_types": ["bugfix", "bugfix-hotfix", "quick-task"],
|
|
36
|
+
"keywords": ["fix|bug|error", "urgent|production"],
|
|
37
|
+
"scope": "Level 2: rapid, bugfix, hotfix, docs"
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
- `task_types`: array of task_type values this chain handles
|
|
41
|
+
- `keywords`: array of regex patterns for intent matching
|
|
42
|
+
- `scope`: human-readable description of when to use this chain
|
|
43
|
+
|
|
18
44
|
### StepNode
|
|
19
45
|
|
|
20
46
|
```json
|
|
@@ -90,8 +116,9 @@ pending → active → completed
|
|
|
90
116
|
|
|
91
117
|
| cmd | Params | Description |
|
|
92
118
|
|-----|--------|-------------|
|
|
93
|
-
| `list` | `skill?` | List chains
|
|
94
|
-
| `
|
|
119
|
+
| `list` | `skill?` | List chains with triggers/entries |
|
|
120
|
+
| `inspect` | `chain`, `skill?` | Show chain node graph and entries |
|
|
121
|
+
| `start` | `chain`, `skill?`, `node?`, `entry_name?` | Create session from entry, named entry, or any node |
|
|
95
122
|
| `next` | `session_id` | Read current node (idempotent if active) |
|
|
96
123
|
| `done` | `session_id`, `choice?` | Complete current node, advance |
|
|
97
124
|
| `status` | `session_id` | Query session state |
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
# Chain JSON Template
|
|
2
|
-
|
|
3
|
-
## Minimal Linear Chain
|
|
4
|
-
|
|
5
|
-
```json
|
|
6
|
-
{
|
|
7
|
-
"chain_id": "my-workflow",
|
|
8
|
-
"name": "My Workflow",
|
|
9
|
-
"description": "Sequential 3-step workflow",
|
|
10
|
-
"version": "1.0",
|
|
11
|
-
"entry": "S1",
|
|
12
|
-
"nodes": {
|
|
13
|
-
"S1": { "type": "step", "name": "Step 1", "content_ref": "@phases/01-step.md", "next": "S2" },
|
|
14
|
-
"S2": { "type": "step", "name": "Step 2", "content_ref": "@phases/02-step.md", "next": "S3" },
|
|
15
|
-
"S3": { "type": "step", "name": "Step 3", "content_ref": "@phases/03-step.md", "next": null }
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Decision Router (from ccw-chain/ccw-lightweight)
|
|
21
|
-
|
|
22
|
-
```json
|
|
23
|
-
{
|
|
24
|
-
"chain_id": "ccw-lightweight",
|
|
25
|
-
"name": "CCW Lightweight Workflows",
|
|
26
|
-
"description": "Level 2: rapid, bugfix, hotfix, docs-only",
|
|
27
|
-
"version": "2.0",
|
|
28
|
-
"entry": "D1",
|
|
29
|
-
"nodes": {
|
|
30
|
-
"D1": {
|
|
31
|
-
"type": "decision",
|
|
32
|
-
"name": "Select Lightweight Flow",
|
|
33
|
-
"prompt": "Based on the detected task_type, select the flow:\n1. Rapid\n2. Bugfix\n3. Hotfix\n4. Docs",
|
|
34
|
-
"choices": [
|
|
35
|
-
{ "label": "Rapid", "description": "lite-plan + test-fix", "next": "S_R1" },
|
|
36
|
-
{ "label": "Bugfix", "description": "lite-plan(--bugfix) + test-fix", "next": "S_B1" },
|
|
37
|
-
{ "label": "Hotfix", "description": "lite-plan(--hotfix)", "next": "S_H1" },
|
|
38
|
-
{ "label": "Docs", "description": "lite-plan(--docs)", "next": "S_D1" }
|
|
39
|
-
],
|
|
40
|
-
"default": "S_R1"
|
|
41
|
-
},
|
|
42
|
-
"S_R1": { "type": "step", "name": "Rapid: workflow-lite-plan", "content_ref": "@phases/workflow-lite-plan.md", "next": "S_R2" },
|
|
43
|
-
"S_R2": { "type": "step", "name": "Rapid: workflow-test-fix", "content_ref": "@
|
|
44
|
-
"S_B1": { "type": "step", "name": "Bugfix: workflow-lite-plan", "content_ref": "@phases/workflow-lite-plan.md", "next": "S_B2" },
|
|
45
|
-
"S_B2": { "type": "step", "name": "Bugfix: workflow-test-fix", "content_ref": "@
|
|
46
|
-
"S_H1": { "type": "step", "name": "Hotfix: workflow-lite-plan", "content_ref": "@phases/workflow-lite-plan.md", "next": null },
|
|
47
|
-
"S_D1": { "type": "step", "name": "Docs: workflow-lite-plan", "content_ref": "@phases/workflow-lite-plan.md", "next": null }
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Cross-Chain Routing (from ccw-chain/ccw-main)
|
|
53
|
-
|
|
54
|
-
Decision choice with `"next": "->ccw-lightweight"` jumps to another chain's entry node.
|
|
55
|
-
|
|
56
|
-
## Node ID Conventions
|
|
57
|
-
|
|
58
|
-
| Prefix | Type | Example |
|
|
59
|
-
|--------|------|---------|
|
|
60
|
-
| `S{n}` | Sequential step | S1, S2, S3 |
|
|
61
|
-
| `S_{prefix}{n}` | Flow-scoped step | S_R1, S_B1, S_CP2 |
|
|
62
|
-
| `D{n}` | Decision | D1, D2 |
|
|
63
|
-
| `DEL{n}` | Delegate | DEL1 |
|
|
1
|
+
# Chain JSON Template
|
|
2
|
+
|
|
3
|
+
## Minimal Linear Chain
|
|
4
|
+
|
|
5
|
+
```json
|
|
6
|
+
{
|
|
7
|
+
"chain_id": "my-workflow",
|
|
8
|
+
"name": "My Workflow",
|
|
9
|
+
"description": "Sequential 3-step workflow",
|
|
10
|
+
"version": "1.0",
|
|
11
|
+
"entry": "S1",
|
|
12
|
+
"nodes": {
|
|
13
|
+
"S1": { "type": "step", "name": "Step 1", "content_ref": "@phases/01-step.md", "next": "S2" },
|
|
14
|
+
"S2": { "type": "step", "name": "Step 2", "content_ref": "@phases/02-step.md", "next": "S3" },
|
|
15
|
+
"S3": { "type": "step", "name": "Step 3", "content_ref": "@phases/03-step.md", "next": null }
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Decision Router (from ccw-chain/ccw-lightweight)
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"chain_id": "ccw-lightweight",
|
|
25
|
+
"name": "CCW Lightweight Workflows",
|
|
26
|
+
"description": "Level 2: rapid, bugfix, hotfix, docs-only",
|
|
27
|
+
"version": "2.0",
|
|
28
|
+
"entry": "D1",
|
|
29
|
+
"nodes": {
|
|
30
|
+
"D1": {
|
|
31
|
+
"type": "decision",
|
|
32
|
+
"name": "Select Lightweight Flow",
|
|
33
|
+
"prompt": "Based on the detected task_type, select the flow:\n1. Rapid\n2. Bugfix\n3. Hotfix\n4. Docs",
|
|
34
|
+
"choices": [
|
|
35
|
+
{ "label": "Rapid", "description": "lite-plan + test-fix", "next": "S_R1" },
|
|
36
|
+
{ "label": "Bugfix", "description": "lite-plan(--bugfix) + test-fix", "next": "S_B1" },
|
|
37
|
+
{ "label": "Hotfix", "description": "lite-plan(--hotfix)", "next": "S_H1" },
|
|
38
|
+
{ "label": "Docs", "description": "lite-plan(--docs)", "next": "S_D1" }
|
|
39
|
+
],
|
|
40
|
+
"default": "S_R1"
|
|
41
|
+
},
|
|
42
|
+
"S_R1": { "type": "step", "name": "Rapid: workflow-lite-plan", "content_ref": "@phases/workflow-lite-plan.md", "next": "S_R2" },
|
|
43
|
+
"S_R2": { "type": "step", "name": "Rapid: workflow-test-fix", "content_ref": "@skills/workflow-test-fix/SKILL.md", "next": null },
|
|
44
|
+
"S_B1": { "type": "step", "name": "Bugfix: workflow-lite-plan", "content_ref": "@phases/workflow-lite-plan.md", "next": "S_B2" },
|
|
45
|
+
"S_B2": { "type": "step", "name": "Bugfix: workflow-test-fix", "content_ref": "@skills/workflow-test-fix/SKILL.md", "next": null },
|
|
46
|
+
"S_H1": { "type": "step", "name": "Hotfix: workflow-lite-plan", "content_ref": "@phases/workflow-lite-plan.md", "next": null },
|
|
47
|
+
"S_D1": { "type": "step", "name": "Docs: workflow-lite-plan", "content_ref": "@phases/workflow-lite-plan.md", "next": null }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Cross-Chain Routing (from ccw-chain/ccw-main)
|
|
53
|
+
|
|
54
|
+
Decision choice with `"next": "->ccw-lightweight"` jumps to another chain's entry node.
|
|
55
|
+
|
|
56
|
+
## Node ID Conventions
|
|
57
|
+
|
|
58
|
+
| Prefix | Type | Example |
|
|
59
|
+
|--------|------|---------|
|
|
60
|
+
| `S{n}` | Sequential step | S1, S2, S3 |
|
|
61
|
+
| `S_{prefix}{n}` | Flow-scoped step | S_R1, S_B1, S_CP2 |
|
|
62
|
+
| `D{n}` | Decision | D1, D2 |
|
|
63
|
+
| `DEL{n}` | Delegate | DEL1 |
|
|
@@ -377,6 +377,7 @@ See phase files for detailed update code.
|
|
|
377
377
|
- Initialize TodoWrite before any command (Phase 3 added dynamically after Phase 2)
|
|
378
378
|
- Execute Phase 1 immediately with structured description
|
|
379
379
|
- Parse session ID from Phase 1 output, store in memory
|
|
380
|
+
- **Session Integrity**: If reusing existing session, verify `sessionIntegrity` from Step 1.2.5; log warnings for incomplete brainstorm artifacts
|
|
380
381
|
- Pass session ID and structured description to Phase 2 command
|
|
381
382
|
- Parse context path from Phase 2 output, store in memory
|
|
382
383
|
- **Extract conflictRisk from context-package.json**: Determine Phase 3 execution
|
|
@@ -40,11 +40,28 @@ CONTEXT: Existing user database schema, REST API endpoints
|
|
|
40
40
|
|
|
41
41
|
**Note**: Session directory contains `workflow-session.json` (metadata). Do NOT look for `manifest.json` here - it only exists in `.workflow/archives/` for archived sessions.
|
|
42
42
|
|
|
43
|
+
### Step 1.2.5: Session Integrity Check
|
|
44
|
+
|
|
45
|
+
For reused sessions (not newly created), validate key artifact completeness:
|
|
46
|
+
|
|
47
|
+
1. **Baseline**: `workflow-session.json` exists and is valid JSON; `.process/` and `.task/` directories exist (create if missing)
|
|
48
|
+
2. **Brainstorm inheritance**: If `.brainstorming/` directory exists, check:
|
|
49
|
+
- `guidance-specification.md` exists → missing = WARN brainstorm Phase 2 incomplete
|
|
50
|
+
- `*/analysis.md` count → 0 = WARN brainstorm Phase 3 incomplete
|
|
51
|
+
- `feature-specs/` or `feature-index.json` → missing = WARN brainstorm Phase 4 (synthesis) incomplete
|
|
52
|
+
3. **Existing notes detection**: Store `existingNotes = file_exists(planning-notes.md)`
|
|
53
|
+
|
|
54
|
+
Store results in `sessionIntegrity` variable for downstream phases. Warnings are logged but **do not block** execution.
|
|
55
|
+
|
|
43
56
|
**TodoWrite**: Mark phase 1 completed, phase 2 in_progress
|
|
44
57
|
|
|
45
|
-
### Step 1.3: Initialize Planning Notes
|
|
58
|
+
### Step 1.3: Initialize Planning Notes (Conditional)
|
|
59
|
+
|
|
60
|
+
After Phase 1, initialize planning-notes.md with user intent.
|
|
46
61
|
|
|
47
|
-
|
|
62
|
+
**Conditional logic**:
|
|
63
|
+
- If `existingNotes = true`: Only append `## User Intent (Phase 1)` section when missing from the file; do NOT overwrite existing content
|
|
64
|
+
- If `existingNotes = false`: Create new file using template below
|
|
48
65
|
|
|
49
66
|
```javascript
|
|
50
67
|
// Create planning notes document with N+1 context support
|
|
@@ -33,10 +33,10 @@ if (file_exists(contextPackagePath)) {
|
|
|
33
33
|
console.log("Valid context-package found for session:", sessionId);
|
|
34
34
|
console.log("Stats:", existing.statistics);
|
|
35
35
|
console.log("Conflict Risk:", existing.conflict_detection.risk_level);
|
|
36
|
-
// Skip
|
|
36
|
+
// Skip Steps 2.2-2.4, but STILL execute Step 2.5 (planning-notes update)
|
|
37
37
|
contextPath = contextPackagePath;
|
|
38
38
|
conflictRisk = existing.conflict_detection.risk_level;
|
|
39
|
-
|
|
39
|
+
// → Jump to Step 2.5 (do NOT return before updating planning-notes)
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
```
|
|
@@ -212,7 +212,15 @@ If prioritized_context is incomplete, fall back to exploration_results:
|
|
|
212
212
|
- Reference aggregated_insights.all_patterns for implementation approach
|
|
213
213
|
- Use aggregated_insights.all_integration_points for precise modification locations
|
|
214
214
|
|
|
215
|
-
##
|
|
215
|
+
## BRAINSTORM ARTIFACT VALIDATION (before feature spec loading)
|
|
216
|
+
If .brainstorming/ directory exists in session, verify completeness:
|
|
217
|
+
- guidance-specification.md missing → WARN: brainstorm Phase 2 incomplete, planning proceeds without framework
|
|
218
|
+
- */analysis.md count = 0 → WARN: brainstorm Phase 3 incomplete, no role analyses available
|
|
219
|
+
- feature-specs/ AND feature-index.json both missing → WARN: brainstorm Phase 4 incomplete, skip feature specs
|
|
220
|
+
|
|
221
|
+
Log warnings to console. Populate agent prompt FEATURE SPECIFICATIONS section only when artifacts actually exist.
|
|
222
|
+
|
|
223
|
+
## FEATURE SPECIFICATIONS (conditional — only when validated above)
|
|
216
224
|
If context-package has brainstorm_artifacts.feature_index_path:
|
|
217
225
|
Feature Index: [from context-package]
|
|
218
226
|
Feature Spec Dir: [from context-package]
|