Evaluate findings

From tobihagemann/turbo · View interactive version

Evaluate findings is an AI agent skill from the GitHub repository tobihagemann/turbo. Assess review feedback with adversarial verification and decide which suggestions to apply. Use when the user asks to \"evaluate findings\", \"triage review feedback\", or \"filter false positives\".

How to use this skill

Skill file

Evaluate Findings

Assess external feedback (code reviews, AI suggestions, PR comments) with adversarial verification. Triage findings into actionable verdicts. Do not apply fixes.

Step 1: Assess Each Finding

If you already assessed a finding earlier in this session and recorded a verdict of Skip or Escalate — for example when an iterating loop re-runs review and the same finding resurfaces — do not re-adjudicate it from scratch. When a loop ledger path under .turbo/loops/ is in context, read it and treat the Skip and Escalate verdicts it records the same way, whichever session recorded them. When the re-reported finding matches one you already judged (same location and substance) and presents no new evidence beyond what your recorded reason already accounts for, keep that verdict and reason without re-reading the code, re-verifying, or routing it to the Devil's Advocate in Step 2. Assess fresh only when the finding raises materially new evidence, or when neither this session nor the ledger holds a verdict for it.

When several findings rest on a shared premise — for example a source-of-truth choice — verify that premise once before adjudicating them individually. Findings whose premise holds proceed through normal per-finding verification; when it fails, they are all Skip, citing the refuted premise.

When a plan governs the work, re-read the decisions it records before adjudicating. Having read it earlier in the session does not count: once it falls out of context, a recorded decision is indistinguishable from no decision at all.

The repo's backlog is .turbo/backlog.md at the repo root, or at the main checkout's root inside a linked worktree. A legacy .turbo/improvements.md beside it counts as backlog too. When the repo keeps a backlog, search it before adjudicating for the paths and symbols the findings name and for entries on the same subject, leaving out any entry the work in hand sets out to implement. Read every matching entry: run the search uncapped, splitting it into one search per finding when the combined output is too large to read, since output cut off or capped before its end settles nothing about the entries it left out. An entry that parks all or part of the change a finding asks for records a decision to defer it. When that finding holds and acting on it would make the change now, treat it as one that would reverse a decision the user made earlier, naming the entry as the original decision and quoting any condition it records for taking the change up. An entry that only shares the finding's area leaves the verdict to the finding's merits. In both cases, weigh what the entry records about that code when verifying the claim and assessing severity.

For each finding:

  1. Read the referenced code at the mentioned location — include the full function or logical block, not just the flagged line
  2. Check whether the code has diverged — if the finding references code that no longer exists or has since changed, skip it and note the divergence.
  3. Determine scope — clarify whether the issue was introduced by the PR/changeset or is pre-existing.
  1. Verify the claim against the actual code — does the issue genuinely exist?
  1. Assess severity:

| Severity | Meaning |

|----------|---------|

| Critical | Drop everything. Blocking release or operations. |

| High | Urgent. Should be addressed in the next cycle. |

| Medium | Normal. To be fixed eventually. |

| Low | Nice to have. Minor improvement. |

If the upstream reviewer already assigned a priority (P0-P3), map it: P0→Critical, P1→High, P2→Medium, P3→Low. Then re-assess based on what the actual code reveals. The upstream level is a starting point, not a binding constraint. When the re-assessed severity differs from the upstream level, note the change and the reason.

If the finding has no upstream priority, assess severity from scratch.

  1. Assign a verdict and confidence:

| Verdict | Criteria |

|---------|----------|

| Apply | The finding is real and in scope: clear bug, missing check, genuine improvement, style violation matching project conventions |

| Skip | False positive, subjective preference, reviewer is wrong, or the change's cost wildly dwarfs its benefit |

| Escalate | Needs the user's judgment: behavior might be intentional, involves product intent, requires domain knowledge the agent lacks, the finding is out of scope, or two findings present a genuine trade-off |

Also assign an internal confidence level — High, Medium, or Low — reflecting how certain you are about the verdict. Confidence is used solely to route findings to the Devil's Advocate in Step 2. It does not appear in the output.

