AGENT SKILL

review

Review a change's commits for defects along two axes, Standards (the repository's documented standards, the smell baseline and the excess lens) and Spec (does the code do what its acceptance asked), by a reviewer briefed with the change record's front matter, its acceptance and its commits and never the builder's diagnosis, then judge every finding and act on it in the mode's fix round, at the depth the change's mode gives the review step. Use when the mode reaches review, or when the owner asks to review the branch, to review since X or a PR, or what can be deleted.

License 许可
MIT
最近更新
2026-10-21
Stars
★ 0
Forks
0

01 前言 Front Matter

name
review
description
Review a change's commits for defects along two axes, Standards (the repository's documented standards, the smell baseline and the excess lens) and Spec (does the code do what its acceptance asked), by a reviewer briefed with the change record's front matter, its acceptance and its commits and never the builder's diagnosis, then judge every finding and act on it in the mode's fix round, at the depth the change's mode gives the review step. Use when the mode reaches review, or when the owner asks to review the branch, to review since X or a PR, or what can be deleted.

02 资源文件 6

03 SKILL.md 正文

Review

Review reads a change's commits for defects along two axes before the change is verified: Standards, how the code is written, and Spec, whether it does what was asked. It runs where the change's mode reaches the review step, at the depth the mode gives it, and alone when the owner asks for it by name: "review the branch", "review since X", a PR, or "what can we delete", which runs the excess lens alone. Asked for by name with no change open, the agent itself reviews the range the owner names, by the reviewer's brief, and the result stays in the reply: it starts no agent and writes no file. The skill has two halves, the reviewer's brief and the builder's half, each under its heading below. The reviewer never fixes what it finds, and the builder never edits a report.

The reviewer's brief

The reviewer's brief is a page of its own, references/brief.md: what the reviewer receives and never receives, the two axes, the rungs and its report. Who reads the brief depends on the depth: at the inline depth the builder reads it whole, reviewing its own commits; where fresh agents review, each fresh reviewer reads it whole and the builder never reads it, nor a brief file, which the builder never opens. The reviewer needs nothing else on this page.

The builder's half

This part is the builder's, the session holding the change, which writes its record.

State the intent

In this half the user is the owner of the request.

Before spawning reviewers, state the intent explicitly. Derive this from:

  • The user's message
  • Commit messages
  • PR description if one exists
  • The code itself

Write one clear paragraph. If you're unsure about the intent, ask the user before proceeding.

Then, where fresh agents review, start the reviewers as references/reviewers.md says.

Judge the findings

When the last report is in, judge every finding yourself. The reports keep each finding as its reviewer wrote it; the judgment is yours. Apply pragmatic engineering judgment. Don't aggregate. Filter, contextualize, and decide.

Categorize every finding, in the table, using these buckets:

  • Act on. Real issues affecting correctness, security, or maintainability given the actual goals. These would block a real PR.
  • Consider. Legitimate points, but you're not sure they outweigh the cost of addressing them right now. Worth the user's attention.
  • Noted. Technically valid but not actionable. Context-dependent, premature optimization, or low-impact given the current stage.
  • Dismissed. Wrong, nitpicky, or missing context. Brief explanation why.

The "Dismissed" bucket is not busywork. It's a trust mechanism. Showing the user what you rejected and why lets them override your judgment where they disagree. This is more valuable than hiding the rejected findings.

Act on them

Act on the findings you judged act on, and on those under consider that you take up, in the fix round the mode gives. In what follows your human partner is the owner. The reviewer has finished when you act, so a question a report leaves open goes to the owner, and a pushback is written in the review section with its evidence.

WHEN receiving code review feedback:

1. READ: Complete feedback without reacting
2. UNDERSTAND: Restate requirement in own words (or ask)
3. VERIFY: Check against codebase reality
4. EVALUATE: Technically sound for THIS codebase?
5. RESPOND: Technical acknowledgment or reasoned pushback
6. IMPLEMENT: One item at a time, test each
IF any item is unclear:
  STOP - do not implement anything yet
  ASK for clarification on unclear items

