agentleFS
roronoazoroshao369roronoazoroshao369/vibe-coding-os/skills/core/review-before-merge/SKILL.md

review-before-merge

Skill1 starsChanged 5 months agoMITView on GitHub

Catch correctness, maintainability, security, and attribution issues before merge by reviewing the change along two independent axes — Standards (does it follow this repo's conventions?) and Spec (does it do what the originating PRD/spec/issue asked?) — run as separate passes so neither masks the other. Use after implementation and verification, before merge or PR. Use whenever a diff needs review against a fixed point (a branch, commit, tag, or main), or when asked to "review since X". The diff and…

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use after implementation and verification, before merge or PR.

    line 21
  2. Very specific:

    Pin the fixed point: Use whatever the user named (SHA, branch, tag, main, HEAD~n).

    line 38
  3. Distinctive:

    Standards pass: read the standards docs, then the diff.

    line 42
  4. Very specific:

    Use with requesting-code-review and receiving-code-review for the review exchange.

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Skill: Review Before Merge

Purpose

Catch correctness, maintainability, security, and attribution issues before merge by reviewing the change along two independent axes — Standards (does it follow this repo's conventions?) and Spec (does it do what the originating PRD/spec/issue asked?) — run as separate passes so neither masks the other.

When to use

Use after implementation and verification, before merge or PR. Use whenever a diff needs review against a fixed point (a branch, commit, tag, or main), or when asked to "review since X".

Inputs

The diff and its fixed point, the commit list, the originating spec/PRD/issue, the repo's standards sources (CLAUDE.md, AGENTS.md, CONSTITUTION.md, CONTEXT.md, ADRs under docs/adr/, style/lint configs), test results, and the attribution registry.

Why two axes

A change can pass one axis and fail the other, and a single blended review hides this:

  • Code that obeys every convention but implements the wrong behavior → Standards pass, Spec fail.
  • Code that does exactly what the spec asked but breaks repo conventions → Spec pass, Standards fail.

Keeping the axes separate stops a clean Standards pass from making a Spec failure look reviewed, and vice versa. The two passes must not share context — run them so each forms its judgment independently, then report side by side without merging or reranking.

Workflow

  1. Pin the fixed point. Use whatever the user named (SHA, branch, tag, main, HEAD~n). If none was given, ask before proceeding. Capture the diff with a merge-base comparison (git diff <fixed-point>...HEAD) and the commit list (git log <fixed-point>..HEAD --oneline).
  2. Identify the spec source. Look in order: issue references in commit messages; a path the user gave; a PRD/spec under docs/, specs/, or the plan files matching the branch/feature. If none exists, the Spec pass reports "no spec available" rather than inventing acceptance criteria.
  3. Identify the standards sources. Collect the repo's documented conventions. Note machine-enforced rules (lint, formatter, tsconfig) but do not re-check what tooling already enforces.
  4. Run the two passes independently and in parallel. For multi-agent harnesses, dispatch one subagent per axis so their contexts stay clean; otherwise run them as two deliberately separate review sweeps over the same diff.
    • Standards pass: read the standards docs, then the diff. Report each place the diff violates a documented convention, citing the rule (file + which rule). Separate hard violations from judgement calls. Skip anything tooling enforces.
    • Spec pass: read the spec, then the diff. Report (a) spec requirements that are missing or partial, (b) behavior present in the diff that the spec did not ask for (scope creep), and (c) requirements that look implemented but appear wrong. Quote the spec line for each finding.
  5. Check attribution and secrets as part of the sweep: no secrets in the diff, and any upstream-inspired content carries its attribution entry.
  6. Aggregate side by side. Present findings under ## Standards and ## Spec headings, kept separate. End with a one-line summary: finding counts per axis, the single worst issue, and an explicit approval / blockers / follow-ups verdict.

Outputs

A review note with the two axes reported separately, blockers, risks, follow-ups, attribution status, and an explicit approval decision.

Failure modes

  • Rubber-stamp review with no specific findings.
  • Blending the two axes so a Standards pass hides a Spec failure (or the reverse).
  • Letting the two passes share context so they bias each other.
  • Inventing a spec when none exists instead of reporting its absence.
  • Re-flagging issues that tooling already enforces; only checking style.
  • Missing secret leakage or license/attribution implications.

Verification checklist

  • Fixed point pinned and diff/commit list captured.
  • Standards pass cites specific rules; judgement calls separated from hard violations.
  • Spec pass quotes spec lines and flags missing, extra, and wrong behavior — or reports "no spec available".
  • The two passes ran independently and are reported side by side, not merged.
  • No secret or attribution issue; follow-ups and an approval verdict are explicit.

Superpowers alignment

Use with requesting-code-review and receiving-code-review for the review exchange.

Ghi chú tiếng Việt

Review trước khi merge theo HAI TRỤC độc lập: Standards (đúng quy ước repo chưa?) và Spec (có đúng việc PRD/spec yêu cầu không?). Chạy hai lượt riêng biệt, không trộn ngữ cảnh, rồi báo cáo song song để một trục đạt không che giấu trục kia hỏng. Nếu không có spec thì ghi "không có spec", không tự bịa tiêu chí. Kiểm tra cả rò rỉ secret và attribution. Nguồn cảm hứng: mattpocock/skills (MIT, Matt Pocock) — review hai trục bằng subagent song song; viết lại nguyên gốc, không sao chép.

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.