Appendix — AEOS Schema Profile v1
Canonical topic owners: AEOS Specification v1 and the published AEON v1 contract artifacts.
This appendix defines the canonical AEON-authored schema document form for AEOS v1.
It complements, and must project compatibly into, the shipped AEOS v1 SchemaV1 validator surface.
1. Scope and purpose
AEOS Schema Profile v1 defines the structure and interpretation of AEON documents used as schemas for AEOS validation.
It specifies:
where schemas store rules, patterns, and charsets
how rules bind SANSA path or selector targets to constraints
what kinds of references are allowed (and forbidden)
strict separation between schema validation and data validation
This profile does not define pattern semantics — those are defined by AEOS Pattern Profile v1.
2. Fundamental model
AEOS validates data AES against schema AES.
Relationships: Connection from data.aeon to AEON Core; Connection from AEON Core to AES_data; Connection from schema.aeos to AEON Core; Connection from AEON Core to AES_schema; Connection from AES_schema to SchemaV1 Projection; Connection from AES_data to AEOS; Connection from SchemaV1 Projection to AEOS; Connection from AEOS to Result Envelope.
AEOS NEVER:
mutates either AES
materializes or rewrites data references
follows data references unless an explicit schema rule opts in
coerces values
interprets semantics beyond form
The .aeos document is the canonical human-authored schema format.
SchemaV1 remains the canonical in-memory validator format.
Loaders MUST project a valid .aeos document into a valid SchemaV1 object before validation begins.
Document header declarations are separate from schema authoring. An AEON document MAY declare:
aeon:header = {
schema = "altopelago.main_schema.v1"
schemas = {
authoring = "altopelago.authoring_schema.v1"
validation = "altopelago.validation_schema.v1"
vendor_acme = "acme.vendor_schema.v1"
}
}
In that model:
schemais the primary schema id declared by the document producer.schemasis an optional object of additional named schema associations.Header schema declarations are descriptive metadata only; they do not dictate consumer processing behavior.
A consumer MAY apply
schema, MAY apply a named association fromschemas, MAY ignore the declaration, or MAY enforce a local schema instead.If a consumer does choose among declared schema associations,
schemais the default fallback.Context keys SHOULD use identifier-safe names with
_separators rather than..
3. Schema document top-level shape
A Schema Profile v1 document MUST be an AEON document containing a top-level binding at canonical path $.aeos.
That binding MUST be typed as schema.
Canonical form:
aeos:schema = {
id = "com.example.person" // REQUIRED
version = "1" // REQUIRED
rules = [ ... ] // REQUIRED
patterns = { ... } // OPTIONAL
charsets = { ... } // OPTIONAL
world = "closed" // OPTIONAL
reference_policy = "allow" // OPTIONAL
datatype_allowlist = [ ... ] // OPTIONAL
datatype_rules = { ... } // OPTIONAL
}
Rules:
$.aeosMUST be present.The binding at
$.aeosMUST carry datatype/type annotationschema.$.aeos.idMUST be present and MUST be a string.$.aeos.versionMUST be present and MUST be a string.$.aeos.rulesMUST be present.Any unknown top-level key under
$.aeosis invalid:code = "invalid_schema_key"
Loader requirements:
A
.aeosloader MUST parse the document as normal AEON.It MUST locate
$.aeos, confirm theschematype annotation, and materialize its object value.It MUST validate the schema-document contract before projection.
It MUST project the materialized
$.aeosobject into a valid in-memorySchemaV1.
4. Rules section
4.1 Purpose
$.aeos.rules binds SANSA path or selector targets to constraints.
Each rule applies independently; rule order has no semantic meaning.
4.2 Shape
rules = [
{
path:sansa = $.user.email
constraints = {
type = "StringLiteral"
apply_pattern = "email"
}
}
{
selector:sansa = $.servers.*.port
constraints = {
type = "IntegerLiteral"
}
}
]
Rules:
rulesMUST be a list.Each item MUST be a Rule Object.
Each Rule Object MUST provide exactly one target:
pathselector
pathis an exact SANSA path target.selectoris a SANSA selector target.Native AEON schema source SHOULD encode targets as SANSA literals:
path:sansa = $.user.emailselector:sansa = $.servers.*.port
Programmatic
SchemaV1payloads MAY carrypathandselectoras strings.Loaders MUST reject a rule with neither target field.
Loaders MUST reject a rule with both target fields.
Invalid:
code = "invalid_rule_shape"
4.3 Rule Object
A Rule Object contains a target and constraints:
| Key | Required | Meaning |
|---|---|---|
path | XOR | Exact SANSA path target |
selector | XOR | SANSA selector target |
constraints | YES | Constraint object applied to each match |
path MUST NOT contain expansion, pattern, filter, or wildcard selectors.
selector MAY contain SANSA selector syntax such as .* and .**.
SANSA deliberately does not define [*] as a selector form; schema rules that
need list/item expansion use selector:sansa = $.items.*.
The constraints object MAY contain the following keys:
| Key | Required | Meaning |
|---|---|---|
required | NO | Presence requirement |
type | NO | Required literal kind |
reference | NO | Reference allowance policy |
reference_kind | NO | Required reference kind |
reference_target_path | NO | Author-friendly reference target path selector |
reference_target_pattern | NO | AEOS portable-pattern fallback for target path |
follow_reference_form | NO | Opt in to bounded followed-value checks |
type_is | NO | Container kind requirement |
length_exact | NO | Exact tuple/list arity |
sign | NO | Numeric sign policy |
min_digits | NO | Minimum integer digit count |
max_digits | NO | Maximum integer digit count |
min_value | NO | Minimum numeric value |
max_value | NO | Maximum numeric value |
min_length | NO | Minimum string length |
max_length | NO | Maximum string length |
pattern | NO | AEOS portable-pattern literal constraint |
datatype | NO | Datatype label requirement |
apply_pattern | NO | Pattern reference (string) |
Any other key is invalid:
code = "invalid_rule_key"
Projection notes:
.aeosloaders MUST projectpath:sansaandselector:sansaliterals into the in-memorySchemaV1pathorselectorstring fields.reference_target_pathis the preferred authoring surface.reference_target_patternis an advanced fallback escape hatch.Loaders MUST project
reference_target_pathinto an equivalent internal target-matching form before invoking AEOS.The resulting in-memory schema MUST remain compatible with the shipped
SchemaV1surface.
Authority notes:
AEOS uses SANSA rule targets for structural binding discovery only.
AEOS remains responsible for schema-declared representation and structural validation.
A data document that contains SANSA literals as ordinary values does not gain authority to choose its schema, enable query extensions, select validation policy, or instruct AEOS how to interpret itself.
4.4 type constraint
type = "StringLiteral"
Rules:
typeMUST be a literal-kind identifier.v1 supported kinds:
StringLiteralIntegerLiteralFloatLiteralBooleanLiteralReference
Semantics:
AEOS checks only the literal kind emitted by AEON Core.
No coercion is allowed.
Failure:
runtime
code = "type_mismatch"
4.5 apply_pattern
apply_pattern = "email"
Rules:
Value MUST be a string.
The string MUST refer to a key in
schema.patterns.
Invalid:
code = "unknown_pattern"
Semantics:
The referenced pattern is applied after type checking.
The pattern MUST conform to Pattern Profile v1.
The pattern is applied to the decoded string value.
5. Patterns section
5.1 Purpose
schema.patterns is a library of reusable pattern definitions.
Patterns are pure schema objects, not applied directly to data without a rule.
5.2 Shape
patterns = {
email = { pattern = { ... } }
slug = { pattern = { ... } }
}
Rules:
patternsMUST be an object.Each value MUST contain a Pattern Object as defined in Pattern Profile v1.
Keys MUST be unique identifiers.
Invalid:
code = "invalid_pattern_definition"
5.3 Pattern references
Pattern references:
are resolved within the schema only
MUST NOT reference data paths
MUST NOT be recursive (directly or indirectly)
Recursive reference:
code = "recursive_pattern_reference"
6. Charsets section
6.1 Purpose
schema.charsets defines named character sets used by pred.charset.
6.2 Shape
charsets = {
dns_label = { ... }
}
Rules:
charsetsMUST be an object.Charset definitions MUST conform to Pattern Profile v1 §6.
Invalid:
code = "invalid_charset_definition"
7. Validation order (critical)
AEOS MUST apply constraints in the following strict order per rule:
Presence check
If a rule exists for a path and the path is missing in data:
runtime
code = "missing_required_field"(v1: all rules are implicitly required)
Type check
Validate literal kind against
typeOn failure: STOP rule evaluation
Pattern check (if present)
Apply referenced pattern
On failure: STOP rule evaluation
There is NO fallback, coercion, or continuation.
8. Reference handling (hard boundary)
8.1 Data references
If the data value at a rule path is a Reference:
Default type checking applies to the Reference literal itself
Patterns MUST NOT be applied to the reference form
Violation:
runtime
code = "constraint_inapplicable"
By default, AEOS MUST NOT:
follow references
peek at referenced values
A schema rule may opt in to bounded followed-value checks through an explicit follow control such as follow_reference_form. In that mode, AEOS walks the reference target path and evaluates the target value under the active Shared AEON Value Semantics contract while preserving the original reference form and reference diagnostics. This is not reference resolution or materialization; AEOS does not rewrite the data value carrying the reference.
8.2 Schema references
Schema-internal references are allowed only for:
apply_patterncharset lookup
They are resolved once at schema load time, not per validation.
9. Error reporting
All rule failures MUST emit errors with:
path= data path being validatedspan= span of the data literal (if available)phase="schema_validation"code= appropriate code
If multiple rules fail, AEOS MUST report all failures (no short-circuit across rules).
10. Prohibitions (explicit)
AEOS Schema Profile v1 explicitly forbids:
default value injection
value coercion
semantic validation (RFCs, calendars, etc.)
schema-driven mutation of data
schema rules depending on other rules’ results
Violation of these principles breaks conformance.
Clarification:
The schema document loader MAY perform bounded projection work, including converting
reference_target_pathinto the internal target-matching representation required by AEOS v1.The AEOS validator itself still operates on
SchemaV1, not on raw source text.
11. Conformance checklist
A conforming AEOS Schema Profile v1 implementation MUST:
- ☐ Require a top-level
aeos:schemabinding in.aeosdocuments - ☐ Reject missing or mistyped
$.aeos - ☐ Reject unknown keys in
$.aeos - ☐ Enforce rule-list shape in
rules - ☐ Require exactly one SANSA target,
pathorselector, per rule - ☐ Reject non-exact selectors in
path - ☐ Project
.aeosdocuments into validSchemaV1objects before validation - ☐ Enforce literal-kind-only
typechecks - ☐ Apply patterns only after successful type check
- ☐ Resolve patterns only within schema scope
- ☐ Reject recursive pattern references
- ☐ Never mutate data AES or schema AES
- ☐ Emit spans from data AES in all rule failures
- ☐ Preserve phase ordering and fail-closed semantics
12. Minimal complete example
aeos:schema = {
id = "com.example.user"
version = "1"
charsets = {
dns_label = {
ascii_ranges = {
r1 = { from = "a", to = "z" }
r2 = { from = "A", to = "Z" }
r3 = { from = "0", to = "9" }
}
literals = { l1 = "-" }
}
}
patterns = {
email = {
pattern = {
pred = { no_whitespace = true }
}
}
}
rules = [
{
path:sansa = $.user.email
constraints = {
type = "StringLiteral"
apply_pattern = "email"
}
}
]
}