- This repository manages personal dotfiles for macOS and Ubuntu with chezmoi.
.chezmoirootpoints tohome/; only files underhome/are deployed to$HOME.- Files outside
home/, including this file, are repository-only. home/.chezmoiremovedeclaratively removes stale deployed targets.
home/: chezmoi source statebootstrap/: platform-specific setup scriptsscripts/: repository maintenance and validation scriptshome/dot_claude/: global Claude Code configurationhome/dot_codex/: global Codex configurationhome/dot_gemini/: global Gemini CLI configurationhome/private_dot_config/zsh/: zsh modules loaded byhome/dot_zshrc
Inside home/, follow chezmoi naming conventions:
dot_becomes.private_requests restricted permissions.tmplis rendered as a Go templateexecutable_requests executable permissions
- Edit the source under
home/; never edit a deployed file under$HOMEas the authoritative change. - Verify the source-to-target mapping before adding or moving a managed file.
- Run
chezmoi diffbeforechezmoi applyand inspect target drift. - If non-interactive apply requires a decision, stop and report instead of forcing an overwrite.
- Apply and validate managed changes before any requested commit or push.
- Do not create configuration directly in
~/.claude/,~/.codex/,~/.gemini/, or~/.config/; create the corresponding source underhome/first.
home/AGENTS.mdcontains global rules for work in every repository. Do not put dotfiles- or chezmoi-specific guidance there.- Root
AGENTS.mdcontains shared instructions for this repository. - Root
CLAUDE.mdimports rootAGENTS.mdand adds only Claude-specific guidance. - Product-specific global templates under
home/dot_{claude,codex,gemini}/includehome/AGENTS.mdand append only product-specific tool behavior. - Keep global, repository-specific, and product-specific instructions separate; do not duplicate rule text across layers.
make -C bootstrap full
make -C bootstrap standard
make -C bootstrap minimal
chezmoi diff
chezmoi apply -v- Run the narrowest relevant checks first.
- For general repository changes, run
prek run --files <changed-files>andbash scripts/check-stale.sh. - For agent instructions or shell tool management, also run:
mise run check-agent-environment
bash scripts/test-rtk-rewrite-hook.sh- After changing managed files, verify both
chezmoi diffand the deployed behavior. - Shell configuration changes require a fresh shell or
source ~/.zshrcas appropriate. - Hammerspoon changes require
hs -c "hs.reload()"or the documented AppleScript reload path. - Bootstrap scripts should use their dry-run mode when available.
- RTK is installed through
home/private_dot_config/mise/config.tomland updated by maintenance. - Claude Bash commands pass through two ordered
PreToolUsehooks configured inhome/dot_claude/settings.json:ensure-mise-path.shfirst, thenrtk-rewrite.sh. home/dot_claude/hooks/executable_rtk-rewrite.shdelegates supported rewrites and permission decisions tortk rewrite. It requiresjqand RTK 0.23.0 or newer.- Preserve the rewrite protocol: exit 0 rewrites and auto-allows, exit 1 or 2 passes through, exit 3 rewrites without auto-allowing so Claude can ask, and unexpected failures emit a warning before passing through.
- RTK 0.43.0 cannot execute some compound
findexpressions that it rewrites. Keep nativefindfor expressions containing-o,-not,-exec,-execdir,-delete, or parentheses until upstream behavior is verified compatible. - Any change to RTK versions, hook ordering, rewrite handling, or the compound-
findguard must runbash scripts/test-rtk-rewrite-hook.shand the agent environment check. - Do not remove a compatibility guard solely because RTK was upgraded; reproduce the formerly failing command against the installed version first.
- When adding a tool to
home/private_dot_config/mise/config.toml, runmise installand ensure shims resolve in a clean shell. - Keep the deployed Claude rule files documented and intact:
rules/bigquery.md,rules/git.md,rules/gpu.md, andrules/python.md.