Fresh evidence before done.

Connect the checks your project already uses. Run them through BeforeDone, then confirm whether the results still match your files. Add an agent integration when you want this completion check to run automatically.

00

Connect an existing check

Install the CLI, then connect the command you already use. This Python example saves a single check covering source, tests, and project configuration.

Command-based initialization is available in v1.2.0 and newer. Install it with go install github.com/rrrrrredy/beforedone/cmd/beforedone@v1.2.0 or download a platform archive from GitHub Releases. Upgrading preserves existing configuration and historical receipts.

Development CLI · Python project
beforedone init --files "src/**/*.py" --files "tests/**/*" --files "pyproject.toml" -- python -m pytest
beforedone doctor

Initialization saves everything after -- as verifier arguments without executing it. Repeat --files for its inputs. A custom command defaults to **/* when no patterns are supplied; narrow that scope if it includes generated output or installed dependencies. Edit an existing configuration to change its command or scope.

Daily workflow
beforedone check test
beforedone gate

The gate lists every required check and its freshness without rerunning verifiers. To reuse previous results, start with gate and rerun only checks needing new evidence. An active integration supplies the final gate automatically; a manual gate is optional on that route. Use receipt when you need details.

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.

Using Pi? Run beforedone setup pi, review and trust the generated project extension, and remember that Pi correction happens after settlement rather than before the first final message.

Choose evidence before asking for PASS. BeforeDone verifies project-approved commands; it does not infer whether they fully cover a natural-language requirement. With no configuration, bare init uses go test ./... for Go modules. Other projects must supply a verifier; otherwise initialization exits with code 64 and writes no configuration. The implicit git status --short placeholder has been removed. Existing configurations and receipts are preserved; review older generated checks and replace placeholders with a credible verifier.

Prompt · configure once
Connect this repository's existing verification command to BeforeDone. Reuse
the project's normal checks and include their source, tests, fixtures, and build
inputs in relevant_files. Use command-based init if supported by the installed
CLI; otherwise edit the generated YAML. Keep the setup small and explain any
task requirement the existing checks do not cover.
Prompt · verify a task
Use BeforeDone for this task. Run affected configured checks through BeforeDone
and reuse results that still match the files. At handoff, use one gate result
to confirm all required checks. Inspect individual receipts only if needed.
Report any acceptance criterion the configured checks do not cover.
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.

Pi uses the same machine-readable beforedone gate result, but its boundary is different: agent_settled occurs after Pi has finished automatic retries and continuations. The extension may therefore show the first unsupported final message before sending one corrective user message. Its branch-aware guard permits at most one automatic correction; interactive or RPC input resets it, while extension-originated input shares the existing guard.

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_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 Codex route for pre-Stop enforcement or a manual workflow, or add the project-local Pi extension for post-settlement correction.

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. On Windows, rerun setup with the current CLI to replace older handlers, then trust the updated definitions.
Pi extensionbeforedone setup piYou want bounded Pi events and one post-settlement correction.
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 init [--files pattern]... [-- command args...]Connect an existing verifier, or create the default starter configuration.
beforedone doctorCheck Git, policy, runtime directories, CLI, and optional agent integrations.
beforedone check <id>Run one configured verifier and record a bounded receipt.
beforedone receipt [id]Evaluate a Receipt against the current relevant files.
beforedone gateEvaluate every required receipt and return an allow/block decision.
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.
beforedone setup piInstall or remove the project-local Pi extension.
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.