Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is very handy.

Say you discover in review that your agent wrote code before tests. A file that was added, no corresponding test file.

Tell the agent to read in the file, delete it (or roll back), then reimplement using red/green TDD.

Claude can test-drive an identical reimplementation but this time by writing red tests and making them green. Now you have coverage that you KNOW covers the code because you watched those tests fail before they passed.

Going further I added a note to my `/review` command so the agent looks for this mistake for me in its self-review. If it finds uncovered code it makes a plan which includes the delete-reimplement trick. Now all I do is approve that plan - no hunting needed, no explaining, no repeating myself.

You could even put this in a Ralph Wiggum loop and give yourself super high quality tests by going file by file.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: