Skip to content

Commit a137be1

Browse files
committed
ci: add AGENTS.md integrity gate (reusable caller)
Wire the shared Comfy-Org/github-workflows AGENTS.md integrity check into this repo as a thin, SHA-pinned caller. It enforces the standard on every PR and push to main: root AGENTS.md under 200 lines, a CLAUDE.md `@AGENTS.md` shim, a sibling shim for every nested AGENTS.md, and no legacy .cursorrules. The checker is loaded from a pinned ref of the shared repo, never this repo's checkout, so a PR can't weaken the check. Also add a root-anchored /AGENTS.md CODEOWNERS rule (same owner as the existing **/AGENTS.md rule) so the top-level file has an explicit DRI.
1 parent b5d17f9 commit a137be1

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: AGENTS.md Integrity
2+
3+
# Thin caller for the shared reusable AGENTS.md integrity check. It enforces the
4+
# Comfy "AGENTS.md, done right" standard: one thin (<200-line) top-level
5+
# AGENTS.md as the single source of truth, a one-line `@AGENTS.md` CLAUDE.md
6+
# shim, a sibling shim for every nested (monorepo) AGENTS.md, and no divergent
7+
# .cursorrules. The checker lives in Comfy-Org/github-workflows (single source
8+
# of truth) and is loaded from the pinned `workflows_ref` — never from this
9+
# repo's checkout — so a PR can't rewrite the check.
10+
11+
on:
12+
pull_request:
13+
push:
14+
branches: [main]
15+
16+
jobs:
17+
agents-md:
18+
permissions:
19+
contents: read
20+
# SHA-pinned per zizmor `unpinned-uses: hash-pin`. Bump this SHA (and keep
21+
# `workflows_ref` matching) to pick up upstream checker changes; once this
22+
# repo is registered with the agents-md caller bump dispatcher, those SHA
23+
# bumps are opened automatically.
24+
uses: Comfy-Org/github-workflows/.github/workflows/agents-md-integrity.yml@af848b3e36ca6d6087f32b0020875cb33a5400b3 # github-workflows main (af848b3)
25+
with:
26+
workflows_ref: af848b3e36ca6d6087f32b0020875cb33a5400b3

CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,7 @@
6464

6565
# Agent instructions
6666
**/AGENTS.md @christian-byrne
67+
# Root-anchored rule so the top-level AGENTS.md has an explicit DRI (a bare
68+
# `**/`-prefixed pattern doesn't match a repo-root file in every CODEOWNERS
69+
# reader).
70+
/AGENTS.md @christian-byrne

0 commit comments

Comments
 (0)