WHY: Items may be related. Partial understanding = wrong implementation.
IF reviewer suggests "implementing properly":
  grep codebase for actual usage

  IF unused: "This endpoint isn't called. Remove it (YAGNI)?"
  IF used: Then implement properly
FOR multi-item feedback:
  1. Clarify anything unclear FIRST
  2. Then implement in this order:
     - Blocking issues (breaks, security)
     - Simple fixes (typos, imports)
     - Complex fixes (refactoring, logic)
  3. Test each fix individually
  4. Verify no regressions

Push back when:

  • Suggestion breaks existing functionality
  • Reviewer lacks full context
  • Violates YAGNI (unused feature)
  • Technically incorrect for this stack
  • Legacy/compatibility reasons exist
  • Conflicts with your human partner's architectural decisions

How to push back:

  • Use technical reasoning, not defensiveness
  • Ask specific questions
  • Reference working tests/code
  • Involve your human partner if architectural

Commit each fix, with a test where the fix changes behavior. A finding you push back on stays in the review section with your evidence.

Handoff

Consumes: the change record's front matter and its acceptance, the plan section's acceptance criteria, the ticket's entry in the plan directory's tickets.md, or the frame section where the mode skipped the plan; the change's commits by their trailer Produces: the review section of .greenline/ledger/<id>.md, one line at the inline depth, and at the independent depth the builder's judgment of every finding citing each reviewer's report .greenline/ledger/<id>/review-<n>.md; each fix as a commit carrying the trailer; the reply alone when asked for by name with no change open Next: the next step of the change's mode

04 同仓库更多 Skills

fern-works
fern-works/greenline

use-garden

Consulting garden, the separately installed guidance command this repository's owner enabled, when an open engineering choice the repository does not settle, made in a change or only recommended, would be informed by published guidance. Use for a choice between approaches, a pattern or pitfall for a technology or concern the work touches, or a unit a repository decision names; not for a question about this repository's own facts or a change whose choices are already settled.

★ 0
fern-works
fern-works/greenline

use-garden

Consulting garden, the separately installed guidance command this repository's owner enabled, when an open engineering choice the repository does not settle, made in a change or only recommended, would be informed by published guidance. Use for a choice between approaches, a pattern or pitfall for a technology or concern the work touches, or a unit a repository decision names; not for a question about this repository's own facts or a change whose choices are already settled.

★ 0
fern-works
fern-works/greenline

what-to-build

Propose what this product could do next at three altitudes: sharpen a shipped slice, extend one, or open ground the product does not stand on yet. Use for 'what should we build next', 'any ideas for this app', 'what's missing', 'is this done or is there more in it', and quick-win hunts. Not for refactors, which belong to the architecture survey.

★ 0
fern-works
fern-works/greenline

wayfinder

Plan a huge chunk of work (more than one agent session can hold) as a shared map of decision tickets in a plan directory's map.md, and resolve them one at a time until the way to the destination is clear.

★ 0
fern-works
fern-works/greenline

verify

Prove a change's claims with fresh evidence: restate each item of its acceptance so it can fail, capture a baseline and a treatment with the same command, compare the raw artifacts, and return VERIFIED, NOT VERIFIED or INCONCLUSIVE for each, at the depth the change's mode gives the verify step. Use when the mode reaches verify, or when the owner says "verify this", "prove it works" or "did this fix it".

★ 0
fern-works
fern-works/greenline

tdd

Test-first development at any step: discover the repository's own test commands, name the break a test catches, watch it fail for the intended reason, make it pass with the smallest change, and add a new test only where it catches a realistic failure the existing ones would miss. Use when writing or changing a test, building a feature or fixing a bug test-first, or deciding whether a change needs a new test; also on 'red-green-refactor' and integration tests.

★ 0