claude-code-workflow 7.2.23 → 7.2.25

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 (212) hide show
  1. package/.ccw/workflows/cli-tools-usage.md +123 -521
  2. package/.claude/skills/brainstorm/SKILL.md +408 -408
  3. package/.claude/skills/review-cycle/SKILL.md +132 -132
  4. package/.claude/skills/spec-generator/SKILL.md +1 -1
  5. package/.claude/skills/team-designer/phases/02-scaffold-generation.md +1 -1
  6. package/.claude/skills/team-lifecycle-v4/SKILL.md +1 -1
  7. package/.claude/skills/team-review/SKILL.md +1 -1
  8. package/.claude/skills/team-ultra-analyze/SKILL.md +1 -1
  9. package/.claude/skills/workflow-multi-cli-plan/SKILL.md +1 -1
  10. package/.claude/skills/workflow-plan/SKILL.md +1 -1
  11. package/.claude/skills/workflow-test-fix/SKILL.md +1 -1
  12. package/.codex/skills/analyze-with-file/SKILL.md +966 -966
  13. package/.codex/skills/issue-discover/SKILL.md +361 -361
  14. package/.codex/skills/review-cycle/SKILL.md +1 -1
  15. package/.codex/skills/roadmap-with-file/SKILL.md +901 -901
  16. package/.codex/skills/spec-generator/SKILL.md +425 -425
  17. package/.codex/skills/spec-setup/SKILL.md +669 -669
  18. package/.codex/skills/team-arch-opt/SKILL.md +242 -175
  19. package/.codex/skills/team-arch-opt/roles/analyzer/role.md +78 -78
  20. package/.codex/skills/team-arch-opt/roles/coordinator/commands/analyze.md +57 -57
  21. package/.codex/skills/team-arch-opt/roles/coordinator/commands/monitor.md +246 -204
  22. package/.codex/skills/team-arch-opt/roles/coordinator/role.md +196 -184
  23. package/.codex/skills/team-arch-opt/roles/designer/role.md +115 -115
  24. package/.codex/skills/team-arch-opt/roles/refactorer/role.md +102 -102
  25. package/.codex/skills/team-arch-opt/roles/reviewer/role.md +111 -111
  26. package/.codex/skills/team-arch-opt/roles/validator/role.md +115 -115
  27. package/.codex/skills/team-arch-opt/specs/pipelines.md +102 -102
  28. package/.codex/skills/team-brainstorm/SKILL.md +72 -4
  29. package/.codex/skills/team-brainstorm/roles/challenger/role.md +61 -61
  30. package/.codex/skills/team-brainstorm/roles/coordinator/commands/analyze.md +58 -58
  31. package/.codex/skills/team-brainstorm/roles/coordinator/commands/monitor.md +212 -171
  32. package/.codex/skills/team-brainstorm/roles/coordinator/role.md +172 -160
  33. package/.codex/skills/team-brainstorm/roles/evaluator/role.md +56 -56
  34. package/.codex/skills/team-brainstorm/roles/ideator/role.md +69 -69
  35. package/.codex/skills/team-brainstorm/roles/synthesizer/role.md +57 -57
  36. package/.codex/skills/team-brainstorm/specs/pipelines.md +72 -72
  37. package/.codex/skills/team-coordinate/SKILL.md +71 -3
  38. package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +45 -5
  39. package/.codex/skills/team-coordinate/roles/coordinator/role.md +402 -389
  40. package/.codex/skills/team-coordinate/specs/knowledge-transfer.md +111 -111
  41. package/.codex/skills/team-coordinate/specs/pipelines.md +97 -97
  42. package/.codex/skills/team-coordinate/specs/quality-gates.md +112 -112
  43. package/.codex/skills/team-designer/SKILL.md +153 -153
  44. package/.codex/skills/team-designer/phases/01-requirements-analysis.md +250 -250
  45. package/.codex/skills/team-designer/phases/02-scaffold-generation.md +228 -228
  46. package/.codex/skills/team-designer/phases/03-content-generation.md +330 -330
  47. package/.codex/skills/team-designer/phases/04-validation.md +320 -320
  48. package/.codex/skills/team-executor/SKILL.md +29 -2
  49. package/.codex/skills/team-executor/roles/executor/commands/monitor.md +23 -15
  50. package/.codex/skills/team-frontend/SKILL.md +77 -3
  51. package/.codex/skills/team-frontend/roles/analyst/role.md +92 -92
  52. package/.codex/skills/team-frontend/roles/architect/role.md +86 -86
  53. package/.codex/skills/team-frontend/roles/coordinator/commands/analyze.md +52 -52
  54. package/.codex/skills/team-frontend/roles/coordinator/commands/monitor.md +222 -188
  55. package/.codex/skills/team-frontend/roles/coordinator/role.md +189 -177
  56. package/.codex/skills/team-frontend/roles/developer/role.md +93 -93
  57. package/.codex/skills/team-frontend/roles/qa/role.md +79 -79
  58. package/.codex/skills/team-frontend/specs/pipelines.md +76 -76
  59. package/.codex/skills/team-frontend-debug/SKILL.md +66 -3
  60. package/.codex/skills/team-frontend-debug/roles/analyzer/role.md +208 -208
  61. package/.codex/skills/team-frontend-debug/roles/coordinator/commands/analyze.md +174 -174
  62. package/.codex/skills/team-frontend-debug/roles/coordinator/commands/dispatch.md +198 -198
  63. package/.codex/skills/team-frontend-debug/roles/coordinator/commands/monitor.md +177 -143
  64. package/.codex/skills/team-frontend-debug/roles/coordinator/role.md +164 -152
  65. package/.codex/skills/team-frontend-debug/roles/fixer/role.md +147 -147
  66. package/.codex/skills/team-frontend-debug/roles/reproducer/role.md +147 -147
  67. package/.codex/skills/team-frontend-debug/roles/tester/role.md +231 -231
  68. package/.codex/skills/team-frontend-debug/roles/verifier/role.md +172 -172
  69. package/.codex/skills/team-frontend-debug/specs/debug-tools.md +215 -215
  70. package/.codex/skills/team-frontend-debug/specs/pipelines.md +94 -94
  71. package/.codex/skills/team-issue/SKILL.md +83 -4
  72. package/.codex/skills/team-issue/roles/coordinator/commands/analyze.md +64 -64
  73. package/.codex/skills/team-issue/roles/coordinator/commands/dispatch.md +273 -273
  74. package/.codex/skills/team-issue/roles/coordinator/commands/monitor.md +235 -194
  75. package/.codex/skills/team-issue/roles/coordinator/role.md +206 -194
  76. package/.codex/skills/team-issue/roles/explorer/role.md +94 -94
  77. package/.codex/skills/team-issue/roles/implementer/role.md +87 -87
  78. package/.codex/skills/team-issue/roles/integrator/role.md +84 -84
  79. package/.codex/skills/team-issue/roles/planner/role.md +81 -81
  80. package/.codex/skills/team-issue/roles/reviewer/role.md +86 -86
  81. package/.codex/skills/team-issue/specs/pipelines.md +124 -124
  82. package/.codex/skills/team-lifecycle-v4/MIGRATION-PLAN.md +6 -6
  83. package/.codex/skills/team-lifecycle-v4/SKILL.md +305 -242
  84. package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +1 -1
  85. package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +66 -24
  86. package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +13 -1
  87. package/.codex/skills/team-lifecycle-v4/roles/supervisor/role.md +1 -1
  88. package/.codex/skills/team-lifecycle-v4/templates/architecture.md +254 -254
  89. package/.codex/skills/team-lifecycle-v4/templates/epics.md +196 -196
  90. package/.codex/skills/team-lifecycle-v4/templates/product-brief.md +133 -133
  91. package/.codex/skills/team-lifecycle-v4/templates/requirements.md +224 -224
  92. package/.codex/skills/team-perf-opt/SKILL.md +68 -3
  93. package/.codex/skills/team-perf-opt/roles/benchmarker/role.md +89 -89
  94. package/.codex/skills/team-perf-opt/roles/coordinator/commands/analyze.md +61 -61
  95. package/.codex/skills/team-perf-opt/roles/coordinator/commands/monitor.md +35 -1
  96. package/.codex/skills/team-perf-opt/roles/coordinator/role.md +179 -167
  97. package/.codex/skills/team-perf-opt/roles/optimizer/role.md +97 -97
  98. package/.codex/skills/team-perf-opt/roles/profiler/role.md +73 -73
  99. package/.codex/skills/team-perf-opt/roles/reviewer/role.md +75 -75
  100. package/.codex/skills/team-perf-opt/roles/strategist/role.md +94 -94
  101. package/.codex/skills/team-perf-opt/specs/pipelines.md +65 -65
  102. package/.codex/skills/team-planex/SKILL.md +65 -3
  103. package/.codex/skills/team-planex/roles/coordinator/commands/analyze.md +52 -52
  104. package/.codex/skills/team-planex/roles/coordinator/commands/monitor.md +210 -164
  105. package/.codex/skills/team-planex/roles/coordinator/role.md +171 -159
  106. package/.codex/skills/team-planex/roles/executor/role.md +91 -91
  107. package/.codex/skills/team-planex/roles/planner/role.md +112 -112
  108. package/.codex/skills/team-planex/specs/pipelines.md +93 -93
  109. package/.codex/skills/team-quality-assurance/SKILL.md +60 -3
  110. package/.codex/skills/team-quality-assurance/roles/analyst/role.md +80 -80
  111. package/.codex/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -72
  112. package/.codex/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +108 -108
  113. package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +243 -209
  114. package/.codex/skills/team-quality-assurance/roles/coordinator/role.md +176 -164
  115. package/.codex/skills/team-quality-assurance/roles/executor/role.md +66 -66
  116. package/.codex/skills/team-quality-assurance/roles/generator/role.md +68 -68
  117. package/.codex/skills/team-quality-assurance/roles/scout/role.md +67 -67
  118. package/.codex/skills/team-quality-assurance/roles/strategist/role.md +71 -71
  119. package/.codex/skills/team-quality-assurance/specs/pipelines.md +115 -115
  120. package/.codex/skills/team-review/SKILL.md +58 -3
  121. package/.codex/skills/team-review/roles/coordinator/commands/analyze.md +71 -71
  122. package/.codex/skills/team-review/roles/coordinator/commands/dispatch.md +90 -90
  123. package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +225 -185
  124. package/.codex/skills/team-review/roles/coordinator/role.md +175 -163
  125. package/.codex/skills/team-review/roles/fixer/role.md +76 -76
  126. package/.codex/skills/team-review/roles/reviewer/role.md +68 -68
  127. package/.codex/skills/team-review/roles/scanner/role.md +71 -71
  128. package/.codex/skills/team-review/specs/pipelines.md +102 -102
  129. package/.codex/skills/team-roadmap-dev/SKILL.md +55 -3
  130. package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/analyze.md +61 -61
  131. package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/monitor.md +502 -468
  132. package/.codex/skills/team-roadmap-dev/roles/coordinator/role.md +335 -322
  133. package/.codex/skills/team-roadmap-dev/roles/executor/role.md +71 -71
  134. package/.codex/skills/team-roadmap-dev/roles/planner/role.md +76 -76
  135. package/.codex/skills/team-roadmap-dev/roles/verifier/role.md +74 -74
  136. package/.codex/skills/team-roadmap-dev/specs/pipelines.md +93 -93
  137. package/.codex/skills/team-tech-debt/SKILL.md +56 -3
  138. package/.codex/skills/team-tech-debt/roles/assessor/role.md +69 -69
  139. package/.codex/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -47
  140. package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +272 -231
  141. package/.codex/skills/team-tech-debt/roles/coordinator/role.md +172 -160
  142. package/.codex/skills/team-tech-debt/roles/executor/role.md +76 -76
  143. package/.codex/skills/team-tech-debt/roles/planner/role.md +69 -69
  144. package/.codex/skills/team-tech-debt/roles/scanner/role.md +82 -82
  145. package/.codex/skills/team-tech-debt/roles/validator/role.md +75 -75
  146. package/.codex/skills/team-tech-debt/specs/pipelines.md +47 -47
  147. package/.codex/skills/team-testing/SKILL.md +72 -3
  148. package/.codex/skills/team-testing/roles/analyst/role.md +95 -95
  149. package/.codex/skills/team-testing/roles/coordinator/commands/analyze.md +70 -70
  150. package/.codex/skills/team-testing/roles/coordinator/commands/dispatch.md +106 -106
  151. package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +283 -242
  152. package/.codex/skills/team-testing/roles/coordinator/role.md +184 -172
  153. package/.codex/skills/team-testing/roles/executor/role.md +96 -96
  154. package/.codex/skills/team-testing/roles/generator/role.md +95 -95
  155. package/.codex/skills/team-testing/roles/strategist/role.md +83 -83
  156. package/.codex/skills/team-testing/specs/pipelines.md +101 -101
  157. package/.codex/skills/team-uidesign/SKILL.md +65 -3
  158. package/.codex/skills/team-uidesign/roles/coordinator/commands/analyze.md +59 -59
  159. package/.codex/skills/team-uidesign/roles/coordinator/commands/dispatch.md +156 -156
  160. package/.codex/skills/team-uidesign/roles/coordinator/commands/monitor.md +234 -194
  161. package/.codex/skills/team-uidesign/roles/coordinator/role.md +211 -199
  162. package/.codex/skills/team-uidesign/roles/designer/role.md +69 -69
  163. package/.codex/skills/team-uidesign/roles/implementer/role.md +72 -72
  164. package/.codex/skills/team-uidesign/roles/researcher/role.md +82 -82
  165. package/.codex/skills/team-uidesign/roles/reviewer/role.md +67 -67
  166. package/.codex/skills/team-uidesign/specs/pipelines.md +76 -76
  167. package/.codex/skills/team-ultra-analyze/SKILL.md +73 -3
  168. package/.codex/skills/team-ultra-analyze/roles/analyst/role.md +90 -90
  169. package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/analyze.md +73 -73
  170. package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md +50 -9
  171. package/.codex/skills/team-ultra-analyze/roles/coordinator/role.md +255 -243
  172. package/.codex/skills/team-ultra-analyze/roles/discussant/role.md +104 -104
  173. package/.codex/skills/team-ultra-analyze/roles/explorer/role.md +74 -74
  174. package/.codex/skills/team-ultra-analyze/roles/synthesizer/role.md +78 -78
  175. package/.codex/skills/team-ultra-analyze/specs/pipelines.md +64 -64
  176. package/.codex/skills/team-ux-improve/SKILL.md +64 -3
  177. package/.codex/skills/team-ux-improve/roles/coordinator/commands/analyze.md +62 -62
  178. package/.codex/skills/team-ux-improve/roles/coordinator/commands/dispatch.md +233 -233
  179. package/.codex/skills/team-ux-improve/roles/coordinator/commands/monitor.md +195 -160
  180. package/.codex/skills/team-ux-improve/roles/coordinator/role.md +170 -158
  181. package/.codex/skills/team-ux-improve/roles/designer/role.md +122 -122
  182. package/.codex/skills/team-ux-improve/roles/diagnoser/role.md +93 -93
  183. package/.codex/skills/team-ux-improve/roles/explorer/role.md +77 -77
  184. package/.codex/skills/team-ux-improve/roles/implementer/role.md +102 -102
  185. package/.codex/skills/team-ux-improve/roles/scanner/role.md +93 -93
  186. package/.codex/skills/team-ux-improve/roles/tester/role.md +84 -84
  187. package/.codex/skills/team-ux-improve/specs/pipelines.md +54 -54
  188. package/.codex/skills/workflow-test-fix-cycle/SKILL.md +402 -402
  189. package/README.md +1 -0
  190. package/package.json +1 -1
  191. package/.claude/skills/team-iterdev/SKILL.md +0 -127
  192. package/.claude/skills/team-iterdev/roles/architect/role.md +0 -65
  193. package/.claude/skills/team-iterdev/roles/coordinator/commands/analyze.md +0 -62
  194. package/.claude/skills/team-iterdev/roles/coordinator/commands/dispatch.md +0 -234
  195. package/.claude/skills/team-iterdev/roles/coordinator/commands/monitor.md +0 -182
  196. package/.claude/skills/team-iterdev/roles/coordinator/role.md +0 -153
  197. package/.claude/skills/team-iterdev/roles/developer/role.md +0 -74
  198. package/.claude/skills/team-iterdev/roles/reviewer/role.md +0 -66
  199. package/.claude/skills/team-iterdev/roles/tester/role.md +0 -88
  200. package/.claude/skills/team-iterdev/specs/pipelines.md +0 -94
  201. package/.claude/skills/team-iterdev/specs/team-config.json +0 -172
  202. package/.codex/skills/team-iterdev/SKILL.md +0 -158
  203. package/.codex/skills/team-iterdev/roles/architect/role.md +0 -65
  204. package/.codex/skills/team-iterdev/roles/coordinator/commands/analyze.md +0 -62
  205. package/.codex/skills/team-iterdev/roles/coordinator/commands/dispatch.md +0 -187
  206. package/.codex/skills/team-iterdev/roles/coordinator/commands/monitor.md +0 -186
  207. package/.codex/skills/team-iterdev/roles/coordinator/role.md +0 -181
  208. package/.codex/skills/team-iterdev/roles/developer/role.md +0 -74
  209. package/.codex/skills/team-iterdev/roles/reviewer/role.md +0 -66
  210. package/.codex/skills/team-iterdev/roles/tester/role.md +0 -88
  211. package/.codex/skills/team-iterdev/specs/pipelines.md +0 -94
  212. package/.codex/skills/team-iterdev/specs/team-config.json +0 -172
