Rebuild, not refactor
Sherwood came together in ten days, from an empty repo to a working trading engine. Building that fast with agentic tools that were still improving left debt from unintentional drift, and I realized Sherwood was going to need a re-write. The drift was too far into the foundation. Floating-point numbers I used drifted a fraction of a cent on every trade, risk checks were written but never wired in, and there was no way to change the database without hand-editing tables. None of those is a bug you fix in one place. So I made the call to rebuild. I archived v1 to start v2 with the constraints baked in from the first commit.
I stopped soon after. If I was going to avoid the same mistakes, I would need to change some of the fundamentals of how I was building. The agents needed more reinforcement and more grounding than I could give with even the best prompt engineering. They needed real, durable memory beyond the few facts they remember between sessions. They needed to gain experience like any engineer you would work with, and the harnesses (Claude Code and Antigravity) I was working with didn’t have that.
Around then, durable memory for agents began making the rounds on the internet. A couple of weeks earlier, Karpathy had sketched a pattern for giving an LLM its own wiki: the model maintains a structured memory it reads and updates as it goes, instead of retrieving documents at query time. That got me experimenting. I put together a rough PoC of what became Agent M: somewhere to keep a project’s context so I’d stop repeating myself. I used it to write the v2 spec for Sherwood.
Agent M quickly took over as the project. Sherwood v2 stayed a design; the thing I actually rebuilt was the way I work. I’d set out to rebuild a trading engine and ended up rebuilding my process instead. My workflow went from one agent to two, one harness to two, one platform to multiple. My agent needed to work on all of them if I was going to make the best use of these new tools.
So while Sherwood didn’t get rebuilt, what I built instead has been the foundation of everything I’ve built since.
Liked this? Get new experiments by email — or grab the RSS.