Leave the campsite better than you found it, and it will start cleaning itself up
This thought came across my mind as I was reading Every’s philosophy on compound engineering:
The first three steps (plan, work, review) produce a feature. The fourth step produces a system that builds features better each time. […]
- Capture the solution. Ask yourself: What worked? What didn’t? What’s the reusable insight?
- Make it findable. Add YAML frontmatter to make sure it is tagged with the right metadata, tags, and categories for retrieval.
- Update the system. Add new patterns into CLAUDE.md, the file the agent reads at the start of every session. Create new agents when warranted.
- Verify the learning. Ask yourself: Would the system catch this automatically next time?
As virtuous developers we try to adhere to the boyscout rule: leave the campsite better than you found it. We do this so our codebase doesn’t start rotting because we slowly let the trash take over.
When agents are writing our code, these effects are multiplied. Every time we make an explicit improvement to the system, agents can pick the pattern up and apply it to both old and new. The campsite will slowly but surely start cleaning itself up, and fresh trash will be thrown straight into the bin.
Information Overload newsletter
I occasionally send out a dispatch with personal stories, things I'm working on, and interesting links I come across.