Deep Dive: Why "Refactor First" Is the Agent's Best Stop Signal
The Next Commit
0:00 / 0:00
Deep Dive: Why "Refactor First" Is the Agent's Best Stop Signal
41 просмотр · 6 дней назад
The Next Commit
13 подписчиков
41 просмотр · 6 дней назад
In this clip, Tim "Agile Otter" Ottinger explains how he's built TDD discipline directly into his AI agent's skills. Before writing any code, the agent checks whether the existing code makes the test hard to write, and if so, proposes a refactor and stops for review. From there it follows a strict rubric: write the test against the requirement (not the code), watch it fail, make it pass, then run one more refactoring pass.
Tim also gets into a problem he ran into: the agent flagging "coincidental duplication," similar-looking code that isn't actually the same thing, for unnecessary refactoring. His fix was to feed it his own past writing on single point of truth, teaching the skill to tell the difference. It leads to a broader conversation with host Tom Howlett about what happens to books and best practices in an agent-driven world, where the knowledge stops living in your head and starts living in reusable skills.
From Episode 2 of The Next Commit, featuring Tim "Agile Otter" Ottinger and host Tom Howlett.
Subscribe on Substack for new episodes weekly: thenextcommit.substack.com