Escalate guidance: When a finding questions whether behavior is intentional and neither docs, specs, nor code comments clarify the intent, assign Escalate. Do not autonomously accept or reject findings that hinge on product intent. If a counterpart implementation exists elsewhere, suggest checking it for consistency.

Conflict guidance: When two findings disagree about whether the code should change at all (one suggests a change to it, another the opposite change or none), treat the conflict as input, not a reason to skip. Verify each against the code and judge each on its merits as usual. If both are defensible and the choice is a genuine trade-off, assign Escalate to both, naming the opposing options so the user can decide.

An affirmation that something is correct is not a finding and carries no evidentiary weight; agreement among reviewers, or a reviewer's authority, does not settle whether a problem exists, nor whether a remedy the reviewers converged on works. When reviewers disagree on whether something is a problem at all — including one asserting it is fine while another flags it — treat the question as unresolved and verify it against the code, without letting the affirmation substitute for verification. When reviewers agree the code should change but propose opposing remedies, assign the verdict on the finding's own merits and name the opposing remedies in the Issue cell. Prefer a remedy whose measurement reports a result concrete enough to re-run over one resting on reading or on a reviewer's authority; a bare claim to have measured ranks no higher than reading. Where no remedy reports one, say so in that cell rather than choosing between them.

A reviewer's report that it could not verify something is a claim to check, not a fact to accept. Attempt the check independently, especially when the reported inability is what justifies skipping a verification step.

Verdict guidance:

Step 2: Devil's Advocate

After the initial assessment, challenge uncertain findings from a different angle.

Spawn when any finding has Medium or Low confidence. Send only those findings to the subagent. High-confidence findings pass through unchallenged. Skip this step entirely if all findings are High confidence.

Run bash ${CLAUDE_SKILL_DIR}/scripts/checkout-snapshot.sh capture before spawning and keep the five-value state it prints. It covers HEAD, the index, and every working-tree file outside gitignored paths and .turbo/. Its fifth value records the paths on disk it leaves out, which restore never deletes. It reports on stderr, as SKIPPED, each gitlink, embedded repository, tracked path now holding a directory, and path whose name contains a newline or carriage return, and these stay outside what it restores. When capture fails, it names the cause, such as an unmerged index: resolve that before spawning.

Launch a single subagent (model: "opus", no name). Wait for it to report before continuing; do not relaunch it if it has not yet reported. Provide the Medium/Low-confidence findings with their file locations, claims, and initial verdicts. Instruct the subagent to challenge each finding: try to prove it wrong, or confirm it with evidence.

Evidence standards: A refutation counts only when it rests on a defense, guarantee, or documented behavior the subagent located and read, or on behavior it observed by running the code; an expectation that a framework, caller, or type already handles the case returns Inconclusive and leaves the initial verdict standing. Confirmed applies to the claim the finding stands or falls on. Establishing the premise beneath that claim leaves it open: that code reads a value settles nothing about whether a test can control that value. When the subagent has established only the premise, it returns Inconclusive. Evidence that a test fails when its subject is changed settles only that the test pins the behavior; whether the pinned behavior is the required one stays open. Where the test was written alongside its implementation, their agreement is guaranteed by construction and carries no evidence about the requirement. A finding resting on that evidence is Confirmed only when the requirement itself has been checked against the code's production consumer, or against the governing plan; when neither is reachable, the subagent returns Inconclusive.

