The Case for AI Guardrails: How We Switched AI from Copy-Pasta to Building the Way We Want
B · Useful, limited Gusto engineers give a short first-hand account with concrete before-and-after counts from their own codebase, but the figures are self-reported and there is no comparison group.
Summary based on the full text·Original: about 4 minutes to read
In short
A Gusto Engineering post by Todd Sedano (November 2026) on six months of building lint rules as guardrails for coding agents in a large Rails monolith. The trigger: a class deprecated in April 2025 had been held flat at about 226 call sites by people, then climbed to 339 once agents started copying the working examples. The fix was a lint rule rejecting new uses plus agent-driven removal of the old ones, and a "ratchet" that lets the list of tolerated violations only shrink.
Key numbers
- 226 to 339call sites of a deprecated job-enqueueing class, December 2025 to April 2026, after coding agents became routine
- 289 to 157lint rules with known violations, February 2026 peak to the time of writing
- 77 to 193custom RuboCop rules over the six-month initiative
- 76sleeps removed from specs, about 107 seconds of idle time per suite run
As reported by the source.
English·Web page·opens engineering.gusto.com
What it reports
- Deprecated job-enqueueing class: 239 call sites a month after deprecation, 226 in December, 339 by April 2026. The deprecation existed only in a document and in people's heads. After a lint rule and removal with Claude, the count reached zero.
- The ratchet has three parts: a list of rules with known violations, removal-only ownership (adding to the list fails CI), and a test that keeps the list and the lint config in sync.
- Rules with known violations peaked at 289 in February 2026 and stand at 157; of rules with inline suppressions in March 2025, 123 now have none; custom rules grew from 77 to 193.
- Gusto contributed a DisallowedCops option to RuboCop upstream.
- Rule messages should state the fix, because a rule that only says no invites workarounds. A spec rule capping sleeps lists five fixes in order; following it removed 76 sleeps (about 107 seconds per run) and exposed tests that asserted the wrong thing.
- Unique RuboCop cops in use went from 117 to 66.
How they got it
Counts from Gusto's own repository and lint configuration over roughly a year. No method beyond the counts is described, and no comparison with teams or code areas that did not get guardrails.
Limits
- Self-reported by the company, from one codebase and one language ecosystem.
- The agent effect on the deprecated class is inferred from timing; other causes are not ruled out.
- No data on defect rates, review time or delivery speed.
- Short post; several figures (for example the 117 to 66 cop count) are given without definition.
Why it matters for companies
Coding agents learn house style from whatever is in the repository, so legacy code works as a set of examples they will repeat. Deprecation notes in wikis do not reach them; only checks that run on every change do. The practical pattern is cheap: encode review comments as lint rules whose messages say how to fix the problem, use agents to delete the last old examples, and make the violation list one-way. This applies to any company letting agents write code in an older codebase.
Summary based on the full text. Read the original for the full argument and data.Read the original on engineering.gusto.com
- Tags
- Coding agents