Didn't write a single line of code today. Spent the whole day buried in the PRD and TRD instead, and by the end of it I realized this was somehow the most exhausting day so far anyway.
The pitch is simple enough: connect same-colored dots with clicks on a grid. One sentence. But the second I tried to break that sentence into an actual buildable spec, I hit a wall almost immediately. First thing that tripped me up was what "clicking a dot" even means. Does it only mean the colored endpoints, or can you click any cell in the same row/column to extend a path? Until that's pinned down you can't even say whether a path is allowed to bend. Felt dumb not catching something this basic sooner, but you really don't see it until you try to write it down.
That became the pattern for most of the day — fix one rule, and the thing next to it breaks. Trim (undoing part of your own path) versus self-intersection was a particularly annoying one. If your own path happens to sit somewhere in the middle of a straight-line click extension, is that a trim or is it just blocked? Ended up landing on: it's only a trim if the clicked cell is exactly an existing point on your path, otherwise the whole click is invalid, full stop. Took longer than it should have to get there.
The biggest thing I ran into, though, was the unique-solution requirement. Went in assuming of course the solver needs to guarantee a unique solution — that felt obvious. Except digging into it, I realized an easy-difficulty board with lots of empty cells is structurally going to have multiple solutions no matter what. So enforcing uniqueness means you literally can't generate easy levels. Kind of a gut-punch moment when I saw it, and honestly I couldn't even point to a real reason I'd assumed uniqueness mattered in the first place — it just felt like the "correct" way to do it. Scrapped the requirement entirely and rewrote features 13/14/15 around the solver just finding "the simplest solution" among whatever it finds, and using that as the difficulty basis instead.
Endless mode was born and killed in the same session. Originally had generated levels continuing forever, but going back over it, there was nothing defining what happens to the player experience if real-time generation fails or lags. So that got torn out in favor of pre-generating a fixed pool of 50 (6 hand-designed + 44 generated) before deployment, with a "more to come" message on the last level. The daily-puzzle stretch idea died in the same pass too — decided the portfolio value was too low, and replaced it with an auto-generation pipeline (generate → AI first-pass review → developer second-pass review → deploy), which felt like a better showcase of actually automating a workflow with AI.
Then later I added a Stretch feature — a live generator/solver demo screen — and that ran straight into an earlier TRD decision that the generator module was Node-only. The demo screen needs the generator running live in the browser, so those two things didn't fit together. Ended up redesigning both the generator and solver as environment-agnostic pure TypeScript so they could be reused in the Node pipeline and in the browser demo. Honestly the whole reason I wanted that demo screen in the first place is a question that kept nagging at me — shouldn't a portfolio piece built around an NP-hard problem actually show the algorithm running somewhere, instead of hiding it entirely behind an offline pipeline?
Looking at where the docs stand now, the PRD's been rewritten five times and the TRD side got gutted and redone twice in the same day. The leftover TBD list is still long — the color-pair/grid-size progression curve, real solver timeout numbers, difficulty threshold calibration, how the obstacle feature actually changes the generator/solver algorithms. All of that needs real measurements before it can be locked in, so for now I just wrote placeholder numbers and moved on (p_stop = 0.15, 50k nodes / 3s timeout, tag thresholds at 33/66, that kind of thing).
Feels a little weird not having written any code today, like there's nothing to show for it. But if I'd started coding without catching these contradictions first, I'd probably be tearing all of it apart again three weeks in. PRD and TRD are both up in Notion as final versions now. Tomorrow I actually want to get into project setup and grid rendering.
0 Comments
Log in to join the conversation.No comments yet. Be the first to share your thoughts.