claude-code-workflow 7.2.23 → 7.2.24

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 (181) hide show
  1. package/.codex/skills/team-arch-opt/SKILL.md +242 -175
  2. package/.codex/skills/team-arch-opt/roles/analyzer/role.md +78 -78
  3. package/.codex/skills/team-arch-opt/roles/coordinator/commands/analyze.md +57 -57
  4. package/.codex/skills/team-arch-opt/roles/coordinator/commands/monitor.md +246 -204
  5. package/.codex/skills/team-arch-opt/roles/coordinator/role.md +196 -184
  6. package/.codex/skills/team-arch-opt/roles/designer/role.md +115 -115
  7. package/.codex/skills/team-arch-opt/roles/refactorer/role.md +102 -102
  8. package/.codex/skills/team-arch-opt/roles/reviewer/role.md +111 -111
  9. package/.codex/skills/team-arch-opt/roles/validator/role.md +115 -115
  10. package/.codex/skills/team-arch-opt/specs/pipelines.md +102 -102
  11. package/.codex/skills/team-brainstorm/SKILL.md +72 -4
  12. package/.codex/skills/team-brainstorm/roles/challenger/role.md +61 -61
  13. package/.codex/skills/team-brainstorm/roles/coordinator/commands/analyze.md +58 -58
  14. package/.codex/skills/team-brainstorm/roles/coordinator/commands/monitor.md +212 -171
  15. package/.codex/skills/team-brainstorm/roles/coordinator/role.md +172 -160
  16. package/.codex/skills/team-brainstorm/roles/evaluator/role.md +56 -56
  17. package/.codex/skills/team-brainstorm/roles/ideator/role.md +69 -69
  18. package/.codex/skills/team-brainstorm/roles/synthesizer/role.md +57 -57
  19. package/.codex/skills/team-brainstorm/specs/pipelines.md +72 -72
  20. package/.codex/skills/team-coordinate/SKILL.md +71 -3
  21. package/.codex/skills/team-coordinate/roles/coordinator/commands/monitor.md +45 -5
  22. package/.codex/skills/team-coordinate/roles/coordinator/role.md +402 -389
  23. package/.codex/skills/team-coordinate/specs/knowledge-transfer.md +111 -111
  24. package/.codex/skills/team-coordinate/specs/pipelines.md +97 -97
  25. package/.codex/skills/team-coordinate/specs/quality-gates.md +112 -112
  26. package/.codex/skills/team-designer/SKILL.md +153 -153
  27. package/.codex/skills/team-designer/phases/01-requirements-analysis.md +250 -250
  28. package/.codex/skills/team-designer/phases/02-scaffold-generation.md +228 -228
  29. package/.codex/skills/team-designer/phases/03-content-generation.md +330 -330
  30. package/.codex/skills/team-designer/phases/04-validation.md +320 -320
  31. package/.codex/skills/team-executor/SKILL.md +29 -2
  32. package/.codex/skills/team-executor/roles/executor/commands/monitor.md +23 -15
  33. package/.codex/skills/team-frontend/SKILL.md +77 -3
  34. package/.codex/skills/team-frontend/roles/analyst/role.md +92 -92
  35. package/.codex/skills/team-frontend/roles/architect/role.md +86 -86
  36. package/.codex/skills/team-frontend/roles/coordinator/commands/analyze.md +52 -52
  37. package/.codex/skills/team-frontend/roles/coordinator/commands/monitor.md +222 -188
  38. package/.codex/skills/team-frontend/roles/coordinator/role.md +189 -177
  39. package/.codex/skills/team-frontend/roles/developer/role.md +93 -93
  40. package/.codex/skills/team-frontend/roles/qa/role.md +79 -79
  41. package/.codex/skills/team-frontend/specs/pipelines.md +76 -76
  42. package/.codex/skills/team-frontend-debug/SKILL.md +66 -3
  43. package/.codex/skills/team-frontend-debug/roles/analyzer/role.md +208 -208
  44. package/.codex/skills/team-frontend-debug/roles/coordinator/commands/analyze.md +174 -174
  45. package/.codex/skills/team-frontend-debug/roles/coordinator/commands/dispatch.md +198 -198
  46. package/.codex/skills/team-frontend-debug/roles/coordinator/commands/monitor.md +177 -143
  47. package/.codex/skills/team-frontend-debug/roles/coordinator/role.md +164 -152
  48. package/.codex/skills/team-frontend-debug/roles/fixer/role.md +147 -147
  49. package/.codex/skills/team-frontend-debug/roles/reproducer/role.md +147 -147
  50. package/.codex/skills/team-frontend-debug/roles/tester/role.md +231 -231
  51. package/.codex/skills/team-frontend-debug/roles/verifier/role.md +172 -172
  52. package/.codex/skills/team-frontend-debug/specs/debug-tools.md +215 -215
  53. package/.codex/skills/team-frontend-debug/specs/pipelines.md +94 -94
  54. package/.codex/skills/team-issue/SKILL.md +83 -4
  55. package/.codex/skills/team-issue/roles/coordinator/commands/analyze.md +64 -64
  56. package/.codex/skills/team-issue/roles/coordinator/commands/dispatch.md +273 -273
  57. package/.codex/skills/team-issue/roles/coordinator/commands/monitor.md +235 -194
  58. package/.codex/skills/team-issue/roles/coordinator/role.md +206 -194
  59. package/.codex/skills/team-issue/roles/explorer/role.md +94 -94
  60. package/.codex/skills/team-issue/roles/implementer/role.md +87 -87
  61. package/.codex/skills/team-issue/roles/integrator/role.md +84 -84
  62. package/.codex/skills/team-issue/roles/planner/role.md +81 -81
  63. package/.codex/skills/team-issue/roles/reviewer/role.md +86 -86
  64. package/.codex/skills/team-issue/specs/pipelines.md +124 -124
  65. package/.codex/skills/team-iterdev/SKILL.md +64 -3
  66. package/.codex/skills/team-iterdev/roles/architect/role.md +65 -65
  67. package/.codex/skills/team-iterdev/roles/coordinator/commands/analyze.md +62 -62
  68. package/.codex/skills/team-iterdev/roles/coordinator/commands/monitor.md +227 -186
  69. package/.codex/skills/team-iterdev/roles/coordinator/role.md +193 -181
  70. package/.codex/skills/team-iterdev/roles/developer/role.md +74 -74
  71. package/.codex/skills/team-iterdev/roles/reviewer/role.md +66 -66
  72. package/.codex/skills/team-iterdev/roles/tester/role.md +88 -88
  73. package/.codex/skills/team-iterdev/specs/pipelines.md +94 -94
  74. package/.codex/skills/team-lifecycle-v4/MIGRATION-PLAN.md +6 -6
  75. package/.codex/skills/team-lifecycle-v4/SKILL.md +305 -242
  76. package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +1 -1
  77. package/.codex/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +66 -24
  78. package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +13 -1
  79. package/.codex/skills/team-lifecycle-v4/roles/supervisor/role.md +1 -1
  80. package/.codex/skills/team-lifecycle-v4/templates/architecture.md +254 -254
  81. package/.codex/skills/team-lifecycle-v4/templates/epics.md +196 -196
  82. package/.codex/skills/team-lifecycle-v4/templates/product-brief.md +133 -133
  83. package/.codex/skills/team-lifecycle-v4/templates/requirements.md +224 -224
  84. package/.codex/skills/team-perf-opt/SKILL.md +68 -3
  85. package/.codex/skills/team-perf-opt/roles/benchmarker/role.md +89 -89
  86. package/.codex/skills/team-perf-opt/roles/coordinator/commands/analyze.md +61 -61
  87. package/.codex/skills/team-perf-opt/roles/coordinator/commands/monitor.md +35 -1
  88. package/.codex/skills/team-perf-opt/roles/coordinator/role.md +179 -167
  89. package/.codex/skills/team-perf-opt/roles/optimizer/role.md +97 -97
  90. package/.codex/skills/team-perf-opt/roles/profiler/role.md +73 -73
  91. package/.codex/skills/team-perf-opt/roles/reviewer/role.md +75 -75
  92. package/.codex/skills/team-perf-opt/roles/strategist/role.md +94 -94
  93. package/.codex/skills/team-perf-opt/specs/pipelines.md +65 -65
  94. package/.codex/skills/team-planex/SKILL.md +65 -3
  95. package/.codex/skills/team-planex/roles/coordinator/commands/analyze.md +52 -52
  96. package/.codex/skills/team-planex/roles/coordinator/commands/monitor.md +210 -164
  97. package/.codex/skills/team-planex/roles/coordinator/role.md +171 -159
  98. package/.codex/skills/team-planex/roles/executor/role.md +91 -91
  99. package/.codex/skills/team-planex/roles/planner/role.md +112 -112
  100. package/.codex/skills/team-planex/specs/pipelines.md +93 -93
  101. package/.codex/skills/team-quality-assurance/SKILL.md +60 -3
  102. package/.codex/skills/team-quality-assurance/roles/analyst/role.md +80 -80
  103. package/.codex/skills/team-quality-assurance/roles/coordinator/commands/analyze.md +72 -72
  104. package/.codex/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +108 -108
  105. package/.codex/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +243 -209
  106. package/.codex/skills/team-quality-assurance/roles/coordinator/role.md +176 -164
  107. package/.codex/skills/team-quality-assurance/roles/executor/role.md +66 -66
  108. package/.codex/skills/team-quality-assurance/roles/generator/role.md +68 -68
  109. package/.codex/skills/team-quality-assurance/roles/scout/role.md +67 -67
  110. package/.codex/skills/team-quality-assurance/roles/strategist/role.md +71 -71
  111. package/.codex/skills/team-quality-assurance/specs/pipelines.md +115 -115
  112. package/.codex/skills/team-review/SKILL.md +58 -3
  113. package/.codex/skills/team-review/roles/coordinator/commands/analyze.md +71 -71
  114. package/.codex/skills/team-review/roles/coordinator/commands/dispatch.md +90 -90
  115. package/.codex/skills/team-review/roles/coordinator/commands/monitor.md +225 -185
  116. package/.codex/skills/team-review/roles/coordinator/role.md +175 -163
  117. package/.codex/skills/team-review/roles/fixer/role.md +76 -76
  118. package/.codex/skills/team-review/roles/reviewer/role.md +68 -68
  119. package/.codex/skills/team-review/roles/scanner/role.md +71 -71
  120. package/.codex/skills/team-review/specs/pipelines.md +102 -102
  121. package/.codex/skills/team-roadmap-dev/SKILL.md +55 -3
  122. package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/analyze.md +61 -61
  123. package/.codex/skills/team-roadmap-dev/roles/coordinator/commands/monitor.md +502 -468
  124. package/.codex/skills/team-roadmap-dev/roles/coordinator/role.md +335 -322
  125. package/.codex/skills/team-roadmap-dev/roles/executor/role.md +71 -71
  126. package/.codex/skills/team-roadmap-dev/roles/planner/role.md +76 -76
  127. package/.codex/skills/team-roadmap-dev/roles/verifier/role.md +74 -74
  128. package/.codex/skills/team-roadmap-dev/specs/pipelines.md +93 -93
  129. package/.codex/skills/team-tech-debt/SKILL.md +56 -3
  130. package/.codex/skills/team-tech-debt/roles/assessor/role.md +69 -69
  131. package/.codex/skills/team-tech-debt/roles/coordinator/commands/analyze.md +47 -47
  132. package/.codex/skills/team-tech-debt/roles/coordinator/commands/monitor.md +272 -231
  133. package/.codex/skills/team-tech-debt/roles/coordinator/role.md +172 -160
  134. package/.codex/skills/team-tech-debt/roles/executor/role.md +76 -76
  135. package/.codex/skills/team-tech-debt/roles/planner/role.md +69 -69
  136. package/.codex/skills/team-tech-debt/roles/scanner/role.md +82 -82
  137. package/.codex/skills/team-tech-debt/roles/validator/role.md +75 -75
  138. package/.codex/skills/team-tech-debt/specs/pipelines.md +47 -47
  139. package/.codex/skills/team-testing/SKILL.md +72 -3
  140. package/.codex/skills/team-testing/roles/analyst/role.md +95 -95
  141. package/.codex/skills/team-testing/roles/coordinator/commands/analyze.md +70 -70
  142. package/.codex/skills/team-testing/roles/coordinator/commands/dispatch.md +106 -106
  143. package/.codex/skills/team-testing/roles/coordinator/commands/monitor.md +283 -242
  144. package/.codex/skills/team-testing/roles/coordinator/role.md +184 -172
  145. package/.codex/skills/team-testing/roles/executor/role.md +96 -96
  146. package/.codex/skills/team-testing/roles/generator/role.md +95 -95
  147. package/.codex/skills/team-testing/roles/strategist/role.md +83 -83
  148. package/.codex/skills/team-testing/specs/pipelines.md +101 -101
  149. package/.codex/skills/team-uidesign/SKILL.md +65 -3
  150. package/.codex/skills/team-uidesign/roles/coordinator/commands/analyze.md +59 -59
  151. package/.codex/skills/team-uidesign/roles/coordinator/commands/dispatch.md +156 -156
  152. package/.codex/skills/team-uidesign/roles/coordinator/commands/monitor.md +234 -194
  153. package/.codex/skills/team-uidesign/roles/coordinator/role.md +211 -199
  154. package/.codex/skills/team-uidesign/roles/designer/role.md +69 -69
  155. package/.codex/skills/team-uidesign/roles/implementer/role.md +72 -72
  156. package/.codex/skills/team-uidesign/roles/researcher/role.md +82 -82
  157. package/.codex/skills/team-uidesign/roles/reviewer/role.md +67 -67
  158. package/.codex/skills/team-uidesign/specs/pipelines.md +76 -76
  159. package/.codex/skills/team-ultra-analyze/SKILL.md +73 -3
  160. package/.codex/skills/team-ultra-analyze/roles/analyst/role.md +90 -90
  161. package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/analyze.md +73 -73
  162. package/.codex/skills/team-ultra-analyze/roles/coordinator/commands/monitor.md +50 -9
  163. package/.codex/skills/team-ultra-analyze/roles/coordinator/role.md +255 -243
  164. package/.codex/skills/team-ultra-analyze/roles/discussant/role.md +104 -104
  165. package/.codex/skills/team-ultra-analyze/roles/explorer/role.md +74 -74
  166. package/.codex/skills/team-ultra-analyze/roles/synthesizer/role.md +78 -78
  167. package/.codex/skills/team-ultra-analyze/specs/pipelines.md +64 -64
  168. package/.codex/skills/team-ux-improve/SKILL.md +64 -3
  169. package/.codex/skills/team-ux-improve/roles/coordinator/commands/analyze.md +62 -62
  170. package/.codex/skills/team-ux-improve/roles/coordinator/commands/dispatch.md +233 -233
  171. package/.codex/skills/team-ux-improve/roles/coordinator/commands/monitor.md +195 -160
  172. package/.codex/skills/team-ux-improve/roles/coordinator/role.md +170 -158
  173. package/.codex/skills/team-ux-improve/roles/designer/role.md +122 -122
  174. package/.codex/skills/team-ux-improve/roles/diagnoser/role.md +93 -93
  175. package/.codex/skills/team-ux-improve/roles/explorer/role.md +77 -77
  176. package/.codex/skills/team-ux-improve/roles/implementer/role.md +102 -102
  177. package/.codex/skills/team-ux-improve/roles/scanner/role.md +93 -93
  178. package/.codex/skills/team-ux-improve/roles/tester/role.md +84 -84
  179. package/.codex/skills/team-ux-improve/specs/pipelines.md +54 -54
  180. package/README.md +1 -0
  181. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: team-tech-debt
