Skip to content
Back to skills

Review

BSecurity

The REVIEW half of the pipeline. Review an open pipeline PR from a fresh top-level session, score every row of its decision record, and post one verdict comment for the human who decides the merge. This is the manual form of the review session of /dev-pipeline:run. Use it when a run ends review-unbound, or to review a lane PR by hand.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 19, 2026
ai-agentsrustgoshellbashgitapiperformance

Works with

  • api
  • mcp

Security analysis

B75/100
  • criticalPipes output to a shell interpreter

Pro shows the line behind each finding and how to fix it

Scanned December 1, 2026

npx -y skills add manoldonev/second-shift --skill review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Review?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Review
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/manoldonev-review/badge)](https://www.skillsdirectory.com/skills/manoldonev-review)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: review
description: The REVIEW half of the pipeline. Review an open pipeline PR from a fresh top-level session, score every row of its decision record, and post one verdict comment for the human who decides the merge. This is the manual form of the review session of /dev-pipeline:run. Use it when a run ends review-unbound, or to review a lane PR by hand.
---

# review

Input: a PR number. Output: **one PR comment** in the verdict grammar (step 8). The comment has two
fixed lines, the row table of the record, then the findings. The same verdict goes on the
`second-shift/review` commit status of the sha that the comment names. The status is posted only
when the comment supports its own verdict line. Nothing is committed.

Run this as its own top-level session. That is the entire point: the session that wrote the code
does not grade it. Never run it inside the build's session. Never resume the context of an earlier
review.

> **Tracker delta (`tracker.type: jira`).** The checklist is the github default. Under jira, the
> ticket key comes from `Closes [<KEY>]` under the `### Jira Items` heading of the PR body, not from
> `Closes #N`. The verdict comment and its commit status are code-host writes, not tracker writes.
> They post the same way under both adapters. Nothing else is different.
> [Adapter contract](../../tools/tracker/jira/README.md).

## Checklist

1. Run `gh pr view <pr> --json number,headRefName,headRefOid,url`. Then take only the references
   from the body, not its prose. The filter prints the tokens alone, never the line around them:
   `gh pr view <pr> --json body --jq '.body | split("\n")[] | (capture("^\\s*(?<l>(closes|fixes|resolves)\\s+(#\\d+|\\[[A-Za-z][A-Za-z0-9]*-\\d+\\]))\\s*$"; "i").l), (capture("^(?<l>Record baseline: [0-9a-f]{7,40})\\s*$").l), scan("[^\\s()<>\\[\\]]*decisions\\.md")'`.
   The tokens name the ticket (`Closes #N`), the `Record baseline:` and the decision record
   (`<plansDir>/<repo>-<key>-decisions.md`).
   **Refuse the command for a PR that is not a lane PR.** A lane PR always names its decision
   record, because the build commits the record as the first commit of its branch. When the filter
   prints no `decisions.md` token, the PR is not a lane PR. Refuse this command at once. Tell the
   operator in one line that the PR is not a lane PR, and end the turn. Do nothing else.
   **Read the ticket yourself.** Under github, run `gh issue view <N> --json title,body,comments`.
   Under jira, use the `getJiraIssue` MCP tool, under whichever Atlassian namespace this session
   exposes, with the `fields` summary, description and comment, so that it returns the comments too. If you cannot read the ticket, you cannot review the PR: post `verdict: needs-work`
   with line 3 `reason: ticket-unreadable`.
   The filter is not a read of the build's account. Read no other part of the body before step 8.
2. Check out the PR head. Confirm that `git rev-parse HEAD` equals `headRefOid`. You review that
   sha, and you name it.

   **Count the other reviewers' comments.** Record how many comments other reviewers had on the PR
   when your review started:

   ```bash
   bash <this skill's base directory>/../../tools/other-comments.sh <pr> "$(date -u +%Y-%m-%dT%H:%M:%SZ)" <your scratch dir>/other-comments.json
   ```

   It prints nothing. Never open that file: only the join block reads it. When a read fails, it
   writes no file, and the joined verdict records the count as null. Go on with the review.

   **Find the last reviewed head.** Use the `gh` that step 8 posts through: the path that
   `gh-bot.sh --path` prints when its `--status` is `ok`, and plain `gh` otherwise.

   ```bash
   GH=<that gh> GH_READ=gh bash <this skill's base directory>/../../tools/changed-lines.sh -C "$(git rev-parse --show-toplevel)" <pr> <headRefOid> <your scratch dir>/changed-lines.txt
   ```

   ([the script](../../tools/changed-lines.sh)). Exit 0 prints `reviewed: <sha>`: the PR already
   has a lane verdict, and this is a **later review**. The file then lists the lines changed since
   that sha, one `path:first-last` range per line. Exit 3 is a **first review**, a full review as
   before: the PR has no earlier lane verdict, or its comments or the sha cannot be read. Exit 3
   writes no file. The script prints no finding of an earlier verdict. Do not read an earlier
   verdict yourself before step 8.

   **Start pass 1 and the plain review.** Each is a record-blind session that `run.sh` also runs:
   one headless session with Read, Grep and Glob only, in a copy of the head with no `.git` and no
   plans directory, given the diff and the ticket. Pass 1 reviews the ticket, the diff and the code
   with the pass-1 prompt. The plain review is the second, plain reviewer whose draft step 8 joins.
   Under github, write the ticket to a file with `gh issue view <N> --json title,body,comments |
   bash <this skill's base directory>/../../tools/plain-review.sh ticket-text github > <file>`, and
   pass it as `--ticket <file>`. It holds the title, the body and the comments, less the lane's own
   comments. Under jira, pass `--jira-key <KEY>` instead: each
   session may then read that issue with `getJiraIssue`, look up its cloudId with
   `getAccessibleAtlassianResources`, and call nothing else. Then run each of these two blocks with
   `run_in_background`, never in the foreground. Pass 1:

   ```bash
   bash <this skill's base directory>/../../tools/plain-review.sh run --prompt <this skill's base directory>/../run/pass-1-review.md \
     --out "$(bash <this skill's base directory>/../../tools/plain-review.sh out-dir <headRefOid>)-pass-1" --worktree "$(git rev-parse --show-toplevel)" \
     --base "origin/<base>" --head <headRefOid> <--ticket <file> | --jira-key <KEY>> --record <record file name> \
     --deny-read "$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)")" --deny-read <your scratch dir>
   ```

   The plain review:

   ```bash
   bash <this skill's base directory>/../../tools/plain-review.sh run --worktree "$(git rev-parse --show-toplevel)" \
     --base "origin/<base>" --head <headRefOid> <--ticket <file> | --jira-key <KEY>> --record <record file name> \
     --deny-read "$(dirname "$(git rev-parse --path-format=absolute --git-common-dir)")" --deny-read <your scratch dir>
   ```

   Shell variables do not survive from one Bash call to the next, so every block here names its
   paths literally: put in this skill's base directory, the `headRefOid` sha and your scratch dir
   as you hold them. The plain review has no `--out`, so it writes to
   `plain-review.sh out-dir <headRefOid>`, which step 8 derives again from the same sha. Pass 1
   writes to that dir's sibling with `-pass-1` appended. Its out dir holds its working tree, so it
   must stay outside every `--deny-read` path: a denied tree leaves pass 1 the diff text alone. Each run
   first clears what an earlier run left in its out dir. Never open the files in the plain review's
   dir yourself: only the join block reads them, so your draft is your own review.
3. **Pass 1 is the blind session, never this session.** Do not review the diff for pass 1
   yourself, and do not open the decision record, the plan, the PR description, a PR comment or an
   earlier verdict while pass 1 runs. Wait for the pass-1 run to finish. Its findings are
   `verdict.md` in the pass-1 out dir. Pass 1 has failed when the run exits non-zero, or when
   that file has no `## Findings` line. `why` in the same dir then says why. Run the
   pass-1 block once more. If it fails again, do not start pass 2: wait for the plain review to
   finish, tell the operator that pass 1 returned no findings and why, post nothing, and end the
   turn. A `## Findings` section that holds `None.` is a finding-free pass 1, not a failure.

   Read `.claude/second-shift/review-context.md` at the head when it exists. It is the repo's
   context for this review. Dispatch no reviewer, except the one design-fidelity reviewer of step 7.
4. **Pass 2: read the record at its first commit and at the head.** Start it only on the pass-1
   findings of step 3. The diff is `origin/<base>...HEAD`, where `<base>` is the PR's base branch.

   <!-- LOCKSTEP-BEGIN review-record-grounds -->
   The findings of pass 1 are this review's pass-1 findings, with the tags pass 1 gave them. When there is a record, pass 2 reads it at its first commit and at the head, and scores every row. A record row never removes, dismisses or downgrades a pass-1 finding. When a row decided the behavior that a finding shows breaking an existing caller, existing data or the ticket, the finding keeps its severity and names the row. A finding that shows existing data or an existing caller breaking under the change is not a finding when a record row names that exact case, accepts it, and names who decided. A row names who decided when its provenance is `user-answered`, or `ticket-sourced` with its comment URL. A `user-delegated` or `codebase-derived` row never accepts a break. The Evidence cell of the accepting row quotes the acceptance. Only three record grounds take a pass-1 finding out of `## Findings`: the accepted break above, the test intent's exemption of an acceptance criterion from a test, and an over-engineering `[note]` on a mechanism that a row prescribes when the row names who decided, as above. In a later review, two more grounds apply: a new pass-1 `[note]` on a line unchanged since the last reviewed head becomes a later-round note in `## Notes`, and a pass-1 finding that an earlier verdict accepted leaves unless its code changed since that verdict. A pass-1 finding that is still an open finding of the latest verdict is not new, and it stays in `## Findings`. Apply these two grounds only after you read the earlier verdicts. An exemption gets one line in `## Notes` that quotes it. A prescribed mechanism gets one line in `## Notes` that starts with its file:line and quotes the row. A dismissed or suppressed finding is never listed.
   <!-- LOCKSTEP-END review-record-grounds -->

   The first commit is the commit that
   added the record: `FIRST=$(git --no-replace-objects log --format=%H --diff-filter=A -- <record> | tail -n 1)`. Read
   `git --no-replace-objects show $FIRST:<record>`. It shows what was decided before the build started. Then read the
   file at the head. Write `git --no-replace-objects` in every command that reads `FIRST`, as
   the commands below do. A replace ref in the checkout changes what a commit's sha returns, and
   the review reads the commit that the remote shows.
   - A row edited since `FIRST` is a departure. The edit must name who decided.
   - A row added since `FIRST` is a decision made during the build. Score it too. It must also
     name who decided.
   - When the PR body has `Record baseline: <sha>`, that sha is the baseline. The baseline can
     differ from the `FIRST` you computed, or it can be no ancestor of the head. Then the record
     commit was rewritten, and that alone is a blocker.

   Check every row of the record against the diff. The record's test intent can exempt an
   acceptance criterion from a test. Then the pass-1 finding that the criterion has no test leaves
   `## Findings`, and `## Notes` gets one line that quotes the exemption.
5. **Look at what the scheduler would have given you.** Read `git --no-replace-objects diff $FIRST..HEAD` and check
   each item below. Each item is a question that the diff must answer, whatever the stack.
   - Deleted or renamed test files. A top-level `tests/`, `__tests__/`, `test_*.py`,
     `conftest.py`, `_spec.` and `*-selftest.*` count too.
   - Added skips or forced-green lines: `.skip(`, `.only(`, `|| true`, pytest
     `skip`/`skipif`/`xfail`, Go `t.Skip(`, JUnit `@Disabled`, Rust `#[ignore]`, and similar.
   - Edits to CI or check configuration. `pyproject.toml`, `pytest.ini`, `setup.cfg`,
     `.coveragerc`, `Makefile` and a nested `package.json` count too.
   - Modified existing test or snapshot files (`__snapshots__/` or `.snap`), and their removed
     expectations. Trace each one to an acceptance criterion or a record row. An untraced one is
     a `[blocker]` that requires the citation.
   - Every `when`-scoped `extraLanes` entry that no changed file matched. That is a configured
     lane that did not run on this diff.
   - Every added, edited, deleted or renamed review-policy file. List them with
     `git --no-replace-objects diff --name-status $FIRST..HEAD`, and check both sides of a rename. The review-policy
     files are `.claude/second-shift.config.json`, anything under `.claude/second-shift/`, and
     what your own session loads from the working tree: `.claude/settings.json`,
     `.claude/settings.local.json`, `.mcp.json`, a `CLAUDE.md` or `CLAUDE.local.md` in any
     directory, and anything under `.claude/rules/`, `.claude/agents/`, `.claude/skills/`,
     `.claude/commands/`, `.claude/output-styles/` or `.claude/hooks/`.
     You load these files from the head, so the PR is reviewed against the policy it edits.
     Trace each one to an acceptance criterion or a record row. An untraced one is a `[blocker]`
     that requires the citation. The edit itself is never the blocker.
   - Every path that the PR's own diff deletes or renames away, still named at the head. This
     item reads its own range, not `$FIRST..HEAD`. Run `git fetch origin <base>`, then list the
     paths with `git --no-replace-objects -c core.quotePath=false diff --no-renames --diff-filter=D --name-only origin/<base>...HEAD -- . ':(exclude)<plansDir>'`.
     A rename's old path is listed as a deletion. For each path, run
     `git -c core.quotePath=false grep -n -I -F -e <path> HEAD -- . ':(exclude)<plansDir>'`.
     A hit needs a path boundary on both sides. Path characters are `[A-Za-z0-9._/-]`. A `./`
     right before the path is also a boundary when the `./` starts the line or follows a
     non-path character. A `.` right after the path is also a boundary when the line ends or
     whitespace follows. So `src/foo.tsx`, `plugins/x/lib/a.sh` and `../lib/a.sh` are not hits
     for a deleted `src/foo.ts` or `lib/a.sh`, and `run: ./src/foo.ts` and `see src/foo.ts.`
     are. Do not match the basename alone, and do not grep a removed directory as a directory.
   <!-- LOCKSTEP-BEGIN deleted-path-hits -->
   - Open each hit of a path that the PR deletes or renames. A reference that still expects the old path is a `[blocker]` at that file:line. A hit that is history or prose is not a finding. A reference to the path in another repo, such as a consumer's file or a URL, is not a finding. The deleted path is in the diff, so this rule permits the read of the hit's file and a finding at a line that the diff does not touch.
   <!-- LOCKSTEP-END deleted-path-hits -->

   Then run the AC coverage check of the plan, as the scheduler does after its checks. Write the
   record at `FIRST` to a file (`git --no-replace-objects show $FIRST:<record> > <file>`). Then run
   `bash <this skill's base directory>/../../tools/plan-coverage.sh --head <record at the head> <record at FIRST> <plan at the head>`.
   The plan is `<plansDir>/<repo>-<key>-plan.md`, beside the record
   ([the script](../../tools/plan-coverage.sh)). The record at the head is read for one thing: an
   AC added after the baseline counts when a `D-n` row added or edited since the baseline carries
   `user-answered` or `user-delegated` provenance. The check names the row and its provenance, not
   who wrote it: the build records its own changes as `user-delegated`. You score that row anyway in
   step 6. Every baseline AC is still read from the baseline.
   - Exit 1 is a `[blocker]` that names what the check printed. The causes are an AC with no test
     task, a tag neither record defines, a tag only the head defines with no `user-answered` or
     `user-delegated` ledger change, an unparseable task line, or no plan.
   - Exit 3 is not-applicable: the record has no `## Test intent`, or the ticket has no AC block.
     It is never a blocker.
   - Exit 2 means that the check could not read the AC set of the record. Say so in `## Notes`.

   `post-review-status.sh` runs the same check and posts no `success` while the check is red.
   The next check proves that each tagged test fails on the tree of the record commit: the file
   under a runner of format `exit`, each named `file::case` under a reporting runner. Only
   the scheduler makes it. A lane run makes it before its review and reports it in the run block
   of the PR body. Do not run it: a session that runs tests in a worktree it controls does not
   give that proof. A PR built through `/dev-pipeline:build` took the `--handoff` path. On that
   path, the latest lane comment on the ticket is a `build-handoff` comment, and the body has no
   `## second-shift run` block. Nothing ran the check there. Say so in `## Notes` as
   `fails without the change: not run on the handoff path`. It is a line in `## Notes`, never a
   finding.
6. **Score EVERY row of the record** against the code. The scores are `honored`, `violated`,
   `departed` or `undeterminable`. A departed row was edited: name who decided, per its
   provenance. For an undeterminable row, say what you could not read. A violated or
   undeterminable row is a blocker. Do not approve when a row has either score.

   <!-- LOCKSTEP-BEGIN review-pause-and-ask -->
   A row can cite a region that the record's `## Open Regions` table marks `pause-and-ask` at its first commit. Only the requester decides that row. If its provenance was `deferred` at the first commit and is `user-delegated` at the head, score it `violated`, never `departed`. The build decided a question that it had to stop on. The row is no longer `violated` for this reason once the head restores it to `deferred` or carries the requester's answer as `user-answered`.
   <!-- LOCKSTEP-END review-pause-and-ask -->

   <!-- LOCKSTEP-BEGIN review-row-reach -->
   A row can say where or to what a rule applies. Score that row against every caller of the unit that holds the rule, in the repository at the head. The row is `honored` only when the review names each caller and shows that each one gets the rule. A caller that only passes an opt-in along is followed up to the callers that decide it. A caller that the row or the ticket itself names as outside the rule does not count. External and dynamic callers do not count. Any other caller left outside the rule scores the row `violated`. The review then files a `[blocker]` at that caller's file:line, with a concrete input that the caller prints or handles differently from the rule.
   <!-- LOCKSTEP-END review-row-reach -->

   A row can name a deferred, unmeasured or inherited cost, load or performance risk. Still score
   that row on whether the code matches it. The row is the operator's decision. A score never
   overrides it. Its risk is also required performance work: the review states the worst-case
   bound. A bound that breaks an existing caller or existing data is a `[blocker]` under the
   severity rule of pass 1. Any other bound is a `[blocker]` when it breaks what the row decided.
   A bound within the risk that the row accepts, when the row names who decided, is one line in
   `## Notes` that starts with its file:line and quotes the row. Otherwise it is a `[note]` when it is relevant, and one line in `## Notes` when it is not. The row permits the out-of-diff reads that check the bound.
   The row can name a file that the diff does not touch. That fact scores the row. It does not
   bound the risk.
7. **Design frames.** The `## Design frames` (or `## Design`) section of the record can have
   `| RS-n |` rows. Then do two things.
   - Dispatch one design-fidelity reviewer with the Agent tool. The config's `design.provider`
     picks it, by the rule that picked the build's design sequence and its design grants:
     `claude-design` picks `design-toolkit:design-faithful-reviewer`, and `figma` or no provider
     picks `design-toolkit:figma-faithful-reviewer`. A handoff URL in the section does not change
     the pick. Give it the diff and the record. If you cannot dispatch it, or it returns no report, you cannot approve: post
     `verdict: needs-work` with line 3 `reason: seat-unavailable`.
   - Render every screen at the head with the repo's render command
     (`design.liveRender.command`). Compare each screen with its frame. If you cannot render, you
     cannot approve: post `verdict: needs-work` with line 3 `reason: render-unavailable`.
8. **Read the build's own account last, after pass 2.** Only then read the PR description and the
   build's PR comments. Use them to reconcile the departures and rebuttals they state.
   Measurements show that an author's framing lowers what a reviewer finds. If that reading
   changes a score or a finding, say so in the verdict's `## Notes`:
   `revised after reading the build's account: <what changed>`.

   **A later review.** When step 2 printed `reviewed: <sha>`, the lines changed since that sha
   are in `<your scratch dir>/changed-lines.txt`: each line of the head within 3 lines of a hunk of
   `git diff <sha> HEAD`. An empty file means that nothing changed. Then:

   <!-- LOCKSTEP-BEGIN review-later-round -->
   In a later review, read the PR's earlier lane verdicts last, with the build's account. A lane verdict is a comment by the bot or the operator account whose line 1 is `verdict: approve` or `verdict: needs-work`. `gh pr view <pr> --json comments` returns the earlier ones, though they are minimized as outdated. Then apply these rules:
   - Check each finding of the latest lane verdict against the head and the build's PR comments. Write a resolved line for each one that is fixed, rebutted with a rebuttal you accept, or turned into a ticket edit. Raise again a finding that is neither fixed nor validly rebutted. It gates, on a changed or an unchanged line.
   - A finding that offered `accept the gap, or add <unit>`, in its `Fix:` line or in its text, is validly rebutted by a build reply that leaves that choice to the requester, with the choice in the PR body's `## Before you merge` section.
   - Do not raise again a finding that an earlier verdict accepted, unless the code it points at changed since that verdict. A verdict accepted a finding when it agreed with the build's rebuttal or turned the finding into a ticket edit.
   - A new `[note]` on a line unchanged since the last reviewed head is not a finding, from pass 1 or from you. Write it in `## Notes` as a later-round note, in the form the verdict grammar gives. It does not gate.
   - Check each later-round note of the latest lane verdict against the head and the build's PR comments. Write a resolved line for each one that is fixed, rebutted with a rebuttal you accept, or turned into a ticket edit. Write each other one again as a later-round note, so that the human who merges still sees it. It does not gate.
   - Copy every resolved line of the latest lane verdict, so that the list holds every finding the PR had that is now resolved. While a finding is open again in `## Findings`, leave out its resolved line. Write a new one when it is resolved again.
   - A new `[blocker]` gates on any line, from pass 1 or from you. This covers a row-reach blocker at an untouched caller, an untraced test-expectation change and a design-fidelity finding.
   - Score every record row in full, as in a first review.
   - The join adds a blind finding only when its file:line is on a changed line, or when it names no file:line.
   <!-- LOCKSTEP-END review-later-round -->

   **Post ONE PR comment.** Post it through [`gh-bot.sh`](../../tools/gh-bot.sh) when its
   `--status` is `ok`, and through plain `gh` otherwise. Pass the body with `--body-file`. The body
   follows this grammar exactly. The review prompt of `run.sh` states the same grammar.

   Your `reviewed-by:` line is exactly `reviewed-by: second-shift review (v<release>)`. `<release>` is the content of `<this skill's base directory>/../../.claude-plugin/release`. When that file is absent, the line is `reviewed-by: second-shift review`.

   <!-- LOCKSTEP-BEGIN verdict-grammar -->
   The verdict comment has these parts, in this order and nothing else:
   - Line 1 is exactly `verdict: approve` or `verdict: needs-work`. Line 2 is exactly `reviewed: <the full sha of the head you reviewed>`. An optional line 3 is exactly `reason: render-unavailable`, `reason: ticket-unreadable` or `reason: seat-unavailable`. When you were given a `reviewed-by:` line, it comes next, exactly as given.
   - `## Summary`, right after those lines. Its first line is exactly `Mergeable as it is.` on an approve, or `Not mergeable yet.` on a needs-work. Then name each row scored `departed`, `violated` or `undeterminable`, with its score. Then write each action the human must take, one per line, or `Nothing to do.` When `## Notes` holds later-round notes, one action line gives their count and asks the human to read them before the merge. Write no table. Use at most eight lines.
   - `## Decision record rows`, then a table headed `| Row | Score | Evidence |` and its `| --- | --- | --- |` line, with one row for every `D-n` row of the record at its first commit and at the head: a row the build deleted and a row it added are both scored. The Row cell's first token is the row's `D-n` id, and the Score cell's first word is one of `honored`, `violated`, `departed`, `undeterminable`. The section holds the table and blank lines only: per-row detail goes in the Evidence cell, anything else in `## Notes`. Other row kinds, such as `RS-n`, are not scored in this table.
   - Fold the rows table. Put the line `<details><summary><N> rows: <k> honored, <k> departed, <k> violated, <k> undeterminable</summary>` and a blank line before the table, and the line `</details>` after it. N is the number of rows in the table, and each k is the number of rows with that score. Keep the scores in that order and leave out a score with no rows. Always write `rows`. Never write `<details open>`. A verdict that folds the table has a `## Summary`, so every row that is not honored stays visible. A table without the fold also passes.
   - `## Findings`, which runs to the next `## ` heading. Each finding starts with `- [blocker] B<n> ` or `- [note] N<n> `, and its continuation lines are indented two or more spaces. Dismissed and suppressed findings are not listed. Each finding id appears once in the verdict. A section with no findings holds the single line `None.`. When `## Notes` holds resolved lines, it holds exactly `None open. <n> resolved, listed in ## Notes.` instead, where n is the number of resolved lines. The fold's summary repeats that count: the rule to state each fact once does not apply to it.
   - After its id and one space, a finding names its file:line and its defect: `- [blocker] B1 path:line — <defect>`. Its first continuation line is `Scenario: <input or state> → <wrong outcome>`. A finding that a dispatched reviewer raised names that reviewer in brackets before its file:line: `- [blocker] B1 [Reviewer] path:line — <defect>`. A finding you raise from a rule (a violated or undeterminable row, an untraced test-expectation change) names its rule, and its file:line only where it has one. No finding carries a confidence number.
   - `## Notes` (optional): free prose for the human, such as process notes or `revised after reading the build's account: <what changed>`. It also holds one line for each thing the review must show that is not a finding: a stale or wrong PR title or description, a break that only the ticket text accepts, and a test-intent exemption. In a later review, it also holds one later-round note for each new `[note]` on a line unchanged since the last reviewed head, in the form `- later-round note: <file:line> — <defect>`. Nothing in it counts toward the verdict.
   - In a later review, `## Notes` also holds the resolved fold, after the prose notes and before the knowledge-base block. The fold is the line `<details><summary><n> resolved</summary>`, a blank line, one resolved line for each resolved finding, then the line `</details>`. n is the number of resolved lines. A resolved line is exactly `- resolved: <file:line> — <defect> — <how>`. `<how>` is `fixed`, `rebuttal accepted: <why>` or `ticket edited`. For a finding that had no file:line, the slot holds the rule or row id the finding named. The line carries no finding id and no sha. A verdict with no resolved line has no fold. A verdict with a resolved line always has the fold. The fold has no `###` heading, and the style rules on `###` sub-headings and on leaving out a topic do not apply to it. A resolved line is not a finding, does not gate and needs no Summary action line.
   - `## Summary` and `## Notes` carry no over-engineering observation that `## Findings` does not list as a finding. Write each relevant one as a `[note]` in `## Findings`, and leave out the rest. The `lane vs blind:` line is exempt.

   `Ready to merge?` is never written anywhere in the body.

   Every finding is relevant: something in the diff that a distinguished engineer who knew of it would definitely address before merge. A `[blocker]` and a `[note]` both make the verdict `needs-work`. The tag names the kind of problem. The PR title and description are not the diff: a stale or wrong one is never a finding and never makes a verdict `needs-work`.

   `verdict: approve` means mergeable as-is: every record row is scored, none is `violated` or `undeterminable`, and there is no finding and no `reason:` line. `verdict: needs-work` carries at least one finding, `[blocker]` or `[note]`, a `violated` or `undeterminable` row, or a `reason:` line; under that line the rows need not be scored, and the findings may be `None.` or the `None open.` line.
   <!-- LOCKSTEP-END verdict-grammar -->

   <!-- LOCKSTEP-BEGIN kb-contributions -->
   Knowledge-base contributions: when the repo's review-context.md has a `## Knowledge-base contributions` section, write a contributions block last in the verdict's `## Notes`. The candidates are what the record's `## Knowledge source` answer says the knowledge base does not cover (lookup gap), the page a `D-n` row names in `kb-conflict: <kb-page> (kb stale)` or `(kb ahead)`, and what this diff makes true that the knowledge base should state (change gap). Apply the inclusion test that the section declares, as written, to every candidate, and list only the candidates that pass. Write the lead line `Knowledge-base contributions:` with one proposal per line under it, in the format the section declares or as `- <kb-page> — <what to add or correct> (<gap kind>)`. When no candidate passes, write no contributions block. Carry the whole list on every verdict, never only what changed since an earlier one: the earlier verdicts are collapsed once one binds. When review-context.md has no such section, the verdict carries no contributions line. A proposal is a draft the operator files in the knowledge base: never a finding, and it never makes a verdict `needs-work`.
   <!-- LOCKSTEP-END kb-contributions -->

   <!-- LOCKSTEP-BEGIN verdict-style -->
   Write the verdict for the human who decides the merge.
   Use short sentences. An instruction has at most 20 words. A statement has at most 25 words.
   Write one instruction per sentence. Use the active voice.
   Do not use idioms, hedges or semicolon chains.
   Use the same word for the same thing every time.
   State each fact once. Do not repeat a fact from one section in another.
   In the rows table:
   - Keep each Evidence cell to one or two sentences.
   - Start the Evidence cell with the file:line or the test id. Then say what it shows.
   - Start the Evidence cell of a departed row with `Decided by <who> (<provenance>).` Then give the commit of the edit and the new resolution.
   - If the edit of a departed row names no decider, start its Evidence cell with `No decider named.`
   - Start the Evidence cell of a row that the build added with `Added by the build, <provenance>.`
   - Start the Evidence cell of a row that the build deleted with `Deleted by the build.` Then name who decided.
   - Put longer detail in `## Notes`.
   In `## Findings`:
   - Put blockers first and notes after them.
   - Give the defect in the first sentence of each finding.
   - Put the evidence on continuation lines. Indent them two spaces.
   - End each finding, a note too, with the continuation line `Fix: <one instruction>`. It states the outcome to restore and never prescribes a new unit of mechanism.
   - A unit of mechanism is a refactor, new abstraction, layer, generalization or extension point, or a cache, timeout, lock, retry, flag or option, config key, stored or request field, renderer, a second writer of an existing artifact, or a user-facing control.
   - When only new mechanism restores the outcome, the line reads `Fix: accept the gap, or add <unit> — the requester chooses.` A unit that the ticket or a record row requires is not new mechanism: the line names it and cites that requirement.
   - Write a note in at most four lines, its Fix line included.
   In `## Notes`:
   - Use one `###` sub-heading for each topic. Write at most six sentences under it, not counting the resolved lines and the two lines of their fold.
   - Write an inventory, such as the mutation run, as a list.
   - Put the knowledge-base block last.
   - Do not write a sub-heading that has nothing under it.
   - Leave out a topic that changed no score or finding.
   - Keep `## Notes` under 150 words, not counting the knowledge-base block, the later-round notes, the resolved lines and the two lines of their fold.
   A limit never removes a row, a finding or a knowledge-base proposal. If they do not fit, shorten the wording.
   <!-- LOCKSTEP-END verdict-style -->

   **Join the plain review before the check.** Write your verdict to a draft file. Wait for the
   plain review's background run to finish; never end the turn before it does. Then join the two:

   ```bash
   O="$(bash <this skill's base directory>/../../tools/plain-review.sh out-dir <headRefOid>)" || exit 1
   P=""; [ -s "$O/verdict.md" ] && P="$O/verdict.md"
   bash <this skill's base directory>/../../tools/verdict-join.sh <your draft> "$P" \
     --why "$(cat "$O/why" 2>/dev/null || echo 'the blind review did not return')" \
     --ticket "$(cat "$O/ticket" 2>/dev/null || echo false)" \
     --other-comments <your scratch dir>/other-comments.json \
     --plain-cost "$(jq -r '.total_cost_usd | numbers' "$O/result.json" 2>/dev/null)" \
     --plain-wall "$(cat "$O/wall" 2>/dev/null)" > <joined draft>
   ```

   Run the block as one Bash call, with every placeholder replaced by the literal value. In a
   later review, add `--changed <your scratch dir>/changed-lines.txt` to the `verdict-join.sh`
   line. Then the join leaves out a plain finding on an unchanged line.

   The joined draft is the body you check and post, unchanged. The script merges plain's findings
   by `run.sh`'s rules, makes a plain-only finding turn an approve into a needs-work, and ends the
   body under `## Notes` with one `lane vs blind:` line that counts how the two reviews' findings
   pair, and a hidden machine line. This session's cost and time are null in it. When the plain review did not
   return, your verdict stands and `## Notes` says why.

   **Check the draft before you post it.** Write the body to a file. Write the record at `FIRST` to
   another file (`git --no-replace-objects show $FIRST:<record> > <file>`). Then run
   `bash <this skill's base directory>/../../tools/verdict-check.sh <draft> <record at the head> <record at FIRST>`
   ([the checker](../../tools/verdict-check.sh)). It prints every rule that the draft breaks. Fix
   the draft until the checker exits 0. Exit 2 means that it could not read a file. Fix the path.
   Never post on a check that did not run.
   The format matches the lane's own verdicts, but no scheduler reads this comment. A finished run
   has exited, and a re-launch builds before it reviews. The comment is for the human who decides
   the merge. Never edit it.
   Whoever edits a posted verdict in place later re-checks it with `GH=<that gh> bash <this skill's base directory>/../../tools/post-review-status.sh --recheck <comment id> <pr> <sha> <record at the head> <record at FIRST> <the comment's URL>`, which posts the status the edited comment implies, or `error` when it breaks a rule.

   Then collapse the earlier verdicts and build replies of the PR as outdated. Use the same `gh`
   that you posted through:
   `GH=<that gh> bash <this skill's base directory>/../../tools/minimize-verdicts.sh <pr> <comment id>`
   ([the script](../../tools/minimize-verdicts.sh)). The id is the number after `#issuecomment-`
   in the URL that your post printed. The script minimizes only lane-authored comments posted
   before yours whose first line is a `verdict:` line or exactly `build: reply`. It never
   minimizes a notice or a comment by anyone else. If it fails, say
   so in your session output, not in a PR comment, and continue. Never retry it as yourself in
   the place of the bot.

   Then check `headRefOid` again. If it is no longer the sha on your `reviewed:` line, the head
   moved during your review. Post no status, and say so in a plain PR comment. Otherwise, post the
   same verdict as a commit status on that sha. Use the same `gh` (the bot when `--status` is
   `ok`). Never use a raw `gh api` call:
   `GH=<that gh> bash <this skill's base directory>/../../tools/post-review-status.sh <pr> <sha> <body file> <record at the head> <record at FIRST> <your comment's URL>`
   ([the script](../../tools/post-review-status.sh)). The script runs the checker again on the
   body you posted. Under `second-shift/review` it posts `success` for approve and `failure` for
   needs-work. An approve with red plan coverage posts nothing. A consumer that requires
   `second-shift/review` in branch protection cannot merge a PR without this status.
   - Exit 1: the body breaks a rule, or the plan coverage of the approve is red. No status was
     posted. Say so in a plain PR comment that names the failed rules or the coverage lines that
     the script printed. Never put a `verdict:` line in that comment.
   - Exit 3: the post failed. Say so in a plain PR comment. A 403 or 404 through the bot means
     that its GitHub App does not have "Commit statuses: write". Never retry it as yourself in
     the place of the bot.

   Then stop. Leave a draft PR a draft, approve included: the operator marks it ready for review.

## Rules that are not negotiable

- **Review the head you name.** Check `headRefOid` again just before you post. If the branch moved
  during your review, review the new commits and name the new head. A verdict that names an older
  head does not count.
- **Do not soften a blocker to keep a run moving. Do not invent a blocker to look thorough.**
- **Never end a turn with work that this turn started and has not collected.** Wait for the
  design-fidelity reviewer you dispatched. A `&`-detached command or an armed `Monitor` at turn
  end is abandoned, not deferred.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.