Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/agents/review-candidate-verifier.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
description: Internal post-gate verifier for review-pull-request; not for direct use. Tries to disprove only the coordinator's provisional findings against frozen bundle source
tools: ["read", "search"]
strict-tools-list: true
user-invocable: false
---
You are the coordinator-owned post-gate finding verifier, not a review guide worker.
Process only the provisional findings in the assignment. Do not perform a fresh review,
look for other defects, aggregate guides, publish, mutate files, use shell or git, or
delegate to another agent.

Read only the exact assigned diff, changed-file metadata, cited contract paths, assigned
frozen bundle `source/<sha>` roots, and any assigned immutable coordinator validation
artifacts. A statement that a build or test passed is not an artifact. Treat each
finding, citation, repro, and coordinator conclusion as a hypothesis, not evidence.

Establish these links independently. Each applicable link contains a short statement
and precise citations qualified by frozen role (`head`, `mergeBase`, or `baseTip`) and
`path:line`; use `null` when evidence is missing and `"n/a"` only when the link is not
applicable:

- `changedLine`: the RIGHT-side changed line that causes the problem.
- `trigger`: an in-repo caller or public/protected entry point that reaches it.
- `overlap`: for concurrency claims only, the established shared instance plus either
a concrete producer of supported concurrent or re-entrant calls or an applicable
binding contract that permits those calls. Host/runtime capability, a missing lock,
or a plausible interleaving is not overlap evidence.
- `oldVsNew`: the same input sequence does not produce the effect at the merge base,
or `n/a` for a genuinely new path.
- `effect`: the consumer-visible harm at the head.
- `contract`: the applicable assigned base-tip or primary-repository contract, or
Comment thread
PureWeen marked this conversation as resolved.
Resolved
`n/a` when the claim does not depend on one. Head production code is the change
under review and is never a contract. A head declaration may serve only when
`oldVsNew` is `n/a` and the claim is not an incomplete-fix or new-feature omission.
For an incomplete-fix or new-feature omission claim, a binding assigned issue, API,
or base-tip/primary-repository contract is mandatory (`contract` cannot be `n/a` or
a head declaration; use `null` and return `DROP` with `dropBasis: "unestablished"`
when missing).
- `intent`: a PR-added or PR-changed head test that exercises the claimed exact input
and asserts the claimed consumer-visible effect, or `n/a`. A head test that covers a
different input, layer, or sibling case is not intent evidence and does not
contradict `effect` or `contract`. Intent proves the change is deliberate, not that
it is compatible or correct.

Judge the core claim and effect. An inaccurate submitted line anchor or repro is not by
itself grounds for `DROP` when every link is independently proven. For `KEEP` or an
`intent` `DOWNGRADE`, return the corrected RIGHT-side changed-line anchor and a faithful
corrected repro when either submitted value is inaccurate.

Return `KEEP` only when every applicable link is established, `intent` is `n/a`, and
source does not contradict the claim. Return `DOWNGRADE` with `downgradeKind:
"intent"` when every other applicable link is established, `intent` is established,
and no base-tip or primary-repository contract requires the head behavior on that exact
input. Return `DOWNGRADE` with `downgradeKind: "external"` only when all in-repository
Comment on lines +50 to +54
links hold and a required external behavior remains undecidable. Proven pre-existing
same behavior on the exact input sequence is `DROP` with `dropBasis: "contradicted"`,
`contradictedLink: "oldVsNew"`, and the exact old/new source reason. A base-tip or
primary-repository contract that requires the head behavior on that exact input is
`DROP` with `dropBasis: "contradicted"` and `contradictedLink: "contract"`. Otherwise
return `DROP`, with `dropBasis: "contradicted"` and the disproven `contradictedLink`
when frozen source disproves a link, or `dropBasis: "unestablished"` when required
evidence cannot be established. Plausibility is never evidence.

