Skip to content

chore: add AGENTS.md with repo context for agents#825

Open
MattPereira wants to merge 3 commits intomainfrom
chore/init-agent-context
Open

chore: add AGENTS.md with repo context for agents#825
MattPereira wants to merge 3 commits intomainfrom
chore/init-agent-context

Conversation

@MattPereira
Copy link
Copy Markdown
Member

@MattPereira MattPereira commented Apr 23, 2026

Summary

  • Adds AGENTS.md at the repo root covering commands, the Anvil-fork testing model, the protocolVersion (V1 CowAmm / V2 / V3) dispatch pattern, data providers, ABI/address-map locations, and conventions (Biome, dpdm, typed error factories, changesets).
  • Adds .agents/skills/changeset/SKILL.md — a tool-agnostic skill that tells agents to write .changeset/<slug>.md directly (since pnpm changeset is interactive and can't be driven from an agent), with bump-selection rules and a "when to skip" guard so PRs touching src/** don't ship without release notes.
  • Follows the emerging cross-agent convention so Claude Code, Cursor, Codex CLI, and similar tools can all load a single context file instead of per-tool files.

Why this helps agent work on this repo

  • Saves tokens. Without it, a cold agent spends thousands of tokens re-exploring src/, test/, package.json, vitest.config.mts, biome.json, and the deployment maps every session just to rediscover that V2/V3/CowAmm are dispatched off protocolVersion, that each test spins up its own Anvil fork at a pinned forkBlockNumber, that @/* maps to src/*, and where contract addresses live. That context is now one read away.
  • Raises answer quality. The file documents non-obvious invariants — the query / buildCall / buildCallWithPermit2 entity contract, maxForks: 3 cap, per-pool-type input validators, pnpm update:deployments instead of hand-editing address maps, changeset-gated releases — so agents extend existing patterns rather than inventing new ones or producing plausible-but-wrong suggestions.

Test plan

  • Skim rendered AGENTS.md on GitHub for accuracy
  • Confirm documentation-only — no source or CI changes

🤖 Generated with Claude Code

@MattPereira
Copy link
Copy Markdown
Member Author

MattPereira commented Apr 23, 2026

checkout docs for the emerging standards if interested to learn more:

scaffold ETH has pretty good example of finely tuned AGENTS.md:

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@brunoguerios brunoguerios left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a great addition 👏
I've been navigating SDKs from other organizations and these files help a lot.
Thanks for the initiative 🙏

Copy link
Copy Markdown
Member

@johngrantuk johngrantuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks Matt.

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.

3 participants