claude-code-templates 1.16.1 → 1.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/README.md +7 -7
  2. package/bin/create-claude-config.js +17 -8
  3. package/package.json +2 -3
  4. package/src/analytics/core/AgentAnalyzer.js +17 -3
  5. package/src/analytics/core/ProcessDetector.js +23 -7
  6. package/src/analytics/core/StateCalculator.js +102 -33
  7. package/src/analytics/data/DataCache.js +7 -7
  8. package/src/analytics-web/chats_mobile.html +2590 -0
  9. package/src/analytics-web/components/App.js +10 -10
  10. package/src/analytics-web/components/SessionTimer.js +1 -1
  11. package/src/analytics-web/components/Sidebar.js +5 -14
  12. package/src/analytics-web/index.html +932 -78
  13. package/src/analytics.js +263 -5
  14. package/src/chats-mobile.js +682 -0
  15. package/src/claude-api-proxy.js +460 -0
  16. package/src/file-operations.js +239 -36
  17. package/src/health-check.js +310 -0
  18. package/src/index.js +1256 -36
  19. package/src/tracking-service.js +31 -34
  20. package/components/agents/api-security-audit.md +0 -92
  21. package/components/agents/database-optimization.md +0 -94
  22. package/components/agents/react-performance-optimization.md +0 -64
  23. package/components/commands/check-file.md +0 -53
  24. package/components/commands/generate-tests.md +0 -68
  25. package/components/mcps/deepgraph-nextjs.json +0 -12
  26. package/components/mcps/deepgraph-react.json +0 -12
  27. package/components/mcps/deepgraph-typescript.json +0 -12
  28. package/components/mcps/deepgraph-vue.json +0 -12
  29. package/components/mcps/filesystem-access.json +0 -12
  30. package/components/mcps/github-integration.json +0 -11
  31. package/components/mcps/memory-integration.json +0 -8
  32. package/components/mcps/mysql-integration.json +0 -11
  33. package/components/mcps/postgresql-integration.json +0 -11
  34. package/components/mcps/web-fetch.json +0 -8
  35. package/src/analytics-web/components/AgentsPage.js +0 -4761
  36. package/templates/common/.claude/commands/git-workflow.md +0 -239
  37. package/templates/common/.claude/commands/project-setup.md +0 -316
  38. package/templates/common/.mcp.json +0 -41
  39. package/templates/common/CLAUDE.md +0 -109
  40. package/templates/common/README.md +0 -96
  41. package/templates/go/.mcp.json +0 -78
  42. package/templates/go/README.md +0 -25
  43. package/templates/javascript-typescript/.claude/commands/api-endpoint.md +0 -51
  44. package/templates/javascript-typescript/.claude/commands/debug.md +0 -52
  45. package/templates/javascript-typescript/.claude/commands/lint.md +0 -48
  46. package/templates/javascript-typescript/.claude/commands/npm-scripts.md +0 -48
  47. package/templates/javascript-typescript/.claude/commands/refactor.md +0 -55
  48. package/templates/javascript-typescript/.claude/commands/test.md +0 -61
  49. package/templates/javascript-typescript/.claude/commands/typescript-migrate.md +0 -51
  50. package/templates/javascript-typescript/.claude/settings.json +0 -142
  51. package/templates/javascript-typescript/.mcp.json +0 -80
  52. package/templates/javascript-typescript/CLAUDE.md +0 -185
  53. package/templates/javascript-typescript/README.md +0 -259
  54. package/templates/javascript-typescript/examples/angular-app/.claude/commands/components.md +0 -63
  55. package/templates/javascript-typescript/examples/angular-app/.claude/commands/services.md +0 -62
  56. package/templates/javascript-typescript/examples/node-api/.claude/commands/api-endpoint.md +0 -46
  57. package/templates/javascript-typescript/examples/node-api/.claude/commands/database.md +0 -56
  58. package/templates/javascript-typescript/examples/node-api/.claude/commands/middleware.md +0 -61
  59. package/templates/javascript-typescript/examples/node-api/.claude/commands/route.md +0 -57
  60. package/templates/javascript-typescript/examples/node-api/CLAUDE.md +0 -102
  61. package/templates/javascript-typescript/examples/react-app/.claude/commands/component.md +0 -29
  62. package/templates/javascript-typescript/examples/react-app/.claude/commands/hooks.md +0 -44
  63. package/templates/javascript-typescript/examples/react-app/.claude/commands/state-management.md +0 -45
  64. package/templates/javascript-typescript/examples/react-app/CLAUDE.md +0 -81
  65. package/templates/javascript-typescript/examples/react-app/agents/react-performance-optimization.md +0 -530
  66. package/templates/javascript-typescript/examples/react-app/agents/react-state-management.md +0 -295
  67. package/templates/javascript-typescript/examples/vue-app/.claude/commands/components.md +0 -46
  68. package/templates/javascript-typescript/examples/vue-app/.claude/commands/composables.md +0 -51
  69. package/templates/python/.claude/commands/lint.md +0 -111
  70. package/templates/python/.claude/commands/test.md +0 -73
  71. package/templates/python/.claude/settings.json +0 -153
  72. package/templates/python/.mcp.json +0 -78
  73. package/templates/python/CLAUDE.md +0 -276
  74. package/templates/python/examples/django-app/.claude/commands/admin.md +0 -264
  75. package/templates/python/examples/django-app/.claude/commands/django-model.md +0 -124
  76. package/templates/python/examples/django-app/.claude/commands/views.md +0 -222
  77. package/templates/python/examples/django-app/CLAUDE.md +0 -313
  78. package/templates/python/examples/django-app/agents/django-api-security.md +0 -642
  79. package/templates/python/examples/django-app/agents/django-database-optimization.md +0 -752
  80. package/templates/python/examples/fastapi-app/.claude/commands/api-endpoints.md +0 -513
  81. package/templates/python/examples/fastapi-app/.claude/commands/auth.md +0 -775
  82. package/templates/python/examples/fastapi-app/.claude/commands/database.md +0 -657
  83. package/templates/python/examples/fastapi-app/.claude/commands/deployment.md +0 -160
  84. package/templates/python/examples/fastapi-app/.claude/commands/testing.md +0 -927
  85. package/templates/python/examples/fastapi-app/CLAUDE.md +0 -229
  86. package/templates/python/examples/flask-app/.claude/commands/app-factory.md +0 -384
  87. package/templates/python/examples/flask-app/.claude/commands/blueprint.md +0 -243
  88. package/templates/python/examples/flask-app/.claude/commands/database.md +0 -410
  89. package/templates/python/examples/flask-app/.claude/commands/deployment.md +0 -620
  90. package/templates/python/examples/flask-app/.claude/commands/flask-route.md +0 -217
  91. package/templates/python/examples/flask-app/.claude/commands/testing.md +0 -559
  92. package/templates/python/examples/flask-app/CLAUDE.md +0 -391
  93. package/templates/ruby/.claude/commands/model.md +0 -360
  94. package/templates/ruby/.claude/commands/test.md +0 -480
  95. package/templates/ruby/.claude/settings.json +0 -146
  96. package/templates/ruby/.mcp.json +0 -83
  97. package/templates/ruby/CLAUDE.md +0 -284
  98. package/templates/ruby/examples/rails-app/.claude/commands/authentication.md +0 -490
  99. package/templates/ruby/examples/rails-app/CLAUDE.md +0 -376
  100. package/templates/rust/.mcp.json +0 -78
  101. package/templates/rust/README.md +0 -26
