Skip to content

[agents docs] review-rules: add Tripwires section#13775

Open
yiyixuxu wants to merge 1 commit into
mainfrom
agents-tripwires
Open

[agents docs] review-rules: add Tripwires section#13775
yiyixuxu wants to merge 1 commit into
mainfrom
agents-tripwires

Conversation

@yiyixuxu
Copy link
Copy Markdown
Collaborator

No description provided.

Three merge-blocking mistakes that signal a contributor hasn't read
AGENTS.md and the docs it links to. Non-exhaustive — failing one is enough
to send a PR back, but passing them all doesn't make a PR good.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the size/S PR with diff < 50 LOC label May 21, 2026
Comment thread .ai/review-rules.md
it links to. Failing one of these is enough to send a PR back; passing them
all doesn't make the PR good, it just means it's worth a proper review.

1. **New mandatory dependency.** Any new import outside the existing
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claude is there anything else you want to add it here? can you open a PR with suggested changes
COMMIT THIS

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot May 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude finished @yiyixuxu's task in 3m 7s —— View job


Added 6 additional tripwires to review-rules.md

  • Read current .ai/review-rules.md and PR diff
  • Explore the agents/tripwires codebase for context (read AGENTS.md, models.md, pipelines.md, modular.md, parity-testing docs)
  • Draft additional tripwires based on patterns from the docs
  • Edit .ai/review-rules.md with new tripwires

After reading through all the .ai/ documentation files, I identified 6 additional merge-blocking patterns that are well-documented as gotchas but weren't yet in the Tripwires section. Here's what I added (tripwires 4–9):

# Tripwire Why it blocks Source
4 Unconditional torch.float64 / .double() Breaks MPS and NPU entirely models.md gotcha #5
5 Missing @torch.no_grad() on pipeline __call__ GPU OOM from gradient accumulation pipelines.md gotcha #2
6 Missing import registration in __init__.py ImportError for users models.md gotcha #1
7 Graph-breaking ops in model forward Breaks torch.compile with fullgraph=True models.md coding style
8 Modular blocks importing from diffusers.pipelines.* Core architecture violation modular.md gotcha #1
9 Hardcoded dtype in model forward Breaks GGUF / quantized loading models.md gotcha #4

Each entry follows the same format as the existing tripwires: what to look for, why it matters, and a link back to the detailed documentation.

Patterns I considered but left out (better as review feedback than hard tripwires):

  • Subclassing existing pipelines for variants (pipelines.md gotcha Convert glide weights #4) — a convention violation but not always a contributor-ignorance signal
  • Capability flags without implementation (models.md gotcha make from hub import work #3) — important but more subtle, covered well in the Common mistakes path
  • Test model paths in contributor repos (modular.md gotcha add unet ldm in init #6) — easy to fix, not a sign of deeper misunderstanding

@github-actions
Copy link
Copy Markdown
Contributor

❌ Failed to open follow-up PR with the Claude edits — see workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S PR with diff < 50 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant