This runnable mini-repository demonstrates §FS-fields:
a version-2 grund.toml that says what an FS, an AR and a DF look like, and
grund check holding every declaration to it.
Run it from the repository root:
grund check examples/fields/repo
echo $? # 1: four shape errors, one shape warningThe config states three shapes:
- FS must open with a
termschapter titledTerms.FS-signupdoes;FS-loginwrites its Terms after1. Behaviour, and is told it is section 2 of 2 when its kind places it first. - AR must open with
placement, andtermscomes directly after it, as awarn.AR-storeis clean.AR-sessionhas no placement: that is onemissing-fielderror, and itstermsis not also reported out of place, because an absent field is skipped and the next one takes its place (§FS-fields.order.after).AR-auditputs1. Designbetween the two, which is a warning, becausetermsispresence = "warn". - DF is
closed, and its one field is a scalar: thestatuschapter's display name must be one ofProposed,AcceptedorSuperseded.DF-cachesaysAccepted;DF-hashingsaysMaybe, and writes asurprisechapter its kind does not declare.
docs/ar/AR-session.md:1: error: AR-session has no placement field; kind AR declares it; add its placement section
docs/df/DF-hashing.md:3: error: DF-hashing.status is "Maybe"; kind DF admits Proposed, Accepted, Superseded; retitle the heading to one of them
docs/df/DF-hashing.md:7: error: DF-hashing.surprise is not a field of kind DF, which is closed; its fields: status; rename it to one of them, number it, or add it to the kind's fields
docs/fs/FS-login.md:9: error: FS-login.terms is section 2 of 2; kind FS places it first; move the section there
docs/ar/AR-audit.md:13: warning: AR-audit.terms is section 3 of 3; kind AR places it directly after placement; move the section there
A field is found by its section name, never by its title, so
DF-hashing.status is the same coordinate whatever the status says. Fix the
four errors and the run exits 0 with the standing warning; change terms on
AR to presence = "must" and that warning becomes an error.
The fields guide has every key, the order rules, the strength table and what the loader refuses.