@@ -1,175 +1,242 @@
1
- ---
2
- name: team-arch-opt
3
- description: Unified team skill for architecture optimization. Uses team-worker agent architecture with role directories for domain logic. Coordinator orchestrates pipeline, workers are team-worker agents. Triggers on "team arch-opt".
4
- allowed-tools: spawn_agent(*), wait_agent(*), send_input(*), close_agent(*), report_agent_job_result(*), request_user_input(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*), mcp__ace-tool__search_context(*)
5
- ---
6
-
7
- # Team Architecture Optimization
8
-
9
- Orchestrate multi-agent architecture optimization: analyze codebase -> design refactoring plan -> implement changes -> validate improvements -> review code quality.
10
-
11
- ## Architecture
12
-
13
- ```
14
- Skill(skill="team-arch-opt", args="task description")
15
- |
16
- SKILL.md (this file) = Router
17
- |
18
- +--------------+--------------+
19
- | |
20
- no --role flag --role <name>
21
- | |
22
- Coordinator Worker
23
- roles/coordinator/role.md roles/<name>/role.md
24
- |
25
- +-- analyze -> dispatch -> spawn workers -> STOP
26
- |
27
- +-------+-------+-------+-------+
28
- v v v v v
29
- [analyzer][designer][refactorer][validator][reviewer]
30
- ```
31
-
32
- ## Role Registry
33
-
34
- | Role | Path | Prefix | Inner Loop |
35
- |------|------|--------|------------|
36
- | coordinator | [roles/coordinator/role.md](roles/coordinator/role.md) | — | — |
37
- | analyzer | [roles/analyzer/role.md](roles/analyzer/role.md) | ANALYZE-* | false |
38
- | designer | [roles/designer/role.md](roles/designer/role.md) | DESIGN-* | false |
39
- | refactorer | [roles/refactorer/role.md](roles/refactorer/role.md) | REFACTOR-*, FIX-* | true |
40
- | validator | [roles/validator/role.md](roles/validator/role.md) | VALIDATE-* | false |
41
- | reviewer | [roles/reviewer/role.md](roles/reviewer/role.md) | REVIEW-*, QUALITY-* | false |
42
-
43
- ## Role Router
44
-
45
- Parse `$ARGUMENTS`:
46
- - Has `--role <name>` -> Read `roles/<name>/role.md`, execute Phase 2-4
47
- - No `--role` -> `roles/coordinator/role.md`, execute entry router
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
-
73
- ## Shared Constants
74
-
75
- - **Session prefix**: `TAO`
76
- - **Session path**: `.workflow/.team/TAO-<slug>-<date>/`
77
- - **CLI tools**: `ccw cli --mode analysis` (read-only), `ccw cli --mode write` (modifications)
78
- - **Message bus**: `mcp__ccw-tools__team_msg(session_id=<session-id>, ...)`
79
-
80
- ## Worker Spawn Template
81
-
82
- Coordinator spawns workers using this template:
83
-
84
- ```
85
- spawn_agent({
86
- agent_type: "team_worker",
87
- items: [
88
- { type: "text", text: `## Role Assignment
89
- role: <role>
90
- role_spec: <skill_root>/roles/<role>/role.md
91
- session: <session-folder>
92
- session_id: <session-id>
93
- requirement: <task-description>
94
- inner_loop: <true|false>
95
-
96
- Read role_spec file (<skill_root>/roles/<role>/role.md) to load Phase 2-4 domain instructions.` },
97
-
98
- { type: "text", text: `## Task Context
99
- task_id: <task-id>
100
- title: <task-title>
101
- description: <task-description>
102
- pipeline_phase: <pipeline-phase>` },
103
-
104
- { type: "text", text: `## Upstream Context
105
- <prev_context>` }
106
- ]
107
- })
108
- ```
109
-
110
- After spawning, use `wait_agent({ ids: [...], timeout_ms: 900000 })` to collect results, then `close_agent({ id })` each worker.
111
-
112
- **Inner Loop roles** (refactorer): Set `inner_loop: true`.
113
- **Single-task roles** (analyzer, designer, validator, reviewer): Set `inner_loop: false`.
114
-
115
- ## User Commands
116
-
117
- | Command | Action |
118
- |---------|--------|
119
- | `check` / `status` | View execution status graph (branch-grouped), no advancement |
120
- | `resume` / `continue` | Check worker states, advance next step |
121
- | `revise <TASK-ID> [feedback]` | Revise specific task + cascade downstream |
122
- | `feedback <text>` | Analyze feedback impact, create targeted revision chain |
123
- | `recheck` | Re-run quality check |
124
- | `improve [dimension]` | Auto-improve weakest dimension |
125
-
126
- ## Session Directory
127
-
128
- ```
129
- .workflow/.team/TAO-<slug>-<date>/
130
- ├── session.json # Session metadata + status + parallel_mode
131
- ├── task-analysis.json # Coordinator analyze output
132
- ├── artifacts/
133
- │ ├── architecture-baseline.json # Analyzer: pre-refactoring metrics
134
- │ ├── architecture-report.md # Analyzer: ranked structural issue findings
135
- │ ├── refactoring-plan.md # Designer: prioritized refactoring plan
136
- │ ├── validation-results.json # Validator: post-refactoring validation
137
- │ ├── review-report.md # Reviewer: code review findings
138
- │ ├── aggregate-results.json # Fan-out/independent: aggregated results
139
- │ ├── branches/ # Fan-out mode branch artifacts
140
- │ │ └── B{NN}/
141
- │ │ ├── refactoring-detail.md
142
- │ │ ├── validation-results.json
143
- │ │ └── review-report.md
144
- │ └── pipelines/ # Independent mode pipeline artifacts
145
- │ └── {P}/
146
- │ └── ...
147
- ├── explorations/
148
- │ ├── cache-index.json # Shared explore cache
149
- │ └── <hash>.md
150
- ├── wisdom/
151
- │ └── patterns.md # Discovered patterns and conventions
152
- ├── discussions/
153
- │ ├── DISCUSS-REFACTOR.md
154
- │ └── DISCUSS-REVIEW.md
155
- └── .msg/
156
- ├── messages.jsonl # Message bus log
157
- └── meta.json # Session state + cross-role state
158
- ```
159
-
160
- ## Specs Reference
161
-
162
- - [specs/pipelines.md](specs/pipelines.md) Pipeline definitions, task registry, parallel modes
163
-
164
- ## Error Handling
165
-
166
- | Scenario | Resolution |
167
- |----------|------------|
168
- | Unknown command | Error with available command list |
169
- | Role not found | Error with role registry |
170
- | CLI tool fails | Worker fallback to direct implementation |
171
- | Fast-advance conflict | Coordinator reconciles on next callback |
172
- | Completion action fails | Default to Keep Active |
173
- | consensus_blocked HIGH | Coordinator creates revision task or pauses pipeline |
174
- | Branch fix cycle >= 3 | Escalate only that branch to user, others continue |
175
- | max_branches exceeded | Coordinator truncates to top N at CP-2.5 |
1
+ ---
2
+ name: team-arch-opt
3
+ description: Unified team skill for architecture optimization. Uses team-worker agent architecture with role directories for domain logic. Coordinator orchestrates pipeline, workers are team-worker agents. Triggers on "team arch-opt".
4
+ allowed-tools: spawn_agent(*), wait_agent(*), send_message(*), assign_task(*), close_agent(*), list_agents(*), report_agent_job_result(*), request_user_input(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*), mcp__ace-tool__search_context(*)
5
+ ---
6
+
7
+ # Team Architecture Optimization
8
+
9
+ Orchestrate multi-agent architecture optimization: analyze codebase -> design refactoring plan -> implement changes -> validate improvements -> review code quality.
10
+
11
+ ## Architecture
12
+
13
+ ```
14
+ Skill(skill="team-arch-opt", args="task description")
15
+ |
16
+ SKILL.md (this file) = Router
17
+ |
18
+ +--------------+--------------+
19
+ | |
20
+ no --role flag --role <name>
21
+ | |
22
+ Coordinator Worker
23
+ roles/coordinator/role.md roles/<name>/role.md
24
+ |
25
+ +-- analyze -> dispatch -> spawn workers -> STOP
26
+ |
27
+ +-------+-------+-------+-------+
28
+ v v v v v
29
+ [analyzer][designer][refactorer][validator][reviewer]
30
+ ```
31
+
32
+ ## Role Registry
33
+
34
+ | Role | Path | Prefix | Inner Loop |
35
+ |------|------|--------|------------|
36
+ | coordinator | [roles/coordinator/role.md](roles/coordinator/role.md) | — | — |
37
+ | analyzer | [roles/analyzer/role.md](roles/analyzer/role.md) | ANALYZE-* | false |
38
+ | designer | [roles/designer/role.md](roles/designer/role.md) | DESIGN-* | false |
39
+ | refactorer | [roles/refactorer/role.md](roles/refactorer/role.md) | REFACTOR-*, FIX-* | true |
40
+ | validator | [roles/validator/role.md](roles/validator/role.md) | VALIDATE-* | false |
41
+ | reviewer | [roles/reviewer/role.md](roles/reviewer/role.md) | REVIEW-*, QUALITY-* | false |
42
+
43
+ ## Role Router
44
+
45
+ Parse `$ARGUMENTS`:
46
+ - Has `--role <name>` -> Read `roles/<name>/role.md`, execute Phase 2-4
47
+ - No `--role` -> `roles/coordinator/role.md`, execute entry router
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_message`, `assign_task` | ALLOWED | Orchestration |
58
+ | `list_agents` | ALLOWED | Agent health check |
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
+
74
+ ## Shared Constants
75
+
76
+ - **Session prefix**: `TAO`
77
+ - **Session path**: `.workflow/.team/TAO-<slug>-<date>/`
78
+ - **CLI tools**: `ccw cli --mode analysis` (read-only), `ccw cli --mode write` (modifications)
79
+ - **Message bus**: `mcp__ccw-tools__team_msg(session_id=<session-id>, ...)`
80
+
81
+ ## Worker Spawn Template
82
+
83
+ Coordinator spawns workers using this template:
84
+
85
+ ```
86
+ spawn_agent({
87
+ agent_type: "team_worker",
88
+ task_name: "<task-id>",
89
+ fork_context: false,
90
+ items: [
91
+ { type: "text", text: `## Role Assignment
92
+ role: <role>
93
+ role_spec: <skill_root>/roles/<role>/role.md
94
+ session: <session-folder>
95
+ session_id: <session-id>
96
+ requirement: <task-description>
97
+ inner_loop: <true|false>
98
+
99
+ Read role_spec file (<skill_root>/roles/<role>/role.md) to load Phase 2-4 domain instructions.` },
100
+
101
+ { type: "text", text: `## Task Context
102
+ task_id: <task-id>
103
+ title: <task-title>
104
+ description: <task-description>
105
+ pipeline_phase: <pipeline-phase>` },
106
+
107
+ { type: "text", text: `## Upstream Context
108
+ <prev_context>` }
109
+ ]
110
+ })
111
+ ```
112
+
113
+ After spawning, use `wait_agent({ targets: [...], timeout_ms: 900000 })` to collect results, then `close_agent({ target: <name> })` each worker.
114
+
115
+ **Inner Loop roles** (refactorer): Set `inner_loop: true`.
116
+ **Single-task roles** (analyzer, designer, validator, reviewer): Set `inner_loop: false`.
117
+
118
+ ### Model Selection Guide
119
+
120
+ Architecture optimization is reasoning-intensive. All analysis and design roles need high reasoning effort.
121
+
122
+ | Role | reasoning_effort | Rationale |
123
+ |------|-------------------|-----------|
124
+ | analyzer | high | Deep structural analysis of codebase architecture |
125
+ | designer | high | Architecture redesign requires careful reasoning about tradeoffs |
126
+ | refactorer | high | Code transformations must preserve correctness |
127
+ | validator | high | Validation must thoroughly check refactoring correctness |
128
+ | reviewer | high | Code quality review demands deep understanding |
129
+
130
+ Override in spawn_agent when needed:
131
+ ```
132
+ spawn_agent({
133
+ agent_type: "team_worker",
134
+ task_name: "<task-id>",
135
+ fork_context: false,
136
+ reasoning_effort: "high",
137
+ items: [...]
138
+ })
139
+ ```
140
+
141
+ ## User Commands
142
+
143
+ | Command | Action |
144
+ |---------|--------|
145
+ | `check` / `status` | View execution status graph (branch-grouped), no advancement |
146
+ | `resume` / `continue` | Check worker states, advance next step |
147
+ | `revise <TASK-ID> [feedback]` | Revise specific task + cascade downstream |
148
+ | `feedback <text>` | Analyze feedback impact, create targeted revision chain |
149
+ | `recheck` | Re-run quality check |
150
+ | `improve [dimension]` | Auto-improve weakest dimension |
151
+
152
+ ## Session Directory
153
+
154
+ ```
155
+ .workflow/.team/TAO-<slug>-<date>/
156
+ ├── session.json # Session metadata + status + parallel_mode
157
+ ├── task-analysis.json # Coordinator analyze output
158
+ ├── artifacts/
159
+ │ ├── architecture-baseline.json # Analyzer: pre-refactoring metrics
160
+ │ ├── architecture-report.md # Analyzer: ranked structural issue findings
161
+ │ ├── refactoring-plan.md # Designer: prioritized refactoring plan
162
+ │ ├── validation-results.json # Validator: post-refactoring validation
163
+ │ ├── review-report.md # Reviewer: code review findings
164
+ │ ├── aggregate-results.json # Fan-out/independent: aggregated results
165
+ │ ├── branches/ # Fan-out mode branch artifacts
166
+ │ │ └── B{NN}/
167
+ │ │ ├── refactoring-detail.md
168
+ │ │ ├── validation-results.json
169
+ │ │ └── review-report.md
170
+ │ └── pipelines/ # Independent mode pipeline artifacts
171
+ │ └── {P}/
172
+ │ └── ...
173
+ ├── explorations/
174
+ │ ├── cache-index.json # Shared explore cache
175
+ │ └── <hash>.md
176
+ ├── wisdom/
177
+ │ └── patterns.md # Discovered patterns and conventions
178
+ ├── discussions/
179
+ │ ├── DISCUSS-REFACTOR.md
180
+ │ └── DISCUSS-REVIEW.md
181
+ └── .msg/
182
+ ├── messages.jsonl # Message bus log
183
+ └── meta.json # Session state + cross-role state
184
+ ```
185
+
186
+ ## Specs Reference
187
+
188
+ - [specs/pipelines.md](specs/pipelines.md) — Pipeline definitions, task registry, parallel modes
189
+
190
+ ## v4 Agent Coordination
191
+
192
+ ### Message Semantics
193
+
194
+ | Intent | API | Example |
195
+ |--------|-----|---------|
196
+ | Queue supplementary info (don't interrupt) | `send_message` | Send codebase patterns to running analyzer |
197
+ | Assign new work / trigger processing | `assign_task` | Assign fix task to refactorer after review feedback |
198
+ | Check running agents | `list_agents` | Verify agent health during resume |
199
+
200
+ ### Agent Health Check
201
+
202
+ Use `list_agents({})` in handleResume and handleComplete:
203
+
204
+ ```
205
+ // Reconcile session state with actual running agents
206
+ const running = list_agents({})
207
+ // Compare with session.json active tasks
208
+ // Reset orphaned tasks (in_progress but agent gone) to pending
209
+ ```
210
+
211
+ ### Named Agent Targeting
212
+
213
+ Workers are spawned with `task_name: "<task-id>"` enabling direct addressing:
214
+ - `send_message({ target: "ANALYZE-001", items: [...] })` -- queue analysis context without interrupting
215
+ - `assign_task({ target: "REFACTOR-001", items: [...] })` -- assign fix task after review feedback
216
+ - `close_agent({ target: "VALIDATE-001" })` -- cleanup by name
217
+
218
+ ### Merged Exploration Pattern
219
+
220
+ For architecture analysis, analyzer may need broad codebase exploration. Consider spawning analyzer with `fork_context: true` when deep structural analysis of interconnected modules is needed:
221
+ ```
222
+ spawn_agent({
223
+ agent_type: "team_worker",
224
+ task_name: "ANALYZE-001",
225
+ fork_context: true, // Share coordinator's codebase context
226
+ reasoning_effort: "high",
227
+ items: [...]
228
+ })
229
+ ```
230
+
231
+ ## Error Handling
232
+
233
+ | Scenario | Resolution |
234
+ |----------|------------|
235
+ | Unknown command | Error with available command list |
236
+ | Role not found | Error with role registry |
237
+ | CLI tool fails | Worker fallback to direct implementation |
238
+ | Fast-advance conflict | Coordinator reconciles on next callback |
239
+ | Completion action fails | Default to Keep Active |
240
+ | consensus_blocked HIGH | Coordinator creates revision task or pauses pipeline |
241
+ | Branch fix cycle >= 3 | Escalate only that branch to user, others continue |
242
+ | max_branches exceeded | Coordinator truncates to top N at CP-2.5 |
@@ -1,78 +1,78 @@
1
- ---
2
- role: analyzer
3
- prefix: ANALYZE
4
- inner_loop: false
5
- message_types: [state_update]
6
- ---
7
-
8
- # Architecture Analyzer
9
-
10
- Analyze codebase architecture to identify structural issues: dependency cycles, coupling/cohesion problems, layering violations, God Classes, code duplication, dead code, and API surface bloat. Produce quantified baseline metrics and a ranked architecture report.
11
-
12
- ## Phase 2: Context & Environment Detection
13
-
14
- | Input | Source | Required |
15
- |-------|--------|----------|
16
- | Task description | From task subject/description | Yes |
17
- | Session path | Extracted from task description | Yes |
18
- | .msg/meta.json | <session>/wisdom/.msg/meta.json | No |
19
-
20
- 1. Extract session path and target scope from task description
21
- 2. Detect project type by scanning for framework markers:
22
-
23
- | Signal File | Project Type | Analysis Focus |
24
- |-------------|-------------|----------------|
25
- | package.json + React/Vue/Angular | Frontend | Component tree, prop drilling, state management, barrel exports |
26
- | package.json + Express/Fastify/NestJS | Backend Node | Service layer boundaries, middleware chains, DB access patterns |
27
- | Cargo.toml / go.mod / pom.xml | Native/JVM Backend | Module boundaries, trait/interface usage, dependency injection |
28
- | Mixed framework markers | Full-stack / Monorepo | Cross-package dependencies, shared types, API contracts |
29
- | CLI entry / bin/ directory | CLI Tool | Command structure, plugin architecture, configuration layering |
30
- | No detection | Generic | All architecture dimensions |
31
-
32
- 3. Use `explore` CLI tool to map module structure, dependency graph, and layer boundaries within target scope
33
- 4. Detect available analysis tools (linters, dependency analyzers, build tools)
34
-
35
- ## Phase 3: Architecture Analysis
36
-
37
- Execute analysis based on detected project type:
38
-
39
- **Dependency analysis**:
40
- - Build import/require graph across modules
41
- - Detect circular dependencies (direct and transitive cycles)
42
- - Identify layering violations (e.g., UI importing from data layer, utils importing from domain)
43
- - Calculate fan-in/fan-out per module (high fan-out = fragile hub, high fan-in = tightly coupled)
44
-
45
- **Structural analysis**:
46
- - Identify God Classes / God Modules (> 500 LOC, > 10 public methods, too many responsibilities)
47
- - Calculate coupling metrics (afferent/efferent coupling per module)
48
- - Calculate cohesion metrics (LCOM -- Lack of Cohesion of Methods)
49
- - Detect code duplication (repeated logic blocks, copy-paste patterns)
50
- - Identify missing abstractions (repeated conditionals, switch-on-type patterns)
51
-
52
- **API surface analysis**:
53
- - Count exported symbols per module (export bloat detection)
54
- - Identify dead exports (exported but never imported elsewhere)
55
- - Detect dead code (unreachable functions, unused variables, orphan files)
56
- - Check for pattern inconsistencies (mixed naming conventions, inconsistent error handling)
57
-
58
- **All project types**:
59
- - Collect quantified architecture baseline metrics (dependency count, cycle count, coupling scores, LOC distribution)
60
- - Rank top 3-7 architecture issues by severity (Critical / High / Medium)
61
- - Record evidence: file paths, line numbers, measured values
62
-
63
- ## Phase 4: Report Generation
64
-
65
- 1. Write architecture baseline to `<session>/artifacts/architecture-baseline.json`:
66
- - Module count, dependency count, cycle count, average coupling, average cohesion
67
- - God Class candidates with LOC and method count
68
- - Dead code file count, dead export count
69
- - Timestamp and project type details
70
-
71
- 2. Write architecture report to `<session>/artifacts/architecture-report.md`:
72
- - Ranked list of architecture issues with severity, location (file:line or module), measured impact
73
- - Issue categories: CYCLE, COUPLING, COHESION, GOD_CLASS, DUPLICATION, LAYER_VIOLATION, DEAD_CODE, API_BLOAT
74
- - Evidence summary per issue
75
- - Detected project type and analysis methods used
76
-
77
- 3. Update `<session>/wisdom/.msg/meta.json` under `analyzer` namespace:
78
- - Read existing -> merge `{ "analyzer": { project_type, issue_count, top_issue, scope, categories } }` -> write back
1
+ ---
2
+ role: analyzer
3
+ prefix: ANALYZE
4
+ inner_loop: false
5
+ message_types: [state_update]
6
+ ---
7
+
8
+ # Architecture Analyzer
9
+
10
+ Analyze codebase architecture to identify structural issues: dependency cycles, coupling/cohesion problems, layering violations, God Classes, code duplication, dead code, and API surface bloat. Produce quantified baseline metrics and a ranked architecture report.
11
+
12
+ ## Phase 2: Context & Environment Detection
13
+
14
+ | Input | Source | Required |
15
+ |-------|--------|----------|
16
+ | Task description | From task subject/description | Yes |
17
+ | Session path | Extracted from task description | Yes |
18
+ | .msg/meta.json | <session>/wisdom/.msg/meta.json | No |
19
+
20
+ 1. Extract session path and target scope from task description
21
+ 2. Detect project type by scanning for framework markers:
22
+
23
+ | Signal File | Project Type | Analysis Focus |
24
+ |-------------|-------------|----------------|
25
+ | package.json + React/Vue/Angular | Frontend | Component tree, prop drilling, state management, barrel exports |
26
+ | package.json + Express/Fastify/NestJS | Backend Node | Service layer boundaries, middleware chains, DB access patterns |
27
+ | Cargo.toml / go.mod / pom.xml | Native/JVM Backend | Module boundaries, trait/interface usage, dependency injection |
28
+ | Mixed framework markers | Full-stack / Monorepo | Cross-package dependencies, shared types, API contracts |
29
+ | CLI entry / bin/ directory | CLI Tool | Command structure, plugin architecture, configuration layering |
30
+ | No detection | Generic | All architecture dimensions |
31
+
32
+ 3. Use `explore` CLI tool to map module structure, dependency graph, and layer boundaries within target scope
33
+ 4. Detect available analysis tools (linters, dependency analyzers, build tools)
34
+
35
+ ## Phase 3: Architecture Analysis
36
+
37
+ Execute analysis based on detected project type:
38
+
39
+ **Dependency analysis**:
40
+ - Build import/require graph across modules
41
+ - Detect circular dependencies (direct and transitive cycles)
42
+ - Identify layering violations (e.g., UI importing from data layer, utils importing from domain)
43
+ - Calculate fan-in/fan-out per module (high fan-out = fragile hub, high fan-in = tightly coupled)
44
+
45
+ **Structural analysis**:
46
+ - Identify God Classes / God Modules (> 500 LOC, > 10 public methods, too many responsibilities)
47
+ - Calculate coupling metrics (afferent/efferent coupling per module)
48
+ - Calculate cohesion metrics (LCOM -- Lack of Cohesion of Methods)
49
+ - Detect code duplication (repeated logic blocks, copy-paste patterns)
50
+ - Identify missing abstractions (repeated conditionals, switch-on-type patterns)
51
+
52
+ **API surface analysis**:
53
+ - Count exported symbols per module (export bloat detection)
54
+ - Identify dead exports (exported but never imported elsewhere)
55
+ - Detect dead code (unreachable functions, unused variables, orphan files)
56
+ - Check for pattern inconsistencies (mixed naming conventions, inconsistent error handling)
57
+
58
+ **All project types**:
59
+ - Collect quantified architecture baseline metrics (dependency count, cycle count, coupling scores, LOC distribution)
60
+ - Rank top 3-7 architecture issues by severity (Critical / High / Medium)
61
+ - Record evidence: file paths, line numbers, measured values
62
+
63
+ ## Phase 4: Report Generation
64
+
65
+ 1. Write architecture baseline to `<session>/artifacts/architecture-baseline.json`:
66
+ - Module count, dependency count, cycle count, average coupling, average cohesion
67
+ - God Class candidates with LOC and method count
68
+ - Dead code file count, dead export count
69
+ - Timestamp and project type details
70
+
71
+ 2. Write architecture report to `<session>/artifacts/architecture-report.md`:
72
+ - Ranked list of architecture issues with severity, location (file:line or module), measured impact
73
+ - Issue categories: CYCLE, COUPLING, COHESION, GOD_CLASS, DUPLICATION, LAYER_VIOLATION, DEAD_CODE, API_BLOAT
74
+ - Evidence summary per issue
75
+ - Detected project type and analysis methods used
76
+
77
+ 3. Update `<session>/wisdom/.msg/meta.json` under `analyzer` namespace:
78
+ - Read existing -> merge `{ "analyzer": { project_type, issue_count, top_issue, scope, categories } }` -> write back