Skip to main content

doloop CLI

The deterministic convention gate for AI-written code. It reads your codebase, infers the conventions it already holds (the ones kept in at least 70% of the places they apply), and flags a change that breaks them, with the rule, the line, and the rate behind every call. Same input, same verdict, every run.

Architecture & schema: this README documents the gate/selftest/MCP surface. For the whole Code product — the read cockpit, the five lenses, the data/blob schema, and how the gate and the read service share one engine — see code-page/ARCHITECTURE.md and code-page/SCHEMA.md.

Full command surface

Command What it does
gate the convention gate; exit 1 on a block (--staged, --hosted, file or codebase)
read / review the read cockpit: triage a change, map the repo, --json / --open / --serve
conventions print inferred house rules; --emit agents|claude|cursor|all writes a managed AGENTS.md block
selftest / verify prove byte-identical determinism + show the tier-labeled lens roster
patterns / fingerprint distill the pattern language + turbulence/laminarity gauge
age date conventions young-vs-settled from git history (maturity confidence)
converge surface contested conventions (70–88%) + straggler sites
history mine git log for fix-classes + "X instead of Y" convention statements
suppress / ratchet the guarded retention ratchet (reason + author + 90-day expiry)

Two ways to run it. Pick your privacy posture.

1. Local (default) — your source never leaves your machine

The engine runs on your machine. We ship it as a sealed binary, so your code stays put and the engine is not readable. This is the recommended mode and the one the pre-commit hook and CI action use.

pip install doloopio
doloop gate --staged             # gate your staged change before commit
doloop gate path/to/file.py      # gate one file against the codebase
doloop selftest                  # PROVE byte-identical determinism + see the tier-labeled lens roster

Exit code is 0 on pass and 1 on a flagged break, so it drops into a gate:

doloop gate --staged && git commit

2. Hosted (--hosted) — for teams that cannot run a binary

You send only the changed code to api.doloop.io over TLS. It is processed and not stored. Use this when a sealed binary is not an option in your environment.

export DOLOOP_KEY=dlp_...         # from https://api.doloop.io/dashboard
doloop gate --hosted --staged

Honest difference: local keeps your source on your machine; hosted sends the changed code to us (not stored). Same verdict either way.

Pre-commit

# .pre-commit-config.yaml
repos:
  - repo: https://github.com/ekras-doloop/doloop-cli
    rev: v0.1.0
    hooks:
      - id: doloop-gate

CI

Drop ci/doloop-gate.yml into .github/workflows/. It installs the sealed package on the runner and fails the check on a convention break.

For your coding agent (MCP)

Let the model gate its own output before it proposes a commit. The MCP server exposes the same local gate as a tool your agent can call, so the agent checks itself against an adversary that read the whole codebase, before the diff ever reaches a human.

pip install mcp
// .mcp.json (or ~/.claude/mcp.json for global)
{
  "mcpServers": {
    "doloop": { "command": "python3", "args": ["/path/to/doloop_mcp.py"] }
  }
}

Tools: doloop_gate(code, codebase, filename) gates a snippet, doloop_gate_staged(codebase) gates the staged change, doloop_version(). Runs local, source stays on the machine. The agent gets a PASS or FLAGGED verdict with the rule and the line behind any flag.

What it is, honestly

It gates fit, not correctness — it is not a bug oracle. Below the 70% inference floor it owes silence, so a messy or brand-new codebase can be quiet at first. Safety regressions block; local style only warns.

The verdict carries a reliability tier, and never borrows another tier's promise:

  • mechanical (most lenses) — byte-identical, model-independent, forever. Run doloop selftest to prove it.
  • execution (reverse-classical test quality, opt-in DOLOOP_CHECK_TESTS) — deterministic given a runnable test env; degrades loudly ("test quality NOT verified") when it can't run, never a silent pass.
  • caged reader (semantic judgments, bring-your-own model) — reproducible per inferred convention, not byte-identical-forever.

Measured this build on public OSS (a proxy floor, not a per-customer guarantee): byte-identical across hash seeds; ~0.34% per-function false-block floor on accepted code across 1487 functions / 9 repos, 6 of 9 at exactly 0.0% (an upper bound — the residual is the legitimate-swallow judgment-call tail, surfaced for review, not bugs); 0 crashes. The per-customer false-block rate and velocity uplift come from a real team on real code, not from a corpus.

Suppressing a flag is a human review decision: doloop suppress <key> --note "why" records a reason and an author, expires (default 90 days), and is append-only in .doloop/ratchet.log. It is not a way for a tool or an agent to silence the gate mid-task. The method and its evidence: https://doloop.io/paper/

For maintainers: building the sealed engine

The public wheel ships the engine only as the compiled, non-readable module doloop_cli/_engine. The engine source is never in the distribution.

ENGINE_SRC=/path/to/engine/gate.py ./build_sealed.sh   # nuitka (preferred) or cython
python3 -m build --wheel                                # ships _engine.*.so, not source

