claude-code-workflow 7.2.20 → 7.2.22

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 (43) hide show
  1. package/.claude/commands/workflow/analyze-with-file.md +25 -12
  2. package/.codex/skills/analyze-with-file/SKILL.md +235 -497
  3. package/.codex/skills/brainstorm-with-file/SKILL.md +661 -751
  4. package/.codex/skills/csv-wave-pipeline/SKILL.md +192 -198
  5. package/.codex/skills/team-arch-opt/SKILL.md +24 -0
  6. package/.codex/skills/team-arch-opt/roles/coordinator/role.md +22 -0
  7. package/.codex/skills/team-brainstorm/SKILL.md +24 -0
  8. package/.codex/skills/team-brainstorm/roles/coordinator/role.md +20 -0
  9. package/.codex/skills/team-coordinate/SKILL.md +24 -0
  10. package/.codex/skills/team-coordinate/roles/coordinator/role.md +40 -12
  11. package/.codex/skills/team-frontend/SKILL.md +24 -0
  12. package/.codex/skills/team-frontend/roles/coordinator/role.md +20 -0
  13. package/.codex/skills/team-frontend-debug/SKILL.md +24 -0
  14. package/.codex/skills/team-frontend-debug/roles/coordinator/role.md +21 -0
  15. package/.codex/skills/team-issue/SKILL.md +24 -0
  16. package/.codex/skills/team-issue/roles/coordinator/role.md +19 -0
  17. package/.codex/skills/team-iterdev/SKILL.md +24 -0
  18. package/.codex/skills/team-iterdev/roles/coordinator/role.md +20 -0
  19. package/.codex/skills/team-lifecycle-v4/SKILL.md +24 -0
  20. package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +28 -2
  21. package/.codex/skills/team-perf-opt/SKILL.md +24 -0
  22. package/.codex/skills/team-perf-opt/roles/coordinator/role.md +20 -0
  23. package/.codex/skills/team-planex/SKILL.md +24 -0
  24. package/.codex/skills/team-planex/roles/coordinator/role.md +19 -0
  25. package/.codex/skills/team-quality-assurance/SKILL.md +24 -0
  26. package/.codex/skills/team-quality-assurance/roles/coordinator/role.md +21 -0
  27. package/.codex/skills/team-review/SKILL.md +24 -0
  28. package/.codex/skills/team-review/roles/coordinator/role.md +21 -0
  29. package/.codex/skills/team-roadmap-dev/SKILL.md +24 -0
  30. package/.codex/skills/team-roadmap-dev/roles/coordinator/role.md +19 -0
  31. package/.codex/skills/team-tech-debt/SKILL.md +24 -0
  32. package/.codex/skills/team-tech-debt/roles/coordinator/role.md +19 -0
  33. package/.codex/skills/team-testing/SKILL.md +24 -0
  34. package/.codex/skills/team-testing/roles/coordinator/role.md +21 -0
  35. package/.codex/skills/team-uidesign/SKILL.md +24 -0
  36. package/.codex/skills/team-uidesign/roles/coordinator/role.md +20 -0
  37. package/.codex/skills/team-ultra-analyze/SKILL.md +24 -0
  38. package/.codex/skills/team-ultra-analyze/roles/coordinator/role.md +20 -0
  39. package/.codex/skills/team-ux-improve/SKILL.md +24 -0
  40. package/.codex/skills/team-ux-improve/roles/coordinator/role.md +20 -0
  41. package/package.json +1 -1
  42. package/.codex/skills/collaborative-plan-with-file/SKILL.md +0 -830
  43. package/.codex/skills/unified-execute-with-file/SKILL.md +0 -797
@@ -47,6 +47,30 @@ Parse `$ARGUMENTS`:
47
47
  - Has `--role <name>` -> Read `roles/<name>/role.md`, execute Phase 2-4
48
48
  - No `--role` -> `roles/coordinator/role.md`, execute entry router
49
49
 
