@onion-architect-ai/cli 4.1.0-beta.1 → 4.1.0-beta.2
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/dist/cli.js +8 -7
- package/dist/cli.js.map +1 -1
- package/package.json +4 -3
- package/templates/.cursor/agents/compliance/iso-22301-specialist.md +917 -0
- package/templates/.cursor/agents/compliance/iso-27001-specialist.md +641 -0
- package/templates/.cursor/agents/compliance/pmbok-specialist.md +669 -0
- package/templates/.cursor/agents/compliance/security-information-master.md +824 -0
- package/templates/.cursor/agents/compliance/soc2-specialist.md +818 -0
- package/templates/.cursor/agents/deployment/docker-specialist.md +1192 -0
- package/templates/.cursor/agents/meta/agent-creator-specialist.md +1135 -0
- package/templates/.cursor/agents/meta/command-creator-specialist.md +1519 -0
- package/templates/.cursor/agents/meta/metaspec-gate-keeper.md +240 -0
- package/templates/.cursor/agents/meta/onion.md +753 -0
- package/templates/.cursor/agents/research/research-agent.md +292 -0
- package/templates/.cursor/agents/review/corporate-compliance-specialist.md +370 -0
- package/templates/.cursor/commands/common/prompts/README.md +187 -0
- package/templates/.cursor/commands/common/prompts/clickup-patterns.md +144 -0
- package/templates/.cursor/commands/common/prompts/code-review-checklist.md +168 -0
- package/templates/.cursor/commands/common/prompts/git-workflow-patterns.md +235 -0
- package/templates/.cursor/commands/common/prompts/output-formats.md +240 -0
- package/templates/.cursor/commands/common/prompts/technical.md +172 -0
- package/templates/.cursor/commands/common/prompts/validation-rules.md +173 -0
- package/templates/.cursor/commands/common/templates/abstraction-template.md +400 -0
- package/templates/.cursor/commands/common/templates/agent-template.md +353 -0
- package/templates/.cursor/commands/common/templates/business_context_template.md +748 -0
- package/templates/.cursor/commands/common/templates/command-template.md +273 -0
- package/templates/.cursor/commands/common/templates/technical_context_template.md +526 -0
- package/templates/.cursor/commands/development/runflow-dev.md +465 -0
- package/templates/.cursor/commands/docs/build-compliance-docs.md +143 -0
- package/templates/.cursor/commands/git/README.md +606 -0
- package/templates/.cursor/commands/meta/all-tools.md +50 -0
- package/templates/.cursor/commands/meta/analyze-complex-problem.md +186 -0
- package/templates/.cursor/commands/meta/create-abstraction.md +859 -0
- package/templates/.cursor/commands/meta/create-agent-express.md +83 -0
- package/templates/.cursor/commands/meta/create-agent.md +210 -0
- package/templates/.cursor/commands/meta/create-command.md +203 -0
- package/templates/.cursor/commands/meta/create-knowledge-base.md +143 -0
- package/templates/.cursor/commands/meta/create-task-structure.md +150 -0
- package/templates/.cursor/commands/meta/setup-integration.md +257 -0
- package/templates/.cursor/commands/onion/setup.md +843 -0
- package/templates/.cursor/commands/onion.md +168 -0
- package/templates/.cursor/commands/product/README.md +230 -0
- package/templates/.cursor/commands/quick/analisys.md +17 -0
- package/templates/.cursor/commands/validate/collab/pair-testing.md +633 -0
- package/templates/.cursor/commands/validate/collab/three-amigos.md +505 -0
- package/templates/.cursor/commands/validate/qa-points/estimate.md +660 -0
- package/templates/.cursor/commands/validate/test-strategy/analyze.md +1134 -0
- package/templates/.cursor/commands/validate/test-strategy/create.md +392 -0
- package/templates/.cursor/commands/validate/workflow.md +360 -0
- package/templates/.cursor/commands/warm-up.md +91 -0
- package/templates/.cursor/docs/architecture/acoplamento-clickup-problema-analise.md +446 -0
- package/templates/.cursor/docs/architecture/desacoplamento-roadmap.md +360 -0
- package/templates/.cursor/docs/architecture/validacao-fase-1.md +219 -0
- package/templates/.cursor/docs/c4/c4-detection-rules.md +395 -0
- package/templates/.cursor/docs/c4/c4-documentation-templates.md +579 -0
- package/templates/.cursor/docs/c4/c4-mermaid-patterns.md +331 -0
- package/templates/.cursor/docs/c4/c4-templates.md +256 -0
- package/templates/.cursor/docs/clickup/clickup-acceptance-criteria-strategy.md +329 -0
- package/templates/.cursor/docs/clickup/clickup-auto-update-strategy.md +318 -0
- package/templates/.cursor/docs/clickup/clickup-comment-formatter.md +239 -0
- package/templates/.cursor/docs/clickup/clickup-description-fix.md +355 -0
- package/templates/.cursor/docs/clickup/clickup-dual-comment-strategy.md +505 -0
- package/templates/.cursor/docs/clickup/clickup-formatting.md +302 -0
- package/templates/.cursor/docs/clickup/separador-tamanho-otimizado.md +256 -0
- package/templates/.cursor/docs/engineer/pre-pr-acceptance-validation.md +256 -0
- package/templates/.cursor/docs/onion/ESPERANTO.md +278 -0
- package/templates/.cursor/docs/onion/agents-reference.md +832 -0
- package/templates/.cursor/docs/onion/clickup-integration.md +738 -0
- package/templates/.cursor/docs/onion/commands-guide.md +807 -0
- package/templates/.cursor/docs/onion/engineering-flows.md +865 -0
- package/templates/.cursor/docs/onion/getting-started.md +741 -0
- package/templates/.cursor/docs/onion/maintenance-checklist.md +388 -0
- package/templates/.cursor/docs/onion/naming-conventions.md +268 -0
- package/templates/.cursor/docs/onion/practical-examples.md +782 -0
- package/templates/.cursor/docs/product/story-points-integration.md +254 -0
- package/templates/.cursor/docs/product/story-points-validation.md +224 -0
- package/templates/.cursor/docs/reviews/task-manager-docs-review-2025-11-24.md +167 -0
- package/templates/.cursor/docs/strategies/clickup-comment-patterns.md +766 -0
- package/templates/.cursor/docs/strategies/clickup-integration-tests.md +599 -0
- package/templates/.cursor/docs/strategies/clickup-mcp-wrappers-tests.md +854 -0
- package/templates/.cursor/docs/strategies/clickup-regression-tests.md +589 -0
- package/templates/.cursor/docs/strategies/visual-patterns.md +308 -0
- package/templates/.cursor/docs/templates/README.md +624 -0
- package/templates/.cursor/docs/templates/adr-template.md +226 -0
- package/templates/.cursor/docs/templates/analysis-template.md +280 -0
- package/templates/.cursor/docs/templates/execution-plan-template.md +430 -0
- package/templates/.cursor/docs/templates/guide-template.md +367 -0
- package/templates/.cursor/docs/templates/phase-execution-prompt-template.md +504 -0
- package/templates/.cursor/docs/templates/reference-template.md +522 -0
- package/templates/.cursor/docs/templates/solution-template.md +390 -0
- package/templates/.cursor/docs/tools/README.md +325 -0
- package/templates/.cursor/docs/tools/agents.md +330 -0
- package/templates/.cursor/docs/tools/commands.md +606 -0
- package/templates/.cursor/docs/tools/cursor.md +498 -0
- package/templates/.cursor/docs/tools/mcps.md +858 -0
- package/templates/.cursor/docs/tools/rules.md +423 -0
- package/templates/.cursor/rules/language-and-documentation.mdc +371 -0
- package/templates/.cursor/rules/onion-patterns.mdc +197 -0
- package/templates/.cursor/rules/validation-rules.mdc +194 -0
- package/templates/.cursor/utils/clickup-mcp-wrappers.md +671 -0
- package/templates/.cursor/utils/date-time-standards.md +182 -0
- package/templates/.cursor/utils/task-manager/README.md +94 -0
- package/templates/.cursor/utils/task-manager/adapters/asana.md +377 -0
- package/templates/.cursor/utils/task-manager/adapters/clickup.md +467 -0
- package/templates/.cursor/utils/task-manager/adapters/linear.md +421 -0
- package/templates/.cursor/utils/task-manager/detector.md +290 -0
- package/templates/.cursor/utils/task-manager/factory.md +363 -0
- package/templates/.cursor/utils/task-manager/interface.md +248 -0
- package/templates/.cursor/utils/task-manager/types.md +409 -0
- package/templates/.cursor/validation/product-task-validation.md +344 -0
- package/templates/.onion/contexts/business/.context-config.yml +52 -0
- package/templates/.onion/contexts/business/README.md +222 -0
- package/templates/.onion/contexts/business/agents/branding-specialist.md +1030 -0
- package/templates/.onion/contexts/business/agents/clickup-specialist.md +397 -0
- package/templates/.onion/contexts/business/agents/extract-meeting-specialist.md +395 -0
- package/templates/.onion/contexts/business/agents/gamma-specialist.md +1169 -0
- package/templates/.onion/contexts/business/agents/meeting-consolidator.md +483 -0
- package/templates/.onion/contexts/business/agents/pain-price-specialist.md +509 -0
- package/templates/.onion/contexts/business/agents/presentation-orchestrator.md +1191 -0
- package/templates/.onion/contexts/business/agents/product-agent.md +202 -0
- package/templates/.onion/contexts/business/agents/story-points-specialist.md +539 -0
- package/templates/.onion/contexts/business/agents/storytelling-specialist.md +891 -0
- package/templates/.onion/contexts/business/agents/task-specialist.md +618 -0
- package/templates/.onion/contexts/business/agents/whisper-specialist.md +373 -0
- package/templates/.onion/contexts/business/commands/advanced/analyze-pain-price.md +709 -0
- package/templates/.onion/contexts/business/commands/advanced/branding.md +460 -0
- package/templates/.onion/contexts/business/commands/advanced/checklist-sync.md +241 -0
- package/templates/.onion/contexts/business/commands/advanced/presentation.md +189 -0
- package/templates/.onion/contexts/business/commands/advanced/transform-consolidated.md +592 -0
- package/templates/.onion/contexts/business/commands/help.md +212 -0
- package/templates/.onion/contexts/business/commands/intermediate/check.md +48 -0
- package/templates/.onion/contexts/business/commands/intermediate/collect.md +96 -0
- package/templates/.onion/contexts/business/commands/intermediate/consolidate-meetings.md +306 -0
- package/templates/.onion/contexts/business/commands/intermediate/convert-to-tasks.md +220 -0
- package/templates/.onion/contexts/business/commands/intermediate/extract-meeting.md +241 -0
- package/templates/.onion/contexts/business/commands/intermediate/feature.md +431 -0
- package/templates/.onion/contexts/business/commands/intermediate/light-arch.md +97 -0
- package/templates/.onion/contexts/business/commands/intermediate/task-check.md +340 -0
- package/templates/.onion/contexts/business/commands/intermediate/validate-task.md +294 -0
- package/templates/.onion/contexts/business/commands/intermediate/whisper.md +325 -0
- package/templates/.onion/contexts/business/commands/starter/estimate.md +519 -0
- package/templates/.onion/contexts/business/commands/starter/refine.md +186 -0
- package/templates/.onion/contexts/business/commands/starter/spec.md +107 -0
- package/templates/.onion/contexts/business/commands/starter/task.md +585 -0
- package/templates/.onion/contexts/business/commands/starter/warm-up.md +187 -0
- package/templates/.onion/contexts/technical/.context-config.yml +64 -0
- package/templates/.onion/contexts/technical/README.md +238 -0
- package/templates/.onion/contexts/technical/agents/branch-code-reviewer.md +200 -0
- package/templates/.onion/contexts/technical/agents/branch-doc-writer.md +162 -0
- package/templates/.onion/contexts/technical/agents/branch-metaspec-checker.md +68 -0
- package/templates/.onion/contexts/technical/agents/branch-test-planner.md +177 -0
- package/templates/.onion/contexts/technical/agents/c4-architecture-specialist.md +712 -0
- package/templates/.onion/contexts/technical/agents/c4-documentation-specialist.md +658 -0
- package/templates/.onion/contexts/technical/agents/code-reviewer.md +155 -0
- package/templates/.onion/contexts/technical/agents/cursor-specialist.md +249 -0
- package/templates/.onion/contexts/technical/agents/docs-reverse-engineer.md +418 -0
- package/templates/.onion/contexts/technical/agents/gitflow-specialist.md +1207 -0
- package/templates/.onion/contexts/technical/agents/linux-security-specialist.md +676 -0
- package/templates/.onion/contexts/technical/agents/mermaid-specialist.md +516 -0
- package/templates/.onion/contexts/technical/agents/nodejs-specialist.md +673 -0
- package/templates/.onion/contexts/technical/agents/nx-migration-specialist.md +867 -0
- package/templates/.onion/contexts/technical/agents/nx-monorepo-specialist.md +619 -0
- package/templates/.onion/contexts/technical/agents/postgres-specialist.md +1124 -0
- package/templates/.onion/contexts/technical/agents/react-developer.md +132 -0
- package/templates/.onion/contexts/technical/agents/runflow-specialist.md +278 -0
- package/templates/.onion/contexts/technical/agents/system-doc-orchestrator.md +1388 -0
- package/templates/.onion/contexts/technical/agents/test-agent.md +425 -0
- package/templates/.onion/contexts/technical/agents/test-engineer.md +295 -0
- package/templates/.onion/contexts/technical/agents/test-planner.md +118 -0
- package/templates/.onion/contexts/technical/agents/zen-engine-specialist.md +421 -0
- package/templates/.onion/contexts/technical/commands/advanced/bump.md +43 -0
- package/templates/.onion/contexts/technical/commands/advanced/consolidate-documents.md +424 -0
- package/templates/.onion/contexts/technical/commands/advanced/e2e.md +392 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-finish.md +90 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-publish.md +91 -0
- package/templates/.onion/contexts/technical/commands/advanced/feature-start.md +158 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix-finish.md +98 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix-start.md +94 -0
- package/templates/.onion/contexts/technical/commands/advanced/hotfix.md +186 -0
- package/templates/.onion/contexts/technical/commands/advanced/refine-vision.md +27 -0
- package/templates/.onion/contexts/technical/commands/advanced/release-finish.md +98 -0
- package/templates/.onion/contexts/technical/commands/advanced/release-start.md +95 -0
- package/templates/.onion/contexts/technical/commands/advanced/reverse-consolidate.md +160 -0
- package/templates/.onion/contexts/technical/commands/advanced/validate-phase-sync.md +118 -0
- package/templates/.onion/contexts/technical/commands/help.md +329 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-business-docs.md +276 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-index.md +128 -0
- package/templates/.onion/contexts/technical/commands/intermediate/build-tech-docs.md +204 -0
- package/templates/.onion/contexts/technical/commands/intermediate/code-review.md +215 -0
- package/templates/.onion/contexts/technical/commands/intermediate/docs-health.md +142 -0
- package/templates/.onion/contexts/technical/commands/intermediate/fast-commit.md +45 -0
- package/templates/.onion/contexts/technical/commands/intermediate/integration.md +523 -0
- package/templates/.onion/contexts/technical/commands/intermediate/pr-update.md +198 -0
- package/templates/.onion/contexts/technical/commands/intermediate/pre-pr.md +91 -0
- package/templates/.onion/contexts/technical/commands/intermediate/start.md +266 -0
- package/templates/.onion/contexts/technical/commands/intermediate/sync-sessions.md +320 -0
- package/templates/.onion/contexts/technical/commands/intermediate/unit.md +378 -0
- package/templates/.onion/contexts/technical/commands/intermediate/validate-docs.md +159 -0
- package/templates/.onion/contexts/technical/commands/starter/docs.md +39 -0
- package/templates/.onion/contexts/technical/commands/starter/help.md +306 -0
- package/templates/.onion/contexts/technical/commands/starter/init.md +139 -0
- package/templates/.onion/contexts/technical/commands/starter/plan.md +111 -0
- package/templates/.onion/contexts/technical/commands/starter/pr.md +136 -0
- package/templates/.onion/contexts/technical/commands/starter/sync.md +228 -0
- package/templates/.onion/contexts/technical/commands/starter/warm-up.md +173 -0
- package/templates/.onion/contexts/technical/commands/starter/work.md +169 -0
- package/templates/.onion/core/commands/help.md +388 -0
|
@@ -0,0 +1,624 @@
|
|
|
1
|
+
# 📋 Templates do Sistema Onion
|
|
2
|
+
|
|
3
|
+
> Templates estruturados com YAML front matter para Cursor v2 - Documentação, execução e decisões arquiteturais.
|
|
4
|
+
|
|
5
|
+
## 📑 Índice
|
|
6
|
+
|
|
7
|
+
- [Visão Geral](#visão-geral)
|
|
8
|
+
- [Templates Disponíveis](#templates-disponíveis)
|
|
9
|
+
- [Como Usar](#como-usar)
|
|
10
|
+
- [YAML Front Matter](#yaml-front-matter)
|
|
11
|
+
- [Casos de Uso](#casos-de-uso)
|
|
12
|
+
- [Melhores Práticas](#melhores-práticas)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 🎯 Visão Geral
|
|
17
|
+
|
|
18
|
+
Este diretório contém templates estruturados para documentação e execução no Sistema Onion. Todos os templates utilizam **YAML front matter v2.0** para metadados parseáveis e integração com Cursor IDE.
|
|
19
|
+
|
|
20
|
+
### ✨ Características Principais
|
|
21
|
+
|
|
22
|
+
- 🤖 **Parseável** - Metadata estruturada em YAML
|
|
23
|
+
- 📊 **Rastreável** - Status, progresso e métricas automatizadas
|
|
24
|
+
- 🔍 **Searchable** - Busca e filtros avançados
|
|
25
|
+
- ✅ **Validável** - Schema validation disponível
|
|
26
|
+
- 🚀 **AI-ready** - Integração com AI assistants
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 📚 Templates Disponíveis
|
|
31
|
+
|
|
32
|
+
### 🔧 Execução e Implementação
|
|
33
|
+
|
|
34
|
+
#### 1. **execution-plan-template.md**
|
|
35
|
+
```yaml
|
|
36
|
+
type: execution-plan
|
|
37
|
+
category: implementation
|
|
38
|
+
complexity: Alta (89 linhas YAML)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Uso:** Planos completos de implementação/migração com fases detalhadas
|
|
42
|
+
|
|
43
|
+
**Principais Seções:**
|
|
44
|
+
- Context (estado atual, base tecnológica)
|
|
45
|
+
- Usage (instruções de uso)
|
|
46
|
+
- Standards (status de tarefas, commits, comandos)
|
|
47
|
+
- Critical Attention (avisos críticos)
|
|
48
|
+
- Milestones (marcos por fase)
|
|
49
|
+
- Success Metrics (métricas estruturadas)
|
|
50
|
+
|
|
51
|
+
**Quando usar:**
|
|
52
|
+
- ✅ Implementações complexas multi-fase
|
|
53
|
+
- ✅ Migrações de sistemas
|
|
54
|
+
- ✅ Projetos com >10h de trabalho
|
|
55
|
+
- ✅ Precisa tracking detalhado de progresso
|
|
56
|
+
|
|
57
|
+
**Exemplo:**
|
|
58
|
+
```yaml
|
|
59
|
+
---
|
|
60
|
+
template:
|
|
61
|
+
type: execution-plan
|
|
62
|
+
version: 2.0
|
|
63
|
+
category: implementation
|
|
64
|
+
|
|
65
|
+
context:
|
|
66
|
+
current_state: "Sistema 67% implementado"
|
|
67
|
+
base: "React 18, TypeScript, TailwindCSS"
|
|
68
|
+
|
|
69
|
+
success_metrics:
|
|
70
|
+
- metric: "📊 Performance"
|
|
71
|
+
target: "< 200ms"
|
|
72
|
+
criteria: "P95 response time"
|
|
73
|
+
---
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
#### 2. **phase-execution-prompt-template.md**
|
|
79
|
+
```yaml
|
|
80
|
+
type: phase-execution-prompt
|
|
81
|
+
category: execution
|
|
82
|
+
complexity: Alta (84 linhas YAML)
|
|
83
|
+
architectural_pattern: Incluído
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Uso:** Execução sistemática de fases específicas de projeto
|
|
87
|
+
|
|
88
|
+
**Principais Seções:**
|
|
89
|
+
- Context (estado da fase, padrão arquitetural)
|
|
90
|
+
- Usage (instruções passo a passo)
|
|
91
|
+
- Standards (validação, documentação)
|
|
92
|
+
- Critical Attention (validações obrigatórias)
|
|
93
|
+
- Validation Criteria (critérios de sucesso)
|
|
94
|
+
|
|
95
|
+
**Quando usar:**
|
|
96
|
+
- ✅ Executar fase específica de projeto maior
|
|
97
|
+
- ✅ Seguir padrão arquitetural rigoroso
|
|
98
|
+
- ✅ Validações complexas necessárias
|
|
99
|
+
- ✅ Conformidade com metodologia
|
|
100
|
+
|
|
101
|
+
**Diferencial:**
|
|
102
|
+
- Foco em **validação rigorosa**
|
|
103
|
+
- **Architectural pattern** compliance
|
|
104
|
+
- **Checkpoint system** estruturado
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
### 📝 Documentação
|
|
109
|
+
|
|
110
|
+
#### 3. **guide-template.md**
|
|
111
|
+
```yaml
|
|
112
|
+
type: guide
|
|
113
|
+
category: documentation
|
|
114
|
+
complexity: Baixa (27 linhas YAML)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Uso:** Guias de implementação, arquitetura, setup ou troubleshooting
|
|
118
|
+
|
|
119
|
+
**Principais Seções:**
|
|
120
|
+
- Context (sistema, objetivo, casos de uso)
|
|
121
|
+
- Guide Metadata (tipo, público-alvo, dificuldade)
|
|
122
|
+
|
|
123
|
+
**Quando usar:**
|
|
124
|
+
- ✅ Criar documentação de referência
|
|
125
|
+
- ✅ Guias passo a passo
|
|
126
|
+
- ✅ Onboarding de desenvolvedores
|
|
127
|
+
- ✅ Troubleshooting guides
|
|
128
|
+
|
|
129
|
+
**Tipos de guia:**
|
|
130
|
+
- Implementação
|
|
131
|
+
- Arquitetura
|
|
132
|
+
- Build/Setup
|
|
133
|
+
- Troubleshooting
|
|
134
|
+
- Integração
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
#### 4. **analysis-template.md**
|
|
139
|
+
```yaml
|
|
140
|
+
type: analysis
|
|
141
|
+
category: documentation
|
|
142
|
+
complexity: Média (52 linhas YAML)
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Uso:** Análises críticas, de implementação ou status de sistemas
|
|
146
|
+
|
|
147
|
+
**Principais Seções:**
|
|
148
|
+
- Analysis Metadata (tipo, analista, escopo)
|
|
149
|
+
- Severity Config (níveis crítico/alto/médio)
|
|
150
|
+
- Status (overall, completion, actions, risks)
|
|
151
|
+
- Tracking (fases, métricas)
|
|
152
|
+
|
|
153
|
+
**Quando usar:**
|
|
154
|
+
- ✅ Análise de status de projeto
|
|
155
|
+
- ✅ Identificar gaps e problemas
|
|
156
|
+
- ✅ Priorizar ações corretivas
|
|
157
|
+
- ✅ Reportar progresso
|
|
158
|
+
|
|
159
|
+
**Capacidades AI:**
|
|
160
|
+
- Auto-status calculation
|
|
161
|
+
- Action tracking
|
|
162
|
+
- Metrics monitoring
|
|
163
|
+
- Risk prioritization
|
|
164
|
+
- Solution suggestions
|
|
165
|
+
|
|
166
|
+
**Exemplo de uso:**
|
|
167
|
+
```yaml
|
|
168
|
+
---
|
|
169
|
+
status:
|
|
170
|
+
overall: "CRÍTICO"
|
|
171
|
+
completion_percentage: 67
|
|
172
|
+
critical_actions: 5
|
|
173
|
+
risks_identified: 12
|
|
174
|
+
|
|
175
|
+
tracking:
|
|
176
|
+
metrics:
|
|
177
|
+
- name: "Test Coverage"
|
|
178
|
+
current: "45%"
|
|
179
|
+
expected: "80%"
|
|
180
|
+
status: "CRITICAL"
|
|
181
|
+
---
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
#### 5. **reference-template.md**
|
|
187
|
+
```yaml
|
|
188
|
+
type: reference
|
|
189
|
+
category: documentation
|
|
190
|
+
complexity: Baixa
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**Uso:** Documentação de referência (API, CLI, Configuration, Schema)
|
|
194
|
+
|
|
195
|
+
**Quando usar:**
|
|
196
|
+
- ✅ Documentar APIs
|
|
197
|
+
- ✅ Referência de CLI
|
|
198
|
+
- ✅ Schemas e configurações
|
|
199
|
+
- ✅ Quick reference guides
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
#### 6. **solution-template.md**
|
|
204
|
+
```yaml
|
|
205
|
+
type: solution
|
|
206
|
+
category: troubleshooting
|
|
207
|
+
complexity: Baixa
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Uso:** Documentar soluções para problemas comuns
|
|
211
|
+
|
|
212
|
+
**Quando usar:**
|
|
213
|
+
- ✅ Problemas recorrentes
|
|
214
|
+
- ✅ Erros de build/runtime
|
|
215
|
+
- ✅ Knowledge base
|
|
216
|
+
- ✅ AI-searchable solutions
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
### 🏛️ Arquitetura e Decisões
|
|
221
|
+
|
|
222
|
+
#### 7. **adr-template.md**
|
|
223
|
+
```yaml
|
|
224
|
+
type: adr
|
|
225
|
+
category: architecture-decision
|
|
226
|
+
complexity: Média (65 linhas YAML)
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
**Uso:** Architecture Decision Records (ADR) estruturados
|
|
230
|
+
|
|
231
|
+
**Principais Seções:**
|
|
232
|
+
- Decision Metadata (status, data, deciders)
|
|
233
|
+
- Quality Attributes (performance, security, etc)
|
|
234
|
+
- Alternatives (alternativas consideradas)
|
|
235
|
+
- Decision Matrix (matriz de decisão)
|
|
236
|
+
- Consequences (positivas, negativas, neutras)
|
|
237
|
+
- Related Decisions (grafo de dependências)
|
|
238
|
+
|
|
239
|
+
**Quando usar:**
|
|
240
|
+
- ✅ Decisões arquiteturais importantes
|
|
241
|
+
- ✅ Mudanças de tecnologia
|
|
242
|
+
- ✅ Trade-offs significativos
|
|
243
|
+
- ✅ Decisões que impactam longo prazo
|
|
244
|
+
|
|
245
|
+
**Capacidades AI:**
|
|
246
|
+
- Suggest alternatives
|
|
247
|
+
- Validate consequences
|
|
248
|
+
- Track implementation
|
|
249
|
+
- Monitor metrics
|
|
250
|
+
- Build dependency graph
|
|
251
|
+
|
|
252
|
+
**Exemplo de grafo de dependências:**
|
|
253
|
+
```yaml
|
|
254
|
+
---
|
|
255
|
+
related_decisions:
|
|
256
|
+
supersedes: ["ADR-001", "ADR-003"]
|
|
257
|
+
superseded_by: []
|
|
258
|
+
relates_to: ["ADR-010", "ADR-012"]
|
|
259
|
+
impacts: ["ADR-015"]
|
|
260
|
+
---
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
**Status flow:**
|
|
264
|
+
```
|
|
265
|
+
Proposed → Accepted → [Superseded]
|
|
266
|
+
↓
|
|
267
|
+
Rejected
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## 🚀 Como Usar
|
|
273
|
+
|
|
274
|
+
### 1. Escolher Template Apropriado
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
# Para implementação complexa
|
|
278
|
+
cp execution-plan-template.md plano-migracao-v2.md
|
|
279
|
+
|
|
280
|
+
# Para fase específica
|
|
281
|
+
cp phase-execution-prompt-template.md fase-1-setup.md
|
|
282
|
+
|
|
283
|
+
# Para análise de sistema
|
|
284
|
+
cp analysis-template.md analise-arquitetura-atual.md
|
|
285
|
+
|
|
286
|
+
# Para decisão arquitetural
|
|
287
|
+
cp adr-template.md adr-001-escolha-framework.md
|
|
288
|
+
|
|
289
|
+
# Para guia
|
|
290
|
+
cp guide-template.md guia-setup-local.md
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### 2. Personalizar YAML Front Matter
|
|
294
|
+
|
|
295
|
+
```yaml
|
|
296
|
+
---
|
|
297
|
+
template:
|
|
298
|
+
type: execution-plan
|
|
299
|
+
version: 2.0
|
|
300
|
+
name: "Migração para React 19"
|
|
301
|
+
|
|
302
|
+
context:
|
|
303
|
+
system: "Sistema de Autenticação"
|
|
304
|
+
current_state: "React 18.2 - Migrando para 19"
|
|
305
|
+
base: "React 18, TypeScript, Vite"
|
|
306
|
+
|
|
307
|
+
success_metrics:
|
|
308
|
+
- metric: "Zero Breaking Changes"
|
|
309
|
+
target: "100%"
|
|
310
|
+
criteria: "All tests pass"
|
|
311
|
+
---
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### 3. Preencher Conteúdo
|
|
315
|
+
|
|
316
|
+
Siga as seções do template substituindo placeholders `[VARIÁVEL]` por valores reais.
|
|
317
|
+
|
|
318
|
+
### 4. Usar com AI Assistant
|
|
319
|
+
|
|
320
|
+
O Cursor v2 automaticamente:
|
|
321
|
+
- ✅ Parse YAML metadata
|
|
322
|
+
- ✅ Sugere próximos passos
|
|
323
|
+
- ✅ Valida completude
|
|
324
|
+
- ✅ Atualiza status
|
|
325
|
+
- ✅ Calcula progresso
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## 📊 YAML Front Matter
|
|
330
|
+
|
|
331
|
+
### Estrutura Base
|
|
332
|
+
|
|
333
|
+
Todos os templates seguem esta estrutura básica:
|
|
334
|
+
|
|
335
|
+
```yaml
|
|
336
|
+
---
|
|
337
|
+
# 1. TEMPLATE METADATA (obrigatório)
|
|
338
|
+
template:
|
|
339
|
+
type: string # Tipo do template
|
|
340
|
+
version: number # Sempre 2.0
|
|
341
|
+
category: string # Categoria
|
|
342
|
+
name: string # Nome descritivo
|
|
343
|
+
|
|
344
|
+
# 2. CONTEXT/METADATA ESPECÍFICA
|
|
345
|
+
# Varia por tipo de template
|
|
346
|
+
|
|
347
|
+
# 3. AI ASSISTANT CONFIG (opcional)
|
|
348
|
+
ai_assistant:
|
|
349
|
+
[flags específicas por template]
|
|
350
|
+
---
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### Tipos de Template
|
|
354
|
+
|
|
355
|
+
| Tipo | Category | Uso |
|
|
356
|
+
|------|----------|-----|
|
|
357
|
+
| `execution-plan` | implementation | Planos de implementação |
|
|
358
|
+
| `phase-execution-prompt` | execution | Fases específicas |
|
|
359
|
+
| `guide` | documentation | Guias e tutoriais |
|
|
360
|
+
| `analysis` | documentation | Análises de sistemas |
|
|
361
|
+
| `adr` | architecture-decision | Decisões arquiteturais |
|
|
362
|
+
| `reference` | documentation | Documentação de referência |
|
|
363
|
+
| `solution` | troubleshooting | Soluções de problemas |
|
|
364
|
+
|
|
365
|
+
### AI Assistant Flags
|
|
366
|
+
|
|
367
|
+
Flags comuns disponíveis:
|
|
368
|
+
|
|
369
|
+
```yaml
|
|
370
|
+
ai_assistant:
|
|
371
|
+
# Tracking e atualização
|
|
372
|
+
auto_update: boolean # Auto-atualizar metadata
|
|
373
|
+
track_progress: boolean # Rastrear progresso
|
|
374
|
+
track_validations: boolean # Rastrear validações
|
|
375
|
+
track_actions: boolean # Rastrear ações
|
|
376
|
+
|
|
377
|
+
# Execução e validação
|
|
378
|
+
enforce_sequence: boolean # Forçar sequência
|
|
379
|
+
monitor_compliance: boolean # Monitorar compliance
|
|
380
|
+
validate_metrics: boolean # Validar métricas
|
|
381
|
+
|
|
382
|
+
# AI features
|
|
383
|
+
suggest_alternatives: boolean # Sugerir alternativas
|
|
384
|
+
suggest_sections: boolean # Sugerir seções
|
|
385
|
+
suggest_solutions: boolean # Sugerir soluções
|
|
386
|
+
prioritize_risks: boolean # Priorizar riscos
|
|
387
|
+
|
|
388
|
+
# Grafo e relacionamentos
|
|
389
|
+
build_dependency_graph: boolean # Construir grafo
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
---
|
|
393
|
+
|
|
394
|
+
## 💡 Casos de Uso
|
|
395
|
+
|
|
396
|
+
### Caso 1: Implementação Multi-Fase
|
|
397
|
+
|
|
398
|
+
```yaml
|
|
399
|
+
# 1. Criar plano geral
|
|
400
|
+
execution-plan-template.md → plano-migracao-completa.md
|
|
401
|
+
|
|
402
|
+
# 2. Criar prompt para cada fase
|
|
403
|
+
phase-execution-prompt-template.md → fase-1-setup.md
|
|
404
|
+
phase-execution-prompt-template.md → fase-2-core.md
|
|
405
|
+
phase-execution-prompt-template.md → fase-3-integracao.md
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
### Caso 2: Análise e Correção
|
|
409
|
+
|
|
410
|
+
```yaml
|
|
411
|
+
# 1. Fazer análise
|
|
412
|
+
analysis-template.md → analise-sistema-atual.md
|
|
413
|
+
|
|
414
|
+
# 2. Documentar soluções encontradas
|
|
415
|
+
solution-template.md → solucao-problema-x.md
|
|
416
|
+
solution-template.md → solucao-problema-y.md
|
|
417
|
+
|
|
418
|
+
# 3. Criar plano de correção
|
|
419
|
+
execution-plan-template.md → plano-correcoes.md
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
### Caso 3: Decisão Arquitetural
|
|
423
|
+
|
|
424
|
+
```yaml
|
|
425
|
+
# 1. Documentar decisão
|
|
426
|
+
adr-template.md → adr-001-escolha-database.md
|
|
427
|
+
|
|
428
|
+
# 2. Criar guia de implementação
|
|
429
|
+
guide-template.md → guia-setup-postgres.md
|
|
430
|
+
|
|
431
|
+
# 3. Planejar implementação
|
|
432
|
+
execution-plan-template.md → plano-migracao-database.md
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
### Caso 4: Dashboard de Análises
|
|
436
|
+
|
|
437
|
+
```typescript
|
|
438
|
+
// Buscar análises críticas
|
|
439
|
+
const criticalAnalyses = loadTemplates()
|
|
440
|
+
.filter(t => t.template.type === 'analysis')
|
|
441
|
+
.filter(t => t.status.overall === 'CRÍTICO')
|
|
442
|
+
.sort((a, b) => b.status.critical_actions - a.status.critical_actions);
|
|
443
|
+
|
|
444
|
+
// Gerar relatório
|
|
445
|
+
console.log(`Total análises críticas: ${criticalAnalyses.length}`);
|
|
446
|
+
criticalAnalyses.forEach(a => {
|
|
447
|
+
console.log(`- ${a.analysis_metadata.base_document}`);
|
|
448
|
+
console.log(` Actions: ${a.status.critical_actions}`);
|
|
449
|
+
console.log(` Risks: ${a.status.risks_identified}`);
|
|
450
|
+
});
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
### Caso 5: Grafo de ADRs
|
|
454
|
+
|
|
455
|
+
```typescript
|
|
456
|
+
// Construir grafo de decisões
|
|
457
|
+
const adrs = loadTemplates()
|
|
458
|
+
.filter(t => t.template.type === 'adr');
|
|
459
|
+
|
|
460
|
+
const graph = adrs.map(adr => ({
|
|
461
|
+
id: adr.template.adr_number,
|
|
462
|
+
status: adr.decision_metadata.status,
|
|
463
|
+
supersedes: adr.related_decisions.supersedes,
|
|
464
|
+
supersededBy: adr.related_decisions.superseded_by
|
|
465
|
+
}));
|
|
466
|
+
|
|
467
|
+
// Encontrar ADRs obsoletos
|
|
468
|
+
const obsolete = graph.filter(adr =>
|
|
469
|
+
adr.supersededBy.length > 0
|
|
470
|
+
);
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
---
|
|
474
|
+
|
|
475
|
+
## ✅ Melhores Práticas
|
|
476
|
+
|
|
477
|
+
### 📝 Nomenclatura
|
|
478
|
+
|
|
479
|
+
```bash
|
|
480
|
+
# Bom
|
|
481
|
+
execution-plan-template.md → plano-migracao-react-19.md
|
|
482
|
+
adr-template.md → adr-001-escolha-state-management.md
|
|
483
|
+
analysis-template.md → analise-performance-2025-01.md
|
|
484
|
+
|
|
485
|
+
# Evitar
|
|
486
|
+
execution-plan-template.md → plano.md
|
|
487
|
+
adr-template.md → decisao.md
|
|
488
|
+
analysis-template.md → analise.md
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
### 🎯 Customização do YAML
|
|
492
|
+
|
|
493
|
+
```yaml
|
|
494
|
+
# ✅ Bom - Específico e mensurável
|
|
495
|
+
success_metrics:
|
|
496
|
+
- metric: "API Response Time"
|
|
497
|
+
target: "< 200ms"
|
|
498
|
+
criteria: "P95 under load"
|
|
499
|
+
|
|
500
|
+
# ❌ Evitar - Vago
|
|
501
|
+
success_metrics:
|
|
502
|
+
- metric: "Performance"
|
|
503
|
+
target: "Good"
|
|
504
|
+
criteria: "Fast enough"
|
|
505
|
+
```
|
|
506
|
+
|
|
507
|
+
### 📊 Status e Tracking
|
|
508
|
+
|
|
509
|
+
```yaml
|
|
510
|
+
# ✅ Bom - Atualizar regularmente
|
|
511
|
+
status:
|
|
512
|
+
overall: "BOM"
|
|
513
|
+
completion_percentage: 67
|
|
514
|
+
critical_actions: 2 # Reduzir a cada ação concluída
|
|
515
|
+
|
|
516
|
+
# ❌ Evitar - Deixar desatualizado
|
|
517
|
+
status:
|
|
518
|
+
overall: "BOM"
|
|
519
|
+
completion_percentage: 0 # Nunca atualizado
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
### 🔗 Relacionamentos
|
|
523
|
+
|
|
524
|
+
```yaml
|
|
525
|
+
# ✅ Bom - Documentar relacionamentos
|
|
526
|
+
related_decisions:
|
|
527
|
+
supersedes: ["ADR-001"]
|
|
528
|
+
relates_to: ["ADR-010", "ADR-015"]
|
|
529
|
+
|
|
530
|
+
# ❌ Evitar - Deixar vazio quando há relações
|
|
531
|
+
related_decisions:
|
|
532
|
+
supersedes: []
|
|
533
|
+
relates_to: []
|
|
534
|
+
```
|
|
535
|
+
|
|
536
|
+
---
|
|
537
|
+
|
|
538
|
+
## 🛠️ Ferramentas e Integração
|
|
539
|
+
|
|
540
|
+
### Validação YAML
|
|
541
|
+
|
|
542
|
+
```bash
|
|
543
|
+
# Validar syntax YAML
|
|
544
|
+
yamllint *.md
|
|
545
|
+
|
|
546
|
+
# Validar contra schema (se disponível)
|
|
547
|
+
ajv validate -s template-schema.json -d plano-*.md
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
### Busca Avançada
|
|
551
|
+
|
|
552
|
+
```bash
|
|
553
|
+
# Buscar templates por tipo
|
|
554
|
+
rg "type: execution-plan" --glob "*.md"
|
|
555
|
+
|
|
556
|
+
# Buscar análises críticas
|
|
557
|
+
rg "overall: \"CRÍTICO\"" --glob "*analysis*.md"
|
|
558
|
+
|
|
559
|
+
# Buscar ADRs aceitos
|
|
560
|
+
rg "status: \"Accepted\"" --glob "adr-*.md"
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
### Scripts Úteis
|
|
564
|
+
|
|
565
|
+
```bash
|
|
566
|
+
# Listar todos os templates por tipo
|
|
567
|
+
find . -name "*.md" -exec grep -l "template:" {} \; | \
|
|
568
|
+
xargs grep "type:" | sort
|
|
569
|
+
|
|
570
|
+
# Contar templates por categoria
|
|
571
|
+
rg "category: " --no-filename | sort | uniq -c
|
|
572
|
+
|
|
573
|
+
# Encontrar templates desatualizados (sem version 2.0)
|
|
574
|
+
rg "version: 1\." --glob "*.md"
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
---
|
|
578
|
+
|
|
579
|
+
## 📚 Recursos Adicionais
|
|
580
|
+
|
|
581
|
+
### Documentação
|
|
582
|
+
- [YAML Specification](https://yaml.org/spec/)
|
|
583
|
+
- [Cursor Documentation](https://cursor.sh/docs)
|
|
584
|
+
- [ADR Guidelines](https://adr.github.io/)
|
|
585
|
+
|
|
586
|
+
### Schema (futuro)
|
|
587
|
+
```bash
|
|
588
|
+
.cursor/docs/templates/schema/
|
|
589
|
+
├── template-base.schema.json
|
|
590
|
+
├── execution-plan.schema.json
|
|
591
|
+
├── adr.schema.json
|
|
592
|
+
└── analysis.schema.json
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
---
|
|
596
|
+
|
|
597
|
+
## 🎯 Quick Reference
|
|
598
|
+
|
|
599
|
+
| Preciso... | Use este template |
|
|
600
|
+
|-----------|------------------|
|
|
601
|
+
| 📋 Planejar implementação complexa | `execution-plan-template.md` |
|
|
602
|
+
| 🎯 Executar fase específica | `phase-execution-prompt-template.md` |
|
|
603
|
+
| 📝 Criar guia/tutorial | `guide-template.md` |
|
|
604
|
+
| 🔍 Analisar sistema | `analysis-template.md` |
|
|
605
|
+
| 🏛️ Documentar decisão arquitetural | `adr-template.md` |
|
|
606
|
+
| 📖 Documentar API/CLI | `reference-template.md` |
|
|
607
|
+
| 🔧 Documentar solução de problema | `solution-template.md` |
|
|
608
|
+
|
|
609
|
+
---
|
|
610
|
+
|
|
611
|
+
**📦 Total de Templates:** 7
|
|
612
|
+
**🎨 Versão YAML:** 2.0
|
|
613
|
+
**🤖 AI-Ready:** Todos
|
|
614
|
+
**📊 Última Atualização:** 2025-01-27
|
|
615
|
+
|
|
616
|
+
---
|
|
617
|
+
|
|
618
|
+
<div align="center">
|
|
619
|
+
|
|
620
|
+
**Sistema Onion** 🧅
|
|
621
|
+
*Templates estruturados para documentação e execução eficiente*
|
|
622
|
+
|
|
623
|
+
</div>
|
|
624
|
+
|