You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Commit root AGENTS.md/CLAUDE.md symlinks so agents auto-load conventions
Track the root AGENTS.md/CLAUDE.md symlinks (-> .ai/AGENTS.md) instead of
generating them via `make claude`/`make codex`, so a fresh clone auto-loads
the agent guide with no setup step (matching transformers). The make targets
now only wire up skills; .ai/AGENTS.md, the contribution doc, and the PR
template are updated to match.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Add documentation-impact check to PR review rules
During review, scan related usage docs and agent docs and flag (advisory)
any that should be updated based on the PR — outdated/missing usage docs, or
a rule/pattern/gotcha worth recording in the agent guides.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .ai/review-rules.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,13 @@ Common mistakes are covered in the common-mistakes / gotcha sections in [AGENTS.
15
15
16
16
-**Ephemeral context.** Comments, docstrings, and files that only made sense to the current PR's author or reviewer don't help a future reader/user/developer. Examples: `# per reviewer comment on PR #NNNN`, `# as discussed in review`, `# TODO from offline chat`, debug printouts. Same for files: parity harnesses, comparison scripts, anything in `scripts/` with hardcoded developer paths or imports from the reference repo. State the *reason* so the comment stands alone, or drop it.
17
17
18
+
## Documentation impact
19
+
20
+
A PR can leave existing docs stale or surface a pattern worth recording. Scan the docs related to what the PR touches and flag updates as a **suggestions / additional info** section (not blocking):
21
+
22
+
-**Usage docs.** New or changed public behavior — a new pipeline/model, a new argument, changed defaults, a renamed API — should have matching updates in `docs/`, docstrings, and examples. Flag any that now describe outdated behavior or that are missing for the new surface.
23
+
-**Agent docs.** If the review turns up a rule, pattern, or common gotcha that isn't written down yet — especially one the author got wrong or that you had to reason out — propose adding it to the relevant agent guide ([AGENTS.md](AGENTS.md), [models.md](models.md), [pipelines.md](pipelines.md), [modular.md](modular.md), a skill, or this file) so the next contributor/agent gets it for free instead of repeating the mistake.
24
+
18
25
## Dead code analysis (new models)
19
26
20
27
When reviewing a PR that adds a new model, trace how the model is actually called from the pipeline to identify likely dead code. Include the results as a **suggestions / additional info** section in your review (not as blocking comments — the findings are advisory).
Copy file name to clipboardExpand all lines: .github/PULL_REQUEST_TEMPLATE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Fixes # (issue)
17
17
18
18
## Before submitting
19
19
-[ ] Did you use an AI agent (Claude Code, Codex, Cursor, etc.) to help with this PR? If so:
20
-
-[ ] Did you point it at the project conventions in [`.ai/`](https://github.com/huggingface/diffusers/tree/main/.ai) (e.g. via `make claude` / `make codex`)? See [Coding with AI agents](https://huggingface.co/docs/diffusers/main/en/conceptual/contribution#coding-with-ai-agents).
20
+
-[ ] Did you read the [Coding with AI agents](https://huggingface.co/docs/diffusers/main/en/conceptual/contribution#coding-with-ai-agents) guide?
21
21
-[ ] Did you self-review the diff against [`.ai/review-rules.md`](https://github.com/huggingface/diffusers/blob/main/.ai/review-rules.md)?
22
22
-[ ] Did you read the [contributor guideline](https://huggingface.co/docs/diffusers/main/en/conceptual/contribution)?
23
23
-[ ] Did you read our [philosophy doc](https://huggingface.co/docs/diffusers/main/en/conceptual/philosophy)? (important for complex PRs)
Copy file name to clipboardExpand all lines: docs/source/en/conceptual/contribution.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -570,9 +570,9 @@ For documentation strings, 🧨 Diffusers follows the [Google style](https://goo
570
570
571
571
## Coding with AI agents
572
572
573
-
The repository keeps AI-agent configuration in [`.ai/`](https://github.com/huggingface/diffusers/tree/main/.ai) and exposes local agent files via symlinks. If you use a coding agent (Claude Code, OpenAI Codex, etc.) to help with a contribution, point it at this directory — it contains the project conventions and on-demand task knowledge maintainers expect contributors to follow.
573
+
The repository keeps AI-agent configuration in [`.ai/`](https://github.com/huggingface/diffusers/tree/main/.ai). Run `make claude` / `make codex`to additionally wire up the on-demand task skills for your tool.
574
574
575
-
-**Read-only for contributors** — `.ai/` is maintained by the core maintainers. Please do not edit files under `.ai/` (or the generated root-level `AGENTS.md`, `CLAUDE.md`, `.agents/skills`, `.claude/skills`, which are symlinks) in your PR. If you find something missing or wrong, open an issue or flag it on the PR and a maintainer will update it.
575
+
-**Read-only for contributors** — `.ai/` is maintained by the core maintainers. Please do not edit files under `.ai/` (or the root-level `AGENTS.md` / `CLAUDE.md` symlinks, or the generated `.agents/skills` / `.claude/skills`) in your PR. If you find something missing or wrong, open an issue or flag it on the PR and a maintainer will update it.
576
576
-**Guidelines** (loaded into every agent session):
-[`.ai/models.md`](https://github.com/huggingface/diffusers/blob/main/.ai/models.md) — attention pattern, model implementation rules, common conventions
@@ -583,9 +583,9 @@ The repository keeps AI-agent configuration in [`.ai/`](https://github.com/huggi
583
583
-`model-integration` — adding a new model or pipeline to diffusers end-to-end (file structure, integration checklist, testing layout, weight conversion)
584
584
-`self-review` — review your changes against the project rules before opening a PR
585
585
-**Setup commands**:
586
-
-`make codex` — symlink guidelines + skills for OpenAI Codex
587
-
-`make claude` — symlink guidelines + skills for Claude Code
588
-
-`make clean-ai` — remove all generated symlinks
586
+
-`make codex` — wire up skills for OpenAI Codex (under `.agents/`)
587
+
-`make claude` — wire up skills for Claude Code (under `.claude/`)
588
+
-`make clean-ai` — remove the generated skills symlinks
0 commit comments