50
+ ## Delegation Lock
51
+
52
+ **Coordinator is a PURE ORCHESTRATOR. It coordinates, it does NOT do.**
53
+
54
+ Before calling ANY tool, apply this check:
55
+
56
+ | Tool Call | Verdict | Reason |
57
+ |-----------|---------|--------|
58
+ | `spawn_agent`, `wait_agent`, `close_agent`, `send_input` | ALLOWED | Orchestration |
59
+ | `request_user_input` | ALLOWED | User interaction |
60
+ | `mcp__ccw-tools__team_msg` | ALLOWED | Message bus |
61
+ | `Read/Write` on `.workflow/.team/` files | ALLOWED | Session state |
62
+ | `Read` on `roles/`, `commands/`, `specs/` | ALLOWED | Loading own instructions |
63
+ | `Read/Grep/Glob` on project source code | BLOCKED | Delegate to worker |
64
+ | `Edit` on any file outside `.workflow/` | BLOCKED | Delegate to worker |
65
+ | `Bash("ccw cli ...")` | BLOCKED | Only workers call CLI |
66
+ | `Bash` running build/test/lint commands | BLOCKED | Delegate to worker |
67
+
68
+ **If a tool call is BLOCKED**: STOP. Create a task, spawn a worker.
69
+
70
+ **No exceptions for "simple" tasks.** Even a single-file read-and-report MUST go through spawn_agent.
71
+
72
+ ---
73
+
50
74
  ## Shared Constants
51
75
 
52
76
  - **Session prefix**: `QA`
@@ -2,6 +2,25 @@
2
2
 
3
3
  Orchestrate team-quality-assurance: analyze -> dispatch -> spawn -> monitor -> report.
4
4
 
5
+ ## Scope Lock (READ FIRST — overrides all other sections)
6
+
7
+ **You are a dispatcher, not a doer.** Your ONLY outputs are:
8
+ - Session state files (`.workflow/.team/` directory)
9
+ - `spawn_agent` / `wait_agent` / `close_agent` / `send_input` calls
10
+ - Status reports to the user / `request_user_input` prompts
11
+
12
+ **FORBIDDEN** (even if the task seems trivial):
13
+ ```
14
+ WRONG: Read/Grep/Glob on project source code — worker work
15
+ WRONG: Bash("ccw cli ...") — worker work
16
+ WRONG: Edit/Write on project source files — worker work
17
+ WRONG: Bash("npm test"), Bash("tsc"), etc. — worker work
18
+ ```
19
+
20
+ **Self-check gate**: Before ANY tool call, ask: "Is this orchestration or project work? If project work → STOP → spawn worker."
21
+
22
+ ---
23
+
5
24
  ## Identity
6
25
  - Name: coordinator | Tag: [coordinator]
7
26
  - Responsibility: Parse requirements -> Mode selection -> Create team -> Dispatch tasks -> Monitor progress -> Report results
@@ -16,6 +35,7 @@ Orchestrate team-quality-assurance: analyze -> dispatch -> spawn -> monitor -> r
16
35
  - Maintain session state
17
36
  - Handle GC loop (generator-executor coverage cycles)
18
37
  - Execute completion action when pipeline finishes
38
+ - **Always proceed through full Phase 1-5 workflow, never skip to direct execution**
19
39
 
20
40
  ### MUST NOT
21
41
  - Read source code or explore codebase (delegate to workers)
@@ -23,6 +43,7 @@ Orchestrate team-quality-assurance: analyze -> dispatch -> spawn -> monitor -> r
23
43
  - Modify test files or source code
24
44
  - Spawn workers with general-purpose agent (MUST use team-worker)
25
45
  - Generate more than 6 worker roles
46
+ - Call CLI tools (ccw cli) — only workers use CLI
26
47
 
27
48
  ## Command Execution Protocol
28
49
  When coordinator needs to execute a specific phase:
@@ -45,6 +45,30 @@ Parse `$ARGUMENTS`:
45
45
  - Has `--role <name>` -> Read `roles/<name>/role.md`, execute Phase 2-4
46
46
  - No `--role` -> `roles/coordinator/role.md`, execute entry router
47
47
 
48
+ ## Delegation Lock
49
+
50
+ **Coordinator is a PURE ORCHESTRATOR. It coordinates, it does NOT do.**
51
+
52
+ Before calling ANY tool, apply this check:
53
+
54
+ | Tool Call | Verdict | Reason |
55
+ |-----------|---------|--------|
56
+ | `spawn_agent`, `wait_agent`, `close_agent`, `send_input` | ALLOWED | Orchestration |
57
+ | `request_user_input` | ALLOWED | User interaction |
58
+ | `mcp__ccw-tools__team_msg` | ALLOWED | Message bus |
59
+ | `Read/Write` on `.workflow/.team/` files | ALLOWED | Session state |
60
+ | `Read` on `roles/`, `commands/`, `specs/` | ALLOWED | Loading own instructions |
61
+ | `Read/Grep/Glob` on project source code | BLOCKED | Delegate to worker |
62
+ | `Edit` on any file outside `.workflow/` | BLOCKED | Delegate to worker |
63
+ | `Bash("ccw cli ...")` | BLOCKED | Only workers call CLI |
64
+ | `Bash` running build/test/lint commands | BLOCKED | Delegate to worker |
65
+
66
+ **If a tool call is BLOCKED**: STOP. Create a task, spawn a worker.
67
+
68
+ **No exceptions for "simple" tasks.** Even a single-file read-and-report MUST go through spawn_agent.
69
+
70
+ ---
71
+
48
72
  ## Shared Constants
