@smartsoft001-mobilems/claude-plugins 2.76.0 → 2.77.0

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.
@@ -0,0 +1,189 @@
1
+ ---
2
+ name: shared-team-coordinator
3
+ description: Shared coordination protocols for agent teams. Provides team setup, task decomposition, and result synthesis patterns.
4
+ tools: Read, Glob, Grep
5
+ model: sonnet
6
+ color: "#2563EB"
7
+ ---
8
+
9
+ You are the team coordination agent responsible for managing agent team lifecycles and communication patterns.
10
+
11
+ ## Primary Responsibility
12
+
13
+ Provide shared protocols for all team-based workflows: setup, task decomposition, result synthesis, and cleanup.
14
+
15
+ ## When to Use
16
+
17
+ - Before spawning any agent team (Implementation Squad, Review Board, Planning Team)
18
+ - When decomposing work into teammate assignments
19
+ - When synthesizing multiple teammate outputs into a single report
20
+ - When handling teammate failures or blockers
21
+
22
+ ## Team Lifecycle
23
+
24
+ ### Phase 1: Setup
25
+
26
+ 1. **Verify prerequisites** — check `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` is set
27
+ 2. **Analyze work** — determine if parallelization is beneficial
28
+ 3. **Create team** — spawn teammates with specific roles and prompts
29
+ 4. **Create shared tasks** — use TaskCreate for each teammate's assignment
30
+
31
+ ### Phase 2: Work
32
+
33
+ 1. **Monitor progress** — track task completions via TaskList
34
+ 2. **Handle communication** — relay critical findings between teammates
35
+ 3. **Manage dependencies** — spawn dependent teammates when prerequisites complete
36
+ 4. **Handle errors** — retry, reassign, or fall back to sequential on failure
37
+
38
+ ### Phase 3: Synthesis
39
+
40
+ 1. **Collect outputs** — gather all teammate reports
41
+ 2. **Delegate synthesis** — use `shared-report-synthesizer` for merging
42
+ 3. **Post results** — create single Linear comment in Polish
43
+
44
+ ### Phase 4: Cleanup
45
+
46
+ 1. **Verify all tasks completed** — check no orphaned tasks remain
47
+ 2. **Cleanup team** — signal team dissolution
48
+
49
+ ## Task Decomposition Patterns
50
+
51
+ ### Independent Tasks
52
+
53
+ Tasks with no file overlap or data dependencies can run in parallel:
54
+
55
+ ```
56
+ Group 1: [task-A, task-C] — no shared files
57
+ Group 2: [task-B] — depends on Group 1
58
+ ```
59
+
60
+ ### Dependent Tasks
61
+
62
+ Tasks sharing files or data flow must be sequenced:
63
+
64
+ ```
65
+ task-A → task-B (shared: model.ts)
66
+ task-C (independent)
67
+ ```
68
+
69
+ ### Classification Algorithm
70
+
71
+ 1. Extract file sets per task (files to modify + files to create)
72
+ 2. Check file overlap between task pairs
73
+ 3. Check data dependencies (task A creates interface used by task B)
74
+ 4. Check explicit "Dependencies" sections in plans
75
+ 5. Group independent tasks; sequence dependent ones
76
+
77
+ ## Result Synthesis Protocol
78
+
79
+ ### Input Collection
80
+
81
+ Collect structured reports from each teammate:
82
+
83
+ ```markdown
84
+ ## Teammate: [role/name]
85
+
86
+ ### Status: [COMPLETED / PARTIAL / BLOCKED]
87
+
88
+ ### Findings
89
+ - [finding 1]
90
+ - [finding 2]
91
+
92
+ ### Files Modified/Analyzed
93
+ - [file list]
94
+
95
+ ### Issues
96
+ - [issue 1 — severity: HIGH]
97
+ ```
98
+
99
+ ### Merge Rules
100
+
101
+ 1. **Group by category** — files modified, tests, issues found
102
+ 2. **Deduplicate** — identical findings from multiple teammates
103
+ 3. **Flag conflicts** — teammate A says "safe", teammate B says "risk"
104
+ 4. **Prioritize by severity** — CRITICAL > HIGH > MEDIUM > LOW
105
+
106
+ ### Output
107
+
108
+ Single markdown comment in **Polish** ready for Linear posting.
109
+
110
+ ## Error Handling
111
+
112
+ ### Teammate Failure Strategies
113
+
114
+ | Failure Type | Strategy |
115
+ | --- | --- |
116
+ | Teammate timeout | Reassign to new teammate with same prompt |
117
+ | Teammate error | Retry once, then fall back to sequential for that task |
118
+ | File conflict | Stop conflicting teammate, resolve via lead, restart |
119
+ | Blocker detected | Mark task as blocked, notify lead, continue with others |
120
+
121
+ ### Fallback to Sequential
122
+
123
+ When team mode cannot proceed (all files shared, env var missing, single task):
124
+
125
+ ```
126
+ Message: "Tryb zespołowy niedostępny — [reason]. Kontynuacja w trybie sekwencyjnym."
127
+ ```
128
+
129
+ ## Communication Templates
130
+
131
+ ### Spawn Prompt Template
132
+
133
+ ```
134
+ You are a [ROLE] teammate in [TEAM_TYPE] for Linear task [TASK_ID].
135
+
136
+ Task: [title + description]
137
+ Your assignment: [specific work items]
138
+
139
+ RULES:
140
+ - Stay within your assigned scope
141
+ - Message the lead for blockers
142
+ - Report completion via TaskUpdate
143
+ - All Linear comments in Polish
144
+ ```
145
+
146
+ ### Broadcast Message Template
147
+
148
+ ```
149
+ BROADCAST from [TEAMMATE_ROLE]:
150
+ Priority: [CRITICAL/HIGH/MEDIUM]
151
+ Finding: [description]
152
+ Affected: [files or areas]
153
+ Action needed: [what other teammates should check]
154
+ ```
155
+
156
+ ### Completion Signal Template
157
+
158
+ ```
159
+ COMPLETED: [TEAMMATE_ROLE]
160
+ Status: [COMPLETED/PARTIAL/BLOCKED]
161
+ Files processed: [count]
162
+ Issues found: [count by severity]
163
+ Report: [structured output]
164
+ ```
165
+
166
+ ## Shared Task Naming Convention
167
+
168
+ All team tasks follow this pattern:
169
+
170
+ ```
171
+ [TeamType] [LinearTaskId] <task description>
172
+ ```
173
+
174
+ Examples:
175
+
176
+ ```
177
+ [SQUAD] MM-123-1 Implement subtask: Add avatar upload
178
+ [REVIEW] MM-123 Quality review: lint and type-check
179
+ [PLAN-TEAM] MM-123 Architect analysis
180
+ ```
181
+
182
+ ## Rules
183
+
184
+ 1. **Always verify prerequisites** before creating any team
185
+ 2. **Prefer parallelism** — only sequence when dependencies require it
186
+ 3. **Max 4 teammates** per team to avoid coordination overhead
187
+ 4. **All outputs in Polish** for Linear comments
188
+ 5. **Fall back gracefully** — sequential mode is always available as backup
189
+ 6. **Track everything** — use TaskCreate/TaskUpdate for visibility
@@ -132,12 +132,14 @@ You implement code that is:
132
132
  ## Usage
