@polymorphism-tech/morph-spec 4.13.0 → 4.15.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 (39) hide show
  1. package/CLAUDE.md +7 -7
  2. package/README.md +9 -7
  3. package/claude-plugin.json +1 -1
  4. package/docs/CHEATSHEET.md +6 -7
  5. package/docs/QUICKSTART.md +1 -1
  6. package/framework/agents/ai-agents/ai-system-architect.md +2 -0
  7. package/framework/agents/ai-agents/vector-search-expert.md +233 -0
  8. package/framework/agents/architecture/seo-growth-hacker.md +2 -0
  9. package/framework/agents/architecture/standards-architect.md +3 -0
  10. package/framework/agents/backend/dotnet-senior.md +3 -0
  11. package/framework/agents/backend/ef-modeler.md +2 -0
  12. package/framework/agents/backend/hangfire-orchestrator.md +2 -0
  13. package/framework/agents/backend/ms-agent-expert.md +2 -0
  14. package/framework/agents/backend/supabase-expert.md +256 -0
  15. package/framework/agents/frontend/css-specialist.md +2 -0
  16. package/framework/agents/frontend/nextjs-expert.md +3 -0
  17. package/framework/agents/frontend/ui-ux-designer.md +3 -1
  18. package/framework/agents/infrastructure/infra-architect.md +3 -0
  19. package/framework/agents/integrations/asaas-financial.md +2 -0
  20. package/framework/agents/integrations/clerk-auth.md +2 -0
  21. package/framework/agents/integrations/resend-email.md +2 -0
  22. package/framework/agents.json +1077 -1040
  23. package/framework/commands/morph-apply.md +0 -2
  24. package/framework/commands/morph-preflight.md +192 -247
  25. package/framework/commands/morph-proposal.md +210 -238
  26. package/framework/commands/morph-status.md +72 -92
  27. package/framework/phases.json +162 -162
  28. package/framework/skills/level-1-workflows/morph-phase-codebase-analysis/SKILL.md +1 -1
  29. package/framework/skills/level-1-workflows/morph-phase-design/SKILL.md +2 -2
  30. package/framework/skills/level-1-workflows/morph-phase-implement/SKILL.md +1 -1
  31. package/framework/skills/level-1-workflows/morph-phase-implement/prompts/code-quality-reviewer-prompt.md +1 -1
  32. package/framework/skills/level-1-workflows/morph-phase-plan/SKILL.md +1 -1
  33. package/framework/skills/level-1-workflows/morph-phase-tasks/SKILL.md +1 -1
  34. package/framework/skills/level-1-workflows/morph-phase-tasks/references/task-planning-patterns.md +143 -170
  35. package/framework/skills/level-1-workflows/morph-phase-uiux/SKILL.md +1 -1
  36. package/framework/skills/level-1-workflows/morph-scope-escalation/SKILL.md +1 -1
  37. package/package.json +1 -1
  38. package/src/utils/agents-installer.js +58 -18
  39. package/framework/agents/integrations/hangfire-integration.md +0 -69
