Ask HN: What's your secret weapon for keeping code/docs/tests from rotting?

2 bochoh 2 7/29/2025, 3:25:59 PM
I've been using cursor lately to handle some (most) of the grunt work and it's been surprisingly useful for two things: keeping documentation from going stale and spotting gaps in test coverage. For example, I'll ask it things like "what's the most likely way this function could break?" and it will suggest edge cases I hadn't thought of.

That said, it's not (maybe?) magic and sometimes hallucinates test cases that are rubbish so some critical thinking is still required.

I'm curious what y'all are using to keep docs/tests maintainable? Are you leaning on AI or doing it the old fashioned way?

Comments (2)

sunscream89 · 2h ago
You make the most junior member of your team take notes or revise them as they are directed to deal with each issue (like final step in closing the ticket.)

I know, I know, “everyone should do it.” Everyone is not going to do it, everyone left it undone the last times.

Works best when someone is trying to impress, or is told to do it in some essential capacity.

And there is also the setting of a good example.

speedgoose · 22m ago
I don’t write documentation about code. I do for the architecture and the APIs, but the code is self documented.