Concrete
Rulescontract

concrete/contract/reads-readable

Every fact a section reads is one the fact registry declares.

Every fact a section reads is one the fact registry declares.

Graded by the contracts stage of concrete check, in the contract venue. A violation reports this id and the file it failed at — see every rule and concrete check.

Reason

A fill's reads is exactly what the model sees beside its brief, and nothing else: there is no standing slice of facts for a read to widen. So any fact the registry declares is readable, and the one fault left is a read naming a fact the registry does not declare — a key no fill pass can resolve, so the brief that asked for it is answered from nothing, with the grounding its author wrote the read for simply absent.

The section's own reads is the union of its fills', so this rule reports the section and the fact that contributed the entry.

The same rule holds each fill's own reads — and an item field's — to the wire forms a section may read: every entry carries its kind, a fact as { "kind": "home", "key" } and a section's slot as { "kind": "section", "section", "slot" }. An entry without a kind is refused rather than guessed at, and so is { "kind": "item" }: a section's item fields do not read one another.

Type-caught, and not reachable from an authored section. reads takes REFS, and the fact refs are the registry's own entries, so a misspelled fact is a compile error — fact.pictures does not exist. The rule holds a published spec assembled somewhere other than a section's declaration; publishing re-runs the contract venue over the built artifact, and this is its half of that guard.

Fix

Read a fact the registry declares — pick it off fact in the fill's reads and the compiler holds the spelling — or drop the read.

Before and after

Both halves are the published section, not source: an undeclared fact cannot be authored.

{
  "reads": ["pictures"],
  "decisions": [
    {
      "id": "blurb",
      "kind": "text",
      "produces": ["blurb"],
      "fills": [
        {
          "kind": "fill",
          "verb": "write",
          "brief": "Describe what the photographs show, in one plain paragraph.",
          "reads": [{ "kind": "home", "key": "pictures" }]
        }
      ]
    }
  ]
}
{
  "reads": ["property.uploads"],
  "decisions": [
    {
      "id": "blurb",
      "kind": "text",
      "produces": ["blurb"],
      "fills": [
        {
          "kind": "fill",
          "verb": "write",
          "brief": "Describe what the photographs show, in one plain paragraph.",
          "reads": [{ "kind": "home", "key": "property.uploads" }]
        }
      ]
    }
  ]
}

On this page