Bug fleet

From Intense-Visions/harness-engineering · View interactive version

Bug fleet is an AI agent skill from the GitHub repository Intense-Visions/harness-engineering. > Proactive undiscovered-bug hunt across the standing codebase — rank the code into disjoint risk-ordered areas, confirm the batch with the human in one up-front round, fan out worktree-isolated subag

How to use this skill

Skill file

Bug Fleet

Proactive undiscovered-bug hunt across the standing codebase — rank the code into disjoint risk-ordered areas, confirm the batch with the human in one up-front round, fan out worktree-isolated subagents that each run the real per-area hunt pipeline, admit nothing as a bug until a deterministic failing test reproduces it against unmodified code at the pinned base SHA, and hand back a tiered batch of fix PRs and filed issues for one bulk review. The fleet never auto-merges and never trusts a subagent's self-report.

Every existing correctness gate looks at code that is already suspect. CI-red and flaky-run work starts from a failure that has already manifested. Interactive debugging is reactive — it begins with a known problem. Code, security, and soundness review are diff- or spec-scoped — they judge what changed, not what is standing. Coverage-driven test authoring chases untested lines, where bugs are an incidental by-product. Nothing proactively sweeps already-merged, standing code for the defects nobody has hit yet, and those are precisely the defects that surface in production rather than in a pull request.

bug-fleet fills that gap, and it inverts the attention economics while doing so. Hunting a large codebase by hand is a per-defect slog: pick an area, reason about its failure modes, convince yourself a suspicion is real, write a test to prove it, decide whether the fix is safe, and do it again — one area at a time, with a human present throughout. The fleet moves the human from "hunt every area" to "confirm the batch once, review the batch once." It is a quality-queue member of the -fleet family: it does not sit on the core intake → decide → build → land spine, but works the latent-defect queue alongside it, as its siblings work the CI-red, coverage-gap, and entropy-hotspot queues.

This skill builds on the shared -fleet spine documented in docs/reference/fleet-family.md — the five-phase SELECT → CONFIRM → DISPATCH → VERIFY → terminal skeleton, the concurrency governor, the artifact + all-OS-CI verification discipline, the worktree fan-out with its nested-path push caveat, the front-load / park-unforeseen interaction model, and the never-silent-merge invariant. The family ADRs cited there — _Subagent worktree fan-out (vs the Workflow primitive) for -fleet execution_ and _The front-load / park-unforeseen interaction model for the -fleet family_ — state that contract once for the family. This SKILL.md defines only what is bug-fleet's own: its queue, its hunt taxonomy, its reproduction-gated verification, its tiered terminal act, and its domain-specific rationalizations.

When to Use

Flags

| Flag | Effect |

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

| --concurrency | Cap concurrent hunt subagents (default 2, max recommended 3 — the machine-storm limit) |

| --report-only | Enumerate, score, and present the ranked area batch; do not dispatch hunt subagents, verify, or file |

| --dry-run | Run SELECT and CONFIRM only; stop before fan-out |

| --file-only | File every verified bug as an issue with its reproducing test; never open a fix PR |

Process

Iron Law

REPRODUCTION-REQUIRED — a candidate defect is not a bug until a failing test reproduces it — deterministically, against unmodified code, at the pinned batch base SHA. No reproduction ⇒ discarded, never filed. The fleet never auto-merges, never patches a security-routed finding inline, and never accepts a subagent's self-report as proof its pipeline ran.

Bug-hunting language models hallucinate defects at a high rate. A reviewer's confident prose describing a null-dereference that cannot occur reads exactly like a reviewer's confident prose describing one that can — and a proactive hunter with a weak bar is not a signal generator, it is a backlog spammer that costs more attention than it saves. An executable, deterministic reproduction is the only evidence that cannot be hallucinated: the test either goes red against unmodified code or it does not. Everything else in this skill exists to serve that bar.

The corollary matters as much as the law. A clean area is a valid, valuable result. The pressure to return something — anything — so a sweep does not look wasted is the exact failure mode the Iron Law prevents. An area hunted honestly and found sound is a finding: it tells the human where the risk is not. Manufacturing a marginal item to justify the run destroys the property that makes this fleet's output worth reading.

Phase 1: SELECT --> Phase 2: CONFIRM --> Phase 3: DISPATCH
                                                    |
                                                    v
             Phase 5: FILE-AND-REPORT <-- Phase 4: VERIFY

| Phase | Purpose | Exit Condition |

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

