Skip to content

fix: stop pointing agents at CLAUDE.md; AGENTS.md is the source of truth - #338

Open
Patel230 wants to merge 1 commit into
mainfrom
chore/agents-md-single-source
Open

Patel230 wants to merge 1 commit into
mainfrom
chore/agents-md-single-source

Conversation

@Patel230

Copy link
Copy Markdown
Contributor

Makes AGENTS.md the single source of truth in rho's own guidance.

Changes

Site Before After
internal/engine/adaptive_system_prompt.go "conventions documented in AGENTS.md and CLAUDE.md" AGENTS.md only
internal/autoinit/autoinit.go gate list included CLAUDE.md AGENTS.md, RHO.md, CONTEXT.md
cmd/autoinit.go, autoinit doc comments mentioned CLAUDE.md updated
cmd/context_export.go {"AGENTS.md", "AGENTS.md", "CLAUDE.md", ".rho.md"} {"AGENTS.md", ".rho.md"}

Drive-by bug fix

cmd/context_export.go listed AGENTS.md twice, so the exporter read the same file and emitted a duplicate ## Project Instructions (AGENTS.md) section. Fixed as part of trimming that list.

Deliberately NOT changed

internal/rules/ (FormatClaudeCode, readClaudeCode/writeClaudeCode) and config.loadCrossAgentInstructions stay as they are. That is interop, not rho's own config — it lets people migrating in from Claude Code, Cursor, Copilot and Gemini keep their existing rules. Removing it would delete a migration feature.

Verification

go build ./... clean, gofumpt -l clean, tests pass across internal/autoinit, internal/config, internal/rules, internal/engine/..., cmd/....

🤖 Generated with Claude Code

rho's own guidance advertised CLAUDE.md alongside AGENTS.md. Since
AGENTS.md is now the single source of truth, drop it from:

- the adaptive system prompt ("Follow project-specific conventions
  documented in AGENTS.md and CLAUDE.md")
- the auto-init context-file gate and its doc comments
- `rho context export`

Also fixes a pre-existing bug in cmd/context_export.go: the instruction
file list was {"AGENTS.md", "AGENTS.md", "CLAUDE.md", ".rho.md"} --
AGENTS.md appeared twice, so it was read and emitted two times.

internal/rules and config.loadCrossAgentInstructions are deliberately
untouched: those are interop, letting users migrating from Claude Code,
Cursor, Copilot and Gemini import their existing rules into rho.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant