Fresh evidence before done.

BeforeDone requires current, file-bound verifier receipts before coding agents can declare completion. When proof is missing, failed, or stale, the Stop Gate asks for one corrective continuation.

00

30-Second Quickstart

Install the local evidence engine, initialize the target Git repository, review the generated policy, and confirm the environment before adding one Codex integration route.

Shell
go install github.com/rrrrrredy/beforedone/cmd/beforedone@latest
beforedone init
beforedone doctor

Then choose exactly one Codex route. The Git Marketplace Plugin, standalone Skills Pack, and project-local hooks are separate delivery forms; combining them duplicates workflows.

Choose evidence before asking for PASS. BeforeDone verifies project-approved commands; it does not infer whether they fully cover a natural-language requirement. A user does not need to locate the exact bug, but the task needs observable acceptance criteria and a credible verifier. Treat non-Go git status --short initialization as scaffolding, never correctness proof.

Prompt · configure once
Help me configure BeforeDone for this repository. Inspect the existing test,
build, lint, type-check, package-script, and CI configuration. Use
`beforedone init` only as a starting point. Configure the smallest credible set
of existing commands, include every file class that can affect each check, and
report assumptions and coverage gaps. Do not add dependencies, use
`git status --short` as proof of correctness, or invent a check merely to get
PASS.
Prompt · verify a task
Use BeforeDone for this task. Turn my request into observable acceptance
criteria, map them to existing tests or checks, and add the smallest regression
test when coverage is missing and that change is within scope. Before saying
done, run every required BeforeDone check and confirm fresh PASS receipts for
the current files. If any criterion lacks credible evidence, report it as
unverified instead of calling it PASS. Do not weaken checks merely to obtain
PASS.
01

How the Stop Gate Works

The gate evaluates explicit verifier results against the current configured files. It does not infer success from prose or from the word “PASS” appearing in logs.

  1. Agent stopsA completion claim reaches the hook.
  2. Receipts checkedRequired checks and fingerprints are compared.
  3. Missing or staleOne corrective continuation explains what to run.
  4. Fresh PASSA new receipt matches the current files.
  5. Done allowedThe claim now has inspectable support.
02

Evidence Receipt

A receipt records what actually ran, its exit status, and the relevant-file fingerprint it covered. A later file change makes the old result stale.

receipt.schema.json
{
  "schema_version": 1,
  "check_id": "test",
  "argv": ["go", "test", "./..."],
  "exit_code": 0,
  "relevant_files_fingerprint": "sha256:7f3c…d6f8e",
  "verdict": "PASS"
}
Fresh
The configured verifier passed on the current relevant contents.
Stale
The receipt fingerprint no longer matches the current files.
Fail
The verifier ran and returned a non-zero exit status.
Inconclusive
The process could not produce trustworthy evidence.
03

Incident Replay

BeforeDone reconstructs the first observable divergence from normalized events, receipts, diffs, logs, and user corrections. It reports exact events only when evidence supports that precision, and never claims access to hidden chain-of-thought.

beforedone incidentBuild a local JSON and HTML incident report.
beforedone replay analyze case.jsonRe-evaluate deterministic evidence without executing commands.
beforedone replay verify case.json --executeExplicitly rerun current configured checks in a temporary worktree.
Open the example incident report
04

Install Routes

The CLI is always the source of truth. Add one integration depending on whether you want automatic Stop enforcement or a manual skills workflow.

RouteWhat it addsUse when
Git Marketplace PluginStop hooks plus both bundled skillsYou want the full automatic Codex gate.
Standalone Skills PackManual verification and incident workflowsYou cannot or do not want to install hooks.
Project-local hooksbeforedone setup codexYou want enforcement scoped to one repository.
05

Security Boundary

BeforeDone is designed for fallible agents, stale evidence, and accidental early completion. It is not an attestation boundary against a malicious process running as the same OS user.

  • Local by default. No account, cloud service, or telemetry is required.
  • Fail closed. Invalid, oversized, ambiguous, or incompatible evidence cannot become PASS.
  • Redacted artifacts. Captured output passes through bounded semantic and configured redaction.
  • No command import. Replay cases never control which commands are executed.
  • Honest limit. A hostile same-user process can change policy or manufacture local state.
06

Command Reference

CommandPurpose
beforedone initCreate a reviewed starter policy for the repository.
beforedone doctorCheck Git, policy, runtime directories, CLI, and optional Codex hooks.
beforedone check <id>Run one configured verifier and record a bounded receipt.
beforedone receipt [id]Evaluate a Receipt against the current relevant files.
beforedone incidentGenerate an evidence-only incident report.
beforedone replay analyzeAnalyze a replay case without executing commands.
beforedone replay verify --executeRerun current configured checks in a temporary detached worktree.
beforedone setup codexInstall or remove project-local Codex hooks.
07

Full README

The authoritative installation, operation, security, upgrade, and removal reference, included here for uninterrupted reading.

Loading the full README…

If the embedded document is unavailable, open the README on GitHub.