jsdoc typing round, phases 1-2: tsc as a no-emit checker over plain mjs (checkJs, strict), the shared shapes in server/shapes.mjs (log events as a tagged union, wire messages, manifests, job state, the ctx), all 12 server modules annotated; requireOwner/requireSuperuser as JSDoc assertion functions so the router guarantee narrows without callsite churn; runtime stays zero-dependency (typescript + @types/node as pinned devDeps, node_modules gitignored, QUESTIONS #4 amended: dev tooling exempt); every non-annotation delta audited onto a small intended list (clerk status ?? 1, dead 401 guards, async wraps on enqueue callsites); smoke 105/105 + restart + repo checks green; the clerk and web/ are the next phases

This commit is contained in:
2026-11-15 15:28:56 +00:00
parent d737e47f82
commit f81b188ce1
22 changed files with 594 additions and 90 deletions
+33 -4
View File
@@ -9,7 +9,20 @@ file is the "where did we leave off" map.
## Where we are
- **Everything is built, proven, and committed (through `fa3f23b`,
- **The server core is JSDoc-typed, strict, green (2026-11-15,
evening) -- committed.** tsc runs as a
no-emit checker (`npm run typecheck`) over plain `.mjs` with JSDoc
annotations; the shared shapes live in `server/shapes.mjs` (log
events as a tagged union, wire messages, manifests, job state,
the Ctx). Dev tooling only: `typescript` + `@types/node` in
devDependencies, `node_modules/` gitignored -- the runtime stays
zero-dependency (QUESTIONS #4 amended to say so). Verified: the
full diff audited change-by-change (every non-annotation delta is
an impossible-path guard or a behavior-identical wrap), smoke
105/105, restart-check, check-repo, all green. Phases to come are
steps 5 and 6 below.
- **Everything is built, proven, and committed (through `d737e47`,
2026-11-15).** The full scope, each round mock-proven end to end
and live-proven where live could reach: the MVP substrate (clerk,
server, housekeeping job, SPA), multiuser (token identity, invites,
@@ -18,9 +31,17 @@ file is the "where did we leave off" map.
round (/story, /table, the slidwin carry), the dormant-session
rework (the universal session lifecycle, move-at-stop, the start
lint, rebaseable housekeeping, carryover.jsonl + memory.json
packages), and the format house rules (nine-rule check-repo). The
design record lives in README / DICTIONARY / ROADMAP; the build
history in the git log.
packages), the format house rules (nine-rule check-repo), and the
naming round. The design record lives in README / DICTIONARY /
ROADMAP; the build history in the git log.
- **The project is named: Tiny Worlds.** The invariant it names is
stated in README's premise -- each package is a tiny world on
purpose. The repo lives at `C:\data\opencode\tiny-worlds`; the
rename from `rp-test` is complete end to end (robocopy + session
repoint + a one-time sqlite edit of opencode's own db to repoint
the project record -- the desktop UI cannot delete or repoint
projects, anomalyco/opencode#28030). Launch sessions from the new
path.
- **The first real story is live: "La Caramba / Irene"** (run
4f261452, gitignored state). Session one open, 53 GM + 53 player
story turns, ~23K prompt tokens -- single-digit percent of the
@@ -68,6 +89,14 @@ file is the "where did we leave off" map.
candidates), coin-flip personality (choices offloaded to chance
that should be character), and whether her variants stay same-turn
alternatives rather than sequences.
5. **Typing phase 3: the clerk** (`tool/memory.mjs`, the big one).
The db row shapes (entries, records, status, agenda, the events
journal), the CLI dispatch, the manifest validator -- typed at the
db boundary per the same doctrine, then widen tsconfig's include
to `tool/`.
6. **Typing phase 4: web/** -- DOM types for the SPA modules
(`"lib": ["DOM"]` or a second tsconfig), the same shared shapes
imported from server/shapes.mjs where the wire surfaces appear.
## Not yet exercised (expect first-use friction)