From 2602b3846c9312531dce1190dceea13b86ffab90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81s=20Sainz=20de=20Aja?= Date: Mon, 6 Jul 2026 23:14:14 +0200 Subject: [PATCH] fix(agents): symlink AGENTS.md into ~/.claude for @import # Current problem ~/.claude/CLAUDE.md contains only `@AGENTS.md` but no sibling AGENTS.md exists in ~/.claude. The import only resolves because Claude follows the symlink back to the repo dir, which is fragile and non-obvious. # Proposed solution Symlink configs/agents/AGENTS.md into ~/.claude/ so @AGENTS.md resolves locally, independent of symlink realpath behavior. Document the new destination in the config table. --- CLAUDE.md | 1 + scripts/shell.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 42b594b..0a61d76 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -59,6 +59,7 @@ ShellCheck runs on every push via `.github/workflows/lint.yml`. Fixes should pas | mise runtimes | `configs/mise/config.toml` | `~/.config/mise/config.toml` | | branchpilot | `configs/branchpilot/branchpilot.toml` | `~/.config/branchpilot.toml` | | Claude Code | `configs/agents/CLAUDE.md` | `~/.claude/CLAUDE.md` | +| Claude Code rules | `configs/agents/AGENTS.md` | `~/.claude/AGENTS.md` | | Codex | `configs/agents/AGENTS.md` | `~/.codex/AGENTS.md` | ### Aliases diff --git a/scripts/shell.sh b/scripts/shell.sh index 033289b..2d4ab54 100755 --- a/scripts/shell.sh +++ b/scripts/shell.sh @@ -42,6 +42,7 @@ mkdir -p "$HOME/.config/ghostty" symlink "$REPO_PATH/configs/ghostty/themes" "$HOME/.config/ghostty/themes" mkdir -p "$HOME/.claude" symlink "$REPO_PATH/configs/agents/CLAUDE.md" "$HOME/.claude/CLAUDE.md" +symlink "$REPO_PATH/configs/agents/AGENTS.md" "$HOME/.claude/AGENTS.md" mkdir -p "$HOME/.codex" symlink "$REPO_PATH/configs/agents/AGENTS.md" "$HOME/.codex/AGENTS.md"