agentleFS
ayoubben18ayoubben18/ab-method/.agents/skills/review-pr/SKILL.md

review-pr

Skill193 starsChanged 58 days agoMITView on GitHub

Final review on an open PR. Spins up two read-only reviewers in parallel, each with a fresh context — seams (does the diff go through every documented seam, do the seam docs still match the code) and rules (rules/code.md, the book's red flags, repo standards, a Fowler smell baseline). Reports the two axes side by side. Autonomous runs apply safe fixes, push them to the PR, and record the rest in review.md and one PR comment; interactive runs present findings to pick. Use at the end of start-task / start-roadmap once the draft PR is open, or standalone on any PR.

185 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use diagnose-ci-failures, docs-loop and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • zerx-labSkill

    diagnose-ci-failures

    Diagnose CI failures for a PR using the GitHub CLI, extract error logs, and generate a plan to fix them. Use when the user asks to check CI status, pull CI issues, triage test failures, or investigate PR build failures.

    Also in 3 projects that use this

  • GeiserXSkill

    docs-loop

    Use when the user asks to audit docs, check documentation for stale claims, or verify docs against the code.

    Also in 3 projects that use this

  • GeiserXSkill

    full-loop

    Drive a repository to done with sergio-loop, then keep improving it with refine-loop at a descending theta. Use only when the user explicitly invokes full-loop.

    Also in 3 projects that use this

  • n24q02mSkill

    review-delta

    Review only changes since last commit using impact analysis. Token-efficient delta review with automatic blast-radius detection.

    Also in 3 projects that use this

  • n24q02mSkill

    build-graph

    Build or update the code review knowledge graph. Run this first to initialize, or let hooks keep it updated automatically.

    Also in 3 projects that use this

  • +7 more from GeiserX

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 178 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Commit what was kept as refactor(<task>): PR review fixes and push to the PR branch.

    line 62

“Common” is measured: kept by at least 6 in 10 of the 178 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Review PR (final review)

The last gate before a PR is marked ready. Two reviewers read the PR's diff on two separate axes:

  • Seams — SEAMS.md: does the change respect the app's documented seams, and do the seam docs still tell the truth?
  • Rules — RULES.md: does the code follow .ab-method/rules/code.md, the book's red flags, and the repo's own standards?

Each runs in its own subagent with a fresh context, so neither inherits the context that wrote the code and neither can mask the other. Their reports are shown side by side, never merged or reranked. See CREDITS.md.

Silence is the default output. A PR that follows its seams and rules produces no findings. A finding survives only if it names a concrete cost. Never invent churn to look thorough.

ALWAYS check .ab-method/structure/index.yaml FIRST for paths (task location, docs/seams/, review.md). Look for it under the project root first; only if the project has none (plugin install), read the bundled default at ../../../.ab-method/structure/index.yaml relative to this SKILL.md. Every path it names is relative to the project root. Talk to the user per .ab-method/rules/communication.md.

start-task's inline mode does not change this skill: the reviewers are always subagents.

Process

1. Pin the PR and the diff

  • The PR: the number passed in, or the current branch's PR (gh pr view --json number,baseRefName,url).
  • No PR (no remote, no gh, or a review before opening one): review the branch instead. The base is the one passed in, else the repo's default branch. Everything below runs the same; what would have been the PR comment goes only into review.md.
  • The diff against the merge-base: git diff <base>...HEAD, and git log <base>..HEAD --oneline. Confirm both resolve and the diff is non-empty before spawning anything.

2. Gather context (read only what exists)

  • The task's progress-tracker.md (Placement, missions and summaries, ## Protected) and unresolved-questions.md.
  • docs/seams/index.md, then only the seam docs the diff touches.
  • .ab-method/rules/code.md and the codebase-design skill's RED-FLAGS.md and SEAM-FORMAT.md.
  • Repo standards: CLAUDE.md, AGENTS.md, CONTRIBUTING.md, CODING_STANDARDS.md.
  • docs/adr/ — nothing an ADR settled is a finding.

3. Spawn both reviewers in parallel

Issue both subagent calls in one message, each read-only, each with a fresh context. On Codex spawn them at the orchestrator's level; on Claude they may nest.

Each prompt carries: the diff command and commit list, its brief (SEAMS.md or RULES.md, pasted in full, or its path with the instruction to read it in full first), the context files from Step 2 that axis needs, and the output rule below. Each returns under 400 words.

Every finding has:

  • Where — file and hunk.
  • What — the violation, citing its source (seam doc line, rule, red flag, standard).
  • Cost — the symptom it causes: change amplification, cognitive load, or unknown unknowns.
  • Fix — plain English.
  • Class — safe-fix (mechanical, tests stay green, no design decision) or needs-judgment.

Each reviewer also ends with its Checked: evidence line; a clean axis without one didn't run, so re-run it. Near-misses already listed under ## Checked, dropped in review.md are not re-raised.

A recorded black box (a TODO(UQ-n) seam with an entry in unresolved-questions.md) is not a finding.

4. Report side by side

Present the two reports under ## Seams and ## Rules, lightly cleaned. End with one line: findings per axis and the worst issue within each axis. Don't pick a winner across axes.

5. Act — by mode

Autonomous (start-task / start-roadmap):

  1. Apply each safe-fix one at a time, re-running the focused tests after each; a fix that goes red is reverted and becomes needs-judgment. Seam-doc edits must pass node .ab-method/scripts/check-docs.js (plugin installs: npx ab-method check-docs).
  2. Commit what was kept as refactor(<task>): PR review fixes and push to the PR branch. Nothing kept → no commit.
  3. Record every needs-judgment finding in the task's review.md under ## PR review (create the file if absent), and post them as one PR comment (gh pr comment <n> --body-file ...). Clean on both axes → record PR review: clean in review.md, post nothing.
  4. Never prompt.

Interactive (create-task / resume-task, or standalone): present the findings, apply what the user approves the same way (tests green, docs gated), commit, push, and record the rest in review.md under ## PR review.

Remember

  • Index first; review only this PR's diff, never the whole repo.
  • Two fresh-context reviewers, in parallel, reported separately.
  • Safe fixes are pushed; judgment calls go to review.md and one PR comment.
  • Silent by default.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.