@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,526 @@
1
+ # Template de Arquitetura de Contexto
2
+ *Um framework estratégico para projetar sistemas de documentação e contexto que habilitam desenvolvimento baseado em IA*
3
+
4
+ ---
5
+
6
+ ## Propósito Deste Template
7
+
8
+ Este template ajuda times de desenvolvimento de software a projetar sua **Arquitetura de Contexto** - a abordagem sistemática para organizar, estruturar e manter todas as informações do projeto para que tanto humanos quanto IA possam trabalhar efetivamente com seu codebase.
9
+
10
+ **Use este template para:**
11
+ - Definir que documentação e contexto seu projeto precisa
12
+ - Estruturar informação para consumo ótimo de IA
13
+ - Criar sistemas de gestão de conhecimento sustentáveis
14
+ - Habilitar colaboração efetiva humano-IA
15
+ - Escalar produtividade do time de desenvolvimento
16
+
17
+ ---
18
+
19
+ ## Perfil de Contexto do Projeto
20
+
21
+ ### Informações Básicas do Projeto
22
+
23
+ **Nome do Projeto:** `[Nome do Seu Projeto]`
24
+
25
+ **Project Type:**
26
+ - [ ] Web Application
27
+ - [ ] Mobile Application
28
+ - [ ] API/Backend Service
29
+ - [ ] Desktop Application
30
+ - [ ] Library/Framework
31
+ - [ ] CLI Tool
32
+ - [ ] Infrastructure/DevOps
33
+ - [ ] Other: `__________`
34
+
35
+ **Technology Stack:**
36
+ - **Primary Language:** `__________`
37
+ - **Framework/Runtime:** `__________`
38
+ - **Database:** `__________`
39
+ - **Cloud/Infrastructure:** `__________`
40
+ - **Key Dependencies:** `__________`
41
+
42
+ **Team Structure:**
43
+ - **Team Size:** `____` developers
44
+ - **Experience Level:**
45
+ - [ ] Junior (0-2 years)
46
+ - [ ] Mid-level (2-5 years)
47
+ - [ ] Senior (5+ years)
48
+ - [ ] Mixed team
49
+ - **AI Tool Usage:**
50
+ - [ ] GitHub Copilot
51
+ - [ ] Cursor AI for development
52
+ - [ ] Cursor/Windsurf
53
+ - [ ] Other: `__________`
54
+
55
+ **Development Constraints:**
56
+ - [ ] High compliance requirements (SOX, HIPAA, etc.)
57
+ - [ ] Legacy system integration
58
+ - [ ] Performance-critical application
59
+ - [ ] Rapid prototyping/MVP focus
60
+ - [ ] Long-term maintenance (5+ years)
61
+ - [ ] Multiple team collaboration
62
+ - [ ] External developer onboarding
63
+
64
+ ---
65
+
66
+ ## Context Architecture Design
67
+
68
+ **IMPORTANT: Create a multi-file structure with an index.md that links to separate files for each layer. Do NOT create one large file.**
69
+
70
+ **Implementation Approach:**
71
+ 1. **First**: Create `index.md` with the project profile and layer links
72
+ 2. **Then**: Create individual files for each layer as needed
73
+ 3. **Finally**: Ensure all links in the index work correctly
74
+
75
+ **File Naming Convention:**
76
+ - Use UPPERCASE for generic documentation files (e.g., `CODEBASE_GUIDE.md`)
77
+ - Use lowercase for project-specific files (e.g., `project_charter.md`)
78
+ - Keep filenames descriptive and consistent
79
+
80
+ ### Create an Index File First
81
+
82
+ **Create: `index.md` (or `technical_context.md`)**
83
+ ```markdown
84
+ ## Project Context Profile
85
+
86
+ ### Basic Project Information
87
+ [Include the project profile information here]
88
+
89
+ ---
90
+
91
+ ## Layer 1: Core Project Context
92
+
93
+ - [Project Charter](project_charter.md)
94
+ - [Architecture Decision Records](adr/)
95
+
96
+ ## Layer 2: AI-Optimized Context Files
97
+
98
+ - [AI Development Guide](CURSOR.meta.md) - Example CURSOR.md file for project level
99
+ - [Codebase Navigation Guide](CODEBASE_GUIDE.md)
100
+
101
+ ## Layer 3: Domain-Specific Context
102
+
103
+ - [Business Logic Documentation](BUSINESS_LOGIC.md)
104
+ - [API Specifications](API_SPECIFICATION.md)
105
+
106
+ ## Layer 4: Development Workflow Context
107
+
108
+ - [Development Workflow Guide](CONTRIBUTING.md)
109
+ - [Troubleshooting Guide](TROUBLESHOOTING.md)
110
+
111
+ [Include remaining sections: Context Maintenance Strategy, AI Integration Guidelines, Success Metrics, Implementation Validation]
112
+ ```
113
+
114
+ ### Layer 1: Core Project Context
115
+
116
+ **Create: `project_charter.md`**
117
+ ```markdown
118
+ # Project Charter: [Project Name]
119
+
120
+ ## Vision Statement
121
+ What does this project aim to achieve? Why does it exist?
122
+
123
+ ## Success Criteria
124
+ How will you know if this project is successful?
125
+
126
+ ## Scope Boundaries
127
+ What is explicitly IN scope and OUT of scope?
128
+
129
+ ## Key Stakeholders
130
+ Who are the primary users, sponsors, and decision makers?
131
+
132
+ ## Technical Constraints
133
+ What are the non-negotiable technical requirements?
134
+ ```
135
+
136
+ **Create: `adr/` directory with individual ADR files**
137
+ ```markdown
138
+ File: `adr/001-[decision-name].md`
139
+ Purpose: Context for why technical decisions were made
140
+
141
+ Template per decision:
142
+ # ADR-001: [Decision Title]
143
+
144
+ ## Context
145
+ What circumstances led to this decision?
146
+
147
+ ## Decision
148
+ What did we decide?
149
+
150
+ ## Rationale
151
+ Why did we choose this approach?
152
+
153
+ ## Consequences
154
+ What are the positive and negative impacts?
155
+
156
+ ## Alternatives Considered
157
+ What other options did we evaluate?
158
+ ```
159
+
160
+ ### Layer 2: AI-Optimized Context Files
161
+
162
+ **Create: `CURSOR.meta.md` (AI Development Guide)**
163
+ ```markdown
164
+ # AI Development Guide
165
+
166
+ ## Code Style Preferences
167
+ - Preferred patterns and conventions
168
+ - Code organization principles
169
+ - Naming conventions
170
+ - Comment style requirements
171
+
172
+ ## Testing Approach
173
+ - Testing framework used
174
+ - Test file structure and naming
175
+ - Coverage requirements
176
+ - Test data management
177
+
178
+ ## Common Patterns
179
+ - Frequently used design patterns
180
+ - Project-specific abstractions
181
+ - Error handling conventions
182
+ - Logging and monitoring patterns
183
+
184
+ ## Gotchas and Anti-patterns
185
+ - Common mistakes to avoid
186
+ - Performance considerations
187
+ - Security requirements
188
+ - Integration pitfalls
189
+ ```
190
+
191
+ **Create: `CODEBASE_GUIDE.md`**
192
+ ```markdown
193
+ # Codebase Navigation Guide
194
+
195
+ ## Directory Structure
196
+ ```
197
+ /src
198
+ /components # Reusable UI components
199
+ /services # Business logic layer
200
+ /utils # Helper functions
201
+ /tests # Test files
202
+ /docs # Documentation
203
+ ```
204
+
205
+ ## Key Files and Their Purpose
206
+ - `src/main.js` - Application entry point
207
+ - `src/config.js` - Configuration management
208
+ - `src/router.js` - Route definitions
209
+
210
+ ## Data Flow Patterns
211
+ How data moves through the application
212
+
213
+ ## Integration Points
214
+ External services, APIs, databases
215
+
216
+ ## Deployment Architecture
217
+ How the application is deployed and scaled
218
+ ```
219
+
220
+ ### Layer 3: Domain-Specific Context
221
+
222
+ **Create: `BUSINESS_LOGIC.md` (CONDITIONAL)**
223
+ ```markdown
224
+ Required if:
225
+ - [ ] Complex business rules exist
226
+ - [ ] Domain expertise needed
227
+ - [ ] Regulatory compliance involved
228
+ - [ ] Non-obvious business logic
229
+
230
+ # Business Logic Documentation
231
+
232
+ ## Domain Concepts
233
+ Key business entities and their relationships
234
+
235
+ ## Business Rules
236
+ Detailed explanation of business logic
237
+
238
+ ## Validation Rules
239
+ Data validation requirements and rationale
240
+
241
+ ## Workflow Processes
242
+ Step-by-step business processes
243
+
244
+ ## Edge Cases
245
+ Known edge cases and how to handle them
246
+ ```
247
+
248
+ **Create: `API_SPECIFICATION.md` (CONDITIONAL)**
249
+ ```markdown
250
+ Required if:
251
+ - [ ] Building APIs for external consumption
252
+ - [ ] Complex integration patterns
253
+ - [ ] Multiple API versions
254
+ - [ ] Third-party integrations
255
+
256
+ # API Specification
257
+
258
+ ## Authentication & Authorization
259
+ How to authenticate and what permissions exist
260
+
261
+ ## Endpoint Documentation
262
+ Detailed endpoint descriptions with examples
263
+
264
+ ## Data Models
265
+ Request/response schemas and validation rules
266
+
267
+ ## Error Handling
268
+ Error codes, messages, and recovery strategies
269
+
270
+ ## Rate Limiting & Performance
271
+ Usage limits and performance expectations
272
+ ```
273
+
274
+ ### Layer 4: Development Workflow Context
275
+
276
+ **Create: `CONTRIBUTING.md` (Development Workflow Guide)**
277
+ ```markdown
278
+ # Development Workflow
279
+
280
+ ## Branch Strategy
281
+ Git workflow and branching conventions
282
+
283
+ ## Code Review Process
284
+ Review requirements and criteria
285
+
286
+ ## Testing Requirements
287
+ What tests are required before merging
288
+
289
+ ## Deployment Process
290
+ How code gets from development to production
291
+
292
+ ## Environment Setup
293
+ Local development environment setup
294
+
295
+ ## Debugging Guide
296
+ Common debugging scenarios and tools
297
+ ```
298
+
299
+ **Create: `TROUBLESHOOTING.md`**
300
+ ```markdown
301
+ # Troubleshooting Guide
302
+
303
+ ## Common Development Issues
304
+ Frequently encountered problems and solutions
305
+
306
+ ## Environment-Specific Issues
307
+ Problems specific to local/staging/production
308
+
309
+ ## Performance Issues
310
+ Known performance bottlenecks and optimizations
311
+
312
+ ## Integration Issues
313
+ Third-party service integration problems
314
+
315
+ ## Emergency Procedures
316
+ Critical issue response procedures
317
+ ```
318
+
319
+ ---
320
+
321
+ ## Context Maintenance Strategy
322
+
323
+ ### Ownership and Responsibility
324
+
325
+ **Documentation Owner Assignment:**
326
+ - **Project Charter:** `[Role/Person]` - Updated when major scope changes
327
+ - **ADRs:** `[Role/Person]` - Added for significant architectural decisions
328
+ - **AI Development Guide:** `[Role/Person]` - Updated as coding standards evolve
329
+ - **Business Logic:** `[Role/Person]` - Updated when business rules change
330
+ - **API Specs:** `[Role/Person]` - Updated with API changes
331
+
332
+ ### Update Triggers
333
+
334
+ **When to update documentation:**
335
+ - [ ] New major features added
336
+ - [ ] Architecture decisions made
337
+ - [ ] Business rules change
338
+ - [ ] Performance issues discovered
339
+ - [ ] Security requirements updated
340
+ - [ ] Team composition changes
341
+ - [ ] Technology stack updates
342
+
343
+ ### Quality Assurance Process
344
+
345
+ **Documentation Review Checklist:**
346
+ - [ ] Information is current and accurate
347
+ - [ ] Examples work and are tested
348
+ - [ ] Language is clear and unambiguous
349
+ - [ ] AI can understand and use the information
350
+ - [ ] Human developers find it helpful
351
+ - [ ] Links and references are valid
352
+
353
+ ---
354
+
355
+ ## AI Integration Guidelines
356
+
357
+ ### Context File Organization
358
+
359
+ **Recommended file structure for AI consumption:**
360
+ ```
361
+ /specs/technical/ # or /docs/context/
362
+ index.md # Main index with links to all layers
363
+ project_charter.md # Layer 1: Core context
364
+ /adr/ # Layer 1: Architecture decisions
365
+ 001-database-choice.md
366
+ 002-authentication-strategy.md
367
+ CURSOR.meta.md # Layer 2: AI development guide
368
+ CODEBASE_GUIDE.md # Layer 2: Navigation guide
369
+ BUSINESS_LOGIC.md # Layer 3: Domain knowledge
370
+ API_SPECIFICATION.md # Layer 3: API documentation
371
+ CONTRIBUTING.md # Layer 4: Development workflow
372
+ TROUBLESHOOTING.md # Layer 4: Issue resolution
373
+ ```
374
+
375
+ **Key Benefits of This Structure:**
376
+ - **Modular**: Each file focuses on a specific concern
377
+ - **Linked**: Index file provides navigation and overview
378
+ - **Maintainable**: Updates target specific files, not one large document
379
+ - **AI-Friendly**: Clear file names and focused content improve AI understanding
380
+
381
+ ### AI Tool Configuration
382
+
383
+ **For GitHub Copilot:**
384
+ - Ensure context files are in repository root or `/docs`
385
+ - Use clear, descriptive file names
386
+ - Include relevant examples and code snippets
387
+
388
+ **For Cursor AI Development:**
389
+ - Create consolidated context packages for complex discussions
390
+ - Maintain current context summaries for long development sessions
391
+ - Include relevant error logs and debugging context
392
+
393
+ **For Cursor/Windsurf:**
394
+ - Configure `.cursorrules` or equivalent with project-specific guidelines
395
+ - Reference key documentation files in AI instructions
396
+ - Maintain workspace-specific context configurations
397
+
398
+ ### Context Compression Strategies
399
+
400
+ **For large projects, consider:**
401
+ - **Hierarchical documentation** - overview → detailed sections
402
+ - **Context summaries** - condensed versions of key information
403
+ - **Dynamic context loading** - context relevant to current work
404
+ - **Cross-references** - links between related documentation
405
+
406
+ ---
407
+
408
+ ## Success Metrics and Validation
409
+
410
+ ### Quantitative Metrics
411
+
412
+ **Development Efficiency:**
413
+ - **Time to first contribution** for new team members
414
+ - **Code review cycle time** reduction
415
+ - **Bug resolution time** improvement
416
+ - **Feature development velocity** increase
417
+
418
+ **AI Effectiveness:**
419
+ - **AI suggestion acceptance rate** improvement
420
+ - **Code quality metrics** (test coverage, complexity, bugs)
421
+ - **Documentation usage** tracking and feedback
422
+ - **AI-generated code review** pass rates
423
+
424
+ ### Qualitative Assessment
425
+
426
+ **Team Satisfaction Indicators:**
427
+ - [ ] Developers report faster onboarding
428
+ - [ ] AI tools provide more relevant suggestions
429
+ - [ ] Code reviews focus on logic rather than style/convention issues
430
+ - [ ] Less time spent explaining project context
431
+ - [ ] Reduced frustration with AI tool limitations
432
+
433
+ **Context Quality Indicators:**
434
+ - [ ] Documentation stays current without heroic effort
435
+ - [ ] New team members can contribute quickly
436
+ - [ ] AI tools understand project patterns and constraints
437
+ - [ ] Cross-team collaboration improves
438
+ - [ ] Technical debt decreases over time
439
+
440
+ ---
441
+
442
+ ## Implementation Checklist
443
+
444
+ ### Phase 1: Foundation (Week 1-2)
445
+ - [ ] Complete Project Context Profile
446
+ - [ ] Create PROJECT_CHARTER.md
447
+ - [ ] Set up ADR structure and process
448
+ - [ ] Assign documentation ownership
449
+
450
+ ### Phase 2: AI Optimization (Week 2-3)
451
+ - [ ] Create AI_DEVELOPMENT_GUIDE.md
452
+ - [ ] Create CODEBASE_GUIDE.md
453
+ - [ ] Configure AI tools with project context
454
+ - [ ] Test AI effectiveness with new context
455
+
456
+ ### Phase 3: Domain Context (Week 3-4)
457
+ - [ ] Create domain-specific documentation as needed
458
+ - [ ] Document business logic and API specifications
459
+ - [ ] Create workflow and troubleshooting guides
460
+ - [ ] Validate context completeness
461
+
462
+ ### Phase 4: Maintenance (Ongoing)
463
+ - [ ] Establish update triggers and processes
464
+ - [ ] Create quality assurance procedures
465
+ - [ ] Monitor and measure success metrics
466
+ - [ ] Iterate and improve based on feedback
467
+
468
+ ---
469
+
470
+ ## Customization Guidelines
471
+
472
+ ### For Different Project Types
473
+
474
+ **API/Backend Services:**
475
+ - Emphasize API documentation and integration patterns
476
+ - Include comprehensive error handling documentation
477
+ - Document performance characteristics and scaling patterns
478
+
479
+ **Frontend Applications:**
480
+ - Focus on component architecture and UI patterns
481
+ - Include user experience guidelines and accessibility requirements
482
+ - Document state management and data flow patterns
483
+
484
+ **Libraries/Frameworks:**
485
+ - Prioritize usage examples and API documentation
486
+ - Include migration guides and breaking change documentation
487
+ - Document performance characteristics and compatibility requirements
488
+
489
+ **Enterprise Applications:**
490
+ - Emphasize compliance and security documentation
491
+ - Include detailed business process documentation
492
+ - Document integration patterns with enterprise systems
493
+
494
+ ### For Different Team Contexts
495
+
496
+ **Small Teams (1-3 developers):**
497
+ - Focus on essential documentation only
498
+ - Combine multiple context types into fewer files
499
+ - Emphasize practical examples over comprehensive theory
500
+
501
+ **Large Teams (10+ developers):**
502
+ - Create detailed, specialized documentation
503
+ - Implement strict documentation governance
504
+ - Include comprehensive onboarding and cross-team collaboration guides
505
+
506
+ **Distributed Teams:**
507
+ - Emphasize asynchronous communication patterns
508
+ - Include detailed decision-making processes
509
+ - Document cultural and communication preferences
510
+
511
+ ---
512
+
513
+ ## Template Validation
514
+
515
+ This template should be reviewed and customized based on:
516
+ - **Project complexity and requirements**
517
+ - **Team size and experience level**
518
+ - **AI tool adoption and sophistication**
519
+ - **Organizational culture and constraints**
520
+ - **Industry-specific requirements**
521
+
522
+ Regular template updates should incorporate:
523
+ - **Lessons learned from implementation**
524
+ - **New AI tool capabilities and requirements**
525
+ - **Evolving development practices and patterns**
526
+ - **Team feedback and usage analytics**