v0.43.0 - System-Platform Separation
Pulling game-system logic out of the platform and behind a versioned module contract: the
Character Sheet / Monster / Content APIs (shipped as Module API 1.5.0), proven against System 8,
a read-only Play Mode rendered entirely from the module's projection, and the extraction of 5e
into its own @purple-cat-games/dnd5e module.
Main article: System-Platform Separation · task list: todo.md · 5e extraction plan: 5e-module.md · API status: api-index.md
Module-side work lives in the sibling
vtt-modulesrepo (System 80.4.2, and the new@purple-cat-games/dnd5e0.1.0on branchversion/dnd5e-0.1.0). Neither repo's branch is merged yet.
Phase 0 — Prep (done)
- [x] Disambiguate
useCharacters().getSystem()→getSystemData()(R6.3). - [x] Ratcheting source-text guard test that fails on any new system-literal (
systemId === 'dnd5e…') leak into platform code (CC-1).
Phase 1 — Contract skeleton (done)
Additive interface members on SystemModule / ModuleServerExport — no behavior change.
- [x] CS-1…CS-8 types — sheet schema, read projection (
construct,getAttributes,projectToken), validation, automation / auto-fill, content + choice providers, and the character-sheet section escape hatch, all as optional members. - [x] Monster API surface —
listTemplates?()/generateCharacter?()(M-1…M-3, M-5). - [x]
MODULE_API_VERSION→ 1.5.0 plus pluralsystemFixtures. - Spec: Character Sheet API 0.1, Module API 1.5
Phase 2 — System 8 implements the contract (done; one item partial)
- [x] S8
sheetSchema,construct+ read accessors,projectToken(P1–P9), andvalidate(power-rank rules) all move into the module. - [x] S8 generation (the v0.34.0 pure generators) routed behind the module seam.
- [~] Monster projection/editor unification (M-3/M-5): generated monsters now route through the module
projectTokenand smoke-tested clean; the remaining ~2.4k lines of generation/editor UI migration was folded into Phase 5.
Phase 3 — Content API + server-extraction mechanism (mechanism done)
- [x] Module-hosted server router + data store — a module can mount its own routes and contribute to the host allowlist, which merges into the proxy/SSRF lists (R3.2).
- [x] AI parse-schema provider — the module supplies the AI-import target schema/prompt;
ai.tsde-leaked (R3.3). - [~] Content provider registry + generic content routes built, and S8 content flipped to providers; the UI-consumer flip is deferred (WebGL-blocked interactive verification).
- [ ] Default-fixture registration (3.5) and the shared de-leak of
system8Advancement.ts/rank.ts(3.6) deferred with reasons recorded in the todo. - Spec: Content API 0.1
Phase 4 — Character Context Play Mode on the projection (done)
- [x] Server-side manifest read-cache keyed by
(characterId, updatedAt). - [x] Generic Play-Mode sheet primitives that render Attributes / sections purely from the module projection.
- [x] Action buttons rendered as a view of the projected token.
- [x] Wired into the Character Context behind a "Projected (beta)" toggle; interactive smoke passed.
- [x]
projectTokenmerge semantics — derived ⊕ runtime, never clobbering live values.
Phase 5 — Extract the 5e module (module side complete; platform rewires deferred)
- [x] Scaffold
@purple-cat-games/dnd5e— one package, two systems (2014 + 2024) over a sharedcore/. - [x] Move the
SystemModuleimplementations out ofpackages/sharedinto the module —systemRegistryis now{}and 5e loads its rules from the module exactly as System 8 does. - [x] Move the 5e
projectToken(P1–P9), with a reference test pinningconvertCharacterToTokenoutput (CC-4). - [x]
systemIdsonModuleServerExportso schemas key without a fixture; 5e AI parse schema behind the provider. - [x] Bundle SRD 5.1 as versioned JSON (
data/2014/, 1078 entities from d20srd, ~2 MB) with a provenance manifest and the CC-BYNOTICE; renamed the user-facing system strings "D&D" → "5E". - [x] Serve the bundled SRD from the module's own data store + content router behind a CS-5 content provider.
- [~] DMG monster generator ported behind
generateCharacter(additive); the platform-side rewire is deferred. - Plan: 5e-module.md
Phase 6 — API documentation (done)
- [x] Ratified Character Sheet API 0.1 and authored Monster API 0.1 + Content API 0.1.
- [x] Updated the System API, Module API 1.5, and REST API specs, and reconciled both API indexes.
Out of scope this version
- Character Context Edit Mode (the write/build UI) and the old Character Sheet detail page retirement — both belong to the next project, Character Sheet Overhaul.
- New 5e validation/automation rules (Phase 7) — deferred to the next release.
- Everything else still outstanding is itemized under Next Version: 0.44.0 above.
Ship checklist (BLOCKING — 5e is module-only as of this version)
Phase 5.3 deleted the built-in 5e SystemModules from packages/shared, so 5e now only exists if the
@purple-cat-games/dnd5e module loads. It is currently wired in modules.local.json (dev only) and is
absent from modules.hosted.json. Deploying 0.43.0 without the steps below silently breaks every 5e
campaign in production.
- [ ] Merge
vtt-modules→ main and publish@purple-cat-games/dnd5e0.1.0 (tagdnd5e/v0.1.0). - [ ] Publish
@purple-cat-games/system80.4.2 (hosted is still on0.4.1; 0.43.0's S8 seams —sheetSchema/construct/projectToken/validate/ content provider — ship in it). Push at most 3 module tags at a time — GitHub drops ALL tag events past that. - [ ] Bump
modules.hosted.json: add@purple-cat-games/dnd5eand raise system8 →0.4.2. Publish before deploying the bump. - [ ] Verify on a fresh/prod-like DB that both 5e systems and System 8 still enumerate, load their rules,
and render a character sheet (the enumerated default-action seeder in
db.tsis untouched, so existing default combat actions are unaffected — see 3.5 in the next version).