skills/review/SKILL.md
Review a PR or issue against hard merge gates: acceptance checklist, compliance, docs, regression tests, benchmarks, DRY, spec verification. Works for both PRs and standalone issues.
npx skillsauth add abix-/claude-blueprints skills/reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Automated human-review workflow for agent PRs and issues. Multi-repo, workspace-aware.
Uses endless-cli for all BRP interaction.
Invoke with one of these forms:
/review -- auto-pick PR via k3sc take/review 194 -- review PR #194 in endless/review k3sc 38 -- review PR #38 in k3sc/review issue 247 -- review issue #247 in endless (no PR required)/review issue k3sc 15 -- review issue #15 in k3scPR mode (default): review a PR with its linked issue. Checks out the branch, builds, runs tests, posts findings on the PR.
Issue mode (/review issue N): review a standalone issue that has no PR (e.g., audits, spec reviews, research tasks). Reads the issue body and comments, verifies acceptance criteria against the codebase, posts findings on the issue. Skips checkout/build/test steps.
For PR auto-pick: k3sc take is the ONLY method. Do NOT manually pick from gh pr list.
k3sc take --worker claude-a -- reserve next PR for worker claude-ak3sc release --repo endless --pr 194 -- release reservation when done/review is not read-only. It may update docs on the PR branch, commit review-only doc changes, post findings, and ask Merge or skip?.
/review does not pass a PR on code quality alone. A PR can only pass if the implementation and the review artifacts both meet the checklist below.
Required before a PR can be marked ready to merge:
authority.md and k8s.md.performance.md.Scale benchmark means the test exercises the game at large-world size:
Prefer the mixed scenario when the changed system interacts with more than one of those populations. Small microbenchmarks are useful for diagnosis, but they do not satisfy /review on their own.
If the linked issue has no acceptance checklist, that is itself a review finding and the PR cannot pass /review.
NEVER recommend merge unless ALL acceptance criteria checkboxes are satisfied. This is the single hardest gate.
- [ ] checkbox. These are the acceptance criteria.$ARGUMENTS formats:
PR mode (default):
k3sc take, repo = allN: PR number, repo = endlessrepo N: PR number in specified repoIssue mode (starts with issue):
issue N: issue number, repo = endlessissue repo N: issue number in specified repoRepo mapping:
endless -> abix-/endlessk3sc -> abix-/k3scAll gh commands must use --repo {owner/repo}.
Set review_mode to pr or issue based on parsing. This controls which steps run.
Before taking a PR or doing any work, print the full execution plan. This lets the human verify the review will follow the correct process. Do NOT call k3sc take, gh, or any other command until the plan is approved.
The plan must show:
Print the plan in this exact format:
## /review execution plan
PARSED
──────────────────────────────────────
repo: {repo-short-name} ({owner/repo})
PR: #{N} or auto-pick via k3sc take
worker: {basename of cwd}
STEP ACTION COMMAND / DETAIL
──────────────────────────────────────────────────────────────────────────────
1 resolve PR k3sc take --worker {worker}
OR use PR #{N} directly
2 read PR metadata gh pr view {N} --repo {owner/repo} --json ...
3 read linked issue + comments gh issue view {issue} --repo {owner/repo} --comments
4 collect checklists extract - [ ] and - [x] from issue + PR body
5 load authority docs read docs/authority.md, docs/k8s.md
+ docs/performance.md if perf PR
6 build gate checklist decide required vs conditional gates
7 checkout branch git fetch origin && git checkout {branch} && git pull
8 inspect diff against gates read diff, map to acceptance items, docs, tests
9 run tests k3sc cargo-lock test --release 2>&1
OR go test ./... for k3sc
10 build k3sc cargo-lock build --release 2>&1
OR go build ./... for k3sc
11 in-game verification (optional) launch game, BRP, GPU log -- only when relevant
12 perf verification (if perf PR) Criterion bench or BRP get_perf
13 update performance.md (if perf PR) add before/after Criterion numbers
19 verdict ready to merge / needs work
20 post PR comment gh pr comment with findings table
21 print local verdict rich terminal summary
22 ask merge or skip wait for human decision
REQUIRED GATES (always)
──────────────────────────────────────
- linked issue with acceptance checklist
- PR checklist coverage (issue ref, acceptance, docs, tests, benchmarks)
- associated docs updated
- authority.md compliance
- k8s.md compliance
- build passes
- automated tests pass
CONDITIONAL GATES
──────────────────────────────────────
- regression tests if behavior changed / bug fix / logic change
- benchmark coverage if perf-related (title, labels, diff, claims)
- performance.md review if perf-related
- in-game verification only when change affects runtime behavior (rendering, GPU, gameplay)
- scale benchmarks (50k) if perf claims exist (prefer Criterion over BRP)
After printing the plan, immediately proceed to Step 1. Do NOT wait for confirmation.
Issue mode: use the issue number directly. Print Reviewing issue #{N}: {title}.
PR mode: if PR number given, use it directly. If no PR number, use k3sc take:
k3sc take --worker $(basename "$(pwd)")
If a repo arg was provided, add --repo {repo-short-name} to the command.
Parse the PR number and repo from k3sc take output and remember them for k3sc release at the end. If k3sc take returns nothing, stop and report no PRs available.
Do NOT fall back to gh pr list or manual priority ordering. k3sc take is the only selection method.
Print Reviewing PR #{N}: {title}.
PR mode: Read PR metadata, extract linked issue from branch name issue-{N}, read the linked issue with comments.
gh pr view {N} --repo {owner/repo} --json headRefName,title,body,labels
gh issue view {issue_N} --repo {owner/repo} --comments
If the branch name does not link to an issue, record a finding and fail the review.
Issue mode: Read the issue directly with comments.
gh issue view {N} --repo {owner/repo} --json title,body,labels --comments
Check if a PR exists for this issue: gh pr list --repo {owner/repo} --head issue-{N} --state open. If a PR exists, suggest switching to PR mode instead.
Both modes: Collect:
- [ ] and - [x] lines from issue body and comments- [ ] and - [x] lines from PR bodyFor endless, load these reference docs before review:
docs/authority.mddocs/k8s.mddocs/performance.md for perf-related workTreat those docs as review authority, not optional reading.
If the issue has no acceptance checklist items, record a finding: issue lacks acceptance checklist. Cannot pass.
Before touching code, decide which gates are required.
Always require:
authority.mdk8s.mdRequire regression-test coverage if:
Require benchmark coverage if:
Require performance.md review if the PR is perf-related.
For each required gate, decide whether the PR already contains the needed evidence. Missing evidence is a finding even before code inspection.
Examples of immediate findings:
authority.mdk8s.mdperformance.mdDetect k3s environment: cwd starts with /workspaces/ or JOB_KIND env var is set.
In k3s mode, skip these steps (no GPU, no display, no shared target dir):
k3s agents CAN do: read PR/issue metadata, read diffs, check compliance docs, verify acceptance criteria, check DRY/generalization, verify spec, check docs/changelog, post structured findings.
Note in the execution plan output which steps are skipped and why: "k3s mode: no build/test/BRP (no GPU/display)".
Issue mode: skip this step. Work against the current codebase on the base branch.
PR mode: each agent works in its own repo clone. Never cd elsewhere, never clone a new copy.
git fetch origin && git checkout {headRefName} && git pull
Read the diff and answer, explicitly:
authority.md?k8s.md?performance.md?Check associated docs before approving:
If docs are clearly missing or stale and the update is small and unambiguous, make the doc update on the PR branch, re-read the diff, and include that change in the review.
If the PR is missing doc updates, changelog entry, or has stale docs:
This is the same checklist as /done -- the reviewer applies it when the implementer missed it.
If you cannot map a changed code path to an acceptance item, required doc update, regression test, benchmark, or authority-doc requirement where required, record a finding.
Read all three docs at the start of every review:
docs/k8s.md -- Def/Instance/Controller architecturedocs/authority.md -- data ownership and source-of-truth rulesdocs/performance.md -- hot-path patterns, anti-patterns, review procedureCheck every changed file against these rules:
A PR that has not been checked against all three docs is not ready for merge, regardless of whether clippy and tests pass. If a violation is found, fix-forward or document as a blocker.
If the issue is labeled feature:
## Spec Doc), or the issue body must say "Spec: self-contained in issue body"Bug and test issues are exempt -- the issue body is the spec.
Every review must check for DRY violations and missed generalization:
def.is_tower, def.some_field, or a registry lookup instead of matching on specific enum variants. Goal: adding a new variant = 1 enum + 1 registry entry, not N match arms.match kind { BowTower => ..., CrossbowTower => ..., CatapultTower => ... } when def.tower_stats already distinguishes themiter_kind(A).chain(iter_kind(B)).chain(iter_kind(C)) when a def.is_X flag or registry filter would future-proof itFor perf-related PRs (title, labels, or diff indicate optimization work):
docs/performance.md and docs/k8s.md as mandatory readingFindings are the primary output. Prioritize:
authority.mdk8s.mdperformance.md for perf PRsIssue mode: skip build and test steps. Verify acceptance criteria against the existing codebase instead.
PR mode: detect project type:
k3sc cargo-lock test --release 2>&1go test ./... 2>&1no test framework detectedRecord pass/fail and the relevant failing tests.
Every code change MUST have regression tests. No exceptions. No "will add later". No "it's too simple to test".
set_occupancy -> set_present in existing tests is mechanical, not a regression test.If behavior changed and no regression tests exist in the diff, record a finding even if the existing suite passes. This is a BLOCKER -- fix-forward by writing the test, or fail the review.
k3sc cargo-lock build --release 2>&1go build ./... 2>&1If build fails, skip BRP steps, post findings, and stop.
BRP launch, GPU log, perf verification, and in-game benchmarks are optional. Only run them when the change is relevant to runtime behavior that cannot be verified by tests alone.
Run in-game verification when:
Skip in-game verification when:
When running in-game verification:
taskkill //F //IM endless.exe 2>/dev/null
k3sc cargo-lock run --release -- --autostart --no-raiders --farms=4 &
endless-cli test for baseline BRPendless-cli get_perf for perf PRsrust/target/release/wgpu_errors.log for GPU errorsFor perf PRs with scale claims, run Criterion benchmarks locally (k3sc cargo-lock bench) rather than relying on in-game BRP with a tiny dev scene.
For perf PRs, record benchmark results in docs/performance.md on the PR branch:
ready to merge is allowed only if all required gates pass.
Hard failures:
endless BRP verification when BRP was runIf any hard failure exists, verdict is needs work.
PR mode: post on the PR. Issue mode: post on the issue.
Post a structured comment:
gh pr comment {N} --repo {owner/repo} --body "$(cat <<'COMMENT'
## /review findings
| Check | Result |
|-------|--------|
| Linked issue | pass/fail |
| Issue acceptance checklist | pass/fail |
| PR checklist coverage | pass/fail |
| Associated docs | pass/fail |
| authority.md | pass/fail |
| k8s.md | pass/fail |
| performance.md | pass/fail/not required |
| Build | pass/fail |
| Automated tests | pass/fail |
| Regression tests | pass/fail/not required |
| Benchmarks | pass/fail/not required |
| BRP launch | pass/fail/not run |
| Issue-specific verification | pass/fail/not run |
**Verdict**: ready to merge / needs work
### Findings
- finding 1
- finding 2
### Acceptance coverage
- issue item -> evidence or missing evidence
### Docs and policy coverage
- affected doc -> updated or missing
- authority.md -> compliant or violation
- k8s.md -> compliant or violation
- performance.md -> compliant or violation/not required
### Regression coverage
- changed behavior -> test or missing test
### Benchmark coverage
- perf claim -> benchmark or missing benchmark
- scale scenario used -> counts and whether it matches the changed system
COMMENT
)"
Rules for the comment:
ready to merge unless every required gate passedPrint a rich, colorful summary to the terminal (wezterm). Use this format:
## /review PR #{N}: {short title}
repo: {owner/repo}
WHAT THIS PR DOES
──────────────────────────────────────
{1-3 sentence plain-english summary of what changed and why}
BEFORE -> AFTER
──────────────────────────────────────
{concrete before/after description of the change -- what existed before, what exists after}
{for code changes: old behavior -> new behavior}
{for docs/assets: file didn't exist -> file added, or old content -> new content}
{for perf PRs: old timing -> new timing with numbers}
CHECK RESULT
─────────────────────────────────────
✅ Linked issue #{issue}
✅ Acceptance checklist N/N
✅ PR checklist covered
✅ Docs updated / n/a
✅ authority.md compliant
✅ k8s.md compliant
✅ performance.md compliant / n/a
✅ Build pass
✅ Tests N/N pass
✅ Regression tests N new
✅ Benchmarks Criterion verified / n/a
⏭️ BRP launch not run
✅ Perf verification numbers confirmed / n/a
Use ✅ for pass, ❌ for fail, ⏭️ for skipped/not run.
VERDICT: READY TO MERGE or VERDICT: NEEDS WORK
For perf PRs, expand the BEFORE -> AFTER block with benchmark numbers:
BEFORE -> AFTER
──────────────────────────────────────
BEFORE ({source}):
scenario: 50k NPCs / 50k buildings / 50k trees-rocks / mixed
avg: Xus
peak: Xus
AFTER (Criterion, reviewer-collected):
scenario: 50k NPCs / 50k buildings / 50k trees-rocks / mixed
scenario_1 .... Xus (Nx faster)
scenario_2 .... Xus
List regression tests with one-line descriptions of what they verify. End with "Merge or skip?"
Ask only after posting the review comment.
If merge:
gh pr merge {N} --repo {owner/repo} --squash --delete-branch
gh issue close {issue_N} --repo {owner/repo}
If started with k3sc take: k3sc release --repo {repo-short} --pr {N}
Print Merged PR #{N}, closed issue #{issue_N}.
If skip: release reservation if any. Print Skipped PR #{N} -- left as-is.
If close: gh issue close {N} --repo {owner/repo}. Print Closed issue #{N}.
If skip: Print Skipped issue #{N} -- left as-is.
tools
AutoHotkey v2 scripting standards for Windows automation, hotkeys, and game macros. Built from the official AHK v2 docs and the AHK community conventions. v1 reached EOL in March 2024.
data-ai
Analyze why Claude made its previous response -- trace reasoning to system prompt, CLAUDE.md, memory, skills, or context
tools
development
Build, test, and release Timberbot mod to GitHub and Steam Workshop