Appearance
Architecture
helix is un-opinionated, twine is opinionated, and spool is the opt-in middle. Anything that feels like a shortcut or best practice rather than a primitive goes above helix.
| Layer | Owns |
|---|---|
| helix | typed values, commands, codegen per version; no gameplay patterns |
| spool | opt-in plugins built only on helix's public API |
| twine | how a pack is composed: modules, areas, lifecycle |
How helix compiles
Authoring builds an AST against a Datapack pinned to a version profile. Codegen lowers it to an IR and renders .mcfunction and JSON for that version, so one source gives the right folders, pack format and command syntax per version.
buildDatapack(dp) does this in memory; dp.writeDatapack(path) writes it to disk. Cost reports, JSON validation and the playground all read the in-memory output. The stage-by-stage detail is in Compiler internals.
Why typed values
Selectors, positions, blocks, items, NBT and scores are classes that render per version. A handwritten fragment like @a[distance=..6] can't change with the version, so when the typed API can't express something, the API gets extended rather than falling back to a string.