docs/examples/log-watcher (1285 lines, 7 files) now compiles clean: 0 diagnostics, a 35KB .wob written. corpus 71/0, woc runtest 565/0, every wovm unit gate green (both dispatch flavors). - .wob v2: each class row gains three u32 per-field arrays — the field's NAME constant, the CLASS it refers to (or the json-raw marker), and a container field's ELEMENT kinds. json is then a runtime service driven by metadata instead of per-type generated code. loader/emitter/disassembler/test assembler all read and write v2; field-name constants are interned with the rest of the pool (interning during serialization silently loses them) - runtime/src/json.c (new): encode by static kind + object headers + class table (nested records need no static knowledge); decode parses and BINDS straight into the target class — keys matched to field names, nested objects built as the field's class, arrays as a multi of the field's element kind, unknown keys skipped, absent keys nil. Malformed input is nil, never a trap - `as`: `json.decode(text) as T` is the one cast this language has (WO-E403 for any other `as`, and for a bare json.decode with no target type). Its result is `?T`, which is why the decode and the target are one instruction - json.Value: a reserved type name for a value the source does not inspect — the raw JSON slice, kind TEXT, re-emitted verbatim by encode - docs: 00-wob-format.md is now the v2 reference (class metadata, TRY/ENDTRY, the whole builtin surface, WO_T_IO); 08-builtin-surface.md documents the text/container builtins, the OS modules with their predeclared records, and json's two documented limits (Bool encodes 0/1, floats truncate) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| 00-wob-format.md | ||
| 01-error-catalog.md | ||
| 02-corpus.md | ||
| 08-builtin-surface.md | ||
| README.md | ||
docs/plan/oop-vm/ — OOP + systems track contracts
The normative contract documents both stacks cite. Landed by their named plan tasks:
| doc | contract | plan |
|---|---|---|
00-wob-format.md |
.wob bytecode format (compiler↔VM) |
1 |
01-error-catalog.md |
every WO-E### code |
2, grows 3/8 |
02-corpus.md |
how to add conformance fixtures | 3 |
03-shard-actor.md |
shard ownership, mailboxes, send-as-move | 4 |
04-db-binding.md |
row format, WAL records, query subset | 5 |
05-http-service.md |
route section, trap→HTTP table, JSON subset | 6 |
06-ui-live.md |
delta frames, subscribe protocol, wo:live | 7 |
07-systems-stdlib.md |
per-function nil-vs-trap contracts | 9 |
08-builtin-surface.md |
builtin source names, container/call/entry rules the emitter enforces | 3 |
Specs and plans: docs/superpowers/{specs,plans}/. Repo map: docs/08-project-structure.md.