@codemieai/code 0.0.33 → 0.0.34

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 (180) hide show
  1. package/README.md +73 -7
  2. package/bin/codemie-opencode.js +11 -0
  3. package/dist/agents/codemie-code/agent.d.ts +17 -1
  4. package/dist/agents/codemie-code/agent.d.ts.map +1 -1
  5. package/dist/agents/codemie-code/agent.js +62 -3
  6. package/dist/agents/codemie-code/agent.js.map +1 -1
  7. package/dist/agents/codemie-code/index.d.ts +1 -0
  8. package/dist/agents/codemie-code/index.d.ts.map +1 -1
  9. package/dist/agents/codemie-code/index.js +28 -2
  10. package/dist/agents/codemie-code/index.js.map +1 -1
  11. package/dist/agents/codemie-code/prompts.d.ts +12 -3
  12. package/dist/agents/codemie-code/prompts.d.ts.map +1 -1
  13. package/dist/agents/codemie-code/prompts.js +25 -5
  14. package/dist/agents/codemie-code/prompts.js.map +1 -1
  15. package/dist/agents/codemie-code/types.d.ts +3 -0
  16. package/dist/agents/codemie-code/types.d.ts.map +1 -1
  17. package/dist/agents/codemie-code/types.js.map +1 -1
  18. package/dist/agents/core/AgentCLI.d.ts.map +1 -1
  19. package/dist/agents/core/AgentCLI.js +3 -1
  20. package/dist/agents/core/AgentCLI.js.map +1 -1
  21. package/dist/agents/core/BaseAgentAdapter.d.ts.map +1 -1
  22. package/dist/agents/core/BaseAgentAdapter.js +33 -0
  23. package/dist/agents/core/BaseAgentAdapter.js.map +1 -1
  24. package/dist/agents/core/session/BaseSessionAdapter.d.ts +25 -0
  25. package/dist/agents/core/session/BaseSessionAdapter.d.ts.map +1 -1
  26. package/dist/agents/core/session/discovery-types.d.ts +53 -0
  27. package/dist/agents/core/session/discovery-types.d.ts.map +1 -0
  28. package/dist/agents/core/session/discovery-types.js +8 -0
  29. package/dist/agents/core/session/discovery-types.js.map +1 -0
  30. package/dist/agents/core/types.d.ts +45 -0
  31. package/dist/agents/core/types.d.ts.map +1 -1
  32. package/dist/agents/plugins/claude/claude.plugin.d.ts +44 -1
  33. package/dist/agents/plugins/claude/claude.plugin.d.ts.map +1 -1
  34. package/dist/agents/plugins/claude/claude.plugin.js +214 -0
  35. package/dist/agents/plugins/claude/claude.plugin.js.map +1 -1
  36. package/dist/agents/plugins/claude/plugin/README.md +40 -2
  37. package/dist/agents/plugins/claude/plugin/claude-templates/README.md +5 -5
  38. package/dist/agents/plugins/claude/plugin/claude-templates/templates/CLAUDE.md.template +177 -436
  39. package/dist/agents/plugins/claude/plugin/claude-templates/templates/agents/code-review-agent-template.md.template +49 -82
  40. package/dist/agents/plugins/claude/plugin/claude-templates/templates/agents/refactor-cleaner-agent.md.template +337 -0
  41. package/dist/agents/plugins/claude/plugin/claude-templates/templates/agents/solution-architect-agent.md.template +129 -419
  42. package/dist/agents/plugins/claude/plugin/claude-templates/templates/agents/unit-tester-agent.md.template +146 -693
  43. package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/api/api-patterns.md.template +110 -138
  44. package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/architecture/architecture.md.template +197 -0
  45. package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/data/database-patterns.md.template +171 -91
  46. package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/development/development-practices.md.template +219 -131
  47. package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/security/security-practices.md.template +223 -98
  48. package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/standards/code-quality.md.template +131 -95
  49. package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/testing/testing-patterns.md.template +247 -75
  50. package/dist/agents/plugins/claude/plugin/commands/README.md +133 -0
  51. package/dist/agents/plugins/claude/plugin/commands/codemie-init.md +336 -544
  52. package/dist/agents/plugins/claude/plugin/commands/codemie-subagents.md +232 -503
  53. package/dist/agents/plugins/claude/plugin/commands/memory-add.md +311 -30
  54. package/dist/agents/plugins/claude/plugin/commands/memory-refresh.md +218 -39
  55. package/dist/agents/plugins/gemini/gemini.plugin.d.ts.map +1 -1
  56. package/dist/agents/plugins/gemini/gemini.plugin.js +0 -3
  57. package/dist/agents/plugins/gemini/gemini.plugin.js.map +1 -1
  58. package/dist/agents/plugins/opencode/index.d.ts +8 -0
  59. package/dist/agents/plugins/opencode/index.d.ts.map +1 -0
  60. package/dist/agents/plugins/opencode/index.js +12 -0
  61. package/dist/agents/plugins/opencode/index.js.map +1 -0
  62. package/dist/agents/plugins/opencode/opencode-message-types.d.ts +207 -0
  63. package/dist/agents/plugins/opencode/opencode-message-types.d.ts.map +1 -0
  64. package/dist/agents/plugins/opencode/opencode-message-types.js +59 -0
  65. package/dist/agents/plugins/opencode/opencode-message-types.js.map +1 -0
  66. package/dist/agents/plugins/opencode/opencode-model-configs.d.ts +65 -0
  67. package/dist/agents/plugins/opencode/opencode-model-configs.d.ts.map +1 -0
  68. package/dist/agents/plugins/opencode/opencode-model-configs.js +184 -0
  69. package/dist/agents/plugins/opencode/opencode-model-configs.js.map +1 -0
  70. package/dist/agents/plugins/opencode/opencode.paths.d.ts +62 -0
  71. package/dist/agents/plugins/opencode/opencode.paths.d.ts.map +1 -0
  72. package/dist/agents/plugins/opencode/opencode.paths.js +148 -0
  73. package/dist/agents/plugins/opencode/opencode.paths.js.map +1 -0
  74. package/dist/agents/plugins/opencode/opencode.plugin.d.ts +35 -0
  75. package/dist/agents/plugins/opencode/opencode.plugin.d.ts.map +1 -0
  76. package/dist/agents/plugins/opencode/opencode.plugin.js +338 -0
  77. package/dist/agents/plugins/opencode/opencode.plugin.js.map +1 -0
  78. package/dist/agents/plugins/opencode/opencode.session.d.ts +77 -0
  79. package/dist/agents/plugins/opencode/opencode.session.d.ts.map +1 -0
  80. package/dist/agents/plugins/opencode/opencode.session.js +424 -0
  81. package/dist/agents/plugins/opencode/opencode.session.js.map +1 -0
  82. package/dist/agents/plugins/opencode/opencode.storage-utils.d.ts +25 -0
  83. package/dist/agents/plugins/opencode/opencode.storage-utils.d.ts.map +1 -0
  84. package/dist/agents/plugins/opencode/opencode.storage-utils.js +96 -0
  85. package/dist/agents/plugins/opencode/opencode.storage-utils.js.map +1 -0
  86. package/dist/agents/plugins/opencode/session/processors/opencode.conversations-processor.d.ts +30 -0
  87. package/dist/agents/plugins/opencode/session/processors/opencode.conversations-processor.d.ts.map +1 -0
  88. package/dist/agents/plugins/opencode/session/processors/opencode.conversations-processor.js +116 -0
  89. package/dist/agents/plugins/opencode/session/processors/opencode.conversations-processor.js.map +1 -0
  90. package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.d.ts +102 -0
  91. package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.d.ts.map +1 -0
  92. package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.js +584 -0
  93. package/dist/agents/plugins/opencode/session/processors/opencode.metrics-processor.js.map +1 -0
  94. package/dist/agents/registry.d.ts.map +1 -1
  95. package/dist/agents/registry.js +2 -0
  96. package/dist/agents/registry.js.map +1 -1
  97. package/dist/cli/commands/doctor/checks/AgentsCheck.d.ts +5 -0
  98. package/dist/cli/commands/doctor/checks/AgentsCheck.d.ts.map +1 -1
  99. package/dist/cli/commands/doctor/checks/AgentsCheck.js +29 -0
  100. package/dist/cli/commands/doctor/checks/AgentsCheck.js.map +1 -1
  101. package/dist/cli/commands/install.d.ts.map +1 -1
  102. package/dist/cli/commands/install.js +86 -7
  103. package/dist/cli/commands/install.js.map +1 -1
  104. package/dist/cli/commands/opencode-metrics.d.ts +13 -0
  105. package/dist/cli/commands/opencode-metrics.d.ts.map +1 -0
  106. package/dist/cli/commands/opencode-metrics.js +200 -0
  107. package/dist/cli/commands/opencode-metrics.js.map +1 -0
  108. package/dist/cli/commands/setup.d.ts.map +1 -1
  109. package/dist/cli/commands/setup.js +113 -0
  110. package/dist/cli/commands/setup.js.map +1 -1
  111. package/dist/cli/commands/skill.d.ts +6 -0
  112. package/dist/cli/commands/skill.d.ts.map +1 -0
  113. package/dist/cli/commands/skill.js +196 -0
  114. package/dist/cli/commands/skill.js.map +1 -0
  115. package/dist/cli/commands/update.d.ts.map +1 -1
  116. package/dist/cli/commands/update.js +34 -6
  117. package/dist/cli/commands/update.js.map +1 -1
  118. package/dist/cli/index.js +4 -0
  119. package/dist/cli/index.js.map +1 -1
  120. package/dist/migrations/003-remove-hooks-node.migration.d.ts +22 -0
  121. package/dist/migrations/003-remove-hooks-node.migration.d.ts.map +1 -0
  122. package/dist/migrations/003-remove-hooks-node.migration.js +103 -0
  123. package/dist/migrations/003-remove-hooks-node.migration.js.map +1 -0
  124. package/dist/migrations/index.d.ts +1 -0
  125. package/dist/migrations/index.d.ts.map +1 -1
  126. package/dist/migrations/index.js +1 -1
  127. package/dist/migrations/index.js.map +1 -1
  128. package/dist/providers/plugins/sso/sso.http-client.js +2 -2
  129. package/dist/providers/plugins/sso/sso.http-client.js.map +1 -1
  130. package/dist/providers/plugins/sso/sso.setup-steps.d.ts.map +1 -1
  131. package/dist/providers/plugins/sso/sso.setup-steps.js +14 -10
  132. package/dist/providers/plugins/sso/sso.setup-steps.js.map +1 -1
  133. package/dist/skills/core/SkillDiscovery.d.ts +83 -0
  134. package/dist/skills/core/SkillDiscovery.d.ts.map +1 -0
  135. package/dist/skills/core/SkillDiscovery.js +237 -0
  136. package/dist/skills/core/SkillDiscovery.js.map +1 -0
  137. package/dist/skills/core/SkillManager.d.ts +86 -0
  138. package/dist/skills/core/SkillManager.d.ts.map +1 -0
  139. package/dist/skills/core/SkillManager.js +155 -0
  140. package/dist/skills/core/SkillManager.js.map +1 -0
  141. package/dist/skills/core/types.d.ts +120 -0
  142. package/dist/skills/core/types.d.ts.map +1 -0
  143. package/dist/skills/core/types.js +20 -0
  144. package/dist/skills/core/types.js.map +1 -0
  145. package/dist/skills/index.d.ts +12 -0
  146. package/dist/skills/index.d.ts.map +1 -0
  147. package/dist/skills/index.js +12 -0
  148. package/dist/skills/index.js.map +1 -0
  149. package/dist/skills/utils/content-loader.d.ts +25 -0
  150. package/dist/skills/utils/content-loader.d.ts.map +1 -0
  151. package/dist/skills/utils/content-loader.js +161 -0
  152. package/dist/skills/utils/content-loader.js.map +1 -0
  153. package/dist/skills/utils/frontmatter.d.ts +60 -0
  154. package/dist/skills/utils/frontmatter.d.ts.map +1 -0
  155. package/dist/skills/utils/frontmatter.js +114 -0
  156. package/dist/skills/utils/frontmatter.js.map +1 -0
  157. package/dist/skills/utils/pattern-matcher.d.ts +60 -0
  158. package/dist/skills/utils/pattern-matcher.d.ts.map +1 -0
  159. package/dist/skills/utils/pattern-matcher.js +97 -0
  160. package/dist/skills/utils/pattern-matcher.js.map +1 -0
  161. package/dist/utils/installation-detector.d.ts +22 -0
  162. package/dist/utils/installation-detector.d.ts.map +1 -0
  163. package/dist/utils/installation-detector.js +49 -0
  164. package/dist/utils/installation-detector.js.map +1 -0
  165. package/dist/utils/native-installer.d.ts +49 -0
  166. package/dist/utils/native-installer.d.ts.map +1 -0
  167. package/dist/utils/native-installer.js +194 -0
  168. package/dist/utils/native-installer.js.map +1 -0
  169. package/dist/utils/version-utils.d.ts +50 -0
  170. package/dist/utils/version-utils.d.ts.map +1 -0
  171. package/dist/utils/version-utils.js +92 -0
  172. package/dist/utils/version-utils.js.map +1 -0
  173. package/package.json +5 -2
  174. package/scripts/copy-mr-skill-to-global.ts +252 -0
  175. package/scripts/demo-hooks.sh +125 -0
  176. package/scripts/test-hooks.sh +196 -0
  177. package/dist/agents/plugins/claude/plugin/claude-templates/templates/INDEX.md +0 -205
  178. package/dist/agents/plugins/claude/plugin/claude-templates/templates/TEMPLATE_SIZES.md +0 -74
  179. package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/architecture/layered-architecture.md.template +0 -143
  180. package/dist/agents/plugins/claude/plugin/claude-templates/templates/guides/architecture/project-structure.md.template +0 -127