| 1. SELECT | Compose the analyses into disjoint, risk-ranked areas | Ranked Area[], disjoint and within the size bound, each with its risk basis |

| 2. CONFIRM | One human round: the batch, the pinned base SHA, the governor, the caps, the fix boundary | Approved batch with a pinned base SHA and confirmed caps |

| 3. DISPATCH | Subagents run HUNT → REFUTE → REPRODUCE → CROSS-CHECK → CLASSIFY → FIX | Every area returned candidates, clean, parked, or failed (all recorded) |

| 4. VERIFY | Provenance + transplanted repro + all-OS CI, never a self-report | Each item marked verified-fix / verified-issue / security-routed / rejected |

| 5. FILE-AND-REPORT | Dedup backstop, tiered terminal act, batch summary | Report delivered; nothing merged |

Phase 1: SELECT — Compose the Analyses into Disjoint, Risk-Ranked Areas

  1. Enumerate latent-defect risk by composing the existing analyses — reimplement none of them. Run and fold together:

Missing any one source degrades to the others rather than aborting; record which source was unavailable so the batch summary can carry it. If no source is available, stop and report — there is nothing to rank.

  1. Seed the queue with bugs parked by the other quality-queue members. Suspected defects that a sibling fleet surfaced and handed back for routing enter SELECT as pre-scored candidate areas rather than being rediscovered from scratch.
  1. Fold the analyses into areas. An area is one coherent module or subsystem — the unit that becomes one hunt, in one worktree. Two constraints are hard:
  1. Score and order by composite latent-defect risk. Do not rank ad-hoc. Reuse harness-roadmap-pilot-style impact scoring over a composite of churn × blast radius × critical-path membership × inverse coverage depth, so the ordering is principled and reproducible rather than a matter of which area looked interesting first. Riskiest area first.
  1. Build the Area record for each survivor:

```

Area {

sources, // which analyses surfaced it (may be several)

id, // area slug

files, // the files / module the area covers (disjoint, within the size bound)

riskBasis, // churn, blast radius, critical-path membership, coverage depth

score, // composite latent-defect-risk score

forks, // detected decision forks to surface at CONFIRM (may be empty)

}

```

Phase 2: CONFIRM — The Single Up-Front Human Gate `[checkpoint:human-verify]`

  1. Present the whole batch in one round. This is the only guaranteed human touchpoint before batch review — everything downstream runs autonomously. Present, together, in a single surface:
  1. The human approves or trims once. Batch approval, the fix boundary, and the caps are all settled in this same gate — front-loading the genuinely-ambiguous calls is what keeps the autonomous stretch from producing work the human would have declined. An area the human drops is dropped; a bound the human tightens applies to the whole batch.
  1. From here it is autonomous. After this gate the fleet does not pause per area. The only thing that re-surfaces before FILE-AND-REPORT is an area that hits a genuinely-unforeseen fork mid-flight — and that parks only that one area without blocking the batch. Under --dry-run the skill stops at the end of this phase.

Phase 3: DISPATCH — Worktree Fan-Out With a Concurrency Governor

The lane unit is a CLUMP, not a lone defect. An area still bounds the HUNT, but what leaves DISPATCH as a work unit is a CLUMP: like reproduced defects of one kind over one coherent scope become one fix PR rather than N. Run harness fleet clump-dispatch --input <run.json> over the confirmed clump set: it emits one PR plan per clump and refuses an input that carries no clumps block (exit 14) rather than quietly planning nothing. Each lane then honors the one-PR-per-clump contract — one branch, one PR, one commit per member, the title naming the clump and the body listing every member with its citation. Commit-per-member is not bookkeeping: it is what makes VERIFY's drop a one-commit revert instead of a re-run of the whole lane, which is the only thing that keeps bundling N defects from making one bad defect N times as expensive as it is today. A clump of one is just a defect, and runs exactly as it always did. See docs/reference/fleet-family.md §The clumping floor and ADR 0135.

