Feature Kinds
Morph packages can own more than syntax.
Common Feature Kinds
| Kind | What It Owns |
|---|---|
| Syntax | parser-facing feature forms |
| Semantic | meaning, validation, type rules |
| Lowering | translation into lower IR or route-specific forms |
| Runtime | package-owned runtime families and symbols |
| Backend | backend routes and emission behavior |
| Tooling | CLI commands and tooling actions |
| Execution | execution formats and engines |
| Build | build pipelines and target providers |
Syntax Features
Syntax features are package-owned grammar hooks.
Examples:
- a package-owned test block
- a package-owned operator form
- a package-owned expression feature
If the framework cannot express a syntax shape yet, widen the parser hook model. Do not hardcode the feature in core as the owner.
Semantic And Lowering Features
These usually travel together:
- semantic logic decides whether the feature is valid
- lowering logic decides how it maps into later stages
If a package owns a feature, it should also own the semantic and lowering behavior for that feature.
Runtime And Backend Features
Runtime and backend ownership often matter just as much as syntax:
- runtime features provide package-owned runtime behavior
- backend features provide route-specific lowering or emission
Do not move these into generic runtime or codegen files just because they are lower-level.
Tooling, Execution, And Build
Morph is not limited to language syntax.
Packages can also own:
- commands
- execution formats
- build providers
That is why Vcon, Build, and platform packages belong in Morph.
Choosing The Right Kind
Ask:
- is this user-facing syntax?
- is it meaning or validation?
- is it IR translation?
- is it runtime behavior?
- is it backend routing?
- is it tooling or build behavior?
A single user-facing feature may touch several kinds, but they should stay under the same package owner.
Next Steps
- Framework Headers And SDK - the typed extension surface behind package features
- Extending Existing Packages - add a feature to an existing package
- Creating New Packages - when a new package is the right owner