@@ -1,210 +1,298 @@
1
+ ---
1
2
  # Development Practices
2
3
 
3
- ## Quick Summary
4
-
5
- Core development practices for [PROJECT_NAME]: error handling, logging, and configuration patterns.
4
+ <!--
5
+ GENERATION INSTRUCTIONS:
6
+ 1. Scan for linter/formatter configs (.eslintrc, .prettierrc, pyproject.toml, etc.)
7
+ 2. Extract naming patterns from existing code
8
+ 3. Find error handling patterns in services/controllers
9
+ 4. Locate logging usage and configuration
10
+ 5. Check for pre-commit hooks, CI config
11
+ 6. Output: 150-300 lines max
12
+ -->
6
13
 
7
- **Category**: Development
8
- **Complexity**: Medium
9
- **Prerequisites**: [LANGUAGE] fundamentals, [FRAMEWORK]
14
+ **Project**: [Extract from config]
15
+ **Language**: [Detect] | **Framework**: [Detect]
16
+ **Linter**: [Detect] | **Formatter**: [Detect]
10
17
 
11
18
  ---
12
19
 
13
- ## 🚨 SIZE LIMIT WARNING
20
+ ## Code Style
21
+
22
+ <!-- Extract from linter config + analyze existing code patterns -->
23
+
24
+ ### Naming Conventions
14
25
 
