gnomonlearn
Docs/RFC-0006/Reference catalog

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.

← Read the authored RFC

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

TermMeaning
ActionTyped operation composing mutation declarations and emitting domain events; carries no actor or auth logic.
ClaimWrapper that carries provenance, confidence, status, and evidence for a value of type T.
ClaimStatusNormative flow declaration governing the epistemic standing of every Claim field value.
Declaration kindSyntactic form that produces a named artifact in the semantic graph; not a value type.
EntityPrimary persistent, identifiable domain object.
EnumClosed set of named constant values; declared top-level or inline on a field.
FacetReusable meaning module composed additively into entities via includes; replaces inheritance.
FlowNamed 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.
JSONOpaque value type that opts out of structural value validation; AI wrapper and other compiler rules still apply. Reserved identifier.
MutationPure, transactional, composable unit of state change with typed inputs and an effects block.
PolicyConstraint or permission rule applied to entity, facet, or action declarations.
ReferenceA field typed as a declared entity name; stored as an Identifier and resolved at runtime.
RelationFirst-class directed semantic link between two entities with cardinality, constraints, and qualifiers.
UnitSingleton scalar type with exactly one value (); valid as a return type but not a field type.
ValueImplicit abstract root of the value type hierarchy; not writable as a field type.
variantDiscriminated union declared with the variant keyword; produces a Composite value type.

Diagnostics

CodeSeverityDescription
M06020ErrorField typed as Value (abstract root; use a specific value type).
M06021ErrorField typed as entity name not declared in scope.
M06022ErrorField typed as a declaration kind (declaration kinds are not value types).
M06023ErrorUser declaration uses reserved name JSON.
M06024ErrorField typed as Unit (Unit is a return type only, not a field type).
M06040ErrorModule namespace begins with reserved prefix core.
M06041ErrorFQN reference cannot be resolved to a declared artifact.
M06042ErrorMember path segment does not name a declared member of the target declaration.
M06050ErrorNull received for a required field at deserialization boundary.
M06051ErrorNull element received inside a List or Map<K,V> at deserialization boundary.
M06500ErrorEntity declares no meaning field.
M06501ErrorFacet inclusion produces field name collision.
M06502Warningis field references undeclared entity (documentation-level warning).
M06503ErrorEntity includes a facet that declares a conflicting requires constraint.
M06504ErrorFacet rule references field not declared in facet body or requires list.
M06510Erroraction or procedure references undeclared actor role.
M06511Erroraction has no declared mutations block.
M06512Erroraction references unknown invariant in mustSatisfy.
M06520ErrorAI-produced or AI-modified field does not use Claim wrapper.
M06521ErrorClaim missing confidence where policy requires it.
M06522ErrorClaim status not in allowed set.
M06524ErrorClaim<Claim> nested claim — prohibited.
M06530WarningDuring import preflight, AI-produced entity has bare JSON field with no epistemic annotation.
M06531Error@epistemic annotation on non-JSON field (use Claim directly).
M06534ErrorTransition references undeclared state.
M06535ErrorReversible transition declared without audit policy.
M06536WarningAI actor declared permission to perform a terminal transition.
M06537ErrorState transition rejected — regression on non-reversible flow transition.
M06540ErrorPolicy selector matches no declared types.
M06541ErrorHard enforcement policy references undeclared invariant.
M06610Erroreffects block references entity not declared in scope.
M06611Errortransitions statement on entity with no declared flow.
M06612Errorcreates in names invalid or unreachable flow state.
M06613Errormutates . names undeclared field.
M06614Errorpost-commit statement (dispatches, sends, emits, calls) inside mutation effects block.
M06615Warningmutation has no effects block (no-op).

Invariants

  1. A Claim wrapper must accompany any field that may be produced by an AI actor. (enforced by: compile-time)
  2. An action declaration must exist for each action an AI actor is permitted to perform; absence implies prohibition. (enforced by: compile-time)
  3. An entity must not reference more than one flow declaration. (enforced by: compile-time)
  4. Claim<Claim> is prohibited; nested epistemic wrappers produce compile error M06524. (enforced by: compile-time)
  5. Every declared kind must carry a meaning field sufficient for a non-technical author to understand it. (enforced by: compile-time)
  6. Every domain concept must be declared as one of the declared declaration kinds. (enforced by: compile-time)
  7. Facet composition must not use inheritance chains; composition is strictly additive via includes. (enforced by: compile-time)
  8. Facets must not include other facets; transitive facet composition is not supported. (enforced by: compile-time)
  9. 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)
  10. State transitions must be monotone by default; regression requires explicit reversible:true and audit events. (enforced by: runtime)
  11. 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

  1. MUST_NOT — Facets must not include other facets; transitive facet composition is unsupported.
  2. MUST_NOT — Included facets must not declare conflicting field names (M06501). (proof citation: rfc0006_facet_conflict_accepted_or_rejected; verification pending)
  3. MUST_NOT — The is field on entity must not create structural or behavioral inheritance.

Invariants

  1. 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)
  2. 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)
  3. MUST — Every declared kind must carry a meaning field understandable by a non-technical author. (proof citation: rfc0006_b14_grounded; verification pending)
  4. MUST — Every domain concept must be declared as one of the declared declaration kinds. (proof citation: rfc0006_b6_grounded; verification pending)
  5. MUST_NOT — Facet composition must not use inheritance chains; composition is strictly additive via includes.
  6. MUST — State transitions must be monotone by default; refinement is allowed but silent regression is forbidden.
  7. 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

  1. MUST — Reversible transitions must emit an audit event.
  2. MUST_NOT — The kernel must not permit a state regression without an explicit reversible: true declaration.
  3. MUST — The kernel must reject any Command that produces a regression on a non-reversible flow transition (M06537).

Security and Authorization

  1. 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)
  2. MUST — Claim status fields must be treated as trust signals.
  3. 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)
  4. 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

  1. 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

  1. REQUIRED — Every domain concept must be definable across human, structural, and evidence layers for AI-safe operation.

Type System and Declaration Kinds

  1. 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)
  2. 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)
  3. MUST_NOT — An entity must not reference more than one flow.
  4. MUST — Authors must use Unit rather than void; void is not defined in the Gnomon type system. (proof citation: rfc0006_b0_grounded; verification pending)
  5. MUST_NOT — Claim<Claim> nesting is prohibited and must produce compile error M06524. (proof citation: rfc0006_no_nested_claim_wrapping; verification pending)
  6. MUST — Reversible flow transitions must produce audit events.
  7. MUST_NOT — The spec must not refer to value types using the XxxType form. (proof citation: rfc0006_no_xxxtype_naming; verification pending)
  8. MUST — User modules must not declare a namespace beginning with the reserved prefix core.

Linked References

(no cross-RFC dependencies)