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.3

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.3
File
doloopio-0.3.3-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
doloopio-0.3.3-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.3-cp314-cp314-macosx_11_0_universal2.whl CPython 3.14 CPython 3.14 macOS 11.0+ universal2 (ARM64, x86-64) Details
doloopio-0.3.3-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
doloopio-0.3.3-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.3-cp313-cp313-macosx_11_0_universal2.whl CPython 3.13 CPython 3.13 macOS 11.0+ universal2 (ARM64, x86-64) Details
doloopio-0.3.3-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
doloopio-0.3.3-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.3-cp312-cp312-macosx_11_0_universal2.whl CPython 3.12 CPython 3.12 macOS 11.0+ universal2 (ARM64, x86-64) Details
doloopio-0.3.3-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
doloopio-0.3.3-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.3-cp311-cp311-macosx_11_0_universal2.whl CPython 3.11 CPython 3.11 macOS 11.0+ universal2 (ARM64, x86-64) Details
doloopio-0.3.3-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
doloopio-0.3.3-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.3-cp310-cp310-macosx_11_0_universal2.whl CPython 3.10 CPython 3.10 macOS 11.0+ universal2 (ARM64, x86-64) Details
doloopio-0.3.3-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
doloopio-0.3.3-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.3-cp39-cp39-macosx_11_0_universal2.whl CPython 3.9 CPython 3.9 macOS 11.0+ universal2 (ARM64, x86-64) Details

Total release size: 43.1 MB

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