15
- **This generated guide MUST be 200-400 lines maximum.**
26
+ | Element | Convention | Example |
27
+ |---------|------------|---------|
28
+ | Files | `[kebab-case/snake_case/PascalCase]` | `[actual example from codebase]` |
29
+ | Classes | `[PascalCase]` | `[actual example]` |
30
+ | Functions | `[camelCase/snake_case]` | `[actual example]` |
31
+ | Variables | `[camelCase/snake_case]` | `[actual example]` |
32
+ | Constants | `[UPPER_SNAKE_CASE]` | `[actual example]` |
33
+ | Private | `[_prefix/no prefix/#private]` | `[actual example]` |
34
+
35
+ ### File Organization
36
+
37
+ ```[lang]
38
+ // Source: [representative file path]
39
+ // Standard file structure in this codebase:
40
+
41
+ [Extract typical file structure showing imports, class/function order]
42
+ ```
16
43
 
17
- **When filling this template**:
18
- - ✅ Code examples: 5-15 lines (NEVER > 20)
19
- - ✅ ONE example per pattern
20
- - ✅ Use file:line references, not full code
21
- - ✅ Use tables for multiple patterns
22
- - ❌ NO multiple examples for same pattern
23
- - ❌ NO verbose explanations
24
- - ❌ NO copying entire functions
44
+ ### Import Order
25
45
 
