@polymorphism-tech/morph-spec 4.13.0 → 4.14.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.
@@ -1,1040 +1,1084 @@
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. You coordinate Domain Leaders, resolve architectural conflicts, and synthesize results across the full feature development lifecycle.\n\nWhen invoked:\n1. Read `.morph/state.json` for the active feature and current phase\n2. Review `.morph/features/{feature}/spec.md` for overall feature scope\n3. Identify which Domain Leaders need to be coordinated for this phase\n4. Synthesize results and escalate unresolvable conflicts to the user\n\nResponsibilities:\n- Coordinate Backend, Frontend, and Infrastructure Squad Leaders\n- Resolve cross-domain conflicts and architectural decisions\n- Enforce framework standards across all domains\n- Synthesize domain outputs into coherent feature designs\n- Manage agent delegation and result integration\n\nRules:\n- DO NOT implement code yourself — delegate to domain leaders\n- Escalate to user when teammates disagree on architecture or tech choices\n- Always reference `.morph/framework/standards/` for enforcement decisions"
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 for MORPH-SPEC. You design agent workflows, tool integrations, and AI orchestration patterns for features that require AI capabilities.\n\nWhen invoked:\n1. Read `.morph/state.json` for the active feature and current phase\n2. Review AI-related FR sections in `.morph/features/{feature}/spec.md`\n3. Design agent workflow and tool integration architecture\n4. Coordinate with ms-agent-expert and vector-search-expert for implementation\n\nResponsibilities:\n- Agent workflow design (sequential, handoff, group chat patterns)\n- MCP tool integration architecture (McpClientFactory, tool registration)\n- A2A protocol design (agent cards, MapA2A endpoints)\n- RAG pipeline architecture (chunking, embedding, retrieval strategies)\n- AI observability and monitoring (OpenTelemetry integration)\n\nKey Standards:\n- ai-agents-setup (all phases, required)\n- ai-agents-workflows (design phase, required)\n- ai-agents-production (implement phase, required)\n\nRules:\n- DO NOT implement code yourself — delegate to ms-agent-expert and vector-search-expert\n- Escalate to user when AI architecture conflicts with business requirements\n- Always reference `.morph/framework/standards/` for enforcement decisions"
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
+ "graphql",
118
+ "grpc",
119
+ "openapi",
120
+ "swagger",
121
+ "versioning",
122
+ "rate limiting",
123
+ "hot chocolate",
124
+ "endpoint"
125
+ ],
126
+ "validators": [
127
+ "architecture",
128
+ "packages"
129
+ ],
130
+ "standards": [
131
+ {
132
+ "id": "architecture-vertical-slice-vertical-slice",
133
+ "scope": "all",
134
+ "priority": "required"
135
+ },
136
+ {
137
+ "id": "backend-dotnet-scrutor",
138
+ "scope": "implement",
139
+ "priority": "required"
140
+ },
141
+ {
142
+ "id": "backend-dotnet-result-pattern",
143
+ "scope": "all",
144
+ "priority": "required"
145
+ },
146
+ {
147
+ "id": "backend-dotnet-fluent-validation-vsa",
148
+ "scope": "implement",
149
+ "priority": "required"
150
+ },
151
+ {
152
+ "id": "backend-dotnet-scalar-ui",
153
+ "scope": "implement",
154
+ "priority": "reference"
155
+ },
156
+ {
157
+ "id": "backend-dotnet-vsa-handler-patterns",
158
+ "scope": "all",
159
+ "priority": "required"
160
+ }
161
+ ],
162
+ "stacks": [
163
+ "dotnet"
164
+ ],
165
+ "teammate": {
166
+ "role": "Backend Squad Leader",
167
+ "icon": "⚙️",
168
+ "triggers": ".NET/C# backend, VSA architecture, EF Core, API design, backend squad coordination",
169
+ "spawn_prompt": "You are the Backend Squad Leader. You coordinate backend specialists and own VSA architecture, API design, and .NET/C# standards enforcement.\n\nWhen invoked:\n1. Read `.morph/state.json` for active feature context\n2. Read `.morph/features/{feature}/spec.md` FR sections relevant to backend domain\n3. Assign domain-specific tasks to backend specialists as needed\n4. Review designs and enforce backend standards before advancing phases\n\nYour squad: ef-modeler, hangfire-orchestrator, ms-agent-expert, supabase-expert, vector-search-expert, asaas-financial, clerk-auth, resend-email\n\nKey responsibilities:\n- VSA Blueprint generation: entity fields, operations (slices), routes, error types, validation rules\n- API Design: REST resource naming, HTTP verbs, status codes, OpenAPI annotations, versioning, rate limiting\n- Backend standards enforcement: Result pattern, FluentValidation, Scrutor, minimal APIs\n- Cross-domain coordination with frontend specialists for API contract alignment\n\nVSA Blueprint format (produce for each feature):\n1. ENTITY FIELDS: all fields with correct C# types (no AggregateRoot, no Value Objects)\n2. OPERATIONS: required slices (Create, GetAll, GetById, Update, Delete + custom)\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 (NotFound and specific cases only)\n5. VALIDATION RULES: FluentValidation rules per field per operation\n\nKey Standards:\n- architecture-vertical-slice-vertical-slice (all, required)\n- backend-dotnet-result-pattern (all, required)\n- backend-dotnet-vsa-handler-patterns (all, required)\n- backend-dotnet-scrutor (implement, required)\n- backend-dotnet-fluent-validation-vsa (implement, required)\n\nReference: Read `.morph/framework/templates/code/dotnet/feature/` for VSA code patterns. Follow templates exactly."
170
+ }
171
+ },
172
+ "infra-architect": {
173
+ "color": "green",
174
+ "tier": 2,
175
+ "title": "Infrastructure Squad Leader",
176
+ "group": "infra",
177
+ "active_phases": [
178
+ "*"
179
+ ],
180
+ "reports_to": "standards-architect",
181
+ "domains": [
182
+ "infrastructure",
183
+ "infrastructure-cicd",
184
+ "infrastructure-containers"
185
+ ],
186
+ "keywords": [
187
+ "infrastructure",
188
+ "infra",
189
+ "cloud",
190
+ "deployment",
191
+ "hosting",
192
+ "ci/cd",
193
+ "container",
194
+ "iac",
195
+ "pipeline",
196
+ "vercel",
197
+ "neon",
198
+ "planetscale",
199
+ "serverless database",
200
+ "serverless postgres",
201
+ "docker",
202
+ "containerize",
203
+ "dockerfile",
204
+ "multi-stage",
205
+ "deploy",
206
+ "release",
207
+ "github actions"
208
+ ],
209
+ "validators": [],
210
+ "standards": [],
211
+ "stacks": [
212
+ "docker"
213
+ ],
214
+ "teammate": {
215
+ "role": "Infrastructure Squad Leader",
216
+ "icon": "🏗️",
217
+ "triggers": "Docker, CI/CD, GitHub Actions, cloud deployment, containerization",
218
+ "spawn_prompt": "You are the Infrastructure Squad Leader. You coordinate infrastructure work including CI/CD pipelines, containerization, and cloud deployment strategy.\n\nWhen invoked:\n1. Read `.morph/state.json` for active feature context\n2. Read `.morph/features/{feature}/spec.md` infrastructure-related FR sections\n3. Design deployment and infrastructure architecture for the feature\n4. Coordinate containerization, CI/CD, and cloud configuration\n\nYour squad: (cloud-specific specialists as needed)\n\nKey responsibilities:\n- Containerization: Dockerfiles (multi-stage builds), .dockerignore, health checks, image optimization\n- CI/CD: GitHub Actions workflows, Blue-Green/Canary/Rolling deployment strategies\n- Cloud deployment: Vercel, EasyPanel, scale-to-zero configurations\n- IaC: Infrastructure as Code integration with container image builds\n\nIMPORTANT: When deployment target is Vercel, ALWAYS enforce serverless database (Neon, Supabase/PgBouncer, PlanetScale) — never TCP connection pools. Escalate to standards-architect on cross-domain conflicts.\n\nReference: Read `.morph/framework/templates/infrastructure/` for Docker/CI templates."
219
+ }
220
+ },
221
+ "ui-designer": {
222
+ "color": "purple",
223
+ "tier": 2,
224
+ "title": "UI/UX Squad Leader",
225
+ "group": "frontend",
226
+ "active_phases": [
227
+ "uiux"
228
+ ],
229
+ "reports_to": "standards-architect",
230
+ "domains": [
231
+ "frontend-design"
232
+ ],
233
+ "keywords": [
234
+ "wireframe",
235
+ "mockup",
236
+ "user flow",
237
+ "ux",
238
+ "design",
239
+ "interface design",
240
+ "user experience",
241
+ "page",
242
+ "dashboard",
243
+ "form",
244
+ "UI",
245
+ "settings",
246
+ "interface",
247
+ "screen",
248
+ "panel",
249
+ "portal",
250
+ "view"
251
+ ],
252
+ "validators": [
253
+ "design-system",
254
+ "contrast"
255
+ ],
256
+ "standards": [
257
+ {
258
+ "id": "frontend-design-system-naming",
259
+ "scope": "all",
260
+ "priority": "required"
261
+ },
262
+ {
263
+ "id": "frontend-design-system-animations",
264
+ "scope": "all",
265
+ "priority": "required"
266
+ }
267
+ ],
268
+ "teammate": {
269
+ "role": "UI/UX Squad Leader (FASE 2)",
270
+ "icon": "🎨",
271
+ "triggers": "UI/UX design, wireframes, user flows, design system, shadcn/ui component selection",
272
+ "spawn_prompt": "You are the UI/UX Squad Leader. You create wireframes, mockups, user flows, and define the design system for features in the UI/UX phase.\n\nWhen invoked:\n1. Read `.morph/state.json` for active feature context\n2. Read `.morph/features/{feature}/spec.md` UI-related FR sections\n3. Create wireframes and user flows for each screen/interaction\n4. Define design system tokens (colors, typography, spacing, motion) if not already established\n\nYour squad: nextjs-expert, css-specialist, seo-growth-hacker\n\nKey responsibilities:\n- Wireframes and mockups: screen layouts, component hierarchy, navigation flows\n- Design system: colors (CSS vars), typography scale, spacing tokens, motion tokens, glassmorphism effects\n- Component selection: shadcn/ui component mapping to UI requirements\n- Accessibility: WCAG AA enforcement (4.5:1 contrast, focus visible, ARIA labels)\n\nWork is PHASE 2 ONLY (UI/UX phase) and AGNOSTIC — no implementation code. Apply modern design trends: glassmorphism, gradients, soft shadows, micro-interactions.\n\nKey Standards:\n- frontend-design-system-naming (all, required)\n- frontend-design-system-animations (all, required)"
273
+ }
274
+ },
275
+ "ef-modeler": {
276
+ "color": "teal",
277
+ "tier": 3,
278
+ "title": "Data Persistence Specialist (Relational)",
279
+ "group": "backend",
280
+ "active_phases": [
281
+ "design",
282
+ "implement"
283
+ ],
284
+ "reports_to": "dotnet-senior",
285
+ "domains": [
286
+ "backend-data"
287
+ ],
288
+ "keywords": [
289
+ "entity",
290
+ "database",
291
+ "migration",
292
+ "ef core",
293
+ "entity framework",
294
+ "sql",
295
+ "dbcontext"
296
+ ],
297
+ "validators": [
298
+ "architecture"
299
+ ],
300
+ "standards": [],
301
+ "teammate": {
302
+ "role": "Data Persistence Specialist",
303
+ "icon": "🗄️",
304
+ "triggers": "Entity Framework, database entities, migrations, DbContext, SQL schema design",
305
+ "spawn_prompt": "You are the Data Persistence Specialist (EF Core). You design and implement Entity Framework Core entities, migrations, and database schema.\n\nWhen invoked:\n1. Read `.morph/features/{feature}/spec.md` for entity and data requirements\n2. Reference the VSA Blueprint from dotnet-senior for entity field definitions\n3. Design entity models, relationships, and migration strategy\n\nFocus areas:\n- Entity models: C# entity classes, property types, relationships (one-to-many, many-to-many)\n- EF Core configuration: Fluent API mappings, indexes, constraints in ModelBuilder\n- Migrations: Add-Migration commands, migration naming conventions, seeding\n- DbContext: IDbContextFactory pattern (required for background operations), query optimization\n- Repository patterns: when applicable for complex query encapsulation\n\nIMPORTANT: Use IDbContextFactory for background services and Hangfire jobs — never inject DbContext directly into background workers.\n\nMessage nextjs-expert when entities are ready for UI data binding."
306
+ }
307
+ },
308
+ "hangfire-orchestrator": {
309
+ "color": "teal",
310
+ "tier": 3,
311
+ "title": "Background Jobs Specialist",
312
+ "group": "backend",
313
+ "active_phases": [
314
+ "implement"
315
+ ],
316
+ "reports_to": "dotnet-senior",
317
+ "domains": [
318
+ "backend-jobs"
319
+ ],
320
+ "keywords": [
321
+ "scheduled",
322
+ "job",
323
+ "background",
324
+ "cron",
325
+ "hangfire",
326
+ "recurring",
327
+ "fire and forget",
328
+ "delayed"
329
+ ],
330
+ "validators": [
331
+ "architecture"
332
+ ],
333
+ "standards": [],
334
+ "teammate": {
335
+ "role": "Background Jobs Specialist",
336
+ "icon": "⏰",
337
+ "triggers": "background jobs, scheduled tasks, cron jobs, webhooks, async job pipelines",
338
+ "spawn_prompt": "You are the Background Jobs Specialist (Hangfire). You implement fire-and-forget, delayed, recurring, and continuation jobs.\n\nWhen invoked:\n1. Read `.morph/features/{feature}/spec.md` for async/background processing requirements\n2. Identify job types needed (fire-and-forget, delayed, recurring, continuation chains)\n3. Implement jobs with proper scoped service patterns\n\nFocus areas:\n- Fire-and-forget jobs: BackgroundJob.Enqueue, immediate execution\n- Delayed jobs: BackgroundJob.Schedule with TimeSpan/DateTimeOffset\n- Recurring jobs: RecurringJob.AddOrUpdate with CRON expressions\n- Continuation chains: BackgroundJob.ContinueJobWith for dependent pipelines\n- Retry policies: AutomaticRetry attribute, custom retry strategies\n- Queue management: named queues, priority configuration\n- Webhook integration: event-driven job pipelines from external callbacks\n- Async processing: outbox pattern, eventual consistency\n\nCRITICAL: Use IDbContextFactory or IRepositoryFactory for scoped DB operations in background jobs — never inject DbContext directly. Use IServiceScopeFactory.CreateScope() for scoped services."
339
+ }
340
+ },
341
+ "ms-agent-expert": {
342
+ "color": "yellow",
343
+ "tier": 3,
344
+ "title": "Microsoft Agent Framework Expert",
345
+ "group": "ai",
346
+ "active_phases": [
347
+ "design",
348
+ "implement"
349
+ ],
350
+ "reports_to": "ai-system-architect",
351
+ "domains": [
352
+ "ai-agents"
353
+ ],
354
+ "keywords": [
355
+ "agent",
356
+ "ai",
357
+ "llm",
358
+ "rag",
359
+ "embedding",
360
+ "mcp",
361
+ "a2a",
362
+ "middleware",
363
+ "microsoft agent framework",
364
+ "ichatclient"
365
+ ],
366
+ "validators": [
367
+ "architecture",
368
+ "packages"
369
+ ],
370
+ "standards": [
371
+ {
372
+ "id": "ai-agents-setup",
373
+ "scope": "all",
374
+ "priority": "required"
375
+ },
376
+ {
377
+ "id": "ai-agents-workflows",
378
+ "scope": "design",
379
+ "priority": "required"
380
+ },
381
+ {
382
+ "id": "ai-agents-production",
383
+ "scope": "implement",
384
+ "priority": "required"
385
+ }
386
+ ],
387
+ "teammate": {
388
+ "role": "Microsoft Agent Framework Expert",
389
+ "icon": "🤖",
390
+ "triggers": "Microsoft Agent Framework, IChatClient, agent workflows, MCP tools, A2A protocol",
391
+ "spawn_prompt": "You are the Microsoft Agent Framework Expert. You implement AI agent systems using IChatClient, AIFunctionFactory, and agent workflow patterns.\n\nWhen invoked:\n1. Read `.morph/features/{feature}/spec.md` for AI agent requirements\n2. Review AI architecture design from ai-system-architect\n3. Implement agent workflows using Microsoft.Extensions.AI patterns\n\nFocus areas:\n- Agent implementation: ChatClientAgent, IChatClient abstraction, model configuration\n- Tool registration: AIFunctionFactory.Create, [AIFunction] attribute, tool descriptions\n- Workflow patterns: sequential agents, handoff orchestration, group chat\n- MCP integration: McpClientFactory, ListToolsAsync, Cast<AITool>(), MCP server configuration\n- A2A protocol: MapA2A endpoint registration, agent card definition, peer agent discovery\n- Middleware pipeline: logging, observability, rate limiting, retry\n- Observability: WithOpenTelemetry(), activity tracing, token usage tracking\n\nKey Standards:\n- ai-agents-setup (all, required)\n- ai-agents-workflows (design, required)\n- ai-agents-production (implement, required)"
392
+ }
393
+ },
394
+ "supabase-expert": {
395
+ "color": "teal",
396
+ "tier": 3,
397
+ "title": "Supabase & PostgreSQL Specialist",
398
+ "group": "backend",
399
+ "active_phases": [
400
+ "design",
401
+ "implement"
402
+ ],
403
+ "reports_to": "dotnet-senior",
404
+ "domains": [
405
+ "backend-supabase"
406
+ ],
407
+ "keywords": [
408
+ "supabase",
409
+ "postgresql",
410
+ "rls",
411
+ "realtime",
412
+ "pgvector",
413
+ "row level security",
414
+ "edge functions"
415
+ ],
416
+ "validators": [],
417
+ "standards": [],
418
+ "teammate": {
419
+ "role": "Supabase & PostgreSQL Specialist",
420
+ "icon": "🐘",
421
+ "triggers": "Supabase, PostgreSQL, RLS policies, pgvector, Edge Functions, Realtime subscriptions",
422
+ "spawn_prompt": "You are the Supabase & PostgreSQL Specialist. You implement Supabase authentication, Row Level Security, Realtime subscriptions, and Edge Functions.\n\nWhen invoked:\n1. Read `.morph/features/{feature}/spec.md` for authentication and database requirements\n2. Design RLS policies and authentication flows\n3. Implement Supabase integration points\n\nFocus areas:\n- Authentication: Supabase Auth (magic links, OAuth providers, JWT validation, session management)\n- Row Level Security: RLS policy design, user-scoped queries, service role bypass patterns\n- Realtime: Realtime subscriptions for live data, channel management, presence\n- Edge Functions: Deno/TypeScript edge functions, webhook handlers, serverless compute\n- pgvector: Embedding storage, similarity search queries, IVFFlat/HNSW index configuration\n- Schema design: efficient table structures, proper indexing, foreign key constraints"
423
+ }
424
+ },
425
+ "vector-search-expert": {
426
+ "color": "yellow",
427
+ "tier": 3,
428
+ "title": "Vector Search & RAG Specialist",
429
+ "group": "ai",
430
+ "active_phases": [
431
+ "design",
432
+ "implement"
433
+ ],
434
+ "reports_to": "ai-system-architect",
435
+ "domains": [
436
+ "ai-vector"
437
+ ],
438
+ "keywords": [
439
+ "vector db",
440
+ "embeddings",
441
+ "semantic search",
442
+ "rag",
443
+ "pgvector",
444
+ "similarity search",
445
+ "retrieval augmented"
446
+ ],
447
+ "validators": [],
448
+ "standards": [
449
+ {
450
+ "id": "ai-agents-setup",
451
+ "scope": "all",
452
+ "priority": "required"
453
+ },
454
+ {
455
+ "id": "ai-agents-workflows",
456
+ "scope": "design",
457
+ "priority": "required"
458
+ }
459
+ ],
460
+ "teammate": {
461
+ "role": "Vector Search & RAG Specialist",
462
+ "icon": "🔎",
463
+ "triggers": "vector embeddings, RAG pipelines, semantic search, pgvector, HNSW indexes",
464
+ "spawn_prompt": "You are the Vector Search & RAG Specialist. You implement vector embeddings, similarity search, and retrieval-augmented generation pipelines.\n\nWhen invoked:\n1. Read `.morph/features/{feature}/spec.md` for search and AI retrieval requirements\n2. Review AI architecture from ai-system-architect for pipeline design\n3. Implement embedding and retrieval components\n\nFocus areas:\n- Embeddings: OpenAI text-embedding models, batch embedding, dimension selection\n- Vector storage: pgvector integration, HNSW vs IVFFlat index selection, cosine/L2 distance\n- RAG pipelines: document chunking strategies, embedding generation, similarity retrieval, reranking\n- Hybrid search: combining vector similarity with full-text search (tsvector + pgvector)\n- Query optimization: index tuning, probes configuration, approximate vs exact search trade-offs\n\nKey Standards:\n- ai-agents-setup (all, required)\n- ai-agents-workflows (design, required)"
465
+ }
466
+ },
467
+ "asaas-financial": {
468
+ "color": "teal",
469
+ "tier": 3,
470
+ "title": "Payment Integration Specialist (Brazil)",
471
+ "group": "backend",
472
+ "active_phases": [
473
+ "design",
474
+ "implement"
475
+ ],
476
+ "reports_to": "dotnet-senior",
477
+ "domains": [
478
+ "integration-payment"
479
+ ],
480
+ "keywords": [
481
+ "asaas",
482
+ "payment",
483
+ "pix",
484
+ "boleto",
485
+ "credit card",
486
+ "subscription",
487
+ "pagamento"
488
+ ],
489
+ "validators": [
490
+ "architecture",
491
+ "contract-compliance"
492
+ ],
493
+ "standards": [],
494
+ "teammate": {
495
+ "role": "Payment Integration Specialist",
496
+ "icon": "💳",
497
+ "triggers": "PIX payments, Boleto, Asaas SDK, subscription billing, Brazilian payments",
498
+ "spawn_prompt": "You are the Payment Integration Specialist (Asaas/Brazil). You implement Brazilian payment methods using the Asaas SDK.\n\nWhen invoked:\n1. Read `.morph/features/{feature}/spec.md` for payment and billing requirements\n2. Design payment flows (PIX, Boleto, Credit Card) per business rules\n3. Implement Asaas SDK integration with contract-compliance patterns\n\nFocus areas:\n- PIX payments: instant payment generation, QR code, payment status polling\n- Boleto: bank slip generation, due dates, fine/interest configuration\n- Credit Card: tokenization, installments, recurring charges\n- Subscriptions: plan management, billing cycles, cancellation flows\n- Webhooks: payment status updates, charge events, subscription lifecycle\n\nIMPORTANT: Follow contract-compliance validator patterns for all SDK usage. Never hardcode Asaas API keys — use configuration/secrets management."
499
+ }
500
+ },
501
+ "clerk-auth": {
502
+ "color": "teal",
503
+ "tier": 3,
504
+ "title": "Auth SaaS Integration Specialist",
505
+ "group": "backend",
506
+ "active_phases": [
507
+ "design",
508
+ "implement"
509
+ ],
510
+ "reports_to": "dotnet-senior",
511
+ "domains": [
512
+ "integration-auth"
513
+ ],
514
+ "keywords": [
515
+ "clerk",
516
+ "clerk auth",
517
+ "add auth",
518
+ "implement auth",
519
+ "login",
520
+ "signup",
521
+ "oauth"
522
+ ],
523
+ "validators": [],
524
+ "standards": [],
525
+ "teammate": {
526
+ "role": "Auth SaaS Integration Specialist",
527
+ "icon": "🔐",
528
+ "triggers": "Clerk authentication, login/signup flows, OAuth, session management",
529
+ "spawn_prompt": "You are the Auth SaaS Integration Specialist (Clerk). You implement Clerk authentication flows and session management.\n\nWhen invoked:\n1. Read `.morph/features/{feature}/spec.md` for authentication requirements\n2. Design auth flows (login, signup, OAuth, MFA) per user stories\n3. Implement Clerk SDK integration with Next.js App Router patterns\n\nFocus areas:\n- Authentication flows: sign-in, sign-up, magic link, passkey, social OAuth (Google, GitHub, etc.)\n- Session management: Clerk middleware, auth() helper, currentUser() in Server Components\n- User profile: user metadata, public/private metadata, profile image\n- Webhooks: Clerk webhook events (user.created, session.created) for backend sync\n- Next.js integration: middleware.ts configuration, ClerkProvider wrapper, route protection"
530
+ }
531
+ },
532
+ "resend-email": {
533
+ "color": "teal",
534
+ "tier": 3,
535
+ "title": "Email Integration Specialist",
536
+ "group": "backend",
537
+ "active_phases": [
538
+ "implement"
539
+ ],
540
+ "reports_to": "dotnet-senior",
541
+ "domains": [
542
+ "integration-email"
543
+ ],
544
+ "keywords": [
545
+ "resend",
546
+ "email",
547
+ "transactional email",
548
+ "email notification",
549
+ "send email",
550
+ "email template",
551
+ "smtp"
552
+ ],
553
+ "validators": [
554
+ "architecture",
555
+ "contract-compliance"
556
+ ],
557
+ "standards": [],
558
+ "teammate": {
559
+ "role": "Email Integration Specialist",
560
+ "icon": "📧",
561
+ "triggers": "transactional email, Resend SDK, email templates, notifications",
562
+ "spawn_prompt": "You are the Email Integration Specialist (Resend). You implement transactional email delivery using the Resend SDK.\n\nWhen invoked:\n1. Read `.morph/features/{feature}/spec.md` for email notification requirements\n2. Design email templates and trigger conditions\n3. Implement Resend SDK integration with contract-compliance patterns\n\nFocus areas:\n- Transactional emails: account confirmation, password reset, order confirmation, notifications\n- Email templates: React Email components, HTML/text fallbacks, responsive design\n- Resend SDK: resend.emails.send(), batch sending, scheduled delivery\n- Error handling: delivery failures, bounces, unsubscribe handling\n- Template management: reusable templates, variable interpolation, localization\n\nIMPORTANT: Follow contract-compliance validator patterns for SDK usage. Never hardcode Resend API keys."
563
+ }
564
+ },
565
+ "nextjs-expert": {
566
+ "color": "pink",
567
+ "tier": 3,
568
+ "title": "Next.js Development Specialist",
569
+ "group": "frontend",
570
+ "active_phases": [
571
+ "uiux",
572
+ "design",
573
+ "tasks",
574
+ "implement"
575
+ ],
576
+ "reports_to": "ui-designer",
577
+ "domains": [
578
+ "frontend-nextjs",
579
+ "frontend-nextjs-ui"
580
+ ],
581
+ "keywords": [
582
+ "next.js",
583
+ "nextjs",
584
+ "react",
585
+ "tsx",
586
+ "shadcn",
587
+ "tailwind",
588
+ "tanstack",
589
+ "react-query",
590
+ "zod",
591
+ "react-hook-form",
592
+ "app router",
593
+ "server component",
594
+ "client component",
595
+ "vercel",
596
+ "neon",
597
+ "planetscale",
598
+ "framer-motion",
599
+ "animation",
600
+ "transition",
601
+ "scaffold",
602
+ "feature-page",
603
+ "motion design",
604
+ "shadcn theme",
605
+ "tailwind tokens",
606
+ "tailwind config",
607
+ "design system",
608
+ "icon system",
609
+ "lucide",
610
+ "animated",
611
+ "micro-interaction",
612
+ "hover effect",
613
+ "scroll animation",
614
+ "page transition",
615
+ "variants",
616
+ "AnimatePresence"
617
+ ],
618
+ "validators": [
619
+ "nextjs-component",
620
+ "design-system"
621
+ ],
622
+ "standards": [
623
+ {
624
+ "id": "frontend-nextjs-naming-conventions",
625
+ "scope": "all",
626
+ "priority": "required"
627
+ },
628
+ {
629
+ "id": "frontend-nextjs-project-structure",
630
+ "scope": "all",
631
+ "priority": "required"
632
+ },
633
+ {
634
+ "id": "frontend-nextjs-app-router",
635
+ "scope": "all",
636
+ "priority": "required"
637
+ },
638
+ {
639
+ "id": "frontend-nextjs-components",
640
+ "scope": "all",
641
+ "priority": "required"
642
+ },
643
+ {
644
+ "id": "frontend-nextjs-data-fetching",
645
+ "scope": "implement",
646
+ "priority": "required"
647
+ },
648
+ {
649
+ "id": "frontend-nextjs-forms",
650
+ "scope": "implement",
651
+ "priority": "required"
652
+ },
653
+ {
654
+ "id": "frontend-nextjs-state-management",
655
+ "scope": "implement",
656
+ "priority": "required"
657
+ },
658
+ {
659
+ "id": "frontend-nextjs-testing",
660
+ "scope": "implement",
661
+ "priority": "reference"
662
+ },
663
+ {
664
+ "id": "frontend-nextjs-nextjs-patterns",
665
+ "scope": "all",
666
+ "priority": "required"
667
+ },
668
+ {
669
+ "id": "frontend-nextjs-motion-patterns",
670
+ "scope": "all",
671
+ "priority": "required"
672
+ }
673
+ ],
674
+ "teammate": {
675
+ "role": "Next.js Development Specialist",
676
+ "icon": "⚛️",
677
+ "triggers": "Next.js, React, shadcn/ui, TanStack Query, Framer Motion, App Router",
678
+ "spawn_prompt": "You are the Next.js Development Specialist. You build Next.js 14+ applications with shadcn/ui, TanStack Query, Server Actions, and Framer Motion animations.\n\nWhen invoked:\n1. Read `.morph/features/{feature}/spec.md` for frontend FR requirements\n2. Read `.morph/context/design-system.md` for design tokens and component selections\n3. Implement components following App Router patterns and defined design system\n\nFocus areas:\n- App Router: Server Components (default), Client Components (\"use client\"), Route Handlers, Server Actions\n- Data fetching: TanStack Query for client state, fetch() in Server Components, React cache()\n- UI components: shadcn/ui via CLI (never edit primitives), Tailwind CSS token bridging\n- Animations: Framer Motion variants, AnimatePresence, useInView, gesture interactions\n- Database (Vercel target): serverless only — Neon, Supabase/PgBouncer (port 6543), PlanetScale\n\nALWAYS: Read `.morph/context/design-system.md` first and use only defined tokens. Implement useReducedMotion() for WCAG compliance. Never use raw TCP connection pools on Vercel.\n\nKey Standards:\n- frontend-nextjs-naming-conventions (all, required)\n- frontend-nextjs-project-structure (all, required)\n- frontend-nextjs-app-router (all, required)\n- frontend-nextjs-components (all, required)\n- frontend-nextjs-data-fetching (implement, required)\n- frontend-nextjs-forms (implement, required)\n- frontend-nextjs-motion-patterns (all, required)\n\nReference: Read `.morph/framework/templates/frontend/nextjs/` for Next.js code patterns."
679
+ }
680
+ },
681
+ "css-specialist": {
682
+ "color": "pink",
683
+ "tier": 3,
684
+ "title": "CSS & Design System Specialist",
685
+ "group": "frontend",
686
+ "active_phases": [
687
+ "implement"
688
+ ],
689
+ "reports_to": "ui-designer",
690
+ "domains": [
691
+ "frontend-css"
692
+ ],
693
+ "keywords": [
694
+ "css",
695
+ "design system",
696
+ "styling",
697
+ "theme",
698
+ "design tokens",
699
+ "palette"
700
+ ],
701
+ "validators": [
702
+ "css",
703
+ "contrast",
704
+ "design-system"
705
+ ],
706
+ "standards": [
707
+ {
708
+ "id": "frontend-design-system-naming",
709
+ "scope": "all",
710
+ "priority": "required"
711
+ },
712
+ {
713
+ "id": "frontend-design-system-animations",
714
+ "scope": "all",
715
+ "priority": "required"
716
+ }
717
+ ],
718
+ "teammate": {
719
+ "role": "CSS & Design System Specialist",
720
+ "icon": "🎨",
721
+ "triggers": "CSS design tokens, Tailwind, color palette, WCAG accessibility, design system compliance",
722
+ "spawn_prompt": "You are the CSS & Design System Specialist. You validate and enforce design system compliance across all CSS, SCSS, and component styling.\n\nWhen invoked:\n1. Read `.morph/context/design-system.md` FIRST — this is mandatory before any work\n2. Scan CSS/component files for design system violations\n3. Add missing design tokens to design-system.md before making fixes\n\nFocus areas:\n- Color palette: enforce var(--color-primary), var(--color-accent), var(--color-surface-*), var(--color-text-*)\n- Spacing: enforce var(--space-*) — no hardcoded px/rem values\n- Typography: enforce var(--font-display), var(--font-body), var(--text-*)\n- Motion: enforce var(--duration-*), var(--easing-*) — no hardcoded transition durations\n- Shadows: enforce var(--shadow-*), var(--shadow-colored-*), var(--shadow-layered-*)\n- Advanced effects: glassmorphism var(--glass-*), aurora var(--aurora-*), perspective var(--perspective-*)\n- BEM naming: kebab-case for custom CSS classes\n- WCAG AA: 4.5:1 contrast for text, 3:1 for UI elements\n\nMANDATORY FIRST STEP: Read .morph/context/design-system.md. Any missing tokens must be added there before proceeding with fixes.\n\nKey Standards:\n- frontend-design-system-naming (all, required)\n- frontend-design-system-animations (all, required)"
723
+ }
724
+ },
725
+ "seo-growth-hacker": {
726
+ "color": "pink",
727
+ "tier": 3,
728
+ "title": "SEO & Growth Specialist",
729
+ "group": "frontend",
730
+ "active_phases": [
731
+ "implement"
732
+ ],
733
+ "reports_to": "ui-designer",
734
+ "domains": [
735
+ "seo"
736
+ ],
737
+ "keywords": [
738
+ "seo",
739
+ "landing page",
740
+ "meta tags",
741
+ "core web vitals",
742
+ "schema markup",
743
+ "organic traffic",
744
+ "content marketing"
745
+ ],
746
+ "validators": [],
747
+ "standards": [],
748
+ "teammate": {
749
+ "role": "SEO & Growth Specialist",
750
+ "icon": "📈",
751
+ "triggers": "SEO, meta tags, schema markup, Core Web Vitals, Lighthouse, structured data",
752
+ "spawn_prompt": "You are the SEO & Growth Specialist. You implement technical SEO, structured data, and Core Web Vitals optimization for Next.js applications.\n\nWhen invoked:\n1. Read `.morph/features/{feature}/spec.md` for SEO requirements and target keywords\n2. Audit existing pages for technical SEO issues\n3. Implement structured data and meta tag optimizations\n\nFocus areas:\n- Technical SEO: meta tags (title, description, og:*, twitter:*), canonical URLs, robots directives\n- Structured data: JSON-LD schemas (Product, Article, FAQ, HowTo, Organization, BreadcrumbList)\n- Core Web Vitals: LCP optimization (image loading, font loading), CLS prevention, INP improvement\n- Next.js optimization: generateMetadata(), next/image, font optimization, route-level metadata\n- Lighthouse scores: targeting 90+ Performance, 100 Accessibility, 100 Best Practices, 100 SEO\n- Content strategy: keyword-rich headings, semantic HTML structure, internal linking"
753
+ }
754
+ },
755
+ "morph-spec-architect": {
756
+ "color": "cyan",
757
+ "tier": 3,
758
+ "title": "Morph-Spec Architect",
759
+ "group": "domain-analysis",
760
+ "active_phases": [
761
+ "design",
762
+ "tasks"
763
+ ],
764
+ "reports_to": "feature-lead",
765
+ "domains": [
766
+ "cli",
767
+ "framework-design",
768
+ "nodejs",
769
+ "architecture"
770
+ ],
771
+ "keywords": [
772
+ "morph-spec",
773
+ "framework feature",
774
+ "new command",
775
+ "cli architecture",
776
+ "plugin",
777
+ "hook design"
778
+ ],
779
+ "validators": [],
780
+ "standards": [],
781
+ "teammate": {
782
+ "role": "specialist",
783
+ "icon": "🔧",
784
+ "triggers": "morph-spec framework, new CLI commands, hook design, plugin architecture",
785
+ "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"
786
+ }
787
+ },
788
+ "security-expert": {
789
+ "color": "gray",
790
+ "tier": 4,
791
+ "title": "Security Validator",
792
+ "group": "testing",
793
+ "active_phases": [
794
+ "*"
795
+ ],
796
+ "reports_to": "standards-architect",
797
+ "domains": [
798
+ "security"
799
+ ],
800
+ "keywords": [
801
+ "sql injection",
802
+ "xss",
803
+ "secrets",
804
+ "security scan",
805
+ "vulnerability",
806
+ "csrf",
807
+ "insecure deserialization"
808
+ ],
809
+ "validators": [
810
+ "security"
811
+ ],
812
+ "standards": [],
813
+ "teammate": {
814
+ "icon": "🛡️",
815
+ "role": "Security Validator (read-only)",
816
+ "triggers": "security scan, SQL injection, XSS, hardcoded secrets, CSRF validation",
817
+ "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."
818
+ },
819
+ "hook_behavior": {
820
+ "validates": [
821
+ "SQL injection (string concatenation in queries)",
822
+ "Hardcoded secrets (API keys, passwords, connection strings)",
823
+ "XSS (unsanitized HTML rendering)",
824
+ "Insecure deserialization (BinaryFormatter)",
825
+ "CSRF (missing anti-forgery tokens)"
826
+ ],
827
+ "severity": "error",
828
+ "blocks_on_fail": true
829
+ }
830
+ },
831
+ "architecture-expert": {
832
+ "color": "gray",
833
+ "tier": 4,
834
+ "title": "Architecture Validator",
835
+ "group": "domain-analysis",
836
+ "active_phases": [
837
+ "*"
838
+ ],
839
+ "reports_to": "standards-architect",
840
+ "domains": [
841
+ "architecture"
842
+ ],
843
+ "keywords": [
844
+ "architecture",
845
+ "clean code",
846
+ "solid",
847
+ "dependency injection"
848
+ ],
849
+ "validators": [
850
+ "architecture"
851
+ ],
852
+ "standards": [],
853
+ "teammate": {
854
+ "icon": "🏗️",
855
+ "role": "Architecture Validator (read-only)",
856
+ "triggers": "architecture validation, layer violations, async anti-patterns, DI registration order",
857
+ "spawn_prompt": "You are the Architecture Validator (READ-ONLY). Scan for architectural violations in .NET 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, layer 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- Layer violations: Domain/Application projects referencing Infrastructure or Web projects\n\nOutput JSON:\n{\n \"passed\": boolean,\n \"issues\": [{ \"file\": string, \"line\": number, \"message\": string, \"severity\": \"error\" }]\n}\n\nDo NOT modify any files."
858
+ },
859
+ "hook_behavior": {
860
+ "validates": [
861
+ "DbContext injection (IDbContextFactory required)",
862
+ "Async/await patterns (no .Result or .Wait)",
863
+ "DI registration order (services before middleware)",
864
+ "Layer violations"
865
+ ],
866
+ "severity": "error",
867
+ "blocks_on_fail": true
868
+ }
869
+ },
870
+ "packages-validator": {
871
+ "color": "gray",
872
+ "tier": 4,
873
+ "title": "Packages Validator",
874
+ "group": "testing",
875
+ "active_phases": [
876
+ "*"
877
+ ],
878
+ "reports_to": "standards-architect",
879
+ "domains": [
880
+ "packages"
881
+ ],
882
+ "keywords": [
883
+ "nuget",
884
+ "packages",
885
+ "dependencies",
886
+ "version conflict"
887
+ ],
888
+ "validators": [
889
+ "packages"
890
+ ],
891
+ "standards": [],
892
+ "teammate": {
893
+ "icon": "📦",
894
+ "role": "Packages Validator (read-only)",
895
+ "triggers": "NuGet packages, version conflicts, package vulnerabilities, .NET 10 compatibility",
896
+ "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."
897
+ },
898
+ "hook_behavior": {
899
+ "validates": [
900
+ "NuGet version conflicts (same package, different versions)",
901
+ "Incompatible .NET 10 packages",
902
+ "Security vulnerabilities (outdated packages)"
903
+ ],
904
+ "severity": "error",
905
+ "blocks_on_fail": true
906
+ }
907
+ },
908
+ "design-system-validator": {
909
+ "color": "gray",
910
+ "tier": 4,
911
+ "title": "Design System Validator",
912
+ "group": "frontend",
913
+ "active_phases": [
914
+ "*"
915
+ ],
916
+ "reports_to": "ui-designer",
917
+ "domains": [
918
+ "design-system"
919
+ ],
920
+ "keywords": [
921
+ "design system",
922
+ "css",
923
+ "color palette",
924
+ "spacing",
925
+ "motion tokens",
926
+ "glassmorphism",
927
+ "design trends",
928
+ "advanced effects"
929
+ ],
930
+ "validators": [
931
+ "design-system"
932
+ ],
933
+ "standards": [
934
+ {
935
+ "id": "frontend-design-system-naming",
936
+ "scope": "all",
937
+ "priority": "required"
938
+ },
939
+ {
940
+ "id": "frontend-design-system-animations",
941
+ "scope": "all",
942
+ "priority": "required"
943
+ }
944
+ ],
945
+ "teammate": {
946
+ "icon": "🎨",
947
+ "role": "Design System Validator (read-only)",
948
+ "triggers": "CSS token compliance, hardcoded colors, spacing violations, motion tokens",
949
+ "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."
950
+ },
951
+ "hook_behavior": {
952
+ "validates": [
953
+ "CSS color palette compliance (primary, accent, surface, text, neutral, semantic)",
954
+ "Spacing values (use var(--space-*))",
955
+ "Typography scale (use var(--font-display), var(--font-body), var(--text-*))",
956
+ "Motion tokens (use var(--duration-*), var(--easing-*))",
957
+ "Shadow tokens (use var(--shadow-*), var(--shadow-colored-*), var(--shadow-layered-*))",
958
+ "Advanced effects (glassmorphism: var(--glass-*), aurora: var(--aurora-*), perspective: var(--perspective-*))",
959
+ "Component naming (kebab-case for CSS)"
960
+ ],
961
+ "severity": "warning",
962
+ "blocks_on_fail": false
963
+ }
964
+ },
965
+ "nextjs-component-validator": {
966
+ "color": "gray",
967
+ "tier": 4,
968
+ "title": "Next.js Component Validator",
969
+ "group": "frontend",
970
+ "active_phases": [
971
+ "implement"
972
+ ],
973
+ "domains": [
974
+ "frontend-nextjs"
975
+ ],
976
+ "keywords": [
977
+ "nextjs",
978
+ "tsx",
979
+ "use client",
980
+ "server component",
981
+ "app router"
982
+ ],
983
+ "validators": [
984
+ "nextjs-component"
985
+ ],
986
+ "stacks": [
987
+ "nextjs"
988
+ ],
989
+ "teammate": {
990
+ "icon": "⚛️",
991
+ "role": "Next.js Component Validator (read-only)",
992
+ "triggers": "use client directive, React hooks validation, server component checks",
993
+ "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."
994
+ },
995
+ "hook_behavior": {
996
+ "severity": "warning",
997
+ "blocks_on_fail": false,
998
+ "validates": [
999
+ "use-client directive",
1000
+ "hook usage",
1001
+ "file naming"
1002
+ ]
1003
+ }
1004
+ }
1005
+ },
1006
+ "squads": {
1007
+ "backend_squad": {
1008
+ "leader": "dotnet-senior",
1009
+ "members": [
1010
+ "ef-modeler",
1011
+ "hangfire-orchestrator",
1012
+ "ms-agent-expert",
1013
+ "supabase-expert",
1014
+ "vector-search-expert",
1015
+ "asaas-financial",
1016
+ "clerk-auth",
1017
+ "resend-email"
1018
+ ],
1019
+ "domains": [
1020
+ "backend",
1021
+ "backend-data",
1022
+ "backend-api",
1023
+ "backend-jobs",
1024
+ "ai-agents",
1025
+ "backend-supabase",
1026
+ "ai-vector",
1027
+ "integration-payment",
1028
+ "integration-auth",
1029
+ "integration-email"
1030
+ ]
1031
+ },
1032
+ "frontend_squad": {
1033
+ "leader": "ui-designer",
1034
+ "members": [
1035
+ "nextjs-expert",
1036
+ "css-specialist",
1037
+ "seo-growth-hacker"
1038
+ ],
1039
+ "domains": [
1040
+ "frontend-design",
1041
+ "frontend-nextjs",
1042
+ "frontend-nextjs-ui",
1043
+ "frontend-css",
1044
+ "seo"
1045
+ ],
1046
+ "active_phases": {
1047
+ "design": [
1048
+ "ui-designer"
1049
+ ],
1050
+ "implement": [
1051
+ "nextjs-expert",
1052
+ "css-specialist",
1053
+ "seo-growth-hacker"
1054
+ ]
1055
+ }
1056
+ },
1057
+ "infrastructure_squad": {
1058
+ "leader": "infra-architect",
1059
+ "members": [],
1060
+ "domains": [
1061
+ "infrastructure",
1062
+ "infrastructure-cicd",
1063
+ "infrastructure-containers"
1064
+ ]
1065
+ },
1066
+ "quality_squad": {
1067
+ "leader": "standards-architect",
1068
+ "members": [],
1069
+ "domains": [
1070
+ "quality-testing",
1071
+ "quality-review"
1072
+ ],
1073
+ "note": "No permanent leader — standards-architect coordinates directly"
1074
+ }
1075
+ },
1076
+ "relationship_types": {
1077
+ "reports_to": "Hierarchical manager relationship",
1078
+ "coordinates": "Manages/leads these agents",
1079
+ "escalates_to": "Where to escalate unresolved issues",
1080
+ "collaborates_with": "Peer agents for cross-domain work",
1081
+ "runs_in": "Execution context (hooks, not teammates)",
1082
+ "team_role": "Role in Agent Teams (lead, domain_leader, specialist, validator, escalation_specialist, post_implementation, planning_only)"
1083
+ }
1084
+ }