spec(dspy-driver): the driver gets its own spec, measured by example

The open work of hunter-learning-loop (4.1, 6 and the group 7 of the same day)
moves to dspy-driver as D1 to D10. The brief maps the driving in seven stages and
orders the experiments E0 to E6. The abstract interpretation is wired in before
anything is measured: the prover's trace and Joern's results are not inputs of the
driver today. HarnessX is gone from the tree, and the four plane modules the ledger
suspected are still imported.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Marius Ciepluch
2026-11-30 09:51:09 +01:00
co-authored by Claude Fable 5.2
parent 1a9865496b
commit e3f2f608d5
21 changed files with 277 additions and 83 deletions
+6 -44
View File
@@ -93,48 +93,10 @@
- Done when the measurement record exists with the before-and-after table and the instrument proof for every change
- _Requirements: 7.3, 7.4, 7.5, 8.1, 8.2, 8.3, 8.6_
## Amendment of 2026-11-30: the driver on the trace (roadmap line 1)
## Amendment of 2026-11-30: the open work moves to `dspy-driver`
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.
Maintainer decision of 2026-11-30 (`.kiro/steering/roadmap.md`, top section). The driver gets a spec of its
own, `.kiro/specs/dspy-driver/`. This spec keeps what it delivered (the feature table, the paired ablation,
the proposer, the acceptance rule) and takes no new work. Its open tasks move: 4.1 is D6 there, 6 is D10,
and the group 7 that was added here earlier the same day (commit `1a98654`) is D2 to D5 and D7 to D9. The
boxes of 4, 4.1 and 6 stay unticked here as the record; they are not this spec's to close.