Skip to content

Commit 1f4369d

Browse files
authored
chore: make AGENTS.md canonical, point CLAUDE.md at it with @AGENTS.md (#4142)
Tested to confirm that Claude Code picks up the `@AGENTS.md` automatically with no agent turns.
1 parent 618b921 commit 1f4369d

3 files changed

Lines changed: 293 additions & 354 deletions

File tree

.github/workflows/claude-md-audit.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 📝 CLAUDE.md Audit
1+
name: 📝 Agent Instructions Audit
22

33
on:
44
pull_request:
@@ -10,7 +10,7 @@ on:
1010
- "**/*.md"
1111

1212
concurrency:
13-
group: claude-md-audit-${{ github.event.pull_request.number }}
13+
group: agent-instructions-audit-${{ github.event.pull_request.number }}
1414
cancel-in-progress: true
1515

1616
jobs:
@@ -48,29 +48,36 @@ jobs:
4848
--allowedTools "Read,Glob,Grep,Bash(git diff:*)"
4949
5050
prompt: |
51-
You are reviewing a PR to check whether any CLAUDE.md files or .claude/rules/ files need updating.
51+
You are reviewing a PR to check whether any agent instruction files need updating.
52+
53+
In this repo:
54+
- Root shared agent guidance lives in `AGENTS.md`.
55+
- Root `CLAUDE.md` is only a Claude Code adapter that imports `AGENTS.md`.
56+
- Subdirectories may still have scoped `CLAUDE.md` files.
57+
- `.claude/rules/` contains additional Claude Code guidance.
5258
5359
## Your task
5460
5561
1. Run `git diff origin/main...HEAD --name-only` to see which files changed in this PR.
56-
2. For each changed directory, check if there's a CLAUDE.md in that directory or a parent directory.
57-
3. Determine if any CLAUDE.md or .claude/rules/ file should be updated based on the changes. Consider:
62+
2. For each changed directory, check the applicable instruction files: root `AGENTS.md`, any `CLAUDE.md` in that directory or a parent directory, and relevant `.claude/rules/` files.
63+
3. Determine if any instruction file should be updated based on the changes. Consider:
5864
- New files/directories that aren't covered by existing documentation
59-
- Changed architecture or patterns that contradict current CLAUDE.md guidance
60-
- New dependencies, services, or infrastructure that Claude should know about
61-
- Renamed or moved files that are referenced in CLAUDE.md
65+
- Changed architecture or patterns that contradict current agent guidance
66+
- New dependencies, services, or infrastructure that agents should know about
67+
- Renamed or moved files that are referenced in an instruction file
6268
- Changes to build commands, test patterns, or development workflows
6369
6470
## Response format
6571
6672
If NO updates are needed, respond with exactly:
67-
CLAUDE.md files look current for this PR.
73+
Agent instruction files look current for this PR.
6874
6975
If updates ARE needed, respond with a short list:
70-
📝 **CLAUDE.md updates suggested:**
76+
📝 **Agent instruction updates suggested:**
77+
- `AGENTS.md`: [what should be added/changed]
7178
- `path/to/CLAUDE.md`: [what should be added/changed]
7279
- `.claude/rules/file.md`: [what should be added/changed]
7380
74-
Keep suggestions specific and brief. Only flag things that would actually mislead Claude in future sessions.
81+
Keep suggestions specific and brief. Only flag things that would actually mislead agents in future sessions.
7582
Do NOT suggest updates for trivial changes (bug fixes, small refactors within existing patterns).
76-
Do NOT suggest creating new CLAUDE.md files - only updates to existing ones.
83+
Do NOT suggest creating new CLAUDE.md files - only updates to existing instruction files.

0 commit comments

Comments
 (0)