AGENTS.md @import vs cat-concat — evaluation
Section titled “AGENTS.md @import vs cat-concat — evaluation”Question: Could ai-config’s SSOT (AGENTS.md → CLAUDE.md via deploy.sh cat-concat) be improved by switching to Claude Code’s native @AGENTS.md import syntax (per Medium article on Anthropic declining native AGENTS.md support)?
Verdict: no change. Current cat-concat approach kept.
Findings:
- Confirmed via official docs (
code.claude.com/docs/en/memory):@AGENTS.mdimport is Anthropic’s documented bridge pattern — but it loads full file content into context at session start, same token cost as concat. No context savings either way. - User-scope imports (
~/.claude/CLAUDE.md) load without an approval dialog (only project-scope external imports trigger it) — so approval friction isn’t a blocker. - Real blocker: WSL/Windows duality.
ai-config(source AGENTS.md) lives only in WSL home (~/ai-config). Windows Claude Code (C:\Users\Admin\.claude\CLAUDE.md) would need a live cross-filesystem import (\\wsl$\...) — unverified reliability, no docs confirmation. - Current
deploy.shcat-concat already delivers the article’s recommended outcome (one AGENTS.md SSOT, thin per-tool wrapper) for both WSL and Windows targets uniformly, no cross-filesystem dependency. - Staleness concern (concat’s theoretical downside) is already closed —
post-commithook auto-runsdeploy.shon every ai-config commit.
Outcome: no code/config change. Current SSOT design already implements the substance of Anthropic’s own recommended pattern, plus solves cross-platform delivery the import approach doesn’t obviously handle.