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

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

Total release size: 43.5 MB

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

Download URL doloopio-0.3.5-cp314-cp314-win_amd64.whl
Size 1.8 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
c0982b02f70e6b6b58c6f6b645485ca7482aa3068f15a802114b69f151d7510a
BLAKE2b-256 checksum
How to use checksums
b2d3828d402fc52552538e13a000e84420ff61117db73e3b7cf38d140cdca3c6
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.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.5-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
3f5e0a07b80edf550df41ea0f6731397ccb336aa8f85e7dd16873ac03f1feb09
BLAKE2b-256 checksum
How to use checksums
6d25203c7cbe0c39fd5891e196a86ab9b8877e4be2b84f74c6b52b9257eaa263
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.5-cp314-cp314-macosx_11_0_universal2.whl

Download URL doloopio-0.3.5-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
303ae4128e3dfb13f29a3c503f67e1a093cd25d4f22e2458deb1d1bda99d51f8
BLAKE2b-256 checksum
How to use checksums
53fb1730ba4929ffa7a57eccc364dbbc99973d58c11240a2893822d573650535
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.5-cp313-cp313-win_amd64.whl

Download URL doloopio-0.3.5-cp313-cp313-win_amd64.whl
Size 1.8 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
b7a7479d728d2a319001927107f2f2604fd110b910024b2f89918c516d8bbadc
BLAKE2b-256 checksum
How to use checksums
1f62e2a86d539ec952ab788f7a26768c797a3b4e23638e775c12417c8d3f78b2
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.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.5-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
0be1df314299dc18d791421d52787ec44ef30a78dd22ce0c213dcc8b0560e613
BLAKE2b-256 checksum
How to use checksums
5c411fa8c167db175d808189191fa6cd2feae430a2bc63f4911a0cefd4117308
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.5-cp313-cp313-macosx_11_0_universal2.whl

Download URL doloopio-0.3.5-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
da9fe83cff0d3f82da5a8b13a1e0978d7174dd496e8a4f32fb27dd3acc168b6f
BLAKE2b-256 checksum
How to use checksums
96bd2210f8a17a8ea68b6695e16f20dc5e2369dbb374c76025640cc18cb4c1b3
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.5-cp312-cp312-win_amd64.whl

Download URL doloopio-0.3.5-cp312-cp312-win_amd64.whl
Size 1.8 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
fa968e09ce09fef22df8c7a0fba5ba0c8fcc8ea8d11efbb8bd5591431b7fbfbd
BLAKE2b-256 checksum
How to use checksums
cde1e82e284f1f871ddac88d23a7df40af1a9c8a9813025ae5c7d0e34fb7db3e
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.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.5-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
73426307eebca6ac33228845cfd5e54a768f3c721fdfc6db9a051343d4add24b
BLAKE2b-256 checksum
How to use checksums
50f09dd8aa853e56dc914b4e4258d096654bbbcd7a32baa56573c4c2d0f10ccb
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.5-cp312-cp312-macosx_11_0_universal2.whl

Download URL doloopio-0.3.5-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
72d57cf6ff3059540c60d79bcd86e5d4ae27aceb3f00ef2e17e0b834632f7979
BLAKE2b-256 checksum
How to use checksums
e93c1cb10ba9148f3e1b6fd0b0b243fdb807a1ca14c4af7c93ce51ac26ba30df
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.5-cp311-cp311-win_amd64.whl

Download URL doloopio-0.3.5-cp311-cp311-win_amd64.whl
Size 1.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
a7b97b43c2a5d2d02dd4dc6a74f3f793489cca744563f42928fe446755cf1b8a
BLAKE2b-256 checksum
How to use checksums
19bf5c7b3b3898bf0675b9294f00676cd9e7897c66647b659195d8382118f227
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.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.5-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
6766ddb9220666d6d08d4a38ab6da790420296f25017a16795504bd9c0d58d84
BLAKE2b-256 checksum
How to use checksums
a551fd4ccc2b14027244ab5c9d46866548b224044e1634d2fa4982e95b758778
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.5-cp311-cp311-macosx_11_0_universal2.whl

Download URL doloopio-0.3.5-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
9aa339341474d35724da82e54f20c1a2ec207ff665ee84d45fb86c87fb81ac68
BLAKE2b-256 checksum
How to use checksums
a7b065965f44a04189fb6bfbb0b076cce9cbb7dccfdc78e4e0397faa53229392
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.5-cp310-cp310-win_amd64.whl

Download URL doloopio-0.3.5-cp310-cp310-win_amd64.whl
Size 1.7 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
5c01d057155e9926912433c376e646b2520e307c85a5858e039801bd02b10d45
BLAKE2b-256 checksum
How to use checksums
99f1b9422576ee22e459aad01aef209ec5504ebaae7fa58812a982e1a7e96786
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.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.5-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
6ed2debdf38eb55c97823b9c436f370cea19f8bde265be86cdde9bb83a3be1f3
BLAKE2b-256 checksum
How to use checksums
6284342df4fa3cb5c9e19655c92cb8b36af49ed6e228a89ba551295fbee6c3f3
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.5-cp310-cp310-macosx_11_0_universal2.whl

Download URL doloopio-0.3.5-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
31f1ce6cb5471c77537f06153f90c2145c4b4a4ab015fcfdf89df37fe6a4902d
BLAKE2b-256 checksum
How to use checksums
09887bbf45bf40630d3e9bc15a7d92a3b31e1b4802f4d9cfe104e5bec3585711
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.5-cp39-cp39-win_amd64.whl

Download URL doloopio-0.3.5-cp39-cp39-win_amd64.whl
Size 1.7 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
30b088fa6ebac0ec07c57729666da3c9ee3aeafc5fb893caf45e14b2d07bcf36
BLAKE2b-256 checksum
How to use checksums
2dea12f22d14e0bcf0db046c07f7a2c2485ed4c7544240054906dd567e0cfede
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.5-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL doloopio-0.3.5-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
7dc0b30379ed00238d933029207db195256fec9e43379c89b1d096b91e40254e
BLAKE2b-256 checksum
How to use checksums
c3f1b95c8cdd412ec66d6f65af5d119b1dd10ea0adc4c8cb8de95ccf870afb96
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.5-cp39-cp39-macosx_11_0_universal2.whl

Download URL doloopio-0.3.5-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
bf0ddb00ac5d7bf0aaabea0d7ae930ba11570c4da64f10152de266a1b2d08bb4
BLAKE2b-256 checksum
How to use checksums
2fdac5cfe9cf8d4401e8f0230218c9d64c7e980c6a2a20835b99290d12159c8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

0.3.8

18 release files

0.3.7

18 release files

0.3.6

18 release files

This release

0.3.5 This release

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

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