26
- **Validate line count after generation**: `wc -l [this-file]`
27
- **If > 400 lines**: Condense immediately before continuing!
46
+ <!-- Extract from linter config or consistent patterns -->
47
+
48
+ ```[lang]
49
+ // 1. [Standard library / Built-ins]
50
+ // 2. [External packages / Third-party]
51
+ // 3. [Internal modules / Local imports]
52
+
53
+ [Extract example showing import organization]
54
+ ```
28
55
 
29
56
  ---
30
57
 
31
- ## Error Handling
58
+ ## Code Quality
59
+
60
+ <!-- Find linter/formatter configuration -->
61
+
62
+ ### Commands
63
+
64
+ | Action | Command | Auto-fix |
65
+ |--------|---------|----------|
66
+ | Lint | `[exact command]` | `[fix command]` |
67
+ | Format | `[exact command]` | `[format write command]` |
68
+ | Type check | `[command or N/A]` | - |
69
+ | All checks | `[combined command if exists]` | - |
32
70
 
33
- ### Exception Hierarchy
71
+ ### Configuration Files
34
72
 
35
- | Exception | When to Use | HTTP Status | Source |
36
- |-----------|-------------|-------------|--------|
37
- | `[ValidationError]` | Invalid input | 400 | [file:lines] |
38
- | `[NotFoundError]` | Resource missing | 404 | [file:lines] |
39
- | `[AuthError]` | Auth failed | 401/403 | [file:lines] |
40
- | `[ServerError]` | Internal error | 500 | [file:lines] |
73
+ | Tool | Config File |
74
+ |------|-------------|
75
+ | Linter | `[.eslintrc / .pylintrc / etc.]` |
76
+ | Formatter | `[.prettierrc / pyproject.toml / etc.]` |
77
+ | Type checker | `[tsconfig.json / mypy.ini / etc.]` |
41
78
 
