FREE OPEN-SOURCE CLI · MIT LICENSE
Every number is real. Are there enough of them to support the claim?
Three CMBS trusts summing to $310M against a $450M whole loan is 100% real math and still missing $140M. coverage measures denominator completeness, over-coverage double counts, Kish effective sample size (n_eff), and independent origins (n_indep), emitting six policy_signals bands that assess gates on deterministically.
Three verified notes sum to $310M, which is 68.89% of the $450M whole loan ($140M unaccounted for).
Every row is real and adds up exactly, yet $140M of the declared whole loan is missing. coverage classifies this as PARTIAL_KNOWN_MISSING (exit 1) so downstream policy cannot mistake a partial sum for the full loan.
| policy_signals band | Status | Measured evidence |
|---|---|---|
| universe_band | PARTIAL_KNOWN_MISSING | 310000000 of 450000000 (gap 140000000) |
| sample_adequacy_band | NOT_APPLICABLE | n=3, n_eff=2.88, top-1=40.32% |
| field_completeness_band | NOT_APPLICABLE | 3/3 rows carry measured values (100.0%) |
| universe_agreement_band | NOT_APPLICABLE | Bind multiple --universe NAME=PATH rosters to check pairwise Jaccard agreement |
Exact BigInt decimals on your device · Zero uploads (works with Wi-Fi off)
Inspect coverage.report.v0 JSON, assess routing & CLI command
COVERAGE
PARTIAL
Spec: cmbs.pari_passu.whole_loan.v1 (exact_sum)
Observed: observed_notes.csv (3 rows)
Universe: PARTIAL_KNOWN_MISSING
mass: 310000000 of 450000000 declared (68.89%)
unexplained gap: 140000000
Universe agreement: NOT_APPLICABLE
Field completeness: NOT_APPLICABLE
Sample adequacy: NOT_APPLICABLE
n=3, n_eff=2.88, top-1 share=40.32%
Stratum balance: NOT_EVALUATED
Identity resolution: NOT_EVALUATEDRun locally & gate with assess
coverage observed_notes.csv --spec cmbs_pari_passu_whole_loan_v1.yaml --declared-total 450000000 --json > coverage.report.json || [ $? -eq 1 ]
assess coverage.report.json --policy market_claim.assess.yaml --jsonClient-side coverage.report.v0 engine (exact BigInt decimals · WASM-ready): Runs locally in browser memory with zero uploads (try it with Wi-Fi off). Mirrors coverage v0.1.0 exact decimal sums, Kish n_eff, n_indep, and policy_signals bands, and swaps onto compiled @cmdrvl/web Rust WASM via registerCoverageWasmKernel().
Claude Artifacts · @cmdrvl/web
Build a zero-upload population coverage & sample-adequacy gate inside Claude
Paste this prompt into Claude.ai to spin up a client-side coverage.report.v0 calculator that catches partial pari passu sums, over-coverage double counts, and concentrated market averages completely offline.
Build an interactive React Claude Artifact called "CMD+RVL Population Coverage & Adequacy Gate (coverage)" that checks whether observed records actually support a whole-loan or market-level claim completely in browser memory with zero uploads.
Follow CMD+RVL's coverage.report.v0 and coverage.spec.v0 contracts (https://github.com/cmdrvl/coverage):
1. Include 3 presets (3 CMBS pari passu trusts summing to $310M vs $450M declared whole loan -> PARTIAL_KNOWN_MISSING with $140M gap, 4 notes summing to $510M vs $450M declared -> OVER_COVERAGE, and 12 loans where one loan is 84% of balance across 2 origin filings -> n_eff=1.41, n_indep=2, INSUFFICIENT) plus an offline Step 4 CSV upload/editor.
2. Use exact decimal arithmetic (refuse formatted strings like $5 or 1,000 with E_BAD_CELL, negative weights with E_NEGATIVE_WEIGHT, and repeated keys with E_DUPLICATE_KEY) and report UNKNOWN_UNIVERSE when no denominator is bound.
3. Compute Kish effective sample size n_eff = (sum w)^2 / sum(w^2), top-1 weight share, connected-component independent origin count n_indep, and the six assess-ready policy_signals bands.
4. Lead with a plain-English verdict headline and policy_signals table, putting the CLI text and coverage.report.v0 JSON inside a collapsed inspector drawer.Run it locally
Install coverage
Install coverage via Homebrew, or pass --coverage coverage.yaml through cmdrvl check alongside verify rules.
coverage CLI (v0.1.0)
Measures k/N roster coverage, observed mass vs --declared-total, pairwise Jaccard agreement across multiple rosters, Kish n_eff, n_indep, and stratum balance offline.
1. Install via Homebrew
brew install cmdrvl/tap/coverage2. Run locally
coverage observed_notes.csv --spec pari_passu_whole_loan.coverage.yaml --declared-total 450000000- Output schema
- coverage.report.v0 (six policy_signals bands)
- Input formats
- CSV, TSV, JSONL, Parquet, XLSX (FILE.xlsx#Sheet)
- Arithmetic
- Exact decimal sums & exact ratios (never floats)
- Exit codes
- 0 ADEQUATE · 1 PARTIAL/INADEQUATE · 2 REFUSAL
For scripts and CI: standalone coverage binary, exit codes, and refusal codes
Guard exit 1 & pipe straight into assess
View cmdrvl/assess on GitHub ->Exit 1 is a normal finding (PARTIAL or INADEQUATE), not a crash. Guard exit 1 in set -e scripts so refusals (exit 2) still fail loudly.
Install standalone binary
cargo install --git https://github.com/cmdrvl/coverageInvoke directly
coverage loans_canon.csv --spec market.coverage.yaml --universe market=all_300_loans.csv --json > coverage.report.json || [ $? -eq 1 ]Exit codes & verdicts
ADEQUATE
Exit 0
Every evaluated band met the spec thresholds.
PARTIAL or INADEQUATE
Exit 1
Usable with a stated gap (PARTIAL_KNOWN_MISSING, THIN_SAMPLE, SKEWED) or inadequate (OVER_COVERAGE, UNKNOWN_UNIVERSE, CONCENTRATED, INSUFFICIENT, SPARSE, STRATUM_MISSING).
REFUSAL
Exit 2
No verdict produced. Emits a typed E_ code (such as E_DUPLICATE_KEY, E_BAD_CELL, E_NEGATIVE_WEIGHT, or E_INPUT_DRIFT) and a recovery hint.
Common refusal & finding codes
| Code | When it fires | Remediation |
|---|---|---|
| E_DUPLICATE_KEY | An entity key appears on more than one row | Reduce multi-period panels to one row per entity before running coverage |
| E_BAD_CELL | Null key/weight or formatted string ($5, 1,000) instead of plain decimal | Normalize weights and values to plain decimals upstream |
| E_NEGATIVE_WEIGHT | A balance or weight is below zero | Filter or investigate negative balances before aggregating |
| E_BAD_DENOMINATOR | --declared-total is not a positive plain decimal | Pass a positive plain decimal without commas or currency symbols |
| E_INPUT_DRIFT | --lock detected that a bound file changed bytes since locking | Re-verify the upstream lockfile before publishing a coverage verdict |
Learning progression
Move forward or back in the workflow.
coverage sits right after canon and verify, and directly upstream of assess. verify proves observed rows are authentic; coverage proves there are enough independent rows to support the claim before assess assigns PROCEED or BLOCK.
- 01rvlSee what moved
- 02shapeCheck compatibility
- 03profileScope columns
- 04verifyEnforce rules
- 05packSeal proof
- 06veilGuard privacy
Upstream step
canon (resolve entity keys first)
coverage compares keys byte for byte and carries canon's unresolved and ambiguous rows forward as coverage intervals.
Next step
assess (route on policy_signals)
Pipe coverage.report.v0 into assess so OVER_COVERAGE or INSUFFICIENT samples automatically trigger BLOCK or PROCEED_WITH_RISK.
What coverage handles
- Measures observed rows and mass against bound --universe NAME=PATH rosters, --declared-total / --declared files, or both (never assumes 100% when unbound)
- Detects double counting and basis defects via OVER_COVERAGE whenever observed mass exceeds over_coverage_max
- Computes Kish effective sample size n_eff = (sum w)^2 / sum(w^2), top-1 weight share, and independent origins n_indep from --origin-col
- Carries canon's unresolved and ambiguous records forward as explicit [confirmed, upper bound] coverage intervals via --canon-status-col
- Emits six assess-ready policy_signals bands with exact decimal arithmetic and order-independent determinism
Explicit boundaries & limits
- Expects one row per entity; multi-period panels (loan by month) must be reduced to one period first or E_DUPLICATE_KEY triggers.
- Compares entity keys byte for byte (LN-001 and ln-001 differ); run canon first to align identifiers.
- Measures coverage only: it never extrapolates missing population or invents bootstrap confidence intervals.
- Cairn roles
- Software factory
- Evidence roles
- Checks and support, What is missing
- Semantic context
- Entity identity, Source meaning
- Contribution
- Measure denominator completeness, over-coverage double counts, Kish effective sample size, and independent origins, emitting six policy_signals bands for assess.
- Limit
- Coverage reports how much of the claimed population is observed; it does not extrapolate missing records or validate individual cell accuracy.
Questions this tool can support
- Which other loans in this deal are behind?
Measure observed population coverage against a bound roster or declared aggregate total and flag partial or over-covered pools before summarizing a deal. Coverage measures sufficiency, not whether individual values are right.
Potential use, not demonstrated here
- Do we own any bonds backed by those loans?
Check observed balances, Kish effective sample size, and unresolved canon intervals against a declared fund or whole-loan denominator. It does not extrapolate missing records.
Potential use, not demonstrated here
Open-source starter -> Paid lineage stack
Start free on local files. License the paid stack for warehouse-wide lineage.
Open-source Rust CLIs and @cmdrvl/web browser engines cut document token spend 10x to 100x locally and work alongside any AI assistant or hosted workspace (Rogo, Hebbia, Harvey, Claude, ChatGPT, or Codex). When your firm needs end-to-end lineage across Snowflake or your cloud warehouse (Reveal catalog, paid MCP servers, Evidence MCP receipts, x402 APIs, and offline twinning and evals), license the paid stack or start with a $500 half-day founder workshop.
Complete open-source CLI suite (17 interactive offline demos)
Explore every deterministic tool in the spine.
Intake & identity
Compare & validate
Reconcile, decide & seal
Workstation guardrails (CLI-only)
Common questions
- Why isn't verify enough on its own?
- verify checks that the rows you have are accurate and grounded. It does not check whether 3 trusts summing to $310M actually represent a $450M whole loan, or whether a market average rests on one dominant borrower. coverage measures population sufficiency and sample concentration deterministically.
- What happens if I don't bind a universe roster or declared total?
- coverage emits universe_band: UNKNOWN_UNIVERSE instead of assuming 100% completeness. Unless your coverage.spec.v0 explicitly sets allow_unknown_universe: true, the run returns INADEQUATE (exit 1).
- How does Kish effective sample size (n_eff) catch concentration?
- n_eff = (sum w)^2 / sum(w^2). If every loan has equal balance, n_eff equals n. If 12 loans include one loan holding 84% of the total balance, n_eff collapses to 1.41, proving the weighted average is effectively a single-loan reading.
- Why does coverage refuse $1,000 or duplicate keys instead of cleaning them?
- Silently stripping formatting or deduplicating rows hides upstream pipeline bugs. Twelve monthly snapshots of one loan are not twelve loans, so coverage exits 2 with E_DUPLICATE_KEY or E_BAD_CELL and tells you the exact fix.