AI Needs More Structure: From XBRL Filings to Browser-Verified Audit Trails
Written by Zac Ruiz.
XBRL US proved structured SEC filings cut AI token usage nearly in half. The same logic applies to all seven boundaries between a 10-K filing and a chart audited six months later. Test every claim live in compiled Rust WebAssembly inside this post with Wi-Fi turned off.XBRL US proved that structured SEC filings cut AI token usage nearly in half and keep models out of unaudited press releases. They are right, and the same logic applies to every boundary between the SEC filing and a chart audited six months later.
In November 2026, XBRL US published an experiment titled "AI Needs Structure, and Structure Needs AI." They gave Claude a straightforward financial question: compare three years of gross margin and operating margin across the four largest US grocery chains (Walmart, Kroger, Costco, and Albertsons).
They ran the task two ways. In the first run, Claude queried structured XBRL facts through XBRL US's hosted MCP server (their AI Connector over the XBRL US Public Filings Database). In the second run, Claude worked from unstructured documents.
Both runs reached the same numbers, and the gap between them made XBRL US's point. The unstructured run burned 20,912 tokens, hit a 100,000-character cutoff on the 10-Ks, and fell back to shorter, unaudited earnings press releases. The XBRL MCP run used 11,801 tokens (roughly 44% fewer) and pulled directly from audited SEC financial statements.
I agree with every claim in their post. XBRL is some of the best public financial infrastructure we have, and giving language models a semantic layer beats scraping HTML tables.
My argument is that structuring the filing is only the first layer. In real financial work, a number crosses seven boundaries before anyone acts on it: the upstream regulator and delivery channel, warehouse ingestion and transformation, the agent read boundary, deterministic calculation and policy gating, crossing authority and whole-run obligations, model egress attestation, and finally downstream publication where someone has to audit both the text and the chart six months later.
Most AI finance tools today structure at most the first layer (if they use XBRL) and then paste a hyperlink next to the output and call it "source-backed." To show what the whole chain looks like when every boundary is structured and machine-checkable, I reproduced XBRL US's exact four-grocer analysis end to end using our open-source tools at github.com/cmdrvl (browsable on /tools/), our newly released portal v0.1.0, veil, airlock, cmdrvl-evidence, and the x402 Evidence Pack API.
Part I: Checking XBRL US's math
Before building anything on top of someone else's analysis, you verify their numbers. I pulled the SEC EDGAR XBRL companyfacts JSON files for Walmart (0000104169-26-000055), Kroger (0001104659-26-037723), Costco (0000909832-26-000093), and Albertsons (0001646972-26-000032), covering the latest three audited fiscal years for each company.
XBRL US's chart subtitle states their exact denominator: "Margin as % of total revenue, latest three fiscal years per company." Under (Total Revenue - COGS) / Total Revenue and Operating Income / Total Revenue, every labeled number in their chart matches the audited 10-K filings to a tenth of a percent:
| Company / FY End | Audited 10-K ($M) | Gross Margin | Op. Margin | ||||
|---|---|---|---|---|---|---|---|
| Revenue | COGS | Op. Inc. | Chart | 10-K | Chart | 10-K | |
Walmart FY 2026-01-31 | $713,163M | $535,395M | $29,825M | 24.9% | 24.93% | 4.2% | 4.18% |
Kroger FY 2026-01-31 | $147,642M | $113,240M | $1,890M | 23.3% | 23.30% | 1.3% | 1.28% |
Costco FY 2026-08-30 | $303,154M | $264,279M | $11,685M | 12.8% | 12.82% | 3.9% | 3.85% |
Albertsons FY 2026-02-28 | $83,172.5M | $60,565.8M | $727.6M | 27.2% | 27.18% | 0.9% | 0.87% |
Their footnote on Kroger's latest operating margin ("~$2.7B of impairment and store-closure charges") also matches the filing (us-gaap:RestructuringCostsAndAssetImpairmentCharges = $2,684M).
XBRL US got the right numbers. The more interesting question is what happens when you engineer the entire pipeline around those numbers so that speed, cost, privacy, authority, and six-month auditability are properties of the artifacts rather than hopes about a prompt.
Part II: Same analysis, 156 milliseconds end to end
Even with XBRL MCP, Claude spent 11,801 tokens to produce 24 percentages across four companies. Most of that spend goes into pulling raw JSON facts into a model context window and asking the LLM to filter periods, align tags, subtract COGS from revenue, and divide.
Language models are useful for framing questions, reading footnotes, and drafting memos. Asking an LLM to fetch raw XBRL rows and do division inside its context window is like asking an analyst to multiply twelve pairs of numbers on a whiteboard from memory.
Running the same 13.4 MB of audited SEC XBRL JSON through our core open-source verification pipeline (vacuum, hashbytes, lock, shape, rvl, verify, coverage, assess, pack) finishes locally in 78.4 milliseconds. Extending that run across the entire end-to-end admissibility, boundary, obligation, and six-month grounding stack (veil, portal, airlock, covenant, and verify ground over both prose and an SVG chart) finishes in 155.7 milliseconds warm wall clock on a MacBook, using zero LLM tokens to compute, verify, gate, or seal:
| Approach | Tokens Used | Execution Time | Source Basis | Offline Verifiable? |
|---|---|---|---|---|
| Unstructured docs + Claude (XBRL US) | 20,912 | Minutes (multiple retries) | Fell back to unaudited earnings releases | No |
| XBRL MCP + Claude (XBRL US) | 11,801 | Tens of seconds | Audited 10-K XBRL facts | No (live API + LLM context) |
| XBRL data + core verification CLIs | 0 (~700 to narrate assess + rvl) | 78.4 ms | Audited 10-K XBRL facts, SHA-256 locked | Yes (pack verify: OK) |
Full end-to-end stack (veil + core + portal + airlock + covenant + verify ground + pack) | 0 (385 bytes attested telemetry if narrating) | 155.7 ms | Locked 10-Ks + locked memo & SVG chart | Yes (pack verify: OK, 12 sealed members) |
Here is the actual warm timing breakdown across every command in the end-to-end run:
veil hook (2 checks) : 5.1 ms # deny raw private read; allow shapevacuum : 3.4 ms # discover raw SEC JSON inputshashbytes : 17.6 ms # SHA-256 hash 13.4 MB of filingslock : 3.2 ms # emit grocers.lock.jsonshape : 3.1 ms # check Y2 vs Y3 schema compatibilityrvl : 3.0 ms # rank YoY margin change contributorsverify compile+run : 31.2 ms # compile & evaluate accounting rulescoverage : 3.5 ms # check entity & stratum completenessassess : 2.1 ms # route through hashed decision policyportal compile : 18.0 ms # compile boundary policy to SHA-256 IRportal gate check : 18.2 ms # evaluate crossing & open obligationsairlock assemble : 3.5 ms # strip forbidden keys; write not_crossedairlock verify : 9.5 ms # attest STRICT_TELEMETRY_ONLY manifestcovenant replay : 18.4 ms # replay full run & verify obligationsverify ground (9 claims) : 8.5 ms # ground memo prose + SVG chart barspack seal : 4.0 ms # seal all 12 artifacts into pack.v0pack verify : 3.3 ms # verify bundle integrity offline------------------------------------Total (unrounded sum) : 155.7 ms
At 156 milliseconds for the full stack, running every check on 500 companies or nightly in CI costs pennies of compute and leaves model tokens for footnote analysis and writing.
Part III: Extending lineage all the way back to channel and provider
A lot of AI finance products call themselves "source-backed." Usually that means two data points: an answer and a citation link to a filing page. Even enterprise data catalogs usually stop at the warehouse boundary, drawing a DAG that says table B came from table A without proving which external organization published the file, under what license and delivery channel, at what URL, or whether the landed bytes match.
Full lineage has to reach past the warehouse edge back to the provider and channel. That is the job of cmdrvl-evidence and our metadata catalog (cmdrvl-reveal).
When an agent traces an XBRL fact table such as STG_EDGAR_XBRL_FACTS, cmdrvl-evidence separates four distinct upstream layers that most systems collapse into a single vague footnote:
Data Provider : data_provider://u.s. securities and exchange commission (https://www.sec.gov/)|Data Channel : data_channel://u.s. securities and exchange commission/sec edgar apis/api(type: api, license: public_domain, url: sec.gov/edgar/sec-api-documentation)|Ingestion : evidence.trace_ingestion -> authoritative filing URL (cik + accession + date_filed),landed S3 object bytes + SHA-256 + landed_at, PLUS explicit `missing` list|Transformation: evidence.trace_lineage -> s3 landing prefix -> external table -> staging SQL modelwith exact Git repo path + ref (inspectable via evidence.read_source)|Local Lock : vacuum | hashbytes | lock -> grocers.lock.json (lock_hash: sha256:fcfe2b48...)
Look closely at two details in a real evidence.trace_ingestion receipt returned live against STG_EDGAR_XBRL_FACTS:
{"table": "STG_EDGAR_XBRL_FACTS","traceable": "partial","receipts": [{"source": "sec_edgar_filing","accession": "0001428205-20-000085","cik": "1428205","date_filed": "2020-02-19","filing_url": "https://www.sec.gov/Archives/edgar/data/1428205/000142820520000085/0001428205-20-000085-index.htm","s3_object": "s3://edgar-data-full/extracted/20200219/0001428205-20-000085/10-K/arr12312019-10k.htm","bytes": 4043411,"sha256": "1a348c96ba8bf2fe0fc9198238baed8b9ec893624aa4a78c28518f6463cc0d0c","attested_from": "landed_copy_at_call_time","landed_at": "2026-09-29T02:05:35Z","missing": ["endpoint", "http_status", "fetched_at"]}],"admissibility": {"standard_version": "1.1","confidence": "declared_contract","determinism": "deterministic","verifiable_id": "sha256:4a67bfbca9390550136b51aec93372b44ae727440de727c4f549acdf2bd10d17"}}
Notice what makes that receipt trustworthy: it refuses to bluff. Where our scraper-based channels (such as Treasury curve feeds) write provenance sidecars recording the exact HTTP endpoint, status code, and fetch timestamp alongside the SHA-256 of the raw response, the EDGAR extraction pipeline recorded accession numbers and landed copies without fetch-time HTTP metadata. Instead of hiding that gap, evidence.trace_ingestion explicitly marks traceable: "partial", lists missing: ["endpoint", "http_status", "fetched_at"], distinguishes landed_at from fetched_at, and attaches a typed admissibility level (declared_contract > parsed_lineage > inferred_from_code) with a content hash (verifiable_id).
When we pull the four grocer companyfacts JSONs locally into our workspace, vacuum | hashbytes | lock extends that chain right onto local disk (lock_hash: sha256:fcfe2b48..., pinning all four raw SEC files totaling 13,422,883 bytes). Every downstream artifact links back to that exact lockfile.
Part IV: The middle boundaries (veil, portal, airlock, covenant)
Public 10-K filings are public, so it is fair to ask why privacy guards, boundary compilers, and model egress proofs belong in a post about grocery margins.
The answer is how institutional work actually happens. On a buy-side analyst's laptop or a credit desk workstation, public SEC filings do not live in an isolated toy folder. They sit next to client portfolio positions, internal credit memos, investment committee notes, and proprietary price targets. The moment you turn a coding or research agent loose in that workspace, four separate control questions appear:
- Can the agent read raw sensitive files into its prompt context? (
veil) - Does a specific derived action have authority to cross a boundary, and what downstream obligations does clearing it create? (
portal) - Can you prove which exact bytes crossed to the LLM endpoint and which sensitive fields did not? (
airlock) - At the end of the run, can an auditor replay the trace and prove every opened obligation was actually fulfilled? (
covenant)
1. Guarding the read boundary (veil)
veil sits in front of the agent as a PreToolUse hook (and on macOS, opt-in veil sandbox + veil exec adds OS Seatbelt confinement through a read-only broker). In our test workspace, we placed a synthetic internal file (private/client_portfolio_positions.csv) beside the public grocer extracts.
When an agent tries to read the portfolio file directly, veil intercepts the tool call before execution:
{"hookSpecificOutput": {"hookEventName": "PreToolUse","permissionDecision": "deny","permissionDecisionReason": "direct read of a path matched by compliance.financial is blocked by policy default"}}
When the same agent runs an authorized metadata tool (shape work/grocers_y2.csv work/grocers_y3.csv), veil returns "permissionDecision": "allow".
We should be candid about the boundary of veil itself, because veil's own README documents its bypass matrix publicly (162 of 217 test vectors blocked in hook-only mode, 27 still allowed via tricks like hardlinks or runtime-constructed paths): hook-only mode is parser-based preventive defense, while veil sandbox adds kernel path-deny enforcement on macOS. Neither hook nor sandbox alone proves what later crossed an outbound HTTP request to an LLM. That requires the next two tools.
2. Compiling boundary authority (portal v0.1.0)
We just shipped v0.1.0 of cmdrvl/portal, written in Haskell. portal splits boundary controls into three clean pieces: a compiler (portal-compiler) that normalizes a declarative JSON policy (or a FINOS CALM control via from-calm) into a stable SHA-256 intermediate representation (portal.ir.v0), a stateless gate (portal-gate) that checks one crossing request against that IR, and an obligation replayer (covenant).
For our grocer study, we compiled a 3-rule egress policy (model-narration-egress) requiring public classification, an assess band of PROCEED or PROCEED_WITH_RISK, and destination llm-summary, opening two mandatory obligations on clearance: airlock-attest and seal-pack.
portal-compiler compile work/portal.policy.json compiled it in 18.0 ms to a deterministic policy digest: sha256:7d87c257a21c5a15... (insensitive to rule or value ordering, rejecting unknown fields or duplicate keys).
Checking our cleared public grocer summary (portal-gate check, 18.2 ms) returned exit code 0:
{"schema": "portal.decision.v0","policy_id": "sha256:7d87c257a21c5a15e71fa5d4b142c2c79d88e0143cd6cc047b02c6f474a74112","crossing": "cross-grocer-summary-001","verdict": "cleared","failed": [],"obligations": ["airlock-attest", "seal-pack"]}
Checking a crossing carrying classification: "restricted" and assess_band: "BLOCK" returned exit code 1 with the exact failed rules and zero opened obligations:
{"schema": "portal.decision.v0","policy_id": "sha256:7d87c257a21c5a15e71fa5d4b142c2c79d88e0143cd6cc047b02c6f474a74112","crossing": "cross-grocer-restricted-002","verdict": "blocked","failed": ["approved-assess-band", "public-classification"],"obligations": []}
Notice also what portal.decision.v0 leaves out by design: it omits raw fact values so decision logs themselves never leak sensitive inputs.
3. Proving what crossed and what stayed local (airlock v0.4.0)
You can tell a compliance officer that the model never saw your internal IC notes or client account IDs. airlock lets you prove it.
Suppose the JSON artifact feeding an LLM summary step carries four approved telemetry fields (decision_band, matched_rule, top_rvl_driver, latest_margins_summary) alongside two local-only confidential fields (client_account_id: "ACCT-9041" and internal_ic_note: "Confidential desk view...").
Running airlock assemble --boundary-mode TELEMETRY_ONLY --not-crossed-out work/airlock_not_crossed.json (3.5 ms) followed by airlock verify --require-claim STRICT_TELEMETRY_ONLY (9.5 ms) emits airlock_manifest.json (airlock.v0.3, Ed25519-signed by default in production via airlock keygen, or --no-sign in stateless CI):
{"manifest_version": "airlock.v0.3","policy_id": "grocer-model-narration","achieved_claim": "STRICT_TELEMETRY_ONLY","binding_status": "BOUND","bytes_crossed": 385,"raw_document_present": false,"filing_derived_text_present": false,"prompt_payload_hash": "blake3:8b318dfd554f28057538c2f4b1567ccc5af005e8a90ad15d68865482a00023de","request_payload_hash": "blake3:b866df3c0b8415f4c585fd6261beb9547fe45ef84d79b155b2665619260f4750","not_crossed": [{"path": "client_account_id","reason": "FORBIDDEN_KEY","source_artifact_hash": "blake3:dca0e57f...","value_hash": "blake3:68f3fa84..."},{"path": "internal_ic_note","reason": "FORBIDDEN_KEY","source_artifact_hash": "blake3:dca0e57f...","value_hash": "blake3:125d5846..."}]}
Look at that not_crossed negative inventory: airlock proves that both confidential fields were stripped as FORBIDDEN_KEY, hashes the excluded values (blake3:...) so an auditor with local access can confirm which values were withheld, and never writes the secret strings into the manifest. Exactly 385 bytes of verified telemetry crossed to the model, and airlock gate can enforce that exact canonical JSON hash at the outbound HTTP proxy so no stray bytes slip past.
4. Replaying whole-run obligations (covenant)
Authorizing a crossing is only half the contract if a script crashes or skips sealing the evidence pack afterward. covenant replay (part of portal, 18.4 ms) takes the reviewed portal.ir.json and an ordered event trace (portal.trace.v0), re-evaluates every crossing, opens its obligations, and consumes each resolution exactly once.
When both airlock-attest and seal-pack are resolved, covenant replay exits 0:
{"schema":"portal.replay.v0","policy_id":"sha256:7d87c257...","crossings":1,"blocked":[],"pending":[],"complete":true}
Drop the seal-pack resolution from the trace, and covenant replay exits 1 with the unfulfilled debt named explicitly:
{"schema":"portal.replay.v0","policy_id":"sha256:7d87c257...","crossings":1,"blocked":[],"pending":[{"crossing":"cross-grocer-summary-001","obligation":"seal-pack"}],"complete":false}
Duplicate or premature resolutions are refused as invalid traces, turning boundary controls into a replayable state machine.
Part V: Being honest about ceremony, and what breaks when you extend the analysis
A practical engineer should push back at this point: for a one-off, four-company, twelve-row table that a human analyst inspects before publishing a blog post, twelve JSON artifacts are heavy. A person can check twelve rows in sixty seconds.
Those artifacts stop being ceremony the instant one of three real-world shifts occurs: you schedule the analysis unattended, you scale it from four companies to five hundred, or you broaden the claim from four named tickers to an industry benchmark.
To prove that without rigging a strawman, we ran three real scopes through one single 43-line assess policy (sec.grocers.pipeline_gate.v1):
schema_version: 1policy_id: sec.grocers.pipeline_gate.v1policy_version: 1requires: [shape, verify, coverage]rules:- name: hard_verification_failure_blockswhen:verify:signals:severity_band: ERROR_PRESENTthen:decision_band: BLOCKrisk_code: VERIFICATION_ERROR_PRESENT- name: missing_sector_strata_escalateswhen:coverage:signals:stratum_balance_band: STRATUM_MISSINGthen:decision_band: ESCALATErisk_code: UNOBSERVED_PRIVATE_OR_IFRS_STRATA- name: proceed_with_disclosed_policy_warningswhen:shape: { outcome: COMPATIBLE }verify:signals:severity_band: WARN_ONLYcoverage: { outcome: ADEQUATE }then:decision_band: PROCEED_WITH_RISKrisk_code: EXPLICIT_POLICY_DISCLOSURES_PRESENT- name: clean_proceedwhen:shape: { outcome: COMPATIBLE }verify: { outcome: PASS }coverage: { outcome: ADEQUATE }then:decision_band: PROCEED- name: default_blockdefault: truethen:decision_band: BLOCKrisk_code: UNHANDLED_CONDITION
Click through all three scopes below (and toggle Total Revenue vs. Net Sales in Scope 1) to see how the exact same 4 audited 10-Ks route through sec.grocers.pipeline_gate.v1 offline in your browser:
PROCEED_WITH_RISK: 4 of 4 named chains verified with 4 explicit accounting disclosures.
Hard accounting invariants pass and all 4 named tickers match (coverage: ADEQUATE). Kroger (-134 bps) and Albertsons (-105 bps) explain 62.9% of YoY operating-margin movement; four warn-level comparability notes ride inside the receipt.
| Peer | Denom ($M) | Gross Margin | Op. Margin | YoY OM |
|---|---|---|---|---|
| Walmart (WMT) | $713,163 | 24.93% (+72 bps) | 4.18% | -12 bps |
| Kroger (KR) | $147,642 | 23.30% | 1.28% | -134 bps |
| Costco (COST) | $303,154 | 12.82% (+173 bps) | 3.85% | +20 bps |
| Albertsons (ACI) | $83,172.5 | 27.18% | 0.87% | -105 bps |
- WARN (Derived Gross Profit): Only Albertsons tags us-gaap:GrossProfit directly; WMT, KR, and COST require derived Revenue minus COGS.
- WARN (Membership Fees): Total-revenue denominator lifts Costco GM by +173 bps (12.82% vs 11.09% net sales) and Walmart by +72 bps (24.93% vs 24.21% net sales).
- WARN (Fiscal Calendars): Kroger FY23 and Albertsons FY25 are 53-week years; latest FY ends span 7 months (Jan 31 to Aug 30, 2026).
- WARN (Taxonomy Drift): Costco switched from us-gaap:Revenues (FY25) to RevenueFromContractWithCustomerExcludingAssessedTax (FY26); 3 distinct COGS tags appear across the 4 peers.
Scope 1: XBRL US's exact four-ticker comparison (PROCEED_WITH_RISK)
When the declared universe is the four named chains (Walmart, Kroger, Costco, Albertsons), shape returns COMPATIBLE and coverage returns ADEQUATE (4 of 4 matched, 100% field completeness). rvl computes exact year-2-to-year-3 change attribution deterministically: Kroger's operating margin fell 134 bps (2.62% to 1.28%, 35.3% of total absolute movement) and Albertsons' fell 105 bps (1.92% to 0.87%, 27.6%), explaining 62.9% of all peer movement before an LLM writes a single word.
verify passes every hard invariant (OPERATING_MARGIN_LTE_GROSS_MARGIN, GROSS_MARGIN_POSITIVE) with zero errors and logs four explicit warn-level disclosures that XBRL facts leave implicit unless you check for them.
First, only Albertsons tags us-gaap:GrossProfit directly (9 of 12 rows omit it), so Walmart, Kroger, and Costco require a derived Revenue - COGS formula choice.
Second, measuring gross margin as a percentage of total revenue (which XBRL US's chart subtitle transparently states) folds nearly 100%-margin membership fees into gross margin across 6 of the 12 rows. In FY26, Costco's $303,154M total revenue includes $5,907M of membership fees above $297,247M of net sales, lifting gross margin by +173 bps (12.82% on total revenue vs. 11.09% on net sales). Walmart's $713,163M total revenue includes $6,750M of membership and other income above $706,413M of net sales, lifting gross margin by +72 bps (24.93% vs. 24.21%, the gross profit rate Walmart reports in its own 10-K).
Third, two of the twelve periods are 53-week fiscal years (371 calendar days instead of 364): Kroger FY23 (ended February 3, 2024) and Albertsons FY25 (ended February 28, 2026). Meanwhile, the four "latest" fiscal years end seven months apart (January 31, 2026 for Walmart and Kroger; February 28, 2026 for Albertsons; August 30, 2026 for Costco).
Fourth, Costco switched revenue tags inside the three-year window, moving from us-gaap:Revenues in FY25 to us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax in FY26.
There is also a subtle COGS taxonomy lesson across these four filings. Three different XBRL COGS tags appear: Walmart and Albertsons use CostOfRevenue, Costco uses CostOfGoodsAndServicesSold, and Kroger uses CostOfGoodsAndServiceExcludingDepreciationDepletionAndAmortization. Checking the 10-K accounting policies complicates the picture further: Walmart and Costco also exclude substantially all store and warehouse depreciation from Cost of Sales (booking it in SG&A / OSG&A), whereas Albertsons includes distribution depreciation in Cost of Sales while presenting store and corporate depreciation separately. XBRL tags structure each individual filing cleanly, but cross-company comparability requires explicit policy checks above the taxonomy.
Because all hard checks passed and all four named chains matched, assess emits PROCEED_WITH_RISK (EXPLICIT_POLICY_DISCLOSURES_PRESENT). The chart is valid to publish, and every analytical choice lives inside the receipt.
Scope 2: Widen the prompt to "US grocery sector margins" (ESCALATE)
Keep the exact same four audited 10-K files, and change only the question: suppose an executive or autonomous agent asks "How are US grocery margins trending?" instead of naming four tickers.
Walmart, Costco, Kroger, and Albertsons are completely defensible as the top four by total revenue (Publix at ~$60B, Ahold Delhaize USA at ~$60B, H-E-B at ~$46B, and Aldi are all smaller than Albertsons' $83.2B). Once you generalize from those four chains to the US grocery sector, however, US-GAAP XBRL creates a structural blind spot that an XBRL MCP cannot see.
Six of the top ten US grocers disappear from standard public-equity XBRL screens: four are private (H-E-B, Aldi US, Meijer, Trader Joe's), one reports under IFRS through a foreign parent (Ahold Delhaize), and one is employee-owned with no public stock ticker even though it files SEC 10-Ks (Publix). Meanwhile, Walmart alone drives 57.2% of the four-chain revenue total (effective sample size n_eff = 2.47), blending US grocery with general merchandise, e-commerce, Sam's Club, and international stores.
Running coverage on the exact same four filings against a top-10 US grocery roster returns INADEQUATE: universe_band: PARTIAL_KNOWN_MISSING (4 of 10 matched), stratum_balance_band: STRATUM_MISSING (three ownership strata at 0% coverage), and sample_adequacy_band: CONCENTRATED (top_1_weight_share: 0.5718). Passed through the exact same assess policy, the verdict flips from PROCEED_WITH_RISK to ESCALATE (UNOBSERVED_PRIVATE_OR_IFRS_STRATA).
Scope 3: Schedule the query unattended into FY26 (BLOCK)
Now suppose a team automated this margin tracker in 2025 using the XBRL concepts each company filed that year (us-gaap:Revenues for Walmart and Costco; RevenueFromContractWithCustomerExcludingAssessedTax for Kroger and Albertsons) and left it running unattended as FY26 10-Ks landed.
Because Costco retired us-gaap:Revenues in its FY26 10-K, that recurring extractor returns null for Costco's FY26 revenue (or drops Costco's row completely). Without a gate, an unattended dashboard or agent keeps publishing a three-company average.
With the verification pipeline in place, verify fails REVENUE_PRESENT_FOR_ALL_CHAINS and OPERATING_MARGIN_PRESENT on COST (severity_band: ERROR_PRESENT). If Costco's weight cell is null, coverage refuses fail-closed (E_BAD_CELL: "the weight is null; coverage does not guess or impute"); if the query dropped Costco's row, coverage flags missing_sample: ["COST"]. Through the exact same policy, assess flips to BLOCK (VERIFICATION_ERROR_PRESENT, exit code 3), halting publication before the broken three-company average reaches a chart or memo.
Part VI: Sealing the pack and getting it over HTTP (pack + x402)
In our end-to-end run, pack seal wraps all twelve artifacts into a single content-addressed evidence pack (grocers.lock.json, deliverables.lock.json, shape, rvl, verify, coverage, assess, portal IR, portal decision, covenant replay, airlock manifest, and the verify ground report):
$ pack verify work/pack-magnum-opuspack verify: OKpack_id: sha256:6bfc1c0f9eeb1340b100ac199ac2203d1aa1abfb253024ee4f9d539b783d0916
Anyone with that directory can check every SHA-256 hash offline in 3.3 milliseconds with zero API keys and zero model calls. You can also inspect one of our live production spine packs directly on /stats/abs-15g-issuance-filings/, where all 92 November 2026 SEC Form ABS-15G filings verify locally in browser Rust WASM alongside replayable compute.js.
How agents and readers actually fetch packs: the x402 Evidence Pack API
Running open-source CLIs locally works well when you operate the pipeline yourself. External AI agents and analysts hit a different obstacle: nobody wants to negotiate an enterprise data contract, rotate API keys, or stand up an EDGAR ingestion stack just to verify one 10-K or pull a sealed evidence pack.
That is why we built the CMD+RVL x402 Evidence Pack API (https://x402.cmdrvl.com). It serves immutable, offline-verifiable filing packs and live claim grounding directly over standard HTTP using the x402 pay-per-call protocol (HTTP 402 Payment Required settled in USDC, with no signup and no API key):
| Endpoint | Price | What it returns |
|---|---|---|
GET /v1/edgar/{cik}/{accession} | $0.00 | Free discovery index: available packs, pinned SHA-256 source hashes, and pre-computed XBRL discrepancy signals before spending a cent |
POST /v1/edgar/{cik}/{accession}/ground | $0.005 to $0.01 | Live verify ground against raw SEC filing HTML (~159 ms on an 8.45 MB 10-K), returning a verify.report.v1 receipt with exact byte spans across tables, footnotes, or prose |
GET .../packs/{pack} (xbrl-audit, redline, financial-statements) | $0.02 to $0.03 | Pre-baked JSON packs covering XBRL-vs-HTML discrepancy checks, substantive year-over-year 10-K prose diffs, and verified financial statements with accounting-equation proofs |
GET .../packs/full-filing | $0.05 | Complete sealed cmdrvl pack archive that verifies locally offline with pack verify |
Even audited XBRL filings carry silent tagging mistakes that only show up when you cross-check iXBRL tags against the rendered HTML table. Digital Realty's FY2025 10-K (CIK 0001297996, accession 0001104659-26-015365, filed February 13, 2026) is our first staged reference filing on the x402 API. On its Consolidated Balance Sheets, the printed header reads (in thousands, except per share data). CommonStockSharesAuthorized (502,000) and CommonStockSharesIssued (343,557) are both tagged scale="3". Right beside them, CommonStockSharesOutstanding as of December 31, 2024 (336,637) is tagged scale="0". Every blind XBRL consumer reads 336,637 shares instead of 336,637,000: a 1,000x understatement baked into an audited filing. On the x402 API, the free discovery endpoint flags that mismatch upfront, and the sealed pack carries the exact HTML byte offsets and prior-year 10-K proof so neither an agent nor a reviewer has to trust the tag blindly.
Try compiled @cmdrvl/web v0.2.0 Rust WASM redline_compare right here against Digital Realty's scale="0" mismatch, HTML reformatting noise, or your own files with Wi-Fi turned off:
Loading compiled @cmdrvl/web Rust WASM redline engine...
Inspect raw redline.report.v1 JSON & Rust SHA-256 hashes
{
"version": "redline.report.v1",
"outcome": "CHANGES_FOUND",
"mode": "whitespace",
"summary": {
"total_hunks": 1,
"semantic_hunks": 1,
"formatting_only_hunks": 0,
"numeric_changed_hunks": 1
},
"hunks": []
}Part VII: Six months later, grounding both the text and the chart
Fast-forward six months to May 2027. An auditor, a compliance reviewer, or a subscriber pulls up the memo and chart from November 2026 and asks three concrete questions:
- Do the figures in the published prose and the chart still match the locked bytes?
- Did someone misquote a denominator or carry over a stale figure when excerpting the memo or chart into a slide deck?
- Was a single number on the chart quietly edited after publication?
Chart format matters here. When you publish a chart as a flat raster PNG, six months later it is just pixels; no deterministic tool can verify a bar label without running OCR or a vision model over the image. When you publish a text-backed SVG chart (or Vega-Lite JSON spec) alongside your Markdown memo and pin both in a deliverables.lock.json lockfile, the chart becomes a first-class UTF-8 document that verify ground can audit byte for byte alongside the prose.
In a full audit, grounding runs at both ends: grounding the memo and chart figures back against the locked raw SEC 10-K HTML (either locally with verify ground or via POST /v1/edgar/{cik}/{accession}/ground on the x402 API), and grounding downstream decks or excerpts against the locked memo and SVG chart.
Test all three six-month scenarios live right now using compiled @cmdrvl/web v0.2.0 Rust WASM (verify_ground_multi_json + sha256_hex + blake3_hex) over the live text-backed SVG chart below. Turn off your Wi-Fi before clicking Edit 1 SVG digit or dropping your own file:
Both locked deliverables (grocer_memo.md and grocer_margins_chart.svg) matched their pinned SHA-256 hashes in deliverables.lock.json, and all 18 quote and numeric checks passed locally in compiled Rust WASM.
Inspect raw verify.report.v1 JSON & deliverables.lock.json hashes
{
"outcome": "PASS",
"summary": {
"total_rules": 18,
"passed_rules": 18,
"failed_rules": 0
},
"results": []
}Below are the exact CLI receipts from our local run against grocer_memo.md (sha256:4c402c2a...) and grocer_margins_chart.svg (sha256:e9b2da1f...).
Scenario 1: Re-verifying 9 claims across prose and SVG chart (PASS, 8.5 ms)
We passed a JSONL file of nine claims spanning both the prose memo ($713,163M Walmart revenue, $2,684M Kroger impairment, Costco 12.8% of total revenue and 11.1% of net sales) and five labeled bars directly inside grocer_margins_chart.svg (Walmart 24.9%, Kroger 1.3%, Costco 12.8%, Albertsons 27.2%, Albertsons 0.9%):
verify ground \--bind memo=work/deliverables/grocer_memo.md \--bind chart=work/deliverables/grocer_margins_chart.svg \--lock work/deliverables.lock.json \--explicit --json work/ground_claims_pass.jsonl
In 8.5 milliseconds, verify ground confirmed both bound files against deliverables.lock.json (input_verification.status: "VERIFIED") and passed all 18 checks (9 exact quote matches + 9 numeric/scale/unit checks), returning outcome: "PASS" and severity_band: "CLEAN".
Scenario 2: Catching a misquoted denominator in prose and a stale bar read on the chart (FAIL)
Now imagine two classic human or LLM mistakes six months later when someone quotes that memo and chart into an investor deck:
- In prose, they write that Costco's FY26 gross margin was "12.8% of net sales" (confusing the total-revenue figure with net sales, which was 11.1%).
- Reading the chart, they quote Albertsons' latest operating margin label (
"Albertsons operating margin 0.9%") but type 1.9% (Albertsons' prior-year FY24 operating margin) into their summary table.
Running verify ground against the locked memo and SVG chart catches both immediately (outcome: "FAIL", severity_band: "ERROR_PRESENT"):
{"rule_id": "grounding.misquoted_cost_denominator.E_QUOTE_NOT_FOUND","status": "fail","affected": [{"binding": "memo","key": { "claim_id": "misquoted_cost_denominator" },"field": "quote","value": { "code": "E_QUOTE_NOT_FOUND", "quote": "gross margin 12.8% of net sales" }}]},{"rule_id": "grounding.stale_aci_operating_margin.E_SCALE_MISMATCH","status": "fail","affected": [{"binding": "chart","key": { "claim_id": "stale_aci_operating_margin" },"field": "numeric","value": { "code": "E_SCALE_MISMATCH", "value": 1.9, "scale": "percent", "unit": "%", "surfaces": ["0.9%"] }}]}
Scenario 3: Catching a silent 1-byte edit to the published chart (REFUSAL [E_INPUT_DRIFT])
Finally, suppose someone quietly edits one digit inside grocer_margins_chart.svg six months after publication, changing Albertsons' gross margin label from 27.2% to 28.2%.
Before evaluating a single claim, verify ground --lock work/deliverables.lock.json refuses fail-closed with exit code 2:
{"outcome": "REFUSAL","refusal": {"code": "E_INPUT_DRIFT","message": "grounding source bytes differ from the provided lock","detail": {"path": "work/tampered_deliverables/grocer_margins_chart.svg","expected_hash": "sha256:e9b2da1f5a0fa8515ab701d5c58f46d95df2eb85eed89e3faa4faf190663ed4c","observed_hashes": ["sha256:e579e82f277b928fcb66e1c558c403a7ece926c6014eaef3cefd66acaee2562f"]},"next_step": "Use the locked artifact or regenerate the lock intentionally."}}
And because deliverables.lock.json, grocers.lock.json, the verification/coverage/assess receipts, the portal IR and covenant replay, and the airlock boundary manifest are all sealed inside pack-magnum-opus, an auditor can walk backward in one unbroken cryptographic chain from a single bar on an SVG chart six months later all the way back to the SEC EDGAR API channel and the U.S. Securities and Exchange Commission as provider.
What chart grounding looks like without killing the art
One fair objection to verified charts is creative control. Nobody at a research desk, publication, or Substack wants to give up D3, Datawrapper, Observable, ggplot2, matplotlib, or Illustrator for a rigid built-in bar-chart renderer. People care about typography, color, annotations, and layout.
The clean way forward decouples visual craft from geometric truth, so verification runs after the designer finishes styling the chart. Picture uploading a finished SVG through an "Add Chart" button on a publication or internal research portal. Each mark carries a tiny data attribute (data-key="ACI_Y3", data-metric="gross_margin_pct"), and the SVG <metadata> carries the pack_id. Before the post publishes, a five-millisecond post-render audit runs four deterministic checks while leaving every font, color, and layout choice untouched: every mark value matches the locked data pack; every printed <text> label matches the mark value; the actual rendered SVG bar heights or point coordinates fit an exact affine line against the underlying values (catching a bar manually resized in Figma or an undisclosed truncated Y-axis); and every PROCEED_WITH_RISK disclosure from assess (such as "% of total revenue" or Kroger's "$2.7B" impairment charge) appears somewhere in the rendered text. For flat PNGs exported from Excel or slides, a signed pack_id embedded via PNG iTXt or C2PA Content Credentials still carries data provenance with an honest admissibility badge noting that pixels themselves were not geometry-checked.
That lets writers keep 100% of the art in a chart while giving readers a clickable verification badge that still works six months later.
Part VIII: One signpost toward the next standard
XBRL US ended their post with a point worth keeping: structured reporting costs more once at preparation time and pays off every single time a report is analyzed.
Our open-source tools at github.com/cmdrvl (vacuum, hashbytes, lock, shape, rvl, verify, coverage, assess, veil, portal, airlock, pack), cmdrvl-evidence, and the x402 Evidence Pack API are an early signpost taking the next step in that same direction. XBRL standardized the filing, giving every reported fact a concept, unit, period, and authoritative taxonomy. What comes next is standardizing every boundary downstream of the filing: provider and channel ingestion receipts, read privacy, machine-checkable comparability policies, universe coverage proofs, boundary crossing authority, whole-run obligation replay, model egress manifests, and portable evidence packs that ground both text and charts months or years later.
AI needs structure, and XBRL proved how much value the first layer unlocks. Once the verification, authority, and lineage stack above it becomes shared infrastructure, there is no real ceiling on what autonomous financial analysis can safely run.
Common questions
How did XBRL US's four-grocer margins hold up against the audited 10-Ks?
Every labeled percentage in XBRL US's four-grocer chart matched the audited FY26 10-K filings for Walmart, Kroger, Costco, and Albertsons to a tenth of a percent under their stated denominator (margin as % of total revenue), and Kroger's ~$2.7B impairment footnote matched $2,684M in us-gaap:RestructuringCostsAndAssetImpairmentCharges.
Why does the same four-grocer dataset produce PROCEED_WITH_RISK, ESCALATE, and BLOCK verdicts?
Data admissibility depends on the claim scope and operational mode, not just the raw filings. Four named public chains pass with four explicit accounting disclosures (PROCEED_WITH_RISK). Widening the claim to "US grocery sector margins" misses 6 of the top 10 US grocers across private, IFRS, and employee-owned strata (ESCALATE). Running unattended into FY26 after Costco retired us-gaap:Revenues triggers a hard missing-revenue failure (BLOCK).
Do the interactive widgets in this post send my files or edits to a server?
No. All three labs run locally inside your browser tab using the compiled @cmdrvl/web v0.2.0 Rust WebAssembly binary (verify_ground_multi_json, redline_compare, sha256_hex, blake3_hex). Turn off your Wi-Fi before testing or dropping local files and every check still runs.
Why ground a published chart as a text-backed SVG instead of only a raster PNG?
A raster PNG is just pixels six months later, requiring OCR or a vision model to inspect bar labels. A text-backed SVG pinned in deliverables.lock.json is a UTF-8 document that verify ground audits byte for byte alongside prose, catching misquoted numbers, stale deck figures, and silent 1-digit post-publication edits deterministically.
Read next:
- Verified SEC Form ABS-15G Issuance Filings Pack - Live production spine pack with Ed25519 signature,
sec.govhash_rule 2receipts, and browser-replayablecompute.js - Cut LLM Token Spend 10x to 100x With Local Rust CLIs - How deterministic pre-shaping replaces multi-megabyte prompt stuffing
- Connect Claude, ChatGPT, and Codex to SEC EDGAR & Snowflake via MCP - Wiring keyless Receipts MCP, EDGAR MCP, and governed Snowflake MCPs
- AI Audit Trail: Evidence Packs - Cryptographic receipts vs. standard LLM prompt logs
- Open-Source Interactive CLI Tools - Try all 17 offline tool demos and
@cmdrvl/webClaude Artifact prompts
Zac Ruiz
Co-Founder
Technology leader with 25+ years' experience, including a decade in securitization and capital markets.
LinkedIn