42
- ### Pattern: Raise & Handle
79
+ ### Pre-commit Hooks
43
80
 
44
- ```[language]
45
- # Raise - Source: [file:lines]
46
- [raise_example]
81
+ <!-- Check for .pre-commit-config.yaml, husky, lint-staged -->
47
82
 
48
- # Handle - Source: [file:lines]
49
- [handler_example]
83
+ ```bash
84
+ # Setup (if not auto-installed)
85
+ [pre-commit install command or N/A]
50
86
  ```
51
87
 
52
- ### Error Response Format
88
+ **Runs on commit**: [List what runs - lint, format, tests]
89
+
90
+ ---
91
+
92
+ ## Error Handling
93
+
94
+ <!-- Extract exception classes and handling patterns -->
95
+
96
+ ### Exception Types
53
97
 
54
- ```json
55
- {
56
- "error": {
57
- "code": "[ERROR_CODE]",
58
- "message": "[human-readable]",
59
- "details": "[context]"
60
- }
61
- }
98
+ | Exception | Use When | Source |
99
+ |-----------|----------|--------|
100
+ | `[ValidationError]` | Invalid input data | `[file:line]` |
101
+ | `[NotFoundError]` | Resource doesn't exist | `[file:line]` |
102
+ | `[UnauthorizedError]` | Auth required/failed | `[file:line]` |
103
+ | `[ForbiddenError]` | Permission denied | `[file:line]` |
104
+ | `[ConflictError]` | State conflict | `[file:line]` |
105
+
106
+ ### Pattern
107
+
108
+ ```[lang]
109
+ // Source: [file:lines]
110
+ [Extract canonical error throwing/handling pattern]
62
111
  ```
63
112
 
64
- **Rules**:
65
- - Specific exceptions (not bare `except:`)
66
- - Log with context
67
- - Return consistent format
68
- - ❌ Expose internal details
113
+ **Rules:**
114
+ - Throw specific exceptions from `[exceptions path]`
115
+ - Let `[error handler/middleware]` convert to response
116
+ - Never catch-and-ignore silently
69
117
 
70
118
  ---
71
119
 
72
120
  ## Logging
73
121
 
74
- ### Configuration
122
+ <!-- Find logging configuration and usage patterns -->
75
123
 
