maestro-flow 0.3.10 → 0.3.11

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 (184) hide show
  1. package/.claude/agents/workflow-collab-planner.md +1 -1
  2. package/.claude/agents/workflow-executor.md +1 -1
  3. package/.claude/agents/workflow-plan-checker.md +1 -1
  4. package/.claude/agents/workflow-planner.md +1 -1
  5. package/.claude/commands/learn-decompose.md +176 -176
  6. package/.claude/commands/learn-follow.md +167 -167
  7. package/.claude/commands/learn-retro.md +1 -1
  8. package/.claude/commands/maestro-coordinate.md +1 -3
  9. package/.claude/commands/manage-harvest.md +131 -131
  10. package/.claude/commands/manage-issue.md +2 -2
  11. package/.claude/commands/spec-add.md +67 -56
  12. package/.claude/commands/spec-load.md +66 -64
  13. package/.claude/commands/spec-setup.md +5 -9
  14. package/.codex/skills/learn-decompose/SKILL.md +119 -0
  15. package/.codex/skills/learn-follow/SKILL.md +83 -0
  16. package/.codex/skills/learn-investigate/SKILL.md +83 -0
  17. package/.codex/skills/learn-retro/SKILL.md +83 -0
  18. package/.codex/skills/learn-second-opinion/SKILL.md +86 -0
  19. package/.codex/skills/maestro/SKILL.md +151 -279
  20. package/.codex/skills/maestro-analyze/SKILL.md +59 -71
  21. package/.codex/skills/maestro-brainstorm/SKILL.md +452 -463
  22. package/.codex/skills/maestro-chain/SKILL.md +95 -110
  23. package/.codex/skills/maestro-coordinate/SKILL.md +68 -234
  24. package/.codex/skills/maestro-execute/SKILL.md +435 -446
  25. package/.codex/skills/maestro-fork/SKILL.md +68 -0
  26. package/.codex/skills/maestro-init/SKILL.md +171 -167
  27. package/.codex/skills/maestro-learn/SKILL.md +80 -0
  28. package/.codex/skills/maestro-link-coordinate/SKILL.md +224 -220
  29. package/.codex/skills/maestro-merge/SKILL.md +62 -0
  30. package/.codex/skills/maestro-milestone-audit/SKILL.md +108 -103
  31. package/.codex/skills/maestro-milestone-complete/SKILL.md +155 -149
  32. package/.codex/skills/maestro-milestone-release/SKILL.md +70 -0
  33. package/.codex/skills/maestro-overlay/SKILL.md +188 -185
  34. package/.codex/skills/maestro-plan/SKILL.md +58 -69
  35. package/.codex/skills/maestro-quick/SKILL.md +26 -23
  36. package/.codex/skills/maestro-roadmap/SKILL.md +65 -73
  37. package/.codex/skills/maestro-spec-generate/SKILL.md +66 -74
  38. package/.codex/skills/maestro-ui-design/SKILL.md +34 -31
  39. package/.codex/skills/maestro-verify/SKILL.md +556 -566
  40. package/.codex/skills/manage-codebase-rebuild/SKILL.md +397 -405
  41. package/.codex/skills/manage-codebase-refresh/SKILL.md +93 -82
  42. package/.codex/skills/manage-harvest/SKILL.md +82 -0
  43. package/.codex/skills/manage-issue/SKILL.md +80 -65
  44. package/.codex/skills/manage-issue-discover/SKILL.md +491 -503
  45. package/.codex/skills/manage-learn/SKILL.md +190 -186
  46. package/.codex/skills/manage-memory/SKILL.md +95 -72
  47. package/.codex/skills/manage-memory-capture/SKILL.md +99 -86
  48. package/.codex/skills/manage-status/SKILL.md +102 -89
  49. package/.codex/skills/quality-business-test/SKILL.md +228 -223
  50. package/.codex/skills/quality-debug/SKILL.md +54 -66
  51. package/.codex/skills/quality-integration-test/SKILL.md +532 -544
  52. package/.codex/skills/quality-refactor/SKILL.md +197 -191
  53. package/.codex/skills/quality-retrospective/SKILL.md +512 -505
  54. package/.codex/skills/quality-review/SKILL.md +93 -105
  55. package/.codex/skills/quality-sync/SKILL.md +101 -89
  56. package/.codex/skills/quality-test/SKILL.md +202 -198
  57. package/.codex/skills/quality-test-gen/SKILL.md +93 -104
  58. package/.codex/skills/spec-add/SKILL.md +58 -39
  59. package/.codex/skills/spec-load/SKILL.md +45 -40
  60. package/.codex/skills/spec-map/SKILL.md +180 -182
  61. package/.codex/skills/spec-setup/SKILL.md +94 -76
  62. package/.codex/skills/team-coordinate/SKILL.md +346 -357
  63. package/.codex/skills/team-executor/SKILL.md +70 -112
  64. package/.codex/skills/team-lifecycle-v4/SKILL.md +311 -299
  65. package/.codex/skills/team-quality-assurance/SKILL.md +234 -227
  66. package/.codex/skills/team-review/SKILL.md +232 -225
  67. package/.codex/skills/team-tech-debt/SKILL.md +78 -100
  68. package/.codex/skills/team-testing/SKILL.md +242 -235
  69. package/.codex/skills/wiki-connect/SKILL.md +75 -0
  70. package/.codex/skills/wiki-digest/SKILL.md +87 -0
  71. package/README.md +7 -4
  72. package/README.zh-CN.md +7 -4
  73. package/dashboard/dist-server/dashboard/src/server/routes/specs.d.ts +1 -1
  74. package/dashboard/dist-server/dashboard/src/server/routes/specs.js +75 -30
  75. package/dashboard/dist-server/dashboard/src/server/routes/specs.js.map +1 -1
  76. package/dashboard/dist-server/dashboard/src/server/state/event-bus.d.ts +5 -0
  77. package/dashboard/dist-server/dashboard/src/server/state/event-bus.js +5 -0
  78. package/dashboard/dist-server/dashboard/src/server/state/event-bus.js.map +1 -1
  79. package/dashboard/dist-server/dashboard/src/shared/constants.js +5 -0
  80. package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
  81. package/dashboard/dist-server/dashboard/src/shared/team-types.d.ts +21 -0
  82. package/dashboard/dist-server/dashboard/src/shared/team-types.js.map +1 -1
  83. package/dashboard/dist-server/dashboard/src/shared/types.d.ts +3 -2
  84. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.d.ts +1 -1
  85. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.js.map +1 -1
  86. package/dashboard/dist-server/src/hooks/constants.d.ts +2 -0
  87. package/dashboard/dist-server/src/hooks/constants.js +2 -0
  88. package/dashboard/dist-server/src/hooks/constants.js.map +1 -1
  89. package/dist/src/commands/collab.js +4 -4
  90. package/dist/src/commands/collab.js.map +1 -1
  91. package/dist/src/commands/hooks.d.ts.map +1 -1
  92. package/dist/src/commands/hooks.js +66 -1
  93. package/dist/src/commands/hooks.js.map +1 -1
  94. package/dist/src/commands/spec.d.ts.map +1 -1
  95. package/dist/src/commands/spec.js +7 -2
  96. package/dist/src/commands/spec.js.map +1 -1
  97. package/dist/src/hooks/constants.d.ts +2 -0
  98. package/dist/src/hooks/constants.d.ts.map +1 -1
  99. package/dist/src/hooks/constants.js +2 -0
  100. package/dist/src/hooks/constants.js.map +1 -1
  101. package/dist/src/hooks/guards/index.d.ts +1 -0
  102. package/dist/src/hooks/guards/index.d.ts.map +1 -1
  103. package/dist/src/hooks/guards/index.js +1 -0
  104. package/dist/src/hooks/guards/index.js.map +1 -1
  105. package/dist/src/hooks/guards/spec-validator.d.ts +25 -0
  106. package/dist/src/hooks/guards/spec-validator.d.ts.map +1 -0
  107. package/dist/src/hooks/guards/spec-validator.js +66 -0
  108. package/dist/src/hooks/guards/spec-validator.js.map +1 -0
  109. package/dist/src/hooks/keyword-spec-injector.d.ts +21 -0
  110. package/dist/src/hooks/keyword-spec-injector.d.ts.map +1 -0
  111. package/dist/src/hooks/keyword-spec-injector.js +96 -0
  112. package/dist/src/hooks/keyword-spec-injector.js.map +1 -0
  113. package/dist/src/hooks/plugins/spec-injection-plugin.d.ts +2 -1
  114. package/dist/src/hooks/plugins/spec-injection-plugin.d.ts.map +1 -1
  115. package/dist/src/hooks/plugins/spec-injection-plugin.js +21 -12
  116. package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
  117. package/dist/src/hooks/spec-bridge.d.ts +40 -0
  118. package/dist/src/hooks/spec-bridge.d.ts.map +1 -0
  119. package/dist/src/hooks/spec-bridge.js +97 -0
  120. package/dist/src/hooks/spec-bridge.js.map +1 -0
  121. package/dist/src/hooks/spec-injector.d.ts.map +1 -1
  122. package/dist/src/hooks/spec-injector.js +18 -12
  123. package/dist/src/hooks/spec-injector.js.map +1 -1
  124. package/dist/src/team/phase-orchestrator.d.ts +52 -0
  125. package/dist/src/team/phase-orchestrator.d.ts.map +1 -0
  126. package/dist/src/team/phase-orchestrator.js +165 -0
  127. package/dist/src/team/phase-orchestrator.js.map +1 -0
  128. package/dist/src/team/phase-types.d.ts +51 -0
  129. package/dist/src/team/phase-types.d.ts.map +1 -0
  130. package/dist/src/team/phase-types.js +41 -0
  131. package/dist/src/team/phase-types.js.map +1 -0
  132. package/dist/src/tools/index.d.ts.map +1 -1
  133. package/dist/src/tools/index.js +6 -0
  134. package/dist/src/tools/index.js.map +1 -1
  135. package/dist/src/tools/spec-entry-parser.d.ts +56 -0
  136. package/dist/src/tools/spec-entry-parser.d.ts.map +1 -0
  137. package/dist/src/tools/spec-entry-parser.js +196 -0
  138. package/dist/src/tools/spec-entry-parser.js.map +1 -0
  139. package/dist/src/tools/spec-init.d.ts.map +1 -1
  140. package/dist/src/tools/spec-init.js +66 -92
  141. package/dist/src/tools/spec-init.js.map +1 -1
  142. package/dist/src/tools/spec-keyword-index.d.ts +30 -0
  143. package/dist/src/tools/spec-keyword-index.d.ts.map +1 -0
  144. package/dist/src/tools/spec-keyword-index.js +101 -0
  145. package/dist/src/tools/spec-keyword-index.js.map +1 -0
  146. package/dist/src/tools/spec-loader.d.ts +3 -3
  147. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  148. package/dist/src/tools/spec-loader.js +49 -23
  149. package/dist/src/tools/spec-loader.js.map +1 -1
  150. package/dist/src/tools/team-agents.d.ts +27 -0
  151. package/dist/src/tools/team-agents.d.ts.map +1 -0
  152. package/dist/src/tools/team-agents.js +362 -0
  153. package/dist/src/tools/team-agents.js.map +1 -0
  154. package/dist/src/tools/team-mailbox.d.ts +40 -0
  155. package/dist/src/tools/team-mailbox.d.ts.map +1 -0
  156. package/dist/src/tools/team-mailbox.js +384 -0
  157. package/dist/src/tools/team-mailbox.js.map +1 -0
  158. package/dist/src/tools/team-msg.d.ts +17 -8
  159. package/dist/src/tools/team-msg.d.ts.map +1 -1
  160. package/dist/src/tools/team-msg.js +110 -13
  161. package/dist/src/tools/team-msg.js.map +1 -1
  162. package/dist/src/tools/team-tasks-mcp.d.ts +27 -0
  163. package/dist/src/tools/team-tasks-mcp.d.ts.map +1 -0
  164. package/dist/src/tools/team-tasks-mcp.js +408 -0
  165. package/dist/src/tools/team-tasks-mcp.js.map +1 -0
  166. package/package.json +2 -1
  167. package/workflows/analyze.md +816 -816
  168. package/workflows/brainstorm.md +471 -471
  169. package/workflows/codebase-rebuild.md +332 -332
  170. package/workflows/codebase-refresh.md +240 -240
  171. package/workflows/execute.md +1 -1
  172. package/workflows/harvest.md +420 -420
  173. package/workflows/integration-test.md +343 -343
  174. package/workflows/issue-discover.md +414 -414
  175. package/workflows/map.md +111 -111
  176. package/workflows/milestone-complete.md +176 -176
  177. package/workflows/plan.md +1 -1
  178. package/workflows/quick.md +497 -497
  179. package/workflows/refactor.md +300 -300
  180. package/workflows/roadmap.md +335 -335
  181. package/workflows/spec-generate.md +640 -640
  182. package/workflows/specs-add.md +46 -81
  183. package/workflows/specs-load.md +15 -17
  184. package/workflows/specs-setup.md +40 -161