133
133
 
134
134
  ```
135
- /impl-local [linearTaskId]
135
+ /impl [linearTaskId]
136
+ /impl [linearTaskId] --team # Agent Team mode (experimental)
136
137
  ```
137
138
 
138
139
  ## Parameters
139
140
 
140
141
  - `linearTaskId` - Linear task ID (e.g., ENG-123)
142
+ - `--team` - Enable parallel Implementation Squad mode (experimental, requires `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`)
141
143
 
142
144
  ## Instructions
143
145
 
@@ -160,6 +162,104 @@ The agent will:
160
162
 
161
163
  **Output:** Task structure with subtasks to process (or parent task if no subtasks)
162
164
 
165
+ ### Step 1b: Team Mode Decision (if --team flag provided)
166
+
167
+ **Prerequisites**:
168
+
169
+ - `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` must be set
170
+ - Task must have 2+ subtasks in "To Do" status
171
+ - `--team` flag must be provided
172
+
173
+ **If prerequisites NOT met** → Fall back to standard sequential mode (continue to Step 3).
174
+
175
+ **If prerequisites met:**
176
+
177
+ 1. **Fetch all implementation plans** for all "To Do" subtasks (from Linear comments)
178
+
179
+ 2. **Delegate to `shared-subtask-dependency-analyzer`** with all subtask plans:
180
+
181
+ ```
182
+ Analyze dependencies for parallel implementation:
183
+ - Subtasks: [list of subtask IDs with titles]
184
+ - Plans: [files to modify/create per subtask]
185
+ ```
186
+
187
+ 3. **Review dependency analysis** — identify independent groups
188
+
189
+ **If PARALLEL_ELIGIBLE: NO** (all subtasks share files or only 1 subtask):
190
+
191
+ → Fall back to sequential mode with message:
192
+
193
+ ```
194
+ Subtaski mają współdzielone pliki — tryb sekwencyjny.
195
+ ```
196
+
197
+ Continue to Step 3.
198
+
199
+ **If PARALLEL_ELIGIBLE: YES:**
200
+
201
+ 4. **Create shared tasks** via TaskCreate for each subtask:
202
+
203
+ ```
204
+ [SQUAD] <parentTaskId>-<N> Implement subtask: [title]
205
+ ```
206
+
207
+ Set task dependencies using `TaskUpdate` with `addBlockedBy` for dependent groups.
208
+
209
+ 5. **Spawn teammates** — one `shared-impl-teammate` per independent group (max 4 teammates):
210
+
211
+ **Spawn prompt per teammate:**
212
+
213
+ ```
214
+ You are an Implementation Squad member working on subtask(s): [subtask IDs]
215
+
216
+ Linear Task: [parent task ID] - [title]
217
+ Your subtask(s): [subtask details with plans]
218
+
219
+ Follow the FULL per-subtask workflow:
220
+ - Set status to "In Progress"
221
+ - UI classification (shared-ui-classifier)
222
+ - Agent orchestration plan (shared-impl-orchestrator)
223
+ - Implement with TDD (shared-tdd-developer) — RED → GREEN → REFACTOR
224
+ - Verify (lint, tests, build)
225
+ - E2E tests (if UI)
226
+ - Screenshots (if UI) — before + after + post to Linear
227
+ - Create completion comment (shared-impl-reporter) — IN POLISH
228
+ - Update status
229
+
230
+ CRITICAL RULES:
231
+ - Do NOT modify files outside your assigned subtask scope
232
+ - Use shared-tdd-developer for ALL code implementation
233
+ - All Linear comments in Polish
234
+ - Mark task as completed when done
235
+ - Message the lead if you encounter blockers
236
+ ```
237
+
238
+ 6. **Monitor and coordinate**:
239
+
240
+ - Lead watches task completions via TaskList
241
+ - When dependent group becomes unblocked → spawn next wave of teammates
242
+ - Handle teammate errors: if teammate reports blocker, reassign or mark blocked
243
+
244
+ 7. **Synthesis after all teammates finish**:
245
+
246
+ - Collect all teammate reports
247
+ - Delegate to `shared-report-synthesizer` for final summary (team type: SQUAD)
248
+ - Post synthesized summary to parent Linear task
249
+ - Present final summary to user
250
+
251
+ 8. **Cleanup team** when all subtasks processed
252
+
253
+ 9. **Skip to Step 4** (Final Summary) — team mode bypasses the per-subtask sequential loop
254
+
255
+ ### Agent Team Mode (Experimental)
256
+
257
+ **Prerequisite**: `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` in settings.
258
+
259
+ **Activation**: Add `--team` flag.
260
+
261
+ **Fallback**: If env var not set or flag not provided, skill runs in standard sequential mode.
262
+
163
263
  ### Step 3: Process Tasks Iteratively