One worktree-isolated subagent per confirmed area, each running the real per-area hunt pipeline for its one area. It does not hand-reason its way to a conclusion and it does not short-cut the pipeline — the artifacts the pipeline necessarily leaves behind — harness-tdd's committed reproducing test and, for fix items, harness-debugging's session file — are what VERIFY checks for.

  1. HUNT — run the real review machinery over the area's standing code. The adversarial reviewer constructing failure scenarios, plus the security, typescript-strict, and frontend-races reviewers, honoring their own activation set — a non-UI area runs three reviewers, not four. Because that machinery is diff-shaped, four adaptations are explicit rather than assumed:
  1. REFUTE — actively try to prove the candidate cannot occur. For each candidate the hunt surfaced, run an adversarial pass whose goal is disproof: the input is guarded upstream, the branch is unreachable, the type system prevents it, an existing test already covers it. This removes the plausible-but-impossible class before the expensive reproduction attempt, which is the whole reason it earns its place in the pipeline. Every refuted candidate is recorded with its refutation reason so a human can spot-check what was dropped — a silent refutation step is indistinguishable from a lazy one.
  1. REPRODUCE — the real harness-tdd authors a test that must fail observably and deterministically against unmodified code. Run it three times at the pinned base SHA and require a consistent red result. A repro that is red only sometimes is nondeterministic and discarded: a test that fails by chance satisfies red-on-base by chance, and proves nothing about the defect. A candidate that survives refutation but cannot be reproduced within the confirmed attempt budget (default 2) is discarded here — it never reaches VERIFY and is never filed. It is reported as discarded, with its attempts, in the batch summary. harness-tdd persists no session state (state.persistent: false); what it leaves behind is its committed RED cycle — so the reproducing test lands as its own commit (the reproducing-test commit), before any fix commit, and the worker records that commit, the test path, and the observed RED output in its handoff evidence[].
  1. CROSS-CHECK — is this already tracked or already fixed? Check the reproduced defect against open issues and recently-merged fix PRs. An already-tracked or already-fixed defect is annotated already-known and dropped citing the resolving issue or PR — never re-filed. The fleet's whole value proposition is signal quality, and a duplicate-heavy filer is a spammer by another route.
  1. CLASSIFY — tier on fix risk, never on bug severity. Assign exactly one class:

Severity does not enter the classification. A catastrophic bug with a one-line, area-local fix is bounded-safe; a cosmetic bug whose fix rewrites a shared contract is risky-large. Tiering on fix risk keeps the boundary mechanical instead of a judgment call about how bad a defect feels.

  1. FIX — bounded-safe only, via the real harness-debugging. The subagent drives the actual debugging pipeline; it does not hand-patch. One PR per verified bug, so each is independently reviewable and independently revertible. risky-large and security-routed items are never fixed here — their reproducing test is pushed and the item is handed on for FILE-AND-REPORT to route. harness-debugging keeps its session at .harness/debug/active/<session-id>.md and moves it to .harness/debug/resolved/<session-id>.md on resolution, with a Regression test: line naming the test it fixed against. That directory is gitignored and never reaches the PR, so the worker cites the session path in evidence[] and its worktree is kept until VERIFY has read it.
  1. Cap concurrency at the governor (default 2, max ~3) and at the confirmed candidates-per-area cap. This is the machine-storm limit: beyond roughly three concurrent hunt agents the compound load produces flaky failures indistinguishable from real ones — and in a fleet whose entire bar is determinism, manufactured flakiness is uniquely corrosive. Never raise the cap to "go faster."
  1. Record an "assumptions made" note per area — the ranking basis it worked from, the hunt scope it took, the refutation calls it made, and the fix-class call for each candidate. Batch review is only trustworthy when the reviewer can see what was assumed and what was deliberately dropped.
  1. Park the unforeseen. An area that hits a genuinely-unforeseen fork — the area turns out not to be disjoint, an analysis source contradicts another, the hunt cannot proceed — parks that one area and reports it. The other areas continue uninterrupted.
  1. Push-path caveat. A worktree created under a nested agent-config path breaks the local pre-push documentation gate (it self-excludes and scans zero files). Subagents push via the GitHub API or from a non-nested throwaway worktree. Never --no-verify — bypassing the gate defeats the verification the fleet depends on.

Each surviving candidate carries this record forward:

Candidate {
  area,                 // the area it was hunted in
  description,          // the defect, concretely
  originatingReviewer,  // which reviewer surfaced it
  refutation,           // "survived" | "refuted" + reason
  reproduction,         // "reproduced" + test path | "unreproduced" + attempts | "nondeterministic"
  crossCheck,           // "novel" | "already-known" + resolving issue/PR
  fixClass,             // "bounded-safe" | "risky-large" | "security-routed"
  provenance,           // reproducing-test commit (tdd) + .harness/debug/ session path (debugging, fix items)
}

