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

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

Total release size: 41.6 MB

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

Download URL doloopio-0.3.2-cp314-cp314-win_amd64.whl
Size 1.7 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
68ca2ec2c1a13fb35f7047b62c57e87e2461c9dcea840a9024f697d5cd46e924
BLAKE2b-256 checksum
How to use checksums
a4463f1d535bccc8f92b48434fe967b2995bb2edec1590d332e9de87aee570cf
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.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.8 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
68203befb71b3b7b6ce94e93272d0048fc5ee865586c49220c2c1ceb83546df5
BLAKE2b-256 checksum
How to use checksums
0ec6df4dbc7ff49f27c59386c4da1d0750afe90ae7e8aa66bc8229bc13951dc2
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.2-cp314-cp314-macosx_11_0_universal2.whl

Download URL doloopio-0.3.2-cp314-cp314-macosx_11_0_universal2.whl
Size 1.7 MB
Tags CPython 3.14 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
331328da9ebb989fa945b4f428fb93d0f7639f43c2a8a2d57c06ce3ffa8b3287
BLAKE2b-256 checksum
How to use checksums
1118b2b50d71421a9607ea58ffdf116ab24810ba391a21773361b548dfc8dd78
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.2-cp313-cp313-win_amd64.whl

Download URL doloopio-0.3.2-cp313-cp313-win_amd64.whl
Size 1.7 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
5928bed7c78b4b19c47ff4a765aa6aa2a632d4f78877c8d87e4cd52af7a00c19
BLAKE2b-256 checksum
How to use checksums
5f5e776865999bd9020c3264d2dc33a46cbfbfc58caf943d9bd77396672cedea
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.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.8 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3937f340b91abd2ae8a4f85ac9a66b3ce0d374a5250de26c8c9a0a7ed22d27a1
BLAKE2b-256 checksum
How to use checksums
f1f9c6cd0f41f634aa430a227bd0216e136956cd75e9aa26bf63df71e90ae42b
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.2-cp313-cp313-macosx_11_0_universal2.whl

Download URL doloopio-0.3.2-cp313-cp313-macosx_11_0_universal2.whl
Size 1.7 MB
Tags CPython 3.13 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
032f4c6ad3241e82892834d8a8dc4529eb42fd9bde06a7bcde2b3cbd33e7c7f4
BLAKE2b-256 checksum
How to use checksums
197e5a01266fec822677a4c4d74d33dd312bd3c7ee64ecff44e33d6f197be8f2
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.2-cp312-cp312-win_amd64.whl

Download URL doloopio-0.3.2-cp312-cp312-win_amd64.whl
Size 1.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
bb5be9e48d5a90afd7bdf9bf01cece2e260b0ea506f43e2489d25fa7cf542af4
BLAKE2b-256 checksum
How to use checksums
455558759d866779bf9623fd3f915863f36d511d8869fee150cd5a3ba65f3733
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.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.8 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7d2a56b5359d72c959fb743707487173bb57596fc05f3625b914277b7490e382
BLAKE2b-256 checksum
How to use checksums
400ea3e0697afd5d18e2bc5276f2e1a58afdfc8d3d4852a34b689fc6a8d14fbe
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.2-cp312-cp312-macosx_11_0_universal2.whl

Download URL doloopio-0.3.2-cp312-cp312-macosx_11_0_universal2.whl
Size 1.7 MB
Tags CPython 3.12 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
eebd452cf019fdfb77b34d0aaa58f9413d2cf15bbe2f2c241f9a37122a62f9af
BLAKE2b-256 checksum
How to use checksums
c2d91dd46f893f164e220ececc4350180ddd08a24204e945e9780d809f667bca
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.2-cp311-cp311-win_amd64.whl

Download URL doloopio-0.3.2-cp311-cp311-win_amd64.whl
Size 1.7 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
58eeda58f0dfc0520df74a592a0e457aecd52049e141e823089d5c416fbad18c
BLAKE2b-256 checksum
How to use checksums
29aa68ad1840fc65e4ee9a70daafdb090220acaa8f3bd50f6f66ae3ff720cac7
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.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.4 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b227641b7c6a5ea248a737ab7ef9d1e6f3491bda44c4c26c359471e86fceded4
BLAKE2b-256 checksum
How to use checksums
89b37bfb68a8052fa1203e8a9628dcdb7908891da253c93533fc2d5982903777
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.2-cp311-cp311-macosx_11_0_universal2.whl

Download URL doloopio-0.3.2-cp311-cp311-macosx_11_0_universal2.whl
Size 1.7 MB
Tags CPython 3.11 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
5c2a6fa32d809c96e7307b3c2bb748522747824bbbf49a8c9eb9437166fc1d0e
BLAKE2b-256 checksum
How to use checksums
92cebdd8a4555e18d2aadb71db21a58db973ffb38505d04bbbb05996e25fb26d
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.2-cp310-cp310-win_amd64.whl

Download URL doloopio-0.3.2-cp310-cp310-win_amd64.whl
Size 1.6 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
fd19b8ab68488efa3c4343f93258fcd4301aafb1403006ba2db57d880e974d1c
BLAKE2b-256 checksum
How to use checksums
46928cdf69e844f7ad392460973dcf00fd193838d79aac24e27652e3365bec46
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.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.4 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
997d4be7f37e8ffe0075d431b2f6dbabcb75387c2b110f69ff472f1b2ce9a08c
BLAKE2b-256 checksum
How to use checksums
5a9b039fc18701a7f0a6519bcc77a6e8870047751b20d0f8b16c6ec0dc4ca549
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.2-cp310-cp310-macosx_11_0_universal2.whl

Download URL doloopio-0.3.2-cp310-cp310-macosx_11_0_universal2.whl
Size 1.6 MB
Tags CPython 3.10 macOS 11.0+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
70485ca0b315c10a0b77d070d0089f9796a42a0ed7db1a7760e73eb6ae45899b
BLAKE2b-256 checksum
How to use checksums
5ffd6b91421d53fd7e01fabf8e64229165e3bb59a30b68efa1726a830a35474b
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.2-cp39-cp39-win_amd64.whl

Download URL doloopio-0.3.2-cp39-cp39-win_amd64.whl
Size 1.6 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
5310185b4c2b0f65332f9065379bc980c559e77af1777089de8113bff56186b5
BLAKE2b-256 checksum
How to use checksums
9991943c487efa664230dce97e5e958d923b2021ad1a6fa6e07ed6aeb7785218
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.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 3.3 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4ac4046078b897c93ec6392682792b2d66254b11199f21a6247c594a92e1b8e6
BLAKE2b-256 checksum
How to use checksums
ee128e531b033e3f9d65c5e4b1d1465adf4495269572307b69cf59bdfde352e8
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.2-cp39-cp39-macosx_11_0_universal2.whl

Download URL doloopio-0.3.2-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
753a310829cf24748467f9efb528c239759909b3dec9dedb77524a82a9a2dfda
BLAKE2b-256 checksum
How to use checksums
a4cc460e69487c1420214d0a955afa52272937ef9d874810c39da8580bd617f7
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

This release

0.3.2 This release

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