Framework

STACK The Agentic Codebase

STACK is a five-layer architecture for repositories where humans and agents share work: Structure, Toolchain, Agent configuration, Connection, Knowledge and quality. The agent OS is versioned like the app.

The moves
5

When to use it

Use STACK when agents demo well and then rot the repo: rules in five tools, MCP without contracts, skills nobody owns. The disease is agentic repo debt, not a weak model.

The moves

  1. 01

    Structure

    Layout, entry points, workspaces, and boundaries an agent can navigate on its first minute in the repo.

  2. 02

    Toolchain

    The shells, commands, and CLI contracts an agent is allowed to run, written down instead of remembered.

  3. 03

    Agent configuration

    AGENTS.md, CLAUDE.md, rules, skills, and subagent charters as versioned standing context.

  4. 04

    Connection

    MCP servers, tool contracts, hooks, and guardrails with least privilege and a real failure story.

  5. 05

    Knowledge and quality

    Memory tiers, context budgets, evals, and CI, so a model upgrade does not silently lower the bar.

The book

Available now

The Agentic Codebase

The Five-Layer Architecture That Makes Agent Work Survive Production

Open the book

Related frameworks

Terminology

STACK is the five-layer model in The Agentic Codebase. It is not a vendor "AI stack" diagram, not an AGENTS.md file by itself, and not a vertical-slice tutorial. A repo that only has a markdown instruction sheet still has agentic debt.

Citation

STACK (The Agentic Codebase). Len P. van der Hof, Systems for the Strategic Self. https://lenvanderhof.com/frameworks/stack/

Markdown for LLMs