@polymorphism-tech/morph-spec 7.0.0 → 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +368 -368
- package/claude-plugin.json +14 -14
- package/docs/CHEATSHEET.md +199 -199
- package/docs/QUICKSTART.md +200 -200
- package/framework/CLAUDE.md +1 -1
- package/framework/MORPH.md +4 -1
- package/framework/agents.json +132 -127
- package/framework/rubrics/backend.json +41 -36
- package/framework/rules/ai-agents-standards.md +45 -15
- package/framework/rules/neon-standards.md +25 -26
- package/framework/skills/core/morph-brainstorming/SKILL.md +1 -1
- package/framework/skills/core/morph-plan/SKILL.md +3 -1
- package/framework/skills/core/morph-stack-scan/SKILL.md +3 -3
- package/framework/standards/STANDARDS.json +1729 -1133
- package/framework/standards/ai-agents/agent-session.md +160 -0
- package/framework/standards/ai-agents/batching.md +193 -0
- package/framework/standards/ai-agents/context-providers.md +188 -0
- package/framework/standards/ai-agents/mcp-server.md +250 -0
- package/framework/standards/ai-agents/mcp-tools.md +197 -0
- package/framework/standards/ai-agents/middleware-patterns.md +207 -0
- package/framework/standards/ai-agents/modalities-image-gen.md +173 -0
- package/framework/standards/ai-agents/modalities-speech-to-text.md +171 -0
- package/framework/standards/ai-agents/modalities-text-to-speech.md +181 -0
- package/framework/standards/ai-agents/modalities-vision.md +201 -0
- package/framework/standards/ai-agents/multi-agent-patterns.md +155 -0
- package/framework/standards/ai-agents/production.md +114 -258
- package/framework/standards/ai-agents/prompts-in-db.md +214 -0
- package/framework/standards/ai-agents/providers/model-registry.md +158 -0
- package/framework/standards/ai-agents/rag-custom-pgvector.md +243 -0
- package/framework/standards/ai-agents/service-tier-flex.md +135 -0
- package/framework/standards/ai-agents/setup.md +142 -316
- package/framework/standards/ai-agents/structured-output.md +249 -0
- package/framework/standards/ai-agents/sweet-spot.md +109 -0
- package/framework/standards/ai-agents/workflows.md +114 -284
- package/framework/standards/architecture/vertical-slice/vertical-slice.md +439 -429
- package/framework/standards/backend/api/validation.md +92 -88
- package/framework/standards/backend/database/postgresql/database.md +336 -332
- package/framework/standards/backend/database/vector-search-rag.md +599 -541
- package/framework/standards/backend/dotnet/fluent-validation-vsa.md +4 -0
- package/framework/standards/backend/dotnet/result-pattern.md +4 -0
- package/framework/standards/backend/dotnet/scalar-ui.md +176 -172
- package/framework/standards/backend/dotnet/scrutor.md +4 -0
- package/framework/standards/backend/dotnet/vsa-handler-patterns.md +310 -274
- package/framework/standards/backend/integrations/asaas/asaas-api.md +260 -216
- package/framework/standards/backend/integrations/hangfire/hangfire-jobs.md +354 -350
- package/framework/standards/backend/integrations/neon-auth/neon-auth.md +30 -19
- package/framework/standards/backend/integrations/resend/resend-email.md +400 -385
- package/framework/standards/data/nosql/cache/redis.md +106 -97
- package/framework/standards/data/nosql/cosmos-db.md +127 -118
- package/framework/standards/data/vector-search/rag-chunking.md +113 -104
- package/framework/standards/frontend/design-system/ai-image-generation.md +4 -0
- package/framework/standards/frontend/design-system/animations.md +164 -160
- package/framework/standards/frontend/design-system/naming.md +68 -64
- package/framework/standards/frontend/gsap/gsap-core.md +14 -8
- package/framework/standards/frontend/gsap/gsap-plugins.md +26 -21
- package/framework/standards/frontend/gsap/gsap-scrolltrigger.md +9 -7
- package/framework/standards/frontend/nextjs/app-router.md +127 -123
- package/framework/standards/frontend/nextjs/components.md +136 -132
- package/framework/standards/frontend/nextjs/data-fetching.md +130 -126
- package/framework/standards/frontend/nextjs/forms.md +134 -128
- package/framework/standards/frontend/nextjs/motion-patterns.md +328 -322
- package/framework/standards/frontend/nextjs/naming-conventions.md +71 -67
- package/framework/standards/frontend/nextjs/nextjs-patterns.md +229 -225
- package/framework/standards/frontend/nextjs/project-structure.md +106 -102
- package/framework/standards/frontend/nextjs/state-management.md +76 -72
- package/framework/standards/frontend/nextjs/testing.md +115 -111
- package/framework/standards/infrastructure/docker/easypanel-deploy.md +196 -192
- package/framework/standards/infrastructure/neon/neon-pgrag.md +6 -2
- package/framework/standards/infrastructure/neon/neon-pgvector.md +4 -0
- package/framework/standards/infrastructure/neon/neon-setup.md +5 -1
- package/framework/standards/integration/mcp/mcp-tools.md +471 -462
- package/framework/templates/CLAUDE.md.core.template +1 -1
- package/framework/templates/REGISTRY.json +1745 -1239
- package/framework/templates/code/dotnet/ai-agents/AgentBootstrap.cs.template +39 -0
- package/framework/templates/code/dotnet/ai-agents/EmbeddingService.cs.template +68 -0
- package/framework/templates/code/dotnet/ai-agents/ModelRegistry.cs.template +117 -0
- package/framework/templates/code/dotnet/ai-agents/PromptRepository.cs.template +95 -0
- package/framework/templates/code/dotnet/ai-agents/ResilientToolMiddleware.cs.template +61 -0
- package/framework/templates/code/dotnet/ai-agents/VectorSearchTool.cs.template +107 -0
- package/framework/templates/code/dotnet/ai-agents/model-registry.json.template +58 -0
- package/framework/templates/code/dotnet/backend/repository.cs +3 -10
- package/framework/templates/code/sql/ai-agents/agent-prompts-migration.sql.template +58 -0
- package/framework/templates/code/sql/ai-agents/pgvector-embeddings-migration.sql.template +91 -0
- package/package.json +89 -83
- package/src/core/templates/template-registry.js +289 -256
- package/src/lib/generators/context-generator.js +516 -518
- package/src/lib/generators/scaffold-generator.js +23 -26
- package/framework/standards/infrastructure/neon/neon-semantic-kernel.md +0 -310
- package/framework/templates/integrations/semantic-kernel-neon.cs +0 -125
package/framework/agents.json
CHANGED
|
@@ -1,127 +1,132 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "5.0.0",
|
|
3
|
-
"schema": "domain-personas",
|
|
4
|
-
"total_agents": 7,
|
|
5
|
-
"description": "Domain personas dispatched per task by the morph-implement skill. The 3 roles (Orchestrator/Specialist/Evaluator) are assumed by Claude itself per MORPH.md — these are domain personas the Specialist consults when working in a specific area.",
|
|
6
|
-
"agents": {
|
|
7
|
-
"dotnet-senior": {
|
|
8
|
-
"title": ".NET Senior Engineer",
|
|
9
|
-
"icon": "🔷",
|
|
10
|
-
"color": "blue",
|
|
11
|
-
"domains": ["backend", "backend-api", "architecture"],
|
|
12
|
-
"keywords": [
|
|
13
|
-
"backend", "api", "dotnet", ".net", "csharp", "c#",
|
|
14
|
-
"minimal api", "vertical slice", "vsa", "result pattern",
|
|
15
|
-
"feature slice", "endpoint", "handler", "validator"
|
|
16
|
-
],
|
|
17
|
-
"stack": ["dotnet"],
|
|
18
|
-
"standards": [
|
|
19
|
-
"architecture-vertical-slice-vertical-slice",
|
|
20
|
-
"backend-dotnet-result-pattern",
|
|
21
|
-
"backend-dotnet-vsa-handler-patterns",
|
|
22
|
-
"backend-dotnet-fluent-validation-vsa"
|
|
23
|
-
],
|
|
24
|
-
"persona": "Você é um engenheiro .NET sênior. Pensa em VSA com handlers diretos, result pattern, sealed classes, Guid.CreateVersion7().
|
|
25
|
-
},
|
|
26
|
-
"ef-modeler": {
|
|
27
|
-
"title": "EF Core / Database Modeler",
|
|
28
|
-
"icon": "🗄️",
|
|
29
|
-
"color": "cyan",
|
|
30
|
-
"domains": ["database", "data-modeling", "migrations"],
|
|
31
|
-
"keywords": [
|
|
32
|
-
"ef core", "entity framework", "neon", "postgres", "postgresql",
|
|
33
|
-
"migration", "dbcontext", "navigation property", "configuration"
|
|
34
|
-
],
|
|
35
|
-
"stack": ["dotnet"],
|
|
36
|
-
"standards": [
|
|
37
|
-
"backend-database-postgresql-database",
|
|
38
|
-
"infrastructure-neon-setup",
|
|
39
|
-
"infrastructure-neon-pgvector"
|
|
40
|
-
],
|
|
41
|
-
"persona": "Você é um especialista em EF Core sobre Neon (Postgres). Pensa em migrations explícitas, configurações fluentes, navigation properties bem nomeadas, índices intencionais. Sempre Guid.CreateVersion7() para PKs. Sealed entities. Nunca leak de DbContext fora do handler."
|
|
42
|
-
},
|
|
43
|
-
"maf-expert": {
|
|
44
|
-
"title": "Microsoft Agent Framework Expert",
|
|
45
|
-
"icon": "🤖",
|
|
46
|
-
"color": "purple",
|
|
47
|
-
"domains": ["ai-agents", "ai-orchestration"],
|
|
48
|
-
"keywords": [
|
|
49
|
-
"agent", "ai agent", "maf", "microsoft agent framework",
|
|
50
|
-
"tool", "tool calling", "rag", "vector search", "llm",
|
|
51
|
-
"orchestration", "multi-agent"
|
|
52
|
-
],
|
|
53
|
-
"stack": ["dotnet"],
|
|
54
|
-
"standards": [
|
|
55
|
-
"ai-agents-setup",
|
|
56
|
-
"ai-agents-
|
|
57
|
-
"ai-agents-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
],
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
|
|
111
|
-
],
|
|
112
|
-
"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
"
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
1
|
+
{
|
|
2
|
+
"version": "5.0.0",
|
|
3
|
+
"schema": "domain-personas",
|
|
4
|
+
"total_agents": 7,
|
|
5
|
+
"description": "Domain personas dispatched per task by the morph-implement skill. The 3 roles (Orchestrator/Specialist/Evaluator) are assumed by Claude itself per MORPH.md — these are domain personas the Specialist consults when working in a specific area.",
|
|
6
|
+
"agents": {
|
|
7
|
+
"dotnet-senior": {
|
|
8
|
+
"title": ".NET Senior Engineer",
|
|
9
|
+
"icon": "🔷",
|
|
10
|
+
"color": "blue",
|
|
11
|
+
"domains": ["backend", "backend-api", "architecture"],
|
|
12
|
+
"keywords": [
|
|
13
|
+
"backend", "api", "dotnet", ".net", "csharp", "c#",
|
|
14
|
+
"minimal api", "vertical slice", "vsa", "result pattern",
|
|
15
|
+
"feature slice", "endpoint", "handler", "validator"
|
|
16
|
+
],
|
|
17
|
+
"stack": ["dotnet"],
|
|
18
|
+
"standards": [
|
|
19
|
+
"architecture-vertical-slice-vertical-slice",
|
|
20
|
+
"backend-dotnet-result-pattern",
|
|
21
|
+
"backend-dotnet-vsa-handler-patterns",
|
|
22
|
+
"backend-dotnet-fluent-validation-vsa"
|
|
23
|
+
],
|
|
24
|
+
"persona": "Você é um engenheiro .NET sênior. Pensa em VSA com handlers diretos, result pattern, sealed classes, Guid.CreateVersion7(). Acesso a dados híbrido: IRepository<T> + IUnitOfWork para CRUD, DbContext direto no slice para queries específicas; nunca uma camada de Service/Manager. Não usa exceptions como fluxo. Consulta o standard antes de escrever cada slice. Nomeia tudo em PascalCase para tipos, camelCase para parâmetros."
|
|
25
|
+
},
|
|
26
|
+
"ef-modeler": {
|
|
27
|
+
"title": "EF Core / Database Modeler",
|
|
28
|
+
"icon": "🗄️",
|
|
29
|
+
"color": "cyan",
|
|
30
|
+
"domains": ["database", "data-modeling", "migrations"],
|
|
31
|
+
"keywords": [
|
|
32
|
+
"ef core", "entity framework", "neon", "postgres", "postgresql",
|
|
33
|
+
"migration", "dbcontext", "navigation property", "configuration"
|
|
34
|
+
],
|
|
35
|
+
"stack": ["dotnet"],
|
|
36
|
+
"standards": [
|
|
37
|
+
"backend-database-postgresql-database",
|
|
38
|
+
"infrastructure-neon-setup",
|
|
39
|
+
"infrastructure-neon-pgvector"
|
|
40
|
+
],
|
|
41
|
+
"persona": "Você é um especialista em EF Core sobre Neon (Postgres). Pensa em migrations explícitas, configurações fluentes, navigation properties bem nomeadas, índices intencionais. Sempre Guid.CreateVersion7() para PKs. Sealed entities. Nunca leak de DbContext fora do handler."
|
|
42
|
+
},
|
|
43
|
+
"maf-expert": {
|
|
44
|
+
"title": "Microsoft Agent Framework Expert",
|
|
45
|
+
"icon": "🤖",
|
|
46
|
+
"color": "purple",
|
|
47
|
+
"domains": ["ai-agents", "ai-orchestration"],
|
|
48
|
+
"keywords": [
|
|
49
|
+
"agent", "ai agent", "maf", "microsoft agent framework",
|
|
50
|
+
"tool", "tool calling", "rag", "vector search", "llm",
|
|
51
|
+
"orchestration", "multi-agent"
|
|
52
|
+
],
|
|
53
|
+
"stack": ["dotnet"],
|
|
54
|
+
"standards": [
|
|
55
|
+
"ai-agents-setup",
|
|
56
|
+
"ai-agents-sweet-spot",
|
|
57
|
+
"ai-agents-providers-model-registry",
|
|
58
|
+
"ai-agents-structured-output",
|
|
59
|
+
"ai-agents-prompts-in-db",
|
|
60
|
+
"ai-agents-rag-custom-pgvector",
|
|
61
|
+
"ai-agents-middleware-patterns",
|
|
62
|
+
"ai-agents-multi-agent-patterns"
|
|
63
|
+
],
|
|
64
|
+
"persona": "Você é especialista no Microsoft Agent Framework (MAF 1.0 GA). Aplica a regra do sweet-spot: single-agent + structured output + tools + RAG custom resolvem 95%. Refere alias do Model Registry, nunca model hardcoded. Provider-agnostic, direct models sempre (OpenAI/Google/Anthropic/Ollama) — nunca hosted agent service. Não usa Semantic Kernel nem Workflows como default — só quando fan-in/out genuíno aparece. Telemetria via AgentOpenTelemetryConsts.DefaultSourceName."
|
|
65
|
+
},
|
|
66
|
+
"nextjs-expert": {
|
|
67
|
+
"title": "Next.js / React Expert",
|
|
68
|
+
"icon": "⚛️",
|
|
69
|
+
"color": "green",
|
|
70
|
+
"domains": ["frontend", "ui", "react", "nextjs"],
|
|
71
|
+
"keywords": [
|
|
72
|
+
"nextjs", "next.js", "react", "app router", "server component",
|
|
73
|
+
"client component", "tailwind", "framer motion", "shadcn"
|
|
74
|
+
],
|
|
75
|
+
"stack": ["nextjs"],
|
|
76
|
+
"standards": [
|
|
77
|
+
"frontend-nextjs-app-router",
|
|
78
|
+
"frontend-nextjs-components",
|
|
79
|
+
"frontend-nextjs-data-fetching",
|
|
80
|
+
"frontend-nextjs-naming-conventions",
|
|
81
|
+
"frontend-nextjs-state-management"
|
|
82
|
+
],
|
|
83
|
+
"persona": "Você escreve Next.js App Router idiomático. Server Components por padrão, Client Components apenas quando há interatividade real. Tailwind + Shadcn + Framer Motion. Tipos via Zod. Nada de getServerSideProps. RSC streaming quando faz sentido."
|
|
84
|
+
},
|
|
85
|
+
"ui-designer": {
|
|
86
|
+
"title": "UI/UX Designer",
|
|
87
|
+
"icon": "🎨",
|
|
88
|
+
"color": "magenta",
|
|
89
|
+
"domains": ["ui", "ux", "design-system", "accessibility"],
|
|
90
|
+
"keywords": [
|
|
91
|
+
"design", "ui", "ux", "design system", "tokens", "wcag",
|
|
92
|
+
"accessibility", "mockup", "flow", "shadcn", "tailwind"
|
|
93
|
+
],
|
|
94
|
+
"stack": ["nextjs"],
|
|
95
|
+
"standards": [
|
|
96
|
+
"frontend-design-system-naming",
|
|
97
|
+
"frontend-design-system-animations",
|
|
98
|
+
"frontend-nextjs-motion-patterns"
|
|
99
|
+
],
|
|
100
|
+
"persona": "Você desenha sistemas, não telas isoladas. Pensa em tokens (cor, espaço, tipografia), componentes reutilizáveis, estados (default/hover/focus/disabled/loading/error), acessibilidade WCAG AA. Mockups em Tailwind direto, sem Figma intermediário."
|
|
101
|
+
},
|
|
102
|
+
"infra-engineer": {
|
|
103
|
+
"title": "Infrastructure / Jobs Engineer",
|
|
104
|
+
"icon": "⚙️",
|
|
105
|
+
"color": "yellow",
|
|
106
|
+
"domains": ["infrastructure", "jobs", "deployment", "observability"],
|
|
107
|
+
"keywords": [
|
|
108
|
+
"hangfire", "background job", "queue", "deployment",
|
|
109
|
+
"docker", "ci/cd", "telemetry", "logging", "monitoring"
|
|
110
|
+
],
|
|
111
|
+
"stack": ["dotnet"],
|
|
112
|
+
"standards": [
|
|
113
|
+
"backend-integrations-hangfire-hangfire-jobs",
|
|
114
|
+
"infrastructure-docker-easypanel-deploy",
|
|
115
|
+
"backend-dotnet-scrutor"
|
|
116
|
+
],
|
|
117
|
+
"persona": "Você cuida de infra: jobs assíncronos com Hangfire (apenas quando há razão real), deployment, observabilidade. Pensa em retry, idempotência, dead-letter, métricas. Não inventa infra — usa o que o stack já oferece."
|
|
118
|
+
},
|
|
119
|
+
"evaluator": {
|
|
120
|
+
"title": "Code & Architecture Evaluator",
|
|
121
|
+
"icon": "🔍",
|
|
122
|
+
"color": "red",
|
|
123
|
+
"domains": ["evaluation", "review", "quality"],
|
|
124
|
+
"keywords": [
|
|
125
|
+
"review", "eval", "score", "rubric", "audit", "quality"
|
|
126
|
+
],
|
|
127
|
+
"stack": ["*"],
|
|
128
|
+
"standards": [],
|
|
129
|
+
"persona": "Você aplica as rubricas em framework/evals/rubrics/. Não reescreve código — produz scores 0-10 por dimensão (architecture, contracts, code-quality, test-coverage), feedback priorizado, e ação clara (aprovado/feedback/escalar). Silêncio em scores ≥ 8 é o sinal correto."
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -1,36 +1,41 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "backend",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "Backend-focused rubric. Higher weight on architecture, security, and package health.",
|
|
5
|
-
"categories": {
|
|
6
|
-
"functionality": {
|
|
7
|
-
"weight": 0.
|
|
8
|
-
"validators": ["contract-compliance"],
|
|
9
|
-
"description": "Core feature correctness and contract compliance"
|
|
10
|
-
},
|
|
11
|
-
"code_quality": {
|
|
12
|
-
"weight": 0.
|
|
13
|
-
"validators": ["architecture"],
|
|
14
|
-
"description": "Architecture patterns, dependency direction, and code structure"
|
|
15
|
-
},
|
|
16
|
-
"design_ui": {
|
|
17
|
-
"weight": 0.05,
|
|
18
|
-
"validators": ["design-system", "css", "contrast", "nextjs-component"],
|
|
19
|
-
"description": "Design system compliance (minimal weight for backend projects)"
|
|
20
|
-
},
|
|
21
|
-
"security": {
|
|
22
|
-
"weight": 0.15,
|
|
23
|
-
"validators": [],
|
|
24
|
-
"description": "Security posture (agent-evaluated, no automated validator)"
|
|
25
|
-
},
|
|
26
|
-
"packages": {
|
|
27
|
-
"weight": 0.20,
|
|
28
|
-
"validators": ["packages"],
|
|
29
|
-
"description": "Dependency health, version compatibility, and deprecated packages"
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"id": "backend",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Backend-focused rubric. Higher weight on architecture, security, and package health.",
|
|
5
|
+
"categories": {
|
|
6
|
+
"functionality": {
|
|
7
|
+
"weight": 0.25,
|
|
8
|
+
"validators": ["contract-compliance"],
|
|
9
|
+
"description": "Core feature correctness and contract compliance"
|
|
10
|
+
},
|
|
11
|
+
"code_quality": {
|
|
12
|
+
"weight": 0.25,
|
|
13
|
+
"validators": ["architecture"],
|
|
14
|
+
"description": "Architecture patterns, dependency direction, and code structure"
|
|
15
|
+
},
|
|
16
|
+
"design_ui": {
|
|
17
|
+
"weight": 0.05,
|
|
18
|
+
"validators": ["design-system", "css", "contrast", "nextjs-component"],
|
|
19
|
+
"description": "Design system compliance (minimal weight for backend projects)"
|
|
20
|
+
},
|
|
21
|
+
"security": {
|
|
22
|
+
"weight": 0.15,
|
|
23
|
+
"validators": [],
|
|
24
|
+
"description": "Security posture (agent-evaluated, no automated validator)"
|
|
25
|
+
},
|
|
26
|
+
"packages": {
|
|
27
|
+
"weight": 0.20,
|
|
28
|
+
"validators": ["packages"],
|
|
29
|
+
"description": "Dependency health, version compatibility, and deprecated packages"
|
|
30
|
+
},
|
|
31
|
+
"maf_compliance": {
|
|
32
|
+
"weight": 0.10,
|
|
33
|
+
"validators": [],
|
|
34
|
+
"description": "MAF agent compliance (agent-evaluated, applies only when the feature touches AI agents): Microsoft.Agents.AI GA packages used; Model Registry alias referenced not hardcoded models; structured output for pipelined agents; prompts from DB not hardcoded; no Semantic Kernel; no hosted agent services."
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"thresholds": {
|
|
38
|
+
"approve": 8.0,
|
|
39
|
+
"retry": 6.0
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -1,15 +1,45 @@
|
|
|
1
|
-
---
|
|
2
|
-
paths:
|
|
3
|
-
- "**/Agents/**"
|
|
4
|
-
- "**/agents/**"
|
|
5
|
-
- "**/*Agent*.cs"
|
|
6
|
-
stacks:
|
|
7
|
-
- dotnet
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Microsoft Agent Framework Standards
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@.morph/framework/standards/
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "**/Agents/**"
|
|
4
|
+
- "**/agents/**"
|
|
5
|
+
- "**/*Agent*.cs"
|
|
6
|
+
stacks:
|
|
7
|
+
- dotnet
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Microsoft Agent Framework Standards
|
|
11
|
+
|
|
12
|
+
> **Layer 0/1 — auto-carregados.** São os standards core: aplicam-se a praticamente todo
|
|
13
|
+
> agente MAF. Carregue-os sempre que tocar código de agentes.
|
|
14
|
+
|
|
15
|
+
@.morph/framework/standards/ai-agents/setup.md
|
|
16
|
+
@.morph/framework/standards/ai-agents/sweet-spot.md
|
|
17
|
+
@.morph/framework/standards/ai-agents/providers/model-registry.md
|
|
18
|
+
@.morph/framework/standards/ai-agents/structured-output.md
|
|
19
|
+
@.morph/framework/standards/ai-agents/multi-agent-patterns.md
|
|
20
|
+
@.morph/framework/standards/ai-agents/prompts-in-db.md
|
|
21
|
+
@.morph/framework/standards/ai-agents/rag-custom-pgvector.md
|
|
22
|
+
@.morph/framework/standards/ai-agents/middleware-patterns.md
|
|
23
|
+
@.morph/framework/standards/ai-agents/workflows.md
|
|
24
|
+
@.morph/framework/standards/ai-agents/production.md
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
> **Layer 2 — sob demanda (NÃO auto-carregados).** São standards de modalidade, otimização e
|
|
29
|
+
> MCP: relevantes apenas quando a feature usa especificamente esse recurso. Carregue via
|
|
30
|
+
> `morph-standards` quando uma keyword corresponder — manter fora do auto-load preserva o
|
|
31
|
+
> context window para o trabalho que importa.
|
|
32
|
+
|
|
33
|
+
| Standard | Carregue quando a feature envolve |
|
|
34
|
+
|----------|-----------------------------------|
|
|
35
|
+
| `ai-agents/modalities-vision.md` | imagem → texto (OCR, análise de documento, visão) |
|
|
36
|
+
| `ai-agents/modalities-image-gen.md` | texto → imagem (geração de mockups, posts, assets) |
|
|
37
|
+
| `ai-agents/modalities-speech-to-text.md` | áudio → texto (transcrição, legendagem) |
|
|
38
|
+
| `ai-agents/modalities-text-to-speech.md` | texto → áudio (síntese de voz) |
|
|
39
|
+
| `ai-agents/batching.md` | processar N prompts independentes em lote (Batch API) |
|
|
40
|
+
| `ai-agents/service-tier-flex.md` | otimização de custo em jobs assíncronos (tier flex) |
|
|
41
|
+
| `ai-agents/agent-session.md` | agentes conversacionais com histórico/reducers |
|
|
42
|
+
| `ai-agents/context-providers.md` | injeção dinâmica de contexto (`AIContextProvider`) |
|
|
43
|
+
| `ai-agents/mcp-tools.md` | agente MAF consome um MCP server externo |
|
|
44
|
+
| `ai-agents/mcp-server.md` | projeto expõe capacidades como MCP server |
|
|
45
|
+
| `integration/mcp/mcp-tools.md` | integração MCP cross-domain (fora do escopo MAF) |
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
---
|
|
2
|
-
paths:
|
|
3
|
-
- "**/neon/**"
|
|
4
|
-
- "**/database/**"
|
|
5
|
-
- "**/*Migration*.sql"
|
|
6
|
-
- "**/*migration*.sql"
|
|
7
|
-
stacks:
|
|
8
|
-
- neon
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Neon PostgreSQL Standards
|
|
12
|
-
|
|
13
|
-
@.morph/framework/standards/infrastructure/neon/neon-setup.md
|
|
14
|
-
@.morph/framework/standards/infrastructure/neon/neon-pgvector.md
|
|
15
|
-
@.morph/framework/standards/infrastructure/neon/neon-pgrag.md
|
|
16
|
-
@.morph/framework/standards/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
| PostgreSQL
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
Read the template and adapt to your project structure.
|
|
1
|
+
---
|
|
2
|
+
paths:
|
|
3
|
+
- "**/neon/**"
|
|
4
|
+
- "**/database/**"
|
|
5
|
+
- "**/*Migration*.sql"
|
|
6
|
+
- "**/*migration*.sql"
|
|
7
|
+
stacks:
|
|
8
|
+
- neon
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Neon PostgreSQL Standards
|
|
12
|
+
|
|
13
|
+
@.morph/framework/standards/infrastructure/neon/neon-setup.md
|
|
14
|
+
@.morph/framework/standards/infrastructure/neon/neon-pgvector.md
|
|
15
|
+
@.morph/framework/standards/infrastructure/neon/neon-pgrag.md
|
|
16
|
+
@.morph/framework/standards/backend/integrations/neon-auth/neon-auth.md
|
|
17
|
+
|
|
18
|
+
## SQL Templates
|
|
19
|
+
|
|
20
|
+
| Template | Path | Purpose |
|
|
21
|
+
|----------|------|---------|
|
|
22
|
+
| PostgreSQL Migration | `.morph/framework/templates/code/sql/postgresql-migration.sql` | Database migration |
|
|
23
|
+
| PostgreSQL RLS Policy | `.morph/framework/templates/code/sql/postgresql-rls-policy.sql` | Row-level security |
|
|
24
|
+
|
|
25
|
+
Read the template and adapt to your project structure.
|
|
@@ -26,7 +26,7 @@ O harness conhece o stack por padrão. Não pergunte sobre tecnologia a menos qu
|
|
|
26
26
|
| Frontend | Next.js App Router + Tailwind + Framer Motion + Shadcn |
|
|
27
27
|
| Jobs async | Hangfire — apenas se a feature requer processamento em background |
|
|
28
28
|
|
|
29
|
-
**Padrões proibidos:** `Guid.NewGuid()`, classes não-sealed sem justificativa, exceptions sem result pattern,
|
|
29
|
+
**Padrões proibidos:** `Guid.NewGuid()`, classes não-sealed sem justificativa, exceptions sem result pattern, camada de Service/Manager entre handler e dados, SQL cru sem justificativa. Acesso a dados em VSA é híbrido: `IRepository<T>` + `IUnitOfWork` para CRUD; `DbContext` direto no slice para queries específicas.
|
|
30
30
|
|
|
31
31
|
## O que fazer
|
|
32
32
|
|
|
@@ -33,7 +33,9 @@ Ao iniciar a fase plan — após o `proposal.md` ser aprovado e antes de qualque
|
|
|
33
33
|
- `Guid.NewGuid()` → usar `Guid.CreateVersion7()`
|
|
34
34
|
- Classes não-sealed sem justificativa documentada
|
|
35
35
|
- Exceptions como fluxo de controle → usar result pattern com `result.Match()`
|
|
36
|
-
-
|
|
36
|
+
- Camada de Service/Manager entre handler e dados → handler usa `IRepository<T>` ou `DbContext` direto
|
|
37
|
+
- SQL cru (`FromSqlRaw`, `ExecuteQuery(string)`) sem justificativa em `decisions.md` → usar LINQ
|
|
38
|
+
- Política de acesso a dados (registre no mandate como orientação, não proibição): `IRepository<T>` + `IUnitOfWork` para CRUD simples; `ApplicationDbContext` injetado direto no slice para queries específicas (joins, projeção, paginação).
|
|
37
39
|
- Checklist de done com critérios verificáveis por tarefa.
|
|
38
40
|
|
|
39
41
|
4. Produza `tasks.json` em `.morph/features/{feature}/2-plan/` seguindo o schema em `.morph/framework/schemas/tasks.schema.json`.
|
|
@@ -28,7 +28,7 @@ Quando o projeto já tem código existente e você precisa entender o estado atu
|
|
|
28
28
|
| Frontend | Next.js App Router + Tailwind + Framer Motion + Shadcn |
|
|
29
29
|
| Jobs | Hangfire (apenas quando necessário) |
|
|
30
30
|
|
|
31
|
-
**Padrões proibidos:** `Guid.NewGuid()`, classes não-sealed sem justificativa, exceptions como fluxo de controle,
|
|
31
|
+
**Padrões proibidos:** `Guid.NewGuid()`, classes não-sealed sem justificativa, exceptions como fluxo de controle, camada de Service/Manager entre handler e dados, SQL cru sem justificativa. Acesso a dados em VSA é híbrido: `IRepository<T>` + `IUnitOfWork` para CRUD; `DbContext` direto no slice para queries específicas.
|
|
32
32
|
|
|
33
33
|
## Greenfield short-circuit
|
|
34
34
|
|
|
@@ -61,7 +61,7 @@ Antes de despachar Explore, verifique se o projeto é greenfield:
|
|
|
61
61
|
- Erros: Result pattern (`result.Match()`)
|
|
62
62
|
|
|
63
63
|
## Padrões proibidos
|
|
64
|
-
`Guid.NewGuid()`, classes não-sealed sem justificativa, exceptions como fluxo de controle,
|
|
64
|
+
`Guid.NewGuid()`, classes não-sealed sem justificativa, exceptions como fluxo de controle, camada de Service/Manager entre handler e dados, SQL cru sem justificativa. Acesso a dados em VSA é híbrido: `IRepository<T>` + `IUnitOfWork` para CRUD; `DbContext` direto no slice para queries específicas.
|
|
65
65
|
|
|
66
66
|
## Recomendação
|
|
67
67
|
Compliance trivial (greenfield). Prosseguir para morph-brainstorming.
|
|
@@ -101,7 +101,7 @@ Antes de despachar Explore, verifique se o projeto é greenfield:
|
|
|
101
101
|
| Severidade | Critério |
|
|
102
102
|
|------------|---------|
|
|
103
103
|
| **Bloqueante** | Runtime diferente (.NET 8 ou anterior), ORM diferente (Dapper puro sem EF Core), banco diferente (MySQL, SQL Server) |
|
|
104
|
-
| **Alto** | `Guid.NewGuid()` generalizado,
|
|
104
|
+
| **Alto** | `Guid.NewGuid()` generalizado, camada de Service/Manager entre handler e dados, SQL cru generalizado, exceptions como fluxo de controle |
|
|
105
105
|
| **Médio** | Classes não-sealed, Pages Router em vez de App Router, biblioteca de UI diferente |
|
|
106
106
|
| **Baixo** | Versões de pacotes desatualizadas mas compatíveis |
|
|
107
107
|
|