3
3
  description: Unified team skill for tech debt identification and remediation. Scans codebase for tech debt, assesses severity, plans and executes fixes with validation. Uses team-worker agent architecture with roles/ for domain logic. Coordinator orchestrates pipeline, workers are team-worker agents. Triggers on "team tech debt".
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(*), mcp__ccw-tools__read_file(*), mcp__ccw-tools__write_file(*), mcp__ccw-tools__edit_file(*), mcp__ccw-tools__team_msg(*)
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(*), mcp__ccw-tools__read_file(*), mcp__ccw-tools__write_file(*), mcp__ccw-tools__edit_file(*), mcp__ccw-tools__team_msg(*)
5
5
  ---
6
6
 
7
7
  # Team Tech Debt
@@ -55,7 +55,8 @@ Before calling ANY tool, apply this check:
55
55
 
56
56
  | Tool Call | Verdict | Reason |
57
57
  |-----------|---------|--------|
58
- | `spawn_agent`, `wait_agent`, `close_agent`, `send_input` | ALLOWED | Orchestration |
58
+ | `spawn_agent`, `wait_agent`, `close_agent`, `send_message`, `assign_task` | ALLOWED | Orchestration |
59
+ | `list_agents` | ALLOWED | Agent health check |
59
60
  | `request_user_input` | ALLOWED | User interaction |
