Skip to content

Commit baa9645

Browse files
brianfunkclaude
andcommitted
docs(CLAUDE.md): add behavioral guidelines for Claude
Synthesized from Claude Code team best practices: - Planning before coding for one-shot implementations - Self-improvement by updating CLAUDE.md when corrected - Autonomous problem solving for bugs/CI failures - Critical code review mindset - Iterative refinement over hacky solutions - Context efficiency via subagents Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 3bee524 commit baa9645

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,25 @@ Single-file library with a main function and helper exports:
4545
## Related Projects
4646

4747
- **cAPIta** - REST API that wraps capstring (separate repo)
48+
49+
---
50+
51+
## How Claude Should Work
52+
53+
### Planning Before Coding
54+
For complex tasks, thoroughly plan before writing code. Create a clear implementation plan, identify affected files, and consider edge cases. A well-thought-out plan enables one-shot implementations with fewer iterations.
55+
56+
### Self-Improvement
57+
When corrected on a mistake, propose an update to this CLAUDE.md file to prevent the same mistake in future sessions. Be specific about what went wrong and how to avoid it.
58+
59+
### Autonomous Problem Solving
60+
When asked to fix bugs or failing tests, investigate independently. Check CI logs, read error messages, trace the issue, and fix it without requiring step-by-step guidance. Use subagents for complex multi-file investigations to keep the main context focused.
61+
62+
### Code Review Mindset
63+
When asked to review changes, be critical and thorough. Identify potential issues, suggest improvements, and verify the solution actually works. Don't just rubber-stamp changes - challenge assumptions and prove correctness.
64+
65+
### Iterative Refinement
66+
If an initial solution feels hacky or overly complex, step back and reconsider. Sometimes the best approach is to scrap a mediocre implementation and design a cleaner solution from scratch, using everything learned from the first attempt.
67+
68+
### Context Efficiency
69+
Offload discrete subtasks to subagents to preserve main context for high-level coordination. This is especially useful for research, file exploration, and isolated fixes that don't need full conversation history.

0 commit comments

Comments
 (0)