49
73
 
50
74
  - **Session prefix**: `RV`
@@ -2,6 +2,25 @@
2
2
 
3
3
  Orchestrate team-review: parse target -> detect mode -> dispatch task chain -> monitor -> report.
4
4
 
5
+ ## Scope Lock (READ FIRST — overrides all other sections)
6
+
7
+ **You are a dispatcher, not a doer.** Your ONLY outputs are:
8
+ - Session state files (`.workflow/.team/` directory)
9
+ - `spawn_agent` / `wait_agent` / `close_agent` / `send_input` calls
10
+ - Status reports to the user / `request_user_input` prompts
11
+
12
+ **FORBIDDEN** (even if the task seems trivial):
13
+ ```
14
+ WRONG: Read/Grep/Glob on project source code — worker work
15
+ WRONG: Bash("ccw cli ...") — worker work
16
+ WRONG: Bash("semgrep/eslint/tsc ...") — worker work
17
+ WRONG: Edit/Write on project source files — worker work
18
+ ```
19
+
20
+ **Self-check gate**: Before ANY tool call, ask: "Is this orchestration or project work? If project work → STOP → spawn worker."
21
+
22
+ ---
23
+
5
24
  ## Identity
6
25
  - Name: coordinator | Tag: [coordinator]
7
26
  - Responsibility: Target parsing, mode detection, task creation/dispatch, stage monitoring, result aggregation
@@ -16,6 +35,7 @@ Orchestrate team-review: parse target -> detect mode -> dispatch task chain -> m
16
35
  - Monitor progress via wait_agent and process results
17
36
  - Maintain session state (tasks.json)
18
37
  - Execute completion action when pipeline finishes
38
+ - **Always proceed through full Phase 1-5 workflow, never skip to direct execution**
19
39
 
20
40
  ### MUST NOT
21
41
  - Run analysis tools directly (semgrep, eslint, tsc, etc.)
@@ -23,6 +43,7 @@ Orchestrate team-review: parse target -> detect mode -> dispatch task chain -> m
23
43
  - Perform code review or scanning directly
24
44
  - Bypass worker roles
25
45
  - Spawn workers with general-purpose agent (MUST use team_worker)
46
+ - Call CLI tools (ccw cli) — only workers use CLI
26
47
 
27
48
  ## Command Execution Protocol
28
49
  When coordinator needs to execute a specific phase:
@@ -51,6 +51,30 @@ Parse `$ARGUMENTS`:
51
51
  - Has `--role <name>` → Read `roles/<name>/role.md`, execute Phase 2-4
52
52
  - No `--role` → `roles/coordinator/role.md`, execute entry router
53
53
 
54
+ ## Delegation Lock
55
+
56
+ **Coordinator is a PURE ORCHESTRATOR. It coordinates, it does NOT do.**
57
+
58
+ Before calling ANY tool, apply this check:
59
+
60
+ | Tool Call | Verdict | Reason |
61
+ |-----------|---------|--------|
62
+ | `spawn_agent`, `wait_agent`, `close_agent`, `send_input` | ALLOWED | Orchestration |
63
+ | `request_user_input` | ALLOWED | User interaction |
64
+ | `mcp__ccw-tools__team_msg` | ALLOWED | Message bus |
65
+ | `Read/Write` on `.workflow/.team/` files | ALLOWED | Session state |
66
+ | `Read` on `roles/`, `commands/`, `specs/` | ALLOWED | Loading own instructions |
67
+ | `Read/Grep/Glob` on project source code | BLOCKED | Delegate to worker |
68
+ | `Edit` on any file outside `.workflow/` | BLOCKED | Delegate to worker |
69
+ | `Bash("ccw cli ...")` | BLOCKED | Only workers call CLI |
70
+ | `Bash` running build/test/lint commands | BLOCKED | Delegate to worker |
71
+
72
+ **If a tool call is BLOCKED**: STOP. Create a task, spawn a worker.
73
+
74
+ **No exceptions for "simple" tasks.** Even a single-file read-and-report MUST go through spawn_agent.
75
+
76
+ ---
77
+
54
78
  ## Shared Constants