60
61
  | `mcp__ccw-tools__team_msg` | ALLOWED | Message bus |
61
62
  | `Read/Write` on `.workflow/.team/` files | ALLOWED | Session state |
@@ -86,6 +87,8 @@ Coordinator spawns workers using this template:
86
87
  ```
87
88
  spawn_agent({
88
89
  agent_type: "team_worker",
90
+ task_name: "<task-id>",
91
+ fork_context: false,
89
92
  items: [
90
93
  { type: "text", text: `## Role Assignment
91
94
  role: <role>
@@ -109,7 +112,29 @@ pipeline_phase: <pipeline-phase>` },
109
112
  })
110
113
  ```
111
114
 
112
- After spawning, use `wait_agent({ ids: [...], timeout_ms: 900000 })` to collect results, then `close_agent({ id })` each worker.
115
+ After spawning, use `wait_agent({ targets: [...], timeout_ms: 900000 })` to collect results, then `close_agent({ target })` each worker.
116
+
117
+
118
+ ### Model Selection Guide
119
+
120
+ Tech debt follows a discovery-to-fix pipeline. Scanner is broad/fast, later stages need deeper reasoning.
121
+
122
+ | Role | reasoning_effort | Rationale |
123
+ |------|-------------------|-----------|
124
+ | scanner | medium | Broad codebase scan, pattern matching over deep analysis |
125
+ | assessor | high | Severity assessment requires understanding impact and risk |
126
+ | planner | high | Remediation planning must prioritize and sequence fixes |
127
+ | executor | high | Code fixes must preserve behavior while removing debt |
128
+ | validator | medium | Validation follows defined acceptance criteria |
129
+
130
+ ### Pipeline Pattern: Scanner Results Inform Downstream
131
+
132
+ Scanner discoveries flow through the pipeline — each stage narrows and refines:
133
+ 1. TDSCAN produces broad debt inventory
134
+ 2. TDEVAL assesses and prioritizes (filters low-impact items)
135
+ 3. TDPLAN creates sequenced fix plan from assessed items
136
+ 4. TDFIX implements fixes per plan
137
+ 5. TDVAL validates fixes against original debt findings
113
138
 