@@ -4,12 +4,9 @@ description: Unified team skill for tech debt identification and remediation. Sc
4
4
  allowed-tools: spawn_agent(*), wait_agent(*), send_message(*), followup_task(*), close_agent(*), list_agents(*), report_agent_job_result(*), request_user_input(*), Read(*), Write(*), Edit(*), Bash(*), Glob(*), Grep(*), mcp__ace-tool__search_context(*), mcp__maestro-tools__read_file(*), mcp__maestro-tools__write_file(*), mcp__maestro-tools__edit_file(*), mcp__maestro-tools__team_msg(*)
5
5
  ---
6
6
 
7
- # Team Tech Debt
8
-
7
+ <purpose>
9
8
  Systematic tech debt governance: scan -> assess -> plan -> fix -> validate. Built on **team-worker agent architecture** — all worker roles share a single agent definition with role-specific Phase 2-4 loaded from `roles/<role>/role.md`.
10
9
 
11
- ## Architecture
12
-
13
10
  ```
14
11
  Skill(skill="team-tech-debt", args="task description")
15
12
  |
@@ -29,9 +26,16 @@ Skill(skill="team-tech-debt", args="task description")
29
26
  [team-worker agents, each loads roles/<role>/role.md]
30
27
  scanner assessor planner executor validator
31
28
  ```
