RACT is a model-agnostic, local-first agentic coding tool built around three ideas: signed provenance capabilities (rootknots) on every artifact, explicit assumptions for every plan step, and milestone-halting recursion instead of fixed iteration counts.
v0.4.0-rc1 is the first release where the environment decides, not the model. Two combined pipelines land in this tag:
- Substrate. Every plan step runs in its own git worktree under an
OS-enforced sandbox derived from a
CapabilityManifest. Every model action is a member of a closed Pydantic union validated at the provider boundary. Every run emits a hash-chained event log atevals/runs/<run_id>/events.jsonland (optionally) OpenTelemetry spans. Termination T1 reads: every required predicate in theAcceptanceSuiteevaluates true against the final snapshot — the model does not say "done". Rootknot carries a second signature (environment_signature) attesting the environment, not just the author (Invariant RK-3). - Anti-Lazy Module (ALM). Eight gates (G1-G8) run at the pre-commit
boundary: held-out predicate suite, mutation-kill, patch differentiation,
coverage delta, test-integrity AST diff, symbol-graph under-edit,
companion red-team from a distinct provider, and effort reconciliation.
A sycophancy circuit forces evidence on suspicious reversals. An
Investigator probes flagged files with the companion. Rootknot gains a
third signature (
antilazy_signature) held by an ALM-verifier key distinct from the sandbox key, and Invariant AL-1 (Anti-Lazy Attestation) raises the verification bar: a workspace only verifies understrict=Truewhen every gate passed (or its handshake was approved) AND the run'sreversal_taintis clean.
The word attested appears in a run report only when all three signatures land. The word done is no longer the model's to say.
See CHANGELOG.md [0.4.0] for the exhaustive change list; see
docs/ROADMAP.md for what v0.5 hardens.
pip install ractOr from source:
git clone https://github.com/LucRoot/RACT.git RACT
cd RACT
./scripts/install.sh --local --venvSee docs/QUICKSTART.md for a step-by-step tutorial.
ract init --template python-package --provider local
ract doctor # verify workspace and dependencies
ract fence inspect --file src/hello.py # check safety guardrails and threat-model boundaries
ract run "add a test for the hello-world script" --config ract.yaml --dry-run
ract run "add a test for the hello-world script" --config ract.yaml
ract run "refactor the greeting module" --config ract.yaml --loop --max-iterations 5ract doctor— verify workspace health and dependencies.ract config validate— validate ract.yaml configuration.ract provider health— check configured provider reachability.ract session list— list persisted run sessions.ract session ls— list persisted transactional sessions (v0.4 substrate).ract session diff <step_id>— show the diff a step'sStepTransactionapplied (v0.4 substrate).ract plan diff— show the diff a plan would apply.ract run— execute an intent against the workspace.ract fence inspect --file <path>— inspect threat-model guardrails.ract conformance run --provider <name>— run the per-provider conformance corpus (schema + tool discipline + refusal fidelity + anti-lazy). Router gates registration on a recent passing report.ract trace replay <run>— replay a hash-chained event log against the current tree (emits determinism warning on HEAD mismatch).ract trace fork <run> <event_id>— fork a trace from a specific event.ract trace diff <run_a> <run_b>— diff two traces event-by-event.ract trace to-test <run>— materialize the trace's provider prompts and responses as pinned test fixtures.ract provenance verify <path>— verify a file'sRootknot(RK-1 + RK-2 always; RK-3 when the sidecar is v2+; AL-1 when the sidecar is v3 and the workspace is in strict mode).
Anti-lazy gates (G1-G8) are pre-commit helpers rather than top-level CLI verbs.
A run's evals/runs/<run_id>/ directory gains one report per gate:
mutation_kill.json, patch_diff.json, coverage_delta.json,
test_integrity.json, under_edit.json, companion_report.json,
effort_reconciliation.json, sycophancy.json, investigator.json, and (for
rule-like intents) iso_perturb.json.
- Provenance-anchored artifacts — every file the loop writes carries a signed
Rootknotbinding it to its plan step, assumption, generator, and parent artifacts. Seedocs/PROVENANCE.md. - Assumption-driven programming — assumptions live in a registry with a four-state lifecycle (
proposed,active,discharged,violated); violations propagate through the dependency graph. - Milestone-halting recursion — the loop halts on completion, regression, provenance violation, assumption cascade, budget exhaustion, handshake block, or provider fault, each with a distinct termination cause. On a refactoring task this spends measurably fewer tokens than a naive fixed-iteration loop — see
evals/benchmarks/refactor-token-usage/report.md. - Operator Handshake — high-risk actions queue for async review instead of blocking the loop.
Core modules live in src/ract/core/: rootknot.py (signed provenance), assumption.py (Assumed[T] registry), plan.py (schema + validator), loop.py (T1–T7 recursion). See docs/ARCHITECTURE.md for the system diagram, boundary contracts, and failure modes; docs/ADRs/ for decision records.
Three reproducible tasks under evals/tasks/ (reports in evals/runs/). evals/benchmarks/refactor-token-usage/ compares the milestone-driven loop against a naive baseline on tokens-to-pass; reproduce with python evals/benchmarks/refactor-token-usage/report.py.
ract doctor # workspace health + dependencies
ract provenance verify src/hello.py # check a file's Rootknot (RK-1 + RK-2 + RK-3 + AL-1)
ract conformance run --provider fake # run the per-provider conformance corpus
ract trace replay evals/runs/<run_id> # replay a hash-chained event log
pytest -q # full suite (includes tests/test_release_surface.py)RACT v0.4.0-rc1 enforces four invariants at verify time:
- RK-1 (Author Attestation, v0.2).
Rootknot.generator_signatureverifies under the resolved generator pubkey. - RK-2 (Sidecar Integrity, v0.2). The sidecar's Merkle root binds every attested field.
- RK-3 (Environmental Attestation, v0.4 substrate). The sandbox-key
environment_signatureverifies;acceptance_suite_digest,predicate_results, andmanifest_digestare all registered. - AL-1 (Anti-Lazy Attestation, v0.4 ALM). The ALM-verifier
antilazy_signatureverifies; everyGateResultis PASS (or its handshake was approved);reversal_taintisclean(or the run is on the operator'saccepted_partial_taint_runsset).strict=Truerefuses any sidecar older than v3.
See evals/LEADERBOARD.md (which now carries a per-provider
attested_pass_rate column) and evals/conformance/COMPANION_MATRIX.md
(eligible primary-companion provider pairs).
PolyForm Noncommercial License 1.0.0 — free for personal use, research, education, and noncommercial organizations; commercial use requires an agreement. See COMMERCIAL.md and AUTHOR.md.
- Windows file-watcher tests can be flaky under heavy I/O.
- MCP tools run serially within a plan step.
- Benchmark numbers are machine-specific; re-run on your hardware.
License: PolyForm Noncommercial 1.0.0. Measurements: take them as one data point from one machine on one day, and re-run on yours.
Author: Dr. Lucas Root, Ph.D. — info@lucasroot.com