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 — thereadcockpit, the five lenses, the data/blob schema, and how the gate and the read service share one engine — seecode-page/ARCHITECTURE.mdandcode-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 selftestto 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.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 43.5 MB
Release files / doloopio-0.3.8-cp314-cp314-win_amd64.whl
| Download URL | doloopio-0.3.8-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5e7eff46505265becf0f8c3274f34286f985e62750342e285e794b0e9249aa97
|
|
BLAKE2b-256 checksum How to use checksums |
3714900fba85311e79e38771962d791fc5ae2fc723783a0a26e39686fcd98a0b
|
| 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.8-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | doloopio-0.3.8-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.0 MB |
| Tags | CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ed747e4c1dd49b4b98ecb3d8bb48585709af98f40b0b47dae936c30c0323ba39
|
|
BLAKE2b-256 checksum How to use checksums |
3a9b00176d2e8e8429a72a5e72a6bbb0c57dbf1bf54c424e50ae014bbd6a9065
|
| 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.8-cp314-cp314-macosx_11_0_universal2.whl
| Download URL | doloopio-0.3.8-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 |
4ff45cdb4ad4d069e5895892f41f95cfb934849c7a82e4d9ca7acb79ba730b5f
|
|
BLAKE2b-256 checksum How to use checksums |
4862f2b778e94dabd485a272556fa53c556bf9c0d91be173f7de69040c26da52
|
| 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.8-cp313-cp313-win_amd64.whl
| Download URL | doloopio-0.3.8-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b8b96e34fa6659977720021253c56f48b94d3ddaa7dda5609e6efa8809717828
|
|
BLAKE2b-256 checksum How to use checksums |
b47271487de0fc7bd2f761b2c67b44c25447093ffbc1f3ff305e8355fe327327
|
| 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.8-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | doloopio-0.3.8-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 |
7732ce9d7ba51619ffe7a9fbda02b448c720172350911a951459363d0e7b1de4
|
|
BLAKE2b-256 checksum How to use checksums |
7453343ceb2fdbd5bc7efcfdefc835202607c3f49d1325c328bfa90b95dcb13c
|
| 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.8-cp313-cp313-macosx_11_0_universal2.whl
| Download URL | doloopio-0.3.8-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 |
99d2fc4fc45cee5141a27077f494beefa3310f3b7cfd6fc33ad3d2083b9ec323
|
|
BLAKE2b-256 checksum How to use checksums |
637382124d987e1c16447a8b3d9f31d46c9e5bee2e3744bafe14e9646bf1d618
|
| 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.8-cp312-cp312-win_amd64.whl
| Download URL | doloopio-0.3.8-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7c802f9e62770b0cda43835f4cf21341516a383ac75bba4bf475af578c56e747
|
|
BLAKE2b-256 checksum How to use checksums |
1fc0595a5e142f305e7335fe7d1de8ec1892c01fc4afc8d7beeba874b84ba32e
|
| 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.8-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | doloopio-0.3.8-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 |
e320f43e8e81f3880fadbac3ac90c3acf7f1f45c7c6679ad9b73d63d4b5d053d
|
|
BLAKE2b-256 checksum How to use checksums |
dafdffb9d1305a3b658f2dde2fade35627bd0e5a9faf73ee36c8bc417c29b154
|
| 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.8-cp312-cp312-macosx_11_0_universal2.whl
| Download URL | doloopio-0.3.8-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 |
a65695513fa332ac60d5a41c3ac3a6cc864c8da1f5de4f42d6ad1d7236c89ea2
|
|
BLAKE2b-256 checksum How to use checksums |
0f7b6778c8c5ca87ef438dc03fc9eeaa0cb7f825a1e66eb65881cc3f19d9f864
|
| 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.8-cp311-cp311-win_amd64.whl
| Download URL | doloopio-0.3.8-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
c312388ae8907a2583fbbf2d75c6b4e499f23decd4200c1c412bde8cf9e7da28
|
|
BLAKE2b-256 checksum How to use checksums |
7da466cb68f886726986b949581671c44591066238db365e9e8ef057cd052f50
|
| 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.8-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | doloopio-0.3.8-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.6 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
6d5bb78b207b188820459fe8ac7a410f61a711c0c17cdfccbc0efb045cd59c90
|
|
BLAKE2b-256 checksum How to use checksums |
ee657ed74483440a093225398f82681276ae8fb83d8c3e1079c30feecde0c3c2
|
| 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.8-cp311-cp311-macosx_11_0_universal2.whl
| Download URL | doloopio-0.3.8-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 |
5768d49c3c82c6d55f77d30a0ab000636ea815b76ad788a66eb9d173f7ff9f62
|
|
BLAKE2b-256 checksum How to use checksums |
b7faa6ca78dcb80577fac11a1ef2a1ee012222f1e5f4f6587dbbade2d13fc98d
|
| 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.8-cp310-cp310-win_amd64.whl
| Download URL | doloopio-0.3.8-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b8b5581b58bf420fb1bfae57d385443f2876c52e2c3fa89647b44df5e5662531
|
|
BLAKE2b-256 checksum How to use checksums |
7e2e3f4b1362d134b8fca3b7727edfef352b0fd4212f6f6efdb715fa62d2853a
|
| 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.8-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | doloopio-0.3.8-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 |
f0ea82e40fc0585499079a7fcabc2284403cd45396a622cbb5b7f35835d1207c
|
|
BLAKE2b-256 checksum How to use checksums |
f06a7ebe987846e189b69968933729e890e8786b86b213a1a400d70d91c8c20b
|
| 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.8-cp310-cp310-macosx_11_0_universal2.whl
| Download URL | doloopio-0.3.8-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 |
d2a564d864a3f08c97f3caae804f301ffa8e18d80bd2efe9d6d207c3d71ee29e
|
|
BLAKE2b-256 checksum How to use checksums |
9685059e57ee1e85c2c3346bdbf58bd529b729c1ce37fff1632ec3f4386562a2
|
| 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.8-cp39-cp39-win_amd64.whl
| Download URL | doloopio-0.3.8-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
256b8446b08924967eb064ccc93505d63cd6b92c61031e0295032a22f62a9abf
|
|
BLAKE2b-256 checksum How to use checksums |
7b535d3dd9690b62c60ffa39d90a018436a812acd816ef352d1741f36be39f12
|
| 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.8-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | doloopio-0.3.8-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 |
4a28636331c9c99c6c22360bda8905c126537e6b2eb6b6b56bc5f02f7281a4d1
|
|
BLAKE2b-256 checksum How to use checksums |
9169b2722a65f23a15219c61f88b735b75af5dd84eee8f7f68408bc6f0614622
|
| 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.8-cp39-cp39-macosx_11_0_universal2.whl
| Download URL | doloopio-0.3.8-cp39-cp39-macosx_11_0_universal2.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.9 macOS 11.0+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
0bdbef8d10f7cb230dc2a1e59889212cebb22f00daefd9b9a6677fdf64f8c0cd
|
|
BLAKE2b-256 checksum How to use checksums |
3571b446f0c563d6a8bf581dd7f4cefee5f3df542f548ad37dd81b4292ca0bc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|