### `wai.ai.usage`: AI usage preferences bound to the bytes, and the agent's consumption claim

- **The extension** ([ai-usage](extensions/ai-usage.md)) registers the record `wai.ai.usage`.
  A **usage statement** carries three published vocabularies verbatim, each in its own member:
  `aipref`, a statement of preference of `draft-ietf-aipref-vocab-08` in its Structured Field
  form (`train-ai`, `ai-use`, `search`); `tdmrep`, the TDM Reservation Protocol's
  `tdm-reservation` and `tdm-policy` (Final Community Group Report of 10 May 2024); and `cawg`,
  the entries of a `cawg.training-mining` assertion (Training and Data Mining Assertion 1.1).
  WAI adds no category and maps no term of one onto another. Each member names the revision it
  is read at, and a revision this one does not read is refused.
- **RFC 9651's Dictionary**, parsed in full: every bare item type, parameters and inner lists,
  with a repeated key keeping its last value. A value that does not parse, which the vocabulary
  would read as unknown throughout, is refused rather than carried.
- **Bound to the bytes.** The manifest member `ai_usage` puts the statement inside the envelope,
  so the object's receipt signs it with the content: an object whose statement is removed or
  altered no longer hashes to its receipt (`usage_unbound`). A room states its preference in a
  room usage record, `WAU1`, signed by the room authority and chained by the instant it takes
  effect, so a change never reaches what was published before it; the descriptor's layout is
  unchanged. A grant's attribute `ai_usage` carries the terms one principal is granted.
- **HTTP and MoQ.** An origin writes `draft-ietf-aipref-attach-05`'s `Content-Usage` field and
  the TDMRep fields from the signed statement (http-delivery §5.6); a client compares them by
  meaning, so a respelling is not a conflict and a contradiction is (`header_conflicts`). A MoQ
  catalog states a track's statement as `wai_ai_usage` (moq-streaming-format §4), checked the
  same way (`catalog_conflicts`).
- **One precedence rule.** A grant's terms decide the uses they name; otherwise every signed
  statement that governs the object, the most restrictive governing, as the vocabulary combines
  statements; unsigned statements count only where nothing is signed. CAWG's `constrained`
  reads as not allowed unless a grant says otherwise.
- **The consumption claim**: the jwp-receipts claim class `consumption` (§2.4.13 there), signed
  by the agent under its `did:key`. It names the objects by content hash, the term it acted
  under in every vocabulary their statements carry (or `null`, a use outside it), the statements
  it saw and the grant it held. A verifier checks it against the objects, their statements and
  the room, and refuses a use they disallow (`usage_disallowed`); the refusal is of the use, and
  the claim stays its signer's statement.
- **The gate.** A relay or gateway MAY require claims before it serves an agent: claimed before
  the fetch over HTTP, where an object's content hash is known first (the proposed request field
  `WAI-Usage-Claim`), or within a window of groups over MOQT; and MAY require every use to be
  allowed.
- **Reference and corpus.** `wai-rs` feature `ai_usage` (`src/ai_usage.rs`, with RFC 9651's
  parser in `src/ai_usage/sf.rs`), and the class's body and rules in
  `src/claim_receipt/consumption.rs`. `live-conformance/usage/`, written from fixed seeds by
  `wai_ai_usage_vectors`: statements, receipted envelopes (a `WAI2` among them) with a stripped
  and an altered statement, a room with chained records and agent grants, responses, catalogs,
  claims accepted and refused at each rule, and gates. Checked by `tests/ai_usage.rs` and by
  `live-conformance/ai_usage_verify.py`, a second implementation that shares no code with
  `wai-rs`, parses Structured Fields, canonical forms, receipts and claims itself, requires every
  mutated copy of the corpus to fail and every weakened copy of itself to be caught;
  `claim-conformance/claim_verify.py` reads the class's steps 1 to 4. The registry lists the
  record, the magic `WAU1`, the catalog field `wai_ai_usage` and the proposed field
  `WAI-Usage-Claim`.