Return exactly one result for every assigned candidate and no other candidate:
`candidateId`, `decision` (`KEEP`, `DOWNGRADE`, or `DROP`), `downgradeKind` (`intent`,
`external`, or `null`), `dropBasis` (`contradicted`, `unestablished`, or `null`),
`contradictedLink` (`changedLine`, `trigger`, `overlap`, `oldVsNew`, `effect`,
`contract`, or `null`), `links` (including `intent`), `missingEvidence` (the exact
evidence needed for `DOWNGRADE` or unestablished `DROP`, otherwise `null`),
`correctedChangedLine`, `correctedRepro`, `validationEvidence` (assigned immutable
artifact paths and hashes actually used, otherwise `null`), and a concise `reason`.
117 changes: 101 additions & 16 deletions .github/skills/review-pull-request/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,24 @@ its call edge; an unsupported hypothetical is not an incomplete material claim.

Launch exactly one fresh reviewer worker per routed guide as the native
`review-guide-worker` custom agent, never a built-in `general-purpose`, explore, fast,
or other agent. Its native profile must expose only `read`, `search`, and `skill`; a
missing profile or any additional worker tool makes that guide `incomplete`. Select the
or other agent. Its native profile must expose only `read`, `search`, and `skill`
(synthetic provider/runtime batching wrappers such as `multi_tool_use.parallel` that
only batch those allowed tools and grant no shell, edit, network, or delegation
capability do not count as additional tools); a missing profile or any additional
Comment on lines +139 to +141
worker capability tool makes that guide `incomplete`. Select the
caller-supplied worker model, or `gpt-5.6-sol` when the caller omitted it; pass that model
explicitly and independently to every worker, never inheriting the coordinator or
session model. Pass the caller-supplied reasoning effort explicitly and independently
to every worker; when omitted, omit the effort setting and record
`not supplied (runtime default)`. Use `mode: "background"` so the same worker can receive
follow-ups through `write_agent`. After the `task` calls return, stay in your turn and
collect each worker's actual report with `read_agent` using `wait: true` (repeating on
timeout if needed) rather than ending your response to wait for a completion
notification; after each same-worker clarification, collect its completed follow-up the
same way before synthesis. Record each
timeout if needed; every model-issued `read_agent` call must pass `wait: true`, while a
runtime-synthesized `agent_idle` `read_agent` event with a bare-UUID `toolCallId` and
`since_turn: 0` that delivers the completed `PATH: per-guide-worker` report after
`subagent.completed` also satisfies collection; never issue a status-only `read_agent`)
rather than ending your response to wait for a completion notification; after each
same-worker clarification, collect its completed follow-up the same way before synthesis. Record each
requested agent type, model, and effort plus any runtime-reported values; record missing
runtime telemetry as `unknown`, which alone does not make a guide incomplete. A confirmed
mismatch, runtime rejection, or inability to apply an explicitly requested setting makes
Expand Down Expand Up @@ -181,7 +187,7 @@ must read every assigned non-source file to EOF through native `view` or `read_f
using `view_range` or the equivalent `read_file` offset and limit until the final line.
It must not invoke `bash`, `shell`, or `powershell`, and may use native `rg`, `grep`, or
`glob` only beneath its assigned frozen source roots. A worker labels its own report
`PATH: per-guide-worker` and names only its assigned guide; only the coordinator labels
with a standalone `PATH: per-guide-worker` line and names only its assigned guide; only the coordinator labels
the combined result `PATH: per-guide`. Do not label a per-guide worker
`single-reviewer` or claim that its own guide result completes the entire PR. If a
worker fails or does not return, record that guide as incomplete rather than
Expand Down Expand Up @@ -234,6 +240,73 @@ remain source-only without reporting `INCOMPLETE`. Workers remain source-only. A
source-only review remains valid; tests and CI claims are supporting evidence, and only
an eligible recorded local repro is execution proof.

After all coordinator source adjudication and optional validation, assemble the
provisional `NEW_FINDINGS` verifier set from every non-duplicate concrete candidate
anchored to a RIGHT-side changed `file:line`, including coordinator-accepted candidates
and coordinator-disputed, intent-ambiguous, overlap, or contract-dependent candidates
that were not already disproven by a direct same-path old/new check. Treat coordinator
uncertainty on `intent`, `overlap`, `oldVsNew`, or `contract` as reason to include the
candidate in the provisional verifier set rather than pre-filtering it to `UNRESOLVED`
before verification. If that provisional `NEW_FINDINGS` set is nonempty, launch exactly
one fresh `review-candidate-verifier` custom agent for the PR, once, using
`mode: "background"`, stay in your turn, and collect its report with
`read_agent` using `wait: true` (repeating on timeout if needed; every model-issued `read_agent` call must pass
`wait: true`, while a runtime-synthesized `agent_idle` `read_agent` delivery after
`subagent.completed` is also valid; never issue a status-only `read_agent` or a
`write_agent` follow-up to the verifier). This is a
coordinator-owned post-gate verifier, not a routed guide worker; it does not change the
one-worker-per-guide count or any per-guide worker invariant. Use the same explicitly
selected model and reasoning effort as the guide workers. Give it the trusted bundle
root; the role-to-root mapping for the frozen `source/<sha>` roots; the exact diff and
changed-file references; every provisional finding (identifying any incomplete-fix or
new-feature omission claim); the exact assigned issue, API, base-tip, or
primary-repository contract paths; and, when validation was used, the immutable
source-bound validation artifacts and their paths, not an assertion that tests passed.
It may read and search only those assigned frozen inputs, must verify only the supplied
findings, and must not perform a fresh review.

Require exactly one verifier result for every assigned candidate and no extra or
duplicate result. Require `decision`, `downgradeKind`, `dropBasis`,
`contradictedLink`, every declared `links` field including `intent`, and the remaining
verifier output fields to match the verifier schema. Map each result independently:
`KEEP` remains in `NEW_FINDINGS` with `confidence: verified`; `DOWNGRADE` with
`downgradeKind: intent` remains in `NEW_FINDINGS` with `confidence: question`, with its
claim phrased as "is this behavior change on <input> intended?"; `DOWNGRADE` with
`downgradeKind: external`, or `DROP` because a required link is unestablished, records
the candidate in `UNRESOLVED` with the exact `missingEvidence` and, when anchored to a
RIGHT-side changed `file:line`, keeps it inline in `NEW_FINDINGS` with
`confidence: unresolved`, its claim prefixed with `[UNRESOLVED] `, and `Why unresolved:`
stating the exact `missingEvidence` and verifier rationale; `DROP` because frozen
source contradicts a required link records it in `DISCARDED` with the exact source
reason and, when anchored to a RIGHT-side changed `file:line`, keeps it inline in
`NEW_FINDINGS` with `confidence: discarded`, its claim prefixed with `[DISCARDED] `,
and `Why discarded:` stating the refuting `file:line` and verifier rationale. Proven
pre-existing same behavior on the candidate's exact input sequence is recorded in
`DISCARDED` with the compared old/new source reason and surfaced inline with
`confidence: discarded` (`[DISCARDED] ` plus `Why discarded:`). Any concrete candidate
that a worker proposed in `CANDIDATES` or `UNRESOLVED` and that the coordinator directly
disproves before verification is likewise recorded in `DISCARDED` and, when anchored to a
RIGHT-side changed `file:line`, kept inline in `NEW_FINDINGS` with `confidence: discarded`
(`[DISCARDED] ` plus the coordinator's `Why discarded:` reason). The same inline rule applies
to every candidate evaluated by `review-candidate-verifier`. A routine negative topic
check recorded only in a worker's own `DISCARDED` section, without being proposed in
`CANDIDATES` or `UNRESOLVED` or evaluated by the verifier, remains in the summary
`DISCARDED` section and must not be promoted into `NEW_FINDINGS`. As a deterministic safety net,
when a contradicted `DROP` names `contradictedLink: contract` but its cited contract is
head-side, keep the candidate in `NEW_FINDINGS` as an intent question with `confidence:
question` instead of discarding it. This is an intentional adaptation of the verifier
contract for skill output. External behavior that remains unestablished is
`UNRESOLVED`.

For a `KEEP` or an intent question, accept a verifier-corrected changed-line anchor or
faithful repro when the core claim and effect are fully proven; an inaccurate submitted
anchor or repro alone is not grounds to discard it. Before returning, check any
corrected anchor against the RIGHT side of the frozen diff and any corrected repro
against the verifier's cited frozen proof. A failed, missing, malformed, extra,
duplicate, or schema-invalid verifier result, or a correction that fails those checks,
makes the review `INCOMPLETE`. Never retry, substitute another agent, or complete the
verifier's work in the coordinator.

## Return result; never publish

The first line is always `STATUS: FINDINGS`, `STATUS: NO_FINDINGS`,
Expand All @@ -242,24 +315,36 @@ The first line is always `STATUS: FINDINGS`, `STATUS: NO_FINDINGS`,
`BASE_TIP_SHA`, `GUIDANCE_SOURCE` (immutable commit or explicitly dirty working tree),
`GUIDES` (each routed guide and its status, completed in-scope checks, exclusions,
and unresolved candidates), `UNCOVERED`, `PATH` (`per-guide` or `single-reviewer`),
`NEW_FINDINGS` (zero to five, ordered by severity and confidence),
`NEW_FINDINGS` (zero to five, ordered by confidence (`verified`, `question`,
`unresolved`, `discarded`) and then severity (`P1`, `P2`, `P3`) so unresolved or
discarded items never displace verified findings or questions),
`EXISTING_FEEDBACK_COVERAGE` (deduplicated true positives with the existing comment or
review reference), `UNRESOLVED` (candidate and exact missing evidence), `DISCARDED`
(claim and precise source reason), `TEST_BOUNDARY`, and `LIMITATIONS`. Each
`NEW_FINDINGS` entry contains only a one-line claim; `file:line`; severity (`P1` for
review reference), `UNRESOLVED` (every unresolved candidate and exact missing evidence,
including any surfaced inline), `DISCARDED`
(every discarded candidate or worker-discarded routine negative topic check and its
precise source reason, identifying any candidate surfaced inline), `TEST_BOUNDARY`, and `LIMITATIONS`. Each
`NEW_FINDINGS` entry contains a one-line claim (prefixed with `[UNRESOLVED] ` when
`confidence` is `unresolved` or `[DISCARDED] ` when `confidence` is `discarded`); `file:line`; severity (`P1` for
broken/incorrect common usage or data loss, `P2` for incorrect behavior in a realistic
narrower scenario, or `P3` for minor/edge or test/doc-only impact); a minimal repro using
app/user code, CLI commands, or workflow inputs that reaches the affected behavior;
what goes wrong in at most two lines; and a fix snippet when possible.
narrower scenario, or `P3` for minor/edge or test/doc-only impact); confidence
(`verified`, `question`, `unresolved`, or `discarded`); when `confidence` is `unresolved` or
`discarded`, a one-line `Why unresolved:` or `Why discarded:` summary citing the exact
missing evidence or refuting `file:line` and old/new comparison; a minimal repro using app/user code, CLI commands, or
workflow inputs that reaches the affected behavior; what goes wrong in at most two
lines; and a fix snippet when possible (or `none` when `discarded`). An unresolved or
discarded `NEW_FINDINGS` entry must come from a candidate proposed in a worker's
`CANDIDATES` or `UNRESOLVED`, or evaluated by `review-candidate-verifier`; never create
one solely from a routine check listed only in a worker's `DISCARDED`.

Return `BLOCKED` when a required bundle input is invalid, missing, unreadable,
mismatched, malformed, empty, or truncated. Return `INCOMPLETE` when a routed worker
fails or does not return, reports such a required-input failure, or ran with a confirmed
worker-configuration mismatch. External-contract and non-code metadata gaps stay
`UNRESOLVED`; they do not cause either status.
`NO_FINDINGS` is allowed only after every routed guide completes and no new candidate
survives independent validation, but it must still disclose deduplicated true positives
and unresolved candidates. Use `FINDINGS` when at least one new finding survives.
`NO_FINDINGS` is allowed only after every routed guide completes and `NEW_FINDINGS` is
empty, but it must still disclose deduplicated true positives
and all unresolved or discarded summary entries. Summary-only routine negative checks
in `DISCARDED` do not require `FINDINGS`. Use `FINDINGS` when at least one `NEW_FINDINGS` entry is present.
An excluded scope must remain visible, never be reported as completed. Neither
`INCOMPLETE` nor `BLOCKED` licenses partial publication; source-only confidence is not
runtime proof.
Loading
Loading