114
139
  ## User Commands
115
140
 
@@ -141,6 +166,34 @@ After spawning, use `wait_agent({ ids: [...], timeout_ms: 900000 })` to collect
141
166
  └── wisdom/ # Cross-task knowledge
142
167
  ```
143
168
 
169
+ ## v4 Agent Coordination
170
+
171
+ ### Message Semantics
172
+
173
+ | Intent | API | Example |
174
+ |--------|-----|---------|
175
+ | Queue supplementary info (don't interrupt) | `send_message` | Send scan findings to running assessor |
176
+ | Assign fix from remediation plan | `assign_task` | Assign TDFIX task from planner output |
177
+ | Check running agents | `list_agents` | Verify agent health during resume |
178
+
179
+ ### Agent Health Check
180
+
181
+ Use `list_agents({})` in handleResume and handleComplete:
182
+
183
+ ```
184
+ // Reconcile session state with actual running agents
185
+ const running = list_agents({})
186
+ // Compare with meta.json active tasks
187
+ // Reset orphaned tasks (in_progress but agent gone) to pending
188
+ ```
189
+
190
+ ### Named Agent Targeting
191
+
192
+ Workers are spawned with `task_name: "<task-id>"` enabling direct addressing:
193
+ - `send_message({ target: "TDSCAN-001", items: [...] })` -- send additional scan scope to scanner
194
+ - `assign_task({ target: "TDFIX-001", items: [...] })` -- assign fix task from planner output
195
+ - `close_agent({ target: "TDVAL-001" })` -- cleanup after validation
196
+
144
197
  ## Error Handling
145
198
 
146
199
  | Scenario | Resolution |
@@ -1,69 +1,69 @@
1
- ---
2
- role: assessor
3
- prefix: TDEVAL
4
- inner_loop: false
5
- message_types: [state_update]
6
- ---
7
-
8
- # Tech Debt Assessor
9
-
10
- Quantitative evaluator for tech debt items. Score each debt item on business impact (1-5) and fix cost (1-5), classify into priority quadrants, produce priority-matrix.json.
11
-
12
- ## Phase 2: Load Debt Inventory
13
-
14
- | Input | Source | Required |
15
- |-------|--------|----------|
16
- | Session path | task description (regex: `session:\s*(.+)`) | Yes |
17
- | .msg/meta.json | <session>/.msg/meta.json | Yes |
18
- | Debt inventory | meta.json:debt_inventory OR <session>/scan/debt-inventory.json | Yes |
19
-
20
- 1. Extract session path from task description
21
- 2. Read .msg/meta.json for team context
22
- 3. Load debt_inventory from shared memory or fallback to debt-inventory.json file
23
- 4. If debt_inventory is empty -> report empty assessment and exit
24
-
25
- ## Phase 3: Evaluate Each Item
26
-
27
- **Strategy selection**:
28
-
29
- | Item Count | Strategy |
30
- |------------|----------|
31
- | <= 10 | Heuristic: severity-based impact + effort-based cost |
32
- | 11-50 | CLI batch: single gemini analysis call |
33
- | > 50 | CLI chunked: batches of 25 items |
34
-
35
- **Impact Score Mapping** (heuristic):
36
-
37
- | Severity | Impact Score |
38
- |----------|-------------|
39
- | critical | 5 |
40
- | high | 4 |
41
- | medium | 3 |
42
- | low | 1 |
43
-
44
- **Cost Score Mapping** (heuristic):
45
-
46
- | Estimated Effort | Cost Score |
47
- |------------------|------------|
48
- | small | 1 |
49
- | medium | 3 |
50
- | large | 5 |
51
- | unknown | 3 |
52
-
53
- **Priority Quadrant Classification**:
54
-
55
- | Impact | Cost | Quadrant |
56
- |--------|------|----------|
57
- | >= 4 | <= 2 | quick-win |
58
- | >= 4 | >= 3 | strategic |
59
- | <= 3 | <= 2 | backlog |
60
- | <= 3 | >= 3 | defer |
61
-
62
- For CLI mode, prompt gemini with full debt summary requesting JSON array of `{id, impact_score, cost_score, risk_if_unfixed, priority_quadrant}`. Unevaluated items fall back to heuristic scoring.
63
-
64
- ## Phase 4: Generate Priority Matrix
65
-
66
- 1. Build matrix structure: evaluation_date, total_items, by_quadrant (grouped), summary (counts per quadrant)
67
- 2. Sort within each quadrant by impact_score descending
68
- 3. Write `<session>/assessment/priority-matrix.json`
69
- 4. Update .msg/meta.json with `priority_matrix` summary and evaluated `debt_inventory`
1
+ ---
2
+ role: assessor
3
+ prefix: TDEVAL
4
+ inner_loop: false
5
+ message_types: [state_update]
6
+ ---
7
+
8
+ # Tech Debt Assessor
9
+
10
+ Quantitative evaluator for tech debt items. Score each debt item on business impact (1-5) and fix cost (1-5), classify into priority quadrants, produce priority-matrix.json.
11
+
12
+ ## Phase 2: Load Debt Inventory
13
+
14
+ | Input | Source | Required |
15
+ |-------|--------|----------|
16
+ | Session path | task description (regex: `session:\s*(.+)`) | Yes |
17
+ | .msg/meta.json | <session>/.msg/meta.json | Yes |
18
+ | Debt inventory | meta.json:debt_inventory OR <session>/scan/debt-inventory.json | Yes |
19
+
20
+ 1. Extract session path from task description
21
+ 2. Read .msg/meta.json for team context
22
+ 3. Load debt_inventory from shared memory or fallback to debt-inventory.json file
23
+ 4. If debt_inventory is empty -> report empty assessment and exit
24
+
25
+ ## Phase 3: Evaluate Each Item
26
+
27
+ **Strategy selection**:
28
+
29
+ | Item Count | Strategy |
30
+ |------------|----------|
31
+ | <= 10 | Heuristic: severity-based impact + effort-based cost |
32
+ | 11-50 | CLI batch: single gemini analysis call |
33
+ | > 50 | CLI chunked: batches of 25 items |
34
+
35
+ **Impact Score Mapping** (heuristic):
36
+
37
+ | Severity | Impact Score |
38
+ |----------|-------------|
39
+ | critical | 5 |
40
+ | high | 4 |
41
+ | medium | 3 |
42
+ | low | 1 |
43
+
44
+ **Cost Score Mapping** (heuristic):
45
+
46
+ | Estimated Effort | Cost Score |
47
+ |------------------|------------|
48
+ | small | 1 |
49
+ | medium | 3 |
50
+ | large | 5 |
51
+ | unknown | 3 |
52
+
53
+ **Priority Quadrant Classification**:
54
+
55
+ | Impact | Cost | Quadrant |
56
+ |--------|------|----------|
57
+ | >= 4 | <= 2 | quick-win |
58
+ | >= 4 | >= 3 | strategic |
59
+ | <= 3 | <= 2 | backlog |
60
+ | <= 3 | >= 3 | defer |
61
+
62
+ For CLI mode, prompt gemini with full debt summary requesting JSON array of `{id, impact_score, cost_score, risk_if_unfixed, priority_quadrant}`. Unevaluated items fall back to heuristic scoring.
63
+
64
+ ## Phase 4: Generate Priority Matrix
65
+
66
+ 1. Build matrix structure: evaluation_date, total_items, by_quadrant (grouped), summary (counts per quadrant)
67
+ 2. Sort within each quadrant by impact_score descending
68
+ 3. Write `<session>/assessment/priority-matrix.json`
69
+ 4. Update .msg/meta.json with `priority_matrix` summary and evaluated `debt_inventory`
@@ -1,47 +1,47 @@
1
- # Analyze Task
2
-
3
- Parse user task -> detect tech debt signals -> assess complexity -> determine pipeline mode and roles.
4
-
5
- **CONSTRAINT**: Text-level analysis only. NO source code reading, NO codebase exploration.
6
-
7
- ## Signal Detection
8
-
9
- | Keywords | Signal | Mode Hint |
10
- |----------|--------|-----------|
11
- | 扫描, scan, 审计, audit | debt-scan | scan |
12
- | 评估, assess, quantify | debt-assess | scan |
13
- | 规划, plan, roadmap | debt-plan | targeted |
14
- | 修复, fix, remediate, clean | debt-fix | remediate |
15
- | 验证, validate, verify | debt-validate | remediate |
16
- | 定向, targeted, specific | debt-targeted | targeted |
17
-
18
- ## Complexity Scoring
19
-
20
- | Factor | Points |
21
- |--------|--------|
22
- | Full codebase scope | +2 |
23
- | Multiple debt dimensions | +1 per dimension (max 3) |
24
- | Large codebase (implied) | +1 |
25
- | Targeted specific items | -1 |
26
-
27
- Results: 1-3 Low (scan mode), 4-6 Medium (remediate), 7+ High (remediate + full pipeline)
28
-
29
- ## Pipeline Mode Determination
30
-
31
- | Score + Signals | Mode |
32
- |----------------|------|
33
- | scan/audit keywords | scan |
34
- | targeted/specific keywords | targeted |
35
- | Default | remediate |
36
-
37
- ## Output
38
-
39
- Write scope context to coordinator memory:
40
- ```json
41
- {
42
- "pipeline_mode": "<scan|remediate|targeted>",
43
- "scope": "<detected-scope>",
44
- "focus_dimensions": ["code", "architecture", "testing", "dependency", "documentation"],
45
- "complexity": { "score": 0, "level": "Low|Medium|High" }
46
- }
47
- ```
1
+ # Analyze Task
2
+
3
+ Parse user task -> detect tech debt signals -> assess complexity -> determine pipeline mode and roles.
4
+
5
+ **CONSTRAINT**: Text-level analysis only. NO source code reading, NO codebase exploration.
6
+
7
+ ## Signal Detection
8
+
9
+ | Keywords | Signal | Mode Hint |
10
+ |----------|--------|-----------|
11
+ | 扫描, scan, 审计, audit | debt-scan | scan |
12
+ | 评估, assess, quantify | debt-assess | scan |
13
+ | 规划, plan, roadmap | debt-plan | targeted |
14
+ | 修复, fix, remediate, clean | debt-fix | remediate |
15
+ | 验证, validate, verify | debt-validate | remediate |
16
+ | 定向, targeted, specific | debt-targeted | targeted |
17
+
18
+ ## Complexity Scoring
19
+
20
+ | Factor | Points |
21
+ |--------|--------|
22
+ | Full codebase scope | +2 |
23
+ | Multiple debt dimensions | +1 per dimension (max 3) |
24
+ | Large codebase (implied) | +1 |
25
+ | Targeted specific items | -1 |
26
+
27
+ Results: 1-3 Low (scan mode), 4-6 Medium (remediate), 7+ High (remediate + full pipeline)
28
+
29
+ ## Pipeline Mode Determination
30
+
31
+ | Score + Signals | Mode |
32
+ |----------------|------|
33
+ | scan/audit keywords | scan |
34
+ | targeted/specific keywords | targeted |
35
+ | Default | remediate |
36
+
37
+ ## Output
38
+
39
+ Write scope context to coordinator memory:
40
+ ```json
41
+ {
42
+ "pipeline_mode": "<scan|remediate|targeted>",
43
+ "scope": "<detected-scope>",
44
+ "focus_dimensions": ["code", "architecture", "testing", "dependency", "documentation"],
45
+ "complexity": { "score": 0, "level": "Low|Medium|High" }
46
+ }
47
+ ```