Download URL doloopio-0.3.3-cp314-cp314-win_amd64.whl
Size 1.8 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
3996d4d9ebe358ff9f395cbc4d78c28887a4a1c82a4cb96ad288e52c0ebe02e4
BLAKE2b-256 checksum
How to use checksums
dca32dc599f37db436e29700788d634acee27ed2073cf7e951da08e22875367f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL doloopio-0.3.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.9 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ae54b3e467db285938abb1b54e8b652c6526facf546c1a93c511bc0531a2de48
BLAKE2b-256 checksum
How to use checksums
8b106f06c56170883c5bfa2d9dffb3734afcda9ac3b45df35f664b3583c2e3b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL doloopio-0.3.3-cp314-cp314-macosx_11_0_universal2.whl
Size 1.8 MB
Tags CPython 3.14 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
20930c48f74ddab5d51b4661518c5c1eff923585ddee3304d481d6e486ba116d
BLAKE2b-256 checksum
How to use checksums
2e6765b43f7c794684858ef1f5d6d224f0975833ddc4c4909832e70d3fe0bd95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL doloopio-0.3.3-cp313-cp313-win_amd64.whl
Size 1.8 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
a318f402ddc61e59dfa8d53e022683761c7090423982081e5f97c7639a64b3a0
BLAKE2b-256 checksum
How to use checksums
9f924e349ca8b7f34390c0324bc120b76171350a85075b9ce1c284245d1efc49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL doloopio-0.3.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.9 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d8e53ce23d02c8c632858fd59aa02da7d57ab34bdb1dc3c1b85519480e640a59
BLAKE2b-256 checksum
How to use checksums
145709a3fe2341cbbafb59d445071327ce59c381cad4a3023edbb3dcb6e78377
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL doloopio-0.3.3-cp313-cp313-macosx_11_0_universal2.whl
Size 1.8 MB
Tags CPython 3.13 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
c01c69edf140b93e0748277fcbe71e93c2eef8a00f12beb99dea24ac6dbb9583
BLAKE2b-256 checksum
How to use checksums
a7ac36e6d4c801157f389c86217acb50a89d14f2d4f3fc4e66428a2eb6d43f89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL doloopio-0.3.3-cp312-cp312-win_amd64.whl
Size 1.8 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
fb3fd13f1e7b80f657620bc8f653861dfa769077cacf6bc2e1922808426e67c1
BLAKE2b-256 checksum
How to use checksums
acd8a427b86cd64e604c0dad2b85ddf89a743b8d22caa0c621988c890a48ef23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL doloopio-0.3.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.9 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c6a7482230beacbe5a32e4f3039c0c41c706b68e12fe9f6747378d00f2f96ac6
BLAKE2b-256 checksum
How to use checksums
d527b08398c7f0851cf6af56b9ab90aec5e94a534126c32513f0b752b5abf7a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL doloopio-0.3.3-cp312-cp312-macosx_11_0_universal2.whl
Size 1.8 MB
Tags CPython 3.12 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
548edf3ee332a4f37cd0befb3f4589895d1566bea31b06bb4300df5e4758f46f
BLAKE2b-256 checksum
How to use checksums
a5c037419758b88b5531425f85979ca6a5af8b2b8a167b57845568e4b487c419
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL doloopio-0.3.3-cp311-cp311-win_amd64.whl
Size 1.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
03ce1e108d4ddf697c3e0ea6bef8125edeb8747c2e2bce3e1bfffec74f93d827
BLAKE2b-256 checksum
How to use checksums
38d4f67a0c52f1179068d7e65b5ce65963161dad78d436d7446dbf2ceaf4bf69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL doloopio-0.3.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.5 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
71fd570e7a30657bf993e37560587cb341ef9def744b8481a5a800e2ac903382
BLAKE2b-256 checksum
How to use checksums
e81ccf22c3ec3852a7bec29d68ec4cf6d40dcb4321c65bfdb8f98dbc4730578d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL doloopio-0.3.3-cp311-cp311-macosx_11_0_universal2.whl
Size 1.8 MB
Tags CPython 3.11 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
07cffc9241ead8e4e7f91d05435af838e65f06b0718c45c1beb11e52d0633b01
BLAKE2b-256 checksum
How to use checksums
94889830ae49240f2c2eb12d8d6c657db8997069ade6922fb177d6324bd709ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL doloopio-0.3.3-cp310-cp310-win_amd64.whl
Size 1.7 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
cf881250964a04fa8a7455d69f317678e11e8c1542525251f2831ef1ff4ad71b
BLAKE2b-256 checksum
How to use checksums
5c89f0616a18670d4d276dafacff5325f9e67f5455951e423b55d3432ddf0bf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL doloopio-0.3.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.5 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
a9333c1320c2bb5c1add49a0654a0af714cca40171ae0f6ea8114244dbe02c28
BLAKE2b-256 checksum
How to use checksums
96e5ba855bb105da49cd87dfa2f8a12fac60855adcb3ed698b8a6f2b0c900fc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL doloopio-0.3.3-cp310-cp310-macosx_11_0_universal2.whl
Size 1.7 MB
Tags CPython 3.10 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
2973f8ccf9d3c7e7abf2052d2c34fbef35c46b32106426a5d320f47fd9ac75ec
BLAKE2b-256 checksum
How to use checksums
d69cc11ea416e7b0b5154541d376908b87a5f96dfd3f3ecd88e6e0fd40e4314a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL doloopio-0.3.3-cp39-cp39-win_amd64.whl
Size 1.7 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
3b0758a89feb95e386b7cfc581459e30192637461d4350d4ae4b00c27a1d6a30
BLAKE2b-256 checksum
How to use checksums
6c0dedb517e77e83478cbf81ebf86439b4b85e25df69e6b1b674faff5c9095d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL doloopio-0.3.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.4 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f7dfc3792e0e76268150c05087aa81196573832d92a2614af1abb7f0bc4e442e
BLAKE2b-256 checksum
How to use checksums
3484b4729324dd3f4215718792cfc5f8cdbcf1bf0efbbd615a45b212ed0b4b49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL doloopio-0.3.3-cp39-cp39-macosx_11_0_universal2.whl
Size 1.6 MB
Tags CPython 3.9 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
d8ccbea2eff2f5f60bd33422a22f7b84438e78d2b471b7b283eb5a08d4a0a0be
BLAKE2b-256 checksum
How to use checksums
0f07db8e9c10d82b88afcd34e2e14646e76f988ca8b387b9fade582b94beabdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

This release

0.3.3 This release

18 release files

0.3.2

18 release files

0.3.1

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