Worker handoff — return the canonical FleetHandoffRecord. When a worker finishes its area it hands the orchestrator exactly one FleetHandoffRecord (from @harness-engineering/types) — the ONE bounded envelope every -fleet member emits, so fleet-command parses any fleet's worker output uniformly instead of special-casing an ad hoc per-worker report shape. The record carries status (done | parked | blocked | failed), fleet, item, a one-line summary, an evidence[] of verifiable pointers (branch, PR, artifact path, CI check — exactly the references VERIFY re-checks), next_steps[], and, for any non-done status, a blocker. The orchestrator validates it with validateFleetHandoffRecord; a malformed or unknown-keyed record is rejected, never silently misread. See the canonical handoff record in docs/reference/fleet-family.md.

Phase 4: VERIFY — Two Independent Proofs, Never Self-Report

One verdict per clump (D10). VERIFY assigns exactly ONE verdict to a clump — never one per member, and never a whole-clump failure for one bad member. A member that fails this phase's standard is dropped by reverting its own commit, and the clump proceeds with the rest, recording the drop and its reason. The clump fails only when the post-drop remainder is empty or no longer builds; a post-drop build that was not run is not a green one, and settles as a failure for want of proof, exactly as a repro that is red only sometimes is discarded rather than counted. Settle it with harness fleet clump-dispatch --input <run.json> --verdict <outcomes.json> --post-drop-build <green|red|unknown>, which exits 13 on a failed clump and refuses a clump nobody reported outcomes for. A verdict read off the pretty output without its exit code is a claim, not a check.

  1. Why two artifacts and not one. The family invariant requires proof the real per-item pipeline ran. The Iron Law additionally requires proof the bug is real. Neither artifact does both jobs: a hand-written test plus a hand-applied patch would sail through a repro check while proving no pipeline ran, and a genuine pipeline run proves nothing about whether the defect it chased exists. VERIFY therefore checks both, independently, for every item. Never accept a subagent's self-report — "reproduced it, fixed it, CI green" is a claim to be checked, not a result.
  1. Provenance — the pipeline actually ran. Check the artifacts the composed skills actually leave behind, never a location neither of them writes:
  1. Repro evidence — transplanted and re-run. Check out the pinned batch base SHA into a scratch worktree, apply only the test file(s) from the item's branch, and run them. Then:
  1. Assign exactly one verdict per item:

Phase 5: FILE-AND-REPORT — Tiered Terminal Act, Never Merge

  1. Run the cross-area dedup backstop. Areas are disjoint by construction, so intra-batch duplicates should not arise — this is a backstop, not the primary defense. Two items describing the same defect collapse into one, with the drop recorded.
  1. One fix PR per verified CLUMP of bounded-safe bugs, each carrying its now-passing reproducing test. One commit per bug inside that PR, so each fix stays independently reviewable and independently revertible — the granularity that makes a bulk review tractable at all is the commit, not the PR, which is precisely why the clump can be the PR without costing the reviewer anything. A clump of one is one bug in one PR, exactly as before. Never merged. The fleet's product is a reviewable batch; landing it is the human's call, optionally via pr-fleet.
  1. Each risky/large bug is filed as an issue, never auto-fixed. Its reproducing test is pushed as a test-only repro/<slug> branch — that naming convention is fixed, so every reproduction branch the fleet emits is findable by the same pattern — and the issue links that branch and quotes the test source so both VERIFY and the eventual fixer can run it without archaeology. The reproducing test proves the defect, not the fix — which is exactly why a fix whose blast radius a bulk review could not hold stays a human decision.
  1. Security-routed findings go to the human, and nowhere else. Report the finding with its reproducing test held on the pushed branch. Never patch it inline — even when the fix looks bounded — and never publish the exploit on a public issue: filing a public reproducing exploit _is_ disclosure. Severity rating, backporting, and disclosure timing are the human's call, and this fleet has no machinery for any of them.
  1. Emit a one-row-per-item batch summary for bulk review:

| Item | Area | Verdict | PR / Issue | Repro test | Assumptions made |

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

Alongside the table, report the counts and the reasons for every non-item outcome: discarded candidates (survived refutation, never reproduced within the budget — with attempt counts), refuted candidates (with their refutation reasons, so the drops are spot-checkable), already-known drops (each citing the resolving issue or PR), and clean areas. Clean areas are reported as clean — a valid outcome, not a failure.

  1. Degrade gracefully. A missing analysis source, a candidate that would not reproduce, or one area's failed hunt is reported while the rest of the batch proceeds. One bad area never sinks the batch, and one empty area is not a bad area.

Harness Integration

Success Criteria

Gates

