← back to all posts

Agent gardening: periodic prompts useful for codebases

blog

It seems like as a codebase changes, or as models get better, some prompts are good to rerun. You know, like a periodic “find all the bugs” prompt, although I wouldn’t recommend that one (security is hard, and there are better tools like www.zkao.io out there to find bugs using AI).

Anyway, I call that concept agent gardening, and it’s a mix of prompts that help maintain a codebase in order by constantly refactoring or cleaning up code.

I’m curious as to what people think are good prompts to run periodically. Mine live in a file called GARDENING.md where each prompt is accompanied with a date/commit next to it to understand when the last time we ran it was, and what was the outcome of that run.

To give you an idea, here are some of the prompts that live in that file:

  • should we update any of our dependencies?
  • is there dead code we should remove?
  • do we duplicate code and make some things overly complicated, which could benefit from some abstraction (an interface, a constructor, a common library/package, etc.)
  • are we lacking e2e testing in some area?
  • review past agent transcripts produced by agentic code in this codebase and figure out if there are things that we do that consume way too many tokens in the context of our agents, maybe commands, or prompts, or something that adds tons of tokens for no good reason
  • is there anything in your memory that could be useful to hardcode into AGENTS.md for other coworkers to benefit?
  • are the docs up-to-date?
← back to all posts blog • 2026-11-15

recent posts

elsewhere

book Real-World Cryptography Applied cryptography, from Manning. podcast Two And A Half Coins Crypto, banking & distributed systems. youtube Cryptography videos Concepts & security, explained.