ADR-0007: Single AGENTS.md Spine with Tool-Specific Context Derivatives
ADR-0007: Single AGENTS.md Spine with Tool-Specific Context Derivatives
Section titled “ADR-0007: Single AGENTS.md Spine with Tool-Specific Context Derivatives”Status: Accepted Date: 2026-07-06 Epic: e37 (Reach — Universal Agent Portability)
Context
Section titled “Context”Before e37, bigpowers maintained multiple tool-specific context files:
CLAUDE.md— operational root doc for Claude Code (also read by Cursor)GEMINI.md— root doc for Gemini CLIopencode.json— OpenCode configuration.aider.conf.yml— Aider bridge configuration
Each was written independently, causing drift between files, unclear ownership, and maintenance burden. Users running multiple agent tools (e.g., Cursor + Cline + Aider) needed duplicate setup steps.
The epic redesign (2026-07-06) merged e50 (AGENTS.md spine) and e52 (Integration Registry) into one portability arc. The convergence question was: should bigpowers maintain N context files (one per tool) or converge on a single source of truth?
Options Considered
Section titled “Options Considered”Option A: Multi-file (status quo ante)
Section titled “Option A: Multi-file (status quo ante)”- Each tool gets its own context file (CLAUDE.md, GEMINI.md, etc.)
- Each file contains the same bigpowers instructions in different formatting
- Pro: Familiar to users of each tool
- Con: Drift, maintenance burden, inconsistent coverage, higher cognitive load for multi-tool users
Option B: Single AGENTS.md spine with symlink derivatives (selected)
Section titled “Option B: Single AGENTS.md spine with symlink derivatives (selected)”- One
AGENTS.mdis the canonical source of truth - Tool-specific files (
CLAUDE.md,GEMINI.md, etc.) become symlinks to AGENTS.md - Tools that read AGENTS.md natively get no derivative (Cline, native AGENTS.md readers)
- Tools requiring a config bridge get
.aider.conf.ymlpointing at AGENTS.md - Declared in
scripts/targets.yamlper target viacontext.mode
Option C: Single AGENTS.md spine with content-copy derivatives
Section titled “Option C: Single AGENTS.md spine with content-copy derivatives”- Same single source as Option B
- But copies the file content rather than symlinking
- Pro: Works on Windows without Developer Mode; survives file moves
- Con: Drift possible if copy is not refreshed; hash-based matrix check needed
Decision
Section titled “Decision”Adopt Option B as the primary strategy with Option C as fallback:
AGENTS.mdis the single canonical source for all bigpowers instructions.- Tool-specific context files are Context Derivatives — generated artifacts, not sources.
- Default mode is symlink (
AGENTS.md→CLAUDE.mdon POSIX). - copy fallback when symlink fails (Windows without Developer Mode, CI sandboxes).
context.modeintargets.yamldeclares per-target strategy:native— tool reads AGENTS.md directly (no derivative)symlink— create symlink to AGENTS.mdcopy— content copy of AGENTS.mdconfig-bridge— write config file referencing AGENTS.md
- The Integration Registry (
scripts/targets.yaml) is the single source for which derivatives exist, using which mode.
Consequences
Section titled “Consequences”Positive
Section titled “Positive”- Single source of truth — no drift between CLAUDE.md and GEMINI.md
- New tool integration = one registry row, not a new context file
generate-context-bundle.shregenerates all derivatives from one commandverify-install.sh --matrixdetects drift via hash comparison- Multi-tool users get consistent instructions across all tools
Negative
Section titled “Negative”- Symlinks break on Windows without Developer Mode — mitigated by copy fallback
- Tools that don’t follow symlinks (some CI sandboxes) need explicit copy mode
- Legacy users expecting
CLAUDE.mdmay be confused (mitigated by CLAUDE.md symlink) open codecommand in some editors may not follow symlinks
Migration
Section titled “Migration”- Old
CLAUDE.mdcontent moves toAGENTS.mdas canonical source CLAUDE.mdbecomes a Context Derivative (managed symlink)seed-conventionsemits AGENTS.md fromdocs/templates/AGENTS.mdverify-install.shasserts AGENTS.md shape (Preflight row, multi-agent preamble, etc.)- All existing consumers (CI scripts, hooks, docs) that read CLAUDE.md continue to work via symlink
References
Section titled “References”- epic.yaml (e37 Reach — Universal Agent Portability)
- docs/templates/AGENTS.md (canonical template)
- scripts/targets.yaml (Integration Registry — target declarations)
- scripts/lib/context-wire.sh (symlink_or_copy implementation)
- specs/tech-architecture/tech-stack.md § Reach Domain (invariants 13–25)