-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathCLAUDE.md.template
More file actions
208 lines (164 loc) · 5.34 KB
/
CLAUDE.md.template
File metadata and controls
208 lines (164 loc) · 5.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# CLAUDE.md Template Guide
This template is used by Claude Hooks Manager when generating CLAUDE.md files. You can customize it to fit your project's specific needs.
## Template Structure
The CLAUDE.md file generated by `claude-hooks dart init` includes these sections:
### 1. Project Overview
- Brief description of your project
- Automatically populated from user input
### 2. Dart Integration (if enabled)
- Workspace configuration
- Task and documentation folders
- Sync rules and settings
### 3. Task Management Rules
- Dart MCP tool usage guidelines
- Status values (To-do, Doing, Done)
- Priority levels (Critical, High, Medium, Low)
- Workflow rules for task updates
### 4. Git Workflow
- Commit message guidelines
- Restrictions (no co-authored commits, no Claude signatures)
- Conventional commit format
### 5. Documentation Rules
- Markdown file synchronization with Dart
- Folder structure guidelines
- Documentation best practices
### 6. Development Guidelines
- Detail-oriented implementation requirements
- Form and data flow validation
- Testing requirements
- Complete functionality implementation
### 7. Testing Commands
- Test, lint, and type check commands
- Automatically populated from user input
### 8. Project-Specific Context
- Technology stack
- How to run the application
- Custom instructions
## Customizing Your CLAUDE.md
### Method 1: During Setup
When running `claude-hooks dart init`, you'll be prompted for:
- Project description
- Primary language
- Test/lint/typecheck commands
- Technology stack
- Additional instructions (opens editor)
### Method 2: Manual Editing
After generation, edit CLAUDE.md directly to add:
```markdown
## Custom Section Example
### API Guidelines
- Always use RESTful conventions
- Include proper error handling
- Document all endpoints
### Database Rules
- Use migrations for schema changes
- Never modify production data directly
- Always backup before major operations
### Security Requirements
- Sanitize all user inputs
- Use environment variables for secrets
- Follow OWASP guidelines
```
### Method 3: Template Variables
The template uses these variables you can reference:
- `${projectName}` - Your project directory name
- `${projectInfo.description}` - Project description
- `${dartConfig.workspace}` - Dart workspace name
- `${dartConfig.tasksFolder}` - Tasks dartboard path
- `${dartConfig.docsFolder}` - Documentation folder path
- `${projectInfo.testCommand}` - Test command
- `${projectInfo.lintCommand}` - Lint command
- `${projectInfo.typecheckCommand}` - Type check command
- `${projectInfo.runCommand}` - Run command
- `${projectInfo.techStack}` - Technology stack
- `${projectInfo.additionalInstructions}` - Custom instructions
## Common Customizations
### 1. Add Phase-Based Development
```markdown
## Development Phases
- Phase 1: Core Infrastructure ✓
- Phase 2: User Authentication (IN PROGRESS)
- Phase 3: API Development
- Phase 4: Frontend Implementation
- Phase 5: Testing & Documentation
```
### 2. Add Team-Specific Rules
```markdown
## Team Guidelines
- Code reviews required for all PRs
- Daily standup updates in Dart
- Weekly architecture reviews
- Documentation updates with each feature
```
### 3. Add Environment-Specific Instructions
```markdown
## Environment Setup
### Development
- Database: PostgreSQL 14
- Redis: 7.0
- Node.js: 18.x
### Staging
- Mirror production configuration
- Use staging API keys
### Production
- Follow deployment checklist
- Coordinate with DevOps team
```
### 4. Add Performance Guidelines
```markdown
## Performance Requirements
- API response time < 200ms
- Page load time < 3s
- Database queries < 100ms
- Memory usage < 512MB
```
## Re-generating CLAUDE.md
To regenerate your CLAUDE.md with updated information:
1. **Backup existing file**: `cp CLAUDE.md CLAUDE.md.bak`
2. **Run**: `claude-hooks dart init`
3. **Choose**: Overwrite when prompted
4. **Merge**: Copy custom sections from backup
## Best Practices
1. **Keep it concise**: Claude reads this every session
2. **Be specific**: Include exact commands and paths
3. **Update regularly**: Keep in sync with project changes
4. **Version control**: Track changes in git
5. **Team alignment**: Ensure all team members use same instructions
## Example: Complete Custom CLAUDE.md
```markdown
# MyProject Instructions for Claude
## Project Overview
E-commerce platform with AI-powered recommendations
## Dart Integration
[... generated dart config ...]
## Custom Business Rules
### Order Processing
- Validate inventory before confirming orders
- Send email notifications at each step
- Update analytics dashboard in real-time
### Payment Handling
- Use Stripe for all transactions
- Store only tokenized payment data
- Implement 3D Secure for EU customers
### AI Features
- Recommendation engine uses TensorFlow
- Retrain models weekly
- A/B test all algorithm changes
## Development Workflow
### Branch Strategy
- main: Production-ready code
- develop: Integration branch
- feature/*: New features
- hotfix/*: Emergency fixes
### PR Requirements
1. All tests must pass
2. Code coverage > 80%
3. Performance benchmarks met
4. Documentation updated
[... rest of generated content ...]
```
## Getting Help
- Run `claude-hooks dart edit` to modify .dart configuration
- Edit CLAUDE.md directly for project-specific rules
- Use `claude-hooks dart init` to regenerate with new settings
- Keep both .dart and CLAUDE.md in sync for best results