76
- ```[language]
77
- # Source: [file:lines]
78
- [logging_config]
124
+ ### Setup
125
+
126
+ ```[lang]
127
+ // Source: [file:lines]
128
+ [Extract logger initialization/import pattern]
79
129
  ```
80
130
 
81
- ### Log Levels
131
+ ### Usage Pattern
82
132
 
83
- | Level | When | Example |
84
- |-------|------|---------|
85
- | DEBUG | Development details | `[example]` |
86
- | INFO | Normal operations | `[example]` |
87
- | WARNING | Recoverable issues | `[example]` |
88
- | ERROR | Failures | `[example]` |
133
+ ```[lang]
134
+ // Source: [file:lines]
135
+ [Extract example showing structured logging with context]
136
+ ```
89
137
 
90
- ### Pattern: Structured Logging
138
+ ### Levels
91
139
 
92
- ```[language]
93
- # Good - Source: [file:lines]
94
- [good_logging]
140
+ | Level | Use For |
141
+ |-------|---------|
142
+ | `debug` | Development troubleshooting |
143
+ | `info` | Significant operations (startup, requests) |
144
+ | `warn` | Recoverable issues, deprecations |
145
+ | `error` | Failures requiring attention |
95
146
 
96
- # Bad
97
- [bad_logging]
98
- ```
147
+ ### Rules
99
148
 
100
- **Rules**:
101
- - ✅ Include context (user_id, request_id, etc.)
102
- - Use appropriate levels
103
- - ❌ Log secrets/PII
104
- - ❌ Log in hot paths
149
+ - ✅ Include context: `{ userId, requestId, [relevant ids] }`
150
+ - ✅ Use `[detected logger]` from `[import path]`
151
+ - No secrets, passwords, tokens in logs
152
+ - ❌ No excessive logging in loops/hot paths
105
153
 
106
154
  ---
107
155
 
108
- ## Configuration
156
+ ## Async Patterns
109
157
 
110
- ### Environment Variables
158
+ <!-- Detect if async/await, promises, or sync patterns used -->
111
159
 
112
- **Required**:
113
- ```bash
114
- [VAR1]=[description]
115
- [VAR2]=[description]
116
- ```
160
+ **Style**: [async/await | Promises | Callbacks | Sync | Mixed]
117
161
 
118
- **Optional** (with defaults):
119
- ```bash
120
- [VAR3]=[description] # default: [value]
162
+ ```[lang]
163
+ // Source: [file:lines]
164
+ [Extract canonical async pattern]
121
165
  ```
122
166
 
123
- ### Pattern: Load Config
167
+ ### Error Handling in Async
124
168
 
125
- ```[language]
126
- # Source: [file:lines]
127
- [config_loading]
169
+ ```[lang]
170
+ // Source: [file:lines]
171
+ [Extract async error handling - try/catch wrapper, error middleware, etc.]
128
172
  ```
129
173
 
130
- ### Multi-Environment
174
+ ---
175
+
176
+ ## Configuration & Environment
177
+
178
+ <!-- Find how config is loaded and validated -->
131
179
 
132
- ```[language]
133
- # Source: [file:lines]
134
- [env_detection]
180
+ ### Loading Pattern
181
+
182
+ ```[lang]
183
+ // Source: [file:lines]
184
+ [Extract config loading/validation pattern]
135
185
  ```
136
186
 
137
- **Environments**: development | staging | production
187
+ ### Required Variables
188
+
189
+ | Variable | Purpose | Example |
190
+ |----------|---------|---------|
191
+ | `[VAR_NAME]` | [Purpose] | `[example value]` |
192
+ | `[VAR_NAME]` | [Purpose] | `[example value]` |
138
193
 
139
- **Rules**:
140
- - ✅ Use env vars for deployment-specific config
141
- - ✅ Validate at startup
142
- - Never commit `.env` files
143
- - Hardcode secrets
194
+ ### Accessing Config
195
+
196
+ ```[lang]
197
+ // Use this pattern to access configuration
198
+ [Extract how to import/use config values]
199
+ ```
144
200
 
145
201
  ---
146
202
 
147
- ## Setup Guide
203
+ ## Dependencies
148
204
 
149
- ### Quick Start
205
+ <!-- Find package manager and conventions -->
150
206
 
151
- ```bash
152
- # Install
153
- [install_command]
207
+ ### Adding Dependencies
154
208
 
155
- # Configure
156
- [config_command]
209
+ ```bash
210
+ # Production dependency
211
+ [npm install X / pip install X / etc.]
157
212
 
