The simplifier agent removed 400 lines, including a strange sleep(50) in an HTTP client, a sort before JSON serialization, and a “deprecated” API field. The next day: a partner banned for quota overrun, a client snapshot test broken, a mobile app crashing. Meanwhile, to format a date, another agent added a dependency that pulls in forty others. The code diff was three lines. The lockfile diff was two thousand.

Simplification and convenience are good — until they delete a reason nobody wrote down, or import code nobody reviewed.

Understand before deleting (Chesterton)

In 1929, in The Thing, G. K. Chesterton described a fence across a road. The reformer wants it gone because he sees no use for it. The wiser answer: if you don’t know what it’s for, I won’t let you remove it. Go find out first.

The principle doesn’t forbid deletion. It requires understanding first.

Every behavior is a contract (Hyrum)

In the 2010s, Hyrum Wright at Google stated Hyrum’s law: with enough users of an API, every observable behavior will be depended on by someone, whatever the contract says. Key order, a delay, an error message, an undocumented field.

This is the counterweight to the simplifier agent and the fight against Lehman drift:

  • The simplifier acts under tests and specs, never blindly on a public API.
  • Unknown reason → characterization test or documented TODO, not deletion.
  • Public API changes: deprecation, transition period, changelog, semantic versioning, and a check of consumers before merging.

Every install is a security decision

An agent solves problems with what it knows, and it knows a lot of packages. Adding a dependency is its shortest path. But a dependency is third-party code running with your privileges, a license on your product, and future vulnerability surface. Worse, an agent can propose a plausible package name that isn’t the one it thinks.

TypeScript:

  • No new dependency without explicit validation: any package.json addition is a review checklist item with a justification — why this package, why not a few lines of standard library code.
  • Committed, respected lockfile: CI installs from it and fails if it’s out of date. A lockfile change is a change to review.

Rust:

  • cargo-deny in CI: allowed licenses, security advisories, bans / duplicates, sources.
  • Commit Cargo.lock; build with cargo build --locked.

Takeaways

  • Chesterton (1929): don’t remove what you don’t understand.
  • Hyrum (2010s): with enough users, every observable behavior has a dependent.
  • Simplify under tests and specs; unknown reason → characterization test, not deletion; public APIs need deprecation and consumer checks.
  • A dependency is privileged third-party code: validate every add, freeze the lockfile in CI, cargo-deny plus --locked.
  • Prefer stdlib or a few lines over a trivial package.

Share this post

← All posts