Protect the shared tree: The subagent's prompt must direct it to treat the shared working tree and its git index as read-only; an experiment that needs a scratch project runs in a temp directory outside the repo, or in an isolated git worktree created there and discarded afterward. HEAD stays where it is: read other refs with git show <ref>:<path> rather than git checkout or git switch. Refer to that directory or worktree by absolute path in every command and join chained steps with &&, so a failed step cannot leave the rest running in the shared checkout. Run teardown and verification as their own commands. Give that worktree its own dependency install rather than reaching the shared tree's install by any route: removing a worktree deletes through symlinks, and a redirected suite writes into the shared install. When its own install is not possible, the check is left unrun and reported as such. A check that runs in the shared checkout invokes an already-installed runner directly wherever a package-manager wrapper would front it, since such a wrapper reads as read-only while reconciling the shared install before it runs. Confine dependency installs and reconciliation to an isolated worktree. Every test runner the subagent starts, in a temp directory, a worktree, or the shared checkout, runs in its own process group under a timeout enforced from outside the runner. Before teardown, the subagent stops the process group of every runner it started, since stopping a runner can leave the processes it spawned alive. Afterward the subagent verifies that git worktree list no longer shows the worktree, that git status --short shows what it showed at the start, and that HEAD is still on the branch it started on. Its teardown deletes the temp directory, if any, and it confirms that path no longer exists, reporting the path of one it could not delete. It also confirms that no process from those groups, and none whose command line names the temp directory or worktree path, if any, is still running, and reports by PID any process it could not stop. When it cannot list processes, it reports that check as unrun and names those process groups and the temp directory or worktree path, if any. After any check, in a worktree or in the shared checkout, it verifies that the shared tree's dependency directory still resolves (a destroyed install leaves git status unchanged, since it is gitignored). Damage the subagent cannot repair is reported with the exact repair command in place of findings.

Verify the tree when the subagent returns, including when it terminates early or reports incomplete results: run checkout-snapshot.sh verify with the captured state, and confirm alongside it that the shared tree's dependency directory still resolves, which the snapshot cannot see. When verify exits 0, the subagent left the checkout as it found it. Otherwise run checkout-snapshot.sh restore with the captured state, then verify again. Before writing anything, restore prints the state it found as an UNDO line: keep it and any MOVED lines, since running restore with it undoes the restore apart from the MOVED branches.

Report the RESTORED and INDEX paths, the UNDO state, and each MOVED branch with the commit it held (none when restore created the branch). Also report each path printed as LEFT or SKIPPED, which stayed as the subagent left it, and each path printed as FAILED, whose write failed and whose prior content survives only in the UNDO state. Name any change you see in gitignored paths or .turbo/ as outside what the snapshot restores. Judge the result by verify alone: after a restore, git status can report modifications the bytes do not contain. When restore prints LOST or INVALID, or verify still fails, report what still differs from the captured state, including the LEFT and FAILED paths.

The subagent picks research tools based on claim type:

| Claim Type | Tool |

|------------|------|

| API deprecated/removed/changed | Documentation MCP tools or WebSearch |

| Method doesn't exist / wrong signature | Documentation MCP tools, WebSearch fallback |

| Code causes specific bug or behavior | Bash (isolated read-only test snippet) |

| Undocumented platform or dependency behavior | Its source; else an open-source counterpart, checked against the shipped binary where the two may differ |

| Best practice or ecosystem claim | WebSearch |

| Migration or changelog lookup | WebSearch → WebFetch |

Use whatever documentation tools are available. The specific tools vary by project setup.

Budget: max 2 research actions per finding. If the first action is conclusive, skip the second.

Subagent Verdicts

The subagent returns per finding:

Step 3: Reconciliation

Merge subagent results with the initial assessment:

Findings not investigated by the subagent keep their original verdict.

For Apply findings, document the issue and location. For Escalate findings, note what information would resolve the ambiguity. For Skip findings, document why.

Step 4: Format Output

Summarize the evaluated findings in a table:

| File | Issue | Source | Severity | Verdict |

|------|-------|--------|----------|---------|

When Step 2 ran (any finding was investigated by the Devil's Advocate subagent), add an Investigated column:

| File | Issue | Source | Severity | Verdict | Investigated |

|------|-------|--------|----------|---------|--------------|

Where Investigated shows:

For findings whose severity was re-assessed from the upstream level, append the change in the Severity cell (e.g., "High (was Medium)").

Carry each verdict into the Verdict column exactly as assessed, Escalate included.

For disputed findings, add a callout below the table showing both perspectives. For each finding, indicate scope in the Issue column (e.g., "Pre-existing:" prefix).

Then use the TaskList tool and proceed to any remaining task.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.