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.7
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.7-cp314-cp314-win_amd64.whl
| Download URL | doloopio-0.3.7-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
23d54f335f320f185572513e42902f9e4e05915984a20142b16d0c4241f5eba1
|
|
BLAKE2b-256 checksum How to use checksums |
c09c4c3ed5f0983e8b35fbb979edb4dad516ddb299960bafa14529a50e027d9e
|
| 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.7-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | doloopio-0.3.7-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 |
1fadc491df868abefe880fb2c8e99ba61d2fb6541bd01cc5b1eb474cf6307cbb
|
|
BLAKE2b-256 checksum How to use checksums |
c1804ed2468f6be620741cf694736653ad60f6d81cf08cb5a8c831580d90ded2
|
| 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.7-cp314-cp314-macosx_11_0_universal2.whl
| Download URL | doloopio-0.3.7-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 |
ab600c5707ddbd2415b859165f93ac0f7168d930136f08ee0eb8bb9bea97a9d4
|
|
BLAKE2b-256 checksum How to use checksums |
41a5f0a991df4d2fad69744089c82e69cea1a7b3128ff3f1e8da854640aa119a
|
| 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.7-cp313-cp313-win_amd64.whl
| Download URL | doloopio-0.3.7-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
bc4c1cef612899cf037d646a74d7c350dd4c2e5f5376b6e442af1ce840a93001
|
|
BLAKE2b-256 checksum How to use checksums |
5497f0a0db52218bd98067dde39bedac53839bc407e49862db0612ecd25948c2
|
| 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.7-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | doloopio-0.3.7-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 |
77efbea735384f146f5bd024fd8330458417bc7383634eb48aa7817bb097c313
|
|
BLAKE2b-256 checksum How to use checksums |
1e15e28fcc4aaa565da9d987e539cd8c76703e57ae109b2d0a66f1b2dc9851c8
|
| 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.7-cp313-cp313-macosx_11_0_universal2.whl
| Download URL | doloopio-0.3.7-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 |
acb75ecafc74c65b295f9f91d2f55d7a98b4872d7e3d1b46d1c2e8c759659307
|
|
BLAKE2b-256 checksum How to use checksums |
6b7b93cdbf7042e4201b25355a5958da3dad293491034a5a20b1d09412432f6b
|
| 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.7-cp312-cp312-win_amd64.whl
| Download URL | doloopio-0.3.7-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d1ccddacf5ea15ab867ba9c4d16e5213e04d04f9fbbafece09c27a31efd34a1f
|
|
BLAKE2b-256 checksum How to use checksums |
64a170a69230eb02135641797046575ea056246d7e6f541aa53abdae93d70f4c
|
| 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.7-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | doloopio-0.3.7-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 |
990e685e37cd0956153c4ff2972a28e67cd00ca1411c91e1bce7370c8bd89260
|
|
BLAKE2b-256 checksum How to use checksums |
e1447deb9e46a9f117745c8b18dd702839b37657205054043f1674e4f404929e
|
| 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.7-cp312-cp312-macosx_11_0_universal2.whl
| Download URL | doloopio-0.3.7-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 |
b3a6568016326908524e81dc50ed8cb107decdc733e64d89f9b8099dbf96ed09
|
|
BLAKE2b-256 checksum How to use checksums |
cde98e24819c1e6984520ac4a1873aba13ae7bb6b42a635a22fa11e1f49acbab
|
| 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.7-cp311-cp311-win_amd64.whl
| Download URL | doloopio-0.3.7-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b8d86669de756e89599bb88d8b2f7ea5926f7ad63ac2db0c73e73efb3463740d
|
|
BLAKE2b-256 checksum How to use checksums |
cd59f9d52ee847bab5c0c61e3cdc3907f0e8090ec96d69d4351417191cba157d
|
| 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.7-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | doloopio-0.3.7-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 |
23aa10a9ea92bd3773854049d28614ce7e6de00ee9b57d630ce747aa79fd27bd
|
|
BLAKE2b-256 checksum How to use checksums |
2351c432def3a3ce0d6d814e54a6688abaa8c30851a936ec245cc263d62775fe
|
| 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.7-cp311-cp311-macosx_11_0_universal2.whl
| Download URL | doloopio-0.3.7-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 |
5ad19daf92241e1f90300e08d2499e8eefe0fc33bd80781647cc11387f4800a0
|
|
BLAKE2b-256 checksum How to use checksums |
de10978788776c374e239a87eb4ae29237fd51cc185617dff8bba56be00ad314
|
| 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.7-cp310-cp310-win_amd64.whl
| Download URL | doloopio-0.3.7-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
332182fbb4f33e23c2063a34a8b3b99ebe6642ba807436adaa1726ea79852241
|
|
BLAKE2b-256 checksum How to use checksums |
d81ca0ba5a99fca75c9b28b1cf1c0a00b516ff87c8fa15c4317c4225dea01793
|
| 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.7-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | doloopio-0.3.7-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 |
2add392e62ebe8cad359b4426a0fda1bee28e40c8476aabde6a948889d893dfc
|
|
BLAKE2b-256 checksum How to use checksums |
9584d62648c498b232978144d1c95e3500c4f777113f8b8e5fc663d882197ac1
|
| 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.7-cp310-cp310-macosx_11_0_universal2.whl
| Download URL | doloopio-0.3.7-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 |
755b77651a3261607aebb557e201c178d938d0d66697c8683dbd01107e390073
|
|
BLAKE2b-256 checksum How to use checksums |
512b3caf59fad364c5d220f31b8dbb6f5c93dd1d4ebac4865738331ce44896f4
|
| 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.7-cp39-cp39-win_amd64.whl
| Download URL | doloopio-0.3.7-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2c6f0b7821eae73b4428cf6c2c72aba53db0ef6072c8d3a9e2445dd8fec56099
|
|
BLAKE2b-256 checksum How to use checksums |
1c4d0e4d32464214d82fe3a9aa0d1d4edc0016885af54a47c0c84256e4a99fda
|
| 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.7-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | doloopio-0.3.7-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 |
422bc3f66fe64d9c98152decd453cff61e2389410b09ff005e918a75a7979340
|
|
BLAKE2b-256 checksum How to use checksums |
01cd14ad1ec2533c0064fb6ada90c7f8501f0c44b6eefe958dd25cf22116df27
|
| 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.7-cp39-cp39-macosx_11_0_universal2.whl
| Download URL | doloopio-0.3.7-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 |
1fa93df93b6ccc5589ea743b24e16b3128dced62c264ca7171a94aaaf0fadb1b
|
|
BLAKE2b-256 checksum How to use checksums |
a7fb22977e2641cbecc33a175b96da7c5ccf5364eec0513c4b70bac34186007f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|