Menu

D12. TypeScript workspace packages, run directly by Node (revised 6 Oct 2026)

Replaces “Plain JavaScript (ES modules), no build step for the sources”. Plain JavaScript was right for a prototype that agents read and run, but not for a core that a desktop app, a server and browser plugins will consume: the format, the operations and the course data shipped to the player are contracts that types should hold. The core is TypeScript in strict mode, split into workspace packages (format, player, core, node, engine, cli; docs/architecture.md), and Node 24 runs the .ts sources directly (type stripping), so agents and contributors still read and run the sources without a build step. Only erasable syntax is used. Types of the format are generated from the JSON Schemas (D1 stays: the schemas are the source). The migration was checked by an oracle: the three examples build to the same bytes before and after. Revisit if: Node’s type stripping stops being enough (then a build step with tsc emitting JavaScript; publishing to npm already needs one, because Node does not strip types under node_modules).