@polymorphism-tech/morph-spec 2.4.0 → 3.0.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/CLAUDE.md +75 -239
- package/bin/morph-spec.js +8 -0
- package/content/.claude/commands/morph-deploy.md +529 -0
- package/content/.claude/skills/level-0-meta/README.md +7 -0
- package/content/.claude/skills/{checklists → level-0-meta}/morph-checklist.md +117 -117
- package/content/.claude/skills/level-1-workflows/README.md +7 -0
- package/content/.claude/skills/{workflows → level-1-workflows}/morph-replicate.md +213 -213
- package/content/.claude/skills/{workflows → level-1-workflows}/phase-clarify.md +131 -131
- package/content/.claude/skills/{workflows → level-1-workflows}/phase-design.md +213 -205
- package/content/.claude/skills/{workflows → level-1-workflows}/phase-setup.md +106 -92
- package/content/.claude/skills/{workflows → level-1-workflows}/phase-tasks.md +164 -164
- package/content/.claude/skills/{workflows → level-1-workflows}/phase-uiux.md +169 -138
- package/content/.claude/skills/level-2-domains/README.md +14 -0
- package/content/.claude/skills/level-2-domains/architecture/prompt-engineer.md +189 -0
- package/content/.claude/skills/level-2-domains/architecture/seo-growth-hacker.md +320 -0
- package/content/.claude/skills/level-2-domains/infrastructure/azure-deploy-specialist.md +699 -0
- package/content/.claude/skills/{specialists → level-2-domains/quality}/testing-specialist.md +126 -126
- package/content/.claude/skills/level-3-technologies/README.md +7 -0
- package/content/.claude/skills/level-4-patterns/README.md +7 -0
- package/content/.morph/config/agents.json +744 -358
- package/content/.morph/config/config.template.json +33 -0
- package/content/.morph/docs/workflows/enforcement-pipeline.md +668 -0
- package/content/.morph/examples/scheduled-reports/decisions.md +158 -158
- package/content/.morph/examples/scheduled-reports/proposal.md +95 -95
- package/content/.morph/examples/scheduled-reports/spec.md +267 -267
- package/content/.morph/hooks/README.md +158 -0
- package/content/.morph/hooks/task-completed.js +73 -0
- package/content/.morph/hooks/teammate-idle.js +68 -0
- package/content/.morph/schemas/tasks.schema.json +220 -220
- package/content/.morph/standards/agent-teams-workflow.md +474 -0
- package/content/.morph/templates/CONTEXT-FEATURE.md +276 -0
- package/content/.morph/templates/CONTEXT.md +170 -0
- package/content/.morph/templates/clarify-questions.md +159 -159
- package/content/.morph/templates/contracts/Commands.cs +74 -74
- package/content/.morph/templates/contracts/Entities.cs +25 -25
- package/content/.morph/templates/contracts/Queries.cs +74 -74
- package/content/.morph/templates/contracts/README.md +74 -74
- package/content/.morph/templates/infra/azure-pipelines-deploy.yml +480 -0
- package/package.json +1 -2
- package/scripts/reorganize-skills.cjs +175 -0
- package/scripts/validate-agents-structure.cjs +52 -0
- package/scripts/validate-skills.cjs +180 -0
- package/src/commands/advance-phase.js +83 -0
- package/src/commands/deploy.js +780 -0
- package/src/commands/detect-agents.js +43 -6
- package/src/commands/detect.js +1 -1
- package/src/commands/generate-context.js +40 -0
- package/src/commands/state.js +2 -1
- package/src/commands/sync.js +1 -1
- package/src/commands/update.js +13 -1
- package/src/lib/context-generator.js +513 -0
- package/src/lib/design-system-detector.js +187 -0
- package/src/lib/design-system-scaffolder.js +299 -0
- package/src/lib/hook-executor.js +256 -0
- package/src/lib/spec-validator.js +258 -0
- package/src/lib/standards-context-injector.js +287 -0
- package/src/lib/state-manager.js +21 -4
- package/src/lib/team-orchestrator.js +322 -0
- package/src/lib/validation-runner.js +65 -13
- package/src/lib/validators/design-system-validator.js +231 -0
- package/src/utils/file-copier.js +9 -1
- /package/content/.claude/skills/{checklists → level-0-meta}/code-review.md +0 -0
- /package/content/.claude/skills/{checklists → level-0-meta}/simulation-checklist.md +0 -0
- /package/content/.claude/skills/{specialists → level-2-domains/ai-agents}/ai-system-architect.md +0 -0
- /package/content/.claude/skills/{specialists → level-2-domains/architecture}/po-pm-advisor.md +0 -0
- /package/content/.claude/skills/{specialists → level-2-domains/architecture}/standards-architect.md +0 -0
- /package/content/.claude/skills/{specialists → level-2-domains/backend}/dotnet-senior.md +0 -0
- /package/content/.claude/skills/{specialists → level-2-domains/backend}/ef-modeler.md +0 -0
- /package/content/.claude/skills/{specialists → level-2-domains/backend}/hangfire-orchestrator.md +0 -0
- /package/content/.claude/skills/{specialists → level-2-domains/backend}/ms-agent-expert.md +0 -0
- /package/content/.claude/skills/{stacks/dotnet-blazor.md → level-2-domains/frontend/blazor-builder.md} +0 -0
- /package/content/.claude/skills/{stacks/dotnet-nextjs.md → level-2-domains/frontend/nextjs-expert.md} +0 -0
- /package/content/.claude/skills/{specialists → level-2-domains/frontend}/ui-ux-designer.md +0 -0
- /package/content/.claude/skills/{specialists → level-2-domains/infrastructure}/azure-architect.md +0 -0
- /package/content/.claude/skills/{infra → level-2-domains/infrastructure}/bicep-architect.md +0 -0
- /package/content/.claude/skills/{infra → level-2-domains/infrastructure}/container-specialist.md +0 -0
- /package/content/.claude/skills/{infra → level-2-domains/infrastructure}/devops-engineer.md +0 -0
- /package/content/.claude/skills/{integrations → level-2-domains/integrations}/asaas-financial.md +0 -0
- /package/content/.claude/skills/{integrations → level-2-domains/integrations}/azure-identity.md +0 -0
- /package/content/.claude/skills/{integrations → level-2-domains/integrations}/clerk-auth.md +0 -0
- /package/content/.claude/skills/{integrations → level-2-domains/integrations}/resend-email.md +0 -0
- /package/content/.claude/skills/{specialists → level-2-domains/quality}/code-analyzer.md +0 -0
- /package/{detectors → src/lib/detectors}/config-detector.js +0 -0
- /package/{detectors → src/lib/detectors}/conversation-analyzer.js +0 -0
- /package/{detectors → src/lib/detectors}/index.js +0 -0
- /package/{detectors → src/lib/detectors}/standards-generator.js +0 -0
- /package/{detectors → src/lib/detectors}/structure-detector.js +0 -0
package/CLAUDE.md
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
# MORPH-SPEC - Instruções para Claude Code
|
|
2
|
-
|
|
3
|
-
**M**ethodical **O**rchestration for **R**eliable **P**roduction-ready **SPEC**-driven development
|
|
1
|
+
# MORPH-SPEC - Instruções para Claude Code (Consumer)
|
|
4
2
|
|
|
5
3
|
> by Polymorphism Tech
|
|
6
4
|
|
|
@@ -13,179 +11,75 @@ Sistema de desenvolvimento orientado por especificações. Hub de agentes especi
|
|
|
13
11
|
### NUNCA:
|
|
14
12
|
- Pular direto para código sem especificação
|
|
15
13
|
- Implementar sem aprovação do design
|
|
16
|
-
- Ignorar
|
|
17
|
-
- Criar recursos Azure manualmente
|
|
14
|
+
- Ignorar padrões em `.morph/standards/`
|
|
15
|
+
- Criar recursos Azure manualmente (use Bicep)
|
|
18
16
|
- Gerar código sem contracts definidos
|
|
19
|
-
- **Tomar decisões técnicas sozinho (infraestrutura, bibliotecas, patterns, schemas)**
|
|
20
17
|
|
|
21
18
|
### SEMPRE:
|
|
22
|
-
- Seguir
|
|
23
|
-
- Gerar outputs em `.morph/
|
|
19
|
+
- Seguir as 5 fases obrigatórias
|
|
20
|
+
- Gerar outputs em `.morph/features/{feature}/`
|
|
24
21
|
- Documentar decisões em `decisions.md`
|
|
25
22
|
- Checkpoint a cada 3 tasks implementadas
|
|
26
23
|
- Usar Infrastructure as Code (Bicep)
|
|
27
|
-
- Usar exclusivamente Microsoft Agent Framework (.NET 10)
|
|
28
|
-
- Coletar input do usuário na FASE 1.5 (layout, referências, imagens)
|
|
29
|
-
- **Consultar usuário em DECISION POINTS**
|
|
30
24
|
|
|
31
25
|
---
|
|
32
26
|
|
|
33
|
-
##
|
|
34
|
-
|
|
35
|
-
**Agent** = Metadata em `.morph/config/agents.json` (quem sou, quando ativo)
|
|
36
|
-
**Skill** = Implementação em `.claude/skills/{cat}/{id}.md` (como faço, prompts, workflows)
|
|
37
|
-
|
|
38
|
-
**Workflow:** Keywords no input → `npx morph-spec detect-agents "{input}"` → retorna agent-ids → Claude ativa agentes → invoca Skills dos detectados
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
npx morph-spec detect-agents "implementar jobs agendados" # Detectar agentes por keywords
|
|
42
|
-
npx morph-spec detect-agents --verbose "criar dashboard" # Ver matches detalhados
|
|
43
|
-
npx morph-spec detect # Detectar stack/arquitetura do projeto
|
|
44
|
-
npx morph-spec validate-agents-skills # Validar consistência
|
|
45
|
-
```
|
|
27
|
+
## WORKFLOW (5 Fases)
|
|
46
28
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
|
52
|
-
|
|
53
|
-
| **
|
|
54
|
-
| **Core** | Azure Architect | *(sempre ativo)* |
|
|
55
|
-
| **Core** | .NET Senior Engineer | *(sempre ativo)* — ultrathink mode |
|
|
56
|
-
| **Stack** | Blazor Builder | blazor, razor, server-side |
|
|
57
|
-
| **Stack** | NextJS Expert | nextjs, react, api, frontend |
|
|
58
|
-
| **Specialist** | EF Modeler | entity, database, migration, ef core |
|
|
59
|
-
| **Specialist** | Code Analyzer | analyze, review, refactor, clean code, smell, duplicate |
|
|
60
|
-
| **Specialist** | Agent Framework Expert | agent, ai, llm, rag, embedding, workflow, orchestration, mcp, a2a, middleware |
|
|
61
|
-
| **Specialist** | Hangfire Orchestrator | scheduled, job, background, cron |
|
|
62
|
-
| **Specialist** | UI/UX Designer | tela, interface, dashboard, form, chart, wizard, blazor, ui, ux, page, component |
|
|
63
|
-
| **Specialist** | PO/PM Advisor | unclear, requirements, priority, ROI |
|
|
64
|
-
| **Integration** | Asaas Financial | asaas, payment, pix, boleto |
|
|
65
|
-
| **Integration** | Clerk Auth | clerk, auth, login, signup |
|
|
66
|
-
| **Integration** | Azure Identity | identity, entra, microsoft auth |
|
|
67
|
-
| **Integration** | Resend Email | resend, email, transactional, notification |
|
|
68
|
-
| **Infra** | Bicep Architect | bicep, iac, infra, provision |
|
|
69
|
-
| **Infra** | DevOps Engineer | pipeline, ci/cd, deploy, release |
|
|
70
|
-
| **Infra** | Container Specialist | docker, container, containerize |
|
|
29
|
+
| Fase | Gatilho | Ações | Output | Pausa? |
|
|
30
|
+
|------|---------|-------|--------|--------|
|
|
31
|
+
| **1. SETUP** | Feature request | Ler project.md, identificar stack, ativar agentes, criar pasta | proposal.md | Não |
|
|
32
|
+
| **2. DESIGN** | Setup concluído | Spec + contracts + decisions + custos + Bicep | spec.md, contracts.cs, decisions.md | **Sim** |
|
|
33
|
+
| **3. CLARIFY** | Design aprovado | Ambiguidades, perguntas, edge cases | Spec atualizado | Não |
|
|
34
|
+
| **4. TASKS** | Clarificações resolvidas | Quebrar em tasks, ordem, checkpoints, dependências | tasks.md | **Sim** |
|
|
35
|
+
| **5. IMPLEMENT** | Tasks aprovadas | Task por task, checkpoint a cada 3, recap | Código + recap.md | Não |
|
|
71
36
|
|
|
72
37
|
---
|
|
73
38
|
|
|
74
|
-
##
|
|
75
|
-
|
|
76
|
-
O MORPH-SPEC detecta automaticamente a complexidade via `src/lib/complexity-analyzer.js`. Override: `[FAST-TRACK]` ou `[FULL-MORPH]` no pedido.
|
|
77
|
-
|
|
78
|
-
| Aspecto | Fast Track | Standard | Full MORPH | UI Refresh | Design Impl |
|
|
79
|
-
|---------|-----------|----------|------------|------------|-------------|
|
|
80
|
-
| **Quando** | Bug fixes, ajustes | Features simples | Features complexas | Redesign visual | Prototipo → Codigo |
|
|
81
|
-
| **Arquivos** | ≤ 3 | 3-10 | > 10 | CSS + .razor | .html → .razor |
|
|
82
|
-
| **Fases** | 2 | 4 | 9 (todas) | 3 | 3 |
|
|
83
|
-
| **Pausas** | 1 | 2-3 | 5-6 | 2 | 2 |
|
|
84
|
-
| **Outputs** | Nenhum | proposal, spec, recap | Todos (9+) | checklist, CSS, recap | recap, CSS |
|
|
85
|
-
|
|
86
|
-
**Detalhes de cada workflow:** Ler `content/.morph/docs/workflows/` para fases completas.
|
|
87
|
-
|
|
88
|
-
**Keywords de detecção:**
|
|
89
|
-
- **Trivial:** bug, fix, corrigir, ajustar, hotfix, edge case, cor, css
|
|
90
|
-
- **Infra:** azure, bicep, sql, container, deploy, infra
|
|
91
|
-
- **Arquitetura:** sistema, autenticação, integração, pattern, cqrs, subsistema
|
|
92
|
-
- **UI Refresh:** redesign, redesenhar, bonito, visual, estetica, modernizar
|
|
93
|
-
- **Design Impl:** prototipo, prototype, figma, html para, converter design, replicar
|
|
94
|
-
|
|
95
|
-
---
|
|
39
|
+
## ESTRUTURA DO PROJETO
|
|
96
40
|
|
|
97
|
-
## AS 9 FASES DO WORKFLOW
|
|
98
|
-
|
|
99
|
-
| Fase | Gatilho | Ações Principais | Output | Pausa? |
|
|
100
|
-
|------|---------|-------------------|--------|--------|
|
|
101
|
-
| **0.5 CONTEXT** | Início sessão (auto) | Detectar framework, projeto, stack, histórico; gerar standards inferidos | context/, inferred.md | Não |
|
|
102
|
-
| **0 PROPOSAL** | Feature request | `npx morph-spec detect`; analisar; gerar proposal.md; registrar agentes | proposal.md | **Sim** |
|
|
103
|
-
| **1 SETUP** | Proposal aprovado | Ler config.json; confirmar stack; ativar agentes; criar pasta outputs | Confirmação | Não |
|
|
104
|
-
| **1.5 UI/UX** | Setup + keywords UI *(condicional)* | Perguntar layout/refs ao usuário; gerar wireframes e specs AGNÓSTICOS (sem escolher lib UI) | ui-*.md | **Sim** |
|
|
105
|
-
| **2 DESIGN** | Contexto confirmado | Gerar spec.md + contracts.cs; DECISION POINTS (lib UI, padrões, dados, infra, SDKs); estimar custos | spec.md, contracts.cs, decisions.md | **Sim** |
|
|
106
|
-
| **3 CLARIFY** | Design aprovado | Identificar ambiguidades; perguntas de clarificação; validar edge cases | Spec atualizado | Não |
|
|
107
|
-
| **4 TASKS** | Clarificações resolvidas | Quebrar spec em tasks T001-TXXX; definir ordem, checkpoints, dependências | tasks.json | **Sim** |
|
|
108
|
-
| **5 IMPLEMENT** | Tasks aprovadas | Implementar task por task; `npx morph-spec task done {feature} {task-id}` após cada; gerar recap.md | Código + recap.md | Não |
|
|
109
|
-
| **6 SYNC** | Implementação + complexidade média/alta *(condicional)* | Promover decisions.md para project/standards/; gerar commit sync | standards/*.md | **Sim** |
|
|
110
|
-
|
|
111
|
-
**Fases Obrigatórias:** 0, 1, 2, 3, 4, 5
|
|
112
|
-
**Fases Condicionais:** 0.5 (auto), 1.5 (se UI), 6 (se complexo)
|
|
113
|
-
|
|
114
|
-
### Regras da FASE 5 (IMPLEMENT)
|
|
115
|
-
|
|
116
|
-
- **SEMPRE** chamar `npx morph-spec task done {feature} {task-id}` após cada task (validators run automatically)
|
|
117
|
-
- **Se validação falhar:** corrigir violações ANTES de re-executar `task done`. NUNCA usar `--skip-validation` sem autorização do usuário
|
|
118
|
-
- **NUNCA** atualizar state.json ou tasks.json manualmente
|
|
119
|
-
- **NUNCA** pular tasks com dependências não completadas
|
|
120
|
-
- Framework gerencia checkpoints automaticamente (a cada 3 tasks, inclui validation summary)
|
|
121
|
-
- Usar `morph-spec phase advance {feature}` para avançar entre fases (valida → avança → mostra próximos passos)
|
|
122
|
-
- Gerar recap: `morph-spec generate recap {feature}` (auto-popula com dados reais de state + validation + contracts)
|
|
123
|
-
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
## PAUSAS INTERATIVAS
|
|
127
|
-
|
|
128
|
-
Toda pausa obrigatória termina com **exatamente 3 itens** (mix de ações/perguntas/sugestões):
|
|
129
|
-
|
|
130
|
-
| Fase | Mix Recomendado |
|
|
131
|
-
|------|----------------|
|
|
132
|
-
| PROPOSAL | 1 ação + 1 pergunta + 1 sugestão |
|
|
133
|
-
| DESIGN | 2 ações + 1 pergunta/sugestão |
|
|
134
|
-
| TASKS | 3 ações (aprovar/repriorizar/adicionar) |
|
|
135
|
-
|
|
136
|
-
**Template:**
|
|
137
41
|
```
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
42
|
+
projeto/
|
|
43
|
+
├── CLAUDE.md
|
|
44
|
+
├── .morph/
|
|
45
|
+
│ ├── project.md # Contexto
|
|
46
|
+
│ ├── config/ # config.json, agents.json
|
|
47
|
+
│ ├── standards/ # coding, architecture, azure
|
|
48
|
+
│ ├── templates/ # Templates para outputs
|
|
49
|
+
│ ├── specs/ # Specs ATIVAS
|
|
50
|
+
│ ├── features/{feature-name}/ # Features EM DESENVOLVIMENTO
|
|
51
|
+
│ │ ├── proposal.md, spec.md, tasks.md
|
|
52
|
+
│ │ ├── contracts.cs, decisions.md, recap.md
|
|
53
|
+
│ └── archive/ # Features CONCLUÍDAS
|
|
54
|
+
├── .claude/skills/ # Agent skills
|
|
55
|
+
└── infra/main.bicep + modules/ # IaC
|
|
143
56
|
```
|
|
144
57
|
|
|
145
58
|
---
|
|
146
59
|
|
|
147
|
-
##
|
|
60
|
+
## AGENTES
|
|
148
61
|
|
|
149
|
-
###
|
|
62
|
+
### Core (Sempre Ativos)
|
|
150
63
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
64
|
+
| Agente | Responsabilidades |
|
|
65
|
+
|--------|-------------------|
|
|
66
|
+
| **Standards Architect** | Padrões, nomenclatura, revisão |
|
|
67
|
+
| **Azure Architect** | Infra Azure, Bicep, Container Apps |
|
|
68
|
+
| **Cost Guardian** | Custos, alertas, bloqueios |
|
|
156
69
|
|
|
157
|
-
|
|
70
|
+
### Stack, Specialist, Integration, Infra
|
|
158
71
|
|
|
159
|
-
**
|
|
160
|
-
- Nomenclatura (seguir standards), estrutura de pastas, imports, formatação, tipos primitivos, validações básicas, padrões já em project/standards/
|
|
161
|
-
|
|
162
|
-
**Template de decisão:**
|
|
163
|
-
```
|
|
164
|
-
🤔 DECISÃO TÉCNICA NECESSÁRIA
|
|
165
|
-
Contexto: {por que decidir agora}
|
|
166
|
-
|
|
167
|
-
Opção 1: {Nome} - ✅ {vantagens} | ❌ {desvantagens} | ⚡ {complexidade}
|
|
168
|
-
Opção 2: {Nome} - ✅ {vantagens} | ❌ {desvantagens} | ⚡ {complexidade}
|
|
169
|
-
|
|
170
|
-
💡 Recomendação: {opção} porque {justificativa}
|
|
171
|
-
Qual prefere?
|
|
172
|
-
```
|
|
72
|
+
> **Ref:** Root `CLAUDE.md` para tabela completa de agentes e keywords.
|
|
173
73
|
|
|
174
74
|
---
|
|
175
75
|
|
|
176
|
-
##
|
|
76
|
+
## LIMITES DE CUSTO
|
|
177
77
|
|
|
178
|
-
|
|
|
179
|
-
|
|
180
|
-
|
|
|
181
|
-
|
|
|
182
|
-
|
|
|
183
|
-
| Atualizar dependência | Mudança de schema de banco |
|
|
184
|
-
| Pergunta sobre código | Autenticação/autorização |
|
|
185
|
-
|
|
186
|
-
> **Regra de Ouro:** ARQUITETURA, DEPENDÊNCIAS EXTERNAS ou ESTRUTURA DE DADOS → Use MORPH. CORREÇÃO, AJUSTE ou OPERAÇÃO → Faça diretamente.
|
|
187
|
-
|
|
188
|
-
Escalação: Se descobrir complexidade maior, `morph-spec state set {feature} workflow full-morph`
|
|
78
|
+
| Nível | Limite | Requisito |
|
|
79
|
+
|-------|--------|-----------|
|
|
80
|
+
| Sem aprovação | Free tier | Nenhum |
|
|
81
|
+
| Com aprovação | Até $10/mês | Confirmação |
|
|
82
|
+
| Acima de $10 | Justificativa | ADR |
|
|
189
83
|
|
|
190
84
|
---
|
|
191
85
|
|
|
@@ -199,115 +93,57 @@ Escalação: Se descobrir complexidade maior, `morph-spec state set {feature} wo
|
|
|
199
93
|
| Recursos dinâmicos (Fabric, Azure AI) | SDK .NET |
|
|
200
94
|
| CI/CD | YAML + Bicep |
|
|
201
95
|
|
|
202
|
-
Estrutura: `infra/main.bicep` → `infra/modules/*.bicep` + `parameters.{env}.json`
|
|
203
|
-
|
|
204
96
|
---
|
|
205
97
|
|
|
206
|
-
##
|
|
98
|
+
## TEMPLATES
|
|
207
99
|
|
|
208
|
-
|
|
209
|
-
morph-spec state init # Inicializar
|
|
210
|
-
morph-spec state set {feature} phase {phase} # Atualizar fase
|
|
211
|
-
morph-spec state set {feature} status {status} # Atualizar status
|
|
212
|
-
morph-spec state add-agent {feature} {agent-id} # Adicionar agente
|
|
213
|
-
morph-spec state mark-output {feature} {type} # Marcar output
|
|
214
|
-
morph-spec state checkpoint {feature} "{nota}" # Registrar checkpoint
|
|
215
|
-
morph-spec state list # Dashboard
|
|
216
|
-
morph-spec state get {feature} # Detalhes
|
|
217
|
-
```
|
|
100
|
+
> SEMPRE use `bin/render-template.js` para renderizar. NUNCA preencha placeholders manualmente.
|
|
218
101
|
|
|
219
|
-
|
|
102
|
+
### Placeholders: `{{PLACEHOLDER}}`
|
|
220
103
|
|
|
221
|
-
|
|
104
|
+
| Placeholder | Exemplo |
|
|
105
|
+
|-------------|---------|
|
|
106
|
+
| `{{FEATURE_NAME}}` | `scheduled-reports` |
|
|
107
|
+
| `{{FEATURE_NAME_PASCAL}}` | `ScheduledReports` |
|
|
108
|
+
| `{{FEATURE_NAME_CAMEL}}` | `scheduledReports` |
|
|
109
|
+
| `{{STACK}}` | `Blazor` |
|
|
110
|
+
| `{{DATE}}`, `{{AUTHOR}}`, `{{NAMESPACE}}` | Auto from config.json |
|
|
222
111
|
|
|
223
|
-
|
|
112
|
+
### CLI
|
|
224
113
|
|
|
225
|
-
|
|
114
|
+
```bash
|
|
115
|
+
node bin/render-template.js <template> <output> <vars-json>
|
|
116
|
+
# --verbose: show replacements | --dry-run: preview only
|
|
117
|
+
```
|
|
226
118
|
|
|
227
|
-
###
|
|
119
|
+
### Available Templates
|
|
228
120
|
|
|
229
|
-
**
|
|
230
|
-
| Comando | Descrição |
|
|
231
|
-
|---------|-----------|
|
|
232
|
-
| `/morph-proposal {feature}` | Spec pipeline completo (fases 0-4 com pausas e auto-continuação) |
|
|
233
|
-
| `/morph-apply {feature}` | Implementar (fase 5, valida fases anteriores) |
|
|
234
|
-
| `/morph-status` | Dashboard de progresso |
|
|
235
|
-
| `/morph-archive {feature}` | Arquivar feature concluída |
|
|
236
|
-
| `/morph-infra {action}` | Gerenciar infra Bicep (init, validate, plan, deploy) |
|
|
237
|
-
| `/morph-preflight` | Validação pre-deploy Azure |
|
|
238
|
-
| `/morph-troubleshoot {error}` | Troubleshooting de erros |
|
|
121
|
+
**MORPH outputs:** proposal, ui-design-system, ui-mockups, ui-components, ui-flows, spec, contracts.cs, decisions, tasks, recap
|
|
239
122
|
|
|
240
|
-
**
|
|
241
|
-
| Comando | Descrição |
|
|
242
|
-
|---------|-----------|
|
|
243
|
-
| `morph-spec init` | Inicializar MORPH no projeto |
|
|
244
|
-
| `morph-spec update` | Atualizar templates e standards |
|
|
245
|
-
| `morph-spec doctor` | Check de saúde |
|
|
246
|
-
|
|
247
|
-
### Framework Commands (Claude internal)
|
|
248
|
-
|
|
249
|
-
> Comandos usados pelo Claude automaticamente durante o workflow. Usuário NÃO precisa executar.
|
|
250
|
-
|
|
251
|
-
| Comando | Quando |
|
|
252
|
-
|---------|--------|
|
|
253
|
-
| `morph-spec detect-agents "{text}"` | Detectar agentes na proposta |
|
|
254
|
-
| `morph-spec state <action>` | Gerenciar state.json |
|
|
255
|
-
| `morph-spec task done/start/next` | Gerenciar tasks na implementação |
|
|
256
|
-
| `morph-spec phase advance {feature}` | Avançar entre fases |
|
|
257
|
-
| `morph-spec generate recap/design-system` | Gerar outputs |
|
|
258
|
-
| `morph-spec validate-phase {feature} {phase}` | Validar pré-requisitos |
|
|
259
|
-
| `morph-spec validate/validate-blazor/lint-fluent/...` | Validators |
|
|
260
|
-
| `morph-spec story create/shard/status` | Story-driven development |
|
|
261
|
-
|
|
262
|
-
### Internal Workflow Skills (auto-invoked by /morph-proposal)
|
|
263
|
-
|
|
264
|
-
| Skill | Fase | Path |
|
|
265
|
-
|-------|------|------|
|
|
266
|
-
| phase-setup | 1 | `.claude/skills/workflows/phase-setup.md` |
|
|
267
|
-
| phase-uiux | 1.5 | `.claude/skills/workflows/phase-uiux.md` |
|
|
268
|
-
| phase-design | 2 | `.claude/skills/workflows/phase-design.md` |
|
|
269
|
-
| phase-clarify | 3 | `.claude/skills/workflows/phase-clarify.md` |
|
|
270
|
-
| phase-tasks | 4 | `.claude/skills/workflows/phase-tasks.md` |
|
|
123
|
+
**Code:** service.cs, repository.cs, agent.cs, job.cs, test.cs
|
|
271
124
|
|
|
272
125
|
---
|
|
273
126
|
|
|
274
|
-
##
|
|
127
|
+
## COMANDOS
|
|
275
128
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
├── tasks.json # FASE 4
|
|
286
|
-
├── decisions.md # FASE 2+ (acumulativo)
|
|
287
|
-
└── recap.md # FASE 5
|
|
288
|
-
```
|
|
129
|
+
| Comando | Ação |
|
|
130
|
+
|---------|------|
|
|
131
|
+
| `/morph-proposal {feature}` | Spec pipeline completo (fases 0-4, auto-continuação com pausas) |
|
|
132
|
+
| `/morph-apply {feature}` | Implementar feature (fase 5) |
|
|
133
|
+
| `/morph-status` | Dashboard |
|
|
134
|
+
| `/morph-archive {feature}` | Arquivar feature concluída |
|
|
135
|
+
| `/morph-infra {action}` | Gerenciar infra Bicep |
|
|
136
|
+
| `/morph-preflight` | Validação pre-deploy Azure |
|
|
137
|
+
| `/morph-troubleshoot {error}` | Troubleshooting de erros |
|
|
289
138
|
|
|
290
139
|
---
|
|
291
140
|
|
|
292
141
|
## REFERÊNCIAS
|
|
293
142
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
- `content/.morph/templates/` - Source (NPM package)
|
|
299
|
-
- `.morph/templates/` - No projeto consumidor (editável, copiado pelo `init`)
|
|
300
|
-
|
|
301
|
-
### Project Context
|
|
302
|
-
`.morph/project/context/README.md` | `.morph/project/standards/inferred.md` | `.morph/project/standards/*.md` | `.morph/config.json`
|
|
303
|
-
|
|
304
|
-
### Skills
|
|
305
|
-
- `workflows/` - phase-setup, phase-uiux, phase-design, phase-clarify, phase-tasks, morph-replicate
|
|
306
|
-
- `checklists/` - morph-checklist, simulation-checklist, code-review
|
|
307
|
-
- `integrations/` - asaas-financial, clerk-auth, azure-identity, resend-email
|
|
308
|
-
- `specialists/` - dotnet-senior, code-analyzer, ui-ux-designer, ai-system-architect, ef-modeler, hangfire-orchestrator, testing-specialist, etc.
|
|
309
|
-
- `stacks/` - dotnet-blazor, dotnet-nextjs
|
|
310
|
-
- `infra/` - bicep-architect, devops-engineer, container-specialist
|
|
143
|
+
- `.morph/project.md` — Contexto do projeto
|
|
144
|
+
- `.morph/standards/` — coding, architecture, azure
|
|
145
|
+
- `.morph/templates/` — Templates para outputs
|
|
146
|
+
- `.morph/config/agents.json` — Agentes
|
|
311
147
|
|
|
312
148
|
---
|
|
313
149
|
|
package/bin/morph-spec.js
CHANGED
|
@@ -18,6 +18,7 @@ import { sprintStatusCommand } from '../src/commands/sprint-status.js';
|
|
|
18
18
|
import { stateCommand } from '../src/commands/state.js';
|
|
19
19
|
import { taskDoneCommand, taskStartCommand, taskNextCommand } from '../src/commands/task.js';
|
|
20
20
|
import { generateDesignSystemCommand } from '../src/commands/generate.js';
|
|
21
|
+
import { generateContextCommand } from '../src/commands/generate-context.js';
|
|
21
22
|
import { validateCommand } from './validate.js';
|
|
22
23
|
import { validateBlazorCommand } from '../src/commands/validate-blazor.js';
|
|
23
24
|
import { lintFluentCommand } from '../src/commands/lint-fluent.js';
|
|
@@ -179,6 +180,13 @@ generateCommand
|
|
|
179
180
|
await generateRecap('.', feature, options);
|
|
180
181
|
});
|
|
181
182
|
|
|
183
|
+
generateCommand
|
|
184
|
+
.command('context [feature]')
|
|
185
|
+
.description('Generate CONTEXT.md with full project data for Claude Code')
|
|
186
|
+
.action(async (feature) => {
|
|
187
|
+
await generateContextCommand('.', feature);
|
|
188
|
+
});
|
|
189
|
+
|
|
182
190
|
// Validation commands (Sprint 4: Continuous Validation)
|
|
183
191
|
program
|
|
184
192
|
.command('validate [validator]')
|