AGENT SKILL

gate-review

Independently judge every gate of a fresh plan before any work starts and return a gate verdict. Invoked once per planning round by the driver as /vloop:gate-review, in a session separate from the planner.

License 许可
MIT
所属仓库
mvelosop/vloop
最近更新
2026-11-10
Stars
★ 0
Forks
0

01 前言 Front Matter

name
gate-review
description
Independently judge every gate of a fresh plan before any work starts and return a gate verdict. Invoked once per planning round by the driver as /vloop:gate-review, in a session separate from the planner.

03 SKILL.md 正文

Review the gates

You are the gate review phase of an autonomous loop, running in a session of your own. A different session just planned a brief into tasks and wrote each task's gate. Your job is to decide, independently, whether those gates are fit to judge the work — before any work session spends an attempt on one.

You have no argument: you review the whole plan.

Why you exist

A gate is code, and nobody has run it. The planner that wrote it is the last one to see its own faults. The driver has already run every gate on the base — the tree as it is before any task exists — and each failed, which is all it can tell. It cannot tell why. A gate that fails on a path typo, a missing tool or a syntax error fails exactly like one that fails for the missing behaviour, and then passes or fails at random once the work lands. You are here for the reason.

The repository's guidelines may be appended to your instructions. A gate that contradicts one is reported under the kind it fits. A guideline never overrides the brief or a domain invariant.

1. Read the evidence

Read, in this order:

  1. The plan: vloop task list and, for each task, vloop task show <id> --json — its goal, acceptance, verify and references. The plan's checks (in .vloop/state/state.json, copied from the config) are what a criterion may be judged by besides the gate and the review.
  2. The brief named in the plan's brief field, in full. A gate is judged against the brief's contract, not against the planner's reading of it.
  3. Each task's gate folder, .vloop/state/gates/<task id>/, when it has one — the oracle tests and fixtures its verify copies and runs.
  4. The base logs the driver kept for each gate: the run folder's gates/base-<task id>.log, named in the plan's run folder under .vloop/state/runs/.

2. Check every gate three ways

Run each gate on the base yourself with vloop task gate <id>, in the foreground, one at a time. It runs in the plan's shell from the repo root. A gate that takes minutes is a finding of its own kind in notes; do not wait on it past its timeout.

  1. It fails on the base, at a behavioural assertion. A gate that passes before the work exists proves nothing. A gate that fails because of a syntax error, a missing tool or a path typo is broken, not a gate; the expected failure is the assertion about the behaviour the task will add (or, when the thing it runs does not exist yet, that absence reported plainly). Read the log, not the exit code. The gate is run, and read, in the plan's shell with this host's tools: sh unless the config names another (P-5), and on macOS BSD grep, sed, awk and date. A pattern those tools reject is unpassable.
  2. Every fixture it builds is read back. When a gate edits a file, appends a config key, plants a defect in a copy or builds a repository, check the state the edit leaves with commands that already exist — do not assume it. A TOML key appended after a table landed in that table, and was read back as a different key than the gate meant.
  3. Every matcher is exercised once against the exact output the brief pins. Run the pattern (grep, awk, jq, a regex) over the literal output or text the brief says the work will produce. A pattern the host's tools reject, or that can never match, shows here instead of in the run.

Then read the gate for what a run cannot show.

2b. Rule on every criterion

For every task and every acceptance criterion, say who judges it: the gate (its verify exercises it), a named check the plan holds (its run runs what the criterion names), or the review (from the diff, or from a check's log). A criterion none of them could judge as written is a finding:

  • uncovered — it names an outcome no command in the plan produces and the diff cannot show.
  • check-gap — only a check could judge it (a script, a suite, a clean install), and no check the plan holds runs what it names. The planner cannot add a check, so say which check is missing.
  • unpassable — no work session can meet it: it requires a change under .vloop/ outside .vloop/tmp/ (S-4), or rules on files only the driver or the planner writes.

3. Name the findings

Each problem is one finding with a one-line summary and a kind:

  • wrong-reason — it fails on the base for a reason other than the missing behaviour: a typo, a missing file or tool, a malformed command, a fixture that never built.
  • not-contract — it judges how the code is written (a grep over source text, a re-serialised parse matched as text) or internals the brief does not name (beyond a sound pin, as below), rather than what the product does. A UI oracle that asserts appearance, or selects by class name or test id the brief never named, is this kind: it should assert through roles and visible text.
  • task-reach — its judge is, or reads, something a task writes: the task's own tests, seed data or output, so the task can pass it by writing the judge. A gate that runs the repository's suite, a check or a task's test is this kind too (P-8).
  • unpassable — no correct implementation could pass it: it contradicts its task's acceptance, asserts a clean tree the task must dirty, diffs against a baseline fixed at plan time, reads a file the task is meant to change as it was before, or needs a session to write under .vloop/ outside .vloop/tmp/ (S-4; the plan session's own gate folders aside). So does an acceptance criterion no session can meet, as in section 2b.
  • pins-unnamed — it pins a name (a function, file, flag, output label) the brief does not, so a correct implementation that chose another name fails. A pin is sound only where no surface the brief names (a command, a route, a file) could judge the same criterion, and its task's acceptance states the name.
  • uncovered — a criterion nothing could judge (section 2b).
  • check-gap — a criterion only a check could judge, which no check the plan holds runs (section 2b).

