@gempack/squad-mcp 0.3.1

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 (81) hide show
  1. package/.claude-plugin/marketplace.json +20 -0
  2. package/.claude-plugin/plugin.json +20 -0
  3. package/CHANGELOG.md +282 -0
  4. package/LICENSE +201 -0
  5. package/NOTICE +11 -0
  6. package/README.md +164 -0
  7. package/agents/PO.md +84 -0
  8. package/agents/Senior-Architect.md +121 -0
  9. package/agents/Senior-DBA.md +137 -0
  10. package/agents/Senior-Dev-Reviewer.md +104 -0
  11. package/agents/Senior-Dev-Security.md +134 -0
  12. package/agents/Senior-Developer.md +180 -0
  13. package/agents/Senior-QA.md +146 -0
  14. package/agents/Skill-Squad-Dev.md +369 -0
  15. package/agents/Skill-Squad-Review.md +267 -0
  16. package/agents/TechLead-Consolidator.md +117 -0
  17. package/agents/TechLead-Planner.md +90 -0
  18. package/agents/_Severity-and-Ownership.md +68 -0
  19. package/commands/squad-review.md +68 -0
  20. package/commands/squad.md +81 -0
  21. package/dist/config/ownership-matrix.d.ts +48 -0
  22. package/dist/config/ownership-matrix.js +197 -0
  23. package/dist/config/ownership-matrix.js.map +1 -0
  24. package/dist/errors.d.ts +7 -0
  25. package/dist/errors.js +14 -0
  26. package/dist/errors.js.map +1 -0
  27. package/dist/exec/git.d.ts +17 -0
  28. package/dist/exec/git.js +0 -0
  29. package/dist/exec/git.js.map +1 -0
  30. package/dist/index.d.ts +2 -0
  31. package/dist/index.js +33 -0
  32. package/dist/index.js.map +1 -0
  33. package/dist/observability/logger.d.ts +23 -0
  34. package/dist/observability/logger.js +93 -0
  35. package/dist/observability/logger.js.map +1 -0
  36. package/dist/prompts/registry.d.ts +21 -0
  37. package/dist/prompts/registry.js +183 -0
  38. package/dist/prompts/registry.js.map +1 -0
  39. package/dist/resources/agent-loader.d.ts +20 -0
  40. package/dist/resources/agent-loader.js +122 -0
  41. package/dist/resources/agent-loader.js.map +1 -0
  42. package/dist/resources/registry.d.ts +13 -0
  43. package/dist/resources/registry.js +67 -0
  44. package/dist/resources/registry.js.map +1 -0
  45. package/dist/tools/agents.d.ts +22 -0
  46. package/dist/tools/agents.js +32 -0
  47. package/dist/tools/agents.js.map +1 -0
  48. package/dist/tools/classify-work-type.d.ts +28 -0
  49. package/dist/tools/classify-work-type.js +0 -0
  50. package/dist/tools/classify-work-type.js.map +1 -0
  51. package/dist/tools/compose-advisory-bundle.d.ts +75 -0
  52. package/dist/tools/compose-advisory-bundle.js +68 -0
  53. package/dist/tools/compose-advisory-bundle.js.map +1 -0
  54. package/dist/tools/compose-squad-workflow.d.ts +84 -0
  55. package/dist/tools/compose-squad-workflow.js +0 -0
  56. package/dist/tools/compose-squad-workflow.js.map +1 -0
  57. package/dist/tools/consolidate.d.ts +97 -0
  58. package/dist/tools/consolidate.js +75 -0
  59. package/dist/tools/consolidate.js.map +1 -0
  60. package/dist/tools/detect-changed-files.d.ts +35 -0
  61. package/dist/tools/detect-changed-files.js +0 -0
  62. package/dist/tools/detect-changed-files.js.map +1 -0
  63. package/dist/tools/registry.d.ts +26 -0
  64. package/dist/tools/registry.js +169 -0
  65. package/dist/tools/registry.js.map +1 -0
  66. package/dist/tools/score-risk.d.ts +38 -0
  67. package/dist/tools/score-risk.js +34 -0
  68. package/dist/tools/score-risk.js.map +1 -0
  69. package/dist/tools/select-squad.d.ts +46 -0
  70. package/dist/tools/select-squad.js +0 -0
  71. package/dist/tools/select-squad.js.map +1 -0
  72. package/dist/tools/slice-files.d.ts +34 -0
  73. package/dist/tools/slice-files.js +0 -0
  74. package/dist/tools/slice-files.js.map +1 -0
  75. package/dist/tools/validate-plan-text.d.ts +24 -0
  76. package/dist/tools/validate-plan-text.js +0 -0
  77. package/dist/tools/validate-plan-text.js.map +1 -0
  78. package/dist/util/path-safety.d.ts +28 -0
  79. package/dist/util/path-safety.js +0 -0
  80. package/dist/util/path-safety.js.map +1 -0
  81. package/package.json +71 -0
