{"criteria_id":"context-composition/v1","criteria_revision":"1.0.0","family":"context-composition/v1","family_note":"Criteria id context-composition/v1 is of record in the M-55 brief. Source: BUILD-QUEUE Q-22 + x6-deepening-pass-2026-11-02 (consolidated, corrections D-1 to D-9 applied). Contract shape settled at design (DESIGN.md D-1): per-format adapters over a minimal common core.","ops":["audit"],"ops_not_offered":[],"corpus":{"id":"context-composition-corpus/v1","sha256":"625702358c906f1326fc1492a409d888320c8e7c1b084dd2f8ee5bb0a0e9a9d3"},"corpus_pin_definition":"The corpus pin is the SHA-256 of the corpus's canonical serialization (the corpus object excluding its sha256 field), computed and verifiable by the published harness (harness.mjs). Expected outputs inside corpus cases are derived from the criteria text by an independent implementation in gen-corpus.mjs (never the engine's code path), and every case is a synthetic record authored in gen-corpus.mjs, provenance-labelled in corpus.json. No real session/context record is used or read, ever.","price":{"usdc_units_per_call":50000,"label":"$0.05","basis":"per report (one submitted session/context record)"},"free_tier":{"per_day":100,"min_interval_ms":5000,"on_exhaustion":"402"},"envelope":{"version":"context-composition-envelope/1","form":"one inline JSON object; format declared, never sniffed; no URL/fetch mode in envelope/1; exactly one record per call"},"input_contract":{"caps":{"body_bytes":5242880,"entries":10000,"entry_bytes":1048576,"stated_counts_bytes":65536},"caps_posture":"The caps are fleet-convention design values, adopted explicitly as ours (no export-size evidence exists in the record); they are not presented as facts about any format. Revisable only by a criteria-version act.","over_cap":"An over-cap body is a free pre-gate 413 refusal naming the cap. Over the entry cap, an entry over the single-entry cap, zero entries, or nothing assessable return the signed could-not-measure shape (HTTP 422 on the paid route, delivered unpaid; disclosed at pre-check). An oversize entry is refused, not partially censused: a census that silently stops at a cap is an undisclosed-partial measurement.","validation":"The submission is validated FREE, before any payment: envelope version, format acceptance, per-format parse, stated-counts shape, and the published caps. A malformed submission fails free and never consumes a payment. Measurement runs only after payment verification (or on a verified-marker resume with no second charge)."},"input_contract_text":"Input contract: the request body is one JSON object in envelope context-composition-envelope/1: { envelope_version: 'context-composition-envelope/1', declared_format_id, declared_format_version?, record, harness_stated_counts?, criteria_ack?, caller? (free pre-check only) }. declared_format_id is one of the accepted formats: letta-af (a Letta AgentFile .af JSON object: messages[] carrying message_type kinds, plus an optional tools[] section), anthropic-messages (an object { messages: [...] } or a bare message array in the Anthropic Messages shape; content is a string or parts of type text / tool_use / tool_result), generic-message-list (the published generic envelope: { messages: [{ role, kind, name, has_args, source, text, stated_tokens }], tool_schemas?, stated_total? } — text may be null for a non-serialisable payload, which adapts to a C-UNK block). Format is declared, never sniffed; there is no URL or fetch mode in envelope/1 — the record travels inline, exactly one record per call. harness_stated_counts (optional, at most 64 KiB serialised): { per_message?: [integer|null], total?: integer } — the submitting harness's own figures, reproduced as stated; absent means the stated-vs-measured factor is NOT-ASSESSABLE and the pre-check says so. Unknown top-level envelope fields are ignored for measurement and counted (the count is echoed in the pre-check); their values are never echoed. Caps (fleet-convention design values, labelled as ours): body up to 5 MiB; up to 10,000 entries; a single entry up to 1 MiB of adapted text; stated-counts object up to 64 KiB.","malformed_rule":"Refusals are FREE and before any payment gate (a payment header sent with a refused submission is not verified or consumed, and the refusal says so): R-1 body not a plain JSON object or over the 5 MiB body cap (malformed_body / CAP-EXCEEDED:body_bytes); R-2 envelope_version not context-composition-envelope/1 (envelope_version_not_supported); R-3 declared_format_id absent or not an accepted format (format_not_accepted — the refusal lists the accepted ids and never suggests a closest format); R-4 record missing or ambiguous (record_required); R-5 record does not parse as the declared format (record_does_not_parse_as_declared_format — never retried under another format); R-6 invalid caller on the free pre-check (caller_invalid); a harness_stated_counts object over the 64 KiB cap or not a plain object (stated_counts_invalid). Signed could-not-measure shapes (on the paid route HTTP 422, delivered unpaid; disclosed at pre-check): R-7 too_many_entries (over the 10,000-entry cap); R-8 zero_entries; R-9 nothing_assessable (no block carries a textual payload). Nothing about a record's composition is ever a refusal ground — refusals are envelope, format, and cap failures only. Error surfaces carry static strings plus numeric facts only — never any part of a submission.","measurement_rule":"Measurement rule. The submitted record is adapted per its declared format to the published SessionRecord abstraction, then classified block by block under the two-axis taxonomy and measured under metric register M01-M15 (exact computations in the served criteria). Estimation method EM-1: C(b) is the Unicode code-point count of the NFC-normalised block text; E(b) = ceil(C(b)/4) per block (0 for empty), summed per message and per record; separators are not counted. Every EM-1 figure is an ESTIMATE and carries the estimate typography; EM-1 claims reproducibility, not accuracy against any tokenizer. Shares are 100 x part / T computed from unrounded integers and printed to 2 decimal places in estimate typography; a zero denominator prints NOT-ASSESSABLE (zero denominator), never 0%. Factors F-1 to F-12 print in order; a factor that cannot be computed prints NOT-ASSESSABLE with its reason — never omitted, never zero-filled. LIMITED appears in the measurement line whenever any graded factor is NOT-ASSESSABLE.","estimation_method":{"id":"EM-1","rule":"C(b) = Unicode code points of the NFC-normalised block text. E(b) = 0 if C(b) = 0, else ceil(C(b)/4), computed per block and summed; separators are not counted. EM-1 claims reproducibility, not accuracy: no tolerance against any real tokenizer is asserted. Figures under different method versions are not comparable.","labelling":"All token figures in this report are estimates computed under the estimation method published in context-composition/v1 (method version stated in the report header); they are not counts from any specific model's tokenizer, and they must not be quoted as exact token counts. Figures labelled 'stated' are the submitting harness's own figures, reproduced as stated, and are not measured by this service.","typography":"Typography discipline (tripwire-grade): exact figures — block counts, message counts, character counts, byte counts — are JSON numbers under count keys. Every EM-1-derived figure (token figures, and every share or depth computed from them) is a JSON string of the form est:~<integer> for tokens or est:~<decimal>% for shares and depths. An estimate never appears as a JSON number and never under a count key. An estimate printed with a count's typography is a stop-serving tripwire under the kill line."},"taxonomy":{"axis_p":{"classes":["P-TDEF","P-CMPT","P-TCALL","P-TRES","P-RETR","P-SYS","P-USER","P-ASST","P-OTHER","P-UNK"],"precedence":"P-TDEF > P-CMPT > P-TCALL > P-TRES > P-RETR > P-SYS > P-USER > P-ASST > P-OTHER > P-UNK (total order; structural kinds outrank conversational roles; first test that fires wins; a block firing two classes is conflict-flagged, counted once under the winner, winner and losers recorded)","residual":"P-OTHER := at least one of role_raw / kind_raw is a non-empty string matching no class list, with the raw value(s) reported. P-UNK := no test fires and the block is not P-OTHER. (Consolidated definitions, exhaustive by construction.)","unknown_discipline":"An unknown block is counted as unknown in every count, share, and table — never reassigned, never distributed pro-rata, never dropped; its estimate enters the total; a non-zero unknown share appears as its own row."},"axis_c":{"classes":["C-EMPTY","C-UNK","C-BLOB","C-RAW","C-STRUCT","C-CODE","C-TEXT"],"precedence":"C-EMPTY > C-UNK > C-BLOB > C-RAW > C-STRUCT > C-CODE > C-TEXT (total order)","note":"Classification (this taxonomy) and census (M10) are different instruments and are never conflated: a base64 segment inside a mostly-prose block does not make the block C-BLOB (the >=90% test fails) but is counted by the blob census. A JSON tool-call payload is C-STRUCT whatever its P class — the axes are independent by design. No language detection is performed or claimed; C-TEXT is the residual class."}},"metric_register":{"M01":"Counts: n_messages, n_blocks, n_schema_blocks, n_empty_blocks, conflict counts per axis. MECHANICAL FACT.","M02":"Size totals: C_total (characters, exact) and T (EM-1 estimate, estimate typography). Denominator of record for all shares.","M03":"Axis-P composition shares: per class, block count (exact) and estimate share (estimate typography). Every class appears as a row, including zero rows. P at L0/L1 (structural classes unreachable from a bare role list print 'not identifiable at this level', never read as absence), A at L2.","M04":"Axis-C composition shares, as M03 over the content classes. A at every level.","M05":"P x C cross-tabulation: cells present are listed with their block count (including present-but-zero-estimate cells); row and column margins reproduce M03/M04 exactly. P at L0/L1, A at L2.","M06":"Per-message size distribution (schema pseudo-message excluded, exclusion printed): min, max, mean, lower median (rank ceil(0.5n)), p90 (rank ceil(0.9n)) — nearest-rank rules are fleet conventions. Largest contributors = UNION of the top 3 messages by estimate and every message at >=10% of the message total (the 10% threshold is a fleet convention).","M07":"Growth across turns: Turn 0 = messages before the first P-USER message (a message is P-USER if its FIRST block's P class is P-USER); each P-USER message starts a new turn. Per turn: increment, cumulative, cumulative share. Turn definition is a fleet convention. No P-USER message = turn growth NOT-ASSESSABLE (single turn).","M08":"Exact duplication: normalisation N(s) = NFC, CRLF/CR to LF, trim, internal whitespace runs to one space, case preserved; SHA-256 over the UTF-8 of N(text); empty blocks excluded. Groups of >=2; excess blocks and excess estimate printed. MECHANICAL FACT.","M09":"Near duplication: N(s) lowercased; word tokens split on single spaces, stripped of leading/trailing .,;:!?()[]{} quotes and backtick, empties dropped; shingles = consecutive word 3-grams (a block with <3 tokens cannot be paired); Jaccard >= 0.80 pairs, excluding pairs already exact under M08. LABELLED CONVENTION throughout (fleet convention).","M10":"Embedded-blob census: base64 segments (maximal runs, standard and URL-safe alphabets counted separately) qualifying at length >=40, length mod 4 = 0 counting trailing padding, strict decode succeeds yielding >=30 bytes; raw-export blocks under test R-1 (BEGIN EXPORT / BEGIN RAW / BEGIN LOG marker line; or >=80% of non-empty lines matching the timestamped-log pattern; or JSON with >=10 top-level elements/keys and C >= 200). Counts are mechanical facts given the tests; the thresholds are fleet conventions. Census counts segments anywhere in a block.","M11":"Tool-definition share: estimate over P-TDEF blocks (including the schema pseudo-message) / T, with block count. Absence of any P-TDEF block prints 0 with the note 'no tool definitions present in the submitted record' — never a claim about the harness. P at L0/L1, A at L2.","M12":"Stated-vs-measured agreement: per covered unit, diff = stated - E(unit), pct = 100 x diff / E(unit); WITHIN iff |pct| <= 5% (fleet convention tolerance); E=0 and stated=0 is EXACT by definition; E=0 and stated>0 is DISAGREE (zero-measured). Aggregates computed only over covered units; a whole-record figure at coverage <100% is NOT-ASSESSABLE (partial coverage). No stated counts at any level = NOT-ASSESSABLE (no stated counts), label NO-STATED-COUNT. Disagreement measures the gap between the harness's count and EM-1 — not an error by either side — and the report says exactly that.","M13":"Two-axis unknown census: P-UNK and C-UNK block counts, estimates, and shares, plus blocks unknown on either axis. Printed even when all zeroes, so a zero is a measured zero. MECHANICAL FACT.","M14":"Position/depth facts: for each P-SYS or P-CMPT block — block index, class, start offset (sum of estimates of preceding blocks), depth (offset / T). Mechanical facts only; no interpretation, threshold, or literature association is attached. P at L0/L1, A at L2.","M15":"Largest single block: maximal E(b), ties to the lowest block index; indices, both classes, estimate, share. A size statement only."},"assessability_matrix":{"letta-af":{"level":"L2","F1":"A","F2":"A","F2b":"A","F3":"A","F4":"A","F5":"A (NOT-ASSESSABLE for a record with no P-USER message)","F6":"A","F7":"A","F8":"A","F9":"A","F10":"submission-conditional (stated counts + coverage rule)","F12":"A"},"anthropic-messages":{"level":"L0","F1":"P — role-list classes only; structural zero rows print 'not identifiable at this level'","F2":"A","F2b":"P (= F-1's restriction)","F3":"A","F4":"A","F5":"A (NOT-ASSESSABLE for a record with no P-USER message)","F6":"A","F7":"A","F8":"P — definitions submitted as prose in a system message are P-SYS, not P-TDEF; the absence note is mandatory","F9":"P — a P-CMPT absence prints 'no P-CMPT block identified at this level'","F10":"submission-conditional (stated counts + coverage rule)","F12":"A"},"generic-message-list":{"level":"L0/L1/L2 by content","F1":"P at L0/L1, A at L2 (kind fields / schema section present)","F2":"A","F2b":"P at L0/L1, A at L2","F3":"A","F4":"A","F5":"A (NOT-ASSESSABLE for a record with no P-USER message)","F6":"A","F7":"A","F8":"P at L0/L1, A at L2","F9":"P at L0/L1, A at L2","F10":"submission-conditional (stated counts + coverage rule)","F12":"A"},"F11":"NOT-ASSESSABLE-BY-DESIGN in v1 for every format (no master-table flag rules exist); excluded from the LIMITED trigger (DESIGN D-5)."},"never_assessable":["What the harness actually sent vs what was exported (exporter truncation, filtering, or redaction is invisible from inside the record).","Any model's actual token count for the record (EM-1 is an estimate under the published method, not a tokenizer count).","Whether any content was relevant, needed, or used by the model.","Whether any recall or output property held for the session.","Authorship or truth of any content (a mislabelled export is classified as labelled).","Compaction events that left no block in the record.","Timing, latency, or cost structure of the session.","The content of non-serialisable payloads (C-UNK blocks; their size is not assessable)."],"accepted_formats":["letta-af","anthropic-messages","generic-message-list"],"format_levels":{"letta-af":"L2","anthropic-messages":"L0","generic-message-list":"by-content"},"scope_block":"This report measures the composition of the submitted record as submitted, under the published context-composition/v1 criteria: the shares, sizes, counts, positions and structures stated in its factors. It does not measure whether the agent's answers were correct, complete or safe; whether the agent's recall was, or would be, degraded; whether any model's performance was, or would be, affected by this composition; or whether a different composition would perform better. No finding in this report is a judgement that the submitted context was good or bad, and no finding certifies any property of the agent, of any model, or of any other session.","f9_line":"F-9 literature-labelling line: position facts are mechanical facts only (block index, class, start offset, depth). Any literature reference, if attached, is cited as literature with its evidence class in a separate labelled sub-block and states no measurement of the submitted record; the factor is cut if the method cannot hold that line. In context-composition/v1 no literature is attached, so the line is held by construction.","wording_fence":"Forbidden vocabulary (published): the following may not appear in any report, pre-check, or catalog line as a characterisation of a submitted record: healthy, rotten, quality-as-a-grade, pass/fail, certified, score-as-a-composite, degraded, improved-as-an-outcome. This sentence names them only to forbid them. Forbidden fields (schema-level): any composite score; any pass/fail, certification, or tier for the record as a whole; any recall, performance, correctness, or safety field — measured, predicted, or implied; any recommended-composition or advice field; any rank against other operators' records; any submitted content; any fetched_at field (nothing is fetched in envelope/1).","free_precheck":"The free pre-check (POST /precheck) validates the submission under the published contract and returns assessability ONLY: the common signed fields; the declared format echoed with its acceptance status and level; the entry count; the total size (bytes as an exact number, tokens in estimate typography); ONE headline share (the tool-output share in estimate typography); the full NOT-ASSESSABLE list for this submission (per-factor, with reasons, plus the never-assessable register); the could-not-measure kind when one applies; and the price line verbatim. NO measurement factors are computed free and no factor table is returned. Free allowance: 100 per day per caller wallet, minimum interval 5,000 ms, 402 on exhaustion.","custody":{"construction":"In-memory processing within a single request lifetime; submissions persist nowhere, on any path including errors. The canary proof over every surface the service controls is a launch precondition (staged in RELEASE-STEPS); the build suite additionally proves store-nothing locally.","ledger_closed_fields":["payer wallet","timestamp/day","price (USDC units) with the CAD fair-market-value block (rate, rate date, basis, cad_pending, refund)","payment tx id + Solana fee (lamports)","criteria version","measurement line","op","declared format identifier","entry count","record byte size","aggregate outcome (measured_full / measured_limited / could_not_measure + kind)","house flag"],"ledger_note":"The ledger list above is closed: adding a field is a criteria/handling version change. The ledger NEVER carries any entry text, excerpt, tool output, blob content, or any submitted string of any kind.","errors":"Error handling is closed-form: static strings plus numeric facts only (lengths against caps, refusal codes). No error path interpolates any part of a submission."},"handling":"Submitted record content is processed transiently, in memory only, and is never stored — not in KV, not in logs, not in the payments ledger, not in metrics, and not in error records. The payments ledger records only, in aggregate form: the payer, the time, the price, the declared format identifier, the criteria version, the entry count, the record byte size, and the aggregate outcome (measured in full / measured limited / could-not-measure, with the could-not-measure kind). No entry text, no excerpt, no tool output, no blob content, and no submitted string of any kind is recorded. Because nothing is kept, a paid retry re-sends the record. The report issued to the payer is the only artefact that carries the measurement, and it contains indices, classes, counts and sizes only — no submitted content. Honesty limit: this statement asserts what the service's own surfaces record — not platform-level infrastructure outside its control; the canary proof staged as a launch precondition names exactly the surfaces it verifies.","payment_includes":"$0.05 buys one full context-composition measurement report for one submitted session/context record: the measurement line and every assessable factor under the published context-composition/v1 criteria (GET /criteria), returned as a signed report. Factors that are not assessable for the submitted format are disclosed free, before payment, by the pre-check. The payment includes exactly one measurement of the one record you send inline in envelope context-composition-envelope/1 (up to 5 MiB body, up to 10,000 entries, up to 1 MiB per entry) and one signed report stating: the two-axis composition (10 provenance classes x 7 content classes), metric register M01-M15 as the record supports, factors F-1 to F-12 with each factor ASSESSABLE or NOT-ASSESSABLE, and LIMITED in the measurement line whenever any factor is NOT-ASSESSABLE. Composition only: no report states or implies any judgement of the record, the agent, or any model. A free pre-check discloses the full per-format assessability for your submission before any payment. A could-not-measure submission on the paid route is returned unpaid. Records are processed in memory only and are never stored; the payments ledger records only the closed aggregate field list published in the criteria.","kill_line":"Kill line (M-55 / Q-22, the X6 pass's own line, carried): build, bank, and hold under the operator's 2026-11-03 doctrine; judged at the fleet's periodic reviews. Day-0 = the first OUTSIDE paid settle (a wallet that is not ours, not a house proof, not a test wallet; house proofs never start the clock). Day-0 + 60 days = report-only checkpoint (usage, payer count, repeat-payer count, refunds, free-vs-paid ratio; no keep/park decision). Day-0 + 6 months = keep/park decision — kept only on outside use proportionate to a live service (outside paid calls from more than one payer, at least one repeat payer, net non-negative after rail fees); otherwise it parks with its reactivation condition recorded. Tripwires: (1) refunds >5% of paid calls in any rolling 30 days = stop-serving review; (2) free use >10x paid use = stop-and-review; (3) a wrong report caused by undisclosed stale or partial data = stop-serving until fixed — the canonical cases here are an estimate printed with a count's typography, or a LIMITED line missing its LIMITED; (4) a composition report found in the wild presented as a recall or quality certification = stop-and-review (NOT stop-serving: it fires only where the presentation asserts or implies the report establishes recall, output quality, or agent fitness; mere citation of figures, criticism, or an operator presenting their own report with their own argument does not fire it; no monitoring duty is created — found means identified through an existing standing watch, reported with a locatable reference, or surfaced through ordinary operations; the review opens within 5 business days and concludes in a format/terms remedy, a public disavowal, or escalation to stop-serving for a pattern, by recorded decision); (5) any retained surface carrying submitted content = stop-serving.","never":"This service never fetches anything (no URL mode in envelope/1); never stores a submission; never prints submitted content in any report, pre-check, ledger line, metric, or error; never states or implies any judgement of a record, an agent, or a model; never computes a composite score; never prints an estimate with a count's typography; never issues a report with a NOT-ASSESSABLE factor whose measurement line lacks LIMITED.","service":"context-audit","version":"1.0.0","endpoints":{"criteria":"GET /criteria (free)","precheck":"POST /precheck (free, input validation + full assessability disclosure only: no factor table, no measurement)","audit":"POST /audit (paid, $0.05 per report)","metrics":"GET /metrics","not_offered":"Any other POST path answers NOT COVERED. No best-effort result is produced."}}