The week the game started watching itself
A three-PR refactor trio makes the word-submission pipeline immutable and side-effect-free, then the newly-launched game gets its first stats page, a same-week AI tuning pass informed by it, docs finally caught up to the Postgres stack, and a WCAG 2.2 audit closes the week.
Hours after launch readiness shipped, the first structured refactor arrived, and then the game got eyes on itself for the first time: a stats page, real enough to inform an AI tuning pass in the same week it launched. The week closes with the paperwork catching up to a database migration from a few days earlier and a WCAG 2.2 audit, the kind of housekeeping that only gets scheduled once the building slows down enough to look back.
Three refactors, each blocked on the last#
The morning opened with a strict dependency chain, three pull requests, each explicitly blocked on the one before it. The first made the engine’s word-submission result fully immutable and fully scored: every state mutation, new edibles, the next apple-spawn index, the next PRNG state, now travels inside the result instead of being recomputed by whoever calls it. The second followed directly from that: the animation queue stopped mutating game state per frame and became pure visual playback, so the board’s grid is rebuilt exactly once per word submission instead of once per animation frame. The third pulled the shared word-processing pipeline out into its own function, leaving daily and duel mode as thin wrappers around it and removing about 65 lines that had drifted into duplicate logic between the two.
The game gets eyes on itself#
A stats page followed the next day: server-rendered, no separate API, fun-fact numbers about how people actually play, scoped by date, mode, and language. Ten new nullable columns landed to capture what the engine already knew but never kept, direction changes attempted versus successful, fruit spawned versus eaten, and why each game actually ended. The same week, the duel AI’s own difficulty tuning started drawing on exactly that kind of data: its target word rarity now tracks the player’s own recent average instead of a fixed curve, and its move selection switched to checking for wall proximity before it ever looks at candidate words, rather than treating open space as a secondary tiebreaker. The data did not sit unused for long.
Catching the paperwork up, teaching the process back#
The README and the project’s own agent instructions still described the database stack the game had already left behind, four days earlier, by the time anyone rewrote them. Once they were caught up, two new reusable skills went in alongside the fix, one that cross-checks a project’s documentation against its own source files for drift, generic enough to hand to any SvelteKit codebase, and one that codifies the safe way to apply a database migration. Both were verified the way code is verified, by running them against this repository and confirming they produced useful output, rather than trusted on the strength of having been written.
Where this leaves things#
The week closes with a WCAG 2.2 audit, four failures found and fixed: a duplicate landmark role, a set of tabs missing the ARIA relationship to their own panels, a form error message not linked to its input, and secondary text in the dark theme sitting at roughly 4.1 to 1 contrast against a 4.5 to 1 minimum, raised to about 4.75 to 1. None of it is visible in a screenshot. The week’s whole shape was that kind: an engine made provably correct instead of merely working, a page built to watch instead of guess, and paperwork brought back in line with what is actually true, all of it work whose entire purpose is to not be noticed later.