Static mutation-exposure analysis — which changed behavior your tests run but don't actually check.
ripr shows your agents where tests are needed and which tests are too weak to trust — without running mutation testing.
- For installation with Cargo: Rust ≥ 1.95 (Rust 2024 edition) and Cargo.
Check with
rustc --version; update withrustup update stable. Prebuilt binaries do not require a Rust compiler to install; running Rust tests still requires the project toolchain. - Git on your
PATH. - Run Git-based checks from your project's checkout, with at least one
commit. Choose the diff scope explicitly below;
ripr.tomlis optional.
This README follows the current source tree. Check ripr --version and
ripr check --help when using an installed release. Prebuilt archives and
checksums are available on GitHub Releases.
See the changelog for release-specific changes.
The agent loop is a simple three-step flow:
gap → fix → verify
ripr names a gap (changed behavior lacks a focused assertion or discriminator)
the agent adds one focused test
ripr records whether the gap improved, closed, or still needs attention
You work in five key terms. Everything else in this README and the reference docs expands on them:
| Term | One-line meaning |
|---|---|
| gap | a place where static evidence suggests a focused assertion may be missing or weak |
| card | the per-gap unit an agent acts on — what to assert, where, and why the current evidence is weak |
| packet | the bundle of evidence and guidance for one change (a bounded, test-only work order) |
| verify | re-check static evidence after the test edit; run the focused test separately |
| receipt | the durable before/after record of what was checked and what remains uncertain |
cargo install ripr --locked
ripr --version
# From your project's repository root: capture staged and unstaged tracked edits.
git diff --no-ext-diff --submodule=short --output=ripr-local.diff HEAD -- && ripr check --diff ripr-local.diff--locked uses the published dependency lockfile, avoiding incompatible
transitive dependency updates during installation.
The saved-diff recipe also works with the published 0.10.0 CLI. Regenerate
ripr-local.diff after editing files. If ripr check --help lists
--worktree, the equivalent shortcut is ripr check --base HEAD --worktree.
The && runs RIPR only if Git successfully writes the patch.
For a committed branch change, use ripr check --base origin/main instead
(replace origin/main with your target branch). That compares the merge base
with HEAD; it excludes staged and unstaged edits. --worktree compares the
chosen base directly with the tracked working tree. Neither path includes
untracked files. See choosing a diff scope
for the complete command table and empty-result recovery.
ripr check is the ordinary first-value command. Current source builds return
one bounded Start here: route — a named state, one selected
gap or safe next action, the omitted-finding count, and explicit pointers to
--format human-full for exhaustive evidence and --format json for machine
data. On older releases without human-full, use
ripr check --diff ripr-local.diff --json to inspect the saved-diff findings.
ripr.toml is optional; the zero-config run is the intended first interface.
An exit code of 0 means the command completed; findings and limitations can
still be present. Read the reported scope and next action before treating an
empty result as useful evidence. Exit codes explains the
separate analysis and policy decisions.
For any release, use the finding to write one focused test, run that test,
regenerate the patch, and re-check the same scope. On current source builds,
use the dedicated two-phase transaction below. Use these commands only when
ripr agent repair --help lists the before/after phases and --attempt;
the published 0.10.0 CLI does not have this subcommand.
ripr agent repair --root . --seam-id <seam-id> --phase before
# edit one focused test outside ripr
ripr agent repair --root . --attempt <repair-attempt-id> --phase afterThe before phase prints the exact --attempt command to run after the test
edit. Keep that command: its repair-attempt ID identifies the prepared
transaction. See repair attempt identity for
continuation and recovery.
RIPR owns the before/after evidence plumbing. The human or external coding agent
owns the focused test edit. ripr pilot --root . remains the guided
repository-adoption workflow. ripr first-pr --root . --base origin/main --head HEAD composes existing artifacts into PR-facing evidence; it is not the
analyzer or repair driver.
See the public command hierarchy for the stable task boundaries.
Internal vocabulary and capability detail live here and below. The first screen above is all a new user or agent needs to start.
ripr reads a PR diff and tells your reviewers and coding agents which changed
behavior the current tests reach but don't actually check — the question
mutation testing answers, asked at draft time without running a single mutant.
Where a test would not catch the change breaking, it routes one focused,
test-only repair: what to assert, where, the command that verifies it, and a
before/after receipt.
coverage: did this line run?
ripr: would any test notice this changed behavior breaking?
mutation testing: did a test fail when a real mutant ran?
ripr is static and advisory. It does not run mutants, report killed or
survived, replace coverage, or claim correctness or test adequacy. It names
the changed behavior that lacks a discriminator and the next test to add; a real
mutation runner like cargo-mutants confirms it under execution when the change
is ready. Coverage stays the execution-surface signal; ripr is the cheaper
draft-time question between them.
| Term | What it is |
|---|---|
| gap | a changed behavior whose static evidence suggests a missing or weak assertion, with a stable canonical ID |
| card | the repair guidance — what to assert, where, and why the current evidence is weak |
| packet | a bounded, test-only work order for a human or agent: allowed files, forbidden files, stop conditions |
| verify | the static re-check after a test edit; the supplied test command (cargo test …, pytest …) runs separately |
| receipt | the before/after record of static evidence movement; runtime test results are separate |
Illustrative bounded output from the current source's ripr check --format human
(paths shortened; older releases use different presentation):
Start here:
State: top_gap
Safe next action: inspect or repair the selected non-exposed gap; this is static advisory evidence only.
File: src/lib.rs:2
Static exposure: weakly_exposed (warning, confidence 0.92)
Why weakly_exposed: the evidence path is partially complete — see full form for details
Changed behavior: if amount >= discount_threshold {
Missing discriminator: amount == discount_threshold
Related test: tests/pricing.rs:4 below_threshold_has_no_discount
Next step: Add boundary tests for below, equal, and above the changed threshold with exact assertions.
Evidence:
- reach yes: Related tests appear to reach discounted_total: below_threshold_has_no_discount, far_above_threshold_discounts
- infection weak: Related tests contain input values, but the equality-boundary discriminator is missing
- 12 more evidence line(s) hidden
Next: drill into the top finding:
ripr explain --root . --diff diff.patch --mode fast probe:src_lib.rs:predicate:c80557eb
ripr context --root . --diff diff.patch --mode fast --at probe:src_lib.rs:predicate:c80557eb
More:
Full evidence: rerun with --format human-full
Machine data: rerun with --format json
When lower-priority findings were omitted, that last block instead reads:
Hidden:
12 lower-priority finding(s) omitted from default human output.
Full evidence: rerun with --format human-full
Machine data: rerun with --format json
The wording is intentionally conservative: static analysis identifies evidence and gaps; it does not claim runtime mutation outcomes.
| You are a… | First action | Doc |
|---|---|---|
| VS Code user | Install EffortlessMetrics.ripr, open a Rust workspace, use the status bar, Problems, and hover evidence. |
Quickstart |
| CI owner | ripr init --ci github for an advisory PR summary and artifact packet. |
Quickstart |
| CLI user | Create the local diff above, run ripr check --diff ripr-local.diff, and inspect the finding or limitation. |
Quickstart |
| Agent operator | Inspect a finding, add and run a focused test, then re-check; use the repair transaction when the installed CLI supports it. | LLM operator guide |
The Rust/Cargo gap-repair transaction is usable alpha: its fixture, package,
editor, bounded test-only packet, and before/after receipt paths are proved when
a valid route exists, while governed real-repository route yield and
ordinary-user success remain unestablished. Python repair-routing is usable alpha for selected pytest/unittest workflows (repair cards, verify commands,
bounded agent packets, before/after receipts); TypeScript is an opt-in
preview. ripr is advisory static analysis — not a merge gate and not a
mutation runner. Perl repair routing is preview/advisory; its next
checkpoint is dogfood/perl-real-repo-evals-v2 before any usable-alpha
claim. This README is
a front door, not the metric source of truth: see
Support tiers for what is usable, preview, or
advisory, and the Capability matrix and
Metrics for detailed state. ripr-swarm is the development trunk; source
EffortlessMetrics/ripr is the
release and distribution authority.
| Need | Doc |
|---|---|
| Choose the first-hour path by surface | Quickstart |
| Understand the public command roles | Command hierarchy |
| Map plain language to the internal model | Terminology |
| Understand the model (discrimination vs coverage) | Static exposure model |
| Know what is usable / preview / advisory | Support tiers |
| Choose the diff and recover from an empty result | Check scope · Troubleshooting |
| Interpret command success and policy failure | Exit codes |
| Understand JSON / context output | Output schema |
| Turn a gap into a test | Targeted test workflow |
| Prove one real PR's adoption | First successful PR workflow |
| Install and use the editor extension | Editor extension |
| See behavior contracts and architecture | Specs · Architecture · ADRs |
| Follow direction and active work | Roadmap · Plan · Campaigns · Codex Goals |
| Contribute a scoped PR | Contributing · Scoped PR contract · PR automation |
| Everything else | Documentation index · Documentation system |
Use the repo automation rather than remembering the gate order:
cargo xtask shape # safe local normalization
cargo xtask check-pr # the review-ready gateA good ripr PR is scoped by production risk, not line count: one production
delta plus its complete evidence package, preserving the
spec -> test -> code -> output contract -> metric chain. Large fixture,
golden, spec, or docs diffs are welcome when they make one production behavior
reviewable.
See Contributing, Scoped PR contract, and Agent instructions.
EffortlessMetrics/ripr-swarmis the public same-repo development landing zone for trusted agent and maintainer PRs. Package publishing, marketplace publishing, GitHub Releases, and public distribution authority remain inEffortlessMetrics/ripr. See Swarm development.
ripr is licensed under MIT OR Apache-2.0, at your option.
Building from source targets Rust 2024 and requires Rust 1.95 or newer.