# Grammar Validation Products validate themselves against the grammar by presenting a `GrammarComposition` — a sequence of grammar elements describing how the experience is composed. ## The seven checks 1. **Elements recognized** — every step references a ratified grammar element. 2. **Ordering respected** — if both elements of a precedence appear, the earlier one appears first. 3. **Rationale beside decision** — if `decision` appears, `rationale` appears at or before it. 4. **Purpose first** — if `purpose` appears, it is at or before every other element. 5. **Capability outcome** — compositions that reach `decision`, `continuity`, or `posterity` must also name `understanding` or `capability`. 6. **Continuity awareness** — `posterity` cannot appear without `continuity`. 7. **No contradiction** — the composition does not contradict any ordering rule. ## How products use it ```ts import { makeComposition, validateComposition, } from "@/platform/stewardship/grammar"; const c = makeComposition("headsup-room-arrival", "headsup", [ "purpose", "context", "invitation", "question", "understanding", "contribution", "rationale", "decision", "memory", "continuity", "capability", "posterity", ]); const report = validateComposition(c); // report.passed === true means the composition is grammatical. ``` Location: `src/platform/stewardship/grammar/grammar-validation.ts`.