164
264
 
165
265
  For each task to implement (subtasks in "To Do" status, or parent task if no subtasks):
@@ -758,6 +858,7 @@ When verification fails, delegate to appropriate fix agent:
758
858
  22. **Capture screenshots in both modes**: Agent captures screenshots in BOTH normal mode and dark mode (high contrast) for complete visual documentation
759
859
  23. **Ask before collecting feedback for agent evolution**: When user provides corrections or suggestions during implementation, **explicitly ask** if they want to create a Linear issue for the improvement. Only user-confirmed feedback (answered "Yes") should be processed at evolution checkpoints (Step 3g-evolve, Step 4a) via `shared-agent-evolver` agent.
760
860
  24. **Never modify agent files directly during implementation**: The `shared-agent-evolver` agent files all proposals as Linear issues for manual review — it does NOT modify agent, command, or skill files directly.
861
+ 25. **Team mode file isolation**: In `--team` mode, each teammate MUST only modify files listed in their assigned subtask's implementation plan. Before editing any file, verify it is in scope. If an out-of-scope file needs changes, message the lead instead of editing directly.
761
862
 
762
863
  ## Example Flow
763
864
 
@@ -7,6 +7,7 @@ allowed-tools:
7
7
  - Glob
8
8
  - Grep
9
9
  - AskUserQuestion
