writeonce/docs/stories/language-runtime-database/03-compiler-front.md
shoney.arickathil 1fe808b7a4 docs(stories): add readiness, retire status: refine, sweep all 47 iterations
- `readiness: ready | refine` is a SECOND axis, orthogonal to status.
  `ready` = the brainstorm is complete and the decisions are LOCKED (a spec
  approved, or the forks explicitly confirmed). `refine` = open forks remain
  and it cannot be planned yet
- `status: refine` RETIRED because it carried both meanings at once, so a held
  iteration with an approved spec (language 18, 26) was indistinguishable from
  one nobody had thought about. status is now purely where the WORK is:
  done | in-progress | pending | hold — `pending` was already the board's own
  rendering word, so nothing new was invented
- all 47 iterations classified from EVIDENCE in their own text, not by guess:
  "the four forks are SETTLED" / "spec + plan approved" / "Approved spec:" for
  ready; "Forks the spec must settle" / "no spec exists yet" for refine. Every
  shipped iteration is ready by definition. 19 done, 5 in-progress, 15
  pending, 8 hold; 27 ready, 20 refine
- two iterations moved refine -> in-progress rather than -> pending: language
  31 and 34 are absorbed into 24 and work on them is literally happening, which
  the board already showed as 🔄 while their frontmatter said otherwise. That
  disagreement is now gone
- board legend, board-views' frontmatter contract, and two new Dataview
  queries updated — the useful one being `readiness: ready AND status:
  pending`, the startable set

WHAT THE NEW AXIS IMMEDIATELY SURFACED: of 15 pending iterations, exactly ONE
is startable — databasev2 4, io_uring group-commit, whose forks were confirmed
settled 2026-08-20. Everything else pending needs a brainstorm first. That was
invisible while one key carried both meanings, and it is now on the board.

Also caught by the sweep, unrelated to readiness but found by cross-checking
frontmatter against the board: SIX duplicate rows. Every iteration moved into
databasev2 was still listed in the LANGUAGE pending table under its retired id
(23, 32, 33, 20, 21, 27) as well as its new one. Stale copies removed. And two
databasev2 rows made claims the sweep contradicts — iteration 1 was billed
"startable today" while its forks are open, and 6 still called itself the
ceiling-raiser after 2 took that role.

Docs only. linkcheck 0 broken / 0 anchors.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-27 16:54:45 +02:00

60 lines
2.2 KiB
Markdown

---
iteration: "3"
status: done
readiness: ready
---
# Iteration 3 — compiler front (`woc`)
> Format: `product/story-iteration-template`. Part of
> [Story — one language, one runtime, one database, one binary](00-story.md).
## Goals
- An OCaml, stdlib-only compiler front end: `.wo` source becomes a typed
AST with ownership annotations, or plain, precise diagnostics — the
half of the language the developer converses with.
- Ownership errors read like sentences naming both sites ("moved at
pricing.wo:14, used at pricing.wo:17") — the ergonomics bet that makes
MVS beat Rust for this audience.
## Acceptance Criteria
- What to achieve?
- **Given** the pricing-demo classes,
- **when** `woc` runs its front pipeline (lex → parse → typecheck →
ownership),
- **then** `--dump-ast` output matches the golden file and zero
diagnostics are emitted.
- What to achieve?
- **Given** a file violating ownership rules (move-after-use, borrow
escape, double exclusive borrow),
- **when** it compiles,
- **then** each violation reports a stable `WO-E###` code with both
source sites, and one bad declaration does not stop diagnosis of the
rest of the file.
- What to achieve?
- **Given** a class that satisfies an interface structurally,
- **when** typechecking runs,
- **then** satisfaction is recognized with no `implements` declaration,
and per-method `self` mutability is inferred (reads shared, writes
exclusive).
## Out Of Scope
- Bytecode emission and running anything (iteration 4).
- The Haxe-parity adoptions (iteration 5) — milestone grammar only.
## Info
- Newline-significant lexing and the identifier gotchas mirror
`crates/rt`'s lexer — grammar parity is a stated contract.
- Architecture map: `docs/plan/compiler/architecture.md` (pipeline, module
contracts, study references).
## Proposed Solution
- Execute the existing plan: `docs/plan/compiler/2026-08-01-woc-compiler-front.md`
(diagnostics module, lexer, declaration/statement/expression parsers with
skip-on-block, typechecker with field-kind derivation, MVS ownership pass
producing the four emitter tables, driver + error catalog).