This document contains project-specific guidelines and best practices for Claude Code when working on this codebase.
- You must always refer to me as Michi
See all rules in section ## META - MAINTAINING THIS DOCUMENT
- When adding new rules to detailed sections below, always update this summary section with a corresponding one-sentence summary
- Each rule in this summary must reference its corresponding detailed section
- Follow the writing guidelines when adding new rules
See all rules in section ## Agent-Specific Notes
- ALWAYS verify in code; NEVER guess
- NEVER create/apply/drop git stash entries unless explicitly requested
- ALWAYS assume other agents may be working; keep unrelated WIP untouched
- NEVER create/remove/modify git worktrees unless explicitly requested
- NEVER switch branches unless explicitly requested
- When user says "push": you may
git pull --rebaseto integrate latest changes - When user says "commit": scope to your changes only
- When user says "commit all": commit everything in grouped chunks
See all rules in section ## Refactoring
- Implementation plans in
.plans/are authoritative over existing documentation during refactoring
See all rules in section ## Plugin Development
- ALWAYS keep
marketplace.jsonandplugin.jsonin sync when modifying plugins - ALWAYS bump versions in both
marketplace.jsonandplugin.json
Rule: Whenever you add, modify, or remove rules in the detailed sections below, you MUST update the "Rules Summary" section at the top of this document.
Process:
- Add the new rule to the appropriate detailed section below
- Add a corresponding one-sentence summary to the Rules Summary section
- Ensure the summary references the detailed section using the format: "See all rules in section ## SECTION NAME"
- If creating a new topic, add both a new numbered topic in the summary AND a new detailed section below
Example: If you add a new rule about async patterns in the detailed "ASYNC PATTERNS" section, you must add:
- A new topic in Rules Summary: "4. Async Patterns - See all rules in section ## ASYNC PATTERNS"
- A one-sentence summary under that topic
When adding new rules to this document, follow these principles:
Core Principles (Always Apply):
- Use absolute directives - Start with "NEVER" or "ALWAYS" for non-negotiable rules
- Lead with why - Explain the problem/rationale before showing the solution (1-3 bullets max)
- Be concrete - Include actual commands/code for project-specific patterns
- Minimize examples - One clear point per code block
- Bullets over paragraphs - Keep explanations concise
- Action before theory - Put immediate takeaways first
Optional Enhancements (Use Strategically):
- Bad/Good examples: Only when the antipattern is subtle or common
- "Why" or "Rationale" section: Keep to 1-3 bullets explaining the underlying reason
- "Warning Signs" section: Only for gradual/easy-to-miss violations
- "General Principle": Only when the abstraction is non-obvious
- Decision trees: Only for 3+ factor decisions with multiple considerations
Anti-Bloat Rules:
- Don't add "Warning Signs" to obvious rules (e.g., "imports at top")
- Don't show bad examples for trivial mistakes
- Don't create decision trees for simple binary choices
- Don't add "General Principle" when the section title already generalizes
- Don't write paragraphs explaining what bullets can convey
- Don't write long "Why" explanations - 1-3 bullets maximum
- High-confidence answers only: verify in code; do not guess
- Multi-agent safety: do not create/apply/drop git stash entries unless explicitly requested (includes
git pull --rebase --autostash) - Multi-agent safety: assume other agents may be working; keep unrelated WIP untouched; avoid cross-cutting state changes
- Multi-agent safety: do not create/remove/modify git worktree checkouts unless explicitly requested
- Multi-agent safety: do not switch branches or check out a different branch unless explicitly requested
- Multi-agent safety: running multiple agents is OK as long as each agent has its own session
- When user says "push": you may
git pull --rebaseto integrate latest changes (never discard other agents' work) - When user says "commit": scope to your changes only
- When user says "commit all": commit everything in grouped chunks
- Unrecognized files: keep going; focus on your changes and commit only those
- Reports: focus on your edits; avoid guard-rail disclaimers unless truly blocked; end with brief "other files present" note only if relevant
- Implementation plans are authoritative: when executing a
.plans/*.mdfile, the plan takes precedence over existing documentation or code comments that may be outdated - Grep for old names: when renaming/deleting, run
grep -r "old-name" .to find all references that need updating
- Keep manifests in sync: when adding, renaming, or modifying plugins, ALWAYS update both
.claude-plugin/marketplace.jsonandplugins/<name>/.claude-plugin/plugin.json - Bump versions together: ALWAYS increment version in both
marketplace.jsonandplugin.jsonwhen making changes