Extract project conventions into AGENTS.md; slim CLAUDE.md#2703
Conversation
There was a problem hiding this comment.
Pull request overview
This PR restructures the repository’s AI-agent guidance so that project conventions live in a tool-agnostic document (AGENTS.md), while CLAUDE.md becomes a small Claude Code entrypoint that defers to the shared conventions.
Changes:
- Add
AGENTS.mdcontaining the previously shared, agent-neutral guidance (commands, architecture, coding standards, docs style, etc.). - Replace the bulk of
CLAUDE.mdwith a short pointer toAGENTS.md, reservingCLAUDE.mdfor future Claude-specific overrides.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
CLAUDE.md |
Slimmed to a Claude Code-specific pointer to the shared conventions in AGENTS.md. |
AGENTS.md |
New shared conventions document intended to be reused across multiple AI coding agents/tools. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9f26fb3 to
e83e9d0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2703 +/- ##
=======================================
Coverage 98.04% 98.04%
=======================================
Files 105 105
Lines 7867 7867
=======================================
Hits 7713 7713
Misses 154 154 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
pankajkoti
left a comment
There was a problem hiding this comment.
Not sure of the impacts, but let's try and see.
Add a short "AI agent attribution" subsection to `AGENTS.md`: when a commit or PR is drafted with an AI coding agent, give the agent credit via a `🤖 Generated with …` marker line rather than a `Co-Authored-By` trailer, so the GitHub contributor graph stays human-only. Stacked on #2703 (which introduces `AGENTS.md`); GitHub will auto-retarget to `main` once #2703 merges. 🤖 Generated with Claude Code (https://claude.com/claude-code)
Move all agent-neutral project guidance (commands, architecture, coding standards, commit-message format, documentation style, etc.) out of CLAUDE.md and into a new AGENTS.md so that other AI coding agents -- Cursor, Codex, Copilot, and so on -- read the same single source of truth. CLAUDE.md becomes a thin pointer that defers to AGENTS.md and is reserved for Claude Code-specific instructions. There are currently none, so the file is intentionally short; future Claude-only overrides should accumulate there rather than diverging from the shared baseline. The content moved is byte-identical to what CLAUDE.md previously contained, with one exception: the introductory paragraph in AGENTS.md is rewritten in agent-neutral language to make the intended audience explicit and to point at CLAUDE.md as the canonical place for Claude-only overrides. This PR is stacked on top of #2702 (claude-md-require-precommit) so the pre-commit rule it adds is already present in AGENTS.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add a short "AI agent attribution" subsection to `AGENTS.md`: when a commit or PR is drafted with an AI coding agent, give the agent credit via a `🤖 Generated with …` marker line rather than a `Co-Authored-By` trailer, so the GitHub contributor graph stays human-only. Stacked on #2703 (which introduces `AGENTS.md`); GitHub will auto-retarget to `main` once #2703 merges. 🤖 Generated with Claude Code (https://claude.com/claude-code)
- Add ``AGENTS.md`` to the ``Check-changed-files`` allowlist in ``.github/workflows/test.yml`` so docs-only ``AGENTS.md`` edits do not trigger the full unit/integration test matrix. Mirrors how ``CLAUDE.md`` is already handled on the same allowlist. - Change British "behaviour" to American "behavior" in the ``AGENTS.md`` intro paragraph for consistency with the rest of the document, which uses American spelling throughout (e.g., "Test Behavior"). 🤖 Generated with Claude Code (https://claude.com/claude-code)
a77495e to
6aa1380
Compare
|
Status update on this PR:
@pankajkoti — the previous approval was on the pre-rebase commit hash and has been invalidated by the force-push. Could you take another look? |
Summary
Make the project's agent guidance reusable across AI coding tools:
CLAUDE.md(commands, architecture, coding standards, commit-message format, documentation style, etc.) into a new top-levelAGENTS.md. The content is byte-identical apart from the introductory paragraph, which is rewritten in agent-neutral language and namesCLAUDE.mdas the canonical place for Claude-only overrides.CLAUDE.mdto a small pointer that defers toAGENTS.md. The pointer remains the file Claude Code reads on session start, but it no longer duplicates project conventions. Claude-specific instructions can accumulate there in the future without diverging from the shared baseline.🤖 Generated with …marker, never via aCo-Authored-Bytrailer (that surfaces in the GitHub contributor graph andgit shortlog, which should stay human-only).AGENTS.mdto theCheck-changed-filesallowlist in.github/workflows/test.ymlso docs-only edits toAGENTS.mddon't trigger the full unit/integration matrix, mirroring howCLAUDE.mdis already handled.This unlocks other agents — Cursor, Codex, Copilot, etc. — using the same conventions Claude already does, without us maintaining parallel copies.
Review feedback addressed
AGENTS.mdto theCheck-changed-filesallowlist in.github/workflows/test.yml(mirrors the existingCLAUDE.mdline).AGENTS.mdintro paragraph for consistency with the rest of the document.Rebased onto main
The original revision was stacked on
claude-md-require-precommit(PR #2702). #2702 has since squash-merged to main (commitea04d0da), so this branch has been rebased onto the currentmain. The redundant pre-squash commits were dropped during rebase (693c3d9cidentified as "patch contents already upstream";f8a6bf03skipped manually).The companion attribution-convention PR #2718 has also been folded into this branch since it built on top of
claude-md-extract-agents-md.Test plan
pre-commit run --files CLAUDE.md AGENTS.md .github/workflows/test.yml— all applicable hooks pass locally..github/workflows/test.yml, which is not — and should not be — on the allowlist). Future docs-onlyAGENTS.mdPRs will skip the matrix.🤖 Generated with Claude Code (https://claude.com/claude-code)