@@ -0,0 +1,369 @@
1
+ # Skill: Squad Dev
2
+
3
+ ## Objective
4
+ Development skill that takes a user prompt, builds an implementation plan, runs gated advisory with specialized agents, implements, and consolidates via TechLead-Consolidator. Codex is optional (`/squad --codex`) and may be auto-suggested when the plan is high-risk.
5
+
6
+ ## Skill Name
7
+ `/squad`
8
+
9
+ ## Agent Registry
10
+
11
+ | subagent_type | Purpose |
12
+ | -------------------------- | ------------------------------------------- |
13
+ | `po` | Business value, UX, requirements fit |
14
+ | `tech-lead-planner` | Pre-implementation trade-offs and viability |
15
+ | `tech-lead-consolidator` | Post-implementation final verdict |
16
+ | `senior-architect` | Boundaries, DI, scalability |
17
+ | `senior-dba` | Queries, migrations, EF, cache |
18
+ | `senior-developer` | Correctness, robustness, APIs, observability|
19
+ | `senior-dev-reviewer` | Readability, idioms, naming |
20
+ | `senior-dev-security` | OWASP, authz, sensitive data |
21
+ | `senior-qa` | Test coverage, strategy, reliability |
22
+
23
+ ## General Flow
24
+
25
+ ```
26
+ User -> /squad {prompt}
27
+ |
28
+ v
29
+ [0. Pre-Check]
30
+ git status, current branch, uncommitted work warning
31
+ |
32
+ v
33
+ [1. Understanding + Risk Classification]
34
+ Type of work (Feature / Bug Fix / Refactor / Performance / Security / Business Rule)
35
+ Risk score (Low / Medium / High) from signals:
36
+ - auth / money / migration
37
+ - >8 files / new module / API contract change
38
+ |
39
+ v
40
+ [2. Plan + TechLead-Planner in parallel]
41
+ Build plan AND run tech-lead-planner simultaneously;
42
+ absorb planner's required changes before showing the user.
43
+ |
44
+ v
45
+ [3. (optional) Codex plan review]
46
+ Triggered by --codex or by user-confirmed auto-suggestion on High risk.
47
+ |
48
+ v
49
+ [4. Gate 1 — User Approval]
50
+ Present final plan; wait for explicit approval.
51
+ |
52
+ v
53
+ [5. Advisory Squad (parallel, sliced prompts)]
54
+ Each agent receives only the slice matching its ownership.
55
+ |
56
+ v
57
+ [6. Gate 2 — Blocker Halt]
58
+ If any agent raised a Blocker, halt and ask the user.
59
+ |
60
+ v
61
+ [7. (optional) Escalation Round]
62
+ For Blocker/Major items forwarded to agents not originally selected:
63
+ spawn that agent only for that item.
64
+ |
65
+ v
66
+ [8. Implementation]
67
+ Claude implements, guided by advisory acceptance criteria.
68
+ |
69
+ v
70
+ [9. (optional) Codex implementation review]
71
+ Delta only, not the whole project.
72
+ |
73
+ v
74
+ [10. TechLead-Consolidator]
75
+ Aggregates all reports, arbitrates, emits final verdict + rollback plan.
76
+ |
77
+ v
78
+ [11. Gate 3 — Reject Loop (max 2 iterations)]
79
+ REJECTED -> apply fixes, re-run affected agents on the delta, re-consolidate.
80
+ |
81
+ v
82
+ [12. Delivery]
83
+ Summary + modified files + tests + validations + rollback plan + next steps.
84
+ ```
85
+
86
+ ## Phase Details
87
+
88
+ ### Phase 0 — Pre-Check
89
+ 1. Run `git status`; capture current branch.
90
+ 2. If uncommitted, unrelated changes are present, warn and ask the user before proceeding.
91
+ 3. Record starting SHA for the delivery report.
92
+
93
+ ### Phase 1 — Understanding and Risk
94
+ - Read `$ARGUMENTS`; detect `--codex`.
95
+ - Classify type: Feature / Bug Fix / Refactor / Performance / Security / Business Rule.
96
+ - Explore the codebase (Glob, Grep, Read) to locate the affected area and patterns.
97
+ - Compute risk score (1 point per Yes):
98
+ - Touches authentication, authorization, or sessions
99
+ - Touches money, balances, payments, or financial adjustments
100
+ - Touches migrations, schema, or destructive data operations
101
+ - Touches more than ~8 production files
102
+ - Introduces a new module, integration, or external dependency
103
+ - Changes public API contracts
104
+ - 0–1 = Low, 2–3 = Medium, 4+ = High
105
+
106
+ ### Phase 2 — Plan + Planner in Parallel
107
+
108
+ Build the plan in this format and run `tech-lead-planner` at the same time. Absorb the planner's required changes before user approval.
109
+
110
+ ```
111
+ ## Implementation Plan
112
+
113
+ ### Objective
114
+ What will be done and why.
115
+
116
+ ### Type
117
+ Feature / Bug Fix / Refactor / Performance / Security / Business Rule
118
+
119
+ ### Risk Score
120
+ Low / Medium / High — contributing signals
121
+
122
+ ### Scope
123
+
124
+ #### Files to Modify
125
+ | File | Action | Change Description |
126
+ |------|--------|--------------------|
127
+ | ... | Create / Modify / Delete | What changes and why |
128
+
129
+ #### Tests
130
+ | Test File | Type | What It Covers |
131
+ |-----------|------|----------------|
132
+ | ... | Unit / Integration | Scenario covered |
133
+
134
+ ### Execution Order
135
+ 1. Step 1 — justification
136
+ 2. Step 2 — justification
137
+
138
+ ### Design Decisions
139
+ | Decision | Alternatives | Justification |
140
+ |----------|--------------|---------------|
141
+ | ... | Option A, B | Why this one |
142
+
143
+ ### Risks
144
+ | Risk | Impact | Mitigation |
145
+ |------|--------|------------|
146
+ | ... | ... | ... |
147
+
148
+ ### Selected Squad
149
+ | Agent | Why Selected |
150
+ |-------|--------------|
151
+ | ... | What they will assess |
152
+
153
+ ### Planner Adjustments
154
+ - Change absorbed from tech-lead-planner (if any)
155
+ ```
156
+
157
+ If risk is High and `--codex` was not passed, **auto-suggest Codex** with a one-sentence justification and ask the user. Do not force it.
158
+
159
+ ### Phase 3 — Codex Plan Review (optional)
160
+
161
+ Only if `--codex` was passed OR the user accepted the auto-suggestion. Use the Agent tool with `subagent_type: "codex:codex-rescue"`.
162
+
163
+ Prompt:
164
+
165
+ ```
166
+ I am planning the following implementation. I want a second opinion.
167
+
168
+ ## Project Context
169
+ {stack, patterns, affected area}
170
+
171
+ ## Relevant Code
172
+ {snippets from the affected area}
173
+
174
+ ## Proposed Plan
175
+ {full plan from Phase 2, including Planner adjustments}
176
+
177
+ Critically assess:
178
+ 1. Is the approach correct? Is there a better way?
179
+ 2. What risks are not listed?
180
+ 3. Do the design decisions make sense?
181
+ 4. Is the execution order correct?
182
+ 5. Is the scope missing anything (files, tests, configs)?
183
+ 6. Are there edge cases to consider?
184
+
185
+ Be direct. If the plan is good, say so. Do not invent problems.
186
+ ```
187
+
188
+ Absorb relevant suggestions and show an adjusted-plan diff summary.
189
+
190
+ ### Phase 4 — Gate 1: User Approval
191
+ Present the final plan and wait for explicit approval. Do not proceed without it.
192
+
193
+ ### Phase 5 — Advisory Squad
194
+
195
+ **Selection by work type:**
196
+
197
+ | Work Type | Core Agents | Conditional Agents |
198
+ | ------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------- |
199
+ | Feature | po, senior-developer, senior-qa | +senior-dba if data, +senior-architect if new module, +senior-dev-security if endpoint |
200
+ | Bug Fix | senior-developer, senior-qa | +senior-dba if query/cache, +senior-dev-security if security bug |
201
+ | Refactor | senior-architect, senior-dev-reviewer, senior-qa | +senior-developer if behavior changes |
202
+ | Performance | senior-developer, senior-dba | +senior-architect if structural |
203
+ | Security | senior-dev-security, senior-developer | +senior-dev-reviewer if large code change |
204
+ | Business Rule | po, senior-developer, senior-qa | +senior-dba if data-bound |
205
+
206
+ **Hard conditionals based on touched files:**
207
+ - Query / Migration / EF / Cache → `senior-dba` required
208
+ - DI / Boundaries / new project or module → `senior-architect` required
209
+ - Endpoint / Auth / Middleware → `senior-dev-security` required
210
+ - Tests added or modified → `senior-qa` required
211
+
212
+ `tech-lead-planner` already reported in Phase 2 — does not run here.
213
+ `tech-lead-consolidator` runs only in Phase 10.
214
+
215
+ **Sliced prompts** — each agent gets only the slice of the change matching its ownership:
216
+
217
+ ```
218
+ You are part of a development squad advisory round.
219
+
220
+ ## Approved Plan
221
+ {full plan}
222
+
223
+ ## Your Slice
224
+ {files + snippets relevant to your ownership — not the whole codebase}
225
+
226
+ ## Your Task
227
+ Based on the plan and your role:
228
+ 1. Does the plan make sense in your area of expertise?
229
+ 2. What domain-specific risks do you see?
230
+ 3. What must the implementation take care of?
231
+ 4. Define acceptance criteria the implementation must meet in your domain.
232
+
233
+ Use the output format defined in your system prompt.
234
+ Stay inside your ownership. Forward anything outside your scope.
235
+ ```
236
+
237
+ Send all selected agents in a single message with multiple tool calls so they run in parallel.
238
+
239
+ ### Phase 6 — Gate 2: Blocker Halt
240
+ - Any advisory Blocker → HALT. Surface blockers and ask the user how to proceed (revise plan, accept risk, abort).
241
+ - Major/Minor → proceed, capturing them as acceptance criteria for implementation.
242
+
243
+ ### Phase 7 — Escalation Round (optional)
244
+ If an advisory agent forwarded a Blocker/Major to an agent that was not selected, spawn that missing agent with only that forwarded item (not a full review).
245
+
246
+ ### Phase 8 — Implementation
247
+ - Follow the plan and advisory acceptance criteria.
248
+ - Read → Edit/Write each file. Respect project patterns.
249
+ - Method names in English. No emojis.
250
+ - Update tests per plan and `senior-qa` recommendations.
251
+ - If possible, run the project test suite.
252
+
253
+ ### Phase 9 — Codex Implementation Review (optional)
254
+
255
+ Only if Codex was enabled for this session. Send only the delta.
256
+
257
+ ```
258
+ I implemented the changes below. Please review.
259
+
260
+ ## Original Plan
261
+ {summarized plan}
262
+
263
+ ## Changes Made
264
+ {only modified files/snippets — NOT the whole project}
265
+
266
+ ## Absorbed Advisory
267
+ {summary of agent findings and how they were applied}
268
+
269
+ Review only these changes:
270
+ 1. Unhandled bugs or edge cases?
271
+ 2. Does the implementation follow the plan?
272
+ 3. Performance, security, or robustness issues?
273
+ 4. Are the tests adequate?
274
+ 5. Anything missing?
275
+
276
+ Be direct. If it is good, say so. Do not request cosmetic refactors.
277
+ ```
278
+
279
+ - Critical: fix now and re-submit.
280
+ - Minor: fix and continue.
281
+ - Suggestion: record for the user.
282
+
283
+ ### Phase 10 — TechLead-Consolidator
284
+
285
+ Spawn `tech-lead-consolidator` with every advisory report and the delivered delta. Consolidator produces the final verdict and rollback plan.
286
+
287
+ ### Phase 11 — Gate 3: Reject Loop (max 2 iterations)
288
+ - APPROVED / CHANGES REQUIRED (non-blocker) → apply fixes, then deliver.
289
+ - REJECTED → apply the fix list, re-run affected agents on the delta, re-consolidate.
290
+ - After 2 iterations, stop and hand the situation to the user.
291
+
292
+ ### Phase 12 — Delivery
293
+
294
+ ```
295
+ ## Squad Dev — Completed
296
+
297
+ ### Objective
298
+ {what was done}
299
+
300
+ ### Squad
301
+ {agents that participated}
302
+
303
+ ### Implementation Summary
304
+ - {change 1}
305
+ - {change 2}
306
+
307
+ ### Modified Files
308
+ | File | Action | Description |
309
+ |------|--------|-------------|
310
+ | ... | Created / Modified | ... |
311
+
312
+ ### Tests
313
+ | Test | Type | Status |
314
+ |------|------|--------|
315
+ | ... | Unit / Integration | Added / Modified |
316
+
317
+ ### Validations
318
+ | Stage | Status | Notes |
319
+ |-------|--------|-------|
320
+ | Planner (pre-impl) | Summary | ... |
321
+ | Advisory squad | Summary | ... |
322
+ | Escalation round | Used / Not used | ... |
323
+ | Consolidator (post-impl) | Final status | ... |
324
+ | Codex (plan) | Used / Not used | ... |
325
+ | Codex (review) | Used / Not used | ... |
326
+ | Loop iterations | N / 2 | ... |
327
+
328
+ ### Residual Risks
329
+ - Risk the user should know about (if any)
330
+
331
+ ### Rollback Plan
332
+ - How to revert if production breaks (commands, flags, data steps)
333
+ - Data considerations (is rollback data-safe?)
334
+
335
+ ### Next Steps
336
+ - Pending action (manual migration, env config, etc.) if any
337
+ ```
338
+
339
+ ## Skill Parameters
340
+
341
+ | Parameter | Type | Default | Description |
342
+ |-----------|--------|---------|-------------|
343
+ | --codex | flag | off | Enable Codex for plan validation and implementation review |
344
+ | squad | string | auto | Specific squad or "auto" for detection |
345
+ | plan-only | bool | false | Build the plan only, do not execute |
346
+ | verbose | bool | false | Show individual agent reports inline |
347
+
348
+ ## Usage Examples
349
+
350
+ ```
351
+ /squad implement dollar balance endpoint
352
+ -> No Codex
353
+ -> Plan + Planner -> User approves -> Advisory -> Implement -> Consolidator
354
+
355
+ /squad --codex fix cache bug in ParameterService
356
+ -> With Codex
357
+ -> Plan + Planner -> Codex validates -> User approves -> Advisory -> Implement -> Codex reviews -> Consolidator
358
+
359
+ /squad refactor ExchangeUsdService to split responsibilities
360
+ -> Plan + Planner -> User approves -> Advisory -> Implement -> Consolidator
361
+ ```
362
+
363
+ ## Inviolable Rules
364
+ 1. Every implementation starts from an approved plan.
365
+ 2. Codex only runs with user consent (flag or confirmed auto-suggestion).
366
+ 3. TechLead-Consolidator always delivers the final verdict.
367
+ 4. Advisory agents do not implement — they assess and recommend; Claude implements.
368
+ 5. Method names in English. No emojis.
369
+ 6. Never run commit or push.
@@ -0,0 +1,267 @@
1
+ # Skill: Squad Review
2
+
3
+ ## Objective
4
+ Skill that takes a user prompt, interprets intent, selects the relevant agents, distributes tasks in parallel, and consolidates the results through TechLead-Consolidator.
5
+
6
+ ## Skill Name
7
+ `/squad-review`
8
+
9
+ ## How It Works
10
+
11
+ ### General Flow
12
+
13
+ ```
14
+ User -> /squad-review {prompt}
15
+ |
16
+ v
17
+ [1. Prompt Analysis]
18
+ Understand what the user wants:
19
+ - PR / branch review?
20
+ - Review of specific file(s)?
21
+ - Security-focused analysis?
22
+ - Performance analysis?
23
+ - Full review (all agents)?
24
+ |
25
+ v
26
+ [2. Squad Selection]
27
+ Based on intent, assemble the team:
28
+ - Decide which agents to run
29
+ - Decide what context each agent needs
30
+ |
31
+ v
32
+ [3. Context Collection]
33
+ Prepare material for the agents:
34
+ - git diff (current branch vs. main/master)
35
+ - Modified files
36
+ - Related test files
37
+ - Additional context from the user's prompt
38
+ |
39
+ v
40
+ [4. Parallel Dispatch]
41
+ Spawn the selected agents in parallel,
42
+ each with its specialized prompt.
43
+ |
44
+ v
45
+ [5. Consolidation (TechLead-Consolidator)]
46
+ Consolidator receives every report and produces
47
+ the final consolidated output.
48
+ |
49
+ v
50
+ [6. Output to User]
51
+ Formatted consolidated report.
52
+ ```
53
+
54
+ ### Pre-defined Squads
55
+
56
+ The user can request a generic review or target a focus area. The skill maps the intent to the correct squad.
57
+
58
+ #### Full Squad (default for PR review)
59
+ All specialized agents + TechLead-Consolidator.
60
+ - **When**: Complete PR review, branch ready to merge
61
+ - **Triggers**: `/squad-review`, `/squad-review PR`, `/squad-review branch`
62
+
63
+ #### Code Squad
64
+ `senior-dev-reviewer` + `senior-developer` + `senior-qa` + `tech-lead-consolidator`
65
+ - **When**: Focused review on code quality and correctness
66
+ - **Triggers**: `/squad-review code`
67
+
68
+ #### Data Squad
69
+ `senior-dba` + `senior-developer` + `tech-lead-consolidator`
70
+ - **When**: Changes to queries, migrations, cache, EF
71
+ - **Triggers**: `/squad-review data`
72
+
73
+ #### Security Squad
74
+ `senior-dev-security` + `senior-developer` + `senior-dev-reviewer` + `tech-lead-consolidator`
75
+ - **When**: Focused security review
76
+ - **Triggers**: `/squad-review security`
77
+
78
+ #### Architecture Squad
79
+ `senior-architect` + `senior-developer` + `senior-dba` + `tech-lead-consolidator`
80
+ - **When**: Structural changes, new modules, large refactors
81
+ - **Triggers**: `/squad-review arch`
82
+
83
+ #### Business Squad
84
+ `po` + `senior-developer` + `senior-qa` + `tech-lead-consolidator`
85
+ - **When**: New feature, business-rule change
86
+ - **Triggers**: `/squad-review business`
87
+
88
+ ### Automatic Squad Detection
89
+
90
+ When the user does not specify a squad, the skill analyzes the modified files to infer it:
91
+
92
+ | Modified Files | Selected Agents |
93
+ |----------------|-----------------|
94
+ | Controllers, DTOs, Requests, Responses | senior-developer, senior-dev-security, po |
95
+ | Services (business logic) | senior-developer, senior-dev-reviewer, po, senior-qa |
96
+ | Repositories, Queries | senior-dba, senior-developer |
97
+ | Migrations, Schema | senior-dba, senior-architect |
98
+ | Startup, Program.cs, DI | senior-architect, senior-dev-security |
99
+ | appsettings, configs | senior-dev-security, senior-architect |
100
+ | Tests | senior-qa, senior-dev-reviewer |
101
+ | Middlewares, Filters | senior-dev-security, senior-architect, senior-developer |
102
+ | Dockerfile, pipeline, CI/CD | tech-lead-consolidator |
103
+ | Multiple layers | Full Squad |
104
+
105
+ TechLead-Consolidator is mandatory in any squad.
106
+
107
+ ## Prompt for Each Agent
108
+
109
+ Every agent receives a standard prompt:
110
+
111
+ ```
112
+ You are part of a squad review.
113
+
114
+ ## Context
115
+ {description of what the user asked}
116
+
117
+ ## Files to Review
118
+ {list of modified files with diff}
119
+
120
+ ## Related Test Files
121
+ {tests found for the modified files}
122
+
123
+ ## Your Task
124
+ Analyze the files above according to your role and responsibilities.
125
+ Produce your report in the defined output format.
126
+ Stay inside your ownership — do not invade other agents' scope.
127
+ If you see something outside your scope, add it to Forwarded Items.
128
+ ```
129
+
130
+ ## TechLead-Consolidator Prompt
131
+
132
+ ```
133
+ You are acting as TechLead-Consolidator for a squad review.
134
+
135
+ ## Context
136
+ {description of what the user asked}
137
+
138
+ ## Reports Received
139
+ {report from agent 1}
140
+ ---
141
+ {report from agent 2}
142
+ ---
143
+ {report from agent N}
144
+
145
+ ## Your Task
146
+ 1. Analyze every received report
147
+ 2. Add your own TechLead-Consolidator assessment (design, trade-offs, CI/CD, tech debt)
148
+ 3. Consolidate into the TechLead-Consolidator output format
149
+ 4. Arbitrate conflicts between agents
150
+ 5. Deliver the final merge verdict
151
+
152
+ IMPORTANT: In the "Reports Consolidation" section, include a summary for each agent.
153
+ If an agent did not participate, mark as "Not evaluated".
154
+ ```
155
+
156
+ ## Implementation
157
+
158
+ ### Step 1: Collect Context
159
+ ```
160
+ - git status
161
+ - git diff master...HEAD (or specified branch)
162
+ - List modified files
163
+ - Find related tests (by naming convention)
164
+ ```
165
+
166
+ ### Step 2: Determine Squad
167
+ ```
168
+ - If the user specified one, use it
169
+ - Otherwise, analyze modified files and infer the squad
170
+ - Always include TechLead-Consolidator
171
+ ```
172
+
173
+ ### Step 3: Spawn Agents in Parallel
174
+ ```
175
+ - Use the Agent tool with subagent_type for each agent
176
+ - All in parallel (single message with multiple tool calls)
177
+ - Each agent receives: context + diff + its specialized prompt
178
+ ```
179
+
180
+ ### Step 4: Collect Results
181
+ ```
182
+ - Wait for all agents to finish
183
+ - Gather every report
184
+ ```
185
+
186
+ ### Step 5: Consolidate via TechLead-Consolidator
187
+ ```
188
+ - Spawn tech-lead-consolidator with every report
189
+ - Consolidator produces the final verdict
190
+ ```
191
+
192
+ ### Step 6: Present to the User
193
+ ```
194
+ - Display the consolidated report
195
+ - If any agent raised a Blocker, highlight it at the top
196
+ ```
197
+
198
+ ## Final Output
199
+
200
+ ```
201
+ # Squad Review — {short description}
202
+
203
+ ## Squad: {participating agents}
204
+ ## Scope: {reviewed files}
205
+
206
+ ---
207
+
208
+ {Consolidated report from TechLead-Consolidator}
209
+
210
+ ---
211
+
212
+ ## Individual Reports
213
+
214
+ <details>
215
+ <summary>PO — {status}</summary>
216
+ {full report}
217
+ </details>
218
+
219
+ <details>
220
+ <summary>Senior-Architect — {status}</summary>
221
+ {full report}
222
+ </details>
223
+
224
+ ... (one per agent that participated)
225
+ ```
226
+
227
+ ## Skill Parameters
228
+
229
+ | Parameter | Type | Default | Description |
230
+ |-----------|--------|---------|-------------|
231
+ | squad | string | auto | Specific squad or "auto" for automatic detection |
232
+ | scope | string | branch | "branch" (branch diff), "file:path" (specific file), "commit:hash" |
233
+ | base | string | master | Base branch for the diff |
234
+ | verbose | bool | false | If true, show full individual reports; if false, only the consolidated one |
235
+
236
+ ## Usage Examples
237
+
238
+ ```
239
+ /squad-review
240
+ -> Auto-detects the squad; reviews diff of current branch vs. master
241
+
242
+ /squad-review security
243
+ -> Security squad; reviews current branch diff
244
+
245
+ /squad-review arch Services/ParameterService.cs
246
+ -> Architecture squad; focused on the specified file
247
+
248
+ /squad-review full
249
+ -> Every agent; complete review
250
+ ```
251
+
252
+ ## Considerations
253
+
254
+ ### Performance
255
+ - Parallel agents minimize total time
256
+ - TechLead-Consolidator runs sequentially after the others (needs their reports)
257
+ - For large reviews, consider splitting by area or module
258
+
259
+ ### Cost
260
+ - Each agent consumes tokens independently
261
+ - Full squad = 7 specialist agents + TechLead-Consolidator = 8 calls
262
+ - For small changes, auto-selection avoids unnecessary agents
263
+
264
+ ### Limitations
265
+ - Agents do not talk to each other (only through TechLead-Consolidator)
266
+ - Forwarded items are informational — they do not trigger new executions in this skill
267
+ - TechLead-Consolidator consolidates but does not re-execute agents