AGENT SKILL

review

暂无简介

License 许可
MIT
所属仓库
lookatitude/guild
最近更新
2026-11-06
Stars
★ 8
Forks
0

02 资源文件 9

03 SKILL.md 正文

guild:review

Implements the task lifecycle review step. Runs after guild:execute-plan collects one handoff receipt per lane under .guild/runs/<run-id>/handoffs/ and before guild:verify-done. Performs a two-stage review — spec compliance first, then quality — against the receipts (fields changed_files, opens_for, assumptions, evidence, followups), read verbatim.

Do not rehydrate full specialist conversations. The §8.2 receipt contract exists so review is compact and auditable; pulling the transcript back in defeats the design and inflates token cost.

When a receipt is consumed, the embedded ```guild.handoff.v2 JSON block is the machine truth a consumer reads; the guild.handoff_receipt.v1 YAML frontmatter is human-review context only (see §"Handoff contract" of the communication format policy). Read the §8.2 fields below (changed_files, opens_for, assumptions, evidence, followups) from that one embedded envelope — a frontmatter-only receipt with no embedded v2 block is not a valid machine receipt.

Input

Three required inputs, all produced upstream:

  1. .guild/runs/<run-id>/handoffs/*.md — one receipt per lane (<specialist>-<task-id>.md), each carrying the §8.2 fields.
  2. The spec — .guild/spec/<slug>.md (from guild:brainstorm, §7.1) or a user-provided spec path recorded in the plan frontmatter. Stage 1 compares against this.
  3. The plan — .guild/plan/<slug>.md with approved: true. Fixes each lane's scope, owner, depends-on, autonomy policy; Stage 1 uses scope as the contract a lane's changed_files must satisfy.

Before Stage 1, run the receipt gate and gate on its exit code — never judge receipt shape by eye:

node ${GUILD_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$HOME/.local/share/guild/dist/claude-code}}/runtime/scripts/check-handoff-receipts.js --cwd <repo-root> --run-id <run-id>

Exit 0 → every receipt has the five §8.2 ## <name> sections and exactly one valid ```guild.handoff.v2 fence; proceed. A non-zero exit → do not write a passing review.md: record each refused receipt and its defects as a Stage 1 blocker, halt, and loop back to guild:execute-plan (a ## files changed heading or a plain ```json fence is a malformed receipt). Review cannot synthesize a receipt that was never written.

Stage 1 — spec compliance

Per lane, three strict yes/no checks against the §8.2 fields (full criteria in rubric.md):

  1. Do changed_files satisfy scope? Every file the lane owed must appear; out-of-scope files are a scope-creep flag (auto-fail only if the autonomy policy forbids out-of-scope edits).
  2. Are assumptions within the autonomy policy? An assumption exceeding the lane's tier is a fail.
  3. Are any followups blocking merge? A followup naming an unresolved spec requirement fails; merely-deferred work does not.

Output per lane: ✓ pass or ✗ fail with the failing check named. A ✗ means the lane didn't deliver the spec — no quality review fixes that. Record Stage 1 before touching Stage 2.

Stage 2 — quality

Only lanes that passed Stage 1 (full criteria in rubric.md):

  1. Does evidence demonstrate the claim? The field must be concrete — a test command + outcome, sample output, grep count, validator pass. "Looks good" / "should work" / a bare tool name with no output fail.
  2. Any concerns the lane raised? Flag risks surfaced under assumptions/followups even if Stage 1 passed — they inform guild:verify-done and the next plan.

Output per lane: ✓ pass, ✗ fail, or → follow-up.

Code-review request & response

Beyond receipt-level review, this skill owns Guild's fresh-context code-review loop — soliciting a review with precisely crafted context (never your session history) and acting on the findings (triage; push back only with technical evidence). The adversarial loop layers (guild:loop-implement L3/L4) and the cross-model gate (guild:codex-review) invoke this discipline; a specialist lane uses it directly before its handoff receipt is trusted into the two-stage review above. Full request procedure, finding-triage table, and response discipline: see code-review-loop.md (which fills the prompt template in code-reviewer.md).

Output

Write a single report to .guild/runs/<run-id>/review.md:

  • Per-lane status — one row per plan lane: specialist, task-id, Stage 1 result, Stage 2 result, and the failing check (if any). A lane skipped by Stage 2 (because Stage 1 failed) is recorded as such.
  • Aggregated blockers — every Stage 1 ✗ and Stage 2 ✗ in one list, each with its receipt path and failing check. This is what downstream steps act on.
  • Follow-ups — every Stage 2 → follow-up, each with the lane and risk text; non-blocking, feeds the next task's plan.

Keep review.md terse and grep-friendly — it's the compact artifact guild:verify-done and the next-task planner read.

Loop-back

  • Stage 1 failure: route the lane back to guild:execute-plan with a fix brief naming the failing check and the receipt field (e.g. "changed_files missing <path> required by scope"), carrying the same run-id so the re-dispatched lane writes a replacement receipt into the same handoffs/. Stage 1 failures are the only in-review loop-back.
  • Stage 2 failure: usually a followups: entry for the next task — the deliverable is present, only its evidence is weak. It escalates to a "re-run with evidence" loop-back only when the gap is severe enough that guild:verify-done can't stand up the deliverable at all. (Loop-back nuance detailed in rubric.md.)

Learning checkpoint (step 7.5 — advisory, no new gate)

This is the Development phase's review boundary. After review.md is written and before handoff to guild:verify-done, fire the per-phase LearningCheckpoint with phase=development and .guild/runs/<run-id>/review.md (plus the lane receipts) as evidence_ref. Invoke guild:learning-checkpoint to classify the already-written receipts + review into the 12-target verdict, then emit via the hook — the full call signature + GUILD_PHASE mapping are canonical in skills/meta/reflect/references/learning-checkpoint.md §"How a phase skill fires the checkpoint" (do not re-spell). It rides this existing boundary, defaults to all-none (a near-zero-token no-op), asks no new prompt, and adds no new gate; non-none verdicts route only to .guild/reflections/<run-id>.md. (One development checkpoint per run, fired here — not in guild:execute-plan.)

Handoff

When every lane is ✓ at both stages (or Stage 2 follow-ups are acceptable and no ✗ blockers remain), hand off to guild:verify-done. It is a chapter, not a skill: Read ../../quality/references/verify-done.md and run it in place. It writes .guild/runs/<run-id>/verify.md (never another file name) whose first line after the title is exactly Overall status: pass or Overall status: fail. Pass it:

  • run_id — the run directory name.
  • review_path — absolute path to .guild/runs/<run-id>/review.md.
  • handoffs_dir — absolute path to .guild/runs/<run-id>/handoffs/ (verify-done re-reads receipts for final checks).
  • plan_path — the approved plan.
  • blockers — empty on all-pass; otherwise the loop-back fired instead of this handoff.
  • followups — the Stage 2 follow-up list, carried forward for the next task's plan.

If any lane is still ✗ after a loop-back round, halt and surface the failure to the user. Do not hand off with outstanding blockers — verify-done is the final gate, not a second chance for unresolved spec drift.

Chapters

Three-stage disclosure (KTD25): this file is the assembler. Each row below is an L3 chapter that stays on disk until a request matches it. Compose by pointer — read the one chapter you were routed to, and never inline a chapter here.

Chapter Covers
references/codex-review.md DEPRECATED lifecycle entry-point (D-BR-A) — now the internal Codex adapter invoked BY guild:review-broker, never called directly from Guild lifecycle gates
references/review-broker.md Host-agnostic broker for cross-family adversarial review — one host drafts an artifact, a DIFFERENT host family critiques it (STRONG independence)

Chapter pointers (resolve before you dispatch)

These names appear in the body as if they were skills. They are NOT — the T03 fold (KTD25/KTD59) made each one an L3 chapter. Read guild:<name> below as "load this file and run it in place"; never try to dispatch it as a skill.

Named in this body Lives under Load
guild:codex-review this assembler references/codex-review.md
guild:learning-checkpoint reflect ../reflect/references/learning-checkpoint.md
guild:loop-implement execute-plan ../execute-plan/references/loop-implement.md
guild:verify-done quality ../../quality/references/verify-done.md

04 同仓库更多 Skills