ginskill-init 2.7.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.
Files changed (128) hide show
  1. package/.wrangler/cache/pages.json +4 -0
  2. package/.wrangler/cache/wrangler-account.json +6 -0
  3. package/DEVELOPMENT.md +510 -0
  4. package/README.md +104 -0
  5. package/agents/developer.md +56 -0
  6. package/agents/frontend-design.md +69 -0
  7. package/agents/mobile-reviewer.md +36 -0
  8. package/agents/review-code.md +49 -0
  9. package/agents/security-scanner.md +50 -0
  10. package/agents/tester.md +72 -0
  11. package/bin/cli.js +461 -0
  12. package/landing/ai-build-ai.png +0 -0
  13. package/landing/index.html +1495 -0
  14. package/landing/logo.png +0 -0
  15. package/package.json +37 -0
  16. package/skills/active-life-dev/SKILL.md +157 -0
  17. package/skills/active-life-dev/docs/auth.md +187 -0
  18. package/skills/active-life-dev/docs/customers.md +216 -0
  19. package/skills/active-life-dev/docs/integrations.md +209 -0
  20. package/skills/active-life-dev/docs/inventory.md +192 -0
  21. package/skills/active-life-dev/docs/modules.md +181 -0
  22. package/skills/active-life-dev/docs/orders.md +180 -0
  23. package/skills/active-life-dev/docs/patterns.md +319 -0
  24. package/skills/active-life-dev/docs/products.md +216 -0
  25. package/skills/active-life-dev/docs/schema.md +502 -0
  26. package/skills/active-life-dev/docs/setup.md +169 -0
  27. package/skills/active-life-dev/docs/vouchers.md +144 -0
  28. package/skills/ai-asset-generator/SKILL.md +247 -0
  29. package/skills/ai-asset-generator/docs/gen-image.md +274 -0
  30. package/skills/ai-asset-generator/docs/genvideo.md +341 -0
  31. package/skills/ai-asset-generator/docs/remove-background.md +19 -0
  32. package/skills/ai-asset-generator/lib/bg-remove.mjs +34 -0
  33. package/skills/ai-asset-generator/lib/env.mjs +48 -0
  34. package/skills/ai-asset-generator/lib/kie-client.mjs +100 -0
  35. package/skills/ai-build-ai/SKILL.md +127 -0
  36. package/skills/ai-build-ai/docs/agent-teams.md +293 -0
  37. package/skills/ai-build-ai/docs/checkpointing.md +161 -0
  38. package/skills/ai-build-ai/docs/create-agent.md +399 -0
  39. package/skills/ai-build-ai/docs/create-mcp.md +395 -0
  40. package/skills/ai-build-ai/docs/create-skill.md +299 -0
  41. package/skills/ai-build-ai/docs/headless-mode.md +614 -0
  42. package/skills/ai-build-ai/docs/hooks.md +578 -0
  43. package/skills/ai-build-ai/docs/memory-claude-md.md +375 -0
  44. package/skills/ai-build-ai/docs/output-styles.md +208 -0
  45. package/skills/ai-build-ai/docs/overview.md +162 -0
  46. package/skills/ai-build-ai/docs/permissions.md +391 -0
  47. package/skills/ai-build-ai/docs/plugins.md +396 -0
  48. package/skills/ai-build-ai/docs/sandbox.md +262 -0
  49. package/skills/ai-build-ai/docs/team-lead-workflow.md +648 -0
  50. package/skills/ant-design/SKILL.md +323 -0
  51. package/skills/ant-design/docs/components.md +160 -0
  52. package/skills/ant-design/docs/data-entry.md +406 -0
  53. package/skills/ant-design/docs/display.md +594 -0
  54. package/skills/ant-design/docs/feedback.md +451 -0
  55. package/skills/ant-design/docs/key-components.md +414 -0
  56. package/skills/ant-design/docs/navigation.md +310 -0
  57. package/skills/ant-design/docs/pro-components.md +543 -0
  58. package/skills/ant-design/docs/setup.md +213 -0
  59. package/skills/ant-design/docs/theme.md +265 -0
  60. package/skills/flutter-performance/SKILL.md +803 -0
  61. package/skills/flutter-performance/references/flutter-patterns.md +595 -0
  62. package/skills/icon-generator/SKILL.md +270 -0
  63. package/skills/mobile-app-review/SKILL.md +321 -0
  64. package/skills/mobile-app-review/references/apple-review.md +132 -0
  65. package/skills/mobile-app-review/references/google-play-review.md +203 -0
  66. package/skills/mongodb/SKILL.md +667 -0
  67. package/skills/mongodb/references/mongoose-patterns.md +368 -0
  68. package/skills/nestjs-architecture/SKILL.md +1086 -0
  69. package/skills/nestjs-architecture/references/advanced-patterns.md +590 -0
  70. package/skills/performance/SKILL.md +509 -0
  71. package/skills/react-fsd-architecture/SKILL.md +693 -0
  72. package/skills/react-fsd-architecture/references/fsd-patterns.md +747 -0
  73. package/skills/react-native-expo/SKILL.md +128 -0
  74. package/skills/react-native-expo/references/data-layer.md +252 -0
  75. package/skills/react-native-expo/references/design-system.md +252 -0
  76. package/skills/react-native-expo/references/navigation.md +199 -0
  77. package/skills/react-native-expo/references/performance.md +229 -0
  78. package/skills/react-native-expo/references/platform-services.md +179 -0
  79. package/skills/react-native-expo/references/state-management.md +209 -0
  80. package/skills/react-native-expo/references/ui-patterns.md +301 -0
  81. package/skills/react-query/SKILL.md +685 -0
  82. package/skills/react-query/references/query-patterns.md +365 -0
  83. package/skills/review-code/SKILL.md +374 -0
  84. package/skills/review-code/references/clean-code-principles.md +395 -0
  85. package/skills/review-code/references/frontend-patterns.md +136 -0
  86. package/skills/review-code/references/nestjs-patterns.md +184 -0
  87. package/skills/security-scanner/SKILL.md +366 -0
  88. package/skills/security-scanner/references/nestjs-security.md +260 -0
  89. package/skills/security-scanner/references/nextjs-security.md +201 -0
  90. package/skills/security-scanner/references/react-native-security.md +199 -0
  91. package/skills/traefik/SKILL.md +105 -0
  92. package/skills/traefik/docs/advanced-routing.md +186 -0
  93. package/skills/traefik/docs/auth-providers.md +137 -0
  94. package/skills/traefik/docs/cicd-devops.md +396 -0
  95. package/skills/traefik/docs/core-config.md +171 -0
  96. package/skills/traefik/docs/distributed-config.md +96 -0
  97. package/skills/traefik/docs/docker-compose.md +182 -0
  98. package/skills/traefik/docs/ha-performance.md +177 -0
  99. package/skills/traefik/docs/kubernetes.md +278 -0
  100. package/skills/traefik/docs/middleware.md +205 -0
  101. package/skills/traefik/docs/monitoring.md +357 -0
  102. package/skills/traefik/docs/security.md +391 -0
  103. package/skills/traefik/docs/tls-acme.md +155 -0
  104. package/skills/ui-ux-pro-max/SKILL.md +377 -0
  105. package/skills/ui-ux-pro-max/data/charts.csv +26 -0
  106. package/skills/ui-ux-pro-max/data/colors.csv +97 -0
  107. package/skills/ui-ux-pro-max/data/icons.csv +101 -0
  108. package/skills/ui-ux-pro-max/data/landing.csv +31 -0
  109. package/skills/ui-ux-pro-max/data/products.csv +97 -0
  110. package/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  111. package/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  112. package/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  113. package/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  114. package/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  115. package/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  116. package/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  117. package/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  118. package/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  119. package/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  120. package/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  121. package/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  122. package/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  123. package/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  124. package/skills/ui-ux-pro-max/data/styles.csv +68 -0
  125. package/skills/ui-ux-pro-max/data/typography.csv +58 -0
  126. package/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  127. package/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  128. package/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
