Skip to content

Glossary

Each term links to the page that owns it. Keywords appear in code font exactly as the grammar spells them.

TermMeaning
AttestationAn attest KIND { source ... reason ... } declaration recording a reviewer’s decision that a changed file needs no Shape or docs update. It counts only when its source names the exact changed path, its reason is non-empty, and it is current. Coverage accepts only no_shape_change; a binding accepts the kinds its allow attest lines list. An attestation never satisfies a guard.
BindingA binding declaration that pairs review surfaces: when a changed path matches when_changed, some changed path must match require_changed, or each triggering path needs a current attestation of a kind the binding allows. Only shp check --changed-files enforces bindings.
Candidate effectAn effect candidate declaration that records a machine-suggested effect for a function, usually from AST generation. It is not part of the function’s effect summary.
ChangeA change declaration listing add, modify, and remove entries for model declarations. A modify or remove entry for a guarded target is the only thing that triggers its guards.
Checkershp, the command-line tool that loads the Shape model and deterministically accepts or rejects it.
ClaimA declaration the author asserts in a .shape file, such as a resource’s traits or a function’s effect summary. The checker judges claims against each other; reviewers judge them against the code.
Complete effectseffects complete { ... }: a claim that the listed effects are all the function has. An empty block claims the function has none, so prefer unknown effects while effects are not known.
ComponentA named part of the system that owns resources (owns), grants effects (grants), and holds function summaries (fn). owns is only name-checked: it does not gate grants and is not exclusive. Structural links to other components are relations, not component members.
Context typeThe type a rationale or memory declares, written with its target, such as RefactorConstraint<fn Editor.mergeAutosaves>. A shape trait names the context type its target requires.
CoverageThe change-set check, run by shp coverage --changed-files and shp check --changed-files, that each changed file on a governed path has a current Shape update or a current no_shape_change attestation. It verifies that the model changed with the source, not that the model is accurate.
CurrentFor a Shape-update ref, declared in a .shape file that is in the changed-file list; currency is per file, so every ref in a touched file counts, including old ones. For an attestation, new relative to the base model when the check has one (--base-ref or --base-model); without a base, attestations follow the per-file rule too.
Design memoryThe umbrella term for rationale, memory, guards, and reevaluation: typed records of why a target looks the way it does and which changes to it need review.
DiagnosticA checker message naming what failed, why, and which declarations caused it (the caused by: block). Output is sorted by kind, then by rendered text.
Domain packA set of shared Shape modules vendored into the repository, conventionally under shape/vendor/, which default discovery loads with the rest of the model. A local declaration with the same name silently wins over an imported one.
EffectA named operation, optionally targeted at a resource, such as Append<Revision>. Names are free identifiers matched literally. Only targeted effects are checked against final forbids and grants.
EvidenceA source ref on one effect entry (evidence ts("...")) that points at the code performing the effect. The checker never opens it; coverage matches its path, and the forbidden effect diagnostic prints it.
Final forbidA forbid final member of a trait, or a forbid final in a rule. It rejects a matching effect on the resource with forbidden effect. Nothing waives it: not grants, rationale, memory, reevaluation, attestations, or imports.
Governed pathA source path matched by the paths of an implementation that declares on_change require shape_update. Changed .shape files are never governed.
GrantA grants member of a component that permits the component’s functions to emit one targeted effect. A targeted effect without a grant fails with missing grant. A grant never overrides a final forbid.
GuardA guards { ... } block in a rationale or memory, such as on_change require ReEvaluation<Self> or forbid transform L. A guard fires only when a change declaration modifies or removes its target, and then requires a valid reevaluation.
HyperedgeOne relation viewed as an edge of the hypergraph: it joins all the components and resources the relation connects.
HypercycleA cycle in the hypergraph, found by following the traversal steps that calls, callbacks, provides, and coordinated_call relations produce. A forbid hypercycle rule rejects one and reports a shortest witness.
HypergraphThe graph whose vertices are components and resources and whose hyperedges are the declared relations. It contains only declared relations.
ImplementationAn implementation declaration mapping source path globs (paths) to a component (conforms_to), with an optional on_change requirement. Coverage uses only paths and on_change require shape_update; other on_change values parse but are ignored.
IncidenceThe index from each vertex to the hyperedges that touch it, which drives shp graph and hypercycle checks.
MemoryA memory declaration that records why a target has its current shape, who owns that context, what it protects, and which changes need a reevaluation.
ModuleThe namespace a .shape file declares with module name. An import lets a file refer to another module’s declarations without qualifying them.
PreludeThe built-in declarations every model can use without importing them: the AppendOnly trait and marker resource traits such as PII, the shape traits and their context types, and the relation kinds calls, callbacks, provides, and coordinated_call. A same-module declaration with the same name silently shadows a prelude trait.
RationaleA rationale declaration that explains an intentional shape of a fn, component, resource, relation, implementation, or rule, typed by a context type such as InlineRationale.
ReevaluationA reevaluation record that satisfies a named memory or rationale. While a valid one exists, none of that context’s guards fire. It is not tied to a particular change and does not expire.
RefactorConstraintThe memory context type that the RefactorSensitive shape trait requires on its target.
RelationA top-level relation declaration that links two or more components or resources under a kind, with connects and optional roles, expects, and summary. Each relation is one hyperedge, and relations are never declared inside components.
Relation kindThe kind label of a relation. The prelude kinds have built-in endpoint rules (calls, callbacks, and provides take exactly two endpoints; coordinated_call takes an ordered A -> B -> ... chain) and traversal; any other name is accepted without endpoint checks and produces no traversal steps.
Required descriptionA non-empty function description, required by the RequiresDescription shape trait or by writing description required.
ResourceThe data or other target a claim protects, such as Revision: a table, stream, endpoint, bucket, or domain object. It need not exist as a runtime type. Traits attach to resources, and components own them.
RuleA top-level rule declaration. It can finally forbid an effect on every resource that has a given trait (when R has T with forbid final), or constrain the relation graph with forbid provides, forbid path, or forbid hypercycle.
Shape modelEvery .shape file the checker loads, checked as one model. With no file arguments that is shape/**/*.shape under the working directory, including shape/vendor/; file arguments replace that discovery.
Shape traitA trait such as RefactorSensitive or PreserveInline attached to a fn, component, or resource that adds a review obligation instead of constraining effects: the target must have a rationale or memory of the trait’s context type, and some traits also require a description.
Shape updateAn edit to the Shape model, also called a model update. For coverage, a changed governed file counts as updated when a current .shape file names its exact path in a function source or in an effect entry’s evidence. Functions in generated-AST modules do not count.
Source refA reference written tag("path#symbol"), such as ts("src/history/log.ts#appendRevision"). The tag is never validated, and the checker neither resolves the path nor checks the anchor. Coverage matching drops the #anchor and any :line suffix. Prefer #symbol anchors to line numbers.
TraitA trait declaration, or a prelude trait such as AppendOnly, attached to a resource with resource R : T. Only its forbid final and require_context members affect checking; allow, require, and plain forbid members parse but are not enforced.
Unknown effectseffects unknown: an explicit marker that a function’s effects are not known yet. Strict shp check rejects it in authored modules; --allow-unknown-effects downgrades it to a warning for local drafts, and generated-AST modules are exempt.