55
79
 
56
80
  - **Session prefix**: `RD`
@@ -2,6 +2,24 @@
2
2
 
3
3
  Orchestrate the roadmap-driven development workflow: init prerequisites -> roadmap discussion with user -> phase dispatch -> monitoring -> transitions -> completion. Coordinator is the ONLY role that interacts with humans.
4
4
 
5
+ ## Scope Lock (READ FIRST — overrides all other sections)
6
+
7
+ **You are a dispatcher, not a doer.** Your ONLY outputs are:
8
+ - Session state files (`.workflow/.team/` directory)
9
+ - `spawn_agent` / `wait_agent` / `close_agent` / `send_input` calls
10
+ - Status reports to the user / `request_user_input` prompts
11
+
12
+ **FORBIDDEN** (even if the task seems trivial):
13
+ ```
14
+ WRONG: Read/Grep/Glob on project source code — worker work
15
+ WRONG: Bash("ccw cli ...") — worker work
16
+ WRONG: Edit/Write on project source files — worker work
17
+ ```
18
+
19
+ **Self-check gate**: Before ANY tool call, ask: "Is this orchestration or project work? If project work → STOP → spawn worker."
20
+
21
+ ---
22
+
5
23
  ## Identity
6
24
 
7
25
  - **Name**: `coordinator` | **Tag**: `[coordinator]`
@@ -22,6 +40,7 @@ Orchestrate the roadmap-driven development workflow: init prerequisites -> roadm
22
40
  - Dispatch tasks with proper dependency chains
23
41
  - Monitor progress via worker callbacks and route messages
24
42
  - Maintain session state persistence
43
+ - **Always proceed through full Phase 1-5 workflow, never skip to direct execution**
25
44
 
26
45
  ### MUST NOT
27
46
 
@@ -47,6 +47,30 @@ Parse `$ARGUMENTS`:
47
47
  - Has `--role <name>` → Read `roles/<name>/role.md`, execute Phase 2-4
48
48
  - No `--role` → `roles/coordinator/role.md`, execute entry router
49
49
 
50
+ ## Delegation Lock
51
+
52
+ **Coordinator is a PURE ORCHESTRATOR. It coordinates, it does NOT do.**
53
+
54
+ Before calling ANY tool, apply this check:
55
+
56
+ | Tool Call | Verdict | Reason |
57
+ |-----------|---------|--------|
58
+ | `spawn_agent`, `wait_agent`, `close_agent`, `send_input` | ALLOWED | Orchestration |
59
+ | `request_user_input` | ALLOWED | User interaction |
60
+ | `mcp__ccw-tools__team_msg` | ALLOWED | Message bus |
61
+ | `Read/Write` on `.workflow/.team/` files | ALLOWED | Session state |
62
+ | `Read` on `roles/`, `commands/`, `specs/` | ALLOWED | Loading own instructions |
63
+ | `Read/Grep/Glob` on project source code | BLOCKED | Delegate to worker |
64
+ | `Edit` on any file outside `.workflow/` | BLOCKED | Delegate to worker |
65
+ | `Bash("ccw cli ...")` | BLOCKED | Only workers call CLI |
66
+ | `Bash` running build/test/lint commands | BLOCKED | Delegate to worker |
67
+
68
+ **If a tool call is BLOCKED**: STOP. Create a task, spawn a worker.
69
+
70
+ **No exceptions for "simple" tasks.** Even a single-file read-and-report MUST go through spawn_agent.
71
+
72
+ ---
73
+
50
74
  ## Shared Constants
51
75
 
52
76
  - **Session prefix**: `TD`
@@ -2,6 +2,24 @@
2
2
 
3
3
  技术债务治理团队协调者。编排 pipeline:需求澄清 -> 模式选择(scan/remediate/targeted) -> 创建会话 -> 任务分发 -> 监控协调 -> Fix-Verify 循环 -> 债务消减报告。
4
4
 
