@deverge/confidence
v0.1.6
Published
Confidence sidecar CLI — deterministic constitution enforcement. AI at authoring time, determinism at enforcement time.
Maintainers
Readme
@deverge/confidence
Deterministic constitution enforcement for AI-generated and citizen-developed code.
AI at authoring time, determinism at enforcement time. The LLM helps write the ruler; it never eyeballs the measurement. There is no LLM anywhere in this binary.
confidence runs your repo's constitution — machine-readable, owned, provenance-linked
engineering standards living in .confidence/ — against a change-set, using the lint/analysis
engines you already trust (ESLint, Semgrep, Larastan, Pint, Pest), and reports honestly:
what was verified, what failed (with evidence), and what no rule governs at all.
Why not just CI?
Your CI could enforce your standards today. It doesn't — because lint configs have no authoring
loop, no owner, no provenance, and no lifecycle. Standards live in review comments instead,
applied by hand, at the most expensive moment. confidence is the pipeline that turns a
repeated review comment into an owned, fixture-tested, deterministic rule — and tells you,
per change, what is and is not covered.
- No tested rule, no enforceable claim — every rule ships with failing/passing/mutation fixtures and must prove them (from randomized paths) before it may enforce. Fail closed.
- Honest coverage — claimed per rule construct only; ungoverned changes are listed as
UNCLASSIFIED — human judgment required. No scores, no percentages, no false confidence. - The author never controls the gate — changes are judged by the base branch's constitution; policy changes ship in CODEOWNERS-gated, constitution-only PRs.
- Audited overrides, no bypass flag — waivers name an approver (≠ author), a reason, and an expiry, and are stamped into the replayable report artifact.
- Blocking is earned — rules start advisory and graduate on evidence; noisy rules auto-demote. Rule failure is a product signal, never user blame.
Usage
npm i -D @deverge/confidence
npx confidence run --base origin/main --head HEAD # PR gate: report + comment + exit code
npx confidence run --staged # local: ~2s, emits a commit trailer
npx confidence validate # meta-gate: schema + fixture proofExit codes: 0 clean · 1 blocking failure(s) · 2 meta-error / excluded blocking rule
(fail closed). Advisory findings never affect the exit code.
Agent integration is the absence of integration: exit codes and a trailer line. No MCP server, no prompt content, zero context cost.
Status
v0.1 — working spike. Constitution schema v1 (see the spec in the source repo). ESLint adapter battle-tested; Semgrep contract-tested; Larastan/Pint/Pest adapters awaiting integration hardening against a production Laravel codebase.
License
Apache-2.0 · © 2026 Deverge