@@ -1,1040 +1,1077 @@
1
- {
2
- "$schema": "./agent-schema.json",
3
- "version": "4.0.0",
4
- "total_agents": 22,
5
- "tiers": {
6
- "tier_1_orchestrators": 2,
7
- "tier_2_leaders": 3,
8
- "tier_3_specialists": 12,
9
- "tier_4_validators": 5
10
- },
11
- "agents": {
12
- "standards-architect": {
13
- "tier": 1,
14
- "title": "Chief Architect",
15
- "group": "domain-analysis",
16
- "active_phases": [
17
- "*"
18
- ],
19
- "reports_to": "user",
20
- "domains": [
21
- "architecture",
22
- "developer-experience"
23
- ],
24
- "keywords": [],
25
- "validators": [],
26
- "standards": [],
27
- "teammate": {
28
- "role": "Team Lead (Delegate Mode)",
29
- "icon": "🎯",
30
- "spawn_prompt": "You are the Chief Architect and Team Lead in delegate mode. Coordinate Domain Leaders, resolve conflicts, synthesize results. DO NOT implement code yourself. Escalate conflicts to user when teammates disagree on architecture/tech choices."
31
- }
32
- },
33
- "ai-system-architect": {
34
- "tier": 1,
35
- "title": "AI/Agent Architect",
36
- "group": "domain-analysis",
37
- "active_phases": [
38
- "design",
39
- "tasks"
40
- ],
41
- "reports_to": "standards-architect",
42
- "domains": [
43
- "ai-orchestration",
44
- "architecture"
45
- ],
46
- "keywords": [
47
- "agent system",
48
- "ai architecture",
49
- "orchestration",
50
- "multi-agent",
51
- "agent workflow"
52
- ],
53
- "validators": [],
54
- "standards": [
55
- {
56
- "id": "ai-agents-setup",
57
- "scope": "all",
58
- "priority": "required"
59
- },
60
- {
61
- "id": "ai-agents-workflows",
62
- "scope": "design",
63
- "priority": "required"
64
- },
65
- {
66
- "id": "ai-agents-production",
67
- "scope": "implement",
68
- "priority": "required"
69
- }
70
- ],
71
- "teammate": {
72
- "role": "AI Architect",
73
- "icon": "🤖",
74
- "spawn_prompt": "You are the AI/Agent System Architect. Design agent workflows, tool integrations, and orchestration patterns."
75
- }
76
- },
77
- "dotnet-senior": {
78
- "tier": 2,
79
- "title": "Backend Squad Leader",
80
- "group": "backend",
81
- "active_phases": [
82
- "*"
83
- ],
84
- "reports_to": "standards-architect",
85
- "domains": [
86
- "backend",
87
- "backend-api",
88
- "architecture"
89
- ],
90
- "keywords": [
91
- "backend",
92
- "api",
93
- "dotnet",
94
- ".net",
95
- "csharp",
96
- "c#",
97
- "web api",
98
- "minimal api",
99
- "vertical slice",
100
- "vertical-slice",
101
- "vsa",
102
- "minimal apis",
103
- "ihandler",
104
- "result pattern",
105
- "feature slice",
106
- "scrutor",
107
- "vertical slice architecture",
108
- "scaffold",
109
- "feature-slice",
110
- "vsa-scaffold",
111
- "rest",
112
- "graphql",
113
- "grpc",
114
- "openapi",
115
- "swagger",
116
- "versioning",
117
- "rate limiting",
118
- "hot chocolate",
119
- "endpoint"
120
- ],
121
- "validators": [
122
- "architecture",
123
- "packages"
124
- ],
125
- "standards": [
126
- {
127
- "id": "architecture-vertical-slice-vertical-slice",
128
- "scope": "all",
129
- "priority": "required"
130
- },
131
- {
132
- "id": "backend-dotnet-scrutor",
133
- "scope": "implement",
134
- "priority": "required"
135
- },
136
- {
137
- "id": "backend-dotnet-result-pattern",
138
- "scope": "all",
139
- "priority": "required"
140
- },
141
- {
142
- "id": "backend-dotnet-fluent-validation-vsa",
143
- "scope": "implement",
144
- "priority": "required"
145
- },
146
- {
147
- "id": "backend-dotnet-scalar-ui",
148
- "scope": "implement",
149
- "priority": "reference"
150
- },
151
- {
152
- "id": "backend-dotnet-vsa-handler-patterns",
153
- "scope": "all",
154
- "priority": "required"
155
- }
156
- ],
157
- "stacks": [
158
- "dotnet"
159
- ],
160
- "teammate": {
161
- "role": "Backend Squad Leader",
162
- "icon": "⚙️",
163
- "spawn_prompt": "You are the Backend Squad Leader. Coordinate backend specialists (ef-modeler, hangfire-orchestrator, etc.). Assign tasks, review designs, enforce backend standards. Escalate cross-domain conflicts to standards-architect.\n\nYou also own VSA Architecture: Analyze proposals and produce VSA Blueprints:\n1. ENTITY FIELDS: all fields with correct C# types (no AggregateRoot, no Value Objects)\n2. OPERATIONS: required slices (Create, GetAll, GetById, Update, Delete + custom operations)\n3. ROUTES: HTTP method + route per operation (e.g., POST /api/products, GET /api/products/{id:guid})\n4. ERROR TYPES: Error factory methods for {Entity}Errors (only NotFound and specific cases)\n5. VALIDATION RULES: FluentValidation rules per field per operation\nEach operation is a self-contained slice: Request + Response + Handler + Validator + Endpoint.\nRef: framework/standards/architecture/vertical-slice/vertical-slice.md\n\nYou also own API Design: Design REST APIs (resource naming, HTTP verbs, status codes), GraphQL schemas with Hot Chocolate, gRPC .proto files. Add OpenAPI/Swagger annotations. Implement API versioning, rate limiting. Review with frontend specialists.\n\nReference: Read `.morph/framework/templates/code/dotnet/feature/` for VSA code patterns. Follow the templates exactly."
164
- }
165
- },
166
- "infra-architect": {
167
- "tier": 2,
168
- "title": "Infrastructure Squad Leader",
169
- "group": "infra",
170
- "active_phases": [
171
- "*"
172
- ],
173
- "reports_to": "standards-architect",
174
- "domains": [
175
- "infrastructure",
176
- "infrastructure-cicd",
177
- "infrastructure-containers"
178
- ],
179
- "keywords": [
180
- "infrastructure",
181
- "infra",
182
- "cloud",
183
- "deployment",
184
- "hosting",
185
- "ci/cd",
186
- "container",
187
- "iac",
188
- "pipeline",
189
- "vercel",
190
- "neon",
191
- "planetscale",
192
- "serverless database",
193
- "serverless postgres",
194
- "docker",
195
- "containerize",
196
- "dockerfile",
197
- "multi-stage",
198
- "deploy",
199
- "release",
200
- "github actions"
201
- ],
202
- "validators": [],
203
- "standards": [],
204
- "stacks": [
205
- "docker"
206
- ],
207
- "teammate": {
208
- "role": "Infrastructure Squad Leader",
209
- "icon": "🏗️",
210
- "spawn_prompt": "You are the Infrastructure Squad Leader. Coordinate infra work: CI/CD pipelines, containerization, cost optimization. Delegate to cloud-specific specialists as needed. IMPORTANT: When deployment target is Vercel, ALWAYS enforce serverless database (Neon, Supabase/PgBouncer, PlanetScale) — never TCP connection pools. Escalate to standards-architect on conflicts.\n\nYou also own Containerization: Write Dockerfiles (multi-stage builds), .dockerignore. Deploy to Docker/EasyPanel (scale-to-zero). Optimize image size, configure health checks.\n\nYou also own CI/CD: Build GitHub Actions workflows. Implement Blue-Green, Canary, Rolling deployment strategies. Integrate IaC deployment with container image builds.\n\nReference: Read `.morph/framework/templates/infrastructure/` for Docker/CI templates."
211
- }
212
- },
213
- "ui-designer": {
214
- "tier": 2,
215
- "title": "UI/UX Squad Leader",
216
- "group": "frontend",
217
- "active_phases": [
218
- "uiux"
219
- ],
220
- "reports_to": "standards-architect",
221
- "domains": [
222
- "frontend-design"
223
- ],
224
- "keywords": [
225
- "wireframe",
226
- "mockup",
227
- "user flow",
228
- "ux",
229
- "design",
230
- "interface design",
231
- "user experience",
232
- "page",
233
- "dashboard",
234
- "form",
235
- "UI",
236
- "settings",
237
- "interface",
238
- "screen",
239
- "panel",
240
- "portal",
241
- "view"
242
- ],
243
- "validators": [
244
- "design-system",
245
- "contrast"
246
- ],
247
- "standards": [
248
- {
249
- "id": "frontend-design-system-naming",
250
- "scope": "all",
251
- "priority": "required"
252
- },
253
- {
254
- "id": "frontend-design-system-animations",
255
- "scope": "all",
256
- "priority": "required"
257
- }
258
- ],
259
- "teammate": {
260
- "role": "UI/UX Squad Leader (FASE 2)",
261
- "icon": "🎨",
262
- "spawn_prompt": "You are the UI/UX Squad Leader for FASE 2. Create wireframes, mockups, user flows. Define design system (colors, typography, spacing). Work is AGNOSTIC (no implementation code). Apply modern design trends (glassmorphism, gradients, soft shadows, micro-interactions). Guide shadcn/ui component selection. Enforce WCAG AA accessibility (4.5:1 contrast, focus visible, ARIA)."
263
- }
264
- },
265
- "ef-modeler": {
266
- "tier": 3,
267
- "title": "Data Persistence Specialist (Relational)",
268
- "group": "backend",
269
- "active_phases": [
270
- "design",
271
- "implement"
272
- ],
273
- "reports_to": "dotnet-senior",
274
- "domains": [
275
- "backend-data"
276
- ],
277
- "keywords": [
278
- "entity",
279
- "database",
280
- "migration",
281
- "ef core",
282
- "entity framework",
283
- "sql",
284
- "dbcontext"
285
- ],
286
- "validators": [
287
- "architecture"
288
- ],
289
- "standards": [],
290
- "teammate": {
291
- "role": "Data Persistence Specialist",
292
- "icon": "🗄️",
293
- "spawn_prompt": "You are the Data Persistence Specialist (EF Core). Focus on Models/, Migrations/, DbContext. Follow .NET standards. Use IDbContextFactory for background ops. Message nextjs-expert when entities ready for UI binding."
294
- }
295
- },
296
- "hangfire-orchestrator": {
297
- "tier": 3,
298
- "title": "Background Jobs Specialist",
299
- "group": "backend",
300
- "active_phases": [
301
- "implement"
302
- ],
303
- "reports_to": "dotnet-senior",
304
- "domains": [
305
- "backend-jobs"
306
- ],
307
- "keywords": [
308
- "scheduled",
309
- "job",
310
- "background",
311
- "cron",
312
- "hangfire",
313
- "recurring",
314
- "fire and forget",
315
- "delayed"
316
- ],
317
- "validators": [
318
- "architecture"
319
- ],
320
- "standards": [],
321
- "teammate": {
322
- "role": "Background Jobs Specialist",
323
- "icon": "⏰",
324
- "spawn_prompt": "You are the Background Jobs Specialist (Hangfire). Implement fire-and-forget jobs, delayed jobs, recurring jobs (cron), continuations (chaining). Configure retry policies, queue management. Use IDbContextFactory/IRepositoryFactory for scoped operations in background jobs (NOT direct DbContext injection). Also handles webhook integration, event-driven job pipelines, and async processing of external service callbacks."
325
- }
326
- },
327
- "ms-agent-expert": {
328
- "tier": 3,
329
- "title": "Microsoft Agent Framework Expert",
330
- "group": "ai",
331
- "active_phases": [
332
- "design",
333
- "implement"
334
- ],
335
- "reports_to": "ai-system-architect",
336
- "domains": [
337
- "ai-agents"
338
- ],
339
- "keywords": [
340
- "agent",
341
- "ai",
342
- "llm",
343
- "rag",
344
- "embedding",
345
- "mcp",
346
- "a2a",
347
- "middleware",
348
- "microsoft agent framework",
349
- "ichatclient"
350
- ],
351
- "validators": [
352
- "architecture",
353
- "packages"
354
- ],
355
- "standards": [
356
- {
357
- "id": "ai-agents-setup",
358
- "scope": "all",
359
- "priority": "required"
360
- },
361
- {
362
- "id": "ai-agents-workflows",
363
- "scope": "design",
364
- "priority": "required"
365
- },
366
- {
367
- "id": "ai-agents-production",
368
- "scope": "implement",
369
- "priority": "required"
370
- }
371
- ],
372
- "teammate": {
373
- "role": "Microsoft Agent Framework Expert",
374
- "icon": "🤖",
375
- "spawn_prompt": "You are the Microsoft Agent Framework Expert. Implement ChatClientAgent, AIFunctionFactory, agent workflows (sequential, handoff, group chat). Integrate MCP tools (McpClientFactory, ListToolsAsync, Cast<AITool>). Host agents via A2A protocol (MapA2A, agent cards). Add middleware pipeline, observability (WithOpenTelemetry)."
376
- }
377
- },
378
- "supabase-expert": {
379
- "tier": 3,
380
- "title": "Supabase & PostgreSQL Specialist",
381
- "group": "backend",
382
- "active_phases": [
383
- "design",
384
- "implement"
385
- ],
386
- "reports_to": "dotnet-senior",
387
- "domains": [
388
- "backend-supabase"
389
- ],
390
- "keywords": [
391
- "supabase",
392
- "postgresql",
393
- "rls",
394
- "realtime",
395
- "pgvector",
396
- "row level security",
397
- "edge functions"
398
- ],
399
- "validators": [],
400
- "standards": [],
401
- "teammate": {
402
- "role": "Supabase & PostgreSQL Specialist",
403
- "icon": "🐘",
404
- "spawn_prompt": "You are the Supabase & PostgreSQL Specialist. Implement Supabase Auth (magic links, OAuth, JWT), Row Level Security (RLS policies), Realtime subscriptions, Edge Functions (Deno/TypeScript). Use pgvector for embeddings/similarity search. Design efficient schemas with proper indexing."
405
- }
406
- },
407
- "vector-search-expert": {
408
- "tier": 3,
409
- "title": "Vector Search & RAG Specialist",
410
- "group": "ai",
411
- "active_phases": [
412
- "design",
413
- "implement"
414
- ],
415
- "reports_to": "ai-system-architect",
416
- "domains": [
417
- "ai-vector"
418
- ],
419
- "keywords": [
420
- "vector db",
421
- "embeddings",
422
- "semantic search",
423
- "rag",
424
- "pgvector",
425
- "similarity search",
426
- "retrieval augmented"
427
- ],
428
- "validators": [],
429
- "standards": [
430
- {
431
- "id": "ai-agents-setup",
432
- "scope": "all",
433
- "priority": "required"
434
- },
435
- {
436
- "id": "ai-agents-workflows",
437
- "scope": "design",
438
- "priority": "required"
439
- }
440
- ],
441
- "teammate": {
442
- "role": "Vector Search & RAG Specialist",
443
- "icon": "🔎",
444
- "spawn_prompt": "You are the Vector Search & RAG Specialist. Implement vector embeddings (OpenAI), similarity search (pgvector), RAG pipelines (chunking, embedding, retrieval). Design hybrid search (vector + full-text). Optimize embedding dimensions and index types (HNSW, IVFFlat)."
445
- }
446
- },
447
- "asaas-financial": {
448
- "tier": 3,
449
- "title": "Payment Integration Specialist (Brazil)",
450
- "group": "backend",
451
- "active_phases": [
452
- "design",
453
- "implement"
454
- ],
455
- "reports_to": "dotnet-senior",
456
- "domains": [
457
- "integration-payment"
458
- ],
459
- "keywords": [
460
- "asaas",
461
- "payment",
462
- "pix",
463
- "boleto",
464
- "credit card",
465
- "subscription",
466
- "pagamento"
467
- ],
468
- "validators": [
469
- "architecture",
470
- "contract-compliance"
471
- ],
472
- "standards": [],
473
- "teammate": {
474
- "role": "Payment Integration Specialist",
475
- "icon": "💳",
476
- "spawn_prompt": "You are the Payment Integration Specialist (Asaas SDK for Brazil). Implement PIX payments, Boleto generation, Credit Card processing, Subscription management. Follow contract-compliance validator patterns for SDK usage."
477
- }
478
- },
479
- "clerk-auth": {
480
- "tier": 3,
481
- "title": "Auth SaaS Integration Specialist",
482
- "group": "backend",
483
- "active_phases": [
484
- "design",
485
- "implement"
486
- ],
487
- "reports_to": "dotnet-senior",
488
- "domains": [
489
- "integration-auth"
490
- ],
491
- "keywords": [
492
- "clerk",
493
- "clerk auth",
494
- "add auth",
495
- "implement auth",
496
- "login",
497
- "signup",
498
- "oauth"
499
- ],
500
- "validators": [],
501
- "standards": [],
502
- "teammate": {
503
- "role": "Auth SaaS Integration Specialist",
504
- "icon": "🔐",
505
- "spawn_prompt": "You are the Auth SaaS Integration Specialist (Clerk SDK). Implement Clerk authentication flows (login, signup, OAuth), session management, user profile. Integrate with Next.js frontend."
506
- }
507
- },
508
- "resend-email": {
509
- "tier": 3,
510
- "title": "Email Integration Specialist",
511
- "group": "backend",
512
- "active_phases": [
513
- "implement"
514
- ],
515
- "reports_to": "dotnet-senior",
516
- "domains": [
517
- "integration-email"
518
- ],
519
- "keywords": [
520
- "resend",
521
- "email",
522
- "transactional email",
523
- "email notification",
524
- "send email",
525
- "email template",
526
- "smtp"
527
- ],
528
- "validators": [
529
- "architecture",
530
- "contract-compliance"
531
- ],
532
- "standards": [],
533
- "teammate": {
534
- "role": "Email Integration Specialist",
535
- "icon": "📧",
536
- "spawn_prompt": "You are the Email Integration Specialist (Resend SDK). Implement transactional emails, email templates, notification sending. Follow contract-compliance validator for SDK usage patterns."
537
- }
538
- },
539
- "nextjs-expert": {
540
- "tier": 3,
541
- "title": "Next.js Development Specialist",
542
- "group": "frontend",
543
- "active_phases": [
544
- "uiux",
545
- "design",
546
- "tasks",
547
- "implement"
548
- ],
549
- "reports_to": "ui-designer",
550
- "domains": [
551
- "frontend-nextjs",
552
- "frontend-nextjs-ui"
553
- ],
554
- "keywords": [
555
- "next.js",
556
- "nextjs",
557
- "react",
558
- "tsx",
559
- "shadcn",
560
- "tailwind",
561
- "tanstack",
562
- "react-query",
563
- "zod",
564
- "react-hook-form",
565
- "app router",
566
- "server component",
567
- "client component",
568
- "vercel",
569
- "neon",
570
- "planetscale",
571
- "framer-motion",
572
- "animation",
573
- "transition",
574
- "scaffold",
575
- "feature-page",
576
- "motion design",
577
- "shadcn theme",
578
- "tailwind tokens",
579
- "tailwind config",
580
- "design system",
581
- "icon system",
582
- "lucide",
583
- "animated",
584
- "micro-interaction",
585
- "hover effect",
586
- "scroll animation",
587
- "page transition",
588
- "variants",
589
- "AnimatePresence"
590
- ],
591
- "validators": [
592
- "nextjs-component",
593
- "design-system"
594
- ],
595
- "standards": [
596
- {
597
- "id": "frontend-nextjs-naming-conventions",
598
- "scope": "all",
599
- "priority": "required"
600
- },
601
- {
602
- "id": "frontend-nextjs-project-structure",
603
- "scope": "all",
604
- "priority": "required"
605
- },
606
- {
607
- "id": "frontend-nextjs-app-router",
608
- "scope": "all",
609
- "priority": "required"
610
- },
611
- {
612
- "id": "frontend-nextjs-components",
613
- "scope": "all",
614
- "priority": "required"
615
- },
616
- {
617
- "id": "frontend-nextjs-data-fetching",
618
- "scope": "implement",
619
- "priority": "required"
620
- },
621
- {
622
- "id": "frontend-nextjs-forms",
623
- "scope": "implement",
624
- "priority": "required"
625
- },
626
- {
627
- "id": "frontend-nextjs-state-management",
628
- "scope": "implement",
629
- "priority": "required"
630
- },
631
- {
632
- "id": "frontend-nextjs-testing",
633
- "scope": "implement",
634
- "priority": "reference"
635
- },
636
- {
637
- "id": "frontend-nextjs-nextjs-patterns",
638
- "scope": "all",
639
- "priority": "required"
640
- },
641
- {
642
- "id": "frontend-nextjs-motion-patterns",
643
- "scope": "all",
644
- "priority": "required"
645
- }
646
- ],
647
- "teammate": {
648
- "role": "Next.js Development Specialist",
649
- "icon": "⚛️",
650
- "spawn_prompt": "You are the Next.js Development Specialist. Build Next.js 14+ applications with shadcn/ui components, TanStack Query for data fetching, Server Actions for mutations. Implement Route Handlers for API routes. IMPORTANT: When deployment target is Vercel, database must be serverless (Neon, Supabase/PgBouncer port 6543, PlanetScale) — never a plain TCP connection pool.\n\nYou also own UI/animation: Focus on Framer Motion animations (variants, AnimatePresence, useInView, gestures), shadcn/ui theming via CSS vars without editing primitives, Tailwind token bridging from design-system.md, and Lucide icon consistency. ALWAYS read .morph/context/design-system.md first and use only defined tokens. ALWAYS implement useReducedMotion() for WCAG compliance.\n\nReference: Read `.morph/framework/templates/frontend/nextjs/` for Next.js code patterns."
651
- }
652
- },
653
- "css-specialist": {
654
- "tier": 3,
655
- "title": "CSS & Design System Specialist",
656
- "group": "frontend",
657
- "active_phases": [
658
- "implement"
659
- ],
660
- "reports_to": "ui-designer",
661
- "domains": [
662
- "frontend-css"
663
- ],
664
- "keywords": [
665
- "css",
666
- "design system",
667
- "styling",
668
- "theme",
669
- "design tokens",
670
- "palette"
671
- ],
672
- "validators": [
673
- "css",
674
- "contrast",
675
- "design-system"
676
- ],
677
- "standards": [
678
- {
679
- "id": "frontend-design-system-naming",
680
- "scope": "all",
681
- "priority": "required"
682
- },
683
- {
684
- "id": "frontend-design-system-animations",
685
- "scope": "all",
686
- "priority": "required"
687
- }
688
- ],
689
- "teammate": {
690
- "role": "CSS & Design System Specialist",
691
- "icon": "🎨",
692
- "spawn_prompt": "You are the CSS & Design System Specialist (FASE 7 only). MANDATORY FIRST STEP: Read .morph/context/design-system.md. Validate all CSS follows the design system — colors (var(--color-*)), spacing (var(--space-*)), typography (var(--font-*, --text-*)), motion (var(--duration-*, --easing-*)), shadows (var(--shadow-*)), and advanced effects (var(--glass-*, --aurora-*, --perspective-*)). No off-palette hardcoded colors, no inline styles with raw values. Enforce naming conventions (BEM for custom classes). Verify WCAG AA contrast (4.5:1 text, 3:1 UI). Run design-system, css, contrast validators. Any missing tokens must be added to design-system.md before proceeding."
693
- }
694
- },
695
- "seo-growth-hacker": {
696
- "tier": 3,
697
- "title": "SEO & Growth Specialist",
698
- "group": "frontend",
699
- "active_phases": [
700
- "implement"
701
- ],
702
- "reports_to": "ui-designer",
703
- "domains": [
704
- "seo"
705
- ],
706
- "keywords": [
707
- "seo",
708
- "landing page",
709
- "meta tags",
710
- "core web vitals",
711
- "schema markup",
712
- "organic traffic",
713
- "content marketing"
714
- ],
715
- "validators": [],
716
- "standards": [],
717
- "teammate": {
718
- "role": "SEO & Growth Specialist",
719
- "icon": "📈",
720
- "spawn_prompt": "You are the SEO & Growth Specialist (tier-3). Audit technical SEO (Core Web Vitals, meta tags, schema markup JSON-LD), optimize content for search engines, implement structured data (Product, Article, FAQ, HowTo, Organization). Focus on Next.js page optimization, Lighthouse scores, and organic traffic growth."
721
- }
722
- },
723
- "morph-spec-architect": {
724
- "tier": 3,
725
- "title": "Morph-Spec Architect",
726
- "group": "domain-analysis",
727
- "active_phases": [
728
- "design",
729
- "tasks"
730
- ],
731
- "reports_to": "feature-lead",
732
- "domains": [
733
- "cli",
734
- "framework-design",
735
- "nodejs",
736
- "architecture"
737
- ],
738
- "keywords": [
739
- "morph-spec",
740
- "framework feature",
741
- "new command",
742
- "cli architecture",
743
- "plugin",
744
- "hook design"
745
- ],
746
- "validators": [],
747
- "standards": [],
748
- "teammate": {
749
- "role": "specialist",
750
- "icon": "🔧",
751
- "spawn_prompt": "You are the Morph-Spec Architect. You deeply understand the morph-spec-framework codebase: its 4-tier agent hierarchy, state machine (with filesystem-based phase derivation), Commander.js CLI surface (~25 commands registered in bin/morph-spec.js), hooks system, skills system, and the .morph/ directory layout. Your job is to design new features that fit naturally into the existing architecture. Before proposing implementation, always: (1) identify which existing modules can be reused, (2) determine where the new command should live in src/commands/, (3) define the state impact (does it need new state fields?), (4) list which tests need to be written. Follow ESM module patterns throughout."
752
- }
753
- },
754
- "security-expert": {
755
- "tier": 4,
756
- "title": "Security Validator",
757
- "group": "testing",
758
- "active_phases": [
759
- "*"
760
- ],
761
- "reports_to": "standards-architect",
762
- "domains": [
763
- "security"
764
- ],
765
- "keywords": [
766
- "sql injection",
767
- "xss",
768
- "secrets",
769
- "security scan",
770
- "vulnerability",
771
- "csrf",
772
- "insecure deserialization"
773
- ],
774
- "validators": [
775
- "security"
776
- ],
777
- "standards": [],
778
- "teammate": {
779
- "icon": "🛡️",
780
- "role": "Security Validator (read-only)",
781
- "spawn_prompt": "You are the Security Validator (Tier 4, READ-ONLY). Scan ALL source files (.cs, .tsx, .ts, .js) in the project for security vulnerabilities:\n\n1. SQL injection — string concatenation in queries (look for $\"...{var}...\" inside SQL/EF raw queries)\n2. Hardcoded secrets — API keys, passwords, connection strings in source code (not in appsettings)\n3. XSS — unsanitized HTML rendering\n4. Insecure deserialization — BinaryFormatter usage\n5. CSRF — POST forms/endpoints missing anti-forgery tokens\n\nUse Grep and Glob to scan. Do NOT modify any files.\n\nOutput a JSON object: { \"passed\": boolean, \"issues\": [{ \"file\": string, \"line\": number, \"message\": string, \"severity\": \"error\" }] }"
782
- },
783
- "hook_behavior": {
784
- "validates": [
785
- "SQL injection (string concatenation in queries)",
786
- "Hardcoded secrets (API keys, passwords, connection strings)",
787
- "XSS (unsanitized HTML rendering)",
788
- "Insecure deserialization (BinaryFormatter)",
789
- "CSRF (missing anti-forgery tokens)"
790
- ],
791
- "severity": "error",
792
- "blocks_on_fail": true
793
- }
794
- },
795
- "architecture-expert": {
796
- "tier": 4,
797
- "title": "Architecture Validator",
798
- "group": "domain-analysis",
799
- "active_phases": [
800
- "*"
801
- ],
802
- "reports_to": "standards-architect",
803
- "domains": [
804
- "architecture"
805
- ],
806
- "keywords": [
807
- "architecture",
808
- "clean code",
809
- "solid",
810
- "dependency injection"
811
- ],
812
- "validators": [
813
- "architecture"
814
- ],
815
- "standards": [],
816
- "teammate": {
817
- "icon": "🏗️",
818
- "role": "Architecture Validator (read-only)",
819
- "spawn_prompt": "You are the Architecture Validator (Tier 4, READ-ONLY). Scan the project for architectural violations:\n\n1. DbContext injection — look for direct DbContext injection instead of IDbContextFactory in background services\n2. Async/await anti-patterns — search for .Result, .Wait(), .GetAwaiter().GetResult() in async code\n3. DI registration order — in Program.cs, verify services are registered before middleware (app.Use*/Map*)\n4. Layer violations — Domain/Application projects must not reference Infrastructure or Web projects\n\nUse Grep and Glob to scan. Do NOT modify any files.\n\nOutput a JSON object: { \"passed\": boolean, \"issues\": [{ \"file\": string, \"line\": number, \"message\": string, \"severity\": \"error\" }] }"
820
- },
821
- "hook_behavior": {
822
- "validates": [
823
- "DbContext injection (IDbContextFactory required)",
824
- "Async/await patterns (no .Result or .Wait)",
825
- "DI registration order (services before middleware)",
826
- "Layer violations"
827
- ],
828
- "severity": "error",
829
- "blocks_on_fail": true
830
- }
831
- },
832
- "packages-validator": {
833
- "tier": 4,
834
- "title": "Packages Validator",
835
- "group": "testing",
836
- "active_phases": [
837
- "*"
838
- ],
839
- "reports_to": "standards-architect",
840
- "domains": [
841
- "packages"
842
- ],
843
- "keywords": [
844
- "nuget",
845
- "packages",
846
- "dependencies",
847
- "version conflict"
848
- ],
849
- "validators": [
850
- "packages"
851
- ],
852
- "standards": [],
853
- "teammate": {
854
- "icon": "📦",
855
- "role": "Packages Validator (read-only)",
856
- "spawn_prompt": "You are the Packages Validator (Tier 4, READ-ONLY). Scan all project files for package issues:\n\n1. NuGet version conflicts — search *.csproj files for the same PackageReference appearing with different versions across projects\n2. Incompatible .NET 10 packages — check that major package versions are compatible with the target framework\n3. Security vulnerabilities — look for known outdated packages (Newtonsoft.Json < 13.0.1, System.Text.Json < 8.0.5, etc.)\n4. For npm projects: check package.json for duplicate dependencies, outdated major versions\n\nUse Grep and Glob to scan. Do NOT modify any files.\n\nOutput a JSON object: { \"passed\": boolean, \"issues\": [{ \"file\": string, \"message\": string, \"severity\": \"error\" }] }"
857
- },
858
- "hook_behavior": {
859
- "validates": [
860
- "NuGet version conflicts (same package, different versions)",
861
- "Incompatible .NET 10 packages",
862
- "Security vulnerabilities (outdated packages)"
863
- ],
864
- "severity": "error",
865
- "blocks_on_fail": true
866
- }
867
- },
868
- "design-system-validator": {
869
- "tier": 4,
870
- "title": "Design System Validator",
871
- "group": "frontend",
872
- "active_phases": [
873
- "*"
874
- ],
875
- "reports_to": "ui-designer",
876
- "domains": [
877
- "design-system"
878
- ],
879
- "keywords": [
880
- "design system",
881
- "css",
882
- "color palette",
883
- "spacing",
884
- "motion tokens",
885
- "glassmorphism",
886
- "design trends",
887
- "advanced effects"
888
- ],
889
- "validators": [
890
- "design-system"
891
- ],
892
- "standards": [
893
- {
894
- "id": "frontend-design-system-naming",
895
- "scope": "all",
896
- "priority": "required"
897
- },
898
- {
899
- "id": "frontend-design-system-animations",
900
- "scope": "all",
901
- "priority": "required"
902
- }
903
- ],
904
- "teammate": {
905
- "icon": "🎨",
906
- "role": "Design System Validator (read-only)",
907
- "spawn_prompt": "You are the Design System Validator (Tier 4, READ-ONLY). Scan CSS/SCSS and component files for design system compliance:\n\n1. Color palette — look for hardcoded hex/rgb colors instead of CSS variables (var(--color-primary), var(--color-accent), var(--color-surface-*), var(--color-text-*), etc.)\n2. Spacing — look for hardcoded px/rem values instead of spacing variables (var(--space-*))\n3. Typography — look for hardcoded font-size/font-family instead of typography variables (var(--font-display), var(--font-body), var(--text-*))\n4. Motion — look for hardcoded transition/animation durations instead of motion tokens (var(--duration-*), var(--easing-*))\n5. Shadows — look for hardcoded box-shadow instead of shadow tokens (var(--shadow-*), var(--shadow-colored-*), var(--shadow-layered-*))\n6. Advanced effects — verify glassmorphism uses tokens (var(--glass-*)), aurora uses tokens (var(--aurora-*)), perspective uses tokens (var(--perspective-*))\n7. Component naming — verify kebab-case for CSS classes\n8. Check .morph/context/design-system.md for project-specific design tokens\n\nUse Grep and Glob to scan. Do NOT modify any files.\n\nOutput a JSON object: { \"passed\": boolean, \"issues\": [{ \"file\": string, \"line\": number, \"message\": string, \"severity\": \"warning\" }] }"
908
- },
909
- "hook_behavior": {
910
- "validates": [
911
- "CSS color palette compliance (primary, accent, surface, text, neutral, semantic)",
912
- "Spacing values (use var(--space-*))",
913
- "Typography scale (use var(--font-display), var(--font-body), var(--text-*))",
914
- "Motion tokens (use var(--duration-*), var(--easing-*))",
915
- "Shadow tokens (use var(--shadow-*), var(--shadow-colored-*), var(--shadow-layered-*))",
916
- "Advanced effects (glassmorphism: var(--glass-*), aurora: var(--aurora-*), perspective: var(--perspective-*))",
917
- "Component naming (kebab-case for CSS)"
918
- ],
919
- "severity": "warning",
920
- "blocks_on_fail": false
921
- }
922
- },
923
- "nextjs-component-validator": {
924
- "tier": 4,
925
- "title": "Next.js Component Validator",
926
- "group": "frontend",
927
- "active_phases": [
928
- "implement"
929
- ],
930
- "domains": [
931
- "frontend-nextjs"
932
- ],
933
- "keywords": [
934
- "nextjs",
935
- "tsx",
936
- "use client",
937
- "server component",
938
- "app router"
939
- ],
940
- "validators": [
941
- "nextjs-component"
942
- ],
943
- "stacks": [
944
- "nextjs"
945
- ],
946
- "teammate": {
947
- "icon": "⚛️",
948
- "role": "Next.js Component Validator (read-only)",
949
- "spawn_prompt": "You are the Next.js Component Validator (Tier 4, READ-ONLY). Scan all .tsx/.ts files under src/ and validate:\n\n1. \"use client\" directive — must be present when React hooks (useState, useEffect, etc.) are used\n2. Server Components — \"use client\" must be absent for pure Server Components (no hooks, no event handlers)\n3. File naming — component files must use kebab-case naming convention\n4. Import patterns — client components should not import server-only modules\n\nUse Grep and Glob to scan. Do NOT modify any files.\n\nOutput a JSON object: { \"passed\": boolean, \"issues\": [{ \"file\": string, \"message\": string, \"suggestion\": string, \"severity\": \"warning\" }] }"
950
- },
951
- "hook_behavior": {
952
- "severity": "warning",
953
- "blocks_on_fail": false,
954
- "validates": [
955
- "use-client directive",
956
- "hook usage",
957
- "file naming"
958
- ]
959
- }
960
- }
961
- },
962
- "squads": {
963
- "backend_squad": {
964
- "leader": "dotnet-senior",
965
- "members": [
966
- "ef-modeler",
967
- "hangfire-orchestrator",
968
- "ms-agent-expert",
969
- "supabase-expert",
970
- "vector-search-expert",
971
- "asaas-financial",
972
- "clerk-auth",
973
- "resend-email"
974
- ],
975
- "domains": [
976
- "backend",
977
- "backend-data",
978
- "backend-api",
979
- "backend-jobs",
980
- "ai-agents",
981
- "backend-supabase",
982
- "ai-vector",
983
- "integration-payment",
984
- "integration-auth",
985
- "integration-email"
986
- ]
987
- },
988
- "frontend_squad": {
989
- "leader": "ui-designer",
990
- "members": [
991
- "nextjs-expert",
992
- "css-specialist",
993
- "seo-growth-hacker"
994
- ],
995
- "domains": [
996
- "frontend-design",
997
- "frontend-nextjs",
998
- "frontend-nextjs-ui",
999
- "frontend-css",
1000
- "seo"
1001
- ],
1002
- "active_phases": {
1003
- "design": [
1004
- "ui-designer"
1005
- ],
1006
- "implement": [
1007
- "nextjs-expert",
1008
- "css-specialist",
1009
- "seo-growth-hacker"
1010
- ]
1011
- }
1012
- },
1013
- "infrastructure_squad": {
1014
- "leader": "infra-architect",
1015
- "members": [],
1016
- "domains": [
1017
- "infrastructure",
1018
- "infrastructure-cicd",
1019
- "infrastructure-containers"
1020
- ]
1021
- },
1022
- "quality_squad": {
1023
- "leader": "standards-architect",
1024
- "members": [],
1025
- "domains": [
1026
- "quality-testing",
1027
- "quality-review"
1028
- ],
1029
- "note": "No permanent leader — standards-architect coordinates directly"
1030
- }
1031
- },
1032
- "relationship_types": {
1033
- "reports_to": "Hierarchical manager relationship",
1034
- "coordinates": "Manages/leads these agents",
1035
- "escalates_to": "Where to escalate unresolved issues",
1036
- "collaborates_with": "Peer agents for cross-domain work",
1037
- "runs_in": "Execution context (hooks, not teammates)",
1038
- "team_role": "Role in Agent Teams (lead, domain_leader, specialist, validator, escalation_specialist, post_implementation, planning_only)"
1039
- }
1040
- }
1
+ {
2
+ "$schema": "./agent-schema.json",
3
+ "version": "4.0.0",
4
+ "total_agents": 22,
5
+ "tiers": {
6
+ "tier_1_orchestrators": 2,
7
+ "tier_2_leaders": 3,
8
+ "tier_3_specialists": 12,
9
+ "tier_4_validators": 5
10
+ },
11
+ "agents": {
12
+ "standards-architect": {
13
+ "color": "red",
14
+ "tier": 1,
15
+ "title": "Chief Architect",
16
+ "group": "domain-analysis",
17
+ "active_phases": [
18
+ "*"
19
+ ],
20
+ "reports_to": "user",
21
+ "domains": [
22
+ "architecture",
23
+ "developer-experience"
24
+ ],
25
+ "keywords": [],
26
+ "validators": [],
27
+ "standards": [],
28
+ "teammate": {
29
+ "role": "Team Lead (Delegate Mode)",
30
+ "icon": "🎯",
31
+ "triggers": "cross-domain conflicts, full spec synthesis, architecture decisions, team coordination",
32
+ "spawn_prompt": "You are the Chief Architect and Team Lead for MORPH-SPEC. Coordinate Domain Leaders, resolve architectural conflicts, and synthesize results.\n\nWorkflow:\n1. Read `.morph/state.json` for active feature and phase\n2. Read `.morph/features/{feature}/spec.md` for scope\n3. Delegate to Domain Leaders — DO NOT implement code yourself\n4. Synthesize results and escalate unresolvable conflicts to the user\n\nRefer to the Domain Knowledge section below for naming rules, instant-fail checks, and VSA project structure."
33
+ }
34
+ },
35
+ "ai-system-architect": {
36
+ "color": "orange",
37
+ "tier": 1,
38
+ "title": "AI/Agent Architect",
39
+ "group": "domain-analysis",
40
+ "active_phases": [
41
+ "design",
42
+ "tasks"
43
+ ],
44
+ "reports_to": "standards-architect",
45
+ "domains": [
46
+ "ai-orchestration",
47
+ "architecture"
48
+ ],
49
+ "keywords": [
50
+ "agent system",
51
+ "ai architecture",
52
+ "orchestration",
53
+ "multi-agent",
54
+ "agent workflow"
55
+ ],
56
+ "validators": [],
57
+ "standards": [
58
+ {
59
+ "id": "ai-agents-setup",
60
+ "scope": "all",
61
+ "priority": "required"
62
+ },
63
+ {
64
+ "id": "ai-agents-workflows",
65
+ "scope": "design",
66
+ "priority": "required"
67
+ },
68
+ {
69
+ "id": "ai-agents-production",
70
+ "scope": "implement",
71
+ "priority": "required"
72
+ }
73
+ ],
74
+ "teammate": {
75
+ "role": "AI Architect",
76
+ "icon": "🤖",
77
+ "triggers": "AI system design, agent workflows, MCP integration, orchestration patterns",
78
+ "spawn_prompt": "You are the AI/Agent System Architect. Design agent workflows, tool integrations, and AI orchestration patterns.\n\nWorkflow:\n1. Read `.morph/state.json` and spec.md for AI requirements\n2. Design architecture using patterns from Domain Knowledge section below\n3. Delegate implementation to ms-agent-expert and vector-search-expert\n\nDO NOT implement code yourself. Refer to the Domain Knowledge section below for the 20 agentic patterns, MAF orchestration, and RAG pipeline architecture."
79
+ }
80
+ },
81
+ "dotnet-senior": {
82
+ "color": "blue",
83
+ "tier": 2,
84
+ "title": "Backend Squad Leader",
85
+ "group": "backend",
86
+ "active_phases": [
87
+ "*"
88
+ ],
89
+ "reports_to": "standards-architect",
90
+ "domains": [
91
+ "backend",
92
+ "backend-api",
93
+ "architecture"
94
+ ],
95
+ "keywords": [
96
+ "backend",
97
+ "api",
98
+ "dotnet",
99
+ ".net",
100
+ "csharp",
101
+ "c#",
102
+ "web api",
103
+ "minimal api",
104
+ "vertical slice",
105
+ "vertical-slice",
106
+ "vsa",
107
+ "minimal apis",
108
+ "ihandler",
109
+ "result pattern",
110
+ "feature slice",
111
+ "scrutor",
112
+ "vertical slice architecture",
113
+ "scaffold",
114
+ "feature-slice",
115
+ "vsa-scaffold",
116
+ "rest",
117
+ "openapi",
118
+ "swagger",
119
+ "versioning",
120
+ "rate limiting",
121
+ "endpoint"
122
+ ],
123
+ "validators": [
124
+ "architecture",
125
+ "packages"
126
+ ],
127
+ "standards": [
128
+ {
129
+ "id": "architecture-vertical-slice-vertical-slice",
130
+ "scope": "all",
131
+ "priority": "required"
132
+ },
133
+ {
134
+ "id": "backend-dotnet-scrutor",
135
+ "scope": "implement",
136
+ "priority": "required"
137
+ },
138
+ {
139
+ "id": "backend-dotnet-result-pattern",
140
+ "scope": "all",
141
+ "priority": "required"
142
+ },
143
+ {
144
+ "id": "backend-dotnet-fluent-validation-vsa",
145
+ "scope": "implement",
146
+ "priority": "required"
147
+ },
148
+ {
149
+ "id": "backend-dotnet-scalar-ui",
150
+ "scope": "implement",
151
+ "priority": "reference"
152
+ },
153
+ {
154
+ "id": "backend-dotnet-vsa-handler-patterns",
155
+ "scope": "all",
156
+ "priority": "required"
157
+ }
158
+ ],
159
+ "stacks": [
160
+ "dotnet"
161
+ ],
162
+ "teammate": {
163
+ "role": "Backend Squad Leader",
164
+ "icon": "⚙️",
165
+ "triggers": ".NET/C# backend, VSA architecture, EF Core, API design, backend squad coordination",
166
+ "spawn_prompt": "You are the Backend Squad Leader. Coordinate backend specialists and own VSA architecture, API design, and .NET/C# standards.\n\nWorkflow:\n1. Read `.morph/state.json` and spec.md for backend requirements\n2. Produce VSA Blueprint: entity fields, operations (slices), routes, error types, validation rules\n3. Delegate to squad: ef-modeler, hangfire-orchestrator, ms-agent-expert, supabase-expert, vector-search-expert, asaas-financial, clerk-auth, resend-email\n\nRefer to the Domain Knowledge section below for IHandler, Result<T>, Scrutor, IApiEndpoint patterns and code templates."
167
+ }
168
+ },
169
+ "infra-architect": {
170
+ "color": "green",
171
+ "tier": 2,
172
+ "title": "Infrastructure Squad Leader",
173
+ "group": "infra",
174
+ "active_phases": [
175
+ "*"
176
+ ],
177
+ "reports_to": "standards-architect",
178
+ "domains": [
179
+ "infrastructure",
180
+ "infrastructure-cicd",
181
+ "infrastructure-containers"
182
+ ],
183
+ "keywords": [
184
+ "infrastructure",
185
+ "infra",
186
+ "cloud",
187
+ "deployment",
188
+ "hosting",
189
+ "ci/cd",
190
+ "container",
191
+ "iac",
192
+ "pipeline",
193
+ "easypanel",
194
+ "docker",
195
+ "containerize",
196
+ "dockerfile",
197
+ "multi-stage",
198
+ "deploy",
199
+ "release",
200
+ "github actions"
201
+ ],
202
+ "validators": [],
203
+ "standards": [],
204
+ "stacks": [
205
+ "docker"
206
+ ],
207
+ "teammate": {
208
+ "role": "Infrastructure Squad Leader",
209
+ "icon": "🏗️",
210
+ "triggers": "Docker, CI/CD, GitHub Actions, EasyPanel deployment, containerization",
211
+ "spawn_prompt": "You are the Infrastructure Squad Leader. Coordinate Docker, CI/CD, and EasyPanel deployment.\n\nWorkflow:\n1. Read `.morph/state.json` and spec.md for infrastructure requirements\n2. Design containerization and deployment architecture\n3. Escalate to standards-architect on cross-domain conflicts\n\nRefer to the Domain Knowledge section below for Docker, GitHub Actions, and EasyPanel patterns."
212
+ }
213
+ },
214
+ "ui-designer": {
215
+ "color": "purple",
216
+ "tier": 2,
217
+ "title": "UI/UX Squad Leader",
218
+ "group": "frontend",
219
+ "active_phases": [
220
+ "uiux"
221
+ ],
222
+ "reports_to": "standards-architect",
223
+ "domains": [
224
+ "frontend-design"
225
+ ],
226
+ "keywords": [
227
+ "wireframe",
228
+ "mockup",
229
+ "user flow",
230
+ "ux",
231
+ "design",
232
+ "interface design",
233
+ "user experience",
234
+ "page",
235
+ "dashboard",
236
+ "form",
237
+ "UI",
238
+ "settings",
239
+ "interface",
240
+ "screen",
241
+ "panel",
242
+ "portal",
243
+ "view"
244
+ ],
245
+ "validators": [
246
+ "design-system",
247
+ "contrast"
248
+ ],
249
+ "standards": [
250
+ {
251
+ "id": "frontend-design-system-naming",
252
+ "scope": "all",
253
+ "priority": "required"
254
+ },
255
+ {
256
+ "id": "frontend-design-system-animations",
257
+ "scope": "all",
258
+ "priority": "required"
259
+ }
260
+ ],
261
+ "teammate": {
262
+ "role": "UI/UX Squad Leader",
263
+ "icon": "🎨",
264
+ "triggers": "UI/UX design, wireframes, user flows, design system, shadcn/ui component selection",
265
+ "spawn_prompt": "You are the UI/UX Squad Leader. Create wireframes, design system, and user flows during the UI/UX phase.\n\nWorkflow:\n1. Read `.morph/context/design-system.md` FIRST — use only defined tokens\n2. Read spec.md for UI requirements\n3. Generate deliverables: design-system.md, mockups.md, components.md, flows.md\n4. Coordinate squad: nextjs-expert, css-specialist, seo-growth-hacker\n\nWork is UI/UX phase ONLY — no implementation code. Refer to the Domain Knowledge section below for design brief protocol, shadcn/ui reference, and accessibility rules."
266
+ }
267
+ },
268
+ "ef-modeler": {
269
+ "color": "teal",
270
+ "tier": 3,
271
+ "title": "Data Persistence Specialist (Relational)",
272
+ "group": "backend",
273
+ "active_phases": [
274
+ "design",
275
+ "implement"
276
+ ],
277
+ "reports_to": "dotnet-senior",
278
+ "domains": [
279
+ "backend-data"
280
+ ],
281
+ "keywords": [
282
+ "entity",
283
+ "database",
284
+ "migration",
285
+ "ef core",
286
+ "entity framework",
287
+ "sql",
288
+ "dbcontext"
289
+ ],
290
+ "validators": [
291
+ "architecture"
292
+ ],
293
+ "standards": [],
294
+ "teammate": {
295
+ "role": "Data Persistence Specialist",
296
+ "icon": "🗄️",
297
+ "triggers": "Entity Framework, database entities, migrations, DbContext, SQL schema design",
298
+ "spawn_prompt": "You are the Data Persistence Specialist (EF Core). Design and implement entities, migrations, and database schema.\n\nWorkflow:\n1. Read spec.md and VSA Blueprint from dotnet-senior for entity definitions\n2. Implement entity models, EF configurations, and migrations\n\nCRITICAL: Use IDbContextFactory for background services and Hangfire jobs — never inject DbContext directly.\n\nRefer to the Domain Knowledge section below for entity patterns, configuration patterns, and migration checklist."
299
+ }
300
+ },
301
+ "hangfire-orchestrator": {
302
+ "color": "teal",
303
+ "tier": 3,
304
+ "title": "Background Jobs Specialist",
305
+ "group": "backend",
306
+ "active_phases": [
307
+ "implement"
308
+ ],
309
+ "reports_to": "dotnet-senior",
310
+ "domains": [
311
+ "backend-jobs"
312
+ ],
313
+ "keywords": [
314
+ "scheduled",
315
+ "job",
316
+ "background",
317
+ "cron",
318
+ "hangfire",
319
+ "recurring",
320
+ "fire and forget",
321
+ "delayed"
322
+ ],
323
+ "validators": [
324
+ "architecture"
325
+ ],
326
+ "standards": [],
327
+ "teammate": {
328
+ "role": "Background Jobs Specialist",
329
+ "icon": "⏰",
330
+ "triggers": "background jobs, scheduled tasks, cron jobs, webhooks, async job pipelines",
331
+ "spawn_prompt": "You are the Background Jobs Specialist (Hangfire). Implement fire-and-forget, delayed, recurring, and continuation jobs.\n\nWorkflow:\n1. Read spec.md for background processing requirements\n2. Implement jobs with proper scoped service patterns\n\nCRITICAL: Use IDbContextFactory or IRepositoryFactory for scoped DB operations — never inject DbContext directly.\n\nRefer to the Domain Knowledge section below for setup, job types, retry patterns, and dashboard configuration."
332
+ }
333
+ },
334
+ "ms-agent-expert": {
335
+ "color": "yellow",
336
+ "tier": 3,
337
+ "title": "Microsoft Agent Framework Expert",
338
+ "group": "ai",
339
+ "active_phases": [
340
+ "design",
341
+ "implement"
342
+ ],
343
+ "reports_to": "ai-system-architect",
344
+ "domains": [
345
+ "ai-agents"
346
+ ],
347
+ "keywords": [
348
+ "agent",
349
+ "ai",
350
+ "llm",
351
+ "rag",
352
+ "embedding",
353
+ "mcp",
354
+ "a2a",
355
+ "middleware",
356
+ "microsoft agent framework",
357
+ "ichatclient"
358
+ ],
359
+ "validators": [
360
+ "architecture",
361
+ "packages"
362
+ ],
363
+ "standards": [
364
+ {
365
+ "id": "ai-agents-setup",
366
+ "scope": "all",
367
+ "priority": "required"
368
+ },
369
+ {
370
+ "id": "ai-agents-workflows",
371
+ "scope": "design",
372
+ "priority": "required"
373
+ },
374
+ {
375
+ "id": "ai-agents-production",
376
+ "scope": "implement",
377
+ "priority": "required"
378
+ }
379
+ ],
380
+ "teammate": {
381
+ "role": "Microsoft Agent Framework Expert",
382
+ "icon": "🤖",
383
+ "triggers": "Microsoft Agent Framework, IChatClient, agent workflows, MCP tools, A2A protocol",
384
+ "spawn_prompt": "You are the Microsoft Agent Framework Expert. Implement AI agent systems using IChatClient, AIFunctionFactory, and workflow patterns.\n\nWorkflow:\n1. Read spec.md for AI agent requirements\n2. Review architecture from ai-system-architect\n3. Implement using Microsoft.Extensions.AI patterns\n\nRefer to the Domain Knowledge section below for agent implementation, tool registration, MCP integration, and A2A protocol patterns."
385
+ }
386
+ },
387
+ "supabase-expert": {
388
+ "color": "teal",
389
+ "tier": 3,
390
+ "title": "Supabase & PostgreSQL Specialist",
391
+ "group": "backend",
392
+ "active_phases": [
393
+ "design",
394
+ "implement"
395
+ ],
396
+ "reports_to": "dotnet-senior",
397
+ "domains": [
398
+ "backend-supabase"
399
+ ],
400
+ "keywords": [
401
+ "supabase",
402
+ "postgresql",
403
+ "rls",
404
+ "realtime",
405
+ "pgvector",
406
+ "row level security",
407
+ "edge functions"
408
+ ],
409
+ "validators": [],
410
+ "standards": [],
411
+ "teammate": {
412
+ "role": "Supabase & PostgreSQL Specialist",
413
+ "icon": "🐘",
414
+ "triggers": "Supabase, PostgreSQL, RLS policies, pgvector, Edge Functions, Realtime subscriptions",
415
+ "spawn_prompt": "You are the Supabase & PostgreSQL Specialist. Implement auth, RLS, Realtime, Edge Functions, and pgvector.\n\nWorkflow:\n1. Read spec.md for database and auth requirements\n2. Design RLS policies and schema\n3. ALWAYS use PgBouncer (port 6543) for application connections\n\nRefer to the Domain Knowledge section below for RLS patterns, migration workflow, pgvector setup, and Clerk JWT integration."
416
+ }
417
+ },
418
+ "vector-search-expert": {
419
+ "color": "yellow",
420
+ "tier": 3,
421
+ "title": "Vector Search & RAG Specialist",
422
+ "group": "ai",
423
+ "active_phases": [
424
+ "design",
425
+ "implement"
426
+ ],
427
+ "reports_to": "ai-system-architect",
428
+ "domains": [
429
+ "ai-vector"
430
+ ],
431
+ "keywords": [
432
+ "vector db",
433
+ "embeddings",
434
+ "semantic search",
435
+ "rag",
436
+ "pgvector",
437
+ "similarity search",
438
+ "retrieval augmented"
439
+ ],
440
+ "validators": [],
441
+ "standards": [
442
+ {
443
+ "id": "ai-agents-setup",
444
+ "scope": "all",
445
+ "priority": "required"
446
+ },
447
+ {
448
+ "id": "ai-agents-workflows",
449
+ "scope": "design",
450
+ "priority": "required"
451
+ }
452
+ ],
453
+ "teammate": {
454
+ "role": "Vector Search & RAG Specialist",
455
+ "icon": "🔎",
456
+ "triggers": "vector embeddings, RAG pipelines, semantic search, pgvector, HNSW indexes",
457
+ "spawn_prompt": "You are the Vector Search & RAG Specialist. Implement embeddings, similarity search, and RAG pipelines.\n\nWorkflow:\n1. Read spec.md for search and retrieval requirements\n2. Review AI architecture from ai-system-architect\n3. Implement chunking, embedding, and retrieval components\n\nRefer to the Domain Knowledge section below for chunking strategies, pgvector setup, hybrid search, and RAG tool patterns."
458
+ }
459
+ },
460
+ "asaas-financial": {
461
+ "color": "teal",
462
+ "tier": 3,
463
+ "title": "Payment Integration Specialist (Brazil)",
464
+ "group": "backend",
465
+ "active_phases": [
466
+ "design",
467
+ "implement"
468
+ ],
469
+ "reports_to": "dotnet-senior",
470
+ "domains": [
471
+ "integration-payment"
472
+ ],
473
+ "keywords": [
474
+ "asaas",
475
+ "payment",
476
+ "pix",
477
+ "boleto",
478
+ "credit card",
479
+ "subscription",
480
+ "pagamento"
481
+ ],
482
+ "validators": [
483
+ "architecture",
484
+ "contract-compliance"
485
+ ],
486
+ "standards": [],
487
+ "teammate": {
488
+ "role": "Payment Integration Specialist",
489
+ "icon": "💳",
490
+ "triggers": "PIX payments, Boleto, Asaas SDK, subscription billing, Brazilian payments",
491
+ "spawn_prompt": "You are the Payment Integration Specialist (Asaas/Brazil). Implement PIX, Boleto, Credit Card, and subscription billing.\n\nNever hardcode API keys. Follow contract-compliance patterns.\n\nRefer to the Domain Knowledge section below for Asaas SDK patterns, webhook handling, and payment flow examples."
492
+ }
493
+ },
494
+ "clerk-auth": {
495
+ "color": "teal",
496
+ "tier": 3,
497
+ "title": "Auth SaaS Integration Specialist",
498
+ "group": "backend",
499
+ "active_phases": [
500
+ "design",
501
+ "implement"
502
+ ],
503
+ "reports_to": "dotnet-senior",
504
+ "domains": [
505
+ "integration-auth"
506
+ ],
507
+ "keywords": [
508
+ "clerk",
509
+ "clerk auth",
510
+ "add auth",
511
+ "implement auth",
512
+ "login",
513
+ "signup",
514
+ "oauth"
515
+ ],
516
+ "validators": [],
517
+ "standards": [],
518
+ "teammate": {
519
+ "role": "Auth SaaS Integration Specialist",
520
+ "icon": "🔐",
521
+ "triggers": "Clerk authentication, login/signup flows, OAuth, session management",
522
+ "spawn_prompt": "You are the Auth SaaS Integration Specialist (Clerk). Implement authentication flows and session management with Next.js App Router.\n\nRefer to the Domain Knowledge section below for Clerk SDK patterns, middleware configuration, and webhook handling."
523
+ }
524
+ },
525
+ "resend-email": {
526
+ "color": "teal",
527
+ "tier": 3,
528
+ "title": "Email Integration Specialist",
529
+ "group": "backend",
530
+ "active_phases": [
531
+ "implement"
532
+ ],
533
+ "reports_to": "dotnet-senior",
534
+ "domains": [
535
+ "integration-email"
536
+ ],
537
+ "keywords": [
538
+ "resend",
539
+ "email",
540
+ "transactional email",
541
+ "email notification",
542
+ "send email",
543
+ "email template",
544
+ "smtp"
545
+ ],
546
+ "validators": [
547
+ "architecture",
548
+ "contract-compliance"
549
+ ],
550
+ "standards": [],
551
+ "teammate": {
552
+ "role": "Email Integration Specialist",
553
+ "icon": "📧",
554
+ "triggers": "transactional email, Resend SDK, email templates, notifications",
555
+ "spawn_prompt": "You are the Email Integration Specialist (Resend). Implement transactional email delivery.\n\nNever hardcode API keys. Follow contract-compliance patterns.\n\nRefer to the Domain Knowledge section below for Resend SDK patterns, React Email templates, and error handling."
556
+ }
557
+ },
558
+ "nextjs-expert": {
559
+ "color": "pink",
560
+ "tier": 3,
561
+ "title": "Next.js Development Specialist",
562
+ "group": "frontend",
563
+ "active_phases": [
564
+ "uiux",
565
+ "design",
566
+ "tasks",
567
+ "implement"
568
+ ],
569
+ "reports_to": "ui-designer",
570
+ "domains": [
571
+ "frontend-nextjs",
572
+ "frontend-nextjs-ui"
573
+ ],
574
+ "keywords": [
575
+ "next.js",
576
+ "nextjs",
577
+ "react",
578
+ "tsx",
579
+ "shadcn",
580
+ "tailwind",
581
+ "tanstack",
582
+ "react-query",
583
+ "zod",
584
+ "react-hook-form",
585
+ "app router",
586
+ "server component",
587
+ "client component",
588
+ "vercel",
589
+ "neon",
590
+ "planetscale",
591
+ "framer-motion",
592
+ "animation",
593
+ "transition",
594
+ "scaffold",
595
+ "feature-page",
596
+ "motion design",
597
+ "shadcn theme",
598
+ "tailwind tokens",
599
+ "tailwind config",
600
+ "design system",
601
+ "icon system",
602
+ "lucide",
603
+ "animated",
604
+ "micro-interaction",
605
+ "hover effect",
606
+ "scroll animation",
607
+ "page transition",
608
+ "variants",
609
+ "AnimatePresence"
610
+ ],
611
+ "validators": [
612
+ "nextjs-component",
613
+ "design-system"
614
+ ],
615
+ "standards": [
616
+ {
617
+ "id": "frontend-nextjs-naming-conventions",
618
+ "scope": "all",
619
+ "priority": "required"
620
+ },
621
+ {
622
+ "id": "frontend-nextjs-project-structure",
623
+ "scope": "all",
624
+ "priority": "required"
625
+ },
626
+ {
627
+ "id": "frontend-nextjs-app-router",
628
+ "scope": "all",
629
+ "priority": "required"
630
+ },
631
+ {
632
+ "id": "frontend-nextjs-components",
633
+ "scope": "all",
634
+ "priority": "required"
635
+ },
636
+ {
637
+ "id": "frontend-nextjs-data-fetching",
638
+ "scope": "implement",
639
+ "priority": "required"
640
+ },
641
+ {
642
+ "id": "frontend-nextjs-forms",
643
+ "scope": "implement",
644
+ "priority": "required"
645
+ },
646
+ {
647
+ "id": "frontend-nextjs-state-management",
648
+ "scope": "implement",
649
+ "priority": "required"
650
+ },
651
+ {
652
+ "id": "frontend-nextjs-testing",
653
+ "scope": "implement",
654
+ "priority": "reference"
655
+ },
656
+ {
657
+ "id": "frontend-nextjs-nextjs-patterns",
658
+ "scope": "all",
659
+ "priority": "required"
660
+ },
661
+ {
662
+ "id": "frontend-nextjs-motion-patterns",
663
+ "scope": "all",
664
+ "priority": "required"
665
+ }
666
+ ],
667
+ "teammate": {
668
+ "role": "Next.js Development Specialist",
669
+ "icon": "⚛️",
670
+ "triggers": "Next.js, React, shadcn/ui, TanStack Query, Framer Motion, App Router",
671
+ "spawn_prompt": "You are the Next.js Development Specialist. Build Next.js 14+ apps with shadcn/ui, TanStack Query, and Framer Motion.\n\nWorkflow:\n1. Read `.morph/context/design-system.md` FIRST — use only defined tokens\n2. Read spec.md for frontend requirements\n3. Implement with App Router patterns (Server Components default, \"use client\" only when needed)\n\nALWAYS: useReducedMotion() for WCAG compliance. Never edit shadcn/ui primitives.\n\nRefer to the Domain Knowledge section below for App Router patterns, data fetching, animation, and component reference."
672
+ }
673
+ },
674
+ "css-specialist": {
675
+ "color": "pink",
676
+ "tier": 3,
677
+ "title": "CSS & Design System Specialist",
678
+ "group": "frontend",
679
+ "active_phases": [
680
+ "implement"
681
+ ],
682
+ "reports_to": "ui-designer",
683
+ "domains": [
684
+ "frontend-css"
685
+ ],
686
+ "keywords": [
687
+ "css",
688
+ "design system",
689
+ "styling",
690
+ "theme",
691
+ "design tokens",
692
+ "palette"
693
+ ],
694
+ "validators": [
695
+ "css",
696
+ "contrast",
697
+ "design-system"
698
+ ],
699
+ "standards": [
700
+ {
701
+ "id": "frontend-design-system-naming",
702
+ "scope": "all",
703
+ "priority": "required"
704
+ },
705
+ {
706
+ "id": "frontend-design-system-animations",
707
+ "scope": "all",
708
+ "priority": "required"
709
+ }
710
+ ],
711
+ "teammate": {
712
+ "role": "CSS & Design System Specialist",
713
+ "icon": "🎨",
714
+ "triggers": "CSS design tokens, Tailwind, color palette, WCAG accessibility, design system compliance",
715
+ "spawn_prompt": "You are the CSS & Design System Specialist. Validate and enforce design token compliance across all styling.\n\nMANDATORY FIRST STEP: Read `.morph/context/design-system.md` — any missing tokens must be added there before making fixes.\n\nRefer to the Domain Knowledge section below for token categories, naming conventions, and WCAG accessibility rules."
716
+ }
717
+ },
718
+ "seo-growth-hacker": {
719
+ "color": "pink",
720
+ "tier": 3,
721
+ "title": "SEO & Growth Specialist",
722
+ "group": "frontend",
723
+ "active_phases": [
724
+ "implement"
725
+ ],
726
+ "reports_to": "ui-designer",
727
+ "domains": [
728
+ "seo"
729
+ ],
730
+ "keywords": [
731
+ "seo",
732
+ "landing page",
733
+ "meta tags",
734
+ "core web vitals",
735
+ "schema markup",
736
+ "organic traffic",
737
+ "content marketing"
738
+ ],
739
+ "validators": [],
740
+ "standards": [],
741
+ "teammate": {
742
+ "role": "SEO & Growth Specialist",
743
+ "icon": "📈",
744
+ "triggers": "SEO, meta tags, schema markup, Core Web Vitals, Lighthouse, structured data",
745
+ "spawn_prompt": "You are the SEO & Growth Specialist. Implement technical SEO, structured data, and Core Web Vitals optimization for Next.js.\n\nWorkflow:\n1. Read spec.md for SEO requirements and target keywords\n2. Audit existing pages and implement optimizations\n3. Target: 90+ Performance, 100 Accessibility, 100 Best Practices, 100 SEO on Lighthouse\n\nRefer to the Domain Knowledge section below for meta tag patterns, JSON-LD schemas, and Next.js optimization."
746
+ }
747
+ },
748
+ "morph-spec-architect": {
749
+ "color": "cyan",
750
+ "tier": 3,
751
+ "title": "Morph-Spec Architect",
752
+ "group": "domain-analysis",
753
+ "active_phases": [
754
+ "design",
755
+ "tasks"
756
+ ],
757
+ "reports_to": "standards-architect",
758
+ "domains": [
759
+ "cli",
760
+ "framework-design",
761
+ "nodejs",
762
+ "architecture"
763
+ ],
764
+ "keywords": [
765
+ "morph-spec",
766
+ "framework feature",
767
+ "new command",
768
+ "cli architecture",
769
+ "plugin",
770
+ "hook design"
771
+ ],
772
+ "validators": [],
773
+ "standards": [],
774
+ "teammate": {
775
+ "role": "specialist",
776
+ "icon": "🔧",
777
+ "triggers": "morph-spec framework, new CLI commands, hook design, plugin architecture",
778
+ "spawn_prompt": "You are the Morph-Spec Architect. You design new features for the morph-spec-framework CLI tool itself.\n\nWhen invoked:\n1. Read `.morph/features/{feature}/spec.md` for the new framework feature requirements\n2. Review `bin/morph-spec.js` for existing command registrations\n3. Identify reusable modules in `src/commands/`, `src/core/`, `src/lib/`, `src/utils/`\n\nFocus areas:\n- CLI command design: Commander.js command definition, option parsing, help text\n- State impact: does the new feature require new state.json fields? (src/core/state/state-manager.js)\n- Output schema: does it produce new output types? (src/core/paths/output-schema.js)\n- Hook integration: does it need new hook events or hook scripts?\n- Test strategy: which test files in test/ need to be created/updated\n- ESM patterns: import/export, no CommonJS, Node.js 18+ APIs\n\nArchitecture rules:\n- Commands are thin wrappers — business logic goes in src/core/ or src/lib/\n- Follow existing normalizeOutputType(), derivePhase() patterns\n- Run `npm run generate` after modifying output-schema.js\n- All tests use node:test (no Jest/Mocha), run sequentially with --test-concurrency=1"
779
+ }
780
+ },
781
+ "security-expert": {
782
+ "color": "gray",
783
+ "tier": 4,
784
+ "title": "Security Validator",
785
+ "group": "testing",
786
+ "active_phases": [
787
+ "*"
788
+ ],
789
+ "reports_to": "standards-architect",
790
+ "domains": [
791
+ "security"
792
+ ],
793
+ "keywords": [
794
+ "sql injection",
795
+ "xss",
796
+ "secrets",
797
+ "security scan",
798
+ "vulnerability",
799
+ "csrf",
800
+ "insecure deserialization"
801
+ ],
802
+ "validators": [
803
+ "security"
804
+ ],
805
+ "standards": [],
806
+ "teammate": {
807
+ "icon": "🛡️",
808
+ "role": "Security Validator (read-only)",
809
+ "triggers": "security scan, SQL injection, XSS, hardcoded secrets, CSRF validation",
810
+ "spawn_prompt": "You are the Security Validator (READ-ONLY). Scan for security vulnerabilities across all source files.\n\nWhen invoked:\n1. Use Grep and Glob to scan all .cs, .tsx, .ts, .js files in the project\n2. Check for: SQL injection (string concat in queries), hardcoded secrets, XSS, insecure deserialization, CSRF\n\nScan checklist:\n- SQL injection: string concatenation inside SQL/EF raw queries ($\"...{var}...\" patterns)\n- Hardcoded secrets: API keys, passwords, connection strings in source (not in appsettings/env)\n- XSS: unsanitized HTML rendering (dangerouslySetInnerHTML without sanitization)\n- Insecure deserialization: BinaryFormatter usage\n- CSRF: POST forms/endpoints missing anti-forgery tokens\n\nOutput JSON:\n{\n \"passed\": boolean,\n \"issues\": [{ \"file\": string, \"line\": number, \"message\": string, \"severity\": \"error\" }]\n}\n\nDo NOT modify any files."
811
+ },
812
+ "hook_behavior": {
813
+ "validates": [
814
+ "SQL injection (string concatenation in queries)",
815
+ "Hardcoded secrets (API keys, passwords, connection strings)",
816
+ "XSS (unsanitized HTML rendering)",
817
+ "Insecure deserialization (BinaryFormatter)",
818
+ "CSRF (missing anti-forgery tokens)"
819
+ ],
820
+ "severity": "error",
821
+ "blocks_on_fail": true
822
+ }
823
+ },
824
+ "architecture-expert": {
825
+ "color": "gray",
826
+ "tier": 4,
827
+ "title": "Architecture Validator",
828
+ "group": "domain-analysis",
829
+ "active_phases": [
830
+ "*"
831
+ ],
832
+ "reports_to": "standards-architect",
833
+ "domains": [
834
+ "architecture"
835
+ ],
836
+ "keywords": [
837
+ "architecture",
838
+ "clean code",
839
+ "solid",
840
+ "dependency injection"
841
+ ],
842
+ "validators": [
843
+ "architecture"
844
+ ],
845
+ "standards": [],
846
+ "teammate": {
847
+ "icon": "🏗️",
848
+ "role": "Architecture Validator (read-only)",
849
+ "triggers": "architecture validation, VSA slice violations, async anti-patterns, DI registration order",
850
+ "spawn_prompt": "You are the Architecture Validator (READ-ONLY). Scan for architectural violations in .NET VSA projects.\n\nWhen invoked:\n1. Use Grep and Glob to scan all .cs files and Program.cs\n2. Check for: DbContext injection, async anti-patterns, DI registration order, VSA violations\n\nScan checklist:\n- DbContext injection: direct DbContext injection in background services (use IDbContextFactory)\n- Async anti-patterns: .Result, .Wait(), .GetAwaiter().GetResult() in async code paths\n- DI registration order: services registered after middleware in Program.cs (services before app.Use*/Map*)\n- VSA slice violations: cross-feature imports (Feature A referencing Feature B internals), shared code not in Shared project\n- Handler pattern: Handlers must return Result<T>, use CancellationToken, be sealed\n\nOutput JSON:\n{\n \"passed\": boolean,\n \"issues\": [{ \"file\": string, \"line\": number, \"message\": string, \"severity\": \"error\" }]\n}\n\nDo NOT modify any files."
851
+ },
852
+ "hook_behavior": {
853
+ "validates": [
854
+ "DbContext injection (IDbContextFactory required)",
855
+ "Async/await patterns (no .Result or .Wait)",
856
+ "DI registration order (services before middleware)",
857
+ "VSA slice isolation (no cross-feature imports)"
858
+ ],
859
+ "severity": "error",
860
+ "blocks_on_fail": true
861
+ }
862
+ },
863
+ "packages-validator": {
864
+ "color": "gray",
865
+ "tier": 4,
866
+ "title": "Packages Validator",
867
+ "group": "testing",
868
+ "active_phases": [
869
+ "*"
870
+ ],
871
+ "reports_to": "standards-architect",
872
+ "domains": [
873
+ "packages"
874
+ ],
875
+ "keywords": [
876
+ "nuget",
877
+ "packages",
878
+ "dependencies",
879
+ "version conflict"
880
+ ],
881
+ "validators": [
882
+ "packages"
883
+ ],
884
+ "standards": [],
885
+ "teammate": {
886
+ "icon": "📦",
887
+ "role": "Packages Validator (read-only)",
888
+ "triggers": "NuGet packages, version conflicts, package vulnerabilities, .NET 10 compatibility",
889
+ "spawn_prompt": "You are the Packages Validator (READ-ONLY). Scan for NuGet and npm package issues.\n\nWhen invoked:\n1. Use Grep and Glob to scan all *.csproj files and package.json files\n2. Check for: version conflicts, incompatible packages, security vulnerabilities\n\nScan checklist:\n- NuGet version conflicts: same PackageReference appearing with different versions across .csproj files\n- .NET 10 compatibility: verify major package versions target .NET 10 (TargetFramework net10.0)\n- Security vulnerabilities: outdated packages (Newtonsoft.Json < 13.0.1, System.Text.Json < 8.0.5, etc.)\n- npm duplicates: duplicate dependencies across package.json, outdated major versions\n\nOutput JSON:\n{\n \"passed\": boolean,\n \"issues\": [{ \"file\": string, \"message\": string, \"severity\": \"error\" }]\n}\n\nDo NOT modify any files."
890
+ },
891
+ "hook_behavior": {
892
+ "validates": [
893
+ "NuGet version conflicts (same package, different versions)",
894
+ "Incompatible .NET 10 packages",
895
+ "Security vulnerabilities (outdated packages)"
896
+ ],
897
+ "severity": "error",
898
+ "blocks_on_fail": true
899
+ }
900
+ },
901
+ "design-system-validator": {
902
+ "color": "gray",
903
+ "tier": 4,
904
+ "title": "Design System Validator",
905
+ "group": "frontend",
906
+ "active_phases": [
907
+ "*"
908
+ ],
909
+ "reports_to": "ui-designer",
910
+ "domains": [
911
+ "design-system"
912
+ ],
913
+ "keywords": [
914
+ "design system",
915
+ "css",
916
+ "color palette",
917
+ "spacing",
918
+ "motion tokens",
919
+ "glassmorphism",
920
+ "design trends",
921
+ "advanced effects"
922
+ ],
923
+ "validators": [
924
+ "design-system"
925
+ ],
926
+ "standards": [
927
+ {
928
+ "id": "frontend-design-system-naming",
929
+ "scope": "all",
930
+ "priority": "required"
931
+ },
932
+ {
933
+ "id": "frontend-design-system-animations",
934
+ "scope": "all",
935
+ "priority": "required"
936
+ }
937
+ ],
938
+ "teammate": {
939
+ "icon": "🎨",
940
+ "role": "Design System Validator (read-only)",
941
+ "triggers": "CSS token compliance, hardcoded colors, spacing violations, motion tokens",
942
+ "spawn_prompt": "You are the Design System Validator (READ-ONLY). Scan CSS and component files for design token compliance.\n\nWhen invoked:\n1. Read `.morph/context/design-system.md` for project-specific design tokens\n2. Use Grep and Glob to scan all .css, .scss, .tsx, .ts files under src/\n\nScan checklist:\n- Colors: hardcoded hex/rgb instead of var(--color-primary/accent/surface-*/text-*)\n- Spacing: hardcoded px/rem instead of var(--space-*)\n- Typography: hardcoded font-size/family instead of var(--font-display/body/text-*)\n- Motion: hardcoded transition durations instead of var(--duration-*/easing-*)\n- Shadows: hardcoded box-shadow instead of var(--shadow-*/shadow-colored-*/shadow-layered-*)\n- Advanced effects: glassmorphism must use var(--glass-*), aurora var(--aurora-*), perspective var(--perspective-*)\n- Naming: verify kebab-case for custom CSS class names\n\nOutput JSON:\n{\n \"passed\": boolean,\n \"issues\": [{ \"file\": string, \"line\": number, \"message\": string, \"severity\": \"warning\" }]\n}\n\nDo NOT modify any files."
943
+ },
944
+ "hook_behavior": {
945
+ "validates": [
946
+ "CSS color palette compliance (primary, accent, surface, text, neutral, semantic)",
947
+ "Spacing values (use var(--space-*))",
948
+ "Typography scale (use var(--font-display), var(--font-body), var(--text-*))",
949
+ "Motion tokens (use var(--duration-*), var(--easing-*))",
950
+ "Shadow tokens (use var(--shadow-*), var(--shadow-colored-*), var(--shadow-layered-*))",
951
+ "Advanced effects (glassmorphism: var(--glass-*), aurora: var(--aurora-*), perspective: var(--perspective-*))",
952
+ "Component naming (kebab-case for CSS)"
953
+ ],
954
+ "severity": "warning",
955
+ "blocks_on_fail": false
956
+ }
957
+ },
958
+ "nextjs-component-validator": {
959
+ "color": "gray",
960
+ "tier": 4,
961
+ "title": "Next.js Component Validator",
962
+ "group": "frontend",
963
+ "active_phases": [
964
+ "implement"
965
+ ],
966
+ "domains": [
967
+ "frontend-nextjs"
968
+ ],
969
+ "keywords": [
970
+ "nextjs",
971
+ "tsx",
972
+ "use client",
973
+ "server component",
974
+ "app router"
975
+ ],
976
+ "validators": [
977
+ "nextjs-component"
978
+ ],
979
+ "stacks": [
980
+ "nextjs"
981
+ ],
982
+ "teammate": {
983
+ "icon": "⚛️",
984
+ "role": "Next.js Component Validator (read-only)",
985
+ "triggers": "use client directive, React hooks validation, server component checks",
986
+ "spawn_prompt": "You are the Next.js Component Validator (READ-ONLY). Scan TypeScript/TSX files for App Router compliance.\n\nWhen invoked:\n1. Use Grep and Glob to scan all .tsx/.ts files under src/\n2. Check for: incorrect \"use client\" usage, file naming violations, import pattern issues\n\nScan checklist:\n- \"use client\" required: must be present when React hooks (useState, useEffect, useRef, etc.) are used\n- \"use client\" absent: must NOT be present for pure Server Components (no hooks, no event handlers)\n- File naming: component files must use kebab-case (e.g., user-profile.tsx, not UserProfile.tsx)\n- Import patterns: client components must not import server-only modules (next/headers, cookies(), etc.)\n\nOutput JSON:\n{\n \"passed\": boolean,\n \"issues\": [{ \"file\": string, \"message\": string, \"suggestion\": string, \"severity\": \"warning\" }]\n}\n\nDo NOT modify any files."
987
+ },
988
+ "hook_behavior": {
989
+ "severity": "warning",
990
+ "blocks_on_fail": false,
991
+ "validates": [
992
+ "use-client directive",
993
+ "hook usage",
994
+ "file naming"
995
+ ]
996
+ }
997
+ }
998
+ },
999
+ "squads": {
1000
+ "backend_squad": {
1001
+ "leader": "dotnet-senior",
1002
+ "members": [
1003
+ "ef-modeler",
1004
+ "hangfire-orchestrator",
1005
+ "ms-agent-expert",
1006
+ "supabase-expert",
1007
+ "vector-search-expert",
1008
+ "asaas-financial",
1009
+ "clerk-auth",
1010
+ "resend-email"
1011
+ ],
1012
+ "domains": [
1013
+ "backend",
1014
+ "backend-data",
1015
+ "backend-api",
1016
+ "backend-jobs",
1017
+ "ai-agents",
1018
+ "backend-supabase",
1019
+ "ai-vector",
1020
+ "integration-payment",
1021
+ "integration-auth",
1022
+ "integration-email"
1023
+ ]
1024
+ },
1025
+ "frontend_squad": {
1026
+ "leader": "ui-designer",
1027
+ "members": [
1028
+ "nextjs-expert",
1029
+ "css-specialist",
1030
+ "seo-growth-hacker"
1031
+ ],
1032
+ "domains": [
1033
+ "frontend-design",
1034
+ "frontend-nextjs",
1035
+ "frontend-nextjs-ui",
1036
+ "frontend-css",
1037
+ "seo"
1038
+ ],
1039
+ "active_phases": {
1040
+ "design": [
1041
+ "ui-designer"
1042
+ ],
1043
+ "implement": [
1044
+ "nextjs-expert",
1045
+ "css-specialist",
1046
+ "seo-growth-hacker"
1047
+ ]
1048
+ }
1049
+ },
1050
+ "infrastructure_squad": {
1051
+ "leader": "infra-architect",
1052
+ "members": [],
1053
+ "domains": [
1054
+ "infrastructure",
1055
+ "infrastructure-cicd",
1056
+ "infrastructure-containers"
1057
+ ]
1058
+ },
1059
+ "quality_squad": {
1060
+ "leader": "standards-architect",
1061
+ "members": [],
1062
+ "domains": [
1063
+ "quality-testing",
1064
+ "quality-review"
1065
+ ],
1066
+ "note": "No permanent leader — standards-architect coordinates directly"
1067
+ }
1068
+ },
1069
+ "relationship_types": {
1070
+ "reports_to": "Hierarchical manager relationship",
1071
+ "coordinates": "Manages/leads these agents",
1072
+ "escalates_to": "Where to escalate unresolved issues",
1073
+ "collaborates_with": "Peer agents for cross-domain work",
1074
+ "runs_in": "Execution context (hooks, not teammates)",
1075
+ "team_role": "Role in Agent Teams (lead, domain_leader, specialist, validator, escalation_specialist, post_implementation, planning_only)"
1076
+ }
1077
+ }