@@ -1,239 +0,0 @@
1
- # Git Workflow Helper
2
-
3
- Manage Git workflows with best practices and common operations.
4
-
5
- ## Purpose
6
-
7
- This command helps you perform common Git operations following best practices for collaborative development.
8
-
9
- ## Usage
10
-
11
- ```
12
- /git-workflow
13
- ```
14
-
15
- ## What this command does
16
-
17
- 1. **Guides through Git operations** with proper workflow
18
- 2. **Suggests best practices** for commits and branches
19
- 3. **Helps with conflict resolution** and merging
20
- 4. **Provides templates** for commit messages
21
- 5. **Manages branching strategies** (Git Flow, GitHub Flow)
22
-
23
- ## Common Workflows
24
-
25
- ### Feature Development
26
- ```bash
27
- # Create and switch to feature branch
28
- git checkout -b feature/user-authentication
29
-
30
- # Work on your feature
31
- # ... make changes ...
32
-
33
- # Stage and commit changes
34
- git add .
35
- git commit -m "feat: add user authentication system
36
-
37
- - Implement login/logout functionality
38
- - Add password validation
39
- - Create user session management
40
- - Add authentication middleware"
41
-
42
- # Push feature branch
43
- git push -u origin feature/user-authentication
44
-
45
- # Create pull request (via GitHub/GitLab interface)
46
- ```
47
-
48
- ### Hotfix Workflow
49
- ```bash
50
- # Create hotfix branch from main
51
- git checkout main
52
- git checkout -b hotfix/security-patch
53
-
54
- # Fix the issue
55
- # ... make changes ...
56
-
57
- # Commit the fix
58
- git commit -m "fix: resolve security vulnerability in auth module
59
-
60
- - Patch XSS vulnerability in login form
61
- - Update input validation
62
- - Add CSRF protection"
63
-
64
- # Push and create urgent PR
65
- git push -u origin hotfix/security-patch
66
- ```
67
-
68
- ### Sync with Remote
69
- ```bash
70
- # Update main branch
71
- git checkout main
72
- git pull origin main
73
-
74
- # Update feature branch with latest main
75
- git checkout feature/your-feature
76
- git rebase main
77
- # OR
78
- git merge main
79
- ```
80
-
81
- ## Commit Message Conventions
82
-
83
- ### Conventional Commits Format
84
- ```
85
- <type>[optional scope]: <description>
86
-
87
- [optional body]
88
-
89
- [optional footer(s)]
90
- ```
91
-
92
- ### Common Types
93
- - **feat**: New feature
94
- - **fix**: Bug fix
95
- - **docs**: Documentation changes
96
- - **style**: Code style changes (formatting, etc.)
97
- - **refactor**: Code refactoring
98
- - **test**: Adding or updating tests
99
- - **chore**: Maintenance tasks
100
-
101
- ### Examples
102
- ```bash
103
- # Feature
104
- git commit -m "feat(auth): add OAuth2 integration"
105
-
106
- # Bug fix
107
- git commit -m "fix(api): handle null response in user endpoint"
108
-
109
- # Documentation
110
- git commit -m "docs: update API documentation for v2.0"
111
-
112
- # Breaking change
113
- git commit -m "feat!: change API response format
114
-
115
- BREAKING CHANGE: API responses now use 'data' wrapper"
116
- ```
117
-
118
- ## Branch Management
119
-
120
- ### Git Flow Strategy
121
- ```bash
122
- # Main branches
123
- main # Production-ready code
124
- develop # Integration branch
125
-
126
- # Supporting branches
127
- feature/* # New features
128
- release/* # Release preparation
129
- hotfix/* # Quick fixes to production
130
- ```
131
-
132
- ### GitHub Flow (Simplified)
133
- ```bash
134
- # Only main branch + feature branches
135
- main # Production-ready code
136
- feature/* # All new work
137
- ```
138
-
139
- ## Conflict Resolution
140
-
141
- ### When Conflicts Occur
142
- ```bash
143
- # Start merge/rebase
144
- git merge feature-branch
145
- # OR
146
- git rebase main
147
-
148
- # If conflicts occur, Git will list conflicted files
149
- # Edit each file to resolve conflicts
150
-
151
- # Mark conflicts as resolved
152
- git add conflicted-file.js
153
-
154
- # Continue the merge/rebase
155
- git merge --continue
156
- # OR
157
- git rebase --continue
158
- ```
159
-
160
- ### Conflict Markers
161
- ```javascript
162
- <<<<<<< HEAD
163
- // Your current branch code
164
- const user = getCurrentUser();
165
- =======
166
- // Incoming branch code
167
- const user = getAuthenticatedUser();
168
- >>>>>>> feature-branch
169
- ```
170
-
171
- ## Useful Git Commands
172
-
173
- ### Status and Information
174
- ```bash
175
- git status # Check working directory status
176
- git log --oneline # View commit history
177
- git branch -a # List all branches
178
- git remote -v # List remote repositories
179
- ```
180
-
181
- ### Undoing Changes
182
- ```bash
183
- git checkout -- file.js # Discard changes to file
184
- git reset HEAD file.js # Unstage file
185
- git reset --soft HEAD~1 # Undo last commit (keep changes)
186
- git reset --hard HEAD~1 # Undo last commit (discard changes)
187
- ```
188
-
189
- ### Stashing Work
190
- ```bash
191
- git stash # Save current work
192
- git stash pop # Apply and remove latest stash
193
- git stash list # List all stashes
194
- git stash apply stash@{1} # Apply specific stash
195
- ```
196
-
197
- ## Best Practices
198
-
199
- 1. **Commit Often** - Make small, focused commits
200
- 2. **Write Clear Messages** - Use conventional commit format
201
- 3. **Test Before Committing** - Ensure code works
202
- 4. **Pull Before Push** - Keep history clean
203
- 5. **Use Branches** - Don't work directly on main
204
- 6. **Review Code** - Use pull requests for collaboration
205
- 7. **Keep History Clean** - Rebase feature branches when appropriate
206
-
207
- ## Git Hooks (Optional)
208
-
209
- ### Pre-commit Hook
210
- ```bash
211
- #!/bin/sh
212
- # .git/hooks/pre-commit
213
-
214
- # Run linter
215
- npm run lint
216
- if [ $? -ne 0 ]; then
217
- echo "Linting failed. Please fix errors before committing."
218
- exit 1
219
- fi
220
-
221
- # Run tests
222
- npm test
223
- if [ $? -ne 0 ]; then
224
- echo "Tests failed. Please fix tests before committing."
225
- exit 1
226
- fi
227
- ```
228
-
229
- ### Commit Message Hook
230
- ```bash
231
- #!/bin/sh
232
- # .git/hooks/commit-msg
233
-
234
- # Check commit message format
235
- if ! grep -qE "^(feat|fix|docs|style|refactor|test|chore)(\(.+\))?: .{1,50}" "$1"; then
236
- echo "Invalid commit message format. Use conventional commits."
237
- exit 1
238
- fi
239
- ```
@@ -1,316 +0,0 @@
1
- # Project Setup Helper
2
-
3
- Set up new projects with proper structure and best practices.
4
-
5
- ## Purpose
6
-
7
- This command helps you set up new projects with proper directory structure, configuration files, and development environment.
8
-
9
- ## Usage
10
-
11
- ```
12
- /project-setup
13
- ```
14
-
15
- ## What this command does
16
-
17
- 1. **Creates project structure** with standard directories
18
- 2. **Sets up configuration files** (.gitignore, README, etc.)
19
- 3. **Initializes version control** and development tools
20
- 4. **Configures environment files** and dependencies
21
- 5. **Follows language-specific** conventions and best practices
22
-
23
- ## Project Structure Templates
24
-
25
- ### Generic Project Structure
26
- ```
27
- project-name/
28
- ├── README.md # Project documentation
29
- ├── .gitignore # Git ignore rules
30
- ├── .env.example # Environment variables template
31
- ├── LICENSE # Project license
32
- ├── CHANGELOG.md # Version history
33
- ├── docs/ # Documentation
34
- │ ├── API.md
35
- │ ├── CONTRIBUTING.md
36
- │ └── DEPLOYMENT.md
37
- ├── src/ # Source code
38
- │ ├── main/
39
- │ ├── utils/
40
- │ └── config/
41
- ├── tests/ # Test files
42
- │ ├── unit/
43
- │ ├── integration/
44
- │ └── fixtures/
45
- ├── scripts/ # Build and deployment scripts
46
- │ ├── build.sh
47
- │ ├── deploy.sh
48
- │ └── setup.sh
49
- └── config/ # Configuration files
50
- ├── development.yml
51
- ├── production.yml
52
- └── testing.yml
53
- ```
54
-
55
- ### Web Application Structure
56
- ```
57
- web-app/
58
- ├── public/ # Static assets
59
- │ ├── index.html
60
- │ ├── favicon.ico
61
- │ └── assets/
62
- │ ├── css/
63
- │ ├── js/
64
- │ └── images/
65
- ├── src/ # Source code
66
- │ ├── components/ # Reusable components
67
- │ ├── pages/ # Page components
68
- │ ├── services/ # API services
69
- │ ├── utils/ # Utility functions
70
- │ ├── styles/ # Stylesheets
71
- │ └── config/ # Configuration
72
- ├── tests/ # Test files
73
- └── build/ # Build output
74
- ```
75
-
76
- ### API Project Structure
77
- ```
78
- api-project/
79
- ├── src/
80
- │ ├── controllers/ # Request handlers
81
- │ ├── models/ # Data models
82
- │ ├── services/ # Business logic
83
- │ ├── middleware/ # Custom middleware
84
- │ ├── routes/ # API routes
85
- │ ├── utils/ # Utility functions
86
- │ └── config/ # Configuration
87
- ├── tests/
88
- │ ├── unit/
89
- │ ├── integration/
90
- │ └── e2e/
91
- ├── docs/
92
- │ ├── api-spec.yml # OpenAPI specification
93
- │ └── README.md
94
- └── scripts/
95
- ├── seed-db.js # Database seeding
96
- └── migrate.js # Database migrations
97
- ```
98
-
99
- ## Essential Configuration Files
100
-
101
- ### .gitignore Template
102
- ```gitignore
103
- # Dependencies
104
- node_modules/
105
- *.log
106
- npm-debug.log*
107
-
108
- # Environment files
109
- .env
110
- .env.local
111
- .env.production
112
-
113
- # Build outputs
114
- dist/
115
- build/
116
- *.tgz
117
-
118
- # IDE files
119
- .vscode/
120
- .idea/
121
- *.swp
122
- *.swo
123
-
124
- # OS files
125
- .DS_Store
126
- Thumbs.db
127
-
128
- # Temporary files
129
- *.tmp
130
- *.temp
131
- ```
132
-
133
- ### README.md Template
134
- ```markdown
135
- # Project Name
136
-
137
- Brief description of what this project does.
138
-
139
- ## Features
140
-
141
- - Feature 1
142
- - Feature 2
143
- - Feature 3
144
-
145
- ## Installation
146
-
147
- \`\`\`bash
148
- # Clone the repository
149
- git clone https://github.com/username/project-name.git
150
-
151
- # Install dependencies
152
- npm install
153
-
154
- # Copy environment file
155
- cp .env.example .env
156
- \`\`\`
157
-
158
- ## Usage
159
-
160
- \`\`\`bash
161
- # Start development server
162
- npm run dev
163
-
164
- # Run tests
165
- npm test
166
-
167
- # Build for production
168
- npm run build
169
- \`\`\`
170
-
171
- ## API Documentation
172
-
173
- [API documentation](docs/API.md)
174
-
175
- ## Contributing
176
-
177
- Please read [CONTRIBUTING.md](docs/CONTRIBUTING.md) for details.
178
-
179
- ## License
180
-
181
- This project is licensed under the MIT License - see [LICENSE](LICENSE) file.
182
- ```
183
-
184
- ### .env.example Template
185
- ```env
186
- # Application
187
- NODE_ENV=development
188
- PORT=3000
189
- HOST=localhost
190
-
191
- # Database
192
- DB_HOST=localhost
193
- DB_PORT=5432
194
- DB_NAME=myapp
195
- DB_USER=username
196
- DB_PASSWORD=password
197
-
198
- # API Keys
199
- API_KEY=your-api-key-here
200
- SECRET_KEY=your-secret-key-here
201
-
202
- # External Services
203
- REDIS_URL=redis://localhost:6379
204
- EMAIL_SERVICE_API_KEY=your-email-key
205
- ```
206
-
207
- ## Development Environment Setup
208
-
209
- ### Package.json Scripts
210
- ```json
211
- {
212
- "scripts": {
213
- "start": "node src/index.js",
214
- "dev": "nodemon src/index.js",
215
- "test": "jest",
216
- "test:watch": "jest --watch",
217
- "test:coverage": "jest --coverage",
218
- "lint": "eslint src/",
219
- "lint:fix": "eslint src/ --fix",
220
- "format": "prettier --write src/",
221
- "build": "webpack --mode production",
222
- "build:dev": "webpack --mode development",
223
- "clean": "rm -rf dist/"
224
- }
225
- }
226
- ```
227
-
228
- ### Git Initialization
229
- ```bash
230
- # Initialize Git repository
231
- git init
232
-
233
- # Add initial files
234
- git add .
235
-
236
- # Create initial commit
237
- git commit -m "feat: initial project setup
238
-
239
- - Add project structure
240
- - Configure development environment
241
- - Add documentation templates
242
- - Set up testing framework"
243
-
244
- # Add remote origin
245
- git remote add origin https://github.com/username/project-name.git
246
-
247
- # Push to remote
248
- git push -u origin main
249
- ```
250
-
251
- ## Language-Specific Setup
252
-
253
- ### Node.js/JavaScript
254
- ```bash
255
- npm init -y
256
- npm install --save-dev nodemon jest eslint prettier
257
- ```
258
-
259
- ### Python
260
- ```bash
261
- python -m venv venv
262
- source venv/bin/activate # On Windows: venv\Scripts\activate
263
- pip install -r requirements.txt
264
- ```
265
-
266
- ### Docker Setup
267
- ```dockerfile
268
- # Dockerfile
269
- FROM node:16-alpine
270
- WORKDIR /app
271
- COPY package*.json ./
272
- RUN npm install
273
- COPY . .
274
- EXPOSE 3000
275
- CMD ["npm", "start"]
276
- ```
277
-
278
- ```yaml
279
- # docker-compose.yml
280
- version: '3.8'
281
- services:
282
- app:
283
- build: .
284
- ports:
285
- - "3000:3000"
286
- environment:
287
- - NODE_ENV=development
288
- volumes:
289
- - .:/app
290
- - /app/node_modules
291
- ```
292
-
293
- ## Best Practices
294
-
295
- 1. **Consistent Structure** - Follow established conventions
296
- 2. **Clear Documentation** - Write comprehensive README
297
- 3. **Environment Variables** - Keep secrets out of code
298
- 4. **Version Control** - Initialize Git from the start
299
- 5. **Testing Setup** - Configure testing from day one
300
- 6. **Code Quality** - Set up linting and formatting
301
- 7. **CI/CD Ready** - Structure for automated deployment
302
- 8. **Security** - Include security best practices
303
-
304
- ## Checklist
305
-
306
- - [ ] Create project directory structure
307
- - [ ] Initialize version control (Git)
308
- - [ ] Set up package manager (npm, pip, etc.)
309
- - [ ] Create README.md with project info
310
- - [ ] Add .gitignore file
311
- - [ ] Set up environment variables
312
- - [ ] Configure linting and formatting
313
- - [ ] Set up testing framework
314
- - [ ] Create basic documentation
315
- - [ ] Add license file
316
- - [ ] Set up CI/CD configuration (if needed)
@@ -1,41 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "memory-bank": {
4
- "name": "Memory Bank MCP",
5
- "description": "Centralized memory system for AI agents",
6
- "command": "server-memory",
7
- "args": [],
8
- "env": {}
9
- },
10
- "sequential-thinking": {
11
- "name": "Sequential Thinking MCP",
12
- "description": "Helps LLMs decompose complex tasks into logical steps",
13
- "command": "code-reasoning",
14
- "args": [],
15
- "env": {}
16
- },
17
- "brave-search": {
18
- "name": "Brave Search MCP",
19
- "description": "Privacy-focused web search tool",
20
- "command": "server-brave-search",
21
- "args": [],
22
- "env": {}
23
- },
24
- "google-maps": {
25
- "name": "Google Maps MCP",
26
- "description": "Integrates Google Maps for geolocation and directions",
27
- "command": "server-google-maps",
28
- "args": [],
29
- "env": {
30
- "GOOGLE_MAPS_API_KEY": "..."
31
- }
32
- },
33
- "deep-graph": {
34
- "name": "Deep Graph MCP (Code Graph)",
35
- "description": "Transforms source code into semantic graphs via DeepGraph",
36
- "command": "mcp-code-graph",
37
- "args": [],
38
- "env": {}
39
- }
40
- }
41
- }
@@ -1,109 +0,0 @@
1
- # CLAUDE.md
2
-
3
- This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
-
5
- ## Universal Development Guidelines
6
-
7
- ### Code Quality Standards
8
- - Write clean, readable, and maintainable code
9
- - Follow consistent naming conventions across the project
10
- - Use meaningful variable and function names
11
- - Keep functions focused and single-purpose
12
- - Add comments for complex logic and business rules
13
-
14
- ### Git Workflow
15
- - Use descriptive commit messages following conventional commits format
16
- - Create feature branches for new development
17
- - Keep commits atomic and focused on single changes
18
- - Use pull requests for code review before merging
19
- - Maintain a clean commit history
20
-
21
- ### Documentation
22
- - Keep README.md files up to date
23
- - Document public APIs and interfaces
24
- - Include usage examples for complex features
25
- - Maintain inline code documentation
26
- - Update documentation when making changes
27
-
28
- ### Testing Approach
29
- - Write tests for new features and bug fixes
30
- - Maintain good test coverage
31
- - Use descriptive test names that explain the expected behavior
32
- - Organize tests logically by feature or module
33
- - Run tests before committing changes
34
-
35
- ### Security Best Practices
36
- - Never commit sensitive information (API keys, passwords, tokens)
37
- - Use environment variables for configuration
38
- - Validate input data and sanitize outputs
39
- - Follow principle of least privilege
40
- - Keep dependencies updated
41
-
42
- ## Project Structure Guidelines
43
-
44
- ### File Organization
45
- - Group related files in logical directories
46
- - Use consistent file and folder naming conventions
47
- - Separate source code from configuration files
48
- - Keep build artifacts out of version control
49
- - Organize assets and resources appropriately
50
-
51
- ### Configuration Management
52
- - Use configuration files for environment-specific settings
53
- - Centralize configuration in dedicated files
54
- - Use environment variables for sensitive or environment-specific data
55
- - Document configuration options and their purposes
56
- - Provide example configuration files
57
-
58
- ## Development Workflow
59
-
60
- ### Before Starting Work
61
- 1. Pull latest changes from main branch
62
- 2. Create a new feature branch
63
- 3. Review existing code and architecture
64
- 4. Plan the implementation approach
65
-
66
- ### During Development
67
- 1. Make incremental commits with clear messages
68
- 2. Run tests frequently to catch issues early
69
- 3. Follow established coding standards
70
- 4. Update documentation as needed
71
-
72
- ### Before Submitting
73
- 1. Run full test suite
74
- 2. Check code quality and formatting
75
- 3. Update documentation if necessary
76
- 4. Create clear pull request description
77
-
78
- ## Common Patterns
79
-
80
- ### Error Handling
81
- - Use appropriate error handling mechanisms for the language
82
- - Provide meaningful error messages
83
- - Log errors appropriately for debugging
84
- - Handle edge cases gracefully
85
- - Don't expose sensitive information in error messages
86
-
87
- ### Performance Considerations
88
- - Profile code for performance bottlenecks
89
- - Optimize database queries and API calls
90
- - Use caching where appropriate
91
- - Consider memory usage and resource management
92
- - Monitor and measure performance metrics
93
-
94
- ### Code Reusability
95
- - Extract common functionality into reusable modules
96
- - Use dependency injection for better testability
97
- - Create utility functions for repeated operations
98
- - Design interfaces for extensibility
99
- - Follow DRY (Don't Repeat Yourself) principle
100
-
101
- ## Review Checklist
102
-
103
- Before marking any task as complete:
104
- - [ ] Code follows established conventions
105
- - [ ] Tests are written and passing
106
- - [ ] Documentation is updated
107
- - [ ] Security considerations are addressed
108
- - [ ] Performance impact is considered
109
- - [ ] Code is reviewed for maintainability