Escalation

Rationalizations to Reject

| Rationalization | Reality |

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

| "The reviewer is highly confident this is a real bug — file it without a repro" | Confidence is exactly what a hallucinated defect also has. The Iron Law admits one kind of evidence: a test that goes red against unmodified code. No repro ⇒ discarded. |

| "The repro only fails sometimes — a failure is a failure" | A test that fails by chance satisfies red-on-base by chance. Nondeterministic repros are discarded; otherwise the bar admits noise and the whole batch stops being trustworthy. |

| "The test errors at the base SHA because the helper doesn't exist there — close enough" | Erroring is not asserting. A test that cannot load against unmodified code depends on the fix; it proves nothing about the defect. That is a rejection, not a pass. |

| "This bug is severe, so fix it even though the fix spans five modules" | Tier on fix risk, never on severity. The repro proves the defect, not the fix — a five-module change is exactly the blast radius a bulk review cannot hold. File it with its repro. |

| "I found a security hole with a clean repro — file the issue so it gets attention" | Filing a public reproducing exploit _is_ disclosure. Security-routed findings go to the human with the repro held on the branch; timing and severity are not this fleet's call. |

| "The area is large but I'll just review the interesting files" | Cherry-picking silently converts a whole-area hunt into a guess, and the un-reviewed files are where an un-hit defect most likely lives. Split the area to the size bound instead. |

| "MECHANICAL is red from a pre-existing failing test, so this area is un-huntable" | For standing code, a red mechanical result is informational — and it is itself a lead. Record it and hunt on; halting here would make any repo with one red test permanently unswept. |

| "No defect here — but a sweep with nothing to show looks like a wasted run" | A clean area is a valid, valuable result: it tells the human where the risk is not. Manufacturing a marginal item to fill the report is the failure the Iron Law exists to prevent. |

| "I'll hand-write the failing test and the patch; driving tdd/debugging is slower" | Hand work leaves no provenance, so VERIFY rejects it — and it breaks the guarantee that every item ran the audited pipeline. Dogfood the real skills; the artifacts are the evidence. |

| "It's already tracked but my repro is better — file it anyway" | An already-known defect is dropped citing the resolving issue or PR. A duplicate with a nicer test is still a duplicate, and a duplicate-heavy filer is a spammer by another route. |

Red Flags

| Flag | Corrective Action |

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

| "I'll mark it verified based on the subagent's summary" | STOP. Independently check provenance, re-run the transplanted repro at the pinned base, and read CI. A summary is not a verification. |

| "This finding is obviously real — file it even though it never repro'd" | STOP. No repro, no bug. Discard it and report it as discarded; do not launder a suspicion into the tracker. |

| "The fix touches a shared contract but it looks contained — just apply it" | STOP. That is risky-large. File the issue with its repro/<slug> branch; the fleet auto-applies only the bounded-safe class. |

| "I've got a clean security repro — let me put it on the issue" | STOP. Never publish the exploit. Route it to the human with the repro held on the pushed branch; disclosure is not the fleet's decision. |

| "The pre-push gate is failing in this worktree — I'll --no-verify" | STOP. Never bypass. Push via the GitHub API or a non-nested worktree; the gate is part of the verification the fleet's guarantees rest on. |

Examples

Example: A five-area proactive sweep

$ harness skill run bug-fleet --concurrency 2

Phase 1: SELECT
  Composed analyses:
    hotspot-detector  -> 9 high-churn/high-coupling hotspots
    critical-paths    -> 4 paths flagged (auth, billing, sync, export)
    impact-analysis   -> blast radius per module (top: sync/, 31 dependents)
    churn pass        -> top-10% files identified (90-day window)
    test-advisor      -> coverage depth: sync/ 34%, export/ 41% (risk multiplier)
  Folded into 5 disjoint areas, each within the 40-file / 4,000-LOC bound.
  Scored by churn x blast-radius x critical-path x inverse-coverage; ordered.

Phase 2: CONFIRM  [checkpoint:human-verify]
  Ranked areas (5) presented with risk basis.
  Pinned base SHA: 4f2c9ab. Concurrency: 2. Area bound: 40 files / 4,000 LOC.
  Candidates/area cap: 8. Reproduction-attempt budget: 2.
  Fix boundary confirmed: bounded-safe auto-fixed; risky-large + security filed.
  Human drops 1 low-risk area -> batch = 4.

