← Binderdex dev log

I deleted 10,000 code comments and banned new ones

#automation#infra#ai-agents#solo-founder

A staircase that only descends, with faint dashed circles left on the upper steps and one glowing amber ball resting on the lowest

For two nights, the most useful work on my codebases was deleting things. A little over 3,800 comments went in the first batch in one repo, thousands more followed across both, and a new CI rule makes it hard for them to come back. New code comments are banned by default on both projects.

The two codebases are Binderdex, a Pokémon card collection and price app, and Statpro, a sports stats site. I use AI coding agents heavily on both, and I'll come back to why that matters.

I know how that sounds. Comments are supposed to be the good stuff, the explanation a tired engineer leaves for the next person. What I had was different: comments explaining behaviour that no longer existed, comments narrating refactors nobody remembers, and a steady supply of what I've started calling excuse comments. // this works but nobody knows why is a confession wearing a comment's clothes.

Where the comments went

Nothing went into a wood chipper. The deletion was sorted into three piles first.

  • Real decisions buried in code moved into decision records, thirty-one in one repo and four in the other. Each is now versioned and searchable in the place I'd look for an architecture decision.
  • Excuse comments ("temporary", "fix later", "leave this") became twenty-eight tech-debt issues. A comment describing unfinished work is now an unfinished-work ticket.
  • The rest, the tautologies and stale narration, were deleted. A line saying "increments the counter" above counter++ is noise with a maintenance cost.

A ratchet that only tightens

The cleanup is a side effect. The mechanism is a ratchet, a check that can move one way and locks against the other. A lint rule counts comments per file, compares the count against a JSON baseline, and fails the pull request when a file goes over. The baseline only shrinks. When an audit removes comments, the count is updated downward, and a separate guard fails anyone who tries to raise it again. There is no lever for "my feature needs three paragraphs".

EVERY PUSH PR adds a comment CI counts comments per file Over the baseline? The PR fails Delete it, or file a ticket or record fixed in the same PR baseline only moves down Audit pass lowers the baseline 2,282 files with comments down to 2,087 in one sweep
The ratchet runs on every push, for every file, in one direction. The failure is the feature.

One nuance took me a second read: the headline number is files. One repo's counter went from 2,282 comment-bearing files to 2,087 in a single sweep. A file either carries comments or it doesn't, so the file count is the number to watch, and its target is zero.

What the exemptions teach

The sweep wasn't absolute, and I'd copy that part too. A handful of files stay exempt until I can re-run the systems they belong to and check each removed comment against live behaviour. A deletion I can't verify becomes its own kind of stale prose.

The deletions that did land were safe by construction. The cleanup parses the syntax tree and removes comment nodes only, so the compiled files came out semantically identical, apart from the JSX comments that disappeared with their nodes.

Why now

I lean on AI coding agents heavily for both products, and the comment count showed it before anything else did. A model that narrates its own reasoning will happily write three lines of comment per line of code, and nothing in a normal review stops it. If you work with coding agents, expect your comment count to climb like an exponential curve, and expect a per-file budget to be the thing that bends it back.

The rule shipped the same day as a test prune that banned skipped and focused tests in the other repo. Both come from the same release-day instinct: the bar you hold on day one is the bar that holds. Every quiet exception waved through in launch week taxes the next year of work, so the cleanest day to raise the bar is the day you're already cleaning.

Both repos now have heavier docs and quieter diffs. The remaining 2,087 comment-bearing files keep draining on every audit pass, and the counter only knows one direction.

This is the build log for Binderdex (www.binderdex.com) · All entries · Weekly essays