Research log

Tripwire started as a research question: can a small model, trained on public agent trajectories, flag a risky tool call early enough and cheaply enough to sit in an agent's loop? The measured answer is in the evaluation: partly, and not reliably enough to gate on. That finding shaped the product, where deterministic policy and owner approval make the decision and the model only adds a reason to review.

Pipeline

StageCodeNotes
Importtripwire/research/importers/AgentDojo v1.2.2 trajectories to a common schema (data notes)
Labeltripwire/research/rubric.pyDeterministic rubric decide(Facts) producing allow / needs_approval / block (taxonomy)
Check labelstripwire/research/llm_label.py, agreement.pyLLM rater agreement on a 600-example gold sample; never described as human labels
Splittripwire/research/split.pyGrouped by task template; held-out injection tasks; v3 is current
Featurizetripwire/features.pyOne featurizer for training, evaluation and serving, version-pinned with a golden file
Baselinestripwire/research/baselines.pyRules and TF-IDF + logistic regression
Encoderskaggle/train_encoder.pyDeBERTa-v3 small/base fine-tuned on Kaggle GPUs; predictions committed under models/
Evaluatetripwire/research/eval.py, metrics.pyThreshold chosen on dev, template-clustered bootstrap intervals, calibration, obfuscation suite, cost-matrix view
Exportscripts/export_local_model.pyTF-IDF/LR to portable JSON that the gateway and browser run without scikit-learn

Run tripwire-research --help for the command-line entry points.

Principles

  1. No number without a logged run: date, commit, hardware, command, input size, raw result, limits.
  2. Choose thresholds, checkpoints and calibrators on dev. Read test once.
  3. Report failures as results.
  4. Quote intervals that resample the unit of correlation (task templates).

Decisions

Architecture decision records live in docs/ADR. The ones most useful for understanding the project: 0004 split by template and hold out families, 0008 featurizer and evaluation protocol, 0011 guard release, 0012 enforced capabilities, 0014 fusion and operator inbox.

LLM labelling backend

An OpenRouter client labels examples with a cheap model (GLM-5.3-Flash); a measured provider validation and its cost are in the OpenRouter report and ADR 0009 and 0010. Tests use a fake client and never spend money.

Other records

EVIDENCE.md is the chronological log of every measured run. DESIGN.md holds the original design, invariants and milestone checklist. The model card describes the shipped classifier.