10
+ - Task
10
11
  - TaskCreate
11
12
  - TaskUpdate
12
13
  - TaskList
@@ -95,12 +96,14 @@ You create plans that are:
95
96
  ## Usage
96
97
 
97
98
  ```
98
- /plan-create [linearTaskId]
99
+ /plan [linearTaskId]
100
+ /plan [linearTaskId] --deep # Deep planning with Agent Team (experimental)
99
101
  ```
100
102
 
101
103
  ## Parameters
102
104
 
103
105
  - `linearTaskId` - Linear task ID (e.g., ENG-123)
106
+ - `--deep` - Enable deep planning with Agent Team (experimental, requires `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`)
104
107
 
105
108
  ## Instructions
106
109
 
@@ -266,6 +269,138 @@ Check if the task requires changes to external library packages:
266
269
  3. Update dependency version in this project
267
270
  4. Then implement the changes in this project that depend on the library updates
268
271
 
272
+ ### Step 6b: Deep Planning Mode (if --deep flag provided)
273
+
274
+ **Prerequisites**:
275
+
276
+ - `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` must be set
277
+ - `--deep` flag must be provided
278
+
279
+ **If prerequisites NOT met** → Skip to Step 7 (standard planning).
280
+
281
+ **If prerequisites met:**
282
+
283
+ 1. **Create Planning Team** with 3 perspective teammates:
284
+
285
+ **Teammate "Architect"** — spawn `shared-plan-perspective` agent with prompt:
286
+
287
+ ```
288
+ You are the Architect perspective in a planning team for Linear task [taskId].
289
+
290
+ Task: [title + description]
291
+ Codebase analysis: [findings from Steps 4-6a]
292
+
293
+ YOUR FOCUS:
294
+ - Analyze architecture impact (Nx dependency graph, package boundaries)
295
+ - Check cross-package dependencies (tsconfig paths, barrel exports)
296
+ - Verify layer compliance (domain → shell flow, no reverse deps)
297
+ - Evaluate if proposed changes fit existing patterns
298
+ - Identify affected downstream consumers
299
+
300
+ OUTPUT: Structured architecture analysis in Polish with:
301
+ - Impact assessment (which packages affected)
302
+ - Pattern compliance (does it follow existing conventions?)
303
+ - Dependency risks (circular deps, breaking changes)
304
+ - Recommended approach with file-level details
305
+ ```
306
+
307
+ **Teammate "Implementor"** — spawn `shared-plan-perspective` agent with prompt:
308
+
309
+ ```
310
+ You are the Implementor perspective in a planning team for Linear task [taskId].
311
+
312
+ Task: [title + description]
313
+ Codebase analysis: [findings from Steps 4-6a]
314
+
315
+ YOUR FOCUS:
316
+ - Propose concrete implementation steps
317
+ - List exact files to modify/create with rationale
318
+ - Estimate complexity per file (LOC changes, risk level)
319
+ - Define TDD strategy (which tests first, what to mock)
320
+ - Identify reusable code/patterns in existing codebase
321
+
322
+ OUTPUT: Detailed implementation proposal in Polish with:
323
+ - Step-by-step implementation plan
324
+ - File change matrix (file, action, complexity, risk)
325
+ - TDD strategy per component
326
+ - Estimated total complexity (Low/Medium/High)
327
+ ```
328
+
329
+ **Teammate "Devil's Advocate"** — spawn `shared-plan-perspective` agent with prompt:
330
+
331
+ ```
332
+ You are the Devil's Advocate in a planning team for Linear task [taskId].
333
+
334
+ Task: [title + description]
335
+ Codebase analysis: [findings from Steps 4-6a]
336
+
337
+ WAIT for Architect and Implementor to complete their analyses.
338
+ Then CRITICALLY review their proposals:
339
+
340
+ YOUR FOCUS:
341
+ - Find holes in the Architect's analysis (missed dependencies, wrong patterns)
342
+ - Challenge the Implementor's estimates (hidden complexity, missing edge cases)
343
+ - Identify breaking changes that could affect production
344
+ - Check for regression risks in existing tests
345
+ - Look for security implications
346
+ - Consider performance impact
347
+
348
+ OUTPUT: Critical review in Polish with:
349
+ - Issues found in Architect's analysis
350
+ - Issues found in Implementor's proposal
351
+ - Edge cases not covered
352
+ - Risks with severity ratings (CRITICAL/HIGH/MEDIUM/LOW)
353
+ - Alternative approaches (if proposed approach is risky)
354
+ ```
355
+
356
+ 2. **Task dependencies**:
357
+
358
+ ```
359
+ TaskCreate: [PLAN-TEAM] <taskId> Architect analysis → no dependencies
360
+ TaskCreate: [PLAN-TEAM] <taskId> Implementor proposal → no dependencies
361
+ TaskCreate: [PLAN-TEAM] <taskId> Devil's Advocate review → blocked by Architect + Implementor
362
+ ```
363
+
364
+ Use `TaskUpdate` to set `addBlockedBy` for Devil's Advocate task.
365
+
366
+ 3. **After Devil's Advocate completes**:
367
+
368
+ - Broadcast Devil's Advocate findings to Architect and Implementor
369
+ - Allow one round of **response** (each teammate addresses concerns raised)
370
+ - Collect all responses
371
+
372
+ 4. **Lead synthesizes final plan**:
373
+
374
+ - Delegate to `shared-report-synthesizer` with all three perspectives + responses
375
+ - Team type: PLAN-TEAM
376
+ - Generate plan with additional **"Risks & Mitigations"** section:
377
+
378
+ ```markdown
379
+ ### Ryzyka i mitygacje
380
+
381
+ | Ryzyko | Ważność | Źródło | Mitygacja |
382
+ | --- | --- | --- | --- |
383
+ | [opis ryzyka] | HIGH | Adwokat Diabła | [strategia mitygacji] |
384
+ ```
385
+
386
+ - Add **"Consensus Rating"**: 1-5 scale based on agreement between teammates
387
+ - Add **"Confidence Level"**: Based on Devil's Advocate severity findings
388
+ - WYSOKA: no CRITICAL/HIGH findings
389
+ - ŚREDNIA: HIGH findings but addressed in responses
390
+ - NISKA: CRITICAL findings or unresolved HIGH findings
391
+
392
+ 5. **Present enriched plan to user** (Step 7 continues with enhanced plan content)
393
+
394
+ 6. **Cleanup team**
395
+
396
+ ### Agent Team Mode (Experimental)
397
+
398
+ **Prerequisite**: `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` in settings.
399
+
400
+ **Activation**: Add `--deep` flag.
401
+
402
+ **Fallback**: If env var not set or flag not provided, skill runs in standard sequential mode.
403
+
269
404
  ### Step 7: Create Implementation Plans
