@polymorphism-tech/morph-spec 4.3.2 → 4.3.3

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,6 +1,6 @@
1
1
  {
2
2
  "framework": "global",
3
- "frameworkVersion": "4.3.1",
3
+ "frameworkVersion": "4.3.2",
4
4
  "project": {
5
5
  "name": "nextjs-supabase",
6
6
  "stack": "unknown",
@@ -1,25 +0,0 @@
1
- # Features Arquivadas
2
-
3
- Esta pasta contém o histórico de features CONCLUÍDAS.
4
-
5
- ## Estrutura
6
-
7
- ```
8
- archive/
9
- └── {feature-name}/
10
- ├── proposal.md # Proposta original
11
- ├── spec.md # Especificação final
12
- ├── tasks.md # Tasks completadas
13
- ├── contracts.cs # Contracts finais
14
- ├── decisions.md # ADRs
15
- └── recap.md # Resumo e métricas
16
- ```
17
-
18
- ## Por que arquivar?
19
-
20
- 1. Manter histórico de decisões
21
- 2. Referência para features similares
22
- 3. Métricas de produtividade
23
- 4. Lições aprendidas
24
-
25
- *Gerado pelo MORPH Framework*
@@ -1,122 +0,0 @@
1
- {
2
- "project": {
3
- "name": "MyProject",
4
- "description": "Descrição do projeto",
5
- "type": "blazor-server",
6
- "repository": "https://dev.azure.com/org/project/_git/repo"
7
- },
8
- "azure": {
9
- "subscription": "subscription-id",
10
- "resourceGroup": "rg-myproject-dev",
11
- "location": "eastus2",
12
- "resources": {
13
- "containerApps": {
14
- "enabled": true,
15
- "environment": "cae-myproject-dev",
16
- "minReplicas": 0,
17
- "maxReplicas": 2
18
- },
19
- "sql": {
20
- "enabled": true,
21
- "server": "sql-myproject-dev",
22
- "database": "sqldb-myproject-dev",
23
- "tier": "Free",
24
- "maxSizeGB": 32
25
- },
26
- "openai": {
27
- "enabled": true,
28
- "endpoint": "https://oai-myproject.openai.azure.com/",
29
- "model": "gpt-4o-mini",
30
- "maxTokensPerRequest": 4000
31
- },
32
- "monitoring": {
33
- "enabled": true,
34
- "appInsights": "appi-myproject-dev",
35
- "logLevel": "Information"
36
- }
37
- }
38
- },
39
- "devops": {
40
- "organization": "https://dev.azure.com/myorg",
41
- "project": "MyProject",
42
- "boards": {
43
- "enabled": true,
44
- "areaPath": "MyProject\\Features",
45
- "iterationPath": "MyProject\\Sprint 1"
46
- },
47
- "repos": {
48
- "defaultBranch": "main",
49
- "featureBranchPrefix": "feature/"
50
- },
51
- "pipelines": {
52
- "buildPipeline": "myproject-ci",
53
- "releasePipeline": "myproject-cd"
54
- },
55
- "wiki": {
56
- "enabled": true,
57
- "wikiName": "MyProject.wiki"
58
- }
59
- },
60
- "agents": {
61
- "core": {
62
- "standardsArchitect": { "enabled": true },
63
- "azureArchitect": { "enabled": true },
64
- "blazorBuilder": { "enabled": true },
65
- "efModeler": { "enabled": true },
66
- "msAgentExpert": { "enabled": true }
67
- },
68
- "specialists": {
69
- "hangfireOrchestrator": {
70
- "enabled": true,
71
- "autoActivation": ["scheduled", "job", "background", "recurring", "batch", "cron"]
72
- },
73
- "uiuxDesigner": {
74
- "enabled": true,
75
- "autoActivation": ["wizard", "dashboard", "complex", "drag", "drop", "multi-step"]
76
- },
77
- "popmAdvisor": {
78
- "enabled": true,
79
- "autoActivation": ["unclear", "requirements", "priority", "ROI", "business", "value"]
80
- }
81
- }
82
- },
83
- "checkpoints": {
84
- "afterDesign": true,
85
- "afterTasks": true,
86
- "everyNTasks": 3,
87
- "beforeDeploy": true
88
- },
89
- "agentTeams": {
90
- "enabled": false,
91
- "experimental": {
92
- "claudeCodeFlag": "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS",
93
- "requiresOptIn": true
94
- },
95
- "displayMode": "auto",
96
- "spawnThresholds": {
97
- "complexity": ["high", "critical"],
98
- "estimatedFiles": 15,
99
- "activeAgents": 5,
100
- "multiDomain": true
101
- },
102
- "teamStructure": {
103
- "maxTeammates": 10,
104
- "includeValidators": false,
105
- "validatorsRunInHooks": true
106
- }
107
- },
108
- "context": {
109
- "enabled": true,
110
- "autoGenerate": true,
111
- "templates": {
112
- "project": "CONTEXT.md",
113
- "feature": "CONTEXT-{feature}.md"
114
- },
115
- "sources": [
116
- "project.md",
117
- "state.json",
118
- "config.json",
119
- "standards/*.md"
120
- ]
121
- }
122
- }
@@ -1,25 +0,0 @@
1
- # Features em Desenvolvimento
2
-
3
- Esta pasta contém as features ATIVAS em desenvolvimento.
4
-
5
- ## Estrutura
6
-
7
- ```
8
- features/
9
- └── {feature-name}/
10
- ├── proposal.md # Proposta (por que e o quê)
11
- ├── spec.md # Especificação técnica
12
- ├── tasks.md # Checklist de implementação
13
- ├── contracts.cs # Interfaces e DTOs
14
- ├── decisions.md # ADRs
15
- └── recap.md # Resumo pós-implementação
16
- ```
17
-
18
- ## Workflow
19
-
20
- 1. `/morph-proposal {feature}` - Criar nova feature
21
- 2. Revisar e aprovar proposal
22
- 3. `/morph-apply {feature}` - Implementar
23
- 4. `/morph-archive {feature}` - Arquivar quando concluída
24
-
25
- *Gerado pelo MORPH Framework*
@@ -1,61 +0,0 @@
1
- #!/bin/bash
2
- # Scope: blazor-azure | Validates C# test coverage
3
- # MORPH-SPEC Pre-Commit Hook: Test Coverage
4
- # Ensures new C# code has corresponding tests
5
-
6
- echo "🧪 Checking C# test coverage..."
7
-
8
- # Find modified C# files (excluding tests)
9
- CS_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep '\.cs$' | grep -v 'Tests\|Test\.cs$')
10
-
11
- if [ -z "$CS_FILES" ]; then
12
- echo "✓ No production code modified"
13
- exit 0
14
- fi
15
-
16
- MISSING_TESTS=false
17
-
18
- for cs_file in $CS_FILES; do
19
- # Extract class name
20
- class_name=$(basename "$cs_file" .cs)
21
-
22
- # Look for corresponding test file
23
- test_patterns=(
24
- "*/${class_name}Tests.cs"
25
- "*/${class_name}Test.cs"
26
- "*/Test${class_name}.cs"
27
- )
28
-
29
- FOUND_TEST=false
30
- for pattern in "${test_patterns[@]}"; do
31
- if find . -path "$pattern" 2>/dev/null | grep -q .; then
32
- FOUND_TEST=true
33
- break
34
- fi
35
- done
36
-
37
- if [ "$FOUND_TEST" = false ]; then
38
- # Check if it's a trivial file (DTO, model, etc.)
39
- if grep -qi 'record\|DTO\|Model\|Entity' "$cs_file" && ! grep -qi 'class.*{.*public.*{' "$cs_file"; then
40
- echo " ℹ️ Skipping trivial file: $cs_file"
41
- continue
42
- fi
43
-
44
- echo " ⚠️ No test found for: $cs_file"
45
- MISSING_TESTS=true
46
- else
47
- echo " ✓ Test found for: $cs_file"
48
- fi
49
- done
50
-
51
- if [ "$MISSING_TESTS" = true ]; then
52
- echo ""
53
- echo "⚠️ WARNING: Some files don't have tests"
54
- echo " Consider adding tests before committing"
55
- echo " Override with: git commit --no-verify"
56
- # Don't block, just warn
57
- exit 0
58
- fi
59
-
60
- echo "✓ Test coverage looks good"
61
- exit 0
@@ -1,160 +0,0 @@
1
- # Project Context - {PROJECT_NAME}
2
-
3
- > Este arquivo define o contexto do projeto para os agentes MORPH.
4
- > Preencha com as informações específicas do seu projeto.
5
-
6
- ## Overview
7
-
8
- **Nome:** {PROJECT_NAME}
9
- **Descrição:** {Breve descrição do projeto}
10
- **Tipo:** Blazor Server Application
11
-
12
- ---
13
-
14
- ## Technical Stack
15
-
16
- | Layer | Technology | Version |
17
- |-------|------------|---------|
18
- | Frontend | Blazor Server | .NET 10 |
19
- | UI Library | Fluent UI Blazor (recomendado) | 4.0+ |
20
- | Backend | ASP.NET Core | 10.0 |
21
- | Database | Azure SQL | Free Tier |
22
- | ORM | Entity Framework Core | 10.0 |
23
- | AI | Microsoft Agent Framework | .NET 10 |
24
- | Jobs | Hangfire | Latest |
25
- | Hosting | Azure Container Apps | Consumption |
26
-
27
- ---
28
-
29
- ## Architecture
30
-
31
- ```
32
- ┌─────────────────────────────────────────────────┐
33
- │ Web (Blazor) │
34
- ├─────────────────────────────────────────────────┤
35
- │ Application (Services) │
36
- ├─────────────────────────────────────────────────┤
37
- │ Domain (Entities) │
38
- ├─────────────────────────────────────────────────┤
39
- │ Infrastructure (EF Core) │
40
- ├─────────────────────────────────────────────────┤
41
- │ Agents (AI Services) │
42
- └─────────────────────────────────────────────────┘
43
- ```
44
-
45
- ### Project Structure
46
-
47
- ```
48
- src/
49
- ├── {Project}.Web/ # Blazor Server
50
- ├── {Project}.Application/ # Services, DTOs, Commands
51
- ├── {Project}.Domain/ # Entities, Value Objects
52
- ├── {Project}.Infrastructure/ # EF Core, Repositories
53
- └── {Project}.Agents/ # AI Agents
54
-
55
- tests/
56
- ├── {Project}.Tests.Unit/
57
- └── {Project}.Tests.Integration/
58
- ```
59
-
60
- ---
61
-
62
- ## Conventions
63
-
64
- ### Naming
65
-
66
- - **Classes:** PascalCase (ex: `ReportScheduleService`)
67
- - **Interfaces:** I + PascalCase (ex: `IReportScheduleService`)
68
- - **Methods:** PascalCase, async com sufixo Async (ex: `GetByIdAsync`)
69
- - **Variables:** camelCase (ex: `reportSchedule`)
70
- - **Private fields:** _camelCase (ex: `_repository`)
71
-
72
- ### Code Style
73
-
74
- - Primary constructors (C# 12+)
75
- - Records para DTOs
76
- - Private setters em entidades
77
- - Factory methods para criação de entidades
78
- - Fluent API para EF Core (nunca Data Annotations)
79
-
80
- ### Documentation
81
-
82
- - Documentação em Português
83
- - Código em Inglês
84
- - XML comments em métodos públicos
85
-
86
- ---
87
-
88
- ## Azure Resources
89
-
90
- | Resource | Name | Tier |
91
- |----------|------|------|
92
- | Resource Group | rg-{project}-{env} | - |
93
- | Container App | ca-{project}-{env} | Consumption |
94
- | SQL Server | sql-{project}-{env} | Free |
95
- | SQL Database | sqldb-{project}-{env} | Free 32GB |
96
- | App Insights | appi-{project}-{env} | Free 5GB |
97
-
98
- ### Cost Limits
99
-
100
- - **Sem aprovação:** Free tier apenas
101
- - **Com aprovação:** Até $10/mês
102
- - **Acima de $10:** Requer ADR com justificativa
103
-
104
- ---
105
-
106
- ## Authentication & Authorization
107
-
108
- - [ ] Azure AD / Entra ID
109
- - [ ] Identity Server
110
- - [ ] Custom JWT
111
- - [ ] None (internal tool)
112
-
113
- **Policies definidas:**
114
- - `CanView{Feature}` - Visualização
115
- - `CanManage{Feature}` - CRUD completo
116
- - `IsAdmin` - Acesso total
117
-
118
- ---
119
-
120
- ## External Integrations
121
-
122
- | Service | Purpose | Auth Method |
123
- |---------|---------|-------------|
124
- | Azure OpenAI | AI Analysis | Managed Identity |
125
- | {Service} | {Purpose} | {Method} |
126
-
127
- ---
128
-
129
- ## Development Guidelines
130
-
131
- ### Git Flow
132
-
133
- - **main** - Produção
134
- - **develop** - Desenvolvimento
135
- - **feature/{name}** - Features
136
-
137
- ### Commit Convention
138
-
139
- ```
140
- {type}({scope}): {message}
141
-
142
- Types: feat, fix, docs, style, refactor, test, chore
143
- ```
144
-
145
- ### PR Requirements
146
-
147
- - [ ] Testes passando
148
- - [ ] Code review aprovado
149
- - [ ] Sem conflitos
150
- - [ ] Linked to work item
151
-
152
- ---
153
-
154
- ## Notes
155
-
156
- {Adicione notas específicas do projeto aqui}
157
-
158
- ---
159
-
160
- *Gerado pelo MORPH Framework*
@@ -1,296 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://polymorphism.com.br/morph-spec/schemas/agent.schema.json",
4
- "title": "MORPH-SPEC Agent Configuration Schema",
5
- "description": "JSON Schema for validating agents.json configuration file",
6
- "type": "object",
7
- "required": ["version", "agents"],
8
- "properties": {
9
- "version": {
10
- "type": "string",
11
- "description": "Schema version",
12
- "pattern": "^\\d+\\.\\d+\\.\\d+$",
13
- "examples": ["1.0.0", "2.1.0"]
14
- },
15
- "agents": {
16
- "type": "object",
17
- "description": "Agent definitions organized by type",
18
- "required": ["core", "specialists"],
19
- "properties": {
20
- "core": {
21
- "type": "array",
22
- "description": "Core agents (always active)",
23
- "items": {
24
- "$ref": "#/definitions/agent"
25
- },
26
- "minItems": 1
27
- },
28
- "specialists": {
29
- "type": "array",
30
- "description": "Specialist agents (activated on-demand by keywords)",
31
- "items": {
32
- "$ref": "#/definitions/specialistAgent"
33
- }
34
- }
35
- },
36
- "additionalProperties": false
37
- }
38
- },
39
- "additionalProperties": false,
40
- "definitions": {
41
- "agent": {
42
- "type": "object",
43
- "description": "Base agent definition",
44
- "required": ["id", "name", "emoji", "type", "description", "responsibilities"],
45
- "properties": {
46
- "id": {
47
- "type": "string",
48
- "description": "Unique agent identifier (kebab-case)",
49
- "pattern": "^[a-z][a-z0-9-]*$",
50
- "examples": ["standards-architect", "azure-architect"]
51
- },
52
- "name": {
53
- "type": "string",
54
- "description": "Human-readable agent name",
55
- "minLength": 3,
56
- "maxLength": 50,
57
- "examples": ["Standards Architect", "Azure Architect"]
58
- },
59
- "emoji": {
60
- "type": "string",
61
- "description": "Agent emoji (single character)",
62
- "pattern": "^.{1,2}$",
63
- "examples": ["📐", "☁️", "🔥"]
64
- },
65
- "type": {
66
- "type": "string",
67
- "description": "Agent type",
68
- "enum": ["core", "specialist"],
69
- "examples": ["core", "specialist"]
70
- },
71
- "skillPath": {
72
- "type": "string",
73
- "description": "Path to agent skill file (relative to repo root)",
74
- "pattern": "^[^/].*\\.md$",
75
- "examples": [".claude/skills/specialists/standards-architect.md"]
76
- },
77
- "description": {
78
- "type": "string",
79
- "description": "Brief agent description (PT-BR or EN)",
80
- "minLength": 10,
81
- "maxLength": 200,
82
- "examples": ["Guardião dos padrões de código e arquitetura"]
83
- },
84
- "responsibilities": {
85
- "type": "array",
86
- "description": "List of agent responsibilities",
87
- "items": {
88
- "type": "string",
89
- "minLength": 5,
90
- "maxLength": 150
91
- },
92
- "minItems": 1,
93
- "maxItems": 10,
94
- "examples": [
95
- ["Validar aderência aos padrões", "Revisar nomenclatura"]
96
- ]
97
- },
98
- "validatesPhases": {
99
- "type": "array",
100
- "description": "Which MORPH phases this agent validates",
101
- "items": {
102
- "type": "string",
103
- "enum": ["setup", "uiux-design", "design", "clarify", "tasks", "implement", "sync"]
104
- },
105
- "uniqueItems": true,
106
- "examples": [["design", "implement"]]
107
- },
108
- "expertise": {
109
- "type": "array",
110
- "description": "Areas of expertise",
111
- "items": {
112
- "type": "string",
113
- "minLength": 3,
114
- "maxLength": 100
115
- },
116
- "examples": [["Container Apps", "Azure SQL", "Bicep"]]
117
- },
118
- "patterns": {
119
- "type": "array",
120
- "description": "Technical patterns the agent specializes in",
121
- "items": {
122
- "type": "string",
123
- "minLength": 3,
124
- "maxLength": 100
125
- },
126
- "examples": [["CQRS", "Repository", "DI"]]
127
- },
128
- "limits": {
129
- "type": "object",
130
- "description": "Agent-specific limits (e.g., for Cost Guardian)",
131
- "additionalProperties": true
132
- },
133
- "defaultModel": {
134
- "type": "string",
135
- "description": "Default AI model for this agent",
136
- "examples": ["gpt-4o-mini", "claude-3-5-sonnet"]
137
- },
138
- "deliverables": {
139
- "type": "array",
140
- "description": "Outputs this agent is responsible for",
141
- "items": {
142
- "type": "string",
143
- "minLength": 3,
144
- "maxLength": 100
145
- },
146
- "examples": [["ui-design-system.md", "ui-mockups.md"]]
147
- },
148
- "workflow": {
149
- "type": "array",
150
- "description": "Step-by-step workflow for this agent",
151
- "items": {
152
- "type": "string",
153
- "minLength": 5,
154
- "maxLength": 200
155
- },
156
- "examples": [
157
- ["1. Analisar contexto", "2. Gerar proposta", "3. Validar com usuário"]
158
- ]
159
- },
160
- "techniques": {
161
- "type": "array",
162
- "description": "Techniques or methodologies the agent uses",
163
- "items": {
164
- "type": "string",
165
- "minLength": 3,
166
- "maxLength": 100
167
- },
168
- "examples": [["5 Whys", "MoSCoW", "User story mapping"]]
169
- }
170
- },
171
- "additionalProperties": false
172
- },
173
- "specialistAgent": {
174
- "type": "object",
175
- "required": ["id", "name", "emoji", "type", "description", "responsibilities", "autoActivation"],
176
- "properties": {
177
- "id": {
178
- "type": "string",
179
- "description": "Unique agent identifier (kebab-case)",
180
- "pattern": "^[a-z][a-z0-9-]*$"
181
- },
182
- "name": {
183
- "type": "string",
184
- "description": "Human-readable agent name",
185
- "minLength": 3,
186
- "maxLength": 50
187
- },
188
- "emoji": {
189
- "type": "string",
190
- "description": "Agent emoji (single character)",
191
- "pattern": "^.{1,2}$"
192
- },
193
- "type": {
194
- "const": "specialist"
195
- },
196
- "skillPath": {
197
- "type": "string",
198
- "description": "Path to agent skill file",
199
- "pattern": "^[^/].*\\.md$"
200
- },
201
- "description": {
202
- "type": "string",
203
- "description": "Brief agent description",
204
- "minLength": 10,
205
- "maxLength": 200
206
- },
207
- "responsibilities": {
208
- "type": "array",
209
- "description": "List of agent responsibilities",
210
- "items": {
211
- "type": "string",
212
- "minLength": 5,
213
- "maxLength": 150
214
- },
215
- "minItems": 1,
216
- "maxItems": 10
217
- },
218
- "autoActivation": {
219
- "type": "object",
220
- "description": "Auto-activation configuration for specialist agents",
221
- "required": ["keywords"],
222
- "properties": {
223
- "keywords": {
224
- "type": "array",
225
- "description": "Keywords that trigger this agent (lowercase, alphanumeric + hyphens/underscores)",
226
- "items": {
227
- "type": "string",
228
- "pattern": "^[a-z][a-z0-9_-]*$",
229
- "minLength": 2,
230
- "maxLength": 50
231
- },
232
- "minItems": 1,
233
- "uniqueItems": true
234
- },
235
- "minKeywords": {
236
- "type": "integer",
237
- "description": "Minimum number of keyword matches required (default: 1)",
238
- "minimum": 1,
239
- "default": 1
240
- }
241
- },
242
- "additionalProperties": false
243
- },
244
- "validatesPhases": {
245
- "type": "array",
246
- "items": {
247
- "type": "string",
248
- "enum": ["setup", "uiux-design", "design", "clarify", "tasks", "implement", "sync"]
249
- },
250
- "uniqueItems": true
251
- },
252
- "expertise": {
253
- "type": "array",
254
- "items": {
255
- "type": "string",
256
- "minLength": 3,
257
- "maxLength": 100
258
- }
259
- },
260
- "patterns": {
261
- "type": "array",
262
- "items": {
263
- "type": "string",
264
- "minLength": 3,
265
- "maxLength": 100
266
- }
267
- },
268
- "deliverables": {
269
- "type": "array",
270
- "items": {
271
- "type": "string",
272
- "minLength": 3,
273
- "maxLength": 100
274
- }
275
- },
276
- "workflow": {
277
- "type": "array",
278
- "items": {
279
- "type": "string",
280
- "minLength": 5,
281
- "maxLength": 200
282
- }
283
- },
284
- "techniques": {
285
- "type": "array",
286
- "items": {
287
- "type": "string",
288
- "minLength": 3,
289
- "maxLength": 100
290
- }
291
- }
292
- },
293
- "additionalProperties": false
294
- }
295
- }
296
- }