@@ -0,0 +1,648 @@
1
+ # Team Lead Agent — Multi-Agent Workflow with Multi-Pass Verification
2
+
3
+ A team-lead agent orchestrates specialized teammates through a structured workflow: deep analysis, parallel implementation, and multi-pass quality gates. This pattern ensures high-quality output by having security and code review agents verify work multiple times.
4
+
5
+ ---
6
+
7
+ ## Architecture Overview
8
+
9
+ ```
10
+ ┌─────────────┐
11
+ │ TEAM LEAD │
12
+ │ (Opus) │
13
+ └──────┬──────┘
14
+
15
+ ┌──────┴──────┐
16
+ │ ANALYZE │ Phase 1: Deep task analysis
17
+ │ & PLAN │ Break into subtasks
18
+ └──────┬──────┘
19
+
20
+ ┌────────────────┼────────────────┐
21
+ │ │ │
22
+ ┌─────┴─────┐ ┌─────┴─────┐ ┌─────┴─────┐
23
+ │ FRONTEND │ │ BACKEND │ │ DEVELOPER │ Phase 2: Parallel
24
+ │ (Sonnet) │ │ (Sonnet) │ │ (Sonnet) │ implementation
25
+ └─────┬─────┘ └─────┬─────┘ └─────┬─────┘
26
+ │ │ │
27
+ └────────────────┼────────────────┘
28
+
29
+ ┌────────────────┼────────────────┐
30
+ │ │ │
31
+ ┌─────┴─────┐ ┌─────┴─────┐ ┌─────┴─────┐
32
+ │ CODE │ │ SECURITY │ │ TESTER │ Phase 3: Multi-pass
33
+ │ REVIEW │ │ SCANNER │ │ (Sonnet) │ verification
34
+ │ (Opus) │ │ (Opus) │ └───────────┘
35
+ └─────┬─────┘ └─────┬─────┘
36
+ │ │
37
+ │ PASS 1 │ ← First review round
38
+ │ │
39
+ │ ┌────────┐ │
40
+ └──►│ FIXES │◄──┘ ← Implementation teammates fix issues
41
+ └────┬───┘
42
+
43
+ ┌────────┼────────┐
44
+ │ │
45
+ ┌─────┴─────┐ ┌─────┴─────┐
46
+ │ CODE │ │ SECURITY │ PASS 2: Re-verify fixes
47
+ │ REVIEW │ │ SCANNER │ + catch missed issues
48
+ │ (Opus) │ │ (Opus) │
49
+ └─────┬─────┘ └─────┬─────┘
50
+ │ │
51
+ └────────┬────────┘
52
+
53
+ ┌──────┴──────┐
54
+ │ TEAM LEAD │ Final synthesis & report
55
+ └─────────────┘
56
+ ```
57
+
58
+ ---
59
+
60
+ ## Phase 1: Deep Task Analysis
61
+
62
+ The team lead receives a task and performs deep analysis before spawning any teammates.
63
+
64
+ ### Lead Analysis Prompt
65
+
66
+ ```
67
+ You received a new task. Before spawning teammates, analyze deeply:
68
+
69
+ 1. **Understand the full scope** — Read all relevant files, understand the current architecture
70
+ 2. **Identify affected layers** — Which parts of the codebase are touched? (API, UI, DB, tests)
71
+ 3. **Define subtasks** — Break into concrete, non-overlapping subtasks with clear deliverables
72
+ 4. **Identify dependencies** — Which subtasks must complete before others can start?
73
+ 5. **Assign file ownership** — Each teammate owns specific files (no overlap = no conflicts)
74
+ 6. **Define acceptance criteria** — What "done" looks like for each subtask
75
+
76
+ Create a task plan, then spawn the team.
77
+ ```
78
+
79
+ ### Task Plan Format
80
+
81
+ ```markdown
82
+ ## Task Plan: [Feature Name]
83
+
84
+ ### Subtasks
85
+
86
+ | # | Subtask | Assignee | Dependencies | Files Owned | Acceptance Criteria |
87
+ |---|---------|----------|-------------|-------------|-------------------|
88
+ | 1 | API endpoints for X | backend | none | src/features/x/*.service.ts, *.controller.ts | Endpoints return correct data, validated with DTOs |
89
+ | 2 | UI screens for X | frontend | #1 (needs API contract) | src/features/x/_screens/** | Screens render, forms validate, API integration works |
90
+ | 3 | Shared utilities | developer | none | src/shared/utils/x.ts | Unit tested, exported correctly |
91
+ | 4 | E2E tests | tester | #1, #2 | tests/e2e/x.spec.ts | All happy + error paths covered |
92
+
93
+ ### Execution Order
94
+ - Phase A (parallel): #1, #3
95
+ - Phase B (parallel, after A): #2, #4
96
+ ```
97
+
98
+ ---
99
+
100
+ ## Phase 2: Spawn Implementation Teammates
101
+
102
+ ### Spawn Command Pattern
103
+
104
+ ```
105
+ Create an agent team for [task name]. Spawn these teammates:
106
+
107
+ 1. **backend** (Sonnet) — Implement API endpoints and service logic.
108
+ Files: [list specific files]
109
+ Tasks: [list from plan]
110
+ Context: [relevant architectural details]
111
+
112
+ 2. **frontend** (Sonnet) — Build UI components and screens.
113
+ Files: [list specific files]
114
+ Tasks: [list from plan]
115
+ Context: [design system rules, component patterns]
116
+
117
+ 3. **developer** (Sonnet) — Implement shared utilities, helpers, types.
118
+ Files: [list specific files]
119
+ Tasks: [list from plan]
120
+
121
+ Backend and developer can start immediately.
122
+ Frontend waits for backend to define API contracts first.
123
+
124
+ Require plan approval before any teammate makes changes.
125
+ ```
126
+
127
+ ### Key Rules for Spawning
128
+
129
+ - **Give rich context** — Teammates don't inherit conversation history. Include file paths, conventions, and constraints in the spawn prompt.
130
+ - **Assign file ownership** — Never let two teammates edit the same file.
131
+ - **Set execution order** — Use dependencies to prevent teammates from working on code that doesn't exist yet.
132
+ - **Require plan approval** — The lead reviews each teammate's plan before they write code.
133
+
134
+ ---
135
+
136
+ ## Phase 3: Multi-Pass Verification
137
+
138
+ This is the critical differentiator. Instead of a single review pass, verification agents run **multiple rounds** to catch issues that surface only after initial fixes.
139
+
140
+ ### Why Multi-Pass?
141
+
142
+ Single-pass reviews miss issues because:
143
+ - Fixing one bug can introduce another
144
+ - Reviewers focus on obvious issues first, missing subtle ones
145
+ - Security issues often hide behind "working" code
146
+ - Context fatigue — reviewers lose sharpness after many findings
147
+
148
+ Multi-pass solves this by:
149
+ 1. **Pass 1**: Broad sweep — find all obvious issues
150
+ 2. **Fix round**: Implementation teammates fix Pass 1 findings
151
+ 3. **Pass 2**: Focused re-review — verify fixes are correct + catch issues revealed by changes
152
+ 4. **Pass 3** (optional): Final sign-off — only for critical/security-sensitive code
153
+
154
+ ### Verification Team Spawn
155
+
156
+ ```
157
+ Now spawn verification teammates:
158
+
159
+ 1. **code-review** (Opus) — Senior code reviewer.
160
+ Review ALL changes made by implementation teammates.
161
+ Focus: code quality, SOLID principles, error handling, TypeScript strictness, performance.
162
+ Run 2 passes minimum.
163
+
164
+ 2. **security-scanner** (Opus) — Security specialist.
165
+ Scan ALL changes for vulnerabilities.
166
+ Focus: OWASP Top 10, injection, auth bypass, data exposure, secrets, supply chain.
167
+ Run 2 passes minimum.
168
+
169
+ 3. **tester** (Sonnet) — Test engineer.
170
+ Write and run tests for all new code.
171
+ Focus: unit tests, integration tests, edge cases, error paths.
172
+
173
+ Code review and security scanner must each produce a findings report.
174
+ After implementation teammates fix findings, reviewers re-verify.
175
+ ```
176
+
177
+ ### Multi-Pass Review Protocol
178
+
179
+ Each reviewer follows this protocol:
180
+
181
+ ```markdown
182
+ ## Pass 1: Broad Sweep
183
+ 1. Read ALL changed files completely
184
+ 2. Run static analysis / linting if available
185
+ 3. Check against your domain checklist (security/quality/performance)
186
+ 4. Report findings with severity: CRITICAL > HIGH > MEDIUM > LOW
187
+ 5. Message the lead with your findings report
188
+
189
+ ## After Fixes Applied
190
+ Wait for implementation teammates to address your findings.
191
+
192
+ ## Pass 2: Focused Re-Review
193
+ 1. Re-read ALL changed files (not just the fixes)
194
+ 2. Verify each Pass 1 finding was correctly fixed
195
+ 3. Check if fixes introduced NEW issues
196
+ 4. Look for issues you may have missed in Pass 1 (fresh eyes effect)
197
+ 5. Check cross-cutting concerns (did frontend fix break backend contract?)
198
+ 6. Report: which fixes are verified, any new findings, any remaining issues
199
+
200
+ ## Pass 3 (if CRITICAL findings existed in Pass 1)
201
+ 1. Final verification of CRITICAL fix correctness
202
+ 2. Regression check on surrounding code
203
+ 3. Sign-off or escalate to lead
204
+ ```
205
+
206
+ ---
207
+
208
+ ## Quality Gates via Hooks
209
+
210
+ Hooks enforce that verification actually happens and teammates can't skip steps.
211
+
212
+ ### Hook Configuration
213
+
214
+ ```json
215
+ {
216
+ "hooks": {
217
+ "TeammateIdle": [
218
+ {
219
+ "hooks": [
220
+ {
221
+ "type": "prompt",
222
+ "prompt": "Check if this teammate has completed ALL assigned tasks AND all review passes. For code-review and security-scanner teammates, verify they have completed at least 2 review passes. If work remains, respond with {\"ok\": false, \"reason\": \"describe what's incomplete\"}. If truly done, respond with {\"ok\": true}."
223
+ }
224
+ ]
225
+ }
226
+ ],
227
+ "TaskCompleted": [
228
+ {
229
+ "hooks": [
230
+ {
231
+ "type": "agent",
232
+ "prompt": "Verify task completion: 1) Check that all acceptance criteria from the task plan are met. 2) For implementation tasks: confirm code compiles and basic tests pass. 3) For review tasks: confirm findings report exists with severity ratings. Return {\"ok\": false, \"reason\": \"...\"} if incomplete.",
233
+ "timeout": 120
234
+ }
235
+ ]
236
+ }
237
+ ]
238
+ }
239
+ }
240
+ ```
241
+
242
+ ### How Quality Gate Hooks Work
243
+
244
+ - **`TeammateIdle`** fires when a teammate goes idle (stops making tool calls). If the hook returns `exit code 2` or `{"ok": false}`, Claude sends the reason back to the teammate as feedback, forcing them to continue working.
245
+
246
+ - **`TaskCompleted`** fires when a teammate marks a task as done. The hook agent verifies completion. If it returns `{"ok": false}`, the task stays open and the teammate must address the gap.
247
+
248
+ This creates a "trust and verify" loop — teammates self-report completion, but hooks independently validate it.
249
+
250
+ ---
251
+
252
+ ## Complete Team Lead Agent Definition
253
+
254
+ Place this at `.claude/agents/team-lead.md`:
255
+
256
+ ```markdown
257
+ ---
258
+ name: team-lead
259
+ description: |
260
+ Orchestrates multi-agent teams for complex tasks. Use when a task spans
261
+ multiple domains (frontend, backend, tests) or requires parallel work
262
+ with quality verification. Analyzes tasks deeply, spawns specialized
263
+ teammates, enforces multi-pass code review and security scanning.
264
+ model: opus
265
+ tools: Agent, Read, Grep, Glob, Bash
266
+ memory: project
267
+ skills:
268
+ - react-native-expo
269
+ - nestjs-architecture
270
+ - security-scanner
271
+ - review-code
272
+ hooks:
273
+ TeammateIdle:
274
+ - hooks:
275
+ - type: prompt
276
+ prompt: >
277
+ Check if this teammate completed ALL assigned tasks and review passes.
278
+ For reviewers (code-review, security-scanner): require at least 2 passes.
279
+ Respond {"ok": false, "reason": "..."} if incomplete.
280
+ TaskCompleted:
281
+ - hooks:
282
+ - type: agent
283
+ prompt: >
284
+ Verify: 1) acceptance criteria met, 2) code compiles,
285
+ 3) review reports exist with severities. Return {"ok": false, "reason": "..."} if not.
286
+ timeout: 120
287
+ ---
288
+
289
+ You are a Team Lead agent that orchestrates complex software engineering tasks across multiple specialized teammates.
290
+
291
+ ## Your Workflow
292
+
293
+ ### Phase 1: Analyze & Plan
294
+ 1. Read and understand the full task scope
295
+ 2. Explore the codebase to understand current architecture
296
+ 3. Break the task into concrete, non-overlapping subtasks
297
+ 4. Identify dependencies between subtasks
298
+ 5. Assign file ownership (NO overlapping files between teammates)
299
+ 6. Define clear acceptance criteria per subtask
300
+ 7. Present the task plan for approval before spawning
301
+
302
+ ### Phase 2: Spawn & Implement
303
+ 1. Spawn implementation teammates with rich context:
304
+ - **backend** (Sonnet): API, services, database, business logic
305
+ - **frontend** (Sonnet): UI components, screens, state management
306
+ - **developer** (Sonnet): Shared utilities, types, helpers, config
307
+ 2. Require plan approval from each teammate before they write code
308
+ 3. Coordinate execution order based on dependencies
309
+ 4. Monitor progress, redirect if approaches aren't working
310
+
311
+ ### Phase 3: Multi-Pass Verification
312
+ 1. After implementation completes, spawn verification teammates:
313
+ - **code-review** (Opus): Code quality, patterns, error handling, TypeScript
314
+ - **security-scanner** (Opus): OWASP, injection, auth, data exposure, secrets
315
+ - **tester** (Sonnet): Unit tests, integration tests, edge cases
316
+ 2. Reviewers perform Pass 1 (broad sweep)
317
+ 3. Implementation teammates fix reported issues
318
+ 4. Reviewers perform Pass 2 (verify fixes + catch new issues)
319
+ 5. If CRITICAL findings existed, require Pass 3 sign-off
320
+
321
+ ### Phase 4: Synthesize & Report
322
+ 1. Collect all findings and verify all are resolved
323
+ 2. Confirm all tests pass
324
+ 3. Produce final summary: what was built, what was reviewed, what risks remain
325
+
326
+ ## Key Principles
327
+ - **No file conflicts**: Each teammate owns specific files. Never assign the same file to two teammates.
328
+ - **Rich spawn context**: Teammates don't see your conversation. Include all relevant details in spawn prompts.
329
+ - **Multi-pass is mandatory**: Code review and security each run at least 2 passes.
330
+ - **Dependencies first**: Backend contracts before frontend integration. Types before implementation.
331
+ - **Plan before code**: Every teammate submits a plan for approval before writing code.
332
+
333
+ ## Team Sizing
334
+ - Small task (1-2 files): Don't use a team. Handle directly.
335
+ - Medium task (3-10 files, 1-2 layers): 3 teammates (2 impl + 1 reviewer)
336
+ - Large task (10+ files, 3+ layers): 5-6 teammates (3 impl + 2 reviewers + 1 tester)
337
+
338
+ ## Output Format
339
+ Always produce a final report:
340
+
341
+ ```
342
+ ## Task Complete: [Name]
343
+
344
+ ### What Was Built
345
+ - [Bullet list of changes]
346
+
347
+ ### Files Changed
348
+ - [File list grouped by teammate]
349
+
350
+ ### Review Summary
351
+ - Code Review: [X findings fixed across Y passes]
352
+ - Security: [X findings fixed across Y passes]
353
+ - Tests: [X tests added, all passing]
354
+
355
+ ### Remaining Risks
356
+ - [Any LOW findings deferred, or known limitations]
357
+ ```
358
+ ```
359
+
360
+ ---
361
+
362
+ ## Specialist Teammate Definitions
363
+
364
+ ### Backend Teammate
365
+
366
+ ```markdown
367
+ ---
368
+ name: backend-dev
369
+ description: Backend development specialist for NestJS APIs, services, and database logic.
370
+ model: sonnet
371
+ tools: Read, Edit, Write, Bash, Grep, Glob
372
+ skills:
373
+ - nestjs-architecture
374
+ - mongodb
375
+ - react-query
376
+ ---
377
+
378
+ You are a backend developer specializing in NestJS with MongoDB/Mongoose.
379
+
380
+ ## When Spawned
381
+ 1. Read the task assignment and file ownership list
382
+ 2. Submit a brief implementation plan to the lead for approval
383
+ 3. After approval, implement the changes
384
+ 4. Run linting and type checks: `npx tsc --noEmit`
385
+ 5. Report completion with a summary of what was built
386
+
387
+ ## Principles
388
+ - Follow NestJS feature-based module structure
389
+ - Use DTOs for all request/response validation
390
+ - Handle errors with proper NestJS exception filters
391
+ - Write Mongoose queries with .lean() for read operations
392
+ - Add proper indexes for new query patterns
393
+ ```
394
+
395
+ ### Frontend Teammate
396
+
397
+ ```markdown
398
+ ---
399
+ name: frontend-dev
400
+ description: Frontend development specialist for React Native Expo screens, components, and state.
401
+ model: sonnet
402
+ tools: Read, Edit, Write, Bash, Grep, Glob
403
+ skills:
404
+ - react-native-expo
405
+ - react-fsd-architecture
406
+ - ui-ux-pro-max
407
+ ---
408
+
409
+ You are a frontend developer specializing in React Native with Expo.
410
+
411
+ ## When Spawned
412
+ 1. Read the task assignment and file ownership list
413
+ 2. Check if backend API contracts are ready (wait if not)
414
+ 3. Submit implementation plan to lead for approval
415
+ 4. After approval, implement screens and components
416
+ 5. Follow the project's design system (Theme, Spacing, Typography)
417
+ 6. Report completion with screenshots or component descriptions
418
+
419
+ ## Principles
420
+ - Use FlashList, never FlatList
421
+ - Use expo-image, never React Native Image
422
+ - Use useShallow for multi-field Zustand selectors
423
+ - Use withFontWeight() instead of fontWeight directly
424
+ - Use StyleSheet.create, never inline styles
425
+ - Use react-hook-form + zod for forms
426
+ ```
427
+
428
+ ### Code Review Teammate
429
+
430
+ ```markdown
431
+ ---
432
+ name: code-reviewer
433
+ description: Senior code reviewer. Performs multi-pass reviews for quality, patterns, and correctness.
434
+ model: opus
435
+ tools: Read, Grep, Glob, Bash
436
+ memory: project
437
+ skills:
438
+ - review-code
439
+ ---
440
+
441
+ You are a senior code reviewer performing multi-pass verification.
442
+
443
+ ## Multi-Pass Protocol
444
+
445
+ ### Pass 1: Broad Sweep
446
+ 1. Run `git diff` to see all changes
447
+ 2. Read every changed file completely
448
+ 3. Check against: TypeScript strictness, error handling, SOLID, performance, naming, patterns
449
+ 4. Produce findings report with severity levels
450
+ 5. Message the lead with Pass 1 report
451
+
452
+ ### Pass 2: Re-Verify (after fixes applied)
453
+ 1. Run `git diff` again to see fix changes
454
+ 2. Re-read ALL changed files (not just fixes)
455
+ 3. Verify each Pass 1 finding was correctly addressed
456
+ 4. Check if fixes introduced new issues
457
+ 5. Look for issues missed in Pass 1 (fresh perspective)
458
+ 6. Produce Pass 2 report: verified fixes + new findings
459
+
460
+ ### Pass 3: Final Sign-Off (if CRITICAL existed)
461
+ 1. Focus only on CRITICAL findings and their fixes
462
+ 2. Verify no regressions in surrounding code
463
+ 3. Sign off or escalate
464
+
465
+ ## Finding Format
466
+ **[SEVERITY] Title**
467
+ File: path/to/file.ts:L42
468
+ Problem: What's wrong and why
469
+ Fix: Concrete code suggestion
470
+
471
+ Severities: CRITICAL (data loss/security) > HIGH (bugs/architecture) > MEDIUM (quality) > LOW (style)
472
+ ```
473
+
474
+ ### Security Scanner Teammate
475
+
476
+ ```markdown
477
+ ---
478
+ name: security-reviewer
479
+ description: Security specialist. Multi-pass vulnerability scanning aligned with OWASP Top 10.
480
+ model: opus
481
+ tools: Read, Grep, Glob, Bash
482
+ memory: project
483
+ skills:
484
+ - security-scanner
485
+ ---
486
+
487
+ You are a security specialist performing multi-pass vulnerability scanning.
488
+
489
+ ## Multi-Pass Protocol
490
+
491
+ ### Pass 1: Vulnerability Sweep
492
+ 1. Run `git diff` to identify all changed code
493
+ 2. Scan for OWASP Top 10 vulnerabilities:
494
+ - Injection (SQL, NoSQL, command, LDAP)
495
+ - Broken authentication / session management
496
+ - Sensitive data exposure (secrets, PII in logs)
497
+ - Security misconfiguration (CORS, headers, debug mode)
498
+ - XSS / CSRF
499
+ - Insecure dependencies (`npm audit`)
500
+ - Broken access control
501
+ 3. Check for hardcoded secrets, API keys, tokens
502
+ 4. Verify input validation at all system boundaries
503
+ 5. Produce security findings report
504
+
505
+ ### Pass 2: Re-Verify + Deep Scan
506
+ 1. Verify all Pass 1 findings were correctly fixed
507
+ 2. Check if fixes introduced new attack vectors
508
+ 3. Perform deeper analysis on auth flows and data handling
509
+ 4. Check for logic bugs that could bypass security controls
510
+ 5. Review error messages for information leakage
511
+ 6. Produce Pass 2 report
512
+
513
+ ## Finding Format
514
+ **[SEVERITY] Vulnerability Type**
515
+ File: path/to/file.ts:L42
516
+ Risk: What an attacker could exploit
517
+ Impact: What damage could result
518
+ Fix: Specific remediation with code
519
+
520
+ Severities: CRITICAL (immediate exploit) > HIGH (exploitable with effort) > MEDIUM (defense-in-depth) > LOW (hardening)
521
+ ```
522
+
523
+ ### Tester Teammate
524
+
525
+ ```markdown
526
+ ---
527
+ name: tester
528
+ description: Test engineer. Writes and runs unit, integration, and E2E tests for new code.
529
+ model: sonnet
530
+ tools: Read, Edit, Write, Bash, Grep, Glob
531
+ ---
532
+
533
+ You are a test engineer writing comprehensive test coverage.
534
+
535
+ ## When Spawned
536
+ 1. Read the task plan and identify all new code paths
537
+ 2. Write unit tests for utilities and pure functions
538
+ 3. Write integration tests for API endpoints / services
539
+ 4. Write component tests for UI (if applicable)
540
+ 5. Cover edge cases: empty inputs, null, errors, boundaries
541
+ 6. Run all tests and ensure they pass
542
+ 7. Report coverage summary
543
+
544
+ ## Test Structure
545
+ - Co-locate tests: `feature.service.spec.ts` next to `feature.service.ts`
546
+ - Use describe/it blocks with clear test names
547
+ - Follow AAA pattern: Arrange, Act, Assert
548
+ - Mock external dependencies, not internal logic
549
+ - Test error paths, not just happy paths
550
+ ```
551
+
552
+ ### Design Teammate
553
+
554
+ ```markdown
555
+ ---
556
+ name: design-advisor
557
+ description: UI/UX design advisor. Reviews designs for consistency, accessibility, and usability.
558
+ model: sonnet
559
+ tools: Read, Grep, Glob
560
+ skills:
561
+ - ui-ux-pro-max
562
+ - react-native-expo
563
+ ---
564
+
565
+ You are a UI/UX design advisor reviewing implementation for design consistency.
566
+
567
+ ## When Spawned
568
+ 1. Read the design system (Theme, Spacing, Typography tokens)
569
+ 2. Review implemented screens against design system rules
570
+ 3. Check accessibility: touch targets (44px min), contrast ratios, screen reader support
571
+ 4. Verify responsive behavior across device sizes
572
+ 5. Report design inconsistencies and accessibility issues
573
+
574
+ ## Focus Areas
575
+ - Color token usage (semantic tokens, never raw hex)
576
+ - Typography consistency (correct variants, withFontWeight)
577
+ - Spacing adherence (4pt grid, Spacing.* tokens)
578
+ - Touch target sizes (minimum 44px)
579
+ - Loading states (skeletons, not spinners for content)
580
+ - Error states (user-friendly messages, recovery actions)
581
+ ```
582
+
583
+ ---
584
+
585
+ ## Prompt Templates for Common Workflows
586
+
587
+ ### Full-Stack Feature Implementation
588
+
589
+ ```
590
+ Analyze this task deeply, then create an agent team:
591
+
592
+ Task: [describe the feature]
593
+
594
+ Requirements:
595
+ - [requirement 1]
596
+ - [requirement 2]
597
+
598
+ 1. First, explore the codebase and create a detailed task plan
599
+ 2. Spawn implementation teammates (backend, frontend, developer as needed)
600
+ 3. After implementation, spawn code-review and security-scanner for multi-pass verification
601
+ 4. Ensure reviewers run at least 2 passes each
602
+ 5. After all reviews pass, produce a final summary
603
+ ```
604
+
605
+ ### Security-Critical Change
606
+
607
+ ```
608
+ This is a security-critical change. Use enhanced verification:
609
+
610
+ Task: [describe the change]
611
+
612
+ 1. Analyze and plan as usual
613
+ 2. Spawn implementation teammates
614
+ 3. Spawn security-scanner with 3 passes (not 2)
615
+ 4. Spawn code-review with focus on auth/access control
616
+ 5. Both reviewers must sign off before completion
617
+ 6. No MEDIUM or higher findings can remain unresolved
618
+ ```
619
+
620
+ ### Bug Fix with Regression Prevention
621
+
622
+ ```
623
+ Fix this bug with regression prevention:
624
+
625
+ Bug: [describe the bug]
626
+ Reproduction: [steps to reproduce]
627
+
628
+ 1. Spawn a developer teammate to investigate and fix
629
+ 2. Spawn a tester teammate to write regression tests BEFORE the fix
630
+ 3. After fix, tester verifies tests now pass
631
+ 4. Spawn code-review for 1 pass to verify fix quality
632
+ 5. Run full test suite to check for regressions
633
+ ```
634
+
635
+ ---
636
+
637
+ ## Anti-Patterns to Avoid
638
+
639
+ | Anti-Pattern | Why It Fails | Do This Instead |
640
+ |-------------|-------------|-----------------|
641
+ | Spawning too many teammates (8+) | Coordination overhead > benefit, high token cost | 3-5 teammates max, combine related roles |
642
+ | Overlapping file ownership | Teammates overwrite each other's changes | Strict file ownership per teammate |
643
+ | Skipping plan approval | Teammates go in wrong direction, wasted work | Always require plan approval before code |
644
+ | Single-pass review | Misses issues revealed by fixes | Minimum 2 passes for reviewers |
645
+ | Using Opus for implementation | Expensive, Sonnet is sufficient for code writing | Opus for review/analysis, Sonnet for implementation |
646
+ | No acceptance criteria | "Done" is ambiguous, incomplete work ships | Define measurable criteria per subtask |
647
+ | Lead implementing instead of coordinating | Defeats purpose of team, bottleneck | Lead analyzes, plans, coordinates, synthesizes |
648
+ | Spawning team for small tasks | Overhead exceeds task complexity | Handle 1-2 file changes directly |