29
+ </purpose>
30
+
31
+ <context>
32
+ $ARGUMENTS — task description and optional flags.
32
33
 
33
- ## Role Registry
34
+ **Role Router:**
35
+ - Has `--role <name>` → Read `roles/<name>/role.md`, execute Phase 2-4
36
+ - No `--role` → `roles/coordinator/role.md`, execute entry router
34
37
 
38
+ **Role Registry:**
35
39
  | Role | Path | Prefix | Inner Loop |
36
40
  |------|------|--------|------------|
37
41
  | coordinator | [roles/coordinator/role.md](roles/coordinator/role.md) | — | — |
@@ -41,48 +45,59 @@ Skill(skill="team-tech-debt", args="task description")
41
45
  | executor | [roles/executor/role.md](roles/executor/role.md) | TDFIX-* | true |
42
46
  | validator | [roles/validator/role.md](roles/validator/role.md) | TDVAL-* | false |
43
47
 
44
- ## Role Router
45
-
46
- Parse `$ARGUMENTS`:
47
- - Has `--role <name>` Read `roles/<name>/role.md`, execute Phase 2-4
48
- - No `--role` `roles/coordinator/role.md`, execute entry router
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:
48
+ **User Commands:**
49
+ | Command | Action |
50
+ |---------|--------|
51
+ | `check` / `status` | View execution status graph |
52
+ | `resume` / `continue` | Advance to next step |
53
+ | `--mode=scan` | Scan-only pipeline (TDSCAN + TDEVAL) |
54
+ | `--mode=targeted` | Targeted pipeline (TDPLAN + TDFIX + TDVAL) |
55
+ | `--mode=remediate` | Full pipeline (default) |
56
+ | `-y` / `--yes` | Skip confirmations |
55
57
 
