# Global Claude Configuration @~/.claude/CLAUDE.personal.md Write American English (behavior, color, gray, license). ## Tool Preferences ### Search & Navigation - **Always use ripgrep** (`rg`) over grep for code search - it's faster and respects .gitignore - **Use Grep tool** with specific patterns, not broad searches. Prefer `output_mode: "content"` with context lines when you need to understand surrounding code - **Use Glob** for finding files by pattern, not `find` command - **Prefer LSP** when available for: go-to-definition, find-references, rename symbols. The pyright-lsp and gopls-lsp plugins are enabled. ### Code Manipulation - **Read before editing** - always read the full file (or relevant section) before making changes - **Use code structure** over text patterns when possible: - For function signatures: search for `func Name(` or `def name(` - For type definitions: search for `type X struct` or `class X` or `interface X` - For imports: check the import block at file top - **Atomic edits** - make the smallest edit that accomplishes the goal. Don't rewrite surrounding code. ## Code Quality - Prefer correct, complete implementations over minimal ones. - Use appropriate data structures and algorithms — don't brute-force what has a known better solution. - When fixing a bug, fix the root cause, not the symptom. - If something I asked for requires error handling or validation to work reliably, include it without asking. ### Verification - **Every change needs verification** - this is non-negotiable - Verification can be: - Running existing tests: `go test`, `pytest`, `npm test` - Running a specific command that exercises the change - Building the project to catch type/compile errors - For frontend: screenshot comparison or playwright test - **State verification method explicitly** in plans before implementing ### MCP Tools - **Playwright** - use for frontend verification, taking screenshots, testing user flows - Use MCP tools when they provide better precision than shell commands ## Workflow Principles ### Research First Before proposing changes to unfamiliar code: 1. Identify the relevant files and their relationships 2. Understand existing patterns in that area 3. Check for similar implementations elsewhere in the codebase 4. Look for tests that document expected behavior ### Preserve Context - Use subagents for exploratory searches (they don't pollute parent context) - Compress findings into structured summaries ### routr - When starting routr workers, ideally use **haiku or sonnet** for workers that run and summarize tests. Keep the stronger model for the work that needs judgment. ### Dev servers - **Always bind dev, desk and preview servers to `0.0.0.0`, never `127.0.0.1` or `localhost`.** The user views them from another machine. This applies to every server started for the user to look at, including test-harness servers. If the app refuses non-loopback Host headers, turn that check off for the dev run too (e.g. an `-allow-lan` flag). Report the URL with the host's LAN name or IP. ## Active Rule Sets - common, golang, python, typescript, web - C++ rules preserved at `rules/_inactive-cpp/` (not loaded) Rule sets, specialized agents, skills and hooks are **not** in this public repo. They come from the private dotfiles tier (`~/.claude/{agents,rules,skills}`, `~/.codex/{skills,rules}`), and a machine with only the public tier has none of them. This file is deliberately limited to system-level conventions that should hold on any machine, including a throwaway one with nothing else configured. ## Shell - Use zsh syntax when writing shell scripts or commands - ~/.zshrc for shell configuration ## Anti-Patterns (Do Not) - Don't search broadly then read dozens of files - be precise - Don't make changes without reading the code first - Don't skip verification - Don't rewrite code that doesn't need to change - Don't add comments, docstrings, or type annotations to unchanged code ## Obsidian vaults `~/Documents/Obsidian-Work` and `~/Documents/Obsidian-Personal` are the user's long-term memory. **Both vaults carry their own instructions, and those are authoritative.** This file is per-machine and drifts; the vault copies sync. - The **`obsidian-notes` skill** owns the protocol — `vault` and `sysjournal` usage, recall-before-answering, folder ownership, guardrails. - Each vault's **`Meta/Note Conventions.md`** owns its note rules, and they are deliberately different between the two. Read with `vault conventions --vault ` before authoring anything substantial. Two things to know without reading anything: 1. **Recall first.** `vault search ` before answering from scratch about a work project or customer, the user's machines and home network, or anything they may have solved before. Terms are ANDed — 2–3 specific words. 2. **Host/environment changes go to `sysjournal`, never `vault`.** The skill's "Which tool" table draws the line and states the trigger. `~/Documents/Obsidian25` is the pre-split original. It is **not** yet frozen: a VPS cron still writes `_planning/`, `_agent/` and `Health/Garmin/` there nightly. Never hand-write anywhere in it, and treat those three folders as owned by their programs in every vault. ## Beads (`bd`) Some repos track execution work in beads. A repo is wired in when `bd where` succeeds there. - In a wired repo, the session-start hook injects the workflow from `.beads/PRIME.md`. If it is missing from context — after compaction, or in a harness without the hook — run `bd prime`. - Beads holds execution work: tasks, blockers, discovered follow-ups, handoff. Intent stays in `.design/` when the repo has one; a bead never stands in for a plan. - Memory stays where it is: the harness memory and the Obsidian vaults. Never `bd remember`. - Beads syncs itself: each write pushes to origin, and the session-start hook pulls first. Don't run `bd dolt push` by hand unless a sync failure was reported. At handoff, say which beads changed. - To wire a repo in, run `~/code/agent-templates/beads/setup ` — never plain `bd init`, which rewrites `AGENTS.md` and commits tool config.