STACK is a word vendors print on a slide and operators need as an architecture.
What is STACK? Five layers for repositories where humans and agents share work: Structure, Toolchain, Agent configuration, Connection, Knowledge and quality. The agent operating system should be versioned like the application.
It is not a vendor “AI stack” diagram. It is not a pile of tools. If prompts, MCP servers, and skills live outside the repo, or live in five places inside it, you have agentic repo debt. The disease is ownership, not a weak model.
A demo can look clean on one laptop. Six months later a second engineer cannot say which rule allowed the agent to edit the wrong module. The glossary capsule is the short form. This page is the map you can hang on the repo before you add another host.
The five names
Each layer has an owner. If a change cannot be named as a layer, it does not belong in the pull-request description. “Tweaked the agent” is not a commit message.
Structure. Layout, entry points, workspaces, and boundaries an agent can navigate on minute one. The map is a directory, not a Slack memory. If a new worker has to ask where the rules live, Structure is missing. One tree. Nowhere else.
Toolchain. The shells, commands, and CLI contracts an agent is allowed to run, written down instead of remembered. Hosts and runners are pinned. “Whatever the laptop has” is how a demo works and a second machine fails. If two people get two different command lists, you do not have a toolchain. You have folklore.
Agent configuration. Versioned standing context. AGENTS.md, rules, skills, subagent charters. Not a prompt in a chat. Not a gist in someone’s drive. If the standing instructions exist in three files that disagree, the agent will pick the loudest one. Put a name on the CODEOWNERS line.
Connection. MCP with contracts and least privilege. Visibility, mutation, log. A server without those three is a hole in the repo. When a tool can send, spend, or delete, the first ten calls have a human name next to them. After that, the log is the review. No log, no tool.
Knowledge and quality. Memory, evals, and CI, so a model upgrade does not silently lower the bar. What the agent may treat as true, and the tests that fail a bad change. If you swapped the model last Tuesday and nothing in CI noticed, you do not have a quality layer. You have hope.
The override doctrine is a file, not a Slack memory. It names the decisions an agent may never take. It sits next to Agent configuration and Connection. It is not a sixth layer. It is the refuse-line those two layers enforce.
A walk through a repo that already smells
Take a product repo that “has agents.” You open it on a Monday.
Structure is four places: a .cursor/rules file, a CLAUDE.md at the root, a prompt in a Notion page, and a skill the founder pasted into a host last month. The agent reads two of them. Nobody can say which two.
Toolchain is “use the CLI on my machine.” The CI image has a different Node. The agent runs a formatter the laptop does not have. Review comments argue about whitespace that the agent never saw.
Agent configuration is a chat from March. The charter for the docs worker lives in that thread. The docs worker still runs. The charter does not.
Connection is two MCP servers. One can read the repo. One can open a pull request and comment on GitHub. Neither has a written mutation list. The log is the vendor dashboard, which expires.
Knowledge and quality is a README sentence: “be careful with main.” There is no eval. There is no test that fails when the agent edits a billing module. Last week’s model upgrade made the prose nicer and the diffs larger. Nobody measured.
That is agentic repo debt. A smarter model will not pay it down. Ownership will.
What belongs where
MCP belongs in Connection, with a contract, or it does not belong. MCP meaning is the definition of the protocol: host, client, server; tools, resources, prompts. This page only places it. A clean server with no ceiling is still a hole with nicer plumbing.
A charter belongs in Agent configuration as standing context, and in CHORUS as a coordination artifact. STACK versions the file. CHORUS names the fields. Do not collapse them. The repo can have a beautiful AGENTS.md and still lose work at every handoff.
Evals belong in Knowledge and quality. A vibe check in a pull request is Review in CHORUS, not an eval. If the only quality signal is a human saying “looks good,” you have a spectator, not a gate.
Not a vendor slide
The collision is in the glossary on purpose. STACK is not a product pack. It is not LangChain plus a vector database plus a host. It is not “our AI stack” on a Series A deck. Tool names age fast. The five layers do not.
A solo founder plus agents is already a multi-actor repo. STACK is sized for that, not for an enterprise platform team. Vibe coding wins the demo. STACK is for the six months after, when the agent edits the wrong module and nobody can say which rule allowed it.
Two pages
STACK: version the agent OS like you version the app is the architecture article: how to treat prompts, skills, and server contracts as code, with reviewers and a rollback. This page is the definition.
The Agentic Codebase is live. The introduction is the launch article. You do not need the hardcover to put the rules in one place.
If you do one thing this week: pick a single directory as the agent OS, move the stray prompts into it, and put a name on the CODEOWNERS line. Folklore ends at the first owner. Then name the five layers on a one-page map. If a change cannot point at a layer, it does not merge.
Cite this:What is STACK? Five layers, not a vendor diagram.Len P. van der Hof. https://lenvanderhof.com/en/blog/what-is-stack/ ·