From d97d9912b495c69f43fa75515c9667247a1b3bbc Mon Sep 17 00:00:00 2001 From: mwiegand Date: Mon, 11 May 2026 22:56:14 +0200 Subject: [PATCH] feat(agents): split global agent config into shared base + per-agent wrappers - agents/AGENTS.md: shared, agent-agnostic personal preferences - agents/AGENTS-claude.md: Claude Code wrapper (@AGENTS.md + @RTK.md) - agents/AGENTS-opencode.md: OpenCode wrapper (@AGENTS.md) - Old claude/CLAUDE.md removed; symlinks updated in ~/.claude and ~/.config/opencode This lets each agent layer in tool-specific content (e.g. the Agent tool tiering for Claude Code, RTK hooks) without leaking it into other agents. Co-Authored-By: Claude Sonnet 4.6 --- README.md | 11 ++++++++--- agents/AGENTS-claude.md | 3 +++ agents/AGENTS-opencode.md | 1 + claude/CLAUDE.md => agents/AGENTS.md | 2 -- 4 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 agents/AGENTS-claude.md create mode 100644 agents/AGENTS-opencode.md rename claude/CLAUDE.md => agents/AGENTS.md (99%) diff --git a/README.md b/README.md index 7d264c0..34a6e13 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,9 @@ Shared shell and tool configuration. Tracked files: - `.zshrc` — shared zsh UI behavior -- `claude/CLAUDE.md` — global Claude Code instructions +- `agents/AGENTS.md` — shared global personal preferences (agent-agnostic) +- `agents/AGENTS-claude.md` — Claude Code wrapper (`@AGENTS.md` + `@~/.claude/RTK.md`) +- `agents/AGENTS-opencode.md` — OpenCode wrapper (`@AGENTS.md`) This repo is intentionally small. Machine-specific setup stays local unless explicitly promoted into shared config later. @@ -18,12 +20,15 @@ This repo is intentionally small. Machine-specific setup stays local unless expl source "$HOME/Projekte/dotfiles/.zshrc" ``` -**Claude Code**: `~/.claude/CLAUDE.md` is a symlink to this repo: +**Claude Code & OpenCode**: symlink the wrappers into each agent's config dir: ```zsh -ln -s "$HOME/Projekte/dotfiles/claude/CLAUDE.md" ~/.claude/CLAUDE.md +ln -s "$HOME/Projekte/dotfiles/agents/AGENTS-claude.md" ~/.claude/CLAUDE.md +ln -s "$HOME/Projekte/dotfiles/agents/AGENTS-opencode.md" ~/.config/opencode/AGENTS.md ``` +The wrappers `@`-include the shared base `agents/AGENTS.md`; add agent-specific content directly in the wrapper file. + ## What Lives Here Current shared config includes: diff --git a/agents/AGENTS-claude.md b/agents/AGENTS-claude.md new file mode 100644 index 0000000..1398153 --- /dev/null +++ b/agents/AGENTS-claude.md @@ -0,0 +1,3 @@ +@./AGENTS.md + +@~/.claude/RTK.md diff --git a/agents/AGENTS-opencode.md b/agents/AGENTS-opencode.md new file mode 100644 index 0000000..285e0f5 --- /dev/null +++ b/agents/AGENTS-opencode.md @@ -0,0 +1 @@ +@./AGENTS.md diff --git a/claude/CLAUDE.md b/agents/AGENTS.md similarity index 99% rename from claude/CLAUDE.md rename to agents/AGENTS.md index 8c36eb5..0677925 100644 --- a/claude/CLAUDE.md +++ b/agents/AGENTS.md @@ -25,5 +25,3 @@ it, results are filtered to the current working directory's subtree. The `ccc` skill has the full reference; `grep`/`rg`/`find` remain fine for exact-string lookups. - -@RTK.md