---
name: Structural Check
desc: Validation of entry shape, structural targets, footers, and witnesses.
category:
  - concept
belongs:
  - sirno-lake
prerequisite:
  - metadata
  - generated-footer
  - sirno-witness
---

Sirno checks structure.

Structural checks include required metadata fields, accepted field shapes,
reference existence, generated footer boundaries,
and *witness* lookup validity when requested.
They check references through fields configured by `[structural.FIELD]` subtables.
Each configured structural field must also name an existing *entry*.
That structural-inhabitance check is controlled by `[check].structural-inhabitance`
and is enabled when the flag or the whole `[check]` table is absent.
Category metadata also has a semantic target check.
Every *entry* used as a `category` target must itself include `category: category`.
When `category` metadata is present or `[structural.category]` is configured,
checks warn if the `category` *entry* is missing.
When `[repo].members` is configured,
review checks report *repository witness* blocks that name missing *entries*.
They also report configured *witness* delimiters that are not part of a complete block.

Generated footer checking has two parts.
Sentinel shape is always checked.
Freshness is controlled by `[check].render`,
which is enabled by default.

During editing, dangling structural ids may warn.
At an explicit review boundary, dangling references are errors.
List-valued metadata fields that are absent from `[structural]` always warn.
Configured structural fields that name missing *entries* follow the same edit warning
and review error boundary as dangling structural ids.

Checks keep local movement fast while making review boundaries strict.
They do not decide whether prose is true or whether code satisfies a claim.

The check boundary matters because editing and review have different needs.
During editing, a person may create an *entry* before creating every related target.
Warnings keep that work visible without blocking movement.
At review time, dangling references should be fixed,
because the *lake* is being treated as a coherent design form.

File checks keep the Sirno Lake shape predictable.
An *entry* directory contains Markdown *entry* files with valid ids.
Each file starts with accepted frontmatter.
Files may use LF or CRLF line endings.
Mixed LF and CRLF line endings warn,
because a file should keep one line-ending style even when Sirno can still parse it.
Generated footer sentinels must be well formed.
Malformed structural values are errors because tools cannot safely infer target ids from them.
Unconfigured structural fields are warnings
because the *entry* names structure the project config does not enable.

Metadata target checks keep the graph navigable.
If an *entry* names a target through configured structural metadata,
that target should exist by the time the *lake* is reviewed.
If `Sirno.toml` configures a structural field,
the field name should also exist as the *entry* that documents that field.
`[check].structural-inhabitance` controls that configured-field entry check.
This lets query results, generated footers, tide workitems,
and reader navigation agree about the same set of *entries*.

Category target checks keep kind vocabulary explicit.
An *entry* that appears in another *entry*'s `category` list is a category target.
That target must include `category: category`,
so a reader can tell which *entries* may classify other *entries*.
Missing markers follow the edit-warning and review-error boundary.
The missing `category` *entry* diagnostic is always a warning,
because it points to the default vocabulary entry rather than one authored edge.

Semantic review remains human and agent work.
The checker can say that a *witness* block is shaped correctly.
It can report configured *witness* blocks that refer to missing *entry* ids.
It can report an opening or closing *witness* delimiter that has no matching delimiter.
It cannot say that the witnessed *repository* artifact is a good implementation of the claim.
That distinction keeps Sirno useful without pretending to solve judgment.

---

> **Sirno generated links begin. Do not edit this section.**

- belongs (to):
  - [sirno-lake](sirno-lake.md)
- belongs (from): (none)

> **Sirno generated links end.**
