[STAGE-F] Self-Review
You are reviewing your own work before finalizing. This stage is pure reasoning — mechanical checks (schema validation, CVSS computation, report generation) are handled by Stage 1.
Input
INPUT: All output files from Stages A-E (findings.json, hypotheses.json, attack-paths.json, etc.)
Context
See SKILL.md for configuration, execution rules, and MUST-GATEs.
See PIPELINE.md for the full stage flow.
Prep (mechanical)
Compute CVSS scores and check verdict mapping:
libexec/raptor-validation-helper F "$OUTPUT_DIR"Review the flags above. Mismatches and anomalies inform your review.
Task
[F-2] Check Consistency
Preconditions backed by evidence. Every precondition in a ruling (e.g., "all handlers check checkfrom()") must cite specific evidence (line numbers, grep results). If asserted without evidence, verify it now.
Value-level traces. If multiple findings share the same syntactic pattern, does each have a value-level trace explaining why the concrete effect differs (or is the same)?
Causal claims. Every causal claim in
disproven.json,hypotheses.json, andfindings.jsonmust cite a concrete verification method (tool output, line number, test result, disassembly). Examples — PASS: "Disassembly shows password at RSP+0x10, canary at RSP+0x108." PASS: "grep confirms htmlEscape() called at line 47 before template render at line 52." FAIL: "Compiler likely reordered the stack layout" — no evidence cited.CVSS vector accuracy. Verify vector metrics match the finding's access model — AV = how the attacker reaches the code, not the machine. C/I/A reflect inherent impact, not binary mitigations. Flag any vectors that look wrong and correct them. F0 has computed preliminary scores — review them alongside the vectors. Stage 1 recomputes from final vectors.
SMT verdict vs ruling. If a finding's evidence array (in
hypotheses.jsonor the finding itself) contains ansmt:refuted: …entry from Stage B's [B-3.1.5] pre-flight, the ruling MUST NOT beexploitable— SMT proved the path conditions are mutually exclusive. Conversely,smt:witness: …evidence on a finding ruledfalse_positiveis a contradiction worth checking: Z3 returned a concrete trigger value, so either the ruling has a basis SMT couldn't see (cite it in the review notes) or the ruling is wrong. Mirrors GATE-7 (CONSISTENCY) for SMT-checked predicates specifically.
[F-2b] Runtime Evidence Cross-Check
If attack-paths.json contains runtime_evidence annotations from frida:
- A finding ruled
false_positiveorruled_outwhose attack path hasruntime_evidence_available: trueis a contradiction — frida observed the function running, so reachability-based dismissals are wrong. Re-examine the ruling. (This positive-reachability check is the ONLY refuting use of a frida receipt: annotations areevidence_role: "detection"in the shared evidence_grade vocabulary — they refute dead-code dismissals, never prove a path safe.) - A finding ruled
exploitablewith runtime evidence is strongly corroborated — note this inreview_notesas empirical support. Absence of runtime evidence is NOT the mirror check: an unobserved function proves nothing (observation-window bias), so never cite missingruntime_evidenceagainst anexploitableruling.
[F-3] Critical Review
Ask: What did I get wrong?
Re-read findings.json, hypotheses.json, and attack-paths.json. Look for:
- Misclassifications
- Missed bug instances (same pattern elsewhere in the codebase)
- Wrong-index bugs where the value at the wrong index wasn't traced
- Disproven claims still marked confirmed
- Confirmed claims with weak evidence
[F-4] Act on Findings
If the review finds issues:
- Write corrections to
$OUTPUT_DIR/stage-f.json(not findings.json directly) - Include a top-level
stage_f_reviewfield summarising what changed (e.g.,"stage_f_review": "Corrected FIND-0001 AV:N→AV:L (CLI binary). Fixed FIND-0003 CWE-120→CWE-190 (root cause is integer overflow).") - If nothing changed:
"stage_f_review": "No corrections needed."
Do not write validation-report.md — Stage 1 generates it mechanically from findings.json.
Carry-Forward
After review, write $OUTPUT_DIR/stage-f.json using the Write tool. The next stage's prep script (Stage 1) merges it into findings.json automatically.
The format for stage-f.json is:
{
"stage": "F",
"updates": {
"FIND-0001": {
"stage_f_summary": {
"corrections": ["AV:N->AV:L"],
"review_notes": "CLI binary, not network-accessible"
},
"cvss_vector": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
},
...
},
"stage_f_review": "Corrected FIND-0001 AV:N→AV:L (CLI binary)."
}Key insight: Claude writes ONLY its own stage's data. The prep script handles merging into findings.json.
Sharded runs: when Stage F runs as delegated parts (stage-f-parts/*.json), each part may carry its own top-level stage_f_review note alongside its updates. Assembly (raptor-validation-helper parts F <workdir>) joins the surviving parts' notes — in part-filename order, blank-line separated — into the assembled stage-f.json, the same top-level field an unsharded run writes.
Output
OUTPUT: stage-f.json. Stage 1 runs next for merging, CVSS scoring, schema validation, report generation, and displaying the findings summary.