58
+ **Delegation Lock — Coordinator is PURE ORCHESTRATOR:**
56
59
  | Tool Call | Verdict | Reason |
57
60
  |-----------|---------|--------|
58
61
  | `spawn_agent`, `wait_agent`, `close_agent`, `send_message`, `followup_task` | ALLOWED | Orchestration |
59
- | `list_agents` | ALLOWED | Agent health check |
60
- | `request_user_input` | ALLOWED | User interaction |
61
- | `mcp__maestro-tools__team_msg` | ALLOWED | Message bus |
62
+ | `list_agents`, `request_user_input`, `mcp__maestro-tools__team_msg` | ALLOWED | Coordination |
62
63
  | `Read/Write` on `.workflow/.team/` files | ALLOWED | Session state |
63
- | `Read` on `roles/`, `commands/`, `specs/` | ALLOWED | Loading own instructions |
64
+ | `Read` on `roles/`, `commands/`, `specs/` | ALLOWED | Loading instructions |
64
65
  | `Read/Grep/Glob` on project source code | BLOCKED | Delegate to worker |
65
66
  | `Edit` on any file outside `.workflow/` | BLOCKED | Delegate to worker |
66
- | `Bash("maestro delegate ...")` | BLOCKED | Only workers call CLI |
67
- | `Bash` running build/test/lint commands | BLOCKED | Delegate to worker |
67
+ | `Bash` running build/test/lint | BLOCKED | Delegate to worker |
68
68
 
69
- **If a tool call is BLOCKED**: STOP. Create a task, spawn a worker.
69
+ **No exceptions.** Even single-file tasks MUST go through spawn_agent.
70
70
 
