@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.
Files changed (207) hide show
  1. package/dist/cli.js +8 -7
  2. package/dist/cli.js.map +1 -1
  3. package/package.json +4 -3
  4. package/templates/.cursor/agents/compliance/iso-22301-specialist.md +917 -0
  5. package/templates/.cursor/agents/compliance/iso-27001-specialist.md +641 -0
  6. package/templates/.cursor/agents/compliance/pmbok-specialist.md +669 -0
  7. package/templates/.cursor/agents/compliance/security-information-master.md +824 -0
  8. package/templates/.cursor/agents/compliance/soc2-specialist.md +818 -0
  9. package/templates/.cursor/agents/deployment/docker-specialist.md +1192 -0
  10. package/templates/.cursor/agents/meta/agent-creator-specialist.md +1135 -0
  11. package/templates/.cursor/agents/meta/command-creator-specialist.md +1519 -0
  12. package/templates/.cursor/agents/meta/metaspec-gate-keeper.md +240 -0
  13. package/templates/.cursor/agents/meta/onion.md +753 -0
  14. package/templates/.cursor/agents/research/research-agent.md +292 -0
  15. package/templates/.cursor/agents/review/corporate-compliance-specialist.md +370 -0
  16. package/templates/.cursor/commands/common/prompts/README.md +187 -0
  17. package/templates/.cursor/commands/common/prompts/clickup-patterns.md +144 -0
  18. package/templates/.cursor/commands/common/prompts/code-review-checklist.md +168 -0
  19. package/templates/.cursor/commands/common/prompts/git-workflow-patterns.md +235 -0
  20. package/templates/.cursor/commands/common/prompts/output-formats.md +240 -0
  21. package/templates/.cursor/commands/common/prompts/technical.md +172 -0
  22. package/templates/.cursor/commands/common/prompts/validation-rules.md +173 -0
  23. package/templates/.cursor/commands/common/templates/abstraction-template.md +400 -0
  24. package/templates/.cursor/commands/common/templates/agent-template.md +353 -0
  25. package/templates/.cursor/commands/common/templates/business_context_template.md +748 -0
  26. package/templates/.cursor/commands/common/templates/command-template.md +273 -0
  27. package/templates/.cursor/commands/common/templates/technical_context_template.md +526 -0
  28. package/templates/.cursor/commands/development/runflow-dev.md +465 -0
  29. package/templates/.cursor/commands/docs/build-compliance-docs.md +143 -0
  30. package/templates/.cursor/commands/git/README.md +606 -0
  31. package/templates/.cursor/commands/meta/all-tools.md +50 -0
  32. package/templates/.cursor/commands/meta/analyze-complex-problem.md +186 -0
  33. package/templates/.cursor/commands/meta/create-abstraction.md +859 -0
  34. package/templates/.cursor/commands/meta/create-agent-express.md +83 -0
  35. package/templates/.cursor/commands/meta/create-agent.md +210 -0
  36. package/templates/.cursor/commands/meta/create-command.md +203 -0
  37. package/templates/.cursor/commands/meta/create-knowledge-base.md +143 -0
  38. package/templates/.cursor/commands/meta/create-task-structure.md +150 -0
  39. package/templates/.cursor/commands/meta/setup-integration.md +257 -0
  40. package/templates/.cursor/commands/onion/setup.md +843 -0
  41. package/templates/.cursor/commands/onion.md +168 -0
  42. package/templates/.cursor/commands/product/README.md +230 -0
  43. package/templates/.cursor/commands/quick/analisys.md +17 -0
  44. package/templates/.cursor/commands/validate/collab/pair-testing.md +633 -0
  45. package/templates/.cursor/commands/validate/collab/three-amigos.md +505 -0
  46. package/templates/.cursor/commands/validate/qa-points/estimate.md +660 -0
  47. package/templates/.cursor/commands/validate/test-strategy/analyze.md +1134 -0
  48. package/templates/.cursor/commands/validate/test-strategy/create.md +392 -0
  49. package/templates/.cursor/commands/validate/workflow.md +360 -0
  50. package/templates/.cursor/commands/warm-up.md +91 -0
  51. package/templates/.cursor/docs/architecture/acoplamento-clickup-problema-analise.md +446 -0
  52. package/templates/.cursor/docs/architecture/desacoplamento-roadmap.md +360 -0
  53. package/templates/.cursor/docs/architecture/validacao-fase-1.md +219 -0
  54. package/templates/.cursor/docs/c4/c4-detection-rules.md +395 -0
  55. package/templates/.cursor/docs/c4/c4-documentation-templates.md +579 -0
  56. package/templates/.cursor/docs/c4/c4-mermaid-patterns.md +331 -0
  57. package/templates/.cursor/docs/c4/c4-templates.md +256 -0
  58. package/templates/.cursor/docs/clickup/clickup-acceptance-criteria-strategy.md +329 -0
  59. package/templates/.cursor/docs/clickup/clickup-auto-update-strategy.md +318 -0
  60. package/templates/.cursor/docs/clickup/clickup-comment-formatter.md +239 -0
  61. package/templates/.cursor/docs/clickup/clickup-description-fix.md +355 -0
  62. package/templates/.cursor/docs/clickup/clickup-dual-comment-strategy.md +505 -0
  63. package/templates/.cursor/docs/clickup/clickup-formatting.md +302 -0
  64. package/templates/.cursor/docs/clickup/separador-tamanho-otimizado.md +256 -0
  65. package/templates/.cursor/docs/engineer/pre-pr-acceptance-validation.md +256 -0
  66. package/templates/.cursor/docs/onion/ESPERANTO.md +278 -0
  67. package/templates/.cursor/docs/onion/agents-reference.md +832 -0
  68. package/templates/.cursor/docs/onion/clickup-integration.md +738 -0
  69. package/templates/.cursor/docs/onion/commands-guide.md +807 -0
  70. package/templates/.cursor/docs/onion/engineering-flows.md +865 -0
  71. package/templates/.cursor/docs/onion/getting-started.md +741 -0
  72. package/templates/.cursor/docs/onion/maintenance-checklist.md +388 -0
  73. package/templates/.cursor/docs/onion/naming-conventions.md +268 -0
  74. package/templates/.cursor/docs/onion/practical-examples.md +782 -0
  75. package/templates/.cursor/docs/product/story-points-integration.md +254 -0
  76. package/templates/.cursor/docs/product/story-points-validation.md +224 -0
  77. package/templates/.cursor/docs/reviews/task-manager-docs-review-2025-11-24.md +167 -0
  78. package/templates/.cursor/docs/strategies/clickup-comment-patterns.md +766 -0
  79. package/templates/.cursor/docs/strategies/clickup-integration-tests.md +599 -0
  80. package/templates/.cursor/docs/strategies/clickup-mcp-wrappers-tests.md +854 -0
  81. package/templates/.cursor/docs/strategies/clickup-regression-tests.md +589 -0
  82. package/templates/.cursor/docs/strategies/visual-patterns.md +308 -0
  83. package/templates/.cursor/docs/templates/README.md +624 -0
  84. package/templates/.cursor/docs/templates/adr-template.md +226 -0
  85. package/templates/.cursor/docs/templates/analysis-template.md +280 -0
  86. package/templates/.cursor/docs/templates/execution-plan-template.md +430 -0
  87. package/templates/.cursor/docs/templates/guide-template.md +367 -0
  88. package/templates/.cursor/docs/templates/phase-execution-prompt-template.md +504 -0
  89. package/templates/.cursor/docs/templates/reference-template.md +522 -0
  90. package/templates/.cursor/docs/templates/solution-template.md +390 -0
  91. package/templates/.cursor/docs/tools/README.md +325 -0
  92. package/templates/.cursor/docs/tools/agents.md +330 -0
  93. package/templates/.cursor/docs/tools/commands.md +606 -0
  94. package/templates/.cursor/docs/tools/cursor.md +498 -0
  95. package/templates/.cursor/docs/tools/mcps.md +858 -0
  96. package/templates/.cursor/docs/tools/rules.md +423 -0
  97. package/templates/.cursor/rules/language-and-documentation.mdc +371 -0
  98. package/templates/.cursor/rules/onion-patterns.mdc +197 -0
  99. package/templates/.cursor/rules/validation-rules.mdc +194 -0
  100. package/templates/.cursor/utils/clickup-mcp-wrappers.md +671 -0
  101. package/templates/.cursor/utils/date-time-standards.md +182 -0
  102. package/templates/.cursor/utils/task-manager/README.md +94 -0
  103. package/templates/.cursor/utils/task-manager/adapters/asana.md +377 -0
  104. package/templates/.cursor/utils/task-manager/adapters/clickup.md +467 -0
  105. package/templates/.cursor/utils/task-manager/adapters/linear.md +421 -0
  106. package/templates/.cursor/utils/task-manager/detector.md +290 -0
  107. package/templates/.cursor/utils/task-manager/factory.md +363 -0
  108. package/templates/.cursor/utils/task-manager/interface.md +248 -0
  109. package/templates/.cursor/utils/task-manager/types.md +409 -0
  110. package/templates/.cursor/validation/product-task-validation.md +344 -0
  111. package/templates/.onion/contexts/business/.context-config.yml +52 -0
  112. package/templates/.onion/contexts/business/README.md +222 -0
  113. package/templates/.onion/contexts/business/agents/branding-specialist.md +1030 -0
  114. package/templates/.onion/contexts/business/agents/clickup-specialist.md +397 -0
  115. package/templates/.onion/contexts/business/agents/extract-meeting-specialist.md +395 -0
  116. package/templates/.onion/contexts/business/agents/gamma-specialist.md +1169 -0
  117. package/templates/.onion/contexts/business/agents/meeting-consolidator.md +483 -0
  118. package/templates/.onion/contexts/business/agents/pain-price-specialist.md +509 -0
  119. package/templates/.onion/contexts/business/agents/presentation-orchestrator.md +1191 -0
  120. package/templates/.onion/contexts/business/agents/product-agent.md +202 -0
  121. package/templates/.onion/contexts/business/agents/story-points-specialist.md +539 -0
  122. package/templates/.onion/contexts/business/agents/storytelling-specialist.md +891 -0
  123. package/templates/.onion/contexts/business/agents/task-specialist.md +618 -0
  124. package/templates/.onion/contexts/business/agents/whisper-specialist.md +373 -0
  125. package/templates/.onion/contexts/business/commands/advanced/analyze-pain-price.md +709 -0
  126. package/templates/.onion/contexts/business/commands/advanced/branding.md +460 -0
  127. package/templates/.onion/contexts/business/commands/advanced/checklist-sync.md +241 -0
  128. package/templates/.onion/contexts/business/commands/advanced/presentation.md +189 -0
  129. package/templates/.onion/contexts/business/commands/advanced/transform-consolidated.md +592 -0
  130. package/templates/.onion/contexts/business/commands/help.md +212 -0
  131. package/templates/.onion/contexts/business/commands/intermediate/check.md +48 -0
  132. package/templates/.onion/contexts/business/commands/intermediate/collect.md +96 -0
  133. package/templates/.onion/contexts/business/commands/intermediate/consolidate-meetings.md +306 -0
  134. package/templates/.onion/contexts/business/commands/intermediate/convert-to-tasks.md +220 -0
  135. package/templates/.onion/contexts/business/commands/intermediate/extract-meeting.md +241 -0
  136. package/templates/.onion/contexts/business/commands/intermediate/feature.md +431 -0
  137. package/templates/.onion/contexts/business/commands/intermediate/light-arch.md +97 -0
  138. package/templates/.onion/contexts/business/commands/intermediate/task-check.md +340 -0
  139. package/templates/.onion/contexts/business/commands/intermediate/validate-task.md +294 -0
  140. package/templates/.onion/contexts/business/commands/intermediate/whisper.md +325 -0
  141. package/templates/.onion/contexts/business/commands/starter/estimate.md +519 -0
  142. package/templates/.onion/contexts/business/commands/starter/refine.md +186 -0
  143. package/templates/.onion/contexts/business/commands/starter/spec.md +107 -0
  144. package/templates/.onion/contexts/business/commands/starter/task.md +585 -0
  145. package/templates/.onion/contexts/business/commands/starter/warm-up.md +187 -0
  146. package/templates/.onion/contexts/technical/.context-config.yml +64 -0
  147. package/templates/.onion/contexts/technical/README.md +238 -0
  148. package/templates/.onion/contexts/technical/agents/branch-code-reviewer.md +200 -0
  149. package/templates/.onion/contexts/technical/agents/branch-doc-writer.md +162 -0
  150. package/templates/.onion/contexts/technical/agents/branch-metaspec-checker.md +68 -0
  151. package/templates/.onion/contexts/technical/agents/branch-test-planner.md +177 -0
  152. package/templates/.onion/contexts/technical/agents/c4-architecture-specialist.md +712 -0
  153. package/templates/.onion/contexts/technical/agents/c4-documentation-specialist.md +658 -0
  154. package/templates/.onion/contexts/technical/agents/code-reviewer.md +155 -0
  155. package/templates/.onion/contexts/technical/agents/cursor-specialist.md +249 -0
  156. package/templates/.onion/contexts/technical/agents/docs-reverse-engineer.md +418 -0
  157. package/templates/.onion/contexts/technical/agents/gitflow-specialist.md +1207 -0
  158. package/templates/.onion/contexts/technical/agents/linux-security-specialist.md +676 -0
  159. package/templates/.onion/contexts/technical/agents/mermaid-specialist.md +516 -0
  160. package/templates/.onion/contexts/technical/agents/nodejs-specialist.md +673 -0
  161. package/templates/.onion/contexts/technical/agents/nx-migration-specialist.md +867 -0
  162. package/templates/.onion/contexts/technical/agents/nx-monorepo-specialist.md +619 -0
  163. package/templates/.onion/contexts/technical/agents/postgres-specialist.md +1124 -0
  164. package/templates/.onion/contexts/technical/agents/react-developer.md +132 -0
  165. package/templates/.onion/contexts/technical/agents/runflow-specialist.md +278 -0
  166. package/templates/.onion/contexts/technical/agents/system-doc-orchestrator.md +1388 -0
  167. package/templates/.onion/contexts/technical/agents/test-agent.md +425 -0
  168. package/templates/.onion/contexts/technical/agents/test-engineer.md +295 -0
  169. package/templates/.onion/contexts/technical/agents/test-planner.md +118 -0
  170. package/templates/.onion/contexts/technical/agents/zen-engine-specialist.md +421 -0
  171. package/templates/.onion/contexts/technical/commands/advanced/bump.md +43 -0
  172. package/templates/.onion/contexts/technical/commands/advanced/consolidate-documents.md +424 -0
  173. package/templates/.onion/contexts/technical/commands/advanced/e2e.md +392 -0
  174. package/templates/.onion/contexts/technical/commands/advanced/feature-finish.md +90 -0
  175. package/templates/.onion/contexts/technical/commands/advanced/feature-publish.md +91 -0
  176. package/templates/.onion/contexts/technical/commands/advanced/feature-start.md +158 -0
  177. package/templates/.onion/contexts/technical/commands/advanced/hotfix-finish.md +98 -0
  178. package/templates/.onion/contexts/technical/commands/advanced/hotfix-start.md +94 -0
  179. package/templates/.onion/contexts/technical/commands/advanced/hotfix.md +186 -0
  180. package/templates/.onion/contexts/technical/commands/advanced/refine-vision.md +27 -0
  181. package/templates/.onion/contexts/technical/commands/advanced/release-finish.md +98 -0
  182. package/templates/.onion/contexts/technical/commands/advanced/release-start.md +95 -0
  183. package/templates/.onion/contexts/technical/commands/advanced/reverse-consolidate.md +160 -0
  184. package/templates/.onion/contexts/technical/commands/advanced/validate-phase-sync.md +118 -0
  185. package/templates/.onion/contexts/technical/commands/help.md +329 -0
  186. package/templates/.onion/contexts/technical/commands/intermediate/build-business-docs.md +276 -0
  187. package/templates/.onion/contexts/technical/commands/intermediate/build-index.md +128 -0
  188. package/templates/.onion/contexts/technical/commands/intermediate/build-tech-docs.md +204 -0
  189. package/templates/.onion/contexts/technical/commands/intermediate/code-review.md +215 -0
  190. package/templates/.onion/contexts/technical/commands/intermediate/docs-health.md +142 -0
  191. package/templates/.onion/contexts/technical/commands/intermediate/fast-commit.md +45 -0
  192. package/templates/.onion/contexts/technical/commands/intermediate/integration.md +523 -0
  193. package/templates/.onion/contexts/technical/commands/intermediate/pr-update.md +198 -0
  194. package/templates/.onion/contexts/technical/commands/intermediate/pre-pr.md +91 -0
  195. package/templates/.onion/contexts/technical/commands/intermediate/start.md +266 -0
  196. package/templates/.onion/contexts/technical/commands/intermediate/sync-sessions.md +320 -0
  197. package/templates/.onion/contexts/technical/commands/intermediate/unit.md +378 -0
  198. package/templates/.onion/contexts/technical/commands/intermediate/validate-docs.md +159 -0
  199. package/templates/.onion/contexts/technical/commands/starter/docs.md +39 -0
  200. package/templates/.onion/contexts/technical/commands/starter/help.md +306 -0
  201. package/templates/.onion/contexts/technical/commands/starter/init.md +139 -0
  202. package/templates/.onion/contexts/technical/commands/starter/plan.md +111 -0
  203. package/templates/.onion/contexts/technical/commands/starter/pr.md +136 -0
  204. package/templates/.onion/contexts/technical/commands/starter/sync.md +228 -0
  205. package/templates/.onion/contexts/technical/commands/starter/warm-up.md +173 -0
  206. package/templates/.onion/contexts/technical/commands/starter/work.md +169 -0
  207. package/templates/.onion/core/commands/help.md +388 -0
