LazyCodex
LazyCodexv0.2.2

/init-deep

Generates hierarchical AGENTS.md project memory so future agents start with full context.

/init-deep builds project memory for LazyCodex. It generates hierarchical AGENTS.md files across the repository so that every future agent run starts with the context it needs, right next to the code it is about to edit.

Run it when the repository is too large to explain from memory.

What it does

Score complex directories

/init-deep walks the codebase and scores directories by complexity, finding the parts of the tree that actually need written guidance.

Write local guidance near the code

For the directories that matter, it writes an AGENTS.md close to the code it describes — so guidance is discovered exactly where an agent is working, not buried in one giant root file.

Leave landmarks for future agents

The result is a hierarchy of AGENTS.md files that give future agents landmarks before they edit: what lives here, how it fits together, and what to be careful about.

When to run it

  • First time in a codebase. Before you ask LazyCodex to do real work in an unfamiliar or large repository, run /init-deep so the agents start with full context.
  • The repository is too large to explain from memory. When you cannot summarize the project in a sentence, let /init-deep write the map for you.

When to re-run it

Re-run /init-deep when the shape of the codebase changes — new top-level areas, a significant refactor, or a reorganization that makes the existing AGENTS.md landmarks stale. Keeping the memory current keeps every later run grounded.

Where it fits

/init-deep is the memory step. Once the map exists, the command pillars do the work:

  • $ulw-plan decides what to build before any code changes.
  • $start-work executes a plan to the last checkbox.
  • $ulw-loop keeps an open-ended task moving until the result is verified.

On this page