71
- **No exceptions for "simple" tasks.** Even a single-file read-and-report MUST go through spawn_agent.
71
+ **Shared Constants:**
72
+ - Session prefix: `TD`
73
+ - Session path: `.workflow/.team/TD-<slug>-<date>/`
74
+ - CLI tools: `maestro delegate --mode analysis|write`
75
+ - Max GC rounds: 3
72
76
 
73
- ---
77
+ **Specs:** [specs/pipelines.md](specs/pipelines.md) — Pipeline definitions and task registry
74
78
 
75
- ## Shared Constants
79
+ **Session Directory:**
80
+ ```
81
+ .workflow/.team/TD-<slug>-<date>/
82
+ ├── .msg/ # Team message bus
83
+ ├── scan/ # Scanner output
84
+ ├── assessment/ # Assessor output
85
+ ├── plan/ # Planner output
86
+ ├── fixes/ # Executor output
87
+ ├── validation/ # Validator output
88
+ └── wisdom/ # Cross-task knowledge
89
+ ```
90
+ </context>
76
91
 
77
- - **Session prefix**: `TD`
78
- - **Session path**: `.workflow/.team/TD-<slug>-<date>/`
79
- - **CLI tools**: `maestro delegate --mode analysis` (read-only), `maestro delegate --mode write` (modifications)
80
- - **Message bus**: `mcp__maestro-tools__team_msg(session_id=<session-id>, ...)`
81
- - **Max GC rounds**: 3
92
+ <invariants>
93
+ 1. **Coordinator never executes domain work** — only orchestrates via spawn_agent
94
+ 2. **Scanner results inform downstream** each stage narrows and refines
95
+ 3. **Pipeline flow**: TDSCAN → TDEVAL → TDPLAN → TDFIX → TDVAL
96
+ </invariants>
82
97
 
83
- ## Worker Spawn Template
98
+ <execution>
84
99
 
85
- Coordinator spawns workers using this template:
100
+ ### Worker Spawn Template
86
101
 
87
102
  ```
88
103
  spawn_agent({
@@ -97,7 +112,7 @@ session_id: <session-id>
97
112
  requirement: <task-description>
98
113
  inner_loop: <true|false>
99
114
 
100
- Read role_spec file (<skill_root>/roles/<role>/role.md) to load Phase 2-4 domain instructions.
115
+ Read role_spec file to load Phase 2-4 domain instructions.
101
116
 
102
117
  ## Task Context
103
118
  task_id: <task-id>
@@ -110,90 +125,41 @@ pipeline_phase: <pipeline-phase>
110
125
  })
111
126
  ```
112
127
 
113
- After spawning, use `wait_agent({ timeout_ms: 1800000 })` to collect results (30 min). If `result.timed_out`, send STATUS_CHECK via followup_task (wait 3 min), then FINALIZE with interrupt (wait 3 min), then mark timed_out and close agents. Use `close_agent({ target })` each worker.
114
-
128
+ After spawning: `wait_agent({ timeout_ms: 1800000 })` (30 min). Timeout handling: STATUS_CHECK (3 min) FINALIZE with interrupt (3 min) mark timed_out, close.
115
129
 
116
130
  ### Model Selection Guide
117
131
 
118
- Tech debt follows a discovery-to-fix pipeline. Scanner is broad/fast, later stages need deeper reasoning.
119
-
120
132
  | Role | reasoning_effort | Rationale |
121
133
  |------|-------------------|-----------|
122
- | scanner | medium | Broad codebase scan, pattern matching over deep analysis |
123
- | assessor | high | Severity assessment requires understanding impact and risk |
124
- | planner | high | Remediation planning must prioritize and sequence fixes |
125
- | executor | high | Code fixes must preserve behavior while removing debt |
126
- | validator | medium | Validation follows defined acceptance criteria |
134
+ | scanner | medium | Broad scan, pattern matching |
135
+ | assessor | high | Impact and risk assessment |
136
+ | planner | high | Prioritize and sequence fixes |
137
+ | executor | high | Code fixes must preserve behavior |
138
+ | validator | medium | Follows defined acceptance criteria |
127
139
 