@@ -0,0 +1,579 @@
1
+ # 📋 Templates Oficiais de Documentação C4 - Sistema Onion
2
+
3
+ ## 📋 **Visão Geral dos Templates**
4
+
5
+ Templates oficiais baseados no C4 Model (Simon Brown) para documentação textual estruturada. Compatível com qualquer tipo de projeto TypeScript/JavaScript.
6
+
7
+ ---
8
+
9
+ ## 🎯 **Template de Contexto de Sistema**
10
+
11
+ ### **Documentação Básica de Contexto de Sistema**
12
+ ```markdown
13
+ # Documento de Arquitetura de Software - {PROJECT_NAME}
14
+
15
+ ## 1. Contexto do Sistema
16
+
17
+ ### Visão Geral do Sistema
18
+ - **Nome do Sistema**: {PROJECT_NAME}
19
+ - **Tipo de Sistema**: {PROJECT_TYPE} (SPA, API, Full-stack, Monorepo, etc.)
20
+ - **Propósito Principal**: {SYSTEM_PURPOSE}
21
+ - **Domínio de Negócio**: {BUSINESS_DOMAIN}
22
+ - **Confiança da Arquitetura**: {DETECTION_CONFIDENCE}%
23
+
24
+ ### Paisagem do Sistema
25
+ {SYSTEM_LANDSCAPE_DESCRIPTION}
26
+
27
+ ### Stakeholders Principais
28
+ #### Usuários Primários
29
+ - **{USER_TYPE_1}**: {USER_DESCRIPTION_1}
30
+ - **{USER_TYPE_2}**: {USER_DESCRIPTION_2}
31
+
32
+ #### Usuários Secundários
33
+ - **{SECONDARY_USER_TYPE}**: {SECONDARY_USER_DESCRIPTION}
34
+
35
+ ### Sistemas Externos e Dependências
36
+ #### Sistemas Externos
37
+ {EXTERNAL_SYSTEMS_LIST}
38
+
39
+ #### Integrações Third-party
40
+ {THIRD_PARTY_INTEGRATIONS}
41
+
42
+ ### Contexto de Negócio
43
+ #### Declaração do Problema
44
+ {PROBLEM_STATEMENT}
45
+
46
+ #### Objetivos de Negócio
47
+ {BUSINESS_GOALS}
48
+
49
+ #### Critérios de Sucesso
50
+ {SUCCESS_CRITERIA}
51
+
52
+ #### Restrições Principais
53
+ - **Restrições Técnicas**: {TECHNICAL_CONSTRAINTS}
54
+ - **Restrições de Negócio**: {BUSINESS_CONSTRAINTS}
55
+ - **Restrições Regulamentares**: {REGULATORY_CONSTRAINTS}
56
+
57
+ ### Atributos de Qualidade
58
+ #### Requisitos de Performance
59
+ {PERFORMANCE_REQUIREMENTS}
60
+
61
+ #### Considerações de Segurança
62
+ {SECURITY_CONSIDERATIONS}
63
+
64
+ #### Fatores de Escalabilidade
65
+ {SCALABILITY_FACTORS}
66
+
67
+ #### Requisitos de Disponibilidade
68
+ {AVAILABILITY_REQUIREMENTS}
69
+
70
+ ### Premissas e Dependências
71
+ {ASSUMPTIONS_AND_DEPENDENCIES}
72
+ ```
73
+
74
+ ### **Template de Contexto Estendido (para Sistemas Complexos)**
75
+ ```markdown
76
+ ### Fronteira Detalhada do Sistema
77
+ #### O que está Dentro do Sistema
78
+ {INTERNAL_SCOPE}
79
+
80
+ #### O que está Fora do Sistema
81
+ {EXTERNAL_SCOPE}
82
+
83
+ ### Padrões de Integração
84
+ {INTEGRATION_PATTERNS}
85
+
86
+ ### Visão Geral do Fluxo de Dados
87
+ {HIGH_LEVEL_DATA_FLOW}
88
+
89
+ ### Contexto de Deploy
90
+ {DEPLOYMENT_CONTEXT}
91
+ ```
92
+
93
+ ---
94
+
95
+ ## 🏢 **Templates Nível Container**
96
+
97
+ ### **Template de Container de Aplicação Web**
98
+ ```markdown
99
+ ## 2. Arquitetura Nível Container
100
+
101
+ ### Visão Geral dos Containers
102
+ Este sistema {PROJECT_TYPE} é decomposto nos seguintes containers:
103
+
104
+ ### {CONTAINER_NAME_1}
105
+ #### Informações Básicas
106
+ - **Stack Tecnológico**: {TECHNOLOGY_STACK}
107
+ - **Ambiente de Execução**: {RUNTIME_ENVIRONMENT}
108
+ - **Responsabilidades Primárias**: {PRIMARY_RESPONSIBILITIES}
109
+
110
+ #### Detalhes Técnicos
111
+ - **Framework/Library**: {FRAMEWORK}
112
+ - **Linguagem/Versão**: {LANGUAGE_VERSION}
113
+ - **Sistema de Build**: {BUILD_SYSTEM}
114
+ - **Gerenciador de Pacotes**: {PACKAGE_MANAGER}
115
+
116
+ #### Dependências Externas
117
+ - **Banco de Dados**: {DATABASE_INFO}
118
+ - **APIs Externas**: {EXTERNAL_APIS}
119
+ - **Filas de Mensagem**: {MESSAGE_QUEUES}
120
+ - **Armazenamento de Arquivos**: {FILE_STORAGE}
121
+
122
+ #### Especificação da API
123
+ - **Estilo da API**: {API_STYLE} (REST, GraphQL, RPC)
124
+ - **URL Base**: {API_BASE_URL}
125
+ - **Autenticação**: {AUTHENTICATION_METHOD}
126
+ - **Endpoints Principais**: {KEY_ENDPOINTS}
127
+
128
+ #### Gerenciamento de Dados
129
+ - **Armazenamento de Dados**: {DATA_STORAGE}
130
+ - **Estratégia de Cache**: {CACHING_STRATEGY}
131
+ - **Validação de Dados**: {DATA_VALIDATION}
132
+
133
+ #### Configuração
134
+ - **Variáveis de Ambiente**: {ENVIRONMENT_VARIABLES}
135
+ - **Arquivos de Configuração**: {CONFIGURATION_FILES}
136
+ - **Feature Flags**: {FEATURE_FLAGS}
137
+
138
+ #### Monitoramento e Observabilidade
139
+ - **Logging**: {LOGGING_SETUP}
140
+ - **Métricas**: {METRICS_COLLECTION}
141
+ - **Health Checks**: {HEALTH_CHECKS}
142
+ - **Rastreamento de Erros**: {ERROR_TRACKING}
143
+
144
+ #### Deployment
145
+ - **Modelo de Deploy**: {DEPLOYMENT_MODEL}
146
+ - **Container/Empacotamento**: {CONTAINER_INFO}
147
+ - **Infraestrutura**: {INFRASTRUCTURE}
148
+ - **Pipeline CI/CD**: {CICD_INFO}
149
+ ```
150
+
151
+ ### **Template de Container de Serviço API**
152
+ ```markdown
153
+ ### {API_SERVICE_NAME}
154
+ #### Visão Geral do Serviço
155
+ - **Tipo de Serviço**: {SERVICE_TYPE}
156
+ - **Protocolo**: {PROTOCOL}
157
+ - **Formato de Dados**: {DATA_FORMAT}
158
+
159
+ #### Documentação da API
160
+ - **OpenAPI/Swagger**: {API_DOCS_LOCATION}
161
+ - **Exemplos Request/Response**: {EXAMPLES_LOCATION}
162
+ - **Rate Limiting**: {RATE_LIMITING}
163
+
164
+ #### Lógica de Negócio
165
+ - **Funcionalidades Principais**: {CORE_FEATURES}
166
+ - **Regras de Negócio**: {BUSINESS_RULES}
167
+ - **Lógica de Validação**: {VALIDATION_LOGIC}
168
+
169
+ #### Camada de Dados
170
+ - **Schema do Banco**: {DATABASE_SCHEMA}
171
+ - **Padrões de Acesso aos Dados**: {DATA_ACCESS_PATTERNS}
172
+ - **Gerenciamento de Transações**: {TRANSACTION_MANAGEMENT}
173
+ ```
174
+
175
+ ### **Template de Container Frontend**
176
+ ```markdown
177
+ ### {FRONTEND_APP_NAME}
178
+ #### Visão Geral da Aplicação
179
+ - **Tipo de Aplicação**: {APP_TYPE} (SPA, SSR, Static)
180
+ - **Framework**: {FRONTEND_FRAMEWORK}
181
+ - **Gerenciamento de Estado**: {STATE_MANAGEMENT}
182
+ - **Roteamento**: {ROUTING_SOLUTION}
183
+
184
+ #### Interface de Usuário
185
+ - **Biblioteca UI**: {UI_LIBRARY}
186
+ - **Abordagem de Styling**: {STYLING_APPROACH}
187
+ - **Design Responsivo**: {RESPONSIVE_DESIGN}
188
+ - **Acessibilidade**: {ACCESSIBILITY_FEATURES}
189
+
190
+ #### Funcionalidades Client-Side
191
+ - **Fluxo de Autenticação**: {AUTH_FLOW}
192
+ - **Fetch de Dados**: {DATA_FETCHING}
193
+ - **Estratégia de Cache**: {CLIENT_CACHING}
194
+ - **Suporte Offline**: {OFFLINE_SUPPORT}
195
+
196
+ #### Build e Assets
197
+ - **Ferramenta de Build**: {BUILD_TOOL}
198
+ - **Otimização de Assets**: {ASSET_OPTIMIZATION}
199
+ - **Bundle Splitting**: {BUNDLE_SPLITTING}
200
+ - **Assets Estáticos**: {STATIC_ASSETS}
201
+ ```
202
+
203
+ ---
204
+
205
+ ## 🧩 **Templates Nível Componente**
206
+
207
+ ### **Template Genérico de Documentação de Componente**
208
+ ```markdown
209
+ ## 3. Nível Componente - {CONTAINER_NAME}
210
+
211
+ ### Visão Geral dos Componentes
212
+ Estrutura interna do {CONTAINER_NAME}:
213
+
214
+ ### {COMPONENT_NAME}
215
+ #### Informações do Componente
216
+ - **Propósito**: {COMPONENT_PURPOSE}
217
+ - **Responsabilidades**: {COMPONENT_RESPONSIBILITIES}
218
+ - **Tipo de Componente**: {COMPONENT_TYPE} (Service, Controller, Repository, etc.)
219
+
220
+ #### Detalhes de Implementação
221
+ - **Localização do Arquivo**: {FILE_LOCATION}
222
+ - **Classes/Funções Primárias**: {PRIMARY_ELEMENTS}
223
+ - **Interfaces Principais**: {KEY_INTERFACES}
224
+ - **Padrões de Design**: {DESIGN_PATTERNS}
225
+
226
+ #### Dependências
227
+ - **Dependências Internas**: {INTERNAL_DEPENDENCIES}
228
+ - **Dependências Externas**: {EXTERNAL_DEPENDENCIES}
229
+ - **Injeção de Dependência**: {DEPENDENCY_INJECTION}
230
+
231
+ #### Manipulação de Dados
232
+ - **Dados de Entrada**: {INPUT_DATA}
233
+ - **Dados de Saída**: {OUTPUT_DATA}
234
+ - **Validação de Dados**: {DATA_VALIDATION}
235
+ - **Tratamento de Erros**: {ERROR_HANDLING}
236
+
237
+ #### Configuração
238
+ - **Opções de Configuração**: {CONFIGURATION_OPTIONS}
239
+ - **Configurações Específicas do Ambiente**: {ENV_SETTINGS}
240
+
241
+ #### Testes
242
+ - **Testes Unitários**: {UNIT_TESTS}
243
+ - **Testes de Integração**: {INTEGRATION_TESTS}
244
+ - **Cobertura de Testes**: {TEST_COVERAGE}
245
+
246
+ #### Considerações de Performance
247
+ - **Características de Performance**: {PERFORMANCE_NOTES}
248
+ - **Oportunidades de Otimização**: {OPTIMIZATION_NOTES}
249
+ - **Uso de Recursos**: {RESOURCE_USAGE}
250
+ ```
251
+
252
+ ### **Template de Componente React**
253
+ ```markdown
254
+ ### {REACT_COMPONENT_NAME}
255
+ #### Especificação do Componente
256
+ - **Tipo de Componente**: {COMPONENT_TYPE} (Functional, Class, Custom Hook)
257
+ - **Interface Props**: {PROPS_INTERFACE}
258
+ - **Gerenciamento de Estado**: {STATE_MANAGEMENT}
259
+ - **Lifecycle**: {LIFECYCLE_METHODS}
260
+
261
+ #### Implementação
262
+ - **Caminho do Arquivo**: {FILE_PATH}
263
+ - **Dependências**: {COMPONENT_DEPENDENCIES}
264
+ - **Hooks Utilizados**: {HOOKS_USED}
265
+ - **Context Providers**: {CONTEXT_PROVIDERS}
266
+
267
+ #### Comportamento
268
+ - **Interações do Usuário**: {USER_INTERACTIONS}
269
+ - **Side Effects**: {SIDE_EFFECTS}
270
+ - **Event Handlers**: {EVENT_HANDLERS}
271
+
272
+ #### Styling
273
+ - **Abordagem de Styling**: {STYLING_APPROACH}
274
+ - **Classes CSS**: {CSS_CLASSES}
275
+ - **Comportamento Responsivo**: {RESPONSIVE_BEHAVIOR}
276
+ ```
277
+
278
+ ### **Template de Componente API**
279
+ ```markdown
280
+ ### {API_COMPONENT_NAME}
281
+ #### Especificação do Serviço
282
+ - **Tipo de Serviço**: {SERVICE_TYPE}
283
+ - **Métodos HTTP**: {HTTP_METHODS}
284
+ - **Endpoints**: {ENDPOINTS}
285
+ - **Schema Request/Response**: {SCHEMA}
286
+
287
+ #### Lógica de Negócio
288
+ - **Operações Principais**: {CORE_OPERATIONS}
289
+ - **Regras de Negócio**: {BUSINESS_RULES}
290
+ - **Regras de Validação**: {VALIDATION_RULES}
291
+
292
+ #### Acesso aos Dados
293
+ - **Padrão Repository**: {REPOSITORY_PATTERN}
294
+ - **Operações de Banco**: {DATABASE_OPERATIONS}
295
+ - **Manipulação de Transações**: {TRANSACTION_HANDLING}
296
+
297
+ #### Tratamento de Erros
298
+ - **Tipos de Erro**: {ERROR_TYPES}
299
+ - **Respostas de Erro**: {ERROR_RESPONSES}
300
+ - **Estratégia de Logging**: {LOGGING_STRATEGY}
301
+ ```
302
+
303
+ ---
304
+
305
+ ## 📋 **Templates de Architecture Decision Records (ADR)**
306
+
307
+ ### **Template ADR Padrão**
308
+ ```markdown
309
+ ## 4. Architecture Decision Records
310
+
311
+ ### ADR-{ADR_NUMBER}: {DECISION_TITLE}
312
+
313
+ **Data**: {DECISION_DATE}
314
+ **Status**: {STATUS} (Proposed, Accepted, Deprecated, Superseded)
315
+ **Decisores**: {DECISION_MAKERS}
316
+ **História Técnica**: {TECHNICAL_STORY_LINK}
317
+
318
+ #### Contexto
319
+ {DECISION_CONTEXT}
320
+
321
+ #### Direcionadores da Decisão
322
+ - {DECISION_DRIVER_1}
323
+ - {DECISION_DRIVER_2}
324
+ - {DECISION_DRIVER_3}
325
+
326
+ #### Opções Consideradas
327
+ - **Opção 1**: {OPTION_1_DESCRIPTION}
328
+ - **Opção 2**: {OPTION_2_DESCRIPTION}
329
+ - **Opção 3**: {OPTION_3_DESCRIPTION}
330
+
331
+ #### Resultado da Decisão
332
+ **Opção Escolhida**: {CHOSEN_OPTION}
333
+
334
+ **Justificativa**: {DECISION_JUSTIFICATION}
335
+
336
+ #### Consequências
337
+ **Positivas:**
338
+ - {POSITIVE_CONSEQUENCE_1}
339
+ - {POSITIVE_CONSEQUENCE_2}
340
+
341
+ **Negativas:**
342
+ - {NEGATIVE_CONSEQUENCE_1}
343
+ - {NEGATIVE_CONSEQUENCE_2}
344
+
345
+ **Neutras:**
346
+ - {NEUTRAL_CONSEQUENCE_1}
347
+
348
+ #### Notas de Implementação
349
+ {IMPLEMENTATION_NOTES}
350
+
351
+ #### Decisões Relacionadas
352
+ - {RELATED_ADR_1}
353
+ - {RELATED_ADR_2}
354
+
355
+ #### Referências
356
+ - {REFERENCE_1}
357
+ - {REFERENCE_2}
358
+
359
+ ---
360
+ ```
361
+
362
+ ### **Template ADR de Escolha Tecnológica**
363
+ ```markdown
364
+ ### ADR-{ADR_NUMBER}: Seleção de Tecnologia - {TECHNOLOGY_AREA}
365
+
366
+ **Decisão**: Escolher {CHOSEN_TECHNOLOGY} para {TECHNOLOGY_AREA}
367
+
368
+ #### Matriz de Comparação
369
+ | Critérios | {OPTION_1} | {OPTION_2} | {CHOSEN_OPTION} |
370
+ |-----------|------------|------------|-----------------|
371
+ | Performance | {SCORE_1} | {SCORE_2} | {SCORE_3} |
372
+ | Curva de Aprendizado | {SCORE_1} | {SCORE_2} | {SCORE_3} |
373
+ | Suporte da Comunidade | {SCORE_1} | {SCORE_2} | {SCORE_3} |
374
+ | Ecossistema | {SCORE_1} | {SCORE_2} | {SCORE_3} |
375
+
376
+ #### Implicações Técnicas
377
+ {TECHNICAL_IMPLICATIONS}
378
+
379
+ #### Estratégia de Migração
380
+ {MIGRATION_STRATEGY}
381
+
382
+ #### Métricas de Sucesso
383
+ {SUCCESS_METRICS}
384
+ ```
385
+
386
+ ---
387
+
388
+ ## 📊 **Template de Especificações Técnicas**
389
+
390
+ ### **Template de Especificação de API**
391
+ ```markdown
392
+ ## 5. Especificações Técnicas
393
+
394
+ ### Especificações da API
395
+
396
+ #### API {API_NAME}
397
+ - **URL Base**: {API_BASE_URL}
398
+ - **Versão**: {API_VERSION}
399
+ - **Autenticação**: {API_AUTHENTICATION}
400
+
401
+ #### Endpoints
402
+
403
+ ##### {ENDPOINT_NAME}
404
+ - **Método**: {HTTP_METHOD}
405
+ - **Caminho**: {ENDPOINT_PATH}
406
+ - **Descrição**: {ENDPOINT_DESCRIPTION}
407
+
408
+ **Request:**
409
+ ```json
410
+ {REQUEST_EXAMPLE}
411
+ ```
412
+
413
+ **Response:**
414
+ ```json
415
+ {RESPONSE_EXAMPLE}
416
+ ```
417
+
418
+ **Respostas de Erro:**
419
+ - `{ERROR_CODE}`: {ERROR_DESCRIPTION}
420
+
421
+ #### Modelos de Dados
422
+ ```typescript
423
+ {DATA_MODELS}
424
+ ```
425
+
426
+ #### Fluxo de Autenticação
427
+ {AUTHENTICATION_FLOW}
428
+
429
+ #### Rate Limiting
430
+ {RATE_LIMITING_DETAILS}
431
+ ```
432
+
433
+ ### **Template de Schema de Banco**
434
+ ```markdown
435
+ ### Design do Banco de Dados
436
+
437
+ #### Visão Geral do Schema
438
+ {SCHEMA_OVERVIEW}
439
+
440
+ #### Relacionamento de Entidades
441
+ {ER_DESCRIPTION}
442
+
443
+ #### Tabelas
444
+
445
+ ##### {TABLE_NAME}
446
+ ```sql
447
+ {TABLE_SCHEMA}
448
+ ```
449
+
450
+ - **Propósito**: {TABLE_PURPOSE}
451
+ - **Relacionamentos**: {TABLE_RELATIONSHIPS}
452
+ - **Índices**: {TABLE_INDEXES}
453
+
454
+ #### Padrões de Acesso aos Dados
455
+ {DATA_ACCESS_PATTERNS}
456
+
457
+ #### Considerações de Performance
458
+ {DATABASE_PERFORMANCE}
459
+ ```
460
+
461
+ ---
462
+
463
+ ## 🎨 **Lógica de Seleção de Templates**
464
+
465
+ ### **Regras de Mapeamento de Templates**
466
+ ```typescript
467
+ const templateMappingRules = {
468
+ // Tipo de Projeto → Seleção de Template
469
+ 'react-spa': {
470
+ contextTemplate: 'system-context',
471
+ containerTemplate: 'frontend-container',
472
+ componentTemplate: 'react-component',
473
+ adrTemplate: 'standard-adr'
474
+ },
475
+
476
+ 'node-api': {
477
+ contextTemplate: 'system-context-extended',
478
+ containerTemplate: 'api-service-container',
479
+ componentTemplate: 'api-component',
480
+ adrTemplate: 'technology-choice-adr'
481
+ },
482
+
483
+ 'next-fullstack': {
484
+ contextTemplate: 'system-context',
485
+ containerTemplate: 'web-application-container',
486
+ componentTemplate: 'react-component',
487
+ adrTemplate: 'standard-adr'
488
+ },
489
+
490
+ 'nx-monorepo': {
491
+ contextTemplate: 'system-context-extended',
492
+ containerTemplate: 'web-application-container',
493
+ componentTemplate: 'generic-component',
494
+ adrTemplate: 'standard-adr'
495
+ }
496
+
497
+ // ... mais mapeamentos
498
+ }
499
+ ```
500
+
501
+ ### **Aplicação Progressiva de Templates**
502
+ ```typescript
503
+ const progressiveTemplates = {
504
+ level1_context: [
505
+ 'system-overview',
506
+ 'stakeholders',
507
+ 'external-dependencies',
508
+ 'business-context'
509
+ ],
510
+
511
+ level2_containers: [
512
+ 'container-overview',
513
+ 'technology-stack',
514
+ 'api-specifications',
515
+ 'deployment-model'
516
+ ],
517
+
518
+ level3_components: [
519
+ 'component-catalog',
520
+ 'implementation-details',
521
+ 'dependencies-mapping',
522
+ 'interfaces-specification'
523
+ ],
524
+
525
+ level4_decisions: [
526
+ 'adr-documentation',
527
+ 'technical-specifications',
528
+ 'migration-strategies'
529
+ ]
530
+ }
531
+ ```
532
+
533
+ ---
534
+
535
+ ## 🔧 **Regras de Processamento de Templates**
536
+
537
+ ### **Mapeamento de Auto-População**
538
+ ```yaml
539
+ auto_population_rules:
540
+ PROJECT_NAME: "Extrai do nome do package.json ou diretório"
541
+ PROJECT_TYPE: "Da detecção da análise cached"
542
+ TECHNOLOGY_STACK: "Da análise de dependências"
543
+ FRAMEWORK: "Da detecção de framework (React, Vue, Angular, etc.)"
544
+ API_ENDPOINTS: "Da análise de rotas ou specs OpenAPI"
545
+ DATABASE_INFO: "Da análise de dependências (mongoose, prisma, etc.)"
546
+
547
+ manual_input_required:
548
+ BUSINESS_GOALS: "Prompt para usuário sobre objetivos de negócio"
549
+ PROBLEM_STATEMENT: "Prompt contextual baseado no tipo de projeto"
550
+ SUCCESS_CRITERIA: "Template + refinamento do usuário"
551
+ DECISION_CONTEXT: "Para ADRs - sempre requer input do usuário"
552
+ ```
553
+
554
+ ### **Regras de Validação de Templates**
555
+ ```yaml
556
+ validation_rules:
557
+ required_sections:
558
+ - system_overview
559
+ - primary_responsibilities
560
+ - external_dependencies
561
+
562
+ optional_sections:
563
+ - detailed_api_specs
564
+ - performance_metrics
565
+ - deployment_details
566
+
567
+ format_requirements:
568
+ - markdown_compliant: true
569
+ - heading_hierarchy: true
570
+ - code_block_syntax: true
571
+ - link_validation: true
572
+ ```
573
+
574
+ ---
575
+
576
+ **Templates**: 📋 **C4 Model Oficial + Adaptativo por Projeto**
577
+ **Cobertura**: Context, Container, Component, ADRs, Especificações Técnicas
578
+ **Flexibilidade**: Workflow de auto-população + refinamento manual
579
+ **Qualidade**: Baseado nos padrões do C4 Model de Simon Brown