158
- # Run
159
- [run_command]
213
+ # Dev dependency
214
+ [npm install -D X / pip install X --dev / etc.]
160
215
  ```
161
216
 
162
- ### Environment Setup
217
+ ### Update Process
163
218
 
164
219
  ```bash
165
- # 1. Activate environment
166
- [activate_command]
220
+ # Check outdated
221
+ [command]
222
+
223
+ # Update
224
+ [command]
225
+ ```
226
+
227
+ **Lock file**: `[package-lock.json / poetry.lock / etc.]` - ✅ Always commit
228
+
229
+ ---
167
230
 
168
- # 2. Install dependencies
169
- [dependency_command]
231
+ ## Git Workflow
170
232
 
171
- # 3. Setup database (if needed)
172
- [db_setup_command]
233
+ <!-- Extract from CONTRIBUTING.md, .github, or infer from history -->
173
234
 
174
- # 4. Run
175
- [dev_server_command]
235
+ ### Branch Naming
236
+
237
+ ```
238
+ [feature/bugfix/hotfix]/[ticket-id]-[short-description]
176
239
  ```
177
240
 
178
- **Verify**: [URL or command to verify setup]
241
+ **Examples**: `feature/ABC-123-add-user-auth`, `bugfix/fix-login-redirect`
179
242
 
180
- ---
243
+ ### Commit Messages
244
+
245
+ <!-- Detect conventional commits, or extract pattern -->
246
+
247
+ ```
248
+ [type]([scope]): [description]
249
+
250
+ [body - optional]
251
+ ```
252
+
253
+ **Types**: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`
181
254
 
182
- ## Common Commands
255
+ ### PR Checklist
183
256
 
184
- | Task | Command | Notes |
185
- |------|---------|-------|
186
- | Run dev | `[command]` | [Notes] |
187
- | Lint | `[command]` | Auto-fix with `[fix_flag]` |
188
- | Format | `[command]` | [Notes] |
189
- | Test | `[command]` | ONLY if user requests |
190
- | Build | `[command]` | [Notes] |
257
+ - [ ] Linting passes (`[lint command]`)
258
+ - [ ] Tests pass (`[test command]`)
259
+ - [ ] [Other checks from CI or CONTRIBUTING.md]
191
260
 
192
261
  ---
193
262
 
194
- ## Troubleshooting
263
+ ## Common Patterns
195
264
 
196
- | Symptom | Likely Cause | Fix |
197
- |---------|--------------|-----|
198
- | [error_pattern] | [cause] | [solution] |
199
- | [error_pattern] | [cause] | [solution] |
265
+ <!-- Extract recurring patterns specific to this codebase -->
266
+
267
+ | Pattern | When to Use | Example |
268
+ |---------|-------------|---------|
269
+ | `[Helper/Utility name]` | [Use case] | `[file:line]` |
270
+ | `[Decorator/Middleware]` | [Use case] | `[file:line]` |
271
+ | `[Factory/Builder]` | [Use case] | `[file:line]` |
200
272
 
201
273
  ---
202
274
 
203
- ## References
275
+ ## Don't Do
276
+
277
+ <!-- Extract anti-patterns from linter rules or code review patterns -->
204
278
 
205
- - **Error Handling**: `[path/to/exceptions]`
206
- - **Logging Config**: `[path/to/logging/config]`
207
- - **Configuration**: `[path/to/config]`
208
- - **Setup Docs**: `README.md`
279
+ | Avoid | ✅ Instead | Why |
280
+ |----------|-----------|-----|
281
+ | `[anti-pattern]` | `[correct pattern]` | [reason] |
282
+ | `[anti-pattern]` | `[correct pattern]` | [reason] |
283
+ | `[anti-pattern]` | `[correct pattern]` | [reason] |
209
284
 
210
285
  ---
286
+
287
+ ## Quick Reference
288
+
289
+ | Need | Location |
290
+ |------|----------|
291
+ | Linter config | `[path]` |
292
+ | Formatter config | `[path]` |
293
+ | Exception classes | `[path]` |
294
+ | Logger setup | `[path]` |
295
+ | Config loader | `[path]` |
296
+ | Utilities | `[path]` |
297
+
298
+ ---