a builder's codex
codex · operators · Simon Willison · ins_red-green-tdd-shorthand-for-agents

Encode jargon shorthand once, save tokens forever

By Simon Willison · Independent AI/engineering writer; co-creator of Django · 2026-04-02 · podcast · Simon Willison on agentic engineering and the November 2025 inflection — Lenny's Podcast

Tier B · TL;DR
Encode jargon shorthand once, save tokens forever

Claim

Compress recurring multi-paragraph instructions into terms the agent already recognizes ("Red/Green TDD", "monorepo conventions", "ship as research preview") so each new task spends tokens on the work, not the meta-instruction.

Mechanism

LLMs are pattern-matchers over training distribution. Standard jargon collapses a long natural-language spec into a short symbol the model has seen thousands of times in training. The agent already knows the implied steps, conventions, and edge cases. Token spend per task drops; consistency across tasks rises because the symbol carries shared assumptions.

Conditions

Holds when:

Fails when:

Evidence

"I hated TDD as a human; I love it for agents."

Simon notes agents don't get bored writing 1,000 lines of test boilerplate. Adjacent rule he flags: keep tests generously now that updating them is free — what used to be a code smell (verbose test suites) is now a feature.

— Simon Willison on Lenny's Podcast, 2026-04-02

Signals

Counter-evidence

Over-compressed prompts hide intent and produce wrong outputs when the symbol means something different in the agent's training data. Always sanity-check the agent's first output on a new shorthand before scaling it.

Cross-references

Open the interactive view → View original source → Markdown source →