<!-- https://tinyscript.tinyactors.dev/wip/ -->
# Work in progress · tinyscript

Kind: reference. For: [Embedder](https://tinyscript.tinyactors.dev/audiences/embedder.xml).
Voice: [Reference](https://tinyscript.tinyactors.dev/voices/reference.xml).

> Every work packet in tinyscript's plan, grouped by phase and coloured by status, read from the specification at each deploy.

tinyscript is planned in work packets, each with what is true now, what is true after it and the checks that say it is done. Tap a packet to read it.

[See the packets](https://tinyscript.tinyactors.dev/wip/index.md#board) · [Read the architecture](https://tinyscript.tinyactors.dev/architecture/index.md)

<a id="board"></a>

## Every packet, by phase

Nobody writes this board by hand. Every deploy reads the plan in `spec/tinyscript.xml` at the newest commit, so a packet turns green the day it lands.

**p0: Land the project and build the instruments**
- `p0-land` (): Tinyscript follows the repository's rules on its branch
- `p0-plan` (): The plan is part of the checked specification
- `p0-census` (): Each feature carries its measured tier and frequency
- `p0-corpus-upstream` (): The pinned projects become corpus programs
- `p0-transcripts` (): Canned answers in XML, replayed by one driver
- `p0-corpus-blind` (): Programs generated blind against vendored libraries
- `p0-corpus-charts` (): Chart code as a corpus of its own
- `p0-test262` (): test262 in strict mode, per feature
- `p0-bench` (): One instruction gate over every workload
- `p0-memory` (): Bytes per session beside QuickJS
- `p0-corpus-real` (): The real-code gate's inputs in the corpus
- `p0-split-builtins` (): Each built-in in files of its own
- `p0-process` (): Agents land from private workspaces with one tool

**p1: Change the shape before adding features**
- `p1-sessions-spike` (): What a session needs, measured before the heap is frozen
- `p1-split` (): The compiler and interpreter in reviewable modules
- `p1-heap-api` (): A frozen internal heap and object interface
- `p1-writable` (): Mutation of shared objects goes through the writable calls
- `p1-sessions` (): Many sessions in one instance's memory
- `p1-instructions` (): recent and reduction ahead of QuickJS-ng
- `p1-state` (): A session is stored as its values
- `p1-strict` (): Strict semantics everywhere, SCXML's exceptions named
- `p1-errors` (): An uncaught exception says what and where
- `p1-runtime-compiler` (): The compiler callable inside an invocation

**p1c: The compiler on a solid foundation**
- `p1-ir` (): The intermediate representation, declared in the spec and generated
- `p1-emitter-proof` (): One lowering file through the IR, the images unchanged
- `p1-tree` (): The grammar's symbols and fields as generated enums; the tree measured
- `p1-grammar-tables` (): Generated parsers read their grammar in place
- `p1-grammar-upstream` (): The grammar overrides upstreamed into tinyparse's standard grammars
- `p1-drivers` (): The protocol drivers generated from the spec
- `p1-tables` (): Switches that are tables, generated
- `p1-lower-frame` (): The frame the lowering families share
- `p1-resolve` (): A resolve pass over the tree
- `p1-lower-expressions` (): Expressions lowered from the tree
- `p1-lower-statements` (): Statements and control flow lowered from the tree
- `p1-lower-patterns` (): Patterns lowered from the tree
- `p1-lower-functions` (): Functions, closures, generators, async functions and classes lowered from the tree
- `p1-lower-modules` (): Modules and the entry's host forms lowered from the tree
- `p1-summaries` (): Functions compiled callees first, against summaries
- `p1-retire` (): The token compiler removed
- `p1-estree` (): The ESTree projection generated from a mapping in the spec
- `p1-baseline` (): The new baseline: instructions and memory against QuickJS-ng
- `p1-interpreter-cases` (): The interpreter's numeric cases generated from instruction semantics

**p2: The everyday surface, in census order**
- `p2-scripts` (): Scripts: statements at top level, and for...in
- `p2-modules` (): Modules as published packages write them
- `p2-compiler-scale` (): The compiler takes real files
- `p2-globals` (): Every built-in global is a first-class value
- `p2-native-coercion` (): Library calls coerce through guest code
- `p2-type-imports` (): Type-only imports and declarations erased
- `p2-typescript` (): Erasable TypeScript as libraries write it
- `p2-bindings` (): Destructuring, spread, rest and default values
- `p2-generators` (): Generators complete
- `p2-async` (): Promises, async functions and the job queue
- `p2-async-memory` (): A pending promise and a suspended async generator at QuickJS's size
- `p2-strings` (): Strings and templates complete
- `p2-collections` (): Array, Object and JSON complete
- `p2-classes` (): Classes and errors complete
- `p2-control` (): Iteration and exceptions complete
- `p2-library` (): Map, Set, Date, Math and Number complete
- `p2-regexp` (): Regular expressions complete
- `p2-web-platform` (): The pure web-platform APIs as built-ins
- `p2-dynamic-code` (): eval, new Function, import() and tinyscript:compiler
- `p2-linked-parity` (): Code compiled at run time is indistinguishable from code compiled ahead of time
- `p2-complete` (): The complete tier

**p3: Tinyactors as one application**
- `p3-datamodel` (): The SCXML adapter becomes a datamodel
- `p3-sessions` (): Sessions after the datamodel: what p3-datamodel measured and left

**p4: Release**
- `p4-compiler-refactor` (): Ruthless compiler refactor for optimization and typehint-driven speed
- `p4-release` (): Release artifacts and a release repository
- `p4-debug` (): Debug info as WebAssembly DWARF, and images that carry their sources

The work packets of the plan in [`spec/tinyscript.xml`](https://github.com/tinyactors-dev/tinyactors/blob/main/tinyscript/spec/tinyscript.xml), read at the newest commit of main when the site was built.
