RFC-0006 · Reference catalog
Versioned draft snapshot
RFCs, reference catalogs, and evidence reflect Spec 3b2e3e7a114fb826b1445d39a48756b8fff629cd. Counts and pending/status notes belong to that snapshot. Read the dated project update for later progress.
Source repositories are private during staging. Links marked “repository access required” need access to the linked repository.
Generated reference catalog. This page renders structured Lean data for RFC-0006: defined terms, diagnostics, dependencies, and invariants. It does not establish proof coverage or runtime conformance. The authored narrative lives in
RFC-0006.This page is generated from the
lean/Gnomon/Spec/module for RFC-0006. Edit that source and regenerate this catalog.
Title: Semantic Type Model
Status: draft
Owners: Module Architecture, Semantic Core
Proof citations in source: 15 / 15. Standalone proof verification is pending.
Definitions
| Term | Meaning |
|---|---|
| Action | Typed operation composing mutation declarations and emitting domain events; carries no actor or auth logic. |
| Claim | Wrapper that carries provenance, confidence, status, and evidence for a value of type T. |
| ClaimStatus | Normative flow declaration governing the epistemic standing of every Claim |
| Declaration kind | Syntactic form that produces a named artifact in the semantic graph; not a value type. |
| Entity | Primary persistent, identifiable domain object. |
| Enum | Closed set of named constant values; declared top-level or inline on a field. |
| Facet | Reusable meaning module composed additively into entities via includes; replaces inheritance. |
| Flow | Named set of states and allowed transitions for a lifecycle-bearing entity. |
| Fully-Qualified Name (FQN) | Identifier of every declaration in the semantic graph: namespace#name with optional member path. |
| JSON | Opaque value type that opts out of structural value validation; AI wrapper and other compiler rules still apply. Reserved identifier. |
| Mutation | Pure, transactional, composable unit of state change with typed inputs and an effects block. |
| Policy | Constraint or permission rule applied to entity, facet, or action declarations. |
| Reference | A field typed as a declared entity name; stored as an Identifier and resolved at runtime. |
| Relation | First-class directed semantic link between two entities with cardinality, constraints, and qualifiers. |
| Unit | Singleton scalar type with exactly one value (); valid as a return type but not a field type. |
| Value | Implicit abstract root of the value type hierarchy; not writable as a field type. |
| variant | Discriminated union declared with the variant keyword; produces a Composite value type. |
Diagnostics
| Code | Severity | Description |
|---|---|---|
M06020 | Error | Field typed as Value (abstract root; use a specific value type). |
M06021 | Error | Field typed as entity name not declared in scope. |
M06022 | Error | Field typed as a declaration kind (declaration kinds are not value types). |
M06023 | Error | User declaration uses reserved name JSON. |
M06024 | Error | Field typed as Unit (Unit is a return type only, not a field type). |
M06040 | Error | Module namespace begins with reserved prefix core. |
M06041 | Error | FQN reference cannot be resolved to a declared artifact. |
M06042 | Error | Member path segment does not name a declared member of the target declaration. |
M06050 | Error | Null received for a required field at deserialization boundary. |
M06051 | Error | Null element received inside a List |
M06500 | Error | Entity declares no meaning field. |
M06501 | Error | Facet inclusion produces field name collision. |
M06502 | Warning | is field references undeclared entity (documentation-level warning). |
M06503 | Error | Entity includes a facet that declares a conflicting requires constraint. |
M06504 | Error | Facet rule references field not declared in facet body or requires list. |
M06510 | Error | action or procedure references undeclared actor role. |
M06511 | Error | action has no declared mutations block. |
M06512 | Error | action references unknown invariant in mustSatisfy. |
M06520 | Error | AI-produced or AI-modified field does not use Claim |
M06521 | Error | Claim missing confidence where policy requires it. |
M06522 | Error | Claim status not in allowed set. |
M06524 | Error | Claim<Claim |
M06530 | Warning | During import preflight, AI-produced entity has bare JSON field with no epistemic annotation. |
M06531 | Error | @epistemic annotation on non-JSON field (use Claim |
M06534 | Error | Transition references undeclared state. |
M06535 | Error | Reversible transition declared without audit policy. |
M06536 | Warning | AI actor declared permission to perform a terminal transition. |
M06537 | Error | State transition rejected — regression on non-reversible flow transition. |
M06540 | Error | Policy selector matches no declared types. |
M06541 | Error | Hard enforcement policy references undeclared invariant. |
M06610 | Error | effects block references entity not declared in scope. |
M06611 | Error | transitions statement on entity with no declared flow. |
M06612 | Error | creates in |
M06613 | Error | mutates |
M06614 | Error | post-commit statement (dispatches, sends, emits, calls) inside mutation effects block. |
M06615 | Warning | mutation has no effects block (no-op). |
Invariants
- A Claim
wrapper must accompany any field that may be produced by an AI actor. (enforced by: compile-time) - An action declaration must exist for each action an AI actor is permitted to perform; absence implies prohibition. (enforced by: compile-time)
- An entity must not reference more than one flow declaration. (enforced by: compile-time)
- Claim<Claim
> is prohibited; nested epistemic wrappers produce compile error M06524. (enforced by: compile-time) - Every declared kind must carry a meaning field sufficient for a non-technical author to understand it. (enforced by: compile-time)
- Every domain concept must be declared as one of the declared declaration kinds. (enforced by: compile-time)
- Facet composition must not use inheritance chains; composition is strictly additive via includes. (enforced by: compile-time)
- Facets must not include other facets; transitive facet composition is not supported. (enforced by: compile-time)
- Gnomon has no null type, no nullable modifier, and no null literal; absent optional fields are not-present, never null. (enforced by: compile-time + runtime)
- State transitions must be monotone by default; regression requires explicit reversible:true and audit events. (enforced by: runtime)
- User modules must not declare a namespace beginning with the reserved prefix core. (enforced by: compile-time)
Normative Statements
Statements are structured source data. Proof citations, where present, have not passed a standalone Gnomon proof gate.
Composition Rules
- MUST_NOT — Facets must not include other facets; transitive facet composition is unsupported.
- MUST_NOT — Included facets must not declare conflicting field names (M06501). (proof citation:
rfc0006_facet_conflict_accepted_or_rejected; verification pending) - MUST_NOT — The is field on entity must not create structural or behavioral inheritance.
Invariants
- MUST — A Claim
wrapper must accompany any field that may be produced by an AI actor. (proof citation: rfc0006_ai_field_carries_claim_wrapper; verification pending) - MUST — An action declaration must exist for each action an AI actor is permitted to perform; absence implies prohibition. (proof citation:
rfc0006_b16_grounded; verification pending) - MUST — Every declared kind must carry a meaning field understandable by a non-technical author. (proof citation:
rfc0006_b14_grounded; verification pending) - MUST — Every domain concept must be declared as one of the declared declaration kinds. (proof citation:
rfc0006_b6_grounded; verification pending) - MUST_NOT — Facet composition must not use inheritance chains; composition is strictly additive via includes.
- MUST — State transitions must be monotone by default; refinement is allowed but silent regression is forbidden.
- MUST_NOT — The Gnomon type system has no null type, no nullable modifier, and no null literal; absence is represented as not-present. (proof citation:
rfc0006_b27_grounded; verification pending)
Monotone Refinement
- MUST — Reversible transitions must emit an audit event.
- MUST_NOT — The kernel must not permit a state regression without an explicit reversible: true declaration.
- MUST — The kernel must reject any Command that produces a regression on a non-reversible flow transition (M06537).
Security and Authorization
- MUST_NOT — AI actors must not be granted permissions on procedure declarations beyond those explicitly declared in their agent definition. (proof citation:
rfc0006_ai_permissions_bounded_by_agent_definition; verification pending) - MUST — Claim
status fields must be treated as trust signals. - MUST — Every field modified by an AI actor must carry a Claim
wrapper preserving source, confidence, and timestamp. (proof citation: rfc0006_b2_grounded; verification pending) - MUST — State transitions by AI actors must be authorized at the policy/flow level, not inferred from field-write permissions. (proof citation:
rfc0006_b20_grounded; verification pending)
Self-Explanation Contract
- MUST — Every declared type must be renderable as a self-explanation covering meaning, fields, facets, states, actions, AI permissions, and provenance. (proof citation:
rfc0006_b31_grounded; verification pending)
Three-Layer Authoring Contract
- REQUIRED — Every domain concept must be definable across human, structural, and evidence layers for AI-safe operation.
Type System and Declaration Kinds
- MUST_NOT — A facet must not define new state machines or override fields declared by the including entity. (proof citation:
rfc0006_b38_grounded; verification pending) - MUST — Adapters generating operations from external nullable schemas must map nullable fields to optional Gnomon fields. (proof citation:
rfc0006_adapter_nullable_maps_to_optional; verification pending) - MUST_NOT — An entity must not reference more than one flow.
- MUST — Authors must use Unit rather than void; void is not defined in the Gnomon type system. (proof citation:
rfc0006_b0_grounded; verification pending) - MUST_NOT — Claim<Claim
> nesting is prohibited and must produce compile error M06524. (proof citation: rfc0006_no_nested_claim_wrapping; verification pending) - MUST — Reversible flow transitions must produce audit events.
- MUST_NOT — The spec must not refer to value types using the XxxType form. (proof citation:
rfc0006_no_xxxtype_naming; verification pending) - MUST — User modules must not declare a namespace beginning with the reserved prefix core.
Linked References
(no cross-RFC dependencies)