{
  "registry": "rules",
  "version": "0.1.0",
  "note": "Rule IDs name each refusal, so tools report file, node and rule in the form path:line: rule: message.",
  "rules": [
    {
      "id": "correction.digits",
      "description": "A digit changes without crop evidence, or a leaf's digits change undeclared.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "correction.evidence",
      "description": "An insert has no crop evidence.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "correction.find",
      "description": "`find` is empty or does not occur exactly once.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "correction.insert",
      "description": "Text is inserted outside the runs of a node, or at a bad offset.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "correction.merge",
      "description": "The nodes differ in kind, are not mergeable, or are not adjacent siblings.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "correction.move",
      "description": "The destination is unknown or inside the moved node.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "correction.op",
      "description": "The operation is unknown.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "correction.reclassify",
      "description": "The new kind has another content shape.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "correction.relabel",
      "description": "The kind takes no label.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "correction.replace",
      "description": "Runs replace text outside a text run, or include an equation run.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "correction.schema",
      "description": "A proposed correction does not match the correction schema.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "correction.set",
      "description": "The attribute cannot be set on the kind.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "correction.split",
      "description": "The node is not a sentence, the offset is outside it or inside a run other than text, or a part is empty.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "correction.target",
      "description": "A target, parent or sibling is not a live node, or the root is deleted, moved, merged or reclassified.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.correction.after",
      "description": "The last correction of a leaf does not end at the leaf's current node_hash.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.correction.id",
      "description": "A correction's id does not derive from its record.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.correction.index",
      "description": "Correction indexes do not count from 1 without gaps.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.correction.rev",
      "description": "document.json's rev is not the number of corrections.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.fidelity.report",
      "description": "document.json's fidelity distribution does not recompute.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.hash.align-key",
      "description": "An align_key does not recompute.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.hash.algorithm",
      "description": "document.json names no hash algorithm, or one the consumer does not implement.",
      "chapter": "spec/01-conventions.md"
    },
    {
      "id": "doc.roster.did",
      "description": "A roster key's did:key is not the one its public key determines.",
      "chapter": "spec/08-fidelity.md"
    },
    {
      "id": "doc.hash.key",
      "description": "The key supplied does not match the package's key_id.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.hash.match-hash",
      "description": "A match_hash does not recompute.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.hash.meta",
      "description": "meta_hash does not recompute.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.hash.node-hash",
      "description": "A node_hash does not recompute.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.hash.own-hash",
      "description": "An own_hash does not recompute.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.hash.root",
      "description": "document.json's root is not the root node's node_hash.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.hash.text-hash",
      "description": "A text_hash does not recompute.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.id.alias",
      "description": "An alias does not name a live node.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.id.form",
      "description": "An ID is not seven letter-first Crockford base32 characters.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.id.retired-live",
      "description": "An ID is both live and in the ID table.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.id.retired-missing",
      "description": "A correction retired an ID that ids.jsonl does not record.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.id.successor",
      "description": "A successor names an ID that is neither live nor in the ID table.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.id.unique",
      "description": "An ID occurs twice.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.location.node",
      "description": "A location names an unknown node.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.location.page",
      "description": "A location's page_fp is not a page of any witness.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.node.attrs",
      "description": "A section has no level.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.node.content",
      "description": "A node's content does not have the shape its kind requires.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.node.kind",
      "description": "A node kind is not in the list.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.node.label",
      "description": "A node of a kind that takes no label has one.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.node.schema",
      "description": "A node a correction produced does not validate against the node schema (a property the kind does not take, or a bad shape).",
      "chapter": "spec/11-corrections.md"
    },
    {
      "id": "doc.counts",
      "description": "document.json's counts are not the number of nodes and of leaves.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.history",
      "description": "document.json's history is not the root of the tree over the package's corrections.",
      "chapter": "spec/11-corrections.md"
    },
    {
      "id": "doc.key.work",
      "description": "The document key does not begin with the work key, or its suffix is not a version suffix.",
      "chapter": "spec/02-model.md"
    },
    {
      "id": "doc.key.suffix",
      "description": "The work key's hash part is not the hash of the work's identifier.",
      "chapter": "spec/02-model.md"
    },
    {
      "id": "doc.order.ids",
      "description": "ids.jsonl is not aliases by ID, then retirements by revision and ID.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.order.locations",
      "description": "locations.jsonl is not sorted by node order, page and fingerprint.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.order.pages",
      "description": "pages.jsonl is not sorted by witness and page.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.order.receipts",
      "description": "receipts.jsonl is not sorted by time and ID.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.order.references",
      "description": "references.jsonl does not follow document order.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.order.suspects",
      "description": "suspects.jsonl is not sorted by ID.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.page.witness",
      "description": "A page names an unknown witness.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.policy.keyed",
      "description": "A checks-only package carries plain hashes.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.policy.withheld",
      "description": "Text is present where the policy withholds it, or withheld where the policy is full, or a checks-only package carries corrections or suspects.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.qa.key",
      "description": "A spot-check seed key is not a registered Ed25519 spot-check key, or was registered after the receipt.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.qa.of",
      "description": "A spot-check names a receipt the package does not hold.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.qa.sample",
      "description": "A spot-check sample does not follow from its seed.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.qa.seed",
      "description": "A spot-check seed is not the checker's signature over the receipt.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.receipt.doc",
      "description": "A receipt names another document.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.receipt.id",
      "description": "A receipt's or revocation's id does not derive from its record.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.receipt.nodes",
      "description": "A receipt's nodes are not sorted by ID, or one repeats.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.receipt.root",
      "description": "A receipt's Merkle root does not recompute.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.receipt.signature",
      "description": "A signature does not verify against the roster.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.reference.node",
      "description": "A reference record names a node that is not a reference.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.run.canonical",
      "description": "Runs are not canonical: an empty text run, or two adjacent text runs with the same styles.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.run.cite",
      "description": "A cite run names a node that is not a reference.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.run.equation",
      "description": "Equation runs do not name the sentence's equation children, once each, in order.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.run.fnmark",
      "description": "An fnmark run names a node that is not a footnote.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.run.kind",
      "description": "A run kind is not in the list.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.run.style",
      "description": "A style is unknown, or a run is both a subscript and a superscript.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.run.xref",
      "description": "A same-document xref names no node.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.table.header",
      "description": "A column or row header path names a node that is not a cell.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.tree.child",
      "description": "A node holds a child kind it may not hold, a heading is not first, or a once-only child repeats.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.tree.empty",
      "description": "A kind that must have children has none.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.tree.ord",
      "description": "A parent's children do not have ord 0 to n-1.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.tree.order",
      "description": "nodes.jsonl is not in document order.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.tree.root",
      "description": "The tree does not have exactly one root, of kind document.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "doc.witness.id",
      "description": "A witness ID does not derive from its SHA-256.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "grade.key-stale",
      "description": "An anchor in the exercise's key is stale, so nothing is graded with it.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "grade.kind",
      "description": "The exercise kind is unknown.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "package.file.canonical",
      "description": "A JSON or JSON Lines record is not in canonical JSON.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "package.file.empty",
      "description": "An optional JSON Lines file is present with no records.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "package.file.newline",
      "description": "A line of a JSON Lines file does not end with a newline.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "package.file.required",
      "description": "document.json, nodes.jsonl, witnesses.json or provenance.json is missing.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "package.manifest.absent",
      "description": "An entry listed without its bytes is not an asset, or its bytes are present.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "package.manifest.hash",
      "description": "A file's SHA-256 or size differs from its manifest entry.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "package.manifest.key",
      "description": "The manifest's key differs from document.json's.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "package.manifest.missing",
      "description": "The package has no MANIFEST.json.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "package.manifest.missing-file",
      "description": "A file the manifest lists is not in the package.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "package.manifest.order",
      "description": "Manifest entries are not sorted by path, or a path repeats.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "package.manifest.schema",
      "description": "MANIFEST.json does not validate against manifest.schema.json.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "package.manifest.unlisted",
      "description": "The package holds a file the manifest does not list.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "package.path.unsafe",
      "description": "A path is absolute, has an empty, `.` or `..` segment, a backslash or a NUL, is not normalized, or is or passes through a symbolic link.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "package.size",
      "description": "The package's files exceed the consumer's size limit.",
      "chapter": "spec/12-package.md"
    },
    {
      "id": "package.schema",
      "description": "A file or line does not validate against its schema.",
      "chapter": "spec/22-conformance.md"
    },
    {
      "id": "package.zip.entry",
      "description": "A zipped package is not a zip archive, or an entry is encrypted, a symbolic link, neither stored nor deflated, not marked as UTF-8, duplicated, unsafe as a path, or not under one top-level folder named by the key.",
      "chapter": "spec/12-package.md"
    },
    {
      "id": "package.zip.size",
      "description": "A zipped package expands past the consumer's limit, or an entry holds more than its header declares.",
      "chapter": "spec/12-package.md"
    }
  ]
}
