From d27a9f3b2f1f1e4b742163e19383d03e1f30f089 Mon Sep 17 00:00:00 2001 From: Brian Funk Date: Sun, 1 Feb 2026 10:59:04 -0500 Subject: [PATCH 1/2] 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 --- CLAUDE.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 7c848c8..f65dbbb 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -66,3 +66,25 @@ Key constants: - Roman numerals (42 → "XLII") - Negative numbers - BigInt support up to 10^36 + +--- + +## How Claude Should Work + +### Planning Before Coding +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. + +### Self-Improvement +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. + +### Autonomous Problem Solving +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. + +### Code Review Mindset +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. + +### Iterative Refinement +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. + +### Context Efficiency +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. From fe7d4f179a66ee85f3ef7b54244b28daea9394f9 Mon Sep 17 00:00:00 2001 From: Brian Funk Date: Sun, 1 Feb 2026 10:59:59 -0500 Subject: [PATCH 2/2] docs(CLAUDE.md): refine working style to essentials Distilled to actionable principles: - Think first, code second - Own problems autonomously - Verify work, don't assume - Rethink when stuck, update CLAUDE.md when wrong - Use subagents to stay focused Co-Authored-By: Claude Opus 4.5 --- CLAUDE.md | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index f65dbbb..18ec6d2 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -69,22 +69,19 @@ Key constants: --- -## How Claude Should Work +## Working Style -### Planning Before Coding -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. +### Think First, Code Second +For anything non-trivial, plan the approach before writing code. Identify which files change, what the edge cases are, and how to verify it works. A solid plan means fewer iterations and cleaner implementations. -### Self-Improvement -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. +### Own the Problem +When something's broken - CI failing, bug reported, error in logs - just go fix it. Read the error, trace the cause, implement the fix. Don't wait for instructions on each step. -### Autonomous Problem Solving -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. +### Verify, Don't Assume +After making changes, prove they work. Run the tests. Check the output. If asked to review code, be genuinely critical - find the issues, don't just approve. -### Code Review Mindset -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. +### When Stuck or Wrong +If a solution feels hacky, stop. Rethink from scratch using what you learned. If corrected on a mistake, suggest a CLAUDE.md update to prevent it happening again - be specific about what to avoid. -### Iterative Refinement -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. - -### Context Efficiency -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. +### Stay Focused +Use subagents for research, exploration, or isolated subtasks. Keep the main conversation for coordinating and making decisions.