Developer Log Made by Rehan Bharwani Nov 29, 2026

Humanize
Comments·

CLI / Tooling
humanize-comments / Terminal
> node bin/cli.js examples/ --dry-run --friday-5pm
- // Initialize the billing retry counter
+ // works on my machine, shipping it
= // eslint-disable-next-line (protected)
= "https://api.example.com/v1" (string literal safe)
[SUCCESS] 0 executable code diffs verified
Code-Integrity Verified

Removing AI Comment Slop Without Breaking Builds

AI coding assistants are great at shipping boilerplate, but they leave behind unmistakable filler comments like // Step 1: Initialize the counter variable or // Gracefully handle any errors. Simply running regex search-and-replace over a codebase is dangerous—it can corrupt URLs (https://), regex literals, Python docstrings, or compiler directives.

State-Aware Lexing With Zero Dependencies

I built humanize-comments on pure Node.js 20+ ESM with zero external dependencies. Its parser tracks string quotes, template literals, regex literals, triple-quoted Python docstrings, and block vs. line comment syntax across 17+ languages—including JS/TS, Python, Go, Rust, C/C++, Swift, SQL, YAML, CSS, and Dockerfiles.

Hard Invariants Before Any File Write

Before writing a single byte back to disk, the pipeline enforces two safety guarantees:

1. Directive Protection: Shebangs (#!), SPDX/license headers, TODO/FIXME, JSDoc tags (@param, @returns), and tool pragmas (@ts-ignore, eslint-disable, prettier-ignore, noqa, type: ignore) are always treated as immutable.

2. Code-Integrity Check (verifyCodeUnchanged): Every edit is validated by stripping comments from both the original and modified source and asserting that 100% of executable code, literals, and indentation match identically.

Offline Personas, Multi-Provider LLMs & Agent Skills

Using deterministic FNV-1a hashing and an xorshift PRNG offline (or OpenAI, Anthropic, Gemini, and Ollama via flags), the CLI swaps robotic narration for sparse developer personas (--tired, --senior, --friday-5pm, --legacy) and installs directly into Claude Code, Cursor, Antigravity, or a git pre-commit hook.

Tech Stack: Node.js 20+, Pure ESM, Multi-Language Lexer, OpenAI / Anthropic / Gemini / Ollama APIs, Git Hooks. View Repository ↗