In a dev checkout (no sealed build), point the CLI at the engine source:

DOLOOP_ENGINE_PATH=/path/to/engine python3 -m doloop_cli gate --staged

Release files for doloopio 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for doloopio 0.3.1
File
doloopio-0.3.1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
doloopio-0.3.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
doloopio-0.3.1-cp314-cp314-macosx_11_0_universal2.whl CPython 3.14 CPython 3.14 macOS 11.0+ universal2 (ARM64, x86-64) Details
doloopio-0.3.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
doloopio-0.3.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
doloopio-0.3.1-cp313-cp313-macosx_11_0_universal2.whl CPython 3.13 CPython 3.13 macOS 11.0+ universal2 (ARM64, x86-64) Details
doloopio-0.3.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
doloopio-0.3.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details
doloopio-0.3.1-cp312-cp312-macosx_11_0_universal2.whl CPython 3.12 CPython 3.12 macOS 11.0+ universal2 (ARM64, x86-64) Details
doloopio-0.3.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
doloopio-0.3.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
doloopio-0.3.1-cp311-cp311-macosx_11_0_universal2.whl CPython 3.11 CPython 3.11 macOS 11.0+ universal2 (ARM64, x86-64) Details
doloopio-0.3.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
doloopio-0.3.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
doloopio-0.3.1-cp310-cp310-macosx_11_0_universal2.whl CPython 3.10 CPython 3.10 macOS 11.0+ universal2 (ARM64, x86-64) Details
doloopio-0.3.1-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
doloopio-0.3.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
doloopio-0.3.1-cp39-cp39-macosx_11_0_universal2.whl CPython 3.9 CPython 3.9 macOS 11.0+ universal2 (ARM64, x86-64) Details

Total release size: 39.7 MB

Release files / doloopio-0.3.1-cp314-cp314-win_amd64.whl

Download URL doloopio-0.3.1-cp314-cp314-win_amd64.whl
Size 1.7 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
34b816a1f6f1537c11235941609f330bee3245fb8e5a3ba11600a73f852f9ac6
BLAKE2b-256 checksum
How to use checksums
9e3e704393410c9d803cda79a5be714d0a82c2adbf76da6499ea488ae6d347e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / doloopio-0.3.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.7 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6229d893953cfa831423bbdae5060c82c299abea0067db40dbcc29462b19ab23
BLAKE2b-256 checksum
How to use checksums
5aed3bd87e5ed1d05ba7fa37de5d769910e914b1187edf15aac017a50efa47b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / doloopio-0.3.1-cp314-cp314-macosx_11_0_universal2.whl

Download URL doloopio-0.3.1-cp314-cp314-macosx_11_0_universal2.whl
Size 1.6 MB
Tags CPython 3.14 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
eab0185c9b3ee1d2e95e24da58a6d38515e89b51a330cf8f9dbabf184f6ed751
BLAKE2b-256 checksum
How to use checksums
99143a918469fa02338139eb2d0ed783b1941847f8f12f6960d9881ce9cf3e31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / doloopio-0.3.1-cp313-cp313-win_amd64.whl

Download URL doloopio-0.3.1-cp313-cp313-win_amd64.whl
Size 1.6 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
deee4db1520ceada5609bb52d2370338216b91ce552aa950680f0fc6fba4e4d9
BLAKE2b-256 checksum
How to use checksums
5b77f9cf2c776cdda7f0b3d83c5a8ad4aeeb5305a64c413645ec061df6475ab7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / doloopio-0.3.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.7 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
0c622581a84e72b7e6503d1074ec1ccf4229a3ec744c663870c99f9ad0248c40
BLAKE2b-256 checksum
How to use checksums
9c5bda22e9d1bf3f6758173ecd13a093a017d7cecc033c0980f9e8da1091d33c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / doloopio-0.3.1-cp313-cp313-macosx_11_0_universal2.whl

Download URL doloopio-0.3.1-cp313-cp313-macosx_11_0_universal2.whl
Size 1.6 MB
Tags CPython 3.13 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
16e61e8d9ca67a1909c933f30cd37f41bc19c867f971b4daf6be0f15aa51ddf8
BLAKE2b-256 checksum
How to use checksums
5ec3491f13292dedecf909d3b0daac4b4e0f55244e3dde044be76d20e67892c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / doloopio-0.3.1-cp312-cp312-win_amd64.whl

Download URL doloopio-0.3.1-cp312-cp312-win_amd64.whl
Size 1.6 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
0261f6910da2a871f20546af384e0e4509addaf333e8ec5f9cbee480359133d5
BLAKE2b-256 checksum
How to use checksums
a81070f05d0053e36b9dd7e86112eea8196278bdb3482a84ef74f20b70d5acd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / doloopio-0.3.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.6 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
329a75fbad1477e11b72739cce1c08214d0ea70f8f18b54a79d9fab78231cc8b
BLAKE2b-256 checksum
How to use checksums
745ec19cc80b45118b18d93c93d71f2d13016bd28187e192ef265d94defd16c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / doloopio-0.3.1-cp312-cp312-macosx_11_0_universal2.whl

