I've been putting off cleaning up an old side project for months. So last weekend I tried something different: I gave an AI agent the repo, one sentence of instructions, and stepped back to watch.
The setup
The project was a small Express API with no tests, three different date libraries, and a utils folder that had grown into a junk drawer. My instruction was simple: make it boring and consistent, and don't change behaviour.
What went well
It found and removed two date libraries without me asking which one to keep.
It wrote characterisation tests first, before touching any logic.
Every change came with a short note explaining why.
What went wrong
It 'fixed' a rounding quirk that a client actually depended on. The tests it wrote encoded the new behaviour, so nothing failed. The lesson: an agent can only protect the behaviour you tell it about.
I'd do it again, but next time I'd write down the weird-on-purpose parts before handing over the keys.
0 comments
Join the conversation
Sign in to leave a comment.
No comments yet
Be the first to share your thoughts!