hn.today

Synthetic Sagas

scattered-thoughts.net4 points0 comments
Screenshot of Synthetic Sagas

This recounts rebuilding a personal text editor with heavy AI assistance and shows that current models are good enough to produce substantial, commit-ready code with modest human oversight. The codebase is split into focus-core (logic and a mockable IO trait) and focus (real IO, CLI, daemonization), with focus-core comprising ~34 files/13.8k lines and focus ~8 files/3.7k lines. The workflow emphasizes end-to-end tests, a fuzz tester that fires thousands of random keypresses, API snapshot tests, and a simple "cackle" check to prevent accidental stdlib IO calls in core. Tests catch regressions, the fuzzer enforces invariants, and targeted asymptotic benchmarks flag models’ tendency to produce quadratic implementations. Most recent work used opus 5 within Claude Code on a $20 plan; models now write tests, catch edge cases, and sometimes refuse obviously bad instructions.

Practical specifics matter: the IO-trait sandbox is a pragmatic but imperfect simulation because most Rust libraries aren’t sans-io, forcing hard-to-test code outside the core and complicating daemonization tests. The author settled on handle-based data structures to avoid ownership/lifetime complexity that confuses models. Process changes include a mostly single-threaded, synchronous design-review rhythm with short design sessions, hands-off model runs, and brief reviews - enabling steady daily progress (including adding VCS integration) with less cognitive cost, while still reserving dense focus sessions to tame architectural decay.

Read on scattered-thoughts.net0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.