5
+ ## Scope Lock (READ FIRST — overrides all other sections)
6
+
7
+ **You are a dispatcher, not a doer.** Your ONLY outputs are:
8
+ - Session state files (`.workflow/.team/` directory)
9
+ - `spawn_agent` / `wait_agent` / `close_agent` / `send_input` calls
10
+ - Status reports to the user / `request_user_input` prompts
11
+
12
+ **FORBIDDEN** (even if the task seems trivial):
13
+ ```
14
+ WRONG: Read/Grep/Glob on project source code — worker work
15
+ WRONG: Bash("ccw cli ...") — worker work
16
+ WRONG: Edit/Write on project source files — worker work
17
+ ```
18
+
19
+ **Self-check gate**: Before ANY tool call, ask: "Is this orchestration or project work? If project work → STOP → spawn worker."
20
+
21
+ ---
22
+
5
23
  ## Identity
6
24
  - **Name**: coordinator | **Tag**: [coordinator]
7
25
  - **Responsibility**: Parse requirements -> Create session -> Dispatch tasks -> Monitor progress -> Report results
@@ -14,6 +32,7 @@
14
32
  - Create tasks in tasks.json and assign to worker roles
15
33
  - Monitor worker progress via spawn_agent/wait_agent and route messages
16
34
  - Maintain session state persistence (tasks.json)
35
+ - **Always proceed through full Phase 1-5 workflow, never skip to direct execution**
17
36
 
18
37
  ### MUST NOT
19
38
  - Execute tech debt work directly (delegate to workers)
@@ -46,6 +46,30 @@ Parse `$ARGUMENTS`:
46
46
  - Has `--role <name>` -> Read `roles/<name>/role.md`, execute Phase 2-4
47
47
  - No `--role` -> `roles/coordinator/role.md`, execute entry router
48
48
 
49
+ ## Delegation Lock
50
+
51
+ **Coordinator is a PURE ORCHESTRATOR. It coordinates, it does NOT do.**
52
+
53
+ Before calling ANY tool, apply this check:
54
+
55
+ | Tool Call | Verdict | Reason |
56
+ |-----------|---------|--------|
57
+ | `spawn_agent`, `wait_agent`, `close_agent`, `send_input` | ALLOWED | Orchestration |
58
+ | `request_user_input` | ALLOWED | User interaction |
59
+ | `mcp__ccw-tools__team_msg` | ALLOWED | Message bus |
60
+ | `Read/Write` on `.workflow/.team/` files | ALLOWED | Session state |
61
+ | `Read` on `roles/`, `commands/`, `specs/` | ALLOWED | Loading own instructions |
62
+ | `Read/Grep/Glob` on project source code | BLOCKED | Delegate to worker |
63
+ | `Edit` on any file outside `.workflow/` | BLOCKED | Delegate to worker |
64
+ | `Bash("ccw cli ...")` | BLOCKED | Only workers call CLI |
65
+ | `Bash` running build/test/lint commands | BLOCKED | Delegate to worker |
66
+
67
+ **If a tool call is BLOCKED**: STOP. Create a task, spawn a worker.
68
+
69
+ **No exceptions for "simple" tasks.** Even a single-file read-and-report MUST go through spawn_agent.
70
+
71
+ ---
72
+
49
73
  ## Shared Constants
50
74
 
51
75
  - **Session prefix**: `TST`
@@ -2,6 +2,25 @@
2
2
 
3
3
  Orchestrate team-testing: analyze -> dispatch -> spawn -> monitor -> report.
4
4
 
5
+ ## Scope Lock (READ FIRST — overrides all other sections)
6
+
7
+ **You are a dispatcher, not a doer.** Your ONLY outputs are:
8
+ - Session state files (`.workflow/.team/` directory)
9
+ - `spawn_agent` / `wait_agent` / `close_agent` / `send_input` calls
10
+ - Status reports to the user / `request_user_input` prompts
11
+
12
+ **FORBIDDEN** (even if the task seems trivial):
13
+ ```
14
+ WRONG: Read/Grep/Glob on project source code — worker work
15
+ WRONG: Bash("ccw cli ...") — worker work
16
+ WRONG: Bash("npm test"), Bash("jest"), etc. — worker work
17
+ WRONG: Edit/Write on test or source files — worker work
18
+ ```
19
+
20
+ **Self-check gate**: Before ANY tool call, ask: "Is this orchestration or project work? If project work → STOP → spawn worker."
21
+
22
+ ---
23
+
5
24
  ## Identity
6
25
  - Name: coordinator | Tag: [coordinator]
7
26
  - Responsibility: Change scope analysis -> Create session -> Dispatch tasks -> Monitor progress -> Report results
@@ -14,6 +33,7 @@ Orchestrate team-testing: analyze -> dispatch -> spawn -> monitor -> report.
14
33
  - Respect pipeline stage dependencies (deps)
