API Reference

Scanning

Mine feedback events out of transcripts, incrementally.

scan.scan()

Scans transcripts under roots for feedback, incrementally.

scan.ScanReport

The outcome of one scan pass.

Detection

The signal detectors and the candidate shape they emit.

detectors.detect()

Runs every detector over one transcript’s events.

models.FeedbackCandidate

A single piece of developer pushback extracted from a transcript.

models.dedup_key()

Returns the stable dedup key for parts.

Storage

The feedback event store.

store.FeedbackStore

Persistent store for collected feedback over the native mining engine.

Retraining

The weekly retrain lanes — gate and watcher — and their promotion machinery.

retrain.lexical.retrain_gate()

One gate retrain pass; returns the journaled one-line verdict.

retrain.watcher.retrain_watcher()

One watcher retrain pass; returns the journaled one-line verdict.

retrain.watcher.WatcherRecipe

Every knob of one watcher LoRA retrain, validated at parse so no degenerate value trains.

retrain.watcher.register_watcher_adapter()

Register (and by default promote) a built mlx-lm adapter as the watcher component.

retrain.watcher.seed_incumbent_probs()

Validate an external incumbent probs cache against the frozen frame, then write it through the store.

retrain.evalset.freeze_eval()

Copy the exported <view>/test.parquet into the eval root and merge its sha256 manifest.

retrain.evalset.freeze_steer_type()

Build then freeze the steer-type eval; returns the frozen file’s sha256.

retrain.evalset.freeze_pick()

Build then freeze the pick-prediction eval; returns the frozen file’s sha256.

retrain.evalset.EvalFrame

The frozen watcher eval as the arrays the promotion gate reads.

retrain.evalset.SteerTypeFrame

The frozen steer-type eval as the arrays a category classifier is scored on.

retrain.evalset.PickFrame

The frozen pick-prediction eval as the arrays an option classifier is scored on.

retrain.promotion.corrected_gate()

Evaluate the corrected paired gate over common rows at matched budget.

retrain.promotion.GateResult

The corrected paired gate over a candidate and incumbent at matched budget.

retrain.promotion.Verdict

One promotion decision: whether to promote and the human-readable reason.

Many-shot watcher

Score the frozen frame through a byte-constant, cache-amortized many-shot exemplar prefix.

retrain.manyshot.build_exemplar_system()

The byte-constant many-shot system prompt: seeded demonstrations under budget_chars.

retrain.manyshot.score_frame()

Score the frozen frame with a cached many-shot prefix and store its P(NO_STEER).

Encoder gate

Fine-tune a transformer encoder as the stage-1 gate and score it paired on the frozen gate frame.

retrain.encoder.EncoderSpec

Recipe for one encoder gate arm: the base model plus its fine-tune and calibration knobs.

retrain.encoder.EncoderModel

A fine-tuned encoder head plus its fitted temperature and held-out calibration error.

retrain.encoder.train_encoder()

Fine-tune the encoder head on train_frame, temperature-scaled on a held-out val carve.

retrain.encoder.score_frozen()

Score the frozen gate eval and persist the calibrated P(fire) through write_probs.

Instrument

Paired fast-DeLong AUC comparison and the instrument-card decision rule.

instrument.delong_se()

Return the DeLong standard error of a single AUC.

instrument.paired_delong()

Compare two score vectors on identical labels with a paired fast-DeLong test.

instrument.PairedDeLong

Result of a paired fast-DeLong comparison of two score vectors on shared labels.

instrument.bootstrap_ci()

Nonparametric bootstrap 95% CI of the AUC (E27 harness resampling).

instrument.mde()

Minimum detectable effect for a two-sided z-test at the given standard error.

instrument.actionable()

Apply the instrument card’s two-part actionability rule to an AUC delta.

instrument.InstrumentCard

The measurement-instrument card: the frame noise floors comparative verdicts consult.

instrument.Comparison

A card-governed comparative verdict between two checkpoints’ AUCs on one frame.

instrument.paired_verdict()

The card rule over a paired DeLong record — the production comparative verdict.

instrument.unpaired_verdict()

The card rule when a counterpart’s per-row probs were never persisted.

retrain.sweep.ArmScore

One arm’s frozen-frame measurement: the scalar metric and the per-row probs behind it.

retrain.sweep.compare_score_reports()

Card-governed verdict between two arms’ score reports — paired DeLong as the production default.

Decisions

Mine AskUserQuestion decision rounds from transcript trees into a parquet dataset.

decisions.mine()

Mine every AskUserQuestion decision round under root.

decisions.DecisionRow

One AskUserQuestion round: the question, its options, and the user’s pick.

decisions.MineResult

The mined decision rows and the quarantined, un-typed uses.

decisions.Quarantine

An AskUserQuestion use whose result carries no typed rounds.

decisions.write_decisions()

Write the mined rows to out as parquet, stamping the digest and quarantine count.

decisions.read_decisions()

Read a decisions parquet back into rows, its digest, and its quarantine count.

decisions.stats_of()

Aggregate mined rows into the counts the decisions stats command prints.

decisions.DecisionStats

Aggregate counts over a decisions dataset.