- Diff hunks at head with on-changed-line and distance; enclosing function, span, callers, entry points from the source facts; roles, def-use and obligations from the semantic facts; the closed family list with one-line definitions
- An annotation a producer cannot compute is recorded as absent with a reason, never defaulted
- Done when a fixture repository yields every column, and a repository with a planted advisory id and a security-worded commit message yields no feature carrying either
- Fix-site rows of positives label 1 with the change's family and fix span; ordinary-push rows label 0; other rows on a positive label null and are excluded from scoring
- Each positive row carries the verification record reference next to the label; a row whose source cannot be traced is rejected
- Done when a fixture manifest with one positive and two ordinary pushes produces the expected labels and the null rows are excluded
- Inputs are the rendered unmasked feature columns plus the hunks; the output is the classifier's answer structure with a family from the closed list and cited lines inside the shown text
- The tool loop is bounded by the run budget; an answer outside the vocabulary or citing unseen lines is recorded unknown
- Done when a scripted model drives the program through the tools on a fixture and the parsed findings match the fixture's expectation
- A suspicion within the scorer's tolerance of the fix site with the right family counts as a hit; ordinary-push suspicions are counted per push; the feedback text names the missed site or the off-diff suspicions
- Done when the metric reproduces the pilot's hit list for the 12 positives from their recorded suspicions
- Program id, schema version, mask, data digests, every scored configuration, spend, calls, replay hits, wall time, library versions; the saved program and its cache directory travel with it
- A run that exhausts its budget writes no artifact and reports the spend so far
- Done when two identical runs produce the same artifact id and a budget-exhausted run leaves only the partial report
- The runner takes a program artifact and a mask, computes the table rows for each change at head, renders the inputs, runs the program and writes the same record shape as today, resumable by change id, input digest, program id and mask
- The pilot manifest is refused by digest unless the run is explicitly a pilot report run
- Done when a run over a five-change fixture manifest with the scripted model writes records the existing scorer accepts
- The baseline instruction equals today's hunter prompt plus the hunks; one live, budgeted run over the 12 positives only, as a pilot report run
- Done when the search metric over the new records is compared with the pilot's recorded hunter hits and the difference is explained in the measurement record
- _Requirements: 8.1, 8.4, 8.5, 8.6_
- _Depends: 2.2, 2.3_
- [ ] 4. Core: the training set, folds and ablation
- [ ] 4.1 Source the training set apart from the pilot
- About one hundred advisories through the fix-site catalog and verifier, pilot repositories excluded, at least 40 accepted positives across two languages, 20 ordinary pushes per positive from the same repositories; the sourcing run is recorded
- Done when the frozen training manifest lists its positives, negatives, languages and the pilot exclusion check
- Compile folds and held-out folds by repository group; the leak audit runs over every feature column and reports any that separates positives from negatives on its own
- Done when the folds are disjoint by repository and the audit report lists each column with its separation score
- A manifest fixes the table digest, the masks, the folds, the metric, the sample size, the budget and the decision rule before anything runs; each arm runs over the same changes with the same program and sampling
- Results per arm carry the paired effect on search recall and suspicions per ordinary push, per family and pooled, with intervals from the repository-clustered bootstrap and a paired test
- Done when an ablation over a fixture manifest with the scripted model yields two arms, the paired statistics, and the full recall-against-suspicions curve
- For every annotation, its effect when removed from the full set and when added to the baseline, with intervals and counts; an annotation stays only on a held-out effect whose interval excludes zero or when a kept annotation needs it; one that raises suspicions without raising recall is dropped and recorded
- Done when the table is written for a fixture ablation and the rule's decisions match the fixture's expectations
- A training repository later found in the pilot or in a benchmark report marks every run that used it as contaminated and excludes those runs from any gain
- Done when a fixture run is marked contaminated after its repository is added to a report list
- One change per round: an instruction proposal, a demonstration set, or a mask; proposals score on compile folds with the search metric; the proposer never sees held-out results; rejected candidates stay visible to the next round
- Done when a round on a fixture produces a candidate with its compile-fold score and the proposer's inputs are shown to exclude held-out data
- Compile-fold and held-out results per family; accepted only when both are non-negative, one strictly positive, no family below its regression budget, instruction under the length cap; ties rejected; the comparison is recorded in the new artifact
- Done when every clause of the rule has a synthetic fold-result test that flips the decision
- Same scorer and metrics as the pilot; before-and-after of search recall, suspicions per push, push-level recall, false alarms per 100 and precision, per family, with intervals; the proof arm's workload per 100 pushes; the gate distance read off the curve; the run recorded next to the pilot's measurement, at most once per accepted program
- Done when the measurement record exists with the before-and-after table and the instrument proof for every change
## Amendment of 2026-11-30: the driver on the trace (roadmap line 1)
Maintainer decision of 2026-11-30 (`.kiro/steering/roadmap.md`, top section): "for me it's prio that the
driver (augmented by abstract interpreation and wrapped into probablistic dspy loops) finds bugs I want to
avoid". This spec is the driver's spec and is active again. The correction of 2026-10-14 is narrowed: the
driver may be compiled on compile folds of training repositories; admission and evaluation populations never
train; software shape features alone decide nothing. Tasks 4.1 and 6 stay open as written. Group 7 is new.
Requirements and design do not yet say this: run `/kiro-spec-requirements hunter-learning-loop` and
`/kiro-spec-design hunter-learning-loop` for the amendment before group 7 is implemented beyond 7.1 and 7.2,
which only measure what exists.
- [ ] 7. The driver reads the abstract interpretation and runs as a probabilistic DSPy loop
- [ ] 7.1 Put the trace into the driver's input
- The prover's ordered trace for a changed location (entry, request-derived arguments with provenance, the protected operation, the guards and whether one dominates) and the engine's facts for it become one annotation of `HuntProgram`, beside the diff hunk; a location with no trace says so with its cause, and is not dropped
- Done when the driver runs on a fixture change with and without the annotation and the record shows the trace bytes it was given, nonzero
- _Carried from: reachability-flow-model 4.1 (path context for the hunter)_
- [ ] 7.2 Baseline: the driver with and without the trace on the training pool (roadmap N1)
- Same changes, same program and same sampling for both arms over `benchmarks/valid/train/pool-train.toml`, through the paired ablation of 4.3; search recall and suspicions per ordinary push, per family and pooled, with intervals; the record proves nonzero input for every change
- Paid: needs the maintainer's spend ceiling before it starts
- Done when the measurement record exists under `benchmarks/measurements/` in the fixed schema of `detection-quality.md` rule 3
- _Depends: 7.1_
- [ ] 7.3 Sample the driver and score by agreement
- Each question is asked k times; a location's score is the share of samples that name it; k, the temperature and the model version are fixed in the manifest before the run; the score orders suspects and never establishes a defect
- Report top-K recall per push (K = 1, 3, 5) of the true vulnerable function among the changed functions
- Done when a fixture run with the scripted model yields the scores, and the top-K metric is reported beside search recall
- _Carried from: learned-decision-engine 17.1, 17.2 (the triage objective)_
- [ ] 7.4 Compile the loop on training repositories (roadmap N3)
- The proposer of 5.1 and the acceptance rule of 5.2 over the training set of 4.1; instructions and demonstrations only, chosen on compile folds, never on held-out folds or an admission population
- Every accepted program passes the reversed-pair probe of `src/openultrasast/core/probes.py` before any admission read; a program that separates reversed fixes by diff shape is rejected and recorded
- Done when one accepted or rejected candidate exists with its compile-fold and held-out results and its probe result
- _Carried from: learned-decision-engine 16 (the jointly optimised LLM program)_
- _Depends: 4.1, 7.2, 7.3_
- [ ] 7.5 The driver judges intent and raises no evidence
- Where the trace shows an operation with no dominating check, the driver says whether the entry is meant to be open, as a ranked opinion; it cannot turn a suspect into a finding. A finding needs the trace's own rule or a demonstration
- Done when a test shows a driver opinion changes the order of suspects and never their evidence class
- _Carried from: authorization-obligations 3.3_
- [ ] 7.6 Hand the top suspects to the proof arm
- The top-K suspects of a push go to `search-with-proof` as starting intents, with the trace; the record carries the proof arm's workload per 100 pushes
- Done when one training-pool change runs driver to search on a fixture executor and the handoff record names the suspect, the trace digest and the search outcome
- _Depends: 7.3; search-with-proof 7.1_
Folded into 4.1 from `contributor-scan` 5.2: the training set holds vibe-code pairs, and at least one of them
as a whole repository. The maintainer named them on 2026-11-30: the families are access control and path
traversal; the repositories are AI-written web applications, Express/TypeScript and FastAPI/Python. This
narrows 4.1's "two languages" to TypeScript and Python. The spend ceiling for 7.2 is 10 USD.