원클릭으로
bip-pr-review
Run comprehensive pre-merge quality checklist for current branch's PR
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Run comprehensive pre-merge quality checklist for current branch's PR
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Check remote server CPU, memory, and GPU availability via SSH
Cold-start into a worktree/clone from a fresh conversation — read the PR, issue, and any status files, figure out where things stand, then STOP and ask the user what to do next. Use for a fresh conversation dropped into a bip-spawn or bip-epic-spawn worktree/clone that already has history (a PR, an in-progress phase, or a stalled worker).
Quick poll of tracked EPICs and code repos for new manuscript-relevant results
Persist manuscript session state before context reset
Cold-start for a manuscript session — the paper is the source of truth and shared context; discuss results, orchestrate research through issues/PRs, and update the paper as threads complete
Spawn a Claude session in a clone for an EPIC issue
| name | bip-pr-review |
| description | Run comprehensive pre-merge quality checklist for current branch's PR |
Run a comprehensive quality checklist before merging a PR. Automatically detects project type and runs appropriate checks.
/bip-pr-review
First, check for a project-specific checklist:
PRE-MERGE-CHECKLIST.md in the repo rootCLAUDE.md and look for a "Pre-PR Quality Checklist" or "Pre-Merge Checklist" sectionIf a project-specific checklist is found, follow those steps exactly instead of the generic workflow below.
Examine the repository to determine what checks apply:
| Indicator | Project Type | Agents to Use |
|---|---|---|
workflow/*.smk or Snakefile | Snakemake pipeline | snakemake-pipeline-expert |
*.py files in src/ or project root | Python project | clean-code-reviewer + code-reuse-reviewer |
build.zig or *.zig files in src/ | Zig project | zig-code-reviewer |
go.mod | Go project | clean-code-reviewer + code-reuse-reviewer |
package.json | Node.js project | clean-code-reviewer + code-reuse-reviewer |
The two reviewers operate in different modes and complement each other — run them in parallel:
clean-code-reviewer reads the diff and evaluates each hunk against clean-code principles (naming, function size, single responsibility, DRY-within-hunk).code-reuse-reviewer surveys the surrounding codebase first, then audits the diff for missed reuse of existing constants, helpers, conventions, and patterns. Its mandatory output tables (inline-import audit vs pyproject.toml; function-pair overlap audit) catch things a diff-only reviewer cannot see.Multiple types can apply (e.g., Snakemake + Python).
Always fetch first so comparisons are against the true remote state, not a stale local branch:
git fetch origin
Determine the base branch from the PR (if one exists), otherwise default to main or master:
gh pr view --json baseRefName -q .baseRefName 2>/dev/null || echo "main"
Use origin/<base> (not local <base>) for all diffs below. This avoids false positives from a stale local main.
git diff origin/<base>...HEAD --name-only
Focus review on changed files, not the entire codebase.
Scan changed files for artifacts that typically shouldn't be committed:
Suspicious file types (flag for user review):
.html in output directories).png, .jpg, .jpeg, .gif, .svg, .pdf) unless in expected locations like docs/ or assets/.zip, .tar, .gz, .pkl, .pickle, .npy, .npz).csv, .tsv, .parquet) over 100KB__pycache__/, .pyc, node_modules/, dist/, build/)Acceptable (don't flag):
.json, .yml, .yaml in root or config directories)testdata/ or tests/fixtures/Check file sizes:
git diff origin/<base>...HEAD --name-only | xargs -I{} sh -c 'test -f "{}" && stat -f "%z %N" "{}" 2>/dev/null || stat --format="%s %n" "{}" 2>/dev/null' | awk '$1 > 102400 {print}'
Flag anything suspicious for user confirmation before proceeding.
For Snakemake projects:
snakemake-pipeline-expert agent to review workflow structure, rule organization, and best practicesFor all projects with code changes:
clean-code-reviewer agent on modified source files (not tests)code-reuse-reviewer agent on the same branch — it surveys the surrounding codebase first to catch missed reuse of existing patterns, constants, helpers, and conventions. The two agents have different mandates (clean-code principles vs. pattern adherence) and report independently.Always run this detection step. Examine the PR title, body, and diff for signals that the PR reports a scientific conclusion or experimental result:
If any scientific conclusion is detected, launch the surprising-conclusion-skeptic agent (Opus model) with this prompt:
Review PR #<number> on branch <branch> for scientific credibility.
Claim: <summarize the scientific conclusion from the PR title/body>
The PR diff is at: git diff origin/<base>...HEAD
Work through your full checklist: check for bugs, unfair comparisons,
implausible effect sizes, contradictions with established results, and
unverified upstream assumptions. Read the code that produced the result,
not just the description.
Report your findings with Claim / Confidence / Concerns / Recommended Checks / Verdict.
This step runs in parallel with the agent reviews in Step 4. Do not wait for it to complete before proceeding.
If no scientific conclusion is detected, skip this step and note "No scientific claims detected — skeptic review skipped" in the final report.
Detect and run available quality tools:
| Tool Indicator | Check to Run |
|---|---|
pixi.toml | Use pixi run prefix |
pyproject.toml with ruff | ruff check . |
Makefile with check target | make check |
build.zig | zig build test and zig fmt --check src/ tests/ |
go.mod | go test ./... and go vet ./... |
Snakefile | snakemake --lint |
tests/ directory | pytest (or project-specific test command) |
Run a thorough test quality review using an agent. Grepping alone is insufficient—tests need semantic analysis to detect:
pass, meaningless assertions)assert True, trivial assertions)pytest.skip that should have real implementationsLaunch a clean-code-reviewer agent specifically for test files:
Review the test files in tests/ for test quality issues:
1. Placeholder tests (empty or pass-only test bodies)
2. Mock usage (if project constitution forbids mocks)
3. Trivial assertions (assert True, assert 1==1)
4. Unconditional pytest.skip() that should be real tests
5. Tests that catch and swallow exceptions
6. Tests without meaningful assertions
Focus on tests for changed code. Report specific file:line references.
Report findings with severity (blocking vs advisory).
Skip this step if the PR doesn't involve mathematical/statistical computation.
Detect mathematical PR: Check if the changed source files contain:
If mathematical, check the PR for an existing mathematical specification comment:
Check for existing math comment on the PR: Use gh pr view and look for comments containing LaTeX code blocks or mathematical notation
If no math comment exists:
If math comment already exists:
Literature verification for pre-existing formulas:
bip search "method name" or bip search -a "Author"Mathematical comment format:
🤖 Mathematical specification back-translated from the implementation in PR #XXX:
## [Section Name]
[Description of what this computes]
```latex
[Formula in LaTeX]
[Continue for each major mathematical component...]
### Step 8: Generate Report
Present a checklist summary:
```markdown
## Pre-Merge Quality Report
### Agent Reviews
- [ ] Snakemake review: [findings or ✓]
- [ ] Code review (clean-code): [findings or ✓]
- [ ] Code review (code-reuse): [findings or ✓]
### Scientific Conclusion Skeptic
- [ ] Skeptic review: [verdict or "No scientific claims detected — skipped"]
### Large Files / Cruft
- [x] No suspicious files found
- [ ] ⚠️ Flagged for review: `output/results.html` (notebook output?)
### Automated Checks
- [x] Linting: passed
- [x] Tests: 124 passed
- [ ] Format: 2 files need formatting
### Test Audit
- [x] No placeholder tests found
- [x] No forbidden mocks found
### Mathematical Documentation (if applicable)
- [x] Mathematical specification posted to PR
- [x] Existing specification verified against implementation
- [x] Literature references provided for pre-existing formulas
### Action Items
1. Fix formatting in `src/foo.py`
2. Address code review suggestion about X