[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ETTPQK5J5WQAKWVHT3E4TJ":3,"skill-same:01M7ETTPQK5J5WQAKWVHT3E4TJ":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":44,"updatedAt":45,"install":46,"resources":59},"01M7ETTPQK5J5WQAKWVHT3E4TJ","triage",null,"Triage a batch of raw security findings. Verify each is real, collapse duplicates, re-rank by derived exploitability, and tag with an owner. Takes a directory or file of scanner output and writes TRIAGE.json + TRIAGE.md sorted by what actually needs engineering attention. Use when asked to \"triage findings\", \"validate scanner output\", \"prioritize vulns\", or \"review the backlog\". Runs interactively by default; pass --auto to skip the interview.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Ftriage\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: triage\ndescription: Triage a batch of raw security findings. Verify each is real,\n  collapse duplicates, re-rank by derived exploitability, and tag with an\n  owner. Takes a directory or file of scanner output and writes TRIAGE.json\n  + TRIAGE.md sorted by what actually needs engineering attention. Use when\n  asked to \"triage findings\", \"validate scanner output\", \"prioritize vulns\",\n  or \"review the backlog\". Runs interactively by default; pass --auto to\n  skip the interview.\nargument-hint: \"\u003Cfindings-path> [--auto] [--votes N] [--repo PATH] [--fp-rules FILE] [--fresh]\"\nallowed-tools:\n  - Read\n  - Glob\n  - Grep\n  - Write\n  - Task\n  - AskUserQuestion\n  - Bash(git log:*)\n  - Bash(jq:*)\n  - Bash(find:*)\n  - Bash(ls:*)\n  - Bash(wc:*)\n  - Bash(python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py:*)\n---\n\n# triage\n\nAdversarial triage of raw security-scanner output. Does four jobs:\n**verify** each finding is real, **deduplicate** across runs and scanners,\n**rank** survivors by derived exploitability rather than the scanner's\nclaimed severity, and **route** each to a component owner. Output is a\nshort, ranked, owned list instead of a raw dump.\n\nInvoke with `\u002Ftriage \u003Cfindings-path> [--auto] [--votes N] [--repo PATH] [--fp-rules FILE]`.\n\n**Arguments** (parse from `$ARGUMENTS`; positional `$1`\u002F`$2` expansion is\nnot stable across runtimes):\n- findings path (first positional, required): a JSON file, a directory of\n  JSON files, a `VULN-FINDINGS.json`, an `INCIDENTS.json`, a pipeline\n  `results\u002F\u003Ctarget>\u002F\u003Cts>\u002F` directory, or a markdown report.\n- `--auto`: skip the interview and use defaults. Default mode is\n  **interactive**.\n- `--votes N`: verifier votes per finding (default 3; use 1 for a quick\n  pass, 5 for high-stakes batches).\n- `--repo PATH`: path to the target codebase, read-only (default cwd).\n  Verification needs source access; the skill stops with an error if the\n  cited files aren't reachable.\n- `--fp-rules FILE`: append the contents of FILE to the verifier's\n  exclusion-rule list (Phase 3a). Use for org-specific precedents: \"we use\n  Prisma ORM everywhere — raw-query SQLi only\", \"k8s resource limits cover\n  DoS\", etc. Plain text, one rule per line or paragraph.\n- `--fresh`: ignore any existing checkpoint in `.\u002F.triage-state\u002F` and start\n  from Phase 0. Without this flag the skill resumes from the last completed\n  phase if a checkpoint is present.\n\n**Tools:** Read, Glob, Grep, Write, Task, AskUserQuestion. Bash is\npermitted only for `git`, `find`, `wc`, `ls`, `jq`, and\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py` (checkpoint I\u002FO).\n\n**Do not execute target code.** No building, running, installing\ndependencies, or sending requests. A proof-of-concept that accidentally\nworks against something real is unacceptable, and \"couldn't write a working\nPoC\" is weak evidence of non-exploitability. Every conclusion comes from\nreading source. This applies to the orchestrator and every subagent;\ninclude the constraint in every Task prompt. For high-confidence HIGH\nfindings, recommend a human-built PoC as a follow-up instead.\n\n**Do not reach the network.** No package-registry lookups, CVE-database\nqueries, or upstream-commit fetches.\n\n---\n\n## Checkpointing (runs before Phase 0 and after every phase)\n\nOn large finding batches a full run can exhaust context or hit rate limits\nmid-way — particularly Phase 3, which spawns `candidates × votes` verifiers.\nPhase state persists to `.\u002F.triage-state\u002F` so a fresh `\u002Ftriage` session can\nresume without re-asking the interview or re-spawning verifiers.\n\nAll checkpoint I\u002FO goes through `python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py`\n(atomic writes, JSON-validated). Never use the Write tool for `progress.json`\ndirectly. Never pass payload via heredoc or stdin; target-derived strings\ncould collide with the heredoc delimiter and break out to shell. The\nWrite→`--from` pattern keeps repo-derived bytes out of Bash argv.\n\nState files in `.\u002F.triage-state\u002F`:\n- `progress.json` — **single source of truth** for resume position:\n  `{\"status\": \"running\"|\"complete\", \"phase_done\": N, \"shards_done\": [...]}`.\n  Resume decisions read ONLY this file, never a glob of `phase*.json` or\n  shard files (stale files from a prior run must not be trusted).\n- `phaseN.json` — data payload for phase N (schemas at the tail of each phase\n  section below).\n- `_chunk.tmp` — transient payload buffer; overwritten before every\n  `save`\u002F`shard`\u002F`append` call.\n\n**Start of run — resume check.** Bash:\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py load .\u002F.triage-state`\n\n- `status == \"absent\"` OR `\"complete\"`, OR `--fresh` in `$ARGUMENTS` →\n  **fresh start.** Bash:\n  `python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py reset .\u002F.triage-state`,\n  then proceed to Phase 0.\n- `status == \"running\"` with `phase_done == N` → **resume.** Read\n  `.\u002F.triage-state\u002Fphase0.json` through `phaseN.json` **in order** (and any\n  `shard_*.json` files listed in `shards_done`), merging keys into working\n  state (later files override earlier — checkpoints may be deltas). Print\n  `Resuming from checkpoint: Phase N complete (.\u002F.triage-state\u002FphaseN.json)`,\n  and **skip directly to Phase N+1**.\n\n**End of every phase N.** Two tool calls:\n1. Write tool → `.\u002F.triage-state\u002F_chunk.tmp` containing the phase's output\n   JSON (schema at the tail of each phase section).\n2. Bash → `python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py save .\u002F.triage-state \u003CN> \u003Cname> --from .\u002F.triage-state\u002F_chunk.tmp`\n\n**End of run.** After writing `TRIAGE.json` and `TRIAGE.md`, Bash:\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py done .\u002F.triage-state 6`\n\n---\n\n## Phase 0: Mode select and interview\n\n### 0a. Parse arguments\n\nFrom `$ARGUMENTS`: extract the findings path (first positional), `--auto`\nflag, `--votes N` (default 3), `--repo PATH` (default `.`), `--fp-rules\nFILE` (default none). If no findings path was given, ask for one and stop.\nIf `--fp-rules` was given, Read the file now and carry its contents as\n`context.extra_fp_rules` for injection into the Phase 3a verifier prompt.\n\n### 0b. Interactive mode (default): interview the user\n\nUnless `--auto` was passed, use **AskUserQuestion** to gather context that\nshapes verification and ranking. Batch into one or two calls of up to four\nquestions. Expect free-text answers via \"Other\"; the multiple-choice options\nare prompts, not constraints.\n\n**Round 1** (single AskUserQuestion call):\n\n1. **Environment & trust boundary** (header `Environment`, single-select)\n   `What kind of system are these findings from, and where does untrusted\n   input enter it?`\n   Options: `Internet-facing web service (HTTP is untrusted)`,\n   `Internal service (callers are authenticated peers)`,\n   `Library \u002F SDK (caller is the trust boundary)`,\n   `CLI \u002F batch tool (operator inputs trusted, file inputs not)`,\n   `Embedded \u002F firmware (physical access in scope)`.\n   Reachability is judged against this boundary; \"command injection from env\n   var\" is a true positive in a multi-tenant web service and a rule-8 false\n   positive in an operator CLI.\n\n2. **Threat model** (header `Threat model`, multi-select)\n   `What does a worst-case attacker look like for this system, and what\n   must never happen? Free text is best.`\n   Options: `Unauthenticated remote code execution`,\n   `Tenant-to-tenant data leakage`, `Privilege escalation to admin`,\n   `Supply-chain compromise of downstream users`,\n   `Denial of service against a paid SLA`,\n   `Compliance-scoped data exposure (PII \u002F PCI \u002F PHI)`.\n   Phase 4 boosts findings that map onto a stated threat.\n\n3. **Scoring standard** (header `Scoring`, single-select)\n   `How should severity be expressed in the output?`\n   Options: `Derived HIGH\u002FMEDIUM\u002FLOW from preconditions (default)`,\n   `CVSS v3.1 vector + base score`, `CVSS v4.0 vector + base score`,\n   `OWASP Risk Rating (likelihood x impact)`,\n   `Organization bug-bar (describe in Other)`.\n   The precondition rule is always computed; this controls what\n   `severity_label` additionally shows.\n\n4. **Noise tolerance** (header `Noise tolerance`, single-select)\n   `When verifiers disagree, which way should ties break?`\n   Options:\n   `Precision: drop anything not majority-confirmed (fewer FPs, may miss real bugs)`,\n   `Recall: keep split votes as needs_manual_test (more to review, fewer misses)`,\n   `Ask me per-finding when it happens`.\n\n**Round 2** (conditional): if the threat-model answer was empty or generic,\nor the scoring answer was `Organization bug-bar`, ask one targeted follow-up.\n\nRecord the answers as a `context` dict carried through every phase and\nechoed in the output under `triage_context`.\n\n### 0c. Auto mode defaults\n\nWhen `--auto` is set, do not call AskUserQuestion. Use:\n- Environment: `Unknown. Treat any externally-reachable entry point as\n  untrusted; flag trust-boundary assumptions explicitly in rationale.`\n- Threat model: empty (no boost).\n- Scoring: derived HIGH\u002FMEDIUM\u002FLOW.\n- Noise tolerance: precision.\n\n**Checkpoint:** Write tool → `.\u002F.triage-state\u002F_chunk.tmp`:\n\n```json\n{\"phase\": 0, \"context\": {mode, environment, threat_model, scoring, noise_tolerance, votes_per_finding, repo, findings_path}}\n```\n\nThen Bash:\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py save .\u002F.triage-state 0 interview --from .\u002F.triage-state\u002F_chunk.tmp`\nOn resume past Phase 0, the interview is **not** re-asked; `context` is\nrestored from this file.\n\n---\n\n## Phase 1: Ingest and normalize\n\nTurn the input into a flat `findings[]` list with stable ids, regardless of\nsource format.\n\n### 1a. Detect input shape\n\nInspect the findings path:\n\n- **Directory**: Glob for `**\u002F*.json` and `**\u002F*.jsonl`. Recognized\n  containers, in priority order:\n  - `VULN-FINDINGS.json` (a `{findings: [...]}` container): read\n    `.findings[]`.\n  - `INCIDENTS.json` (the `\u002Fdnr-hunt` \u002F `\u002Fdnr-respond` output): read\n    `.incidents[]`; each incident is one finding. Map the nested fields —\n    `vuln.file` → `file`, `vuln.line` → `line`, `vuln.type` → `category`,\n    `vuln.function` → `function`, `description` ← `vuln.mechanism` plus\n    `impact` — and keep `id`, `title`, `verdict`, and `poc`; the 1b\n    aliases route `poc` → `exploit_scenario`, and a `confirmed_exploited`\n    verdict means the incident arrived execution-verified, not statically\n    guessed — verifiers should weight that. The top-level `ruled_out`\n    array is not findings — don't ingest it. Incidents with no\n    `vuln.file` follow the 1b missing-`file` rule like any other finding.\n  - `reports\u002Fbug_*\u002Freport.json` or `reports\u002Fmanifest.jsonl` (this repo's\n    pipeline output): one finding per `bug_NN`. Map `crash.crash_type` →\n    `category`, `verdict.severity_rating` → `severity`, the prose `report` →\n    `description`, crash file from the ASAN top frame → `file`\u002F`line`.\n  - `found_bugs.jsonl`: one finding per line.\n  - Any other `*.json` whose top level is a list of objects, or an object\n    with a `findings`\u002F`results`\u002F`issues`\u002F`vulnerabilities` array: that\n    array.\n- **Single `.json` \u002F `.jsonl` file**: same recognition as above.\n- **Markdown \u002F text**: split on level-2\u002F3 headings or `---` rules; for each\n  section, extract `file`, `line`, `category`, `severity`, `description` by\n  pattern (`File:`, `Line:`, `Severity:` labels or `path:NN` spans).\n  Best-effort; mark `source_format: \"markdown_heuristic\"`.\n\nIf nothing parseable is found, stop and report what was seen.\n\n### 1b. Normalize fields\n\nFor each raw record, build a finding dict. **Pull what's present; never\nguess what's absent.** Field map (source-key aliases → canonical):\n\n| Canonical       | Also accept                                              |\n|-----------------|----------------------------------------------------------|\n| `file`          | `path`, `location.file`, `filename`, ASAN top-frame file |\n| `line`          | `line_number`, `location.line`, `lineno`                 |\n| `category`      | `type`, `cwe`, `rule_id`, `crash_type`, `vulnerability_class` |\n| `severity`      | `severity_rating`, `level`, `priority`, `risk`           |\n| `title`         | `name`, `summary`, `message`                             |\n| `description`   | `details`, `report`, `body`, `evidence`                  |\n| `exploit_scenario` | `attack_scenario`, `poc`, `reproduction`              |\n| `preconditions` | `requirements`, `assumptions`                            |\n| `recommendation`| `fix`, `remediation`, `mitigation`                       |\n| `scanner_confidence` | `confidence`, `score`, `certainty` (normalize to 0.0-1.0) |\n\nAttach to every finding:\n- `id`: `f001`, `f002`, ... in ingest order. If `scanner_confidence` is\n  present on most findings, order ingest by it descending so high-signal\n  findings get verified (and surface in partial output) first; otherwise\n  keep source order. This is a scheduling prior only — it does not affect\n  verdicts.\n- `source`: relative path of the file it came from, plus source format.\n- `missing_fields`: list of canonical fields that were absent. If `file` is\n  missing or does not resolve under `--repo`, the finding is\n  **unlocatable**: it skips dedup and verification and is emitted directly\n  with `verdict: false_positive`, `verify_verdict: needs_manual_test`,\n  `confidence: 0`, `refute_reasons: [\"doesnt_exist\"]`, `rationale: \"no\n  source location in input; cannot verify statically; human review\n  required\"`. Never emit a confident verdict on a finding you could not\n  locate, and never let it absorb or be absorbed by dedup.\n\n### 1c. Locate the target codebase\n\nResolve `--repo` (default cwd). For the first 5 findings with a `file`,\ncheck the path resolves under the repo. Try, in order: (a) `repo\u002Ffile`\nas-given; (b) `file` as an absolute or cwd-relative path; (c) `repo\u002Ffile`\nwith common prefixes stripped from `file` (`src\u002F`, `app\u002F`, `.\u002F`, or the\nrepo's own basename, e.g. `harness\u002Fgrade.py` with `--repo harness`).\nRecord which resolution worked and apply it to every finding. If none\nresolve, **stop**: tell the user verification needs source access and the\ncited files aren't reachable, and suggest a `--repo` value based on the\nlongest common suffix you can see.\n\n**Checkpoint:** Write tool → `.\u002F.triage-state\u002F_chunk.tmp`:\n\n```json\n{\"phase\": 1, \"context\": {...}, \"findings\": [ {normalized finding dicts with id\u002Fsource\u002Ffile\u002Fline\u002Fcategory\u002F...} ], \"path_resolution\": \"\u003Cwhich of a\u002Fb\u002Fc worked>\"}\n```\n\nThen Bash:\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py save .\u002F.triage-state 1 ingest --from .\u002F.triage-state\u002F_chunk.tmp`\n\n---\n\n## Phase 2: Deduplicate (before verification)\n\nCollapse repeats so duplicate findings don't each burn N verifiers.\n\n### 2a. Deterministic pass (inline, no subagent)\n\nCluster findings where all of:\n- same `file` (after path normalization), AND\n- same `category` (case-insensitive, punctuation stripped), AND\n- `line` numbers within 10 of each other. Both-missing matches; one-side-\n  missing does NOT (a line-less record must not absorb a located one).\n\nWithin each cluster, the canonical is the record with the fewest\n`missing_fields`; ties break to lowest `id`. Every other member gets\n`verdict: duplicate`, `duplicate_of: \u003Ccanonical id>`, and is removed from\nthe working set. Record duplicate ids on the canonical as `absorbed: [...]`.\n\n### 2b. Semantic pass (one subagent, only if >1 cluster survives)\n\nSpawn ONE Task with `subagent_type: \"general-purpose\"` and this prompt:\n\n```\nYou are deduplicating security findings before expensive verification. Two\nfindings are DUPLICATES if fixing one would also fix the other. Two findings\nare DISTINCT if they have genuinely independent root causes, even if they\nshare a category or file.\n\nTreat as DUPLICATE:\n- Same root cause described with different wording or by different scanners\n- A shared vulnerable helper function reported once per call site\n- A missing global protection (auth check, output encoding) reported once\n  per endpoint that lacks it\n- A cause (\"missing input validation on `name`\") and its consequence\n  (\"SQL injection via `name`\") in the same code path\n\nTreat as DISTINCT:\n- Different categories in the same file region (an \"ssrf\" near a\n  \"buffer_overflow\" is not a duplicate just because the lines are close)\n- Same file, same category, but different tainted variables reaching\n  different sinks\n- Same helper, but two independent bugs inside it\n- Two endpoints missing the same check, where the fix is per-endpoint\n  rather than a shared gate\n\nBelow are the candidate findings (one per line: id | file:line | category |\ntitle). Group them. Respond with ONLY lines of the form:\n\n  GROUP: \u003Ccanonical_id> \u003C- \u003Cdup_id>, \u003Cdup_id>, ...\n\nOne line per group that has duplicates. Omit singletons. Pick the most\nspecific \u002F best-described finding as canonical. No prose.\n\nCANDIDATES:\n{one line per surviving finding: \"f003 | src\u002Fauth.py:112 | sql_injection | User lookup concatenates name into query\"}\n```\n\nParse `GROUP:` lines. For each, mark the listed dup ids with\n`verdict: duplicate`, `duplicate_of: \u003Ccanonical>`, append them to the\ncanonical's `absorbed`, and drop them from the working set.\n\nCarry forward `candidates[]` = the surviving canonicals.\n\n**Checkpoint:** Write tool → `.\u002F.triage-state\u002F_chunk.tmp`:\n\n```json\n{\"phase\": 2, \"context\": {...}, \"findings\": [ {all findings; duplicates carry verdict\u002Fduplicate_of} ], \"candidates\": [\"f001\", \"f003\", \"...\"]}\n```\n\nThen Bash:\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py save .\u002F.triage-state 2 dedup --from .\u002F.triage-state\u002F_chunk.tmp`\n\n---\n\n## Phase 3: Verify\n\nFor each candidate, N independent adversarial verifiers re-derive the claim\nfrom the code and vote. Each verifier's stance is \"find any reason this is\nwrong.\" Each starts from the code at the cited location, not the scanner's\ndescription, and never sees the other verifiers' reasoning (shared context\npropagates blind spots).\n\n### 3a. Verifier prompt (assemble once, reuse for every spawn)\n\n```\nYou are a skeptical security engineer adversarially verifying ONE finding\nfrom an automated scanner. Your default assumption is that the scanner is\nWRONG. Your job is to re-derive the claim from the source code yourself and\ndecide TRUE_POSITIVE or FALSE_POSITIVE.\n\nYou have read-only access to the target codebase at: {REPO_PATH}\nYou may use Read, Glob, and Grep, but ONLY on paths inside {REPO_PATH}.\nDo NOT read, grep, or glob outside that root: anything outside it (the\ntriage pipeline itself, scanner outputs, fixtures, other repos on disk) is\nout of scope and citing it contaminates your verdict. If a finding's\n`file` resolves outside {REPO_PATH}, return CANNOT_VERIFY with\nREFUTE_REASON: doesnt_exist. You may NOT build, run, or test the target,\ninstall dependencies, or reach the network. Every conclusion must come\nfrom reading source under {REPO_PATH}.\n\nENVIRONMENT (from the operator; this defines the trust boundary):\n{context.environment or \"Unknown. Treat any externally-reachable entry point as untrusted.\"}\n\n────────────────────────────────────────────────────────────────────────\nPROCEDURE: follow all four steps. Each exists because skipping it lets a\nspecific false-positive class through.\n\n1. READ THE CODE AT THE CITED LOCATION YOURSELF.\n   Open {file} at line {line}. Understand what the code actually does. Do\n   NOT trust the scanner's description: scanners misread code surprisingly\n   often, and if you start from the summary you inherit the misreading.\n\n2. TRACE REACHABILITY BACKWARDS FROM THE SINK.\n   Grep for callers of this function\u002Fmethod. Follow imports. Establish\n   whether attacker-controlled input (per the ENVIRONMENT above) can\n   actually reach this line. A plausible-sounding chain is NOT enough: for\n   at least the FIRST link in the chain, READ the actual call site and\n   QUOTE the file:line in your rationale. Unreachable code is the single\n   largest false-positive source.\n\n3. HUNT FOR PROTECTIONS.\n   Actively look for reasons the finding is WRONG:\n   - Input validation \u002F sanitization upstream of the sink\n   - Framework auto-escaping, parameterized queries, prepared statements\n   - Type constraints (the value is an int, an enum, a fixed-length token)\n   - Authentication \u002F authorization gates before this path\n   - Configuration that limits exposure (feature flag off, debug-only)\n   - Dead code, test-only code, example\u002Ffixture code\n\n4. STRESS-TEST EACH PROTECTION.\n   For each protection you found: is it applied on EVERY path to the sink,\n   or only the one the scanner happened to trace? Are there encodings,\n   edge cases, or alternate entry points that bypass it?\n\n────────────────────────────────────────────────────────────────────────\nEXCLUSION RULES: if the finding matches any of these, it is FALSE_POSITIVE\neven if technically accurate. Cite the rule number in your verdict.\n\n  1. Volumetric DoS or missing rate-limiting (handled at infrastructure\n     layer). ReDoS, algorithmic complexity, and unbounded recursion ARE\n     still valid findings.\n  2. Test-only code, dead code, example\u002Ffixture code, or a crash with no\n     security impact.\n  3. Behavior that is the intended design (compression middleware, a\n     backward-compatible weak algorithm offered alongside a strong one).\n  4. Memory-safety concerns in memory-safe languages outside `unsafe` \u002F\n     FFI blocks.\n  5. SSRF where the attacker controls only the path, not the host or\n     protocol.\n  6. User input flowing into an AI\u002FLLM prompt (prompt injection is not a\n     code vulnerability in the target).\n  7. Path traversal in object storage (S3\u002FGCS) where `..\u002F` does not escape\n     a trust boundary.\n  8. Trusted inputs used as the attack vector (env vars, CLI flags set by\n     the operator), UNLESS the ENVIRONMENT above marks them untrusted.\n  9. Client-side code flagged for server-side vulnerability classes.\n 10. Outdated dependency versions (managed by a separate process).\n 11. Weak random used for non-security purposes (jitter, shuffling,\n     dev-only fallbacks).\n 12. Low-impact nuisance issues (log spoofing, CSRF on logout, self-XSS,\n     tabnabbing, open redirect, regex injection).\n 13. Missing hardening or best-practice gap with no concrete exploit path\n     (missing security headers, no audit logging, permissive config that\n     isn't actually reached by untrusted input).\n 14. XSS in a framework with default auto-escaping (React, Angular, Vue,\n     Jinja2 autoescape=on) UNLESS the sink is a raw-HTML escape hatch\n     (dangerouslySetInnerHTML, bypassSecurityTrustHtml, v-html, |safe).\n 15. Identifiers that are unguessable by construction (UUIDv4, 128-bit+\n     random tokens) flagged as \"predictable\" or \"needs validation\".\n 16. Race conditions or TOCTOU that are theoretical only — no realistic\n     window, or no security-relevant state changes between check and use.\n\n{if context.extra_fp_rules: append here verbatim under an\n \"ORG-SPECIFIC RULES:\" heading}\n\n────────────────────────────────────────────────────────────────────────\nVERDICT: your response MUST end with EXACTLY this block:\n\n  VERDICT: TRUE_POSITIVE | FALSE_POSITIVE | CANNOT_VERIFY\n  CONFIDENCE: \u003C0-10>\n  REFUTE_REASON: \u003Cone of: doesnt_exist, already_handled,\n    implausible_trigger, intentional_behavior, misread_code, duplicate,\n    not_actionable, n\u002Fa>\n  EXCLUSION_RULE: \u003C1-16, org rule, or none>\n  FIRST_LINK: \u003Cfile:line of the first call site you read, or \"none found\">\n  RATIONALE: \u003C2-5 sentences citing specific file:line evidence for\n    reachability, protections found\u002Fabsent, and why each held or didn't>\n\nTRUE_POSITIVE requires ALL of: path is reachable from untrusted input per\nthe ENVIRONMENT; protections are insufficient or bypassable; real-world\nexploitation is feasible.\n\nFALSE_POSITIVE requires ANY of: unreachable from untrusted input;\nadequately protected on all paths; scanner misread the code; an exclusion\nrule applies.\n\nCANNOT_VERIFY: static reasoning genuinely hit its limit (e.g. behavior\ndepends on runtime configuration you cannot read, or the code path crosses\ninto a binary you cannot inspect). Use sparingly; it must not become the\ndefault.\n```\n\n### 3b. Spawn N verifiers per candidate, all in one message\n\nFor each finding in `candidates[]`, build N Task calls (N = `--votes`,\ndefault 3) with `subagent_type: \"general-purpose\"` and `description:\n\"verify {id} vote {k}\u002F{N}\"`.\n\n**Always set `subagent_type`; never fork.** Omitting `subagent_type` forks\nthe orchestrator, and a fork inherits the full conversation context: every\nother finding's description, the scanner's prose, and any prior verifier\nresults. That defeats verifier independence and re-introduces the\ninherited-framing failure mode this phase exists to prevent. Each verifier\nmust start with a fresh, empty context and receive only the 3a prompt\nplus the single finding under review. The same applies to the ranking\nsubagents in 4a.\n\nEach prompt is the verifier prompt from 3a with this block appended:\n\n```\n────────────────────────────────────────────────────────────────────────\nFINDING UNDER REVIEW (from the scanner; treat as a CLAIM, not a fact):\n\n  id:        {id}\n  file:      {file}\n  line:      {line}\n  category:  {category}\n  severity (claimed): {severity}\n  title:     {title}\n\n  description:\n  {description}\n\n  exploit_scenario:\n  {exploit_scenario or \"(not provided)\"}\n\n  preconditions (claimed):\n  {preconditions as bullets or \"(not provided)\"}\n\nYou are vote {k} of {N}. You have NOT seen the other verifiers' reasoning\nand you must NOT try to find it. Work independently from the code.\n```\n\n**Put all verifier Task calls in a single assistant message** so they run\nconcurrently. Do not set `run_in_background`; you need the final text, not\nan async handle. If `len(candidates) * N` exceeds ~40, shard into\nsequential batches of ~40, but keep each batch a single message.\n\n**Prompt size at scale.** The 3a prompt is ~1200 words. When\n`candidates * votes > ~50`, use this compact form instead (same procedure\nand output contract, prose stripped):\n\n```\nAdversarially verify ONE scanner finding. Default: scanner is WRONG.\nRead-only access scoped to {REPO_PATH} ONLY. No exec, no network.\nENVIRONMENT: {context.environment}\n\nSteps: (1) Read {file}:{line} yourself; don't trust the description.\n(2) Trace callers backwards; quote the first call-site file:line.\n(3) Hunt for protections: validation, escaping, type bounds, auth gates,\ndead\u002Ftest code. (4) Stress-test each protection on every path.\n\nExclusion rules (FALSE_POSITIVE if matched): 1 volumetric DoS;\n2 test\u002Fdead\u002Ffixture code; 3 intended design; 4 memory-safety in safe\nlang outside unsafe\u002FFFI; 5 SSRF path-only; 6 LLM prompt input;\n7 object-storage traversal; 8 trusted operator env\u002FCLI inputs;\n9 client code, server vuln class; 10 outdated deps; 11 weak random\nnon-security; 12 low-impact nuisance (log spoof, open redirect, regex\ninject); 13 missing-hardening-only, no concrete exploit; 14 XSS in\nauto-escape framework w\u002Fo raw-HTML escape hatch; 15 unguessable\nUUID\u002Ftoken flagged predictable; 16 theoretical-only race\u002FTOCTOU.\n{+ org rules from --fp-rules if any}\n\nEnd with EXACTLY:\n  VERDICT: TRUE_POSITIVE | FALSE_POSITIVE | CANNOT_VERIFY\n  CONFIDENCE: \u003C0-10>\n  REFUTE_REASON: \u003Cdoesnt_exist|already_handled|implausible_trigger|\n    intentional_behavior|misread_code|duplicate|not_actionable|n\u002Fa>\n  EXCLUSION_RULE: \u003C1-16, org rule, or none>\n  FIRST_LINK: \u003Cfile:line or \"none found\">\n  RATIONALE: \u003C2-5 sentences, file:line cited>\n\nFINDING: {id} {file}:{line} {category} (claimed {severity})\n{title}\n{description}\nVote {k}\u002F{N}. Independent; do not seek other votes.\n```\n\nFindings with a `file` but no `line` get **one** verifier vote regardless\nof `--votes` (a file-level sweep is expensive and doesn't benefit from\nvoting).\n\n**If any Task call returns `status: \"async_launched\"` instead of the\nverifier's text**, the runtime backgrounded it (some runtimes do this\nautomatically for large parallel batches). Pick one recovery and use it for\nthe whole batch:\n  - If completion notifications arrive in your conversation: parse each\n    verifier's VERDICT block from its notification `result` as it lands.\n    Do not end your turn until every vote is accounted for.\n  - If notifications do not arrive: do not poll transcript files. Re-spawn\n    the missing verifiers in a fresh Task batch (smaller shard size, e.g.\n    10) and use the synchronous results.\nThe same recovery applies to the dedupe subagent in 2b and the ranking\nsubagents in 4a.\n\n### 3c. Tally votes\n\nFor each candidate, parse the trailing block from each of its N verifiers\n(tolerate code fences and whitespace). If a verifier errored, timed out,\nor produced no parseable VERDICT block, re-spawn it once. If the retry\nalso fails, count that vote as `cannot_verify` with `confidence: 0` and\nnote `\"verifier_error\"` in `refute_reasons`. The remaining N-1 votes still\ndecide.\n\nBuild:\n\n- `vote_breakdown`: `{\"true_positive\": x, \"false_positive\": y,\n  \"cannot_verify\": z}`\n- `confidence`: mean CONFIDENCE across votes that agree with the majority,\n  rounded to one decimal.\n- `exclusion_rule`: the modal EXCLUSION_RULE among FALSE_POSITIVE votes,\n  else `null`.\n- `refute_reasons`: sorted unique REFUTE_REASON values from FALSE_POSITIVE\n  votes.\n- `first_links`: unique FIRST_LINK values across all votes (reachability\n  audit trail).\n- `rationale`: the RATIONALE from the highest-confidence vote on the\n  winning side, verbatim.\n\n**Decide `verdict`:**\n- Majority TRUE_POSITIVE → `verdict: true_positive`. Proceeds to Phase 4.\n- Majority FALSE_POSITIVE → `verdict: false_positive`. Skips Phase 4.\n- No majority (tie, or majority CANNOT_VERIFY):\n  - Noise tolerance `precision` → `verdict: false_positive`; append\n    `\"(split vote, dropped under precision policy)\"` to rationale.\n  - Noise tolerance `recall` → `verdict: true_positive` with\n    `verify_verdict: needs_manual_test`. Proceeds to Phase 4.\n  - Noise tolerance `ask` → collect all split findings and present them in\n    one AskUserQuestion call at the end of Phase 3 (header: id + title,\n    options: keep \u002F drop), then apply the user's choices.\n\nBuild `confirmed[]` = candidates with `verdict == true_positive`.\n\n**Checkpoint:** Write tool → `.\u002F.triage-state\u002F_chunk.tmp`:\n\n```json\n{\"phase\": 3, \"context\": {...}, \"findings\": [ {all findings with verdict\u002Fvote_breakdown\u002Fconfidence\u002Frefute_reasons\u002Ffirst_links\u002Frationale\u002Fexclusion_rule} ], \"confirmed\": [\"f001\", \"...\"]}\n```\n\nThen Bash:\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py save .\u002F.triage-state 3 verify --from .\u002F.triage-state\u002F_chunk.tmp`\n\nThis is the most expensive checkpoint. When `len(candidates) * votes` exceeds\n~40 and verifier spawns are sharded into sequential batches, additionally\ncheckpoint **per candidate** as its votes are tallied:\n\n1. Write tool → `.\u002F.triage-state\u002F_chunk.tmp` = that finding's post-tally dict.\n2. Bash:\n   `python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py shard .\u002F.triage-state \u003Cid> --from .\u002F.triage-state\u002F_chunk.tmp`\n\nOn resume at `phase_done == 2`, the Phase-3 entry point reads\n`progress.json:shards_done` (default `[]` — do **not** glob shard files on\ndisk; stale shards from a prior run may exist), loads the corresponding\n`shard_{id}.json` files, and spawns verifiers only for `candidates[]` ids\nfrom `phase2.json` that are NOT in `shards_done`. Once every candidate is in\n`shards_done`, write the consolidated `phase3.json` checkpoint as above.\n\n---\n\n## Phase 4: Rank by exploitability (confirmed findings only)\n\nRecompute severity from preconditions and reachability rather than category\nname, and judge the scanner's claimed severity separately. Verification and\nseverity are independent judgments; \"this is real\" must not inflate into\n\"this is critical.\"\n\n### 4a. Ranking prompt\n\nSpawn one Task per confirmed finding (`subagent_type: \"general-purpose\"`,\nall in one message) with:\n\n```\nYou are assigning severity to a CONFIRMED security finding. Verification\nalready happened; assume the finding is real. Your only job is to derive\nhow bad it is, independently of what the scanner claimed.\n\nYou may Read\u002FGrep the codebase at {REPO_PATH} to check preconditions. Do\nNOT execute code.\n\nENVIRONMENT: {context.environment}\nTHREAT MODEL (operator-stated, may be empty):\n{context.threat_model as bullets, or \"(none provided)\"}\nSCORING STANDARD: {context.scoring}\n\nFINDING:\n  id:        {id}\n  file:      {file}:{line}\n  category:  {category}\n  claimed severity: {severity}\n  reachability evidence: {first_links from Phase 3}\n  verifier rationale: {rationale from Phase 3}\n\n────────────────────────────────────────────────────────────────────────\nSTEP 1: Enumerate EVERY precondition that must hold for exploitation.\nBe concrete: required auth state, configuration, prior request, race\nwindow, attacker position. Then state the minimum ACCESS LEVEL required\n(unauthenticated remote \u002F authenticated \u002F local \u002F physical).\n\nSTEP 2: Derive severity from the precondition count and access level:\n\n  | Preconditions | Access required          | Severity |\n  |---------------|--------------------------|----------|\n  | 0             | Unauthenticated remote   | HIGH     |\n  | 1-2           | Authenticated            | MEDIUM   |\n  | 3+            | Local-only \u002F no demo path| LOW      |\n\n  Evaluate each column independently and take the LOWER result. Example:\n  0 preconditions but authenticated-only is MEDIUM, not HIGH; 1\n  precondition but local-only is LOW. Cross-check: if your preconditions\n  list has 3+ items, HIGH is almost certainly wrong.\n\nSTEP 3: Threat-model match. If the THREAT MODEL is non-empty and this\nfinding maps onto one of its entries, note which one. A match may raise\nseverity by ONE step (LOW to MEDIUM or MEDIUM to HIGH), never two. If the\nthreat model is empty, skip this step.\n\nSTEP 4: Judge the scanner's claimed severity. From the perspective of an\nengineer who has reviewed two hundred scanner findings this week and is\nallergic to inflation: would the CLAIMED severity contribute to alert\nfatigue? Is it comparable to a real CVE at that level? Is the code in test\nfixtures or dev-only config? Score in -5..+5:\n  +3..+5  claimed severity is justified or understated\n   0..+2  roughly right\n  -1..-3  inflated by one level\n  -4..-5  badly inflated (LOW dressed as HIGH)\n\nSTEP 5: verify_verdict. Exactly one of:\n  exploitable        preconditions are realistically satisfiable\n  mitigated          real, but a deployed control reduces it below the\n                     derived severity (name the control)\n  needs_manual_test  severity hinges on something only a runtime test can\n                     settle; recommend a human build a PoC\n\nSTEP 6: If SCORING STANDARD is a CVSS or OWASP variant, emit a\n`severity_label` in that format (vector string + base score for CVSS;\nlikelihood x impact for OWASP). Otherwise set it equal to the derived\nHIGH\u002FMEDIUM\u002FLOW.\n\n────────────────────────────────────────────────────────────────────────\nRespond with ONLY this block:\n\n  PRECONDITIONS:\n  - \u003Cone per line>\n  ACCESS_LEVEL: \u003Cunauthenticated_remote|authenticated|local|physical>\n  SEVERITY: \u003CHIGH|MEDIUM|LOW>\n  SEVERITY_LABEL: \u003Cper scoring standard>\n  THREAT_MATCH: \u003Cmatched threat-model entry, or none>\n  SEVERITY_ALIGNMENT: \u003C-5..+5>\n  VERIFY_VERDICT: \u003Cexploitable|mitigated|needs_manual_test>\n  RANK_RATIONALE: \u003C2-4 sentences>\n```\n\n### 4b. Merge\n\nFor each confirmed finding, parse the block and attach `preconditions`\n(replacing any scanner-supplied list), `access_level`, `severity`\n(recomputed), `severity_label`, `threat_match`, `severity_alignment`,\n`verify_verdict`, and append RANK_RATIONALE to `rationale` (separated by a\nblank line from the Phase-3 rationale).\n\nFor findings that did NOT reach Phase 4 (`false_positive`, `duplicate`,\nunlocatable): set `severity: null`, `verify_verdict: null`,\n`severity_alignment: null`, `preconditions: []`.\n\n**Checkpoint:** Write tool → `.\u002F.triage-state\u002F_chunk.tmp`:\n\n```json\n{\"phase\": 4, \"context\": {...}, \"findings\": [ {all findings with severity\u002Fseverity_label\u002Fpreconditions\u002Faccess_level\u002Fthreat_match\u002Fseverity_alignment\u002Fverify_verdict} ]}\n```\n\nThen Bash:\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py save .\u002F.triage-state 4 rank --from .\u002F.triage-state\u002F_chunk.tmp`\n\n---\n\n## Phase 5: Route\n\nTag each confirmed true-positive with the most specific component or owner\ninferable. For each finding in `confirmed[]`, stop at the first hit:\n\n1. **CODEOWNERS \u002F OWNERS.** Grep `--repo` for `CODEOWNERS`, `OWNERS`,\n   `.github\u002FCODEOWNERS`, `docs\u002FCODEOWNERS`. If found, match the finding's\n   `file` against its patterns (last match wins). Hint:\n   `\"CODEOWNERS: \u003Cpattern> -> \u003Cowner(s)>\"`.\n2. **git log.** If `--repo` is a git checkout, run\n   `git -C {REPO} log --format='%an' -n 50 -- \"{file}\" | sort | uniq -c | sort -rn | head -3`.\n   Hint: `\"top committer: \u003Cname> (\u003Cn>\u002F\u003Ctotal> recent commits); no\n   CODEOWNERS entry\"`.\n3. **Module fallback.** Hint: `\"component: \u003Ctop-level dir of file>\u002F; no\n   CODEOWNERS or git history\"`.\n\nAttach as `owner_hint`. State the source so confidence is clear; a bare\nusername is less useful than `\"component: auth\u002F; no CODEOWNERS entry; top\ncommitter jsmith (14\u002F20 recent commits)\"`. For non-true-positive findings,\nset `owner_hint: null`.\n\n**Checkpoint:** Write tool → `.\u002F.triage-state\u002F_chunk.tmp`:\n\n```json\n{\"phase\": 5, \"context\": {...}, \"findings\": [ {all findings with owner_hint} ]}\n```\n\nThen Bash:\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py save .\u002F.triage-state 5 route --from .\u002F.triage-state\u002F_chunk.tmp`\n\n---\n\n## Phase 6: Output\n\n### 6a. Sort\n\nOrder all findings by:\n1. `verdict`: `true_positive`, then `duplicate`, then `false_positive`.\n2. Within true positives: `severity` HIGH > MEDIUM > LOW, then `confidence`\n   descending, then `severity_alignment` descending.\n3. Within others: original `id`.\n\n### 6b. Write `.\u002FTRIAGE.json`\n\n```json\n{\n  \"triage_completed\": true,\n  \"triage_context\": {\n    \"mode\": \"interactive|auto\",\n    \"environment\": \"...\",\n    \"threat_model\": [\"...\"],\n    \"scoring\": \"...\",\n    \"noise_tolerance\": \"...\",\n    \"votes_per_finding\": 3,\n    \"repo\": \"...\"\n  },\n  \"summary\": {\n    \"input_count\": 0,\n    \"duplicates\": 0,\n    \"false_positives\": 0,\n    \"true_positives\": 0,\n    \"needs_manual_test\": 0,\n    \"by_severity\": {\"HIGH\": 0, \"MEDIUM\": 0, \"LOW\": 0}\n  },\n  \"findings\": [\n    {\n      \"id\": \"f001\",\n      \"source\": \"VULN-FINDINGS.json#0\",\n      \"title\": \"...\",\n      \"file\": \"...\",\n      \"line\": 0,\n      \"category\": \"...\",\n      \"claimed_severity\": \"HIGH\",\n      \"verdict\": \"true_positive|false_positive|duplicate\",\n      \"verify_verdict\": \"exploitable|mitigated|needs_manual_test|null\",\n      \"confidence\": 0.0,\n      \"severity\": \"HIGH|MEDIUM|LOW|null\",\n      \"severity_label\": \"...\",\n      \"severity_alignment\": 0,\n      \"preconditions\": [\"...\"],\n      \"access_level\": \"...\",\n      \"threat_match\": \"...|null\",\n      \"rationale\": \"file:line-cited prose: reachability, protections, why each held or didn't; then ranking rationale\",\n      \"vote_breakdown\": {\"true_positive\": 0, \"false_positive\": 0, \"cannot_verify\": 0},\n      \"refute_reasons\": [\"...\"],\n      \"exclusion_rule\": null,\n      \"first_links\": [\"file:line\", \"...\"],\n      \"duplicate_of\": null,\n      \"absorbed\": [\"...\"],\n      \"owner_hint\": \"...\",\n      \"missing_fields\": [\"...\"]\n    }\n  ]\n}\n```\n\nEvery input finding appears exactly once (duplicates reference their\ncanonical via `duplicate_of`). Do not silently drop anything. Do not print\nthis JSON to the terminal; write to file only.\n\n### 6c. Write `.\u002FTRIAGE.md`\n\nReviewer-facing report. Build it **incrementally**. Do NOT emit the whole\nfile in one Write. One chunk per finding; a stalled chunk loses that one\nsection, not the file.\n\n**Step 1 — header.** Write tool → `.\u002FTRIAGE.md` (clobbers any prior file)\ncontaining only the title block, summary, and `## Act on these` heading:\n\n```\n# Triage Report\n\n{summary line: N in -> D duplicates, F false positives, T confirmed (H high \u002F M med \u002F L low), X need manual test}\n\nContext: {mode}; environment = {environment}; scoring = {scoring}; {votes}-vote verification.\n\n## Act on these\n```\n\n**Step 2 — per finding.** For each true_positive in severity order:\n1. Write tool → `.\u002F.triage-state\u002F_chunk.tmp` containing ONE finding's section:\n\n```\n### [{severity}] {title}  ({id})\n`{file}:{line}` | {category} | claimed {claimed_severity} (alignment {severity_alignment:+d}) | confidence {confidence}\u002F10\n**Owner:** {owner_hint}\n**Verdict:** {verify_verdict}, votes {vote_breakdown}\n**Preconditions ({n}):** {bulleted}\n**Threat-model match:** {threat_match or \"none\"}\n**Why:** {rationale}\n**Reachability evidence:** {first_links}\n{if verify_verdict == needs_manual_test:}\n> Recommend a human build a PoC; static reasoning hit its limit.\n```\n\n2. Bash:\n   `python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py append .\u002FTRIAGE.md --from .\u002F.triage-state\u002F_chunk.tmp`\n\nRepeat for each true_positive.\n\n**Step 3 — footer.** Write tool → `.\u002F.triage-state\u002F_chunk.tmp` containing the\nDropped table, then `checkpoint.py append` it the same way:\n\n```\n## Dropped\n\n| id | title | file:line | why dropped |\n{false_positives: refute_reasons + exclusion_rule}\n{duplicates: \"duplicate of {duplicate_of}\"}\n{unlocatable: \"no source location in input\"}\n```\n\n**Checkpoint (final):** Bash:\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py done .\u002F.triage-state 6`\nThe next invocation's resume check sees `status == \"complete\"` and starts\nfresh.\n\n### 6d. Terminal summary\n\nUnder ~12 lines:\n\n```\nTriage complete: {N} findings -> {T} confirmed, {F} false positives, {D} duplicates.\n\n  HIGH:   {n}   {title of top HIGH, owner_hint}\n  MEDIUM: {n}\n  LOW:    {n}\n  Needs manual test: {n}\n\n  Top refute reasons: {top 3 refute_reasons with counts}\n\nWrote .\u002FTRIAGE.md and .\u002FTRIAGE.json\n```\n\n---\n\n## Testing this skill\n\nSmoke test (five-finding fixture: 2 real, 1 dup, 2 FP):\n\n```\n\u002Ftriage .claude\u002Fskills\u002Ftriage\u002Ffixtures\u002Fcanary-findings.json --auto --repo targets\u002Fcanary\n```\n\nExpected: f001 and f003 confirmed; f002 duplicate of f001; f004 dropped\n(`misread_code`: it's a read buffer, not a randomness source); f005 dropped\n(`already_handled`: there is a null check at line 68).\n\nOr against pipeline output:\n\n```\nvuln-pipeline run drlibs --runs 3 --parallel --stream\n\u002Ftriage results\u002Fdrlibs\u002F\u003Cts>\u002F --repo targets\u002Fdrlibs\n```\n\nHand-check a sample of TRUE_POSITIVE\u002FHIGH results (the `first_links` should\npoint at real call sites) and a sample of FALSE_POSITIVE rejects (the\n`exclusion_rule` or `refute_reasons` should be defensible).\n\n---\n\n## Design notes\n\n- **Checkpoints are per-phase JSON**, not conversation state. The pipeline's\n  `--resume \u003Csession_id>` (docs\u002Fpipeline.md) restores transcript history but\n  doesn't help when the orchestrator's context window itself fills;\n  file-backed checkpoints let a brand-new session pick up from the last\n  completed phase. `.\u002F.triage-state\u002F` is scratch — add to `.gitignore`.\n- **Dedupe runs before verify** to cut verifier spend by the duplication\n  factor (often 2-4x on multi-scanner input) at the cost of one cheap\n  subagent.\n- **Semantic dedupe is one agent**, given only id\u002Ffile\u002Fline\u002Fcategory\u002Ftitle:\n  enough to cluster, not enough to leak one scanner's reasoning into\n  another finding's verification.\n- **Bash is allowed narrowly** for `git log` (owner hints), `jq`\u002F`find`\n  (ingest), and `python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py` (state I\u002FO).\n  The actual safety property is \"no execution of target code,\" which is\n  preserved.\n- **`CANNOT_VERIFY`** exists so verifiers aren't forced into a false\n  binary. It maps to `needs_manual_test` under recall policy and to a drop\n  under precision policy.\n- **Threat-model boost is capped at one step** so a stated threat can't\n  re-inflate a LOW back to HIGH and defeat the precondition rule.\n- **`severity_label` is separate from `severity`.** Sorting always uses the\n  precondition-derived HIGH\u002FMEDIUM\u002FLOW; the label is presentation-layer for\n  whatever standard the reviewer's tooling expects.\n- **Pipeline `report.json` ingest is best-effort.** Those reports describe\n  ASAN crashes with prose exploitability analysis rather than the\n  file\u002Fline\u002Fcategory shape static verifiers expect. Expect more\n  `needs_manual_test` verdicts on that input than on static-scanner JSON.\n- **Sharding at ~40 parallel Tasks** is a conservative ceiling for typical\n  agent-spawn limits; tune up if your runtime allows.\n- **No network**, deliberately. CVE-database enrichment and upstream-fix\n  checks would help ranking but break the air-gapped-review property.\n","# triage\n\nAdversarial triage of raw security-scanner output. Does four jobs:\n**verify** each finding is real, **deduplicate** across runs and scanners,\n**rank** survivors by derived exploitability rather than the scanner's\nclaimed severity, and **route** each to a component owner. Output is a\nshort, ranked, owned list instead of a raw dump.\n\nInvoke with `\u002Ftriage \u003Cfindings-path> [--auto] [--votes N] [--repo PATH] [--fp-rules FILE]`.\n\n**Arguments** (parse from `$ARGUMENTS`; positional `$1`\u002F`$2` expansion is\nnot stable across runtimes):\n- findings path (first positional, required): a JSON file, a directory of\n  JSON files, a `VULN-FINDINGS.json`, an `INCIDENTS.json`, a pipeline\n  `results\u002F\u003Ctarget>\u002F\u003Cts>\u002F` directory, or a markdown report.\n- `--auto`: skip the interview and use defaults. Default mode is\n  **interactive**.\n- `--votes N`: verifier votes per finding (default 3; use 1 for a quick\n  pass, 5 for high-stakes batches).\n- `--repo PATH`: path to the target codebase, read-only (default cwd).\n  Verification needs source access; the skill stops with an error if the\n  cited files aren't reachable.\n- `--fp-rules FILE`: append the contents of FILE to the verifier's\n  exclusion-rule list (Phase 3a). Use for org-specific precedents: \"we use\n  Prisma ORM everywhere — raw-query SQLi only\", \"k8s resource limits cover\n  DoS\", etc. Plain text, one rule per line or paragraph.\n- `--fresh`: ignore any existing checkpoint in `.\u002F.triage-state\u002F` and start\n  from Phase 0. Without this flag the skill resumes from the last completed\n  phase if a checkpoint is present.\n\n**Tools:** Read, Glob, Grep, Write, Task, AskUserQuestion. Bash is\npermitted only for `git`, `find`, `wc`, `ls`, `jq`, and\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py` (checkpoint I\u002FO).\n\n**Do not execute target code.** No building, running, installing\ndependencies, or sending requests. A proof-of-concept that accidentally\nworks against something real is unacceptable, and \"couldn't write a working\nPoC\" is weak evidence of non-exploitability. Every conclusion comes from\nreading source. This applies to the orchestrator and every subagent;\ninclude the constraint in every Task prompt. For high-confidence HIGH\nfindings, recommend a human-built PoC as a follow-up instead.\n\n**Do not reach the network.** No package-registry lookups, CVE-database\nqueries, or upstream-commit fetches.\n\n---\n\n## Checkpointing (runs before Phase 0 and after every phase)\n\nOn large finding batches a full run can exhaust context or hit rate limits\nmid-way — particularly Phase 3, which spawns `candidates × votes` verifiers.\nPhase state persists to `.\u002F.triage-state\u002F` so a fresh `\u002Ftriage` session can\nresume without re-asking the interview or re-spawning verifiers.\n\nAll checkpoint I\u002FO goes through `python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py`\n(atomic writes, JSON-validated). Never use the Write tool for `progress.json`\ndirectly. Never pass payload via heredoc or stdin; target-derived strings\ncould collide with the heredoc delimiter and break out to shell. The\nWrite→`--from` pattern keeps repo-derived bytes out of Bash argv.\n\nState files in `.\u002F.triage-state\u002F`:\n- `progress.json` — **single source of truth** for resume position:\n  `{\"status\": \"running\"|\"complete\", \"phase_done\": N, \"shards_done\": [...]}`.\n  Resume decisions read ONLY this file, never a glob of `phase*.json` or\n  shard files (stale files from a prior run must not be trusted).\n- `phaseN.json` — data payload for phase N (schemas at the tail of each phase\n  section below).\n- `_chunk.tmp` — transient payload buffer; overwritten before every\n  `save`\u002F`shard`\u002F`append` call.\n\n**Start of run — resume check.** Bash:\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py load .\u002F.triage-state`\n\n- `status == \"absent\"` OR `\"complete\"`, OR `--fresh` in `$ARGUMENTS` →\n  **fresh start.** Bash:\n  `python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py reset .\u002F.triage-state`,\n  then proceed to Phase 0.\n- `status == \"running\"` with `phase_done == N` → **resume.** Read\n  `.\u002F.triage-state\u002Fphase0.json` through `phaseN.json` **in order** (and any\n  `shard_*.json` files listed in `shards_done`), merging keys into working\n  state (later files override earlier — checkpoints may be deltas). Print\n  `Resuming from checkpoint: Phase N complete (.\u002F.triage-state\u002FphaseN.json)`,\n  and **skip directly to Phase N+1**.\n\n**End of every phase N.** Two tool calls:\n1. Write tool → `.\u002F.triage-state\u002F_chunk.tmp` containing the phase's output\n   JSON (schema at the tail of each phase section).\n2. Bash → `python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py save .\u002F.triage-state \u003CN> \u003Cname> --from .\u002F.triage-state\u002F_chunk.tmp`\n\n**End of run.** After writing `TRIAGE.json` and `TRIAGE.md`, Bash:\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py done .\u002F.triage-state 6`\n\n---\n\n## Phase 0: Mode select and interview\n\n### 0a. Parse arguments\n\nFrom `$ARGUMENTS`: extract the findings path (first positional), `--auto`\nflag, `--votes N` (default 3), `--repo PATH` (default `.`), `--fp-rules\nFILE` (default none). If no findings path was given, ask for one and stop.\nIf `--fp-rules` was given, Read the file now and carry its contents as\n`context.extra_fp_rules` for injection into the Phase 3a verifier prompt.\n\n### 0b. Interactive mode (default): interview the user\n\nUnless `--auto` was passed, use **AskUserQuestion** to gather context that\nshapes verification and ranking. Batch into one or two calls of up to four\nquestions. Expect free-text answers via \"Other\"; the multiple-choice options\nare prompts, not constraints.\n\n**Round 1** (single AskUserQuestion call):\n\n1. **Environment & trust boundary** (header `Environment`, single-select)\n   `What kind of system are these findings from, and where does untrusted\n   input enter it?`\n   Options: `Internet-facing web service (HTTP is untrusted)`,\n   `Internal service (callers are authenticated peers)`,\n   `Library \u002F SDK (caller is the trust boundary)`,\n   `CLI \u002F batch tool (operator inputs trusted, file inputs not)`,\n   `Embedded \u002F firmware (physical access in scope)`.\n   Reachability is judged against this boundary; \"command injection from env\n   var\" is a true positive in a multi-tenant web service and a rule-8 false\n   positive in an operator CLI.\n\n2. **Threat model** (header `Threat model`, multi-select)\n   `What does a worst-case attacker look like for this system, and what\n   must never happen? Free text is best.`\n   Options: `Unauthenticated remote code execution`,\n   `Tenant-to-tenant data leakage`, `Privilege escalation to admin`,\n   `Supply-chain compromise of downstream users`,\n   `Denial of service against a paid SLA`,\n   `Compliance-scoped data exposure (PII \u002F PCI \u002F PHI)`.\n   Phase 4 boosts findings that map onto a stated threat.\n\n3. **Scoring standard** (header `Scoring`, single-select)\n   `How should severity be expressed in the output?`\n   Options: `Derived HIGH\u002FMEDIUM\u002FLOW from preconditions (default)`,\n   `CVSS v3.1 vector + base score`, `CVSS v4.0 vector + base score`,\n   `OWASP Risk Rating (likelihood x impact)`,\n   `Organization bug-bar (describe in Other)`.\n   The precondition rule is always computed; this controls what\n   `severity_label` additionally shows.\n\n4. **Noise tolerance** (header `Noise tolerance`, single-select)\n   `When verifiers disagree, which way should ties break?`\n   Options:\n   `Precision: drop anything not majority-confirmed (fewer FPs, may miss real bugs)`,\n   `Recall: keep split votes as needs_manual_test (more to review, fewer misses)`,\n   `Ask me per-finding when it happens`.\n\n**Round 2** (conditional): if the threat-model answer was empty or generic,\nor the scoring answer was `Organization bug-bar`, ask one targeted follow-up.\n\nRecord the answers as a `context` dict carried through every phase and\nechoed in the output under `triage_context`.\n\n### 0c. Auto mode defaults\n\nWhen `--auto` is set, do not call AskUserQuestion. Use:\n- Environment: `Unknown. Treat any externally-reachable entry point as\n  untrusted; flag trust-boundary assumptions explicitly in rationale.`\n- Threat model: empty (no boost).\n- Scoring: derived HIGH\u002FMEDIUM\u002FLOW.\n- Noise tolerance: precision.\n\n**Checkpoint:** Write tool → `.\u002F.triage-state\u002F_chunk.tmp`:\n\n```json\n{\"phase\": 0, \"context\": {mode, environment, threat_model, scoring, noise_tolerance, votes_per_finding, repo, findings_path}}\n```\n\nThen Bash:\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py save .\u002F.triage-state 0 interview --from .\u002F.triage-state\u002F_chunk.tmp`\nOn resume past Phase 0, the interview is **not** re-asked; `context` is\nrestored from this file.\n\n---\n\n## Phase 1: Ingest and normalize\n\nTurn the input into a flat `findings[]` list with stable ids, regardless of\nsource format.\n\n### 1a. Detect input shape\n\nInspect the findings path:\n\n- **Directory**: Glob for `**\u002F*.json` and `**\u002F*.jsonl`. Recognized\n  containers, in priority order:\n  - `VULN-FINDINGS.json` (a `{findings: [...]}` container): read\n    `.findings[]`.\n  - `INCIDENTS.json` (the `\u002Fdnr-hunt` \u002F `\u002Fdnr-respond` output): read\n    `.incidents[]`; each incident is one finding. Map the nested fields —\n    `vuln.file` → `file`, `vuln.line` → `line`, `vuln.type` → `category`,\n    `vuln.function` → `function`, `description` ← `vuln.mechanism` plus\n    `impact` — and keep `id`, `title`, `verdict`, and `poc`; the 1b\n    aliases route `poc` → `exploit_scenario`, and a `confirmed_exploited`\n    verdict means the incident arrived execution-verified, not statically\n    guessed — verifiers should weight that. The top-level `ruled_out`\n    array is not findings — don't ingest it. Incidents with no\n    `vuln.file` follow the 1b missing-`file` rule like any other finding.\n  - `reports\u002Fbug_*\u002Freport.json` or `reports\u002Fmanifest.jsonl` (this repo's\n    pipeline output): one finding per `bug_NN`. Map `crash.crash_type` →\n    `category`, `verdict.severity_rating` → `severity`, the prose `report` →\n    `description`, crash file from the ASAN top frame → `file`\u002F`line`.\n  - `found_bugs.jsonl`: one finding per line.\n  - Any other `*.json` whose top level is a list of objects, or an object\n    with a `findings`\u002F`results`\u002F`issues`\u002F`vulnerabilities` array: that\n    array.\n- **Single `.json` \u002F `.jsonl` file**: same recognition as above.\n- **Markdown \u002F text**: split on level-2\u002F3 headings or `---` rules; for each\n  section, extract `file`, `line`, `category`, `severity`, `description` by\n  pattern (`File:`, `Line:`, `Severity:` labels or `path:NN` spans).\n  Best-effort; mark `source_format: \"markdown_heuristic\"`.\n\nIf nothing parseable is found, stop and report what was seen.\n\n### 1b. Normalize fields\n\nFor each raw record, build a finding dict. **Pull what's present; never\nguess what's absent.** Field map (source-key aliases → canonical):\n\n| Canonical       | Also accept                                              |\n|-----------------|----------------------------------------------------------|\n| `file`          | `path`, `location.file`, `filename`, ASAN top-frame file |\n| `line`          | `line_number`, `location.line`, `lineno`                 |\n| `category`      | `type`, `cwe`, `rule_id`, `crash_type`, `vulnerability_class` |\n| `severity`      | `severity_rating`, `level`, `priority`, `risk`           |\n| `title`         | `name`, `summary`, `message`                             |\n| `description`   | `details`, `report`, `body`, `evidence`                  |\n| `exploit_scenario` | `attack_scenario`, `poc`, `reproduction`              |\n| `preconditions` | `requirements`, `assumptions`                            |\n| `recommendation`| `fix`, `remediation`, `mitigation`                       |\n| `scanner_confidence` | `confidence`, `score`, `certainty` (normalize to 0.0-1.0) |\n\nAttach to every finding:\n- `id`: `f001`, `f002`, ... in ingest order. If `scanner_confidence` is\n  present on most findings, order ingest by it descending so high-signal\n  findings get verified (and surface in partial output) first; otherwise\n  keep source order. This is a scheduling prior only — it does not affect\n  verdicts.\n- `source`: relative path of the file it came from, plus source format.\n- `missing_fields`: list of canonical fields that were absent. If `file` is\n  missing or does not resolve under `--repo`, the finding is\n  **unlocatable**: it skips dedup and verification and is emitted directly\n  with `verdict: false_positive`, `verify_verdict: needs_manual_test`,\n  `confidence: 0`, `refute_reasons: [\"doesnt_exist\"]`, `rationale: \"no\n  source location in input; cannot verify statically; human review\n  required\"`. Never emit a confident verdict on a finding you could not\n  locate, and never let it absorb or be absorbed by dedup.\n\n### 1c. Locate the target codebase\n\nResolve `--repo` (default cwd). For the first 5 findings with a `file`,\ncheck the path resolves under the repo. Try, in order: (a) `repo\u002Ffile`\nas-given; (b) `file` as an absolute or cwd-relative path; (c) `repo\u002Ffile`\nwith common prefixes stripped from `file` (`src\u002F`, `app\u002F`, `.\u002F`, or the\nrepo's own basename, e.g. `harness\u002Fgrade.py` with `--repo harness`).\nRecord which resolution worked and apply it to every finding. If none\nresolve, **stop**: tell the user verification needs source access and the\ncited files aren't reachable, and suggest a `--repo` value based on the\nlongest common suffix you can see.\n\n**Checkpoint:** Write tool → `.\u002F.triage-state\u002F_chunk.tmp`:\n\n```json\n{\"phase\": 1, \"context\": {...}, \"findings\": [ {normalized finding dicts with id\u002Fsource\u002Ffile\u002Fline\u002Fcategory\u002F...} ], \"path_resolution\": \"\u003Cwhich of a\u002Fb\u002Fc worked>\"}\n```\n\nThen Bash:\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py save .\u002F.triage-state 1 ingest --from .\u002F.triage-state\u002F_chunk.tmp`\n\n---\n\n## Phase 2: Deduplicate (before verification)\n\nCollapse repeats so duplicate findings don't each burn N verifiers.\n\n### 2a. Deterministic pass (inline, no subagent)\n\nCluster findings where all of:\n- same `file` (after path normalization), AND\n- same `category` (case-insensitive, punctuation stripped), AND\n- `line` numbers within 10 of each other. Both-missing matches; one-side-\n  missing does NOT (a line-less record must not absorb a located one).\n\nWithin each cluster, the canonical is the record with the fewest\n`missing_fields`; ties break to lowest `id`. Every other member gets\n`verdict: duplicate`, `duplicate_of: \u003Ccanonical id>`, and is removed from\nthe working set. Record duplicate ids on the canonical as `absorbed: [...]`.\n\n### 2b. Semantic pass (one subagent, only if >1 cluster survives)\n\nSpawn ONE Task with `subagent_type: \"general-purpose\"` and this prompt:\n\n```\nYou are deduplicating security findings before expensive verification. Two\nfindings are DUPLICATES if fixing one would also fix the other. Two findings\nare DISTINCT if they have genuinely independent root causes, even if they\nshare a category or file.\n\nTreat as DUPLICATE:\n- Same root cause described with different wording or by different scanners\n- A shared vulnerable helper function reported once per call site\n- A missing global protection (auth check, output encoding) reported once\n  per endpoint that lacks it\n- A cause (\"missing input validation on `name`\") and its consequence\n  (\"SQL injection via `name`\") in the same code path\n\nTreat as DISTINCT:\n- Different categories in the same file region (an \"ssrf\" near a\n  \"buffer_overflow\" is not a duplicate just because the lines are close)\n- Same file, same category, but different tainted variables reaching\n  different sinks\n- Same helper, but two independent bugs inside it\n- Two endpoints missing the same check, where the fix is per-endpoint\n  rather than a shared gate\n\nBelow are the candidate findings (one per line: id | file:line | category |\ntitle). Group them. Respond with ONLY lines of the form:\n\n  GROUP: \u003Ccanonical_id> \u003C- \u003Cdup_id>, \u003Cdup_id>, ...\n\nOne line per group that has duplicates. Omit singletons. Pick the most\nspecific \u002F best-described finding as canonical. No prose.\n\nCANDIDATES:\n{one line per surviving finding: \"f003 | src\u002Fauth.py:112 | sql_injection | User lookup concatenates name into query\"}\n```\n\nParse `GROUP:` lines. For each, mark the listed dup ids with\n`verdict: duplicate`, `duplicate_of: \u003Ccanonical>`, append them to the\ncanonical's `absorbed`, and drop them from the working set.\n\nCarry forward `candidates[]` = the surviving canonicals.\n\n**Checkpoint:** Write tool → `.\u002F.triage-state\u002F_chunk.tmp`:\n\n```json\n{\"phase\": 2, \"context\": {...}, \"findings\": [ {all findings; duplicates carry verdict\u002Fduplicate_of} ], \"candidates\": [\"f001\", \"f003\", \"...\"]}\n```\n\nThen Bash:\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py save .\u002F.triage-state 2 dedup --from .\u002F.triage-state\u002F_chunk.tmp`\n\n---\n\n## Phase 3: Verify\n\nFor each candidate, N independent adversarial verifiers re-derive the claim\nfrom the code and vote. Each verifier's stance is \"find any reason this is\nwrong.\" Each starts from the code at the cited location, not the scanner's\ndescription, and never sees the other verifiers' reasoning (shared context\npropagates blind spots).\n\n### 3a. Verifier prompt (assemble once, reuse for every spawn)\n\n```\nYou are a skeptical security engineer adversarially verifying ONE finding\nfrom an automated scanner. Your default assumption is that the scanner is\nWRONG. Your job is to re-derive the claim from the source code yourself and\ndecide TRUE_POSITIVE or FALSE_POSITIVE.\n\nYou have read-only access to the target codebase at: {REPO_PATH}\nYou may use Read, Glob, and Grep, but ONLY on paths inside {REPO_PATH}.\nDo NOT read, grep, or glob outside that root: anything outside it (the\ntriage pipeline itself, scanner outputs, fixtures, other repos on disk) is\nout of scope and citing it contaminates your verdict. If a finding's\n`file` resolves outside {REPO_PATH}, return CANNOT_VERIFY with\nREFUTE_REASON: doesnt_exist. You may NOT build, run, or test the target,\ninstall dependencies, or reach the network. Every conclusion must come\nfrom reading source under {REPO_PATH}.\n\nENVIRONMENT (from the operator; this defines the trust boundary):\n{context.environment or \"Unknown. Treat any externally-reachable entry point as untrusted.\"}\n\n────────────────────────────────────────────────────────────────────────\nPROCEDURE: follow all four steps. Each exists because skipping it lets a\nspecific false-positive class through.\n\n1. READ THE CODE AT THE CITED LOCATION YOURSELF.\n   Open {file} at line {line}. Understand what the code actually does. Do\n   NOT trust the scanner's description: scanners misread code surprisingly\n   often, and if you start from the summary you inherit the misreading.\n\n2. TRACE REACHABILITY BACKWARDS FROM THE SINK.\n   Grep for callers of this function\u002Fmethod. Follow imports. Establish\n   whether attacker-controlled input (per the ENVIRONMENT above) can\n   actually reach this line. A plausible-sounding chain is NOT enough: for\n   at least the FIRST link in the chain, READ the actual call site and\n   QUOTE the file:line in your rationale. Unreachable code is the single\n   largest false-positive source.\n\n3. HUNT FOR PROTECTIONS.\n   Actively look for reasons the finding is WRONG:\n   - Input validation \u002F sanitization upstream of the sink\n   - Framework auto-escaping, parameterized queries, prepared statements\n   - Type constraints (the value is an int, an enum, a fixed-length token)\n   - Authentication \u002F authorization gates before this path\n   - Configuration that limits exposure (feature flag off, debug-only)\n   - Dead code, test-only code, example\u002Ffixture code\n\n4. STRESS-TEST EACH PROTECTION.\n   For each protection you found: is it applied on EVERY path to the sink,\n   or only the one the scanner happened to trace? Are there encodings,\n   edge cases, or alternate entry points that bypass it?\n\n────────────────────────────────────────────────────────────────────────\nEXCLUSION RULES: if the finding matches any of these, it is FALSE_POSITIVE\neven if technically accurate. Cite the rule number in your verdict.\n\n  1. Volumetric DoS or missing rate-limiting (handled at infrastructure\n     layer). ReDoS, algorithmic complexity, and unbounded recursion ARE\n     still valid findings.\n  2. Test-only code, dead code, example\u002Ffixture code, or a crash with no\n     security impact.\n  3. Behavior that is the intended design (compression middleware, a\n     backward-compatible weak algorithm offered alongside a strong one).\n  4. Memory-safety concerns in memory-safe languages outside `unsafe` \u002F\n     FFI blocks.\n  5. SSRF where the attacker controls only the path, not the host or\n     protocol.\n  6. User input flowing into an AI\u002FLLM prompt (prompt injection is not a\n     code vulnerability in the target).\n  7. Path traversal in object storage (S3\u002FGCS) where `..\u002F` does not escape\n     a trust boundary.\n  8. Trusted inputs used as the attack vector (env vars, CLI flags set by\n     the operator), UNLESS the ENVIRONMENT above marks them untrusted.\n  9. Client-side code flagged for server-side vulnerability classes.\n 10. Outdated dependency versions (managed by a separate process).\n 11. Weak random used for non-security purposes (jitter, shuffling,\n     dev-only fallbacks).\n 12. Low-impact nuisance issues (log spoofing, CSRF on logout, self-XSS,\n     tabnabbing, open redirect, regex injection).\n 13. Missing hardening or best-practice gap with no concrete exploit path\n     (missing security headers, no audit logging, permissive config that\n     isn't actually reached by untrusted input).\n 14. XSS in a framework with default auto-escaping (React, Angular, Vue,\n     Jinja2 autoescape=on) UNLESS the sink is a raw-HTML escape hatch\n     (dangerouslySetInnerHTML, bypassSecurityTrustHtml, v-html, |safe).\n 15. Identifiers that are unguessable by construction (UUIDv4, 128-bit+\n     random tokens) flagged as \"predictable\" or \"needs validation\".\n 16. Race conditions or TOCTOU that are theoretical only — no realistic\n     window, or no security-relevant state changes between check and use.\n\n{if context.extra_fp_rules: append here verbatim under an\n \"ORG-SPECIFIC RULES:\" heading}\n\n────────────────────────────────────────────────────────────────────────\nVERDICT: your response MUST end with EXACTLY this block:\n\n  VERDICT: TRUE_POSITIVE | FALSE_POSITIVE | CANNOT_VERIFY\n  CONFIDENCE: \u003C0-10>\n  REFUTE_REASON: \u003Cone of: doesnt_exist, already_handled,\n    implausible_trigger, intentional_behavior, misread_code, duplicate,\n    not_actionable, n\u002Fa>\n  EXCLUSION_RULE: \u003C1-16, org rule, or none>\n  FIRST_LINK: \u003Cfile:line of the first call site you read, or \"none found\">\n  RATIONALE: \u003C2-5 sentences citing specific file:line evidence for\n    reachability, protections found\u002Fabsent, and why each held or didn't>\n\nTRUE_POSITIVE requires ALL of: path is reachable from untrusted input per\nthe ENVIRONMENT; protections are insufficient or bypassable; real-world\nexploitation is feasible.\n\nFALSE_POSITIVE requires ANY of: unreachable from untrusted input;\nadequately protected on all paths; scanner misread the code; an exclusion\nrule applies.\n\nCANNOT_VERIFY: static reasoning genuinely hit its limit (e.g. behavior\ndepends on runtime configuration you cannot read, or the code path crosses\ninto a binary you cannot inspect). Use sparingly; it must not become the\ndefault.\n```\n\n### 3b. Spawn N verifiers per candidate, all in one message\n\nFor each finding in `candidates[]`, build N Task calls (N = `--votes`,\ndefault 3) with `subagent_type: \"general-purpose\"` and `description:\n\"verify {id} vote {k}\u002F{N}\"`.\n\n**Always set `subagent_type`; never fork.** Omitting `subagent_type` forks\nthe orchestrator, and a fork inherits the full conversation context: every\nother finding's description, the scanner's prose, and any prior verifier\nresults. That defeats verifier independence and re-introduces the\ninherited-framing failure mode this phase exists to prevent. Each verifier\nmust start with a fresh, empty context and receive only the 3a prompt\nplus the single finding under review. The same applies to the ranking\nsubagents in 4a.\n\nEach prompt is the verifier prompt from 3a with this block appended:\n\n```\n────────────────────────────────────────────────────────────────────────\nFINDING UNDER REVIEW (from the scanner; treat as a CLAIM, not a fact):\n\n  id:        {id}\n  file:      {file}\n  line:      {line}\n  category:  {category}\n  severity (claimed): {severity}\n  title:     {title}\n\n  description:\n  {description}\n\n  exploit_scenario:\n  {exploit_scenario or \"(not provided)\"}\n\n  preconditions (claimed):\n  {preconditions as bullets or \"(not provided)\"}\n\nYou are vote {k} of {N}. You have NOT seen the other verifiers' reasoning\nand you must NOT try to find it. Work independently from the code.\n```\n\n**Put all verifier Task calls in a single assistant message** so they run\nconcurrently. Do not set `run_in_background`; you need the final text, not\nan async handle. If `len(candidates) * N` exceeds ~40, shard into\nsequential batches of ~40, but keep each batch a single message.\n\n**Prompt size at scale.** The 3a prompt is ~1200 words. When\n`candidates * votes > ~50`, use this compact form instead (same procedure\nand output contract, prose stripped):\n\n```\nAdversarially verify ONE scanner finding. Default: scanner is WRONG.\nRead-only access scoped to {REPO_PATH} ONLY. No exec, no network.\nENVIRONMENT: {context.environment}\n\nSteps: (1) Read {file}:{line} yourself; don't trust the description.\n(2) Trace callers backwards; quote the first call-site file:line.\n(3) Hunt for protections: validation, escaping, type bounds, auth gates,\ndead\u002Ftest code. (4) Stress-test each protection on every path.\n\nExclusion rules (FALSE_POSITIVE if matched): 1 volumetric DoS;\n2 test\u002Fdead\u002Ffixture code; 3 intended design; 4 memory-safety in safe\nlang outside unsafe\u002FFFI; 5 SSRF path-only; 6 LLM prompt input;\n7 object-storage traversal; 8 trusted operator env\u002FCLI inputs;\n9 client code, server vuln class; 10 outdated deps; 11 weak random\nnon-security; 12 low-impact nuisance (log spoof, open redirect, regex\ninject); 13 missing-hardening-only, no concrete exploit; 14 XSS in\nauto-escape framework w\u002Fo raw-HTML escape hatch; 15 unguessable\nUUID\u002Ftoken flagged predictable; 16 theoretical-only race\u002FTOCTOU.\n{+ org rules from --fp-rules if any}\n\nEnd with EXACTLY:\n  VERDICT: TRUE_POSITIVE | FALSE_POSITIVE | CANNOT_VERIFY\n  CONFIDENCE: \u003C0-10>\n  REFUTE_REASON: \u003Cdoesnt_exist|already_handled|implausible_trigger|\n    intentional_behavior|misread_code|duplicate|not_actionable|n\u002Fa>\n  EXCLUSION_RULE: \u003C1-16, org rule, or none>\n  FIRST_LINK: \u003Cfile:line or \"none found\">\n  RATIONALE: \u003C2-5 sentences, file:line cited>\n\nFINDING: {id} {file}:{line} {category} (claimed {severity})\n{title}\n{description}\nVote {k}\u002F{N}. Independent; do not seek other votes.\n```\n\nFindings with a `file` but no `line` get **one** verifier vote regardless\nof `--votes` (a file-level sweep is expensive and doesn't benefit from\nvoting).\n\n**If any Task call returns `status: \"async_launched\"` instead of the\nverifier's text**, the runtime backgrounded it (some runtimes do this\nautomatically for large parallel batches). Pick one recovery and use it for\nthe whole batch:\n  - If completion notifications arrive in your conversation: parse each\n    verifier's VERDICT block from its notification `result` as it lands.\n    Do not end your turn until every vote is accounted for.\n  - If notifications do not arrive: do not poll transcript files. Re-spawn\n    the missing verifiers in a fresh Task batch (smaller shard size, e.g.\n    10) and use the synchronous results.\nThe same recovery applies to the dedupe subagent in 2b and the ranking\nsubagents in 4a.\n\n### 3c. Tally votes\n\nFor each candidate, parse the trailing block from each of its N verifiers\n(tolerate code fences and whitespace). If a verifier errored, timed out,\nor produced no parseable VERDICT block, re-spawn it once. If the retry\nalso fails, count that vote as `cannot_verify` with `confidence: 0` and\nnote `\"verifier_error\"` in `refute_reasons`. The remaining N-1 votes still\ndecide.\n\nBuild:\n\n- `vote_breakdown`: `{\"true_positive\": x, \"false_positive\": y,\n  \"cannot_verify\": z}`\n- `confidence`: mean CONFIDENCE across votes that agree with the majority,\n  rounded to one decimal.\n- `exclusion_rule`: the modal EXCLUSION_RULE among FALSE_POSITIVE votes,\n  else `null`.\n- `refute_reasons`: sorted unique REFUTE_REASON values from FALSE_POSITIVE\n  votes.\n- `first_links`: unique FIRST_LINK values across all votes (reachability\n  audit trail).\n- `rationale`: the RATIONALE from the highest-confidence vote on the\n  winning side, verbatim.\n\n**Decide `verdict`:**\n- Majority TRUE_POSITIVE → `verdict: true_positive`. Proceeds to Phase 4.\n- Majority FALSE_POSITIVE → `verdict: false_positive`. Skips Phase 4.\n- No majority (tie, or majority CANNOT_VERIFY):\n  - Noise tolerance `precision` → `verdict: false_positive`; append\n    `\"(split vote, dropped under precision policy)\"` to rationale.\n  - Noise tolerance `recall` → `verdict: true_positive` with\n    `verify_verdict: needs_manual_test`. Proceeds to Phase 4.\n  - Noise tolerance `ask` → collect all split findings and present them in\n    one AskUserQuestion call at the end of Phase 3 (header: id + title,\n    options: keep \u002F drop), then apply the user's choices.\n\nBuild `confirmed[]` = candidates with `verdict == true_positive`.\n\n**Checkpoint:** Write tool → `.\u002F.triage-state\u002F_chunk.tmp`:\n\n```json\n{\"phase\": 3, \"context\": {...}, \"findings\": [ {all findings with verdict\u002Fvote_breakdown\u002Fconfidence\u002Frefute_reasons\u002Ffirst_links\u002Frationale\u002Fexclusion_rule} ], \"confirmed\": [\"f001\", \"...\"]}\n```\n\nThen Bash:\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py save .\u002F.triage-state 3 verify --from .\u002F.triage-state\u002F_chunk.tmp`\n\nThis is the most expensive checkpoint. When `len(candidates) * votes` exceeds\n~40 and verifier spawns are sharded into sequential batches, additionally\ncheckpoint **per candidate** as its votes are tallied:\n\n1. Write tool → `.\u002F.triage-state\u002F_chunk.tmp` = that finding's post-tally dict.\n2. Bash:\n   `python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py shard .\u002F.triage-state \u003Cid> --from .\u002F.triage-state\u002F_chunk.tmp`\n\nOn resume at `phase_done == 2`, the Phase-3 entry point reads\n`progress.json:shards_done` (default `[]` — do **not** glob shard files on\ndisk; stale shards from a prior run may exist), loads the corresponding\n`shard_{id}.json` files, and spawns verifiers only for `candidates[]` ids\nfrom `phase2.json` that are NOT in `shards_done`. Once every candidate is in\n`shards_done`, write the consolidated `phase3.json` checkpoint as above.\n\n---\n\n## Phase 4: Rank by exploitability (confirmed findings only)\n\nRecompute severity from preconditions and reachability rather than category\nname, and judge the scanner's claimed severity separately. Verification and\nseverity are independent judgments; \"this is real\" must not inflate into\n\"this is critical.\"\n\n### 4a. Ranking prompt\n\nSpawn one Task per confirmed finding (`subagent_type: \"general-purpose\"`,\nall in one message) with:\n\n```\nYou are assigning severity to a CONFIRMED security finding. Verification\nalready happened; assume the finding is real. Your only job is to derive\nhow bad it is, independently of what the scanner claimed.\n\nYou may Read\u002FGrep the codebase at {REPO_PATH} to check preconditions. Do\nNOT execute code.\n\nENVIRONMENT: {context.environment}\nTHREAT MODEL (operator-stated, may be empty):\n{context.threat_model as bullets, or \"(none provided)\"}\nSCORING STANDARD: {context.scoring}\n\nFINDING:\n  id:        {id}\n  file:      {file}:{line}\n  category:  {category}\n  claimed severity: {severity}\n  reachability evidence: {first_links from Phase 3}\n  verifier rationale: {rationale from Phase 3}\n\n────────────────────────────────────────────────────────────────────────\nSTEP 1: Enumerate EVERY precondition that must hold for exploitation.\nBe concrete: required auth state, configuration, prior request, race\nwindow, attacker position. Then state the minimum ACCESS LEVEL required\n(unauthenticated remote \u002F authenticated \u002F local \u002F physical).\n\nSTEP 2: Derive severity from the precondition count and access level:\n\n  | Preconditions | Access required          | Severity |\n  |---------------|--------------------------|----------|\n  | 0             | Unauthenticated remote   | HIGH     |\n  | 1-2           | Authenticated            | MEDIUM   |\n  | 3+            | Local-only \u002F no demo path| LOW      |\n\n  Evaluate each column independently and take the LOWER result. Example:\n  0 preconditions but authenticated-only is MEDIUM, not HIGH; 1\n  precondition but local-only is LOW. Cross-check: if your preconditions\n  list has 3+ items, HIGH is almost certainly wrong.\n\nSTEP 3: Threat-model match. If the THREAT MODEL is non-empty and this\nfinding maps onto one of its entries, note which one. A match may raise\nseverity by ONE step (LOW to MEDIUM or MEDIUM to HIGH), never two. If the\nthreat model is empty, skip this step.\n\nSTEP 4: Judge the scanner's claimed severity. From the perspective of an\nengineer who has reviewed two hundred scanner findings this week and is\nallergic to inflation: would the CLAIMED severity contribute to alert\nfatigue? Is it comparable to a real CVE at that level? Is the code in test\nfixtures or dev-only config? Score in -5..+5:\n  +3..+5  claimed severity is justified or understated\n   0..+2  roughly right\n  -1..-3  inflated by one level\n  -4..-5  badly inflated (LOW dressed as HIGH)\n\nSTEP 5: verify_verdict. Exactly one of:\n  exploitable        preconditions are realistically satisfiable\n  mitigated          real, but a deployed control reduces it below the\n                     derived severity (name the control)\n  needs_manual_test  severity hinges on something only a runtime test can\n                     settle; recommend a human build a PoC\n\nSTEP 6: If SCORING STANDARD is a CVSS or OWASP variant, emit a\n`severity_label` in that format (vector string + base score for CVSS;\nlikelihood x impact for OWASP). Otherwise set it equal to the derived\nHIGH\u002FMEDIUM\u002FLOW.\n\n────────────────────────────────────────────────────────────────────────\nRespond with ONLY this block:\n\n  PRECONDITIONS:\n  - \u003Cone per line>\n  ACCESS_LEVEL: \u003Cunauthenticated_remote|authenticated|local|physical>\n  SEVERITY: \u003CHIGH|MEDIUM|LOW>\n  SEVERITY_LABEL: \u003Cper scoring standard>\n  THREAT_MATCH: \u003Cmatched threat-model entry, or none>\n  SEVERITY_ALIGNMENT: \u003C-5..+5>\n  VERIFY_VERDICT: \u003Cexploitable|mitigated|needs_manual_test>\n  RANK_RATIONALE: \u003C2-4 sentences>\n```\n\n### 4b. Merge\n\nFor each confirmed finding, parse the block and attach `preconditions`\n(replacing any scanner-supplied list), `access_level`, `severity`\n(recomputed), `severity_label`, `threat_match`, `severity_alignment`,\n`verify_verdict`, and append RANK_RATIONALE to `rationale` (separated by a\nblank line from the Phase-3 rationale).\n\nFor findings that did NOT reach Phase 4 (`false_positive`, `duplicate`,\nunlocatable): set `severity: null`, `verify_verdict: null`,\n`severity_alignment: null`, `preconditions: []`.\n\n**Checkpoint:** Write tool → `.\u002F.triage-state\u002F_chunk.tmp`:\n\n```json\n{\"phase\": 4, \"context\": {...}, \"findings\": [ {all findings with severity\u002Fseverity_label\u002Fpreconditions\u002Faccess_level\u002Fthreat_match\u002Fseverity_alignment\u002Fverify_verdict} ]}\n```\n\nThen Bash:\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py save .\u002F.triage-state 4 rank --from .\u002F.triage-state\u002F_chunk.tmp`\n\n---\n\n## Phase 5: Route\n\nTag each confirmed true-positive with the most specific component or owner\ninferable. For each finding in `confirmed[]`, stop at the first hit:\n\n1. **CODEOWNERS \u002F OWNERS.** Grep `--repo` for `CODEOWNERS`, `OWNERS`,\n   `.github\u002FCODEOWNERS`, `docs\u002FCODEOWNERS`. If found, match the finding's\n   `file` against its patterns (last match wins). Hint:\n   `\"CODEOWNERS: \u003Cpattern> -> \u003Cowner(s)>\"`.\n2. **git log.** If `--repo` is a git checkout, run\n   `git -C {REPO} log --format='%an' -n 50 -- \"{file}\" | sort | uniq -c | sort -rn | head -3`.\n   Hint: `\"top committer: \u003Cname> (\u003Cn>\u002F\u003Ctotal> recent commits); no\n   CODEOWNERS entry\"`.\n3. **Module fallback.** Hint: `\"component: \u003Ctop-level dir of file>\u002F; no\n   CODEOWNERS or git history\"`.\n\nAttach as `owner_hint`. State the source so confidence is clear; a bare\nusername is less useful than `\"component: auth\u002F; no CODEOWNERS entry; top\ncommitter jsmith (14\u002F20 recent commits)\"`. For non-true-positive findings,\nset `owner_hint: null`.\n\n**Checkpoint:** Write tool → `.\u002F.triage-state\u002F_chunk.tmp`:\n\n```json\n{\"phase\": 5, \"context\": {...}, \"findings\": [ {all findings with owner_hint} ]}\n```\n\nThen Bash:\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py save .\u002F.triage-state 5 route --from .\u002F.triage-state\u002F_chunk.tmp`\n\n---\n\n## Phase 6: Output\n\n### 6a. Sort\n\nOrder all findings by:\n1. `verdict`: `true_positive`, then `duplicate`, then `false_positive`.\n2. Within true positives: `severity` HIGH > MEDIUM > LOW, then `confidence`\n   descending, then `severity_alignment` descending.\n3. Within others: original `id`.\n\n### 6b. Write `.\u002FTRIAGE.json`\n\n```json\n{\n  \"triage_completed\": true,\n  \"triage_context\": {\n    \"mode\": \"interactive|auto\",\n    \"environment\": \"...\",\n    \"threat_model\": [\"...\"],\n    \"scoring\": \"...\",\n    \"noise_tolerance\": \"...\",\n    \"votes_per_finding\": 3,\n    \"repo\": \"...\"\n  },\n  \"summary\": {\n    \"input_count\": 0,\n    \"duplicates\": 0,\n    \"false_positives\": 0,\n    \"true_positives\": 0,\n    \"needs_manual_test\": 0,\n    \"by_severity\": {\"HIGH\": 0, \"MEDIUM\": 0, \"LOW\": 0}\n  },\n  \"findings\": [\n    {\n      \"id\": \"f001\",\n      \"source\": \"VULN-FINDINGS.json#0\",\n      \"title\": \"...\",\n      \"file\": \"...\",\n      \"line\": 0,\n      \"category\": \"...\",\n      \"claimed_severity\": \"HIGH\",\n      \"verdict\": \"true_positive|false_positive|duplicate\",\n      \"verify_verdict\": \"exploitable|mitigated|needs_manual_test|null\",\n      \"confidence\": 0.0,\n      \"severity\": \"HIGH|MEDIUM|LOW|null\",\n      \"severity_label\": \"...\",\n      \"severity_alignment\": 0,\n      \"preconditions\": [\"...\"],\n      \"access_level\": \"...\",\n      \"threat_match\": \"...|null\",\n      \"rationale\": \"file:line-cited prose: reachability, protections, why each held or didn't; then ranking rationale\",\n      \"vote_breakdown\": {\"true_positive\": 0, \"false_positive\": 0, \"cannot_verify\": 0},\n      \"refute_reasons\": [\"...\"],\n      \"exclusion_rule\": null,\n      \"first_links\": [\"file:line\", \"...\"],\n      \"duplicate_of\": null,\n      \"absorbed\": [\"...\"],\n      \"owner_hint\": \"...\",\n      \"missing_fields\": [\"...\"]\n    }\n  ]\n}\n```\n\nEvery input finding appears exactly once (duplicates reference their\ncanonical via `duplicate_of`). Do not silently drop anything. Do not print\nthis JSON to the terminal; write to file only.\n\n### 6c. Write `.\u002FTRIAGE.md`\n\nReviewer-facing report. Build it **incrementally**. Do NOT emit the whole\nfile in one Write. One chunk per finding; a stalled chunk loses that one\nsection, not the file.\n\n**Step 1 — header.** Write tool → `.\u002FTRIAGE.md` (clobbers any prior file)\ncontaining only the title block, summary, and `## Act on these` heading:\n\n```\n# Triage Report\n\n{summary line: N in -> D duplicates, F false positives, T confirmed (H high \u002F M med \u002F L low), X need manual test}\n\nContext: {mode}; environment = {environment}; scoring = {scoring}; {votes}-vote verification.\n\n## Act on these\n```\n\n**Step 2 — per finding.** For each true_positive in severity order:\n1. Write tool → `.\u002F.triage-state\u002F_chunk.tmp` containing ONE finding's section:\n\n```\n### [{severity}] {title}  ({id})\n`{file}:{line}` | {category} | claimed {claimed_severity} (alignment {severity_alignment:+d}) | confidence {confidence}\u002F10\n**Owner:** {owner_hint}\n**Verdict:** {verify_verdict}, votes {vote_breakdown}\n**Preconditions ({n}):** {bulleted}\n**Threat-model match:** {threat_match or \"none\"}\n**Why:** {rationale}\n**Reachability evidence:** {first_links}\n{if verify_verdict == needs_manual_test:}\n> Recommend a human build a PoC; static reasoning hit its limit.\n```\n\n2. Bash:\n   `python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py append .\u002FTRIAGE.md --from .\u002F.triage-state\u002F_chunk.tmp`\n\nRepeat for each true_positive.\n\n**Step 3 — footer.** Write tool → `.\u002F.triage-state\u002F_chunk.tmp` containing the\nDropped table, then `checkpoint.py append` it the same way:\n\n```\n## Dropped\n\n| id | title | file:line | why dropped |\n{false_positives: refute_reasons + exclusion_rule}\n{duplicates: \"duplicate of {duplicate_of}\"}\n{unlocatable: \"no source location in input\"}\n```\n\n**Checkpoint (final):** Bash:\n`python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py done .\u002F.triage-state 6`\nThe next invocation's resume check sees `status == \"complete\"` and starts\nfresh.\n\n### 6d. Terminal summary\n\nUnder ~12 lines:\n\n```\nTriage complete: {N} findings -> {T} confirmed, {F} false positives, {D} duplicates.\n\n  HIGH:   {n}   {title of top HIGH, owner_hint}\n  MEDIUM: {n}\n  LOW:    {n}\n  Needs manual test: {n}\n\n  Top refute reasons: {top 3 refute_reasons with counts}\n\nWrote .\u002FTRIAGE.md and .\u002FTRIAGE.json\n```\n\n---\n\n## Testing this skill\n\nSmoke test (five-finding fixture: 2 real, 1 dup, 2 FP):\n\n```\n\u002Ftriage .claude\u002Fskills\u002Ftriage\u002Ffixtures\u002Fcanary-findings.json --auto --repo targets\u002Fcanary\n```\n\nExpected: f001 and f003 confirmed; f002 duplicate of f001; f004 dropped\n(`misread_code`: it's a read buffer, not a randomness source); f005 dropped\n(`already_handled`: there is a null check at line 68).\n\nOr against pipeline output:\n\n```\nvuln-pipeline run drlibs --runs 3 --parallel --stream\n\u002Ftriage results\u002Fdrlibs\u002F\u003Cts>\u002F --repo targets\u002Fdrlibs\n```\n\nHand-check a sample of TRUE_POSITIVE\u002FHIGH results (the `first_links` should\npoint at real call sites) and a sample of FALSE_POSITIVE rejects (the\n`exclusion_rule` or `refute_reasons` should be defensible).\n\n---\n\n## Design notes\n\n- **Checkpoints are per-phase JSON**, not conversation state. The pipeline's\n  `--resume \u003Csession_id>` (docs\u002Fpipeline.md) restores transcript history but\n  doesn't help when the orchestrator's context window itself fills;\n  file-backed checkpoints let a brand-new session pick up from the last\n  completed phase. `.\u002F.triage-state\u002F` is scratch — add to `.gitignore`.\n- **Dedupe runs before verify** to cut verifier spend by the duplication\n  factor (often 2-4x on multi-scanner input) at the cost of one cheap\n  subagent.\n- **Semantic dedupe is one agent**, given only id\u002Ffile\u002Fline\u002Fcategory\u002Ftitle:\n  enough to cluster, not enough to leak one scanner's reasoning into\n  another finding's verification.\n- **Bash is allowed narrowly** for `git log` (owner hints), `jq`\u002F`find`\n  (ingest), and `python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py` (state I\u002FO).\n  The actual safety property is \"no execution of target code,\" which is\n  preserved.\n- **`CANNOT_VERIFY`** exists so verifiers aren't forced into a false\n  binary. It maps to `needs_manual_test` under recall policy and to a drop\n  under precision policy.\n- **Threat-model boost is capped at one step** so a stated threat can't\n  re-inflate a LOW back to HIGH and defeat the precondition rule.\n- **`severity_label` is separate from `severity`.** Sorting always uses the\n  precondition-derived HIGH\u002FMEDIUM\u002FLOW; the label is presentation-layer for\n  whatever standard the reviewer's tooling expects.\n- **Pipeline `report.json` ingest is best-effort.** Those reports describe\n  ASAN crashes with prose exploitability analysis rather than the\n  file\u002Fline\u002Fcategory shape static verifiers expect. Expect more\n  `needs_manual_test` verdicts on that input than on static-scanner JSON.\n- **Sharding at ~40 parallel Tasks** is a conservative ceiling for typical\n  agent-spawn limits; tune up if your runtime allows.\n- **No network**, deliberately. CVE-database enrichment and upstream-fix\n  checks would help ranking but break the air-gapped-review property.\n",{"name":5,"description":7,"allowed-tools":24,"argument-hint":37},[25,26,27,28,29,30,31,32,33,34,35,36],"Read","Glob","Grep","Write","Task","AskUserQuestion","Bash(git log:*)","Bash(jq:*)","Bash(find:*)","Bash(ls:*)","Bash(wc:*)","Bash(python3 .claude\u002Fskills\u002F_lib\u002Fcheckpoint.py:*)","\u003Cfindings-path> [--auto] [--votes N] [--repo PATH] [--fp-rules FILE] [--fresh]","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","04-安全渗透\u002Ftriage",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill triage",{"tool":52,"command":53},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill triage",{"tool":55,"command":56},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill triage","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Ftriage\u002FSKILL.md",true,[60,66],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"fixtures\u002Fcanary-findings.json","REFERENCE","参考文档",1814,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Ftriage\u002Ffixtures\u002Fcanary-findings.json",{"path":67,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":68,"sourceHtmlUrl":69},"README.md",3464,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Ftriage\u002FREADME.md",[71,79,84,91,98,105],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":78},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":80,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":78},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":78},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":78},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":78},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":78},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]