05 — Processing Pipeline and Normalization¶
Status¶
- Normative baseline
- Version:
0.9.0 - Layer: Part 0 / Foundation
1. Purpose¶
This chapter defines the pipeline that transforms humane source text into the canonical AST and then into realizations.
2. Pipeline Overview¶
- Source ingestion
- Surface-specific preprocessing
- Parse-time syntax analysis
- Compatibility lowering
- Canonical structural normalization
- Registry and reference resolution
- Semantic lint and critic attachment
- Projection preparation
- Target realization
3. Raw vs Canonical¶
- Raw parse products preserve source-local structure, spelling, and compatibility evidence.
- The canonical AST eliminates surface-local sugar.
- Canonical normalization is the convergence point shared by all authoring surfaces.
4. Compatibility Lowering¶
- Compatibility lowering occurs before canonical structural validation.
- Examples:
:::slidelowers to:::frame:::frontmatterlowers to:::front-matterkind: presentationlowers tokind: artifactwithcarrier: stage/frame- legacy
%%%,%%, and%lower intostageFrameframes and zones with compatibility hints
5. Canonical Structural Normalization¶
- Surface head metadata lowers into root fields.
- Universal matter directives lower into
MatterEnvelope. - Carrier directives lower into carrier-native nodes.
- Carrier-native structural directives lower into universal section nodes plus carrier-native metadata.
- Deprecated stage forms lower into the same canonical
stageFrameAST as canonical forms.
6. Registry and Reference Resolution¶
- Registry validation checks core ID legitimacy.
- Reference resolution order for
compositionGrammarRef,brandProfileRef, andcriticProfileRefis: - document-local bindings
- project registry
- installed namespaced pack
- built-in core pack
7. Normalization Guarantees¶
- Equivalent canonical and deprecated surface forms MUST converge to one AST.
- Surface spelling differences MUST NOT create semantic divergence.
- Target-specific conveniences MUST NOT leak back into canonical structure.
8. Non-Goals of Normalization¶
- Normalization does not invent deep semantics when the source does not encode them.
- Guided inference and manual migration are separate from automatic lowering.