Context
Figentra OS’s application category holds six packages. Onlydefinition and ir are real; compiler, schema-gen,
runtime-core and experience are stubs. definition declares six kinds through define*() functions and YAML. Stackra
authors everything with decorators, and codegen reads decorator metadata through the container
(0090). It still needs a stable, versioned intermediate representation between
discovery and emitters, and the ir package already provides one.
Decision
- The
irmachinery is ported: thev: 1envelope, deterministic serialise and parse, cycle detection, the compatibility rule, andSchemaIRwithschemaIRToZod. - IR kinds are derived from decorators: model, endpoint, event, job, cron, resource and permission. They replace the six definition kinds.
- The
definitionpackage is dropped, includingdefine*()and YAML definitions. - The remaining application stubs (
compiler,schema-gen,runtime-core,experience) are not ported as they are. Codegen ADRs decide what replaces them.
Consequences
- One serialised form feeds every emitter (Encore app, wire types, Zod, docs), and its compatibility rule makes IR changes reviewable.
- No second authoring path: a kind that cannot be expressed as a decorator does not exist.
- 0084 records
iras port + adapt anddefinitionas skip.
Enforcement
Planned: the ported round-trip and cycle-detection tests in the IR package’s__tests__, and a compatibility test that fails
an IR change without a version bump. Nothing checks this today.