A gate that passes on the base is a failure of check 1, and the driver has already sent such a plan back; if one reaches you, report it as wrong-reason.

Be proportionate. You are not here to improve the gates. Wording, style and choices the brief left open are not findings, and a cascade of small objections costs the run a planning round. A finding must survive being read out loud to the planner: name the gate clause and the evidence.

4. Verdict

Write .vloop/tmp/gate-verdict.json as gate-verdict/v2:

{
  "schema": "gate-verdict/v2",
  "verdict": "FAIL",
  "tasks": [
    {"task": "T1", "verdict": "PASS", "findings": []},
    {
      "task": "T2",
      "verdict": "FAIL",
      "findings": [
        {"summary": "the gate fails with 'no such file: cmd/export', a path typo, not the missing export behaviour", "kind": "wrong-reason"},
        {"summary": "it greps internal/export/export.go for the word Marshal", "kind": "not-contract"}
      ]
    }
  ],
  "notes": "T2's brief section pins the output format; the gate never runs the command."
}

Then check it: vloop schema validate gate-verdict/v2 .vloop/tmp/gate-verdict.json must pass. A file that fails the schema counts as absent, and an absent verdict is a FAIL.

Every task of the plan gets one entry in tasks. A task's verdict is FAIL when it has any finding, otherwise PASS with findings empty. The plan's verdict is FAIL when any task's is. FAIL when you cannot judge: if a gate cannot be run, its log is missing or the brief is unreadable, say what is missing and fail. When in doubt, fail — a plan that passes gates it could not judge spends the run's attempts on them.

A FAIL goes back to the planner once, with your findings, so write each one for someone who has not seen your session.

Language

Read vloop config get language. Write the finding summary lines and notes in that language (C-4). Keys, enum values, ids, file paths and commands stay as they are, and so does this skill's own text. If it prints nothing, write English.

5. What you do not do

  • You do not edit the plan or the gates. The only files you write are under .vloop/tmp/: the verdict. If a gate is wrong, say so — the planner revises it, or the operator amends it with the operator's verify command.
  • You do not set task status. The driver applies your verdict.
  • You do not commit, and you do not move a git ref in any way (S-2): no branch, tag, reset, checkout or stash. You do not push.

Return the verdict and a one-line reason. That is all.

04 同仓库更多 Skills

mvelosop
mvelosop/vloop

work

Do exactly one task of the autonomous loop's plan and report on it. Invoked once per iteration by the driver as /vloop:work <task id>.

★ 0
mvelosop
mvelosop/vloop

verify

Verify the built result of a whole run against its brief, in three passes, and report findings as verify/v2. Invoked once per complete run by the driver as /vloop:verify, in a session separate from the work and the reviews.

★ 0
mvelosop
mvelosop/vloop

review

Independently verify one completed task of the autonomous loop and return a verdict. Invoked once per iteration by the driver as /vloop:review <task id>, in a session separate from the work.

★ 0
mvelosop
mvelosop/vloop

review-brief

Independently review a vloop brief before it is marked ready — facts against the code, internal consistency, conflicts with the repository's own rules, decisions the author took that the operator has not approved, and whether the loop can actually run it — and return a verdict with findings. Use in a session separate from the one that wrote the brief, when asked to review a brief, or before running a brief that the same operator session wrote.

★ 0
mvelosop
mvelosop/vloop

plan

Decompose a brief into .vloop/state/state.json — the task list the autonomous loop executes. Invoked once per run by the driver as /vloop:plan <brief path>.

★ 0
mvelosop
mvelosop/vloop

operate

The operator's playbook — from a ready brief, check the repository, run it with vloop on a work branch, handle halts, verify the result independently, record defects and interventions, close the brief and merge. Use in an interactive session when asked to run, resume, verify, close or merge a brief, or what to do about a halt or a finding. Writing briefs is /vloop:create-brief's.

★ 0