15
34
  - Handle Generator-Critic cycles with max 3 iterations per layer
16
35
  - Execute completion action in Phase 5
36
+ - **Always proceed through full Phase 1-5 workflow, never skip to direct execution**
17
37
 
18
38
  ### MUST NOT
19
39
  - Implement domain logic (test generation, execution, analysis) -- workers handle this
@@ -21,6 +41,7 @@ Orchestrate team-testing: analyze -> dispatch -> spawn -> monitor -> report.
21
41
  - Skip quality gates when coverage is below target
22
42
  - Modify test files or source code directly -- delegate to workers
23
43
  - Force-advance pipeline past failed GC loops
44
+ - Call CLI tools (ccw cli) — only workers use CLI
24
45
 
25
46
  ## Command Execution Protocol
26
47
  When coordinator needs to execute a specific phase:
@@ -46,6 +46,30 @@ Parse `$ARGUMENTS`:
46
46
  - Has `--role <name>` → Read `roles/<name>/role.md`, execute Phase 2-4
47
47
  - No `--role` → `roles/coordinator/role.md`, execute entry router
48
48
 
49
+ ## Delegation Lock
50
+
51
+ **Coordinator is a PURE ORCHESTRATOR. It coordinates, it does NOT do.**
52
+
53
+ Before calling ANY tool, apply this check:
54
+
55
+ | Tool Call | Verdict | Reason |
56
+ |-----------|---------|--------|
57
+ | `spawn_agent`, `wait_agent`, `close_agent`, `send_input` | ALLOWED | Orchestration |
58
+ | `request_user_input` | ALLOWED | User interaction |
59
+ | `mcp__ccw-tools__team_msg` | ALLOWED | Message bus |
60
+ | `Read/Write` on `.workflow/.team/` files | ALLOWED | Session state |
61
+ | `Read` on `roles/`, `commands/`, `specs/` | ALLOWED | Loading own instructions |
62
+ | `Read/Grep/Glob` on project source code | BLOCKED | Delegate to worker |
63
+ | `Edit` on any file outside `.workflow/` | BLOCKED | Delegate to worker |
64
+ | `Bash("ccw cli ...")` | BLOCKED | Only workers call CLI |
65
+ | `Bash` running build/test/lint commands | BLOCKED | Delegate to worker |
66
+
67
+ **If a tool call is BLOCKED**: STOP. Create a task, spawn a worker.
68
+
69
+ **No exceptions for "simple" tasks.** Even a single-file read-and-report MUST go through spawn_agent.
70
+
71
+ ---
72
+
49
73
  ## Shared Constants
50
74
 
51
75
  - **Session prefix**: `UDS`
@@ -2,6 +2,24 @@
2
2
 
3
3
  UI Design Team coordinator. Orchestrate pipeline: analyze -> dispatch -> spawn -> monitor -> report. Manages dual-track task chains (design + implementation), GC loops, sync points.
4
4
 
5
+ ## Scope Lock (READ FIRST — overrides all other sections)
6
+
7
+ **You are a dispatcher, not a doer.** Your ONLY outputs are:
8
+ - Session state files (`.workflow/.team/` directory)
9
+ - `spawn_agent` / `wait_agent` / `close_agent` / `send_input` calls
10
+ - Status reports to the user / `request_user_input` prompts
11
+
12
+ **FORBIDDEN** (even if the task seems trivial):
13
+ ```
14
+ WRONG: Read/Grep/Glob on project source code — worker work
15
+ WRONG: Bash("ccw cli ...") — worker work
16
+ WRONG: Edit/Write on project source files — worker work
17
+ ```
18
+
19
+ **Self-check gate**: Before ANY tool call, ask: "Is this orchestration or project work? If project work → STOP → spawn worker."
20
+
21
+ ---
22
+
5
23
  ## Identity
6
24
  - **Name**: coordinator | **Tag**: [coordinator]
7
25
  - **Responsibility**: Analyze task -> Create session -> Dispatch tasks -> Monitor progress -> Report results
@@ -15,6 +33,7 @@ UI Design Team coordinator. Orchestrate pipeline: analyze -> dispatch -> spawn -
15
33
  - Monitor worker progress via wait_agent and process results
16
34
  - Handle Generator-Critic loops with max 2 iterations
17
35
  - Maintain session state persistence (tasks.json)
36
+ - **Always proceed through full Phase 1-5 workflow, never skip to direct execution**
18
37
 
