Sanglard's agent.md: rules that make coding agents write clean code
The session-start style file cutting the cleanup tax on AI-written code — plus the case against line-by-line review, and OCR for docs your LLM can't read.

Copy markdown
The rules that do the work
The file bans magic numbers, caps function names at 30 characters, swaps boolean parameters for enums, and forces early returns to flatten nesting — so the agent emits layered, review-ready code instead of spaghetti. Sanglard says he now reviews architecture, not style.
Two workflow rules worth stealing
Two rules travel to any agent: write the failing test before the bug fix (watch it fail, fix, then verify), and keep every field and function private until you explicitly approve exposing it. Both rein in an agent's habit of sprawling, unrelated edits.
Line-by-line review is the wrong reflex
Simon Willison makes the companion case: exhaustively reading an agent's diff line by line isn't where quality comes from. The skill that matters is instructing precisely, then verifying the change actually landed — via tests and behavior, not eyeballing.
OCR-It: feed locked docs to your LLM, offline
A new open-source Chrome extension pins a screen region and hotkeys you through paginated viewers — scanned books, protected PDFs, slide readers — running Tesseract WASM fully offline (no API key, no network) to dump clean .txt you can paste into a model. Load-unpacked, no build step.