feat: fold in the portable Claude Code, zsh and git config; add a drift check

Added (all now linked from their live locations):
- home_root/.claude/settings.json. The statusLine command now uses $HOME
  instead of a Linux-only absolute path.
- home_root/.claude/bin/ratecheck and home_root/.claude/skills/australis-design.
- home_config/zsh/claude-config-dir.zsh and home_root/.local/bin/claude-config-dir-init,
  the per-repo Claude Code login helper and its seeding script.
- home_root/.gitconfig and home_config/git/ignore.
- home_root/.zshenv, with the cargo env line guarded so boxes without rust start clean.

link-dotfiles --check reports drift without changing anything: tracked files whose
live copy is no longer a link (stow dry-run conflicts) and links into this repo
that dangle. Exits 1 on drift. Verified against a clean baseline and two planted
drifts, a detached .nanorc and a dangling link.

.mailmap maps every earlier identity to Vuong Hoang: the repo-local 'Your Name'
placeholder config (now removed), host-generated emails, and aider suffixes.

CLAUDE.md: the symlink warning now lists every linked file and points at --check.
README: documents what is and isn't tracked under .claude, the edit rule, and --check.
This commit is contained in:
vh
2026-09-24 09:07:16 -07:00
parent 77225b01d6
commit 7b16be02bf
49 changed files with 2675 additions and 4 deletions
+1
View File
@@ -0,0 +1 @@
**/.claude/settings.local.json
+30
View File
@@ -0,0 +1,30 @@
# Per-repo Claude Code login: a `.claude-config-dir` marker at (or above) the
# cwd names a config dir; while inside that tree CLAUDE_CONFIG_DIR points at
# $HOME/.claude-<name> (or an absolute path if the marker holds one), so
# `claude` and `dev-launch claude` both pick up that login. Leaving the tree
# restores whatever was set before. Sourced from ~/.zshrc.
_claude_config_dir_apply() {
local dir="$PWD" marker="" name=""
while [[ "$dir" != "/" && -n "$dir" ]]; do
if [[ -f "$dir/.claude-config-dir" ]]; then marker="$dir/.claude-config-dir"; break; fi
dir="${dir:h}"
done
if [[ -z "$marker" ]]; then
if [[ -n "${_CLAUDE_CONFIG_DIR_BY_HOOK:-}" ]]; then
if [[ -n "${_CLAUDE_CONFIG_DIR_PREV:-}" ]]; then export CLAUDE_CONFIG_DIR="$_CLAUDE_CONFIG_DIR_PREV"; else unset CLAUDE_CONFIG_DIR; fi
unset _CLAUDE_CONFIG_DIR_BY_HOOK _CLAUDE_CONFIG_DIR_PREV
fi
return
fi
name="$(<"$marker")"; name="${name//[[:space:]]/}"
[[ -z "$name" ]] && return
local target
if [[ "$name" == /* ]]; then target="$name"; else target="$HOME/.claude-$name"; fi
if [[ -z "${_CLAUDE_CONFIG_DIR_BY_HOOK:-}" ]]; then _CLAUDE_CONFIG_DIR_PREV="${CLAUDE_CONFIG_DIR:-}"; fi
_CLAUDE_CONFIG_DIR_BY_HOOK=1
export CLAUDE_CONFIG_DIR="$target"
[[ -d "$target" ]] || print -u2 "claude-config-dir: $target does not exist yet — run: claude-config-dir-init $target"
}
autoload -Uz add-zsh-hook
add-zsh-hook chpwd _claude_config_dir_apply
_claude_config_dir_apply