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

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

Total release size: 32.7 MB

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

Download URL doloopio-0.3.0-cp313-cp313-win_amd64.whl
Size 1.6 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
4e4f56a775281cd26ef9209472974b967223e9aadfe98d5736c39c6b071ad87a
BLAKE2b-256 checksum
How to use checksums
4cff3ffa2145126bfc1626cd4009bbdeb90631fa6eabd624da033147691c9ac9
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.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.0-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
cf687d8ef1cb7bf33044dbc798f6d679aa909f474e6e6261f70069248989ff45
BLAKE2b-256 checksum
How to use checksums
9e01ca69b4804fac3fbfc36acb20073b3137e92e77f697e3b49e4178846ae8c2
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.0-cp313-cp313-macosx_11_0_universal2.whl

Download URL doloopio-0.3.0-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
e67e9d2f44d632e24bc25d6120d501f21ff866a6aa51a507a6ec9cadffe429d1
BLAKE2b-256 checksum
How to use checksums
d1599ff5020c0215dac4dc9739e76ea31043e12cd2c09894d874ebe2decad356
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.0-cp312-cp312-win_amd64.whl

Download URL doloopio-0.3.0-cp312-cp312-win_amd64.whl
Size 1.6 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
ca583366aa551021b898ec20cfcdac00d2a4fa85ea7638c17e29a2a6c10320f1
BLAKE2b-256 checksum
How to use checksums
93802c057a97cbc2540aeb20b6332dfb16e76269aaaee8ac37790306d643f1c6
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.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.0-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
edaf233c1b0e4be27483df68b96780b9ef2a684fbd60a920acf29863d2d55bb2
BLAKE2b-256 checksum
How to use checksums
f78bef5c7719c94656023f00bade5d684fb1a89e583ed38f87fe420a8ee52abd
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.0-cp312-cp312-macosx_11_0_universal2.whl

Download URL doloopio-0.3.0-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
0cd346a2ff62e3801c54ac84a527eb398da0ceffd346cf41e177fac1e1ce8530
BLAKE2b-256 checksum
How to use checksums
ca4bb662c7b33c4c0389043da9b4690f92dad27c363465fdfa7944fb013519d0
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.0-cp311-cp311-win_amd64.whl

Download URL doloopio-0.3.0-cp311-cp311-win_amd64.whl
Size 1.6 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
727068d1246eb50f8daff47045e0f351c20f961c6739accadfecde16875c44cd
BLAKE2b-256 checksum
How to use checksums
d73a23a0e4e29a3374f2537b807008812e4dab85af717be3c15445c896eff32d
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.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.0-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
59121963885ace9a12480778f7cacdb8014d67b0467ef8641eac665cf2dcc7d3
BLAKE2b-256 checksum
How to use checksums
4d2f7371730d4d07b301e15a97e3bb5cbf5d947841f0aa1ca995bf9f23b34619
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.0-cp311-cp311-macosx_11_0_universal2.whl

Download URL doloopio-0.3.0-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
51f4b8b7aa500bf39772a7c4bd9b95e65543135bcafb2a1638097011b303f09f
BLAKE2b-256 checksum
How to use checksums
ee7f167d5340b68be6a7e9bbe05a8a8e1237f40c7aba522959762823714e7884
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.0-cp310-cp310-win_amd64.whl

Download URL doloopio-0.3.0-cp310-cp310-win_amd64.whl
Size 1.5 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
a65b1a94699a30fa8c3b42556ecbb6a19cd4654980febded51cf27ced3e39d76
BLAKE2b-256 checksum
How to use checksums
6d98643d04f1fd2699e7efbd32bdf6e326f9f1ea4a827e1dbcadbbabcefc64e7
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.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.0-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
7108ce16e7e25b39487387ffe4c88a1c846991733a2fdf3cd087093b9af91999
BLAKE2b-256 checksum
How to use checksums
6499c8b7d9d0c6cd2717aaf6aa0f5ac53d464b90abd4c65c51f239b4950c4958
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.0-cp310-cp310-macosx_11_0_universal2.whl

Download URL doloopio-0.3.0-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
9675e1c4542749d91d77c975930c79ff85fde84efeccd28d30ad12ed95b8ff1f
BLAKE2b-256 checksum
How to use checksums
77157d01b9a1a657c5041193670b460139bbd7acef39bea9ab81cc317092e2a4
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.0-cp39-cp39-win_amd64.whl

Download URL doloopio-0.3.0-cp39-cp39-win_amd64.whl
Size 1.5 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
286b3744ec471c608e8f59294b86ddcdf156440a289df27977cbfd7fe0a01b89
BLAKE2b-256 checksum
How to use checksums
a63697459133467682784eb20de25cfa5b296184e71061a75ed6b3b331f378b9
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.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.0-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
fb7cce77f48da0ea81428c0484e3f86658d36a92fd30be06227e3d8da08edc77
BLAKE2b-256 checksum
How to use checksums
67893d617144116b825775deb0fe367c270fe6d4cdd2761b150c4c6c323b52f0
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.0-cp39-cp39-macosx_11_0_universal2.whl

Download URL doloopio-0.3.0-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
48bd44f79dbafc81dc3f58ad0dc26203fae6db4217de58ccad7c0e600105cad0
BLAKE2b-256 checksum
How to use checksums
f8b0fa9029aaa7f2c0190d837fffa9f67a0909681dcc11ca51137f2fcc86297c
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

0.3.1

18 release files

This release

0.3.0 This release

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