Download URL doloopio-0.3.1-cp312-cp312-macosx_11_0_universal2.whl
Size 1.6 MB
Tags CPython 3.12 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
41ab6dc2f4c652edaa2715ed0cc6fcc6f208df4914db047df41f07876ade560a
BLAKE2b-256 checksum
How to use checksums
eb4d545982fb788210b3d95d9dc243a3cdf82528148826cb61c5b421dd3fbd82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / doloopio-0.3.1-cp311-cp311-win_amd64.whl

Download URL doloopio-0.3.1-cp311-cp311-win_amd64.whl
Size 1.6 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
64ac0fe84fbd7356a279dd7bdb9659434a0b708d58597893e6972a58735319c9
BLAKE2b-256 checksum
How to use checksums
e1a7568c18e3728a89b1614ce8403938b471a939259ee760af23132c869b1835
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / doloopio-0.3.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.3 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
adae3ad1af0b5df4cd1206f73f3edf42832e85993e7ecb042f66a09580a69090
BLAKE2b-256 checksum
How to use checksums
0e5e51b8879ee6108ded5551394ffa24e5e226eb34b1ba7a7e2854f6e98fa7a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / doloopio-0.3.1-cp311-cp311-macosx_11_0_universal2.whl

Download URL doloopio-0.3.1-cp311-cp311-macosx_11_0_universal2.whl
Size 1.6 MB
Tags CPython 3.11 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
f5975e82c2eb5e235ab648b1fc23540940d9771242f92c9924317c055dbb2f4d
BLAKE2b-256 checksum
How to use checksums
e29fa1f6db9303effd486b6e7423c62c66bf529c14fc47ba21f8f5648d8f1215
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / doloopio-0.3.1-cp310-cp310-win_amd64.whl

Download URL doloopio-0.3.1-cp310-cp310-win_amd64.whl
Size 1.5 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
d411fe348181bb8b263e2ccc2d0110aeb694a0c5c0d767ec5ea004234b14238d
BLAKE2b-256 checksum
How to use checksums
3a1d187a26e8294911f0f25f5098825ec135b9033825d8f1ee7909dd5522dfb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / doloopio-0.3.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.3 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
9d1c4ee33a0f42ce833d357222ad96a27ce25be504b54d2e70be19473e4db51f
BLAKE2b-256 checksum
How to use checksums
578a02521d052a42a2da10c5dfbc49951c963db549366d894a930a0988b1ea4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / doloopio-0.3.1-cp310-cp310-macosx_11_0_universal2.whl

Download URL doloopio-0.3.1-cp310-cp310-macosx_11_0_universal2.whl
Size 1.5 MB
Tags CPython 3.10 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
c0c959ce638a2b40f2bed3eb27d5a9b2cbaf34d7bece4800094cafa9d53c8ef2
BLAKE2b-256 checksum
How to use checksums
2c360c51e7a51a80f04f8d6807cec81c6ba413db8749aed3001563120c4203f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / doloopio-0.3.1-cp39-cp39-win_amd64.whl

Download URL doloopio-0.3.1-cp39-cp39-win_amd64.whl
Size 1.5 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
d14d63af172724ea80fd3830f82dc00f87f80aac5f2f6bee64ea0a82c273061d
BLAKE2b-256 checksum
How to use checksums
95f6ffaa561ca4976b13aef7ccd297a296e647800347631c6c96b9a8d883c15a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / doloopio-0.3.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.2 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
cfbc5251948c5301e2b8016f6b26c64a2f4539202e001b754f6d891213cf7712
BLAKE2b-256 checksum
How to use checksums
af6b8d9d587f72f11291cbc9b713e327a50318da0ba6e819e983b555d39dce94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / doloopio-0.3.1-cp39-cp39-macosx_11_0_universal2.whl

Download URL doloopio-0.3.1-cp39-cp39-macosx_11_0_universal2.whl
Size 1.5 MB
Tags CPython 3.9 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
841a8836a5ffb547902eccc6c4b7def0b2fb704261ff727f24f0ad2f536b8436
BLAKE2b-256 checksum
How to use checksums
8aef90c7b06b36dcf77fd5b385e19f9bbdd0e9819643d65c6a3d474e52cf5e75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release history Release notifications | RSS feed

0.3.8

18 release files

0.3.7

18 release files

0.3.6

18 release files

0.3.5

18 release files

0.3.4

18 release files

0.3.3

18 release files

0.3.2

18 release files

This release

0.3.1 This release

18 release files

0.3.0

15 release files

0.2.0

15 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page