128
- ### Pipeline Pattern: Scanner Results Inform Downstream
129
-
130
- Scanner discoveries flow through the pipeline — each stage narrows and refines:
131
- 1. TDSCAN produces broad debt inventory
132
- 2. TDEVAL assesses and prioritizes (filters low-impact items)
133
- 3. TDPLAN creates sequenced fix plan from assessed items
134
- 4. TDFIX implements fixes per plan
135
- 5. TDVAL validates fixes against original debt findings
136
-
137
- ## User Commands
138
-
139
- | Command | Action |
140
- |---------|--------|
141
- | `check` / `status` | View execution status graph |
142
- | `resume` / `continue` | Advance to next step |
143
- | `--mode=scan` | Run scan-only pipeline (TDSCAN + TDEVAL) |
144
- | `--mode=targeted` | Run targeted pipeline (TDPLAN + TDFIX + TDVAL) |
145
- | `--mode=remediate` | Run full pipeline (default) |
146
- | `-y` / `--yes` | Skip confirmations |
147
-
148
- ## Specs Reference
149
-
150
- - [specs/pipelines.md](specs/pipelines.md) — Pipeline definitions and task registry
151
-
152
- ## Session Directory
153
-
154
- ```
155
- .workflow/.team/TD-<slug>-<date>/
156
- ├── .msg/
157
- │ ├── messages.jsonl # Team message bus
158
- │ └── meta.json # Pipeline config + role state snapshot
159
- ├── scan/ # Scanner output
160
- ├── assessment/ # Assessor output
161
- ├── plan/ # Planner output
162
- ├── fixes/ # Executor output
163
- ├── validation/ # Validator output
164
- └── wisdom/ # Cross-task knowledge
165
- ```
166
-
167
- ## v4 Agent Coordination
168
-
169
- ### Message Semantics
140
+ ### v4 Agent Coordination
170
141
 
142
+ **Message Semantics:**
171
143
  | Intent | API | Example |
172
144
  |--------|-----|---------|
173
- | Queue supplementary info (don't interrupt) | `send_message` | Send scan findings to running assessor |
174
- | Assign fix from remediation plan | `followup_task` | Assign TDFIX task from planner output |
145
+ | Queue supplementary info | `send_message` | Send scan findings to running assessor |
146
+ | Assign fix from plan | `followup_task` | Assign TDFIX task from planner output |
175
147
  | Check running agents | `list_agents` | Verify agent health during resume |
176
148
 
177
- ### Agent Health Check
178
-
179
- Use `list_agents({})` in handleResume and handleComplete:
180
-
149
+ **Agent Health Check:**
181
150
  ```
182
- // Reconcile session state with actual running agents
183
151
  const running = list_agents({})
184
152
  // Compare with meta.json active tasks
185
153
  // Reset orphaned tasks (in_progress but agent gone) to pending
186
154
  ```
187
155
 
188
- ### Named Agent Targeting
189
-
190
- Workers are spawned with `task_name: "<task-id>"` enabling direct addressing:
191
- - `send_message({ target: "TDSCAN-001", message: "..." })` -- send additional scan scope to scanner
192
- - `followup_task({ target: "TDFIX-001", message: "..." })` -- assign fix task from planner output
193
- - `close_agent({ target: "TDVAL-001" })` -- cleanup after validation
194
-
195
- ## Error Handling
156
+ **Named Agent Targeting:**
157
+ - `send_message({ target: "TDSCAN-001", message: "..." })` — additional scan scope
158
+ - `followup_task({ target: "TDFIX-001", message: "..." })` assign fix from planner
159
+ - `close_agent({ target: "TDVAL-001" })` cleanup after validation
160
+ </execution>
196
161
 
162
+ <error_codes>
197
163
  | Scenario | Resolution |
198
164
  |----------|------------|
199
165
  | Unknown command | Error with available command list |
@@ -202,3 +168,15 @@ Workers are spawned with `task_name: "<task-id>"` enabling direct addressing:
202
168
  | Fast-advance conflict | Coordinator reconciles on next callback |
203
169
  | Completion action fails | Default to Keep Active |
204
170
  | Scanner finds no debt | Report clean codebase, skip to summary |
171
+ </error_codes>
172
+
173
+ <success_criteria>
174
+ - [ ] Role routing correct (coordinator vs worker)
175
+ - [ ] Delegation lock enforced (coordinator never executes domain work)
176
+ - [ ] Pipeline stages execute in order (scan → assess → plan → fix → validate)
177
+ - [ ] Worker spawn uses correct template with role-spec paths
178
+ - [ ] Timeout handling applied (STATUS_CHECK → FINALIZE → close)
179
+ - [ ] Scanner results flow through downstream stages
180
+ - [ ] Session directory structure maintained
181
+ - [ ] Completion action presented to user
182
+ </success_criteria>