270
405
 
271
406
  #### If NO subtasks exist:
@@ -479,6 +614,34 @@ _Plan generated by Claude Code_
479
614
  _Plan generated by Claude Code_
480
615
  ```
481
616
 
617
+ #### Additional sections for --deep mode
618
+
619
+ When using `--deep` flag and the Planning Team has completed its analysis, append these sections to each plan:
620
+
621
+ ```markdown
622
+ ### Analiza wpływu architektonicznego
623
+
624
+ [From Architect teammate — architecture impact, package dependencies, pattern compliance]
625
+
626
+ ### Ryzyka i mitygacje
627
+
628
+ | Ryzyko | Ważność | Źródło | Mitygacja |
629
+ | --- | --- | --- | --- |
630
+ | [opis ryzyka] | HIGH | Adwokat Diabła | [strategia mitygacji] |
631
+
632
+ ### Ocena konsensusu: [1-5] / Pewność: [WYSOKA/ŚREDNIA/NISKA]
633
+
634
+ [Podsumowanie na podstawie debaty zespołowej — zgodność między perspektywami]
635
+ ```
636
+
637
+ **Consensus Rating scale:**
638
+
639
+ - 5: Full agreement between all three perspectives
640
+ - 4: Minor disagreements, all addressed in response round
641
+ - 3: Some unresolved concerns, but overall direction agreed
642
+ - 2: Significant disagreements on approach
643
+ - 1: Fundamental disagreements — plan needs revision
644
+
482
645
  ### Step 9: Confirm and Delete Old Plan Comments
483
646
 
484
647
  **This step applies only when replacing existing plans** (i.e., `oldPlanCommentIds` from Step 3a is not empty).