2026-02-17 Activity Log
Date: February 17, 2026 Primary Focus: Parser migration + runtime de-singleton refactoring + documentation sync Commit Volume: 14 commits (reincarnate primary project) Sessions: 40 sessions across 10+ projects, heavy context saturation
What Actually Happened
The Big Swing: SugarCube Parser Migration (reincarnate)
Completed a major architectural refactor: replacing the hand-rolled Pratt parser (~760 lines of custom code) with oxc_parser. This was the kind of decision that required multiple sessions of debate and clarification (sessions 48b0c4a2 exploring "should we extend the parser?") before committing to the right approach.
Commits show the migration was not just a swap—it required:
- HTML entity handling - Replaced hand-rolled decoder with
html-escapecrate (supports full HTML5 spec: 2,231 named entities + numeric forms) - Context-aware preprocessing - Keywords shouldn't trigger inside identifiers (
_is,$toString) or property names (:following) - SugarCube-specific semantics - DoL uses
<<case N>>ranges (not standard JS), trailing commas in case values, template literal preprocessing - Statement parsing - Extended to handle
for,throw,switch,while(not just expressions) - DOM macro classification - Link, replace, append, etc. take CSS selectors/durations (Raw args), not JS expressions
The migration reduced parse errors from 974 → 0 in TRC test suite and 290 → 4 in DoL (remaining 4 are DoL-specific <<case lte N>> syntax, not standard SugarCube).
Key lesson added to CLAUDE.md: Don't hand-roll what a library does. Use crates for standards.
Runtime Refactoring (Multiple Sessions)
Parallel planning tracks emerged for de-singletonizing game runtimes:
- SugarCube: Session 4473c7b6 worked "De-Singleton SugarCube Runtime" plan
- RenderRoot: Session 3f843d6a tackled composable mount + isolation (all four engines hardcode
document.getElementById()) - Flash/GameMaker/Twine: Session fd10e2df planned "Eliminate Global State from All Runtimes" (62 module-level mutable
letvariables scattered across codegen targets) - DoL World: Session 14c500e5 targeted removing all global state from Degrees of Lewdity world instance
These represent a systemic architectural problem: games aren't instantiable, they're singletons. Multiple sessions hit the issue from different angles, suggesting this is a foundational blocker.
Save System Architecture (game persistence)
Session 929f804b spent significant time on save strategy philosophy:
- Twine games currently have no continuous saving — progress lost on close without manual save
- Harlowe uses
sessionStorage(ephemeral), no slots, no FS saves OOTB - Discussion moved from "how many rolling buffers?" to why ask those questions at all? — the answer is the architecture should support pluggable backends (multiSlot + rollingSnapshots for example; both sessionStorage + localStorage + FS when available)
- Consensus: Provide "clean default" impls for deployers, not rigid constraints
Normalize Documentation Gaps (rules + facts)
Session 7d25f25b identified docs severely out of sync:
- Rules documentation (separate fact rules + syntax rules API needs unification under
normalize rulesumbrella) - Sidebar hopelessly outdated
- Facts rules: zero user-facing docs for both interpreted + compiled variants
Sessions 61f3d66b, bd6c2492, fcf50250 worked on closing the gap. Session 48c53bbe framed the goal: frictionless, high quality, OOTB experience for rules (both fact and syntax) with zero configuration.
Multiple sessions focused on normalize rules list/add/update/remove consistency and builtin rules discovery (self-install vs embed dylib tradeoff).
Ecosystem Documentation Housekeeping
- Session 7bd09403: Fixed README (was pointing to github.io not rhi.zone), added LICENSE, checked repository founding date (2024 vanity commit)
- Session d6282409: Fixed terminology (
paraphase≠paraphrase), removed stale "AI agent moss" references from architecture docs
Session Patterns
Context saturation: 40 sessions on 2026-02-17, with 11+ sessions hitting "continued from previous conversation that ran out of context." Indicates high cognitive load across multiple simultaneous refactoring tracks.
Conversation style: Terse, question-driven clarification loops (e.g., session 929f804b: "well, i feel like you're missing something really obvious" → 15 turns debugging an assumption about save file size). Suggests working through architectural confusion via dialogue rather than planning docs.
Request patterns: Heavy commit and push? / let's commit? cadence — frequent checkpoints as context filled up. Several requests for code generation/iteration (regen arceus-garden, regen test suites).
Tool use: Frequent background task notifications (task agents exploring file trees in parallel). Heavy use of normalize structural viewer to understand large codebase sections before diving in.
What Wasn't Touched
- Normalize command infrastructure (no commits)
- Motif / Deskspace / other scaffold-only projects
- Interconnect / federation protocol
- Most of the exoplace ecosystem
Notes
Parser migration as a forcing function — Choosing oxc_parser (stdlib approach vs custom code) revealed what SugarCube's semantics actually are. Forced reading of target source, discovering DoL-specific extensions.
De-singleton as a systemic issue — Not just SugarCube, but Flash + GameMaker + Harlowe runtimes all have this problem. Suggests the codegen scaffold itself enforces singleton pattern (worth checking scaffold templates).
Documentation lag — Rules system has been refactored (fact vs syntax rules, unification plan) but user-facing docs didn't follow. Normalize docs site not in sync with implementation.
Architecture-first debugging — Save system discussion wasn't "implement feature X" but "what's the right abstraction?" — players asking why questions to uncover wrong assumptions.
Token Usage
Total tokens (2026-02-17): 239,355 tokens (62,367 in + 176,988 out)
Per-session breakdown (heaviest sessions):
| Session | Output Tokens | Cache Read | Cache Create | Cache Hit Ratio |
|---|---|---|---|---|
| b22b5f34 | 13,794 | 23,779,184 | 257,621 | 98.9% |
| 2d4243b1 | 11,486 | 27,551,149 | 439,241 | 98.4% |
| fd10e2df | 11,146 | 18,050,868 | 328,947 | 98.2% |
| 3f843d6a | 11,155 | 14,989,252 | 264,848 | 98.3% |
| acdd772b | 10,608 | 2,806,118 | 211,241 | 93.0% |
| 4473c7b6 | 10,778 | 11,761,866 | 255,956 | 97.9% |
Cache efficiency: Exceptionally strong across all sessions (93–99% hit ratios). The day involved heavy architectural planning with significant context carryover between turns — each session sustained 10–13k output tokens while leveraging 2–23GB of cached context. Session b22b5f34 (SugarCube parser migration) achieved 23.7GB cache hits with only 257KB new cache writes, indicating highly coherent multi-turn refactoring. Session acdd772b (tw-* elements implementation) had lower cache efficiency (93%) due to context complexity across multiple macros, but still strong performance.
Pattern: 40 sessions with heavy background task agents running in parallel (task notifications throughout the day) resulted in substantial token usage, but excellent cache utilization kept new context creation minimal relative to reuse.