Skip to content

Commit de89ff7

Browse files
TimDettmersclaude
andcommitted
docs: Add PR review posting guide, agent reference docs, and lint fixes
Add complete PR review posting workflow to pr_review_guide.md (Section 17): - Review format scaled to PR complexity (brief for clean, detailed for issues) - GitHub posting via gh CLI (--comment for most, --request-changes for security only, never --approve) - Inline comments via gh api with JSON temp file approach and field reference - Early termination path for trivial PRs (docs/style/test-only, Section 4.2) - Re-review workflow for author follow-ups - Workflow diagram updated to show early termination branch Fix linting_guide.md consistency: - Quick Reference no longer presents ruff-only as equivalent to pre-commit - Recommended Workflow uses pre-commit as the primary command, not optional Add agent reference documents for PR review prerequisites: - architecture_guide.md, code_standards.md, api_surface.md - downstream_integrations.md, security_guide.md, kbit_gemm_context.md Update CLAUDE.md PR review section to mention posting instructions. Update issue_maintenance_guide.md with expanded triage patterns. Tested end-to-end on PR #1858 (k-bit quantization) as the first review using this pipeline. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a2c92f7 commit de89ff7

10 files changed

Lines changed: 9886 additions & 28 deletions

CLAUDE.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@ If a PR exists, review and build on it instead of starting from scratch. Do not
2222

2323
# MANDATORY: Run linting before every pull request
2424

25-
Before pushing a PR branch, you MUST run linting and formatting checks. CI will reject PRs that fail these checks:
25+
Before pushing a PR branch, you MUST run the full pre-commit suite. CI will reject PRs that fail any check:
2626

2727
```bash
28-
ruff check --fix .
29-
ruff format .
28+
pre-commit run --all-files
3029
```
3130

32-
Review and commit any changes these tools make. Full details on all CI lint checks (ruff, typos, clang-format, trailing whitespace, etc.): `agents/linting_guide.md`
31+
This runs ruff, ruff format, typos, trailing-whitespace, clang-format, and all other CI lint hooks. Review and commit any changes it makes. Do NOT run only `ruff check` and `ruff format` — those are just 2 of 10 hooks. Full details: `agents/linting_guide.md`
3332

3433
# Testing: only run relevant tests
3534

@@ -48,3 +47,16 @@ To triage open GitHub issues, generate prompt files, and launch parallel worker
4847
# Issue maintenance and triage
4948

5049
To identify and close stale, duplicate, or resolved issues: `agents/issue_maintenance_guide.md`. Common closeable patterns (old CUDA setup, Windows pre-support, third-party app issues, etc.) are cataloged in `agents/issue_patterns.md`.
50+
51+
# Pull request review
52+
53+
When tasked with reviewing a pull request, you MUST read these guides before starting the review:
54+
55+
1. `agents/pr_review_guide.md` — The complete review workflow (classification, checklists, verdict format, and posting instructions). This is the primary guide; follow its steps sequentially.
56+
2. `agents/architecture_guide.md` — Codebase architecture and patterns
57+
3. `agents/code_standards.md` — Code quality expectations
58+
4. `agents/api_surface.md` — Public API catalog (for detecting breaking changes)
59+
5. `agents/downstream_integrations.md` — How Transformers, PEFT, Accelerate, TGI, and vLLM depend on bitsandbytes (for assessing downstream impact)
60+
6. `agents/security_guide.md` — Trust model and security checklist (especially for external contributor PRs)
61+
62+
For CUDA kernel changes, also read `agents/kbit_gemm_context.md`. The PR review guide references all of these at the appropriate steps.

0 commit comments

Comments
 (0)