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.6
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.6-cp314-cp314-win_amd64.whl
| Download URL | doloopio-0.3.6-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1a3e4e2022940edcf8ba7961ee5b5d7cd3e0900a756687004766539ddbed7045
|
|
BLAKE2b-256 checksum How to use checksums |
e3b9ca722aa4ae9f233084c139e60005e9578e14ead1bbbee844c7fc3cd9eeb4
|
| 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.6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | doloopio-0.3.6-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 |
40e976863ef5ba0b72a355b60860a3f0f3ddcd8cefe344eb861d477f47c3f8d0
|
|
BLAKE2b-256 checksum How to use checksums |
c8a59e40d405cac7f688962897a171f20d10587f58b29c0592c1f916ce540c3d
|
| 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.6-cp314-cp314-macosx_11_0_universal2.whl
| Download URL | doloopio-0.3.6-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 |
23812409d15ee29f254c75e8bc95b89eab7eb8d87658f8795277ebdbd5f55d83
|
|
BLAKE2b-256 checksum How to use checksums |
811470ea783b14cd7d436cecbe3ef943f5f973232d67907968e22bcdd9836c0e
|
| 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.6-cp313-cp313-win_amd64.whl
| Download URL | doloopio-0.3.6-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
23d2685162a709f894d01aeac3868aa5143aa333f5de851db2479467fbe067d5
|
|
BLAKE2b-256 checksum How to use checksums |
882de914447775c1ef44197395684369bde6d25983daad3b9948cd35188219cd
|
| 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.6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | doloopio-0.3.6-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 |
fe85f69adbe8e802f9a886b71719a0d19635c5b784a1a7a7b0340eedc412e808
|
|
BLAKE2b-256 checksum How to use checksums |
7a23a28a47a4a4c534a4e67772b8ca6bea0ed069a636d623da68ad05f555a6b2
|
| 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.6-cp313-cp313-macosx_11_0_universal2.whl
| Download URL | doloopio-0.3.6-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 |
5d327113851551e27f88a599a416370e68494f50f4c5e73743bbdd7905fddadf
|
|
BLAKE2b-256 checksum How to use checksums |
19d62bc891f692709ee5479e9b80708f6a1cf9b9160224ed43770c839373639b
|
| 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.6-cp312-cp312-win_amd64.whl
| Download URL | doloopio-0.3.6-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
2126a55a39ba5fdff801ab1f25db6a889a2759c3ba469574a065a6757601b082
|
|
BLAKE2b-256 checksum How to use checksums |
449bcde8a5db9b29fea48fc52caf22a36fe22af1e0aba4066f69aa5630578adf
|
| 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.6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | doloopio-0.3.6-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 |
d0e035c95bef02c199b7ff7bc9f76e24f2055b8d8cc4dcb3649b2cfce235c5df
|
|
BLAKE2b-256 checksum How to use checksums |
d8969ae42c48542732b2974097411a73587b2a00be63c85eb82d17092ae8c727
|
| 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.6-cp312-cp312-macosx_11_0_universal2.whl
| Download URL | doloopio-0.3.6-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 |
882911942873fb45abaee0bfff238da605dda8ec100801e6d084425c63228255
|
|
BLAKE2b-256 checksum How to use checksums |
0c83d115a265218df902f8fd05ee65c10dc9a808cb36c519b241b9e63173b670
|
| 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.6-cp311-cp311-win_amd64.whl
| Download URL | doloopio-0.3.6-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
8084a697f96d08182c463f96327a084fc53c524deca08bff7b453b578ac6dd50
|
|
BLAKE2b-256 checksum How to use checksums |
1995f666d91ff5eb6051d8196180c9e366e2e19110d8b6afc6240a5024bed409
|
| 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.6-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | doloopio-0.3.6-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 |
e659a058d6ea870a5e1afb8bf5686faf132ec0a3366aef583fb99f713837ab88
|
|
BLAKE2b-256 checksum How to use checksums |
1d8f5dbdd5f6d027719abd71b02c56b0ff2a20dbac4433ba4deb946edd1a3730
|
| 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.6-cp311-cp311-macosx_11_0_universal2.whl
| Download URL | doloopio-0.3.6-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 |
016974f0c8bcfd99eb1184ee226a9f386bac92342adc01e5ce9c690f3230e5e0
|
|
BLAKE2b-256 checksum How to use checksums |
6cac21600c651fe46ef297368cc6e4e33270a125e0b36dfa3ed4f23447144148
|
| 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.6-cp310-cp310-win_amd64.whl
| Download URL | doloopio-0.3.6-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0c8ec40fe99165e7c493d27c70e10a627d935ca62b6c4d4b1e7ae7da02d25e16
|
|
BLAKE2b-256 checksum How to use checksums |
ee143a123ab29ff46b92c435e61d22dddae3ca2024d772d17df507d5e4edaaf4
|
| 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.6-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | doloopio-0.3.6-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 |
bb136960a0830d138d341d1787a7a685e7dd3ec2f2bd8ad21425fc81cb599066
|
|
BLAKE2b-256 checksum How to use checksums |
bc9aff3108e5495f7028fd9772c380c03236c70c1aeef9af4f79592c64e4955e
|
| 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.6-cp310-cp310-macosx_11_0_universal2.whl
| Download URL | doloopio-0.3.6-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 |
0875f16cec6c06a849250b275ca7f02244a07a92740628189c262d8da5866fdc
|
|
BLAKE2b-256 checksum How to use checksums |
26331fc7a00d33a1d32cba1c9ae2ea33ec574f64c685cf49927e4920929fbb9c
|
| 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.6-cp39-cp39-win_amd64.whl
| Download URL | doloopio-0.3.6-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a0e01389ab64220a083d3f8c227fa0dfeba956ee6086d911b452a09243c71a84
|
|
BLAKE2b-256 checksum How to use checksums |
eef5ea8b4112e7476edac458a80714bad4356c943d557b94334f7ef7dc572922
|
| 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.6-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | doloopio-0.3.6-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 |
c94b2bffb3cc7257ded9c91adc9065464cfa266775017a2823069bd08302f364
|
|
BLAKE2b-256 checksum How to use checksums |
cccaf3a6a6ac92b7fa24b6dd21ae5b308009eb124af822e8fb2babff149f959e
|
| 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.6-cp39-cp39-macosx_11_0_universal2.whl
| Download URL | doloopio-0.3.6-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 |
9c296e2685abea0cfc2f55c9e2611b2b9587a92654ce35b170a3e63ac2b98416
|
|
BLAKE2b-256 checksum How to use checksums |
3abdc3c6575aefb363ede75ace2a4ed8667e131c70bbd818d60ae2ed3e1b4875
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|