GARDEN is a system of six language-agnostic software design principles for the agent-first era, where code is written, reviewed, and analyzed primarily by LLM agents and humans set intent and constraints but rarely read the code line by line. The metaphor: a codebase is a garden that agents continuously tend, and untended code grows wild. GARDEN principles are the tending practices that keep a codebase navigable, verifiable, and extensible across years of agent-driven changes.
The six principles
| Letter | Name | One-liner |
|---|---|---|
| G | Grep-first Discoverability | Structure and naming minimize the number of search steps an agent needs to find the right code. One canonical name per concept; call sites traceable statically; no magic or dynamic dispatch that hides relationships. |
| A | Atomic Vertical Slices | Small, self-contained vertical modules; one task fits in one context window. Tests colocated with code. Managed duplication instead of premature abstraction. |
| R | Regenerable Components | Any component can be rewritten from scratch against its contract without ripple effects. The spec/contract is the durable artifact; code is expendable. Extension happens through explicit ports, not rewrites. |
| D | Deterministic Verification | An agent never self-certifies. Every invariant is encoded in executable form: types, lint rules, tests, CI gates. LLM review is a complement with diverse lenses, never a substitute for deterministic gates. |
| E | Explicit Everything | No implicit invariants: explicit dependencies, typed interfaces, self-describing errors, no temporal coupling, no magic values. Boring explicit code beats clever compact code. |
| N | Navigable Knowledge | Layered documentation with progressive disclosure: short hand-written context files, READMEs in significant directories, human-authored intent ("why"), specs versioned next to code. Knowledge needed for an edit lives at most one hop from the edit site. |
Who this is for
Both LLM agents that read, write, and review code via tools, and the human engineers who set intent, approve trade-offs, and own the "why" behind a codebase. GARDEN assumes neither party reads or holds the whole codebase in mind at once; it optimizes for partial, repeated, tool-mediated attention rather than continuous human familiarity. The documentation follows the Diataxis framework.