Grok Bots Directory
Submit a Grok Bot

Gardener: make each repeated mistake impossible

A gardener is a routine that keeps a codebase clean while agents write most of it. It watches what lands. When the same mistake shows up again, it changes the repo so the next agent cannot make it.

The playbook

The playbook comes from lauren (@poteto). In her talk "here's how i shipped 2,500 PRs last month to production", she says agents copy the patterns they see. One workaround, or one comment that explains a workaround, can become the pattern every agent follows within days or weeks. Her pitch is that every team needs a role she calls a gardener, someone who catches that growth early. Her rule for it: "whenever you see tech debt or bad patterns, your instinct should be, I need to write a lint rule against it." A lint rule does not clean up what is already there, but it stops the problem from growing.

The fix goes as high as it can. pstack's /correct skill, which lauren added on October 3, 2026, sets the order: architecture first, then types, then a lint whose error names the fix, then a test, and docs last, because nothing fails when an agent skips a doc. Each new check has to fail on a real past mistake. The repo keeps a table that pairs each rule with what enforces it. In Dune, the framework behind Grok Bot, her team banned code comments, because agents used them to justify a band-aid and other agents copied it.

How a Grok Bot runs the gardener

  1. Read what landed

    Go through recent commits, reverts, review comments, and comments that explain workarounds. lauren reviews what her agents and her teammates merge and looks for code smells. /correct counts a mistake as a class once it has happened twice.

  2. Buffer before fixing

    lauren runs a scout that looks for React foot-guns, and she does not ask it to fix each one. It appends findings to a document instead. Every couple of days she reads the list and spots the findings that share one cause.

  3. Fix at the highest level

    Remove the mistake with architecture first: one owner for each piece of state, one supported way to do each task, and old code deleted so no agent copies it. If that does not work, use types. If bad code still compiles, add a lint or CI check whose error names what to use instead. Then add a test. Docs come last, for judgment calls only.

  4. Prove the check

    Show that each new check fails on a real past mistake, and run the same command locally and in CI. Each class gets its own commit. An exception sits on the offending line with a reason, an expiry date, and a human's approval.

  5. Keep the rule table

    The agent instruction file pairs each rule with what enforces it. If a rule was already written down and nothing enforced it, the next correction moves it up a level in the same change. A rule is dropped once its mistake can no longer happen.

Inspired templates2

A template is listed here only when its own profile, skills, or memories make codebase upkeep its job: finding leftover code or repeated mistakes and turning them into small cleanup PRs or enforced checks. Code reviewers, general coding bots, and one-off code audits are not listed.

Gardener

Weed leftover from a codebase. Small fixes only, never a refactor, never a behavior change. A weed is leftover you can prove: no callers, a duplicate write, a…

  • Memories1
  • Skills0
  • Routines0
Nightly Audit Engineer

Nightly Audit Engineer

by

A nightly engineering auditor that researches a whole codebase, then ships one cleanup per area. Built for teams that want a research-then-spread-out cleanup h…

  • Memories7
  • Skills0
  • Routines1

More playbooks

All playbooks