Skip to content

Make agents-md-revise respect first-match-wins rules loading#6

Merged
waybarrios merged 1 commit into
mainfrom
agents-md-revise-rules-nuance
May 28, 2026
Merged

Make agents-md-revise respect first-match-wins rules loading#6
waybarrios merged 1 commit into
mainfrom
agents-md-revise-rules-nuance

Conversation

@waybarrios

Copy link
Copy Markdown
Owner

Summary

  • agents-md-revise told the model to "edit whichever rules file the project already uses." Under OpenCode's first-match-wins resolution, a CLAUDE.md co-located with an AGENTS.md is never read — so learnings captured there are silently lost.
  • The skill now describes first-match-wins and directs capture to AGENTS.md when both files exist (never the shadowed CLAUDE.md), reinforced in the "where each addition belongs" step.
  • New tests/agents-md-revise.test.mjs guards the fix; the command stays in sync.

Validation

  • Deterministic: npm test -> 63/63 pass (incl. 3 new agents-md-revise guards).
  • Behavioral — fixture with both AGENTS.md and CLAUDE.md, capturing a make ci learning:
    • DeepSeek V4 Flash Free -> proposed the update to AGENTS.md: "the CLAUDE.md would be ignored by OpenCode."
    • GPT-5.5 -> same: "CLAUDE.md is shadowed because AGENTS.md exists in the same directory."
    • Both correctly targeted AGENTS.md and avoided the shadowed CLAUDE.md.

The skill told the model to "edit whichever rules file the project already
uses." Under OpenCode's first-match-wins resolution, a CLAUDE.md co-located
with an AGENTS.md is never read, so learnings captured there would be silently
lost. The skill now describes first-match-wins and directs capture to
AGENTS.md when both exist (never the shadowed CLAUDE.md), reinforced in the
"where each addition belongs" step. A test guards it; command kept in sync.
@waybarrios waybarrios merged commit a2b5459 into main May 28, 2026
1 check passed
@waybarrios waybarrios deleted the agents-md-revise-rules-nuance branch May 28, 2026 17:02
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