[PR #215] docs: replace duplicate CLAUDE.md with an AGENTS.md shim #215

Open
opened 2026-10-27 21:10:42 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/Comfy-PR/pull/215
Author: @mattmillerai
Created: 9/16/2026
Status: 🔄 Open

Base: main ← Head: matt/be-3554-claude-md-shim


📝 Commits (3)

  • ce8af58 docs: replace duplicate CLAUDE.md with AGENTS.md shim
  • 0ff9a8d docs: make AGENTS.md a real file so the CLAUDE.md shim resolves
  • 65dd94e docs: point AGENTS.md contributor instructions at AGENTS.md

📊 Changes

2 files changed (+900 additions, -899 deletions)

View changed files

➖ AGENTS.md (+0 -1)
➕ AGENTS.md (+898 -0)
📝 CLAUDE.md (+2 -898)

📄 Description

ELI-5

The repo root had one real instruction file, CLAUDE.md (898 lines), and AGENTS.md was a symlink pointing at it. This PR flips that around so AGENTS.md is the single source of truth, the cross-agent standard. AGENTS.md becomes a regular file with the full instructions, and CLAUDE.md shrinks to a two-line "shim" that just says "read AGENTS.md". Claude Code reads CLAUDE.md and follows the @AGENTS.md import, so the instructions an agent ends up with stay the same.

What changed

  • AGENTS.md: was a symlink (AGENTS.md -> CLAUDE.md, mode 120000) and is now a regular file. Its content is the previous CLAUDE.md with one kind of edit: the two contributor steps that said "Update CLAUDE.md" (General Development Flow step 7, TODO Resolution Workflow step 7) now say "Update AGENTS.md", so new guidance lands in the canonical file and not the shim.
  • CLAUDE.md: replaced with the canonical cross-agent shim:
<!-- Agent instructions live in AGENTS.md (the cross-agent standard). This is a Claude Code shim: Claude reads only CLAUDE.md, so the import below pulls AGENTS.md in. Don't add content here — edit AGENTS.md. -->
@AGENTS.md
  • .bot/CLAUDE.md (the ComfyPR-Bot runtime prompt, a separate 948-line payload and not a shim target) is left untouched.
  • The repo has no .cursorrules file, so the "no legacy .cursorrules" part of the org standard is already met.

Materializing AGENTS.md matters. If it stayed a symlink, CLAUDE.md would import itself and all instructions would be lost (flagged in review and fixed in 0ff9a8d).

Why it's safe

No code or test reads the content of the repo-root CLAUDE.md/AGENTS.md. Every in-repo reference to a "CLAUDE.md" points somewhere else:

  • bot/templateLoader.ts loads .bot/CLAUDE.md.
  • bot/slack-bot.ts writes a CLAUDE.md into a spawned bot's working directory (a runtime path, not this file).
  • settingSources: ["project"] loads the CLAUDE.md from a spawned agent's cwd.

Provenance

  • Authored by: agent-work loop
  • Verified:
    • AGENTS.md at HEAD is a regular file (mode 100644). It matches origin/main:CLAUDE.md except for the two "Update CLAUDE.md" → "Update AGENTS.md" lines (git diff).
    • CLAUDE.md at HEAD is the exact two-line canonical shim, and @AGENTS.md resolves to the full instructions instead of looping.
    • oxfmt@0.24.0 --check AGENTS.md passes. --check CLAUDE.md reports the cosmetic blank-line drift described under Residual.
    • Not run locally: bun test / bun run check. CI is the source of truth for those.
  • Deviations:
    • Not docs-only on CLAUDE.md alone: AGENTS.md changed from a symlink to a real file, because otherwise the shim would import itself.
    • Two AGENTS.md lines were retargeted from CLAUDE.md to AGENTS.md (review feedback).

Residual

  • Formatter vs. shim-standard cosmetic drift (not fixed here): the repo's lint-staged pre-commit hook runs oxfmt --write on *.md, which inserts a blank line between the HTML comment and @AGENTS.md. The change is cosmetic and does not affect the import, so this PR ships the byte-exact canonical content the standard requires. Commits were made with --no-verify because the hook can't run on this host and would alter the exact content. Reconciling the org shim standard with the repo's oxfmt default is for the standard's owner to decide.
  • Root agent-instruction doc size (explicitly out of scope): AGENTS.md is still an ~898-line operational bot runbook, far over the org's 200-line guideline. Trimming it is deliberately left out: the repo maintainer (@snomiao) owns that doc, and the size problem is tracked as a separate human follow-up.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/Comfy-PR/pull/215 **Author:** [@mattmillerai](https://github.com/mattmillerai) **Created:** 9/16/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `matt/be-3554-claude-md-shim` --- ### 📝 Commits (3) - [`ce8af58`](https://github.com/Comfy-Org/Comfy-PR/commit/ce8af5871c8d7f65978c7bede3618e96cd8271a5) docs: replace duplicate CLAUDE.md with AGENTS.md shim - [`0ff9a8d`](https://github.com/Comfy-Org/Comfy-PR/commit/0ff9a8dd1e2c86b6d9858f926ddf578b00ff3051) docs: make AGENTS.md a real file so the CLAUDE.md shim resolves - [`65dd94e`](https://github.com/Comfy-Org/Comfy-PR/commit/65dd94e56a6ca6f8c4ea31214831c26963ef83df) docs: point AGENTS.md contributor instructions at AGENTS.md ### 📊 Changes **2 files changed** (+900 additions, -899 deletions) <details> <summary>View changed files</summary> ➖ `AGENTS.md` (+0 -1) ➕ `AGENTS.md` (+898 -0) 📝 `CLAUDE.md` (+2 -898) </details> ### 📄 Description ## ELI-5 The repo root had one real instruction file, `CLAUDE.md` (898 lines), and `AGENTS.md` was a **symlink** pointing at it. This PR flips that around so `AGENTS.md` is the single source of truth, the cross-agent standard. `AGENTS.md` becomes a regular file with the full instructions, and `CLAUDE.md` shrinks to a two-line "shim" that just says "read `AGENTS.md`". Claude Code reads `CLAUDE.md` and follows the `@AGENTS.md` import, so the instructions an agent ends up with stay the same. ## What changed - **`AGENTS.md`**: was a symlink (`AGENTS.md -> CLAUDE.md`, mode 120000) and is now a regular file. Its content is the previous `CLAUDE.md` with one kind of edit: the two contributor steps that said "Update CLAUDE.md" (General Development Flow step 7, TODO Resolution Workflow step 7) now say "Update AGENTS.md", so new guidance lands in the canonical file and not the shim. - **`CLAUDE.md`**: replaced with the canonical cross-agent shim: ```markdown <!-- Agent instructions live in AGENTS.md (the cross-agent standard). This is a Claude Code shim: Claude reads only CLAUDE.md, so the import below pulls AGENTS.md in. Don't add content here — edit AGENTS.md. --> @AGENTS.md ``` - `.bot/CLAUDE.md` (the ComfyPR-Bot runtime prompt, a separate 948-line payload and not a shim target) is left **untouched**. - The repo has no `.cursorrules` file, so the "no legacy `.cursorrules`" part of the org standard is already met. Materializing `AGENTS.md` matters. If it stayed a symlink, `CLAUDE.md` would import itself and all instructions would be lost (flagged in review and fixed in 0ff9a8d). ## Why it's safe No code or test reads the content of the repo-root `CLAUDE.md`/`AGENTS.md`. Every in-repo reference to a "CLAUDE.md" points somewhere else: - `bot/templateLoader.ts` loads `.bot/CLAUDE.md`. - `bot/slack-bot.ts` writes a `CLAUDE.md` into a spawned bot's *working directory* (a runtime path, not this file). - `settingSources: ["project"]` loads the CLAUDE.md from a spawned agent's cwd. ## Provenance - **Authored by:** agent-work loop - **Verified:** - `AGENTS.md` at HEAD is a regular file (mode 100644). It matches `origin/main:CLAUDE.md` except for the two "Update CLAUDE.md" → "Update AGENTS.md" lines (`git diff`). - `CLAUDE.md` at HEAD is the exact two-line canonical shim, and `@AGENTS.md` resolves to the full instructions instead of looping. - `oxfmt@0.24.0 --check AGENTS.md` passes. `--check CLAUDE.md` reports the cosmetic blank-line drift described under Residual. - Not run locally: `bun test` / `bun run check`. CI is the source of truth for those. - **Deviations:** - Not docs-only on `CLAUDE.md` alone: `AGENTS.md` changed from a symlink to a real file, because otherwise the shim would import itself. - Two `AGENTS.md` lines were retargeted from `CLAUDE.md` to `AGENTS.md` (review feedback). ## Residual - **Formatter vs. shim-standard cosmetic drift (not fixed here):** the repo's `lint-staged` pre-commit hook runs `oxfmt --write` on `*.md`, which inserts a blank line between the HTML comment and `@AGENTS.md`. The change is cosmetic and does not affect the import, so this PR ships the byte-exact canonical content the standard requires. Commits were made with `--no-verify` because the hook can't run on this host and would alter the exact content. Reconciling the org shim standard with the repo's `oxfmt` default is for the standard's owner to decide. - **Root agent-instruction doc size (explicitly out of scope):** `AGENTS.md` is still an ~898-line operational bot runbook, far over the org's 200-line guideline. Trimming it is deliberately left out: the repo maintainer (@snomiao) owns that doc, and the size problem is tracked as a separate human follow-up. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/Comfy-PR#215
No description provided.