Skip to main content

Keep prompts in sync when model or eval data changes — Poetry-style lock regeneration, Dependabot-style PRs.

Project description

driftless

Poetry-style lock regeneration for prompts — delivered Dependabot-style.

A prompt is pinned to a model and an eval dataset (like pyproject.toml declares deps and poetry.lock pins what works). When either moves, the prompt goes stale. driftless re-derives it through your real eval, validates on holdout, and opens a PR with evidence.

Also described as Dependabot for LLM models — same automation shape, different core insight: prompts are lockfiles, not just config files.

Status: early development. See IMPLEMENTATION_PLAN.md.

Install (dev)

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Quickstart

driftless init            # scaffold a driftless.yml
driftless validate -w support_classifier   # contract parses + harness runs

How it works

You describe your model-dependent workflow once in driftless.yml: how to run it, how to override the model, which files may be edited, and what quality thresholds must hold. driftless orchestrates your workflow under different models, compares results, repairs allowed files, validates on holdout, and opens a PR with the evidence.

The customer owns the workflow. The tool orchestrates it.

Not a classifier? Choose a grading mode that fits the task — the same loop then optimizes against it, with your team owning the definition of "good":

  • eval.score_field / eval.pass_field — your command emits a numeric score or a pass/fail per record (works for any task: summarization, codegen, agents).
  • eval.fields — structured extraction, scored per field with precision/recall/F1 against the gold record.
  • eval.judge — an LLM judge grades each free-form output against a rubric (with an optional human-scored calibration set for a judge-agreement check).

CLI

Command Purpose
init Scaffold a driftless.yml.
init-policy Scaffold a .driftless/policy.yml (when to migrate).
scan Find probable LLM usage and at-risk models.
plan Discover at-risk workflows and apply the migration policy (CI triage).
plan --act Migrate + open a PR/issue for every actionable trigger (close the loop).
configure <workflow> Turn a detected workflow into a migration-ready contract.
calibrate -w <w> Measure the baseline and suggest starting thresholds.
compare -w <w> --to <model> Baseline vs target scorecard.
migrate -w <w> --to <model> Repair + validate + produce migrated files.
refine -w <w> Re-optimize the prompt for a changed eval dataset (model pinned).
poll [--act] Detect external eval-dataset changes and refine on a meaningful change.
validate -w <w> Check the contract parses and the harness runs.
report Render the latest migration report.
view Open the optimization run viewer (charts + attempt log).
open-pr -w <w> Open a PR (or issue) from the latest migration result.

Configuring when to migrate

plan reads an optional .driftless/policy.yml — the "dependabot.yml" layer. Scaffold it with driftless init-policy; every field matches a default, so an empty file behaves like no file. It controls which triggers are enabled (deprecation is on and forced; cost/quality/new_model are opportunistic), the thresholds a candidate must clear (min_savings_pct, min_gain), a cooldown_days to skip freshly-released models, candidate allow/deny globs, and an ignore list to snooze specific models or moves. The engine still decides whether a candidate actually passes your eval — policy only decides whether to propose it.

GitHub-native usage

A composite GitHub Action (action.yml) wraps the CLI so scans and migrations can run in CI. See .github/workflows/ for a scheduled deprecation scan and a manually-triggered migration that opens a PR (or an issue when blocked).

- uses: driftless/action@v1
  with:
    command: scan

Documentation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

driftless-0.1.0.tar.gz (179.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

driftless-0.1.0-py3-none-any.whl (127.8 kB view details)

Uploaded Python 3

File details

Details for the file driftless-0.1.0.tar.gz.

File metadata

  • Download URL: driftless-0.1.0.tar.gz
  • Upload date:
  • Size: 179.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for driftless-0.1.0.tar.gz
Algorithm Hash digest
SHA256 86a4683d43326bd46c88e4de0006dad67d39e3d6de6cf3a7bfa4811218f9c583
MD5 07d372d8790eaada8291a42d49b84360
BLAKE2b-256 70bd7a3ce8b98e18f52d6c600b01e48d7a1aa0105f49433dbe9dbe7b6662a09d

See more details on using hashes here.

File details

Details for the file driftless-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: driftless-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 127.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for driftless-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7fbf9d997d7546e71edc376122f782899ce6c0604ac69ee06a0af6691f59b373
MD5 cbe0cc60c66abcdd2e44f79b68ae81d7
BLAKE2b-256 5e28973e522770862f9621ef7a71e2b02dc5499acba9fb97bed1d5d998b32466

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page