Phase 3: DISPATCH (governor = 2)
  area sync/       HUNT 6 candidates -> REFUTE 3 (guarded upstream x2, unreachable x1)
                   -> REPRODUCE 2 of 3 (1 discarded: budget exhausted)
                   -> CROSS-CHECK: 1 already-known (resolving issue cited), 1 novel
                   -> CLASSIFY bounded-safe -> FIX via debugging
  area export/     HUNT 4 -> REFUTE 1 -> REPRODUCE 2 (1 nondeterministic, discarded)
                   -> CROSS-CHECK novel -> CLASSIFY 1 bounded-safe, 1 risky-large
  area auth/       HUNT 3 -> REFUTE 1 -> REPRODUCE 1 -> CLASSIFY security-routed
  area billing/    HUNT 5 -> REFUTE 5 -> no candidates survived -> CLEAN

Phase 4: VERIFY (independent — no self-report)
  sync/ off-by-one window   provenance OK; base 4f2c9ab -> assertion failure;
                            branch green; suite green; CI green 3 OS -> verified-fix
  export/ CSV quote escape  provenance OK; base -> assertion failure; branch green;
                            CI green 3 OS -> verified-fix
  export/ encoding rewrite  provenance OK; repro red at base on repro/export-encoding;
                            fix spans 3 modules -> verified-issue
  auth/ token replay        provenance OK; repro red at base -> security-routed
  sync/ retry storm         base run -> MODULE NOT FOUND (test imports new helper)
                            -> REJECTED (retried once, same) — depends on the fix

Phase 5: FILE-AND-REPORT
  Cross-area dedup backstop: no duplicates (areas disjoint).
  | Item                    | Area    | Verdict         | PR / Issue | Repro test        | Assumptions made              |
  | ----------------------- | ------- | --------------- | ---------- | ----------------- | ----------------------------- |
  | off-by-one window       | sync/   | verified-fix    | PR link    | sync window spec  | churn-ranked; area-local fix  |
  | CSV quote escape        | export/ | verified-fix    | PR link    | csv escape spec   | contract unchanged            |
  | encoding rewrite        | export/ | verified-issue  | issue link | repro/export-encoding | 3-module reach -> risky-large |
  | token replay            | auth/   | security-routed | (withheld) | on branch only    | reported to human, not filed  |
  | retry storm             | sync/   | rejected        | —          | —                 | errored at base, not asserted |
  Discarded 2 (budget exhausted x1, nondeterministic x1). Refuted 10 with reasons.
  Already-known 1, dropped citing the resolving issue. Clean areas: 1 (billing/).
  Never merged. 2 fix PRs + 1 issue handed to the human for bulk review.

Example: Rejecting an item whose repro errors at the base

A subagent returns a branch and reports "reproduced and fixed the retry storm — test red before, green after." VERIFY checks out the pinned base SHA, applies only the test file, and runs it: the test fails with a module-resolution error, because it imports a retry helper that the fix introduced and that does not exist at the base. That is not a reproduction — the test depends on the fix, so it proves nothing about whether the defect existed. Per the Iron Law and the Gates the item is rejected (retried once, same result), and the batch's other verified items proceed to FILE-AND-REPORT unaffected.

Test Scenarios

Scenario 1: Gate — an unreproduced but "obviously real" finding is filed anyway

The adversarial reviewer surfaces a null-dereference in a rarely-taken branch and rates it high confidence, but harness-tdd exhausts the reproduction budget without producing a failing test. Expected: the "no filing without a deterministic reproducing failing test" Gate discards the candidate and reports it as discarded with its attempt count. Filing it on the strength of reviewer confidence — the "the reviewer is highly confident" rationalization — is the failure this scenario guards against.

Scenario 2: Gate — a repro that errors rather than asserts at the pinned base is accepted

An item's reproducing test fails at the pinned base SHA with an import error, because it references a helper the fix added. Expected: the "compile/import/resolution error is a rejection, not a pass" Gate rejects the item rather than marking it verified; it is retried once and then reported as rejected. Accepting erroring-as-red — the "close enough to red" rationalization — would admit items whose test proves nothing about the defect.

Scenario 3: Gate — a security-routed candidate is patched inline or filed publicly

A hunt reproduces a token-replay vulnerability whose fix looks like a one-line change inside the area. Expected: the "never patch a security-routed finding inline, and never publish its exploit" Gate stops both the inline fix and the public issue; the finding is reported to the human with the reproducing test held on the pushed branch. The "clean repro, file it so it gets attention" rationalization is rejected — filing the exploit publicly is itself disclosure.

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