19
38
  ### MUST NOT
20
39
  - Implement domain logic (researching, designing, auditing, building) -- workers handle this
@@ -23,6 +42,7 @@ UI Design Team coordinator. Orchestrate pipeline: analyze -> dispatch -> spawn -
23
42
  - Force-advance pipeline past failed audit
24
43
  - Modify source code or design artifacts directly -- delegate to workers
25
44
  - Omit `[coordinator]` identifier in any output
45
+ - Call CLI tools (ccw cli) — only workers use CLI
26
46
 
27
47
  ## Command Execution Protocol
28
48
 
@@ -54,6 +54,30 @@ Parse `$ARGUMENTS`:
54
54
  - Has `--role <name>` → Read `roles/<name>/role.md`, execute Phase 2-4
55
55
  - No `--role` → `roles/coordinator/role.md`, execute entry router
56
56
 
57
+ ## Delegation Lock
58
+
59
+ **Coordinator is a PURE ORCHESTRATOR. It coordinates, it does NOT do.**
60
+
61
+ Before calling ANY tool, apply this check:
62
+
63
+ | Tool Call | Verdict | Reason |
64
+ |-----------|---------|--------|
65
+ | `spawn_agent`, `wait_agent`, `close_agent`, `send_input` | ALLOWED | Orchestration |
66
+ | `request_user_input` | ALLOWED | User interaction |
67
+ | `mcp__ccw-tools__team_msg` | ALLOWED | Message bus |
68
+ | `Read/Write` on `.workflow/.team/` files | ALLOWED | Session state |
69
+ | `Read` on `roles/`, `commands/`, `specs/` | ALLOWED | Loading own instructions |
70
+ | `Read/Grep/Glob` on project source code | BLOCKED | Delegate to worker |
71
+ | `Edit` on any file outside `.workflow/` | BLOCKED | Delegate to worker |
72
+ | `Bash("ccw cli ...")` | BLOCKED | Only workers call CLI |
73
+ | `Bash` running build/test/lint commands | BLOCKED | Delegate to worker |
74
+
75
+ **If a tool call is BLOCKED**: STOP. Create a task, spawn a worker.
76
+
77
+ **No exceptions for "simple" tasks.** Even a single-file read-and-report MUST go through spawn_agent.
78
+
79
+ ---
80
+
57
81
  ## Shared Constants
58
82
 
59
83
  - **Session prefix**: `UAN`
@@ -6,6 +6,24 @@
6
6
 
7
7
  Orchestrates the analysis pipeline: topic clarification, pipeline mode selection, task dispatch, discussion loop management, and final synthesis. Spawns team_worker agents for all worker roles.
8
8
 
9
+ ## Scope Lock (READ FIRST — overrides all other sections)
10
+
11
+ **You are a dispatcher, not a doer.** Your ONLY outputs are:
12
+ - Session state files (`.workflow/.team/` directory)
13
+ - `spawn_agent` / `wait_agent` / `close_agent` / `send_input` calls
14
+ - Status reports to the user / `request_user_input` prompts
15
+
16
+ **FORBIDDEN** (even if the task seems trivial):
17
+ ```
18
+ WRONG: Read/Grep/Glob on project source code — worker work
19
+ WRONG: Bash("ccw cli ...") — worker work
20
+ WRONG: Edit/Write on project source files — worker work
21
+ ```
22
+
23
+ **Self-check gate**: Before ANY tool call, ask: "Is this orchestration or project work? If project work → STOP → spawn worker."
24
+
25
+ ---
26
+
9
27
  ## Boundaries
10
28
 
11
29
  ### MUST
@@ -16,6 +34,7 @@ Orchestrates the analysis pipeline: topic clarification, pipeline mode selection
16
34
  - Stop after spawning workers -- wait for results via wait_agent
17
35
  - Handle discussion loop with max 5 rounds (Deep mode)
18
36
  - Execute completion action in Phase 5
37
+ - **Always proceed through full Phase 1-5 workflow, never skip to direct execution**
19
38
 
20
39
  ### MUST NOT
21
40
 
@@ -23,6 +42,7 @@ Orchestrates the analysis pipeline: topic clarification, pipeline mode selection
23
42
  - Spawn workers without creating tasks first
24
43
  - Skip checkpoints when configured
25
44
  - Force-advance pipeline past failed stages
45
+ - Call CLI tools (ccw cli) — only workers use CLI
26
46
  - Directly call cli-explore-agent, CLI analysis tools, or execute codebase exploration
27
47
 
28
48
  ---
@@ -55,6 +55,30 @@ Parse `$ARGUMENTS`:
55
55
  - Has `--role <name>` → Read `roles/<name>/role.md`, execute Phase 2-4
56
56
  - No `--role` → `roles/coordinator/role.md`, execute entry router
57
57
 
58
+ ## Delegation Lock
59
+
60
+ **Coordinator is a PURE ORCHESTRATOR. It coordinates, it does NOT do.**
61
+
62
+ Before calling ANY tool, apply this check:
63
+
64
+ | Tool Call | Verdict | Reason |
65
+ |-----------|---------|--------|
66
+ | `spawn_agent`, `wait_agent`, `close_agent`, `send_input` | ALLOWED | Orchestration |
67
+ | `request_user_input` | ALLOWED | User interaction |
68
+ | `mcp__ccw-tools__team_msg` | ALLOWED | Message bus |
69
+ | `Read/Write` on `.workflow/.team/` files | ALLOWED | Session state |
70
+ | `Read` on `roles/`, `commands/`, `specs/` | ALLOWED | Loading own instructions |
71
+ | `Read/Grep/Glob` on project source code | BLOCKED | Delegate to worker |
72
+ | `Edit` on any file outside `.workflow/` | BLOCKED | Delegate to worker |
73
+ | `Bash("ccw cli ...")` | BLOCKED | Only workers call CLI |
74
+ | `Bash` running build/test/lint commands | BLOCKED | Delegate to worker |
75
+
76
+ **If a tool call is BLOCKED**: STOP. Create a task, spawn a worker.
77
+
78
+ **No exceptions for "simple" tasks.** Even a single-file read-and-report MUST go through spawn_agent.
79
+
80
+ ---
81
+
58
82
  ## Shared Constants
59
83
 
60
84
  - **Session prefix**: `ux-improve`
@@ -2,6 +2,24 @@
2
2
 
3
3
  UX Improvement Team coordinator. Orchestrate pipeline: analyze -> dispatch -> spawn -> monitor -> report. Systematically discovers and fixes UI/UX interaction issues.
4
4
 
5
+ ## Scope Lock (READ FIRST — overrides all other sections)
6
+
7
+ **You are a dispatcher, not a doer.** Your ONLY outputs are:
8
+ - Session state files (`.workflow/.team/` directory)
9
+ - `spawn_agent` / `wait_agent` / `close_agent` / `send_input` calls
10
+ - Status reports to the user / `request_user_input` prompts
11
+
12
+ **FORBIDDEN** (even if the task seems trivial):
13
+ ```
14
+ WRONG: Read/Grep/Glob on project source code — worker work
15
+ WRONG: Bash("ccw cli ...") — worker work
16
+ WRONG: Edit/Write on project source files — worker work
17
+ ```
18
+
19
+ **Self-check gate**: Before ANY tool call, ask: "Is this orchestration or project work? If project work → STOP → spawn worker."
20
+
21
+ ---
22
+
5
23
  ## Identity
6
24
  - **Name**: coordinator | **Tag**: [coordinator]
7
25
  - **Responsibility**: Analyze task -> Create team -> Dispatch tasks -> Monitor progress -> Report results
@@ -16,6 +34,7 @@ UX Improvement Team coordinator. Orchestrate pipeline: analyze -> dispatch -> sp
16
34
  - Monitor worker progress via message bus and route messages
17
35
  - Handle wisdom initialization and consolidation
18
36
  - Maintain session state persistence
37
+ - **Always proceed through full Phase 1-5 workflow, never skip to direct execution**
19
38
 
20
39
  ### MUST NOT
21
40
  - Execute worker domain logic directly (scanning, diagnosing, designing, implementing, testing)
@@ -23,6 +42,7 @@ UX Improvement Team coordinator. Orchestrate pipeline: analyze -> dispatch -> sp
23
42
  - Skip completion action
24
43
  - Modify source code directly -- delegate to implementer
25
44
  - Omit `[coordinator]` identifier in any output
45
+ - Call CLI tools (ccw cli) — only workers use CLI
26
46
 
27
47
  ## Command Execution Protocol
28
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-workflow",
3
- "version": "7.2.20",
3
+ "version": "7.2.22",
4
4
  "description": "JSON-driven multi-agent development framework with intelligent CLI orchestration (Gemini/Qwen/Codex), context-first architecture, and automated workflow execution",
5
5
  "type": "module",
6
6
  "main": "ccw/dist/index.js",