---
title: "The Agentic Codebase — available now in Kindle, Paperback & Hardcover"
description: "STACK turns repositories into operating systems for human-agent collaboration: structure, toolchain, agent configuration, connection, and knowledge gates…"
image: "https://lenvanderhof.com/books/covers/the-agentic-codebase-en-front.jpg?v=20260819-hitll-nobg"
---

Available now · worldwide on Amazon

# The Agentic Codebase

The Five-Layer Architecture That Makes Agent Work Survive Production

Demo an agent in an afternoon, regret it in six months. Build repos that last.

STACK turns repositories into operating systems for human-agent collaboration: structure, toolchain, agent configuration, connection, and knowledge gates that survive tool churn.

## Get the book

KindleFree to read on Kindle Unlimitedon Amazon.com→Paperbackon Amazon.com→Hardcoveron Amazon.com→

[Also on Bol.com →](https://www.bol.com/nl/nl/p/systems-for-the-strategic-self-the-agentic-codebase/9300000338805992/)Third-party listing (not our storefront). Amazon remains the primary buy path.

Reading from another country?Pick your own Amazon marketplace — same edition, your store.

- [🇺🇸United Statesamazon.com](https://www.amazon.com/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle&tag=lenvanderho0f-20)
- [🇬🇧United Kingdomamazon.co.uk](https://www.amazon.co.uk/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇨🇦Canadaamazon.ca](https://www.amazon.ca/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇦🇺Australiaamazon.com.au](https://www.amazon.com.au/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇩🇪Germanyamazon.de](https://www.amazon.de/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇳🇱Netherlandsamazon.nl](https://www.amazon.nl/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle&tag=lenvanderho01-21)
- [🇫🇷Franceamazon.fr](https://www.amazon.fr/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇪🇸Spainamazon.es](https://www.amazon.es/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇮🇹Italyamazon.it](https://www.amazon.it/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇯🇵Japanamazon.co.jp](https://www.amazon.co.jp/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇧🇷Brazilamazon.com.br](https://www.amazon.com.br/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇲🇽Mexicoamazon.com.mx](https://www.amazon.com.mx/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇮🇳Indiaamazon.in](https://www.amazon.in/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)

Amazon links may include affiliate tags. That does not change the price you pay. Bol.com listings are third-party.

Look inside↓Download companion materials

English & Dutch editions · Kindle, Paperback, Hardcover · free on Kindle Unlimited · [Nederlandse editie →](https://lenvanderhof.com/boeken/the-agentic-codebase/)

pages

482

chapters

18

hours of reading

± 7

editions

EN · NL

![The Agentic Codebase — front cover](https://lenvanderhof.com/books/covers/the-agentic-codebase-en-front.jpg?v=20260819-hitll-nobg)

![The Agentic Codebase — back cover](https://lenvanderhof.com/books/covers/the-agentic-codebase-en-back.jpg?v=20260819-hitll-nobg)

The editions

## Choose your format

Same book, your format. You buy on Amazon, not on this site.

- [![The Agentic Codebase, kindle](https://lenvanderhof.com/books/editions/the-agentic-codebase/en-kindle-98a05e278b52.jpg)](https://www.amazon.com/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle&tag=lenvanderho0f-20)

### Kindle



Read now. Kindle Unlimited members get it at no extra cost.

 [Buy on Amazon ↗](https://www.amazon.com/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle&tag=lenvanderho0f-20)
- [![The Agentic Codebase, paperback](https://lenvanderhof.com/books/editions/the-agentic-codebase/en-paperback-6521dc8a3d11.jpg)](https://www.amazon.com/dp/B0H96NPJ1B?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=paperback&tag=lenvanderho0f-20)

### Paperback



The working copy. Mark it up. Take it into the meeting.

 [Buy on Amazon ↗](https://www.amazon.com/dp/B0H96NPJ1B?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=paperback&tag=lenvanderho0f-20)
- [![The Agentic Codebase, hardcover](https://lenvanderhof.com/books/editions/the-agentic-codebase/en-hardcover-cda00e68475e.jpg)](https://www.amazon.com/dp/B0H96LZH39?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=hardcover&tag=lenvanderho0f-20)

### Hardcover



The shelf edition. Dark full-art jacket, built to stay in the room.

 [Buy on Amazon ↗](https://www.amazon.com/dp/B0H96LZH39?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=hardcover&tag=lenvanderho0f-20)

Available now

## The Five-Layer Architecture That Makes Agent Work Survive Production

The agent was fast for a week. Then it started editing the wrong module, re-deriving conventions you had already decided, and pasting plausible code that broke a contract no file ever wrote down. You spend your day correcting a collaborator that cannot read the rules, because the rules live in your head, not in the repo. Output went up; trust went down.

The reflex is to switch models, write a longer prompt, and add another tool. That scales the problem rather than the work: a better model follows a broken repository faster.

This book offers the opposite of a prompt trick: a repository designed for machine collaborators. *The Agentic Codebase* introduces the **STACK** framework (Structure, Toolchain, Agent configuration, Connection layer, Knowledge and quality): five layers that turn an agent from a guessing intern into a bounded contributor who reads the contract before it writes the code.

What you can do

## What this book puts in your hands

You will learn to:

- Lay out a repo and entry points so an agent finds the right file without being told twice.
- Write AGENTS.md and CLAUDE.md as versioned standing context with real ownership, not aspirational comments, and keep them honest across Cursor, Claude Code, and your own stack.
- Define MCP servers and tool contracts with least-privilege scopes, and install hooks and guardrails that block the bad edits they can actually see before merge.
- Promote recurring work into skills, roles, and subagents. Then gate the whole loop with evals and CI, so judgment written once does its checking on every run.

The framework

## [STACK: the system behind the book](https://lenvanderhof.com/frameworks/stack/)

Structure, Toolchain, Agent configuration, Connection, Knowledge/quality

1. 1

### Structure



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

### Toolchain



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

### Agent configuration



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

### Connection



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

### Knowledge and quality



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

Five STACK layers: Structure, Toolchain, Agent configuration, Connection layer, and Knowledge and quality as the stack agents run inside

From the book

## Five STACK layers: Structure, Toolchain, Agent configuration, Connection layer, and Knowledge and quality as the stack agents run inside

The Agentic Codebase, printed page: Five STACK layers: Structure, Toolchain, Agent configuration, Connection layer, and Knowledge and quality as the stack agents run inside

Inspect more pages↓

## Look inside

Pages from the print edition.

- [Five STACK layers: Structure, Toolchain, Agent configuration, Connection layer, and Knowledge and quality as the stack agents run inside⤢](https://lenvanderhof.com/books/previews/the-agentic-codebase/en/approved-figure-1-p037-0accf0ce3eb0edd34e128950-c5465621f9597efdda791942.webp)
- [Demo-to-production gap: drifted prompts, divergent rules, ungoverned tools, and bloated context pass a watched demo but compound across⤢](https://lenvanderhof.com/books/previews/the-agentic-codebase/en/approved-figure-1-1-p057-0accf0ce3eb0edd34e128950-973a67d1a67dd1fc2101d89e.webp)
- [Memory tiers: hot loads every run; warm loads at launch or on⤢](https://lenvanderhof.com/books/previews/the-agentic-codebase/en/approved-figure-10-1-p257-0accf0ce3eb0edd34e128950-138598529cfacc629099d025.webp)
- [MCP topology: host, clients, JSON-RPC bus, stdio server, and HTTP server. Tools declare schema, auth, scope, limits, timeout, idempotency, and⤢](https://lenvanderhof.com/books/previews/the-agentic-codebase/en/approved-figure-11-1-p279-0accf0ce3eb0edd34e128950-0c13ea25c821b3460521a352.webp)
- [Lethal trifecta diagram: private data, untrusted content, and exfiltration path overlap at the breach. Least-privilege scoping keeps any session⤢](https://lenvanderhof.com/books/previews/the-agentic-codebase/en/approved-figure-11-2-p284-0accf0ce3eb0edd34e128950-e2c18602f6af762e005d31c3.webp)
- [Five STACK layers in a vertical stack, all enclosed by the repository⤢](https://lenvanderhof.com/books/previews/the-agentic-codebase/en/approved-figure-2-1-p083-0accf0ce3eb0edd34e128950-980ca12faa28fb5d3c43bde3.webp)
- [Canonical NexumOS repository anatomy: small root, named agent-configuration homes, bounded src workspaces, and archive quarantine for⤢](https://lenvanderhof.com/books/previews/the-agentic-codebase/en/approved-figure-3-1-p107-0accf0ce3eb0edd34e128950-24709d3f35a4c594473ab2bd.webp)
- [Three levels of skill progressive disclosure: description at startup, SKILL.md body when relevant, bundled reference and template files on demand⤢](https://lenvanderhof.com/books/previews/the-agentic-codebase/en/approved-figure-7-1-p199-0accf0ce3eb0edd34e128950-2ab8deaf15f5630b2dce7298.webp)
- [Role isolation: an orchestrator delegates to triage, billing-reconciler, and release-notes. Each role has its own context, least-privilege tools,⤢](https://lenvanderhof.com/books/previews/the-agentic-codebase/en/approved-figure-8-1-p213-0accf0ce3eb0edd34e128950-5977c451e1d685974afc8218.webp)

Purchase takes place on Amazon, not on this website.

Buy the paperback on Amazon↗

·

From the book

## Read a page

Introduction

### Introduction: The Repo Is the Agent OS

> A demo proves the model can do the work. A repository proves the work can be done again. The gap between those two sentences is the subject of this book.

#### What you can do afterwards

You will understand why agentic systems fail in repositories rather than in models. You will name the disease, agentic repo debt, and leave with STACK: the five-layer map every agentic codebase must get right.

#### Use this chapter when

A demo wins the room but a new hire cannot reproduce it; rules and prompts live in chat history; "ask the person who knows the setup" is your onboarding plan.

## What you get

What you get

- The STACK framework: Structure, Toolchain, Agent configuration, Connection, Knowledge/quality
- Versioned patterns for AGENTS.md, CLAUDE.md, rules, skills, and subagent charters
- MCP server design, tool contracts, hooks, and guardrails that survive tool churn
- Agent memory tiers, context budgeting, evals, and CI for production discipline
- A copyable artifact per chapter: directory trees, SKILL.md, rule files, eval specs

Who it's for

- Onboard a second human or agent without losing conventions
- Stop duplicating CLAUDE.md across three tools
- Add MCP servers without a security surprise
- Run evals when you change rules or skills
- Keep the repo alive through a model upgrade

Who it's for

## Who this book was written for

The result is not a faster way to ship one feature. It is a codebase that compounds: each rule you encode is correctness the agent inherits, and the system gets more autonomous as you write less of the code yourself.

If you build with agents and refuse to let speed erode your standard, this was written for the engineer you are when the diff is large, the agent is confident, and the contract is yours to define.

### The reader it was written for

Technical founders and staff engineers already using Cursor or Claude Code daily, who can read a repo tree and are tired of “it worked in chat” dying in CI.

### Also a fit for

Engineering leads standardizing how a team uses agents: AGENTS.md, skills, MCP, evals.

### What you will use it on

- Onboard a second human or agent without losing conventions
- Stop duplicating CLAUDE.md across three tools
- Add MCP servers without a security surprise
- Run evals when you change rules or skills
- Keep the repo alive through a model upgrade

### Probably not for you if

- Non-technical founders; start with AI Agents for Startup Strategy
- ML researchers training foundation models
- Readers who refuse a terminal workflow

The contents

## Chapter by chapter

18 chapters

Every chapter of The Agentic Codebase with its printed epigraph, what you can do afterwards, and the moment it is built for.

1. IntroductionIntroduction: The Repo Is the Agent OSA demo proves the model can do the work. A repository proves the work can be done again. The gap between those two sentences is the subject of this book.What you can do afterwardsYou will understand why agentic systems fail in repositories rather than in models. You will name the disease, agentic repo debt, and leave with STACK: the five-layer map every agentic codebase must get right.Use this chapter whenA demo wins the room but a new hire cannot reproduce it; rules and prompts live in chat history; "ask the person who knows the setup" is your onboarding plan.
2. Chapter 1The Agentic Repo ProblemNothing crashed. That was the problem. The same agent that dazzled the room in its first week live began, in its second, to rot the codebase quietly, and quiet rot has no stack trace.What you can do afterwardsYou will be able to name the four ways an ad-hoc agent setup decays a repository. You will recognize each one in your own tree, and you will see why they are not four bugs. They are one missing layer of architecture.Use this chapter whenYour agent worked perfectly in a demo and started misbehaving a sprint later. Use it when a new teammate cannot reproduce the behavior everyone swears they saw.
3. Chapter 2STACK: Five LayersFour failure modes, one underlying absence. Chapter 1 gave them names; this chapter supplies the structure that makes the absence impossible: five layers, each one a home for a kind of intelligence a normal codebase never has to carry. STACK is that structure, and the map you will walk for the rest of this book.What you can do afterwardsYou will map any repository to the five-part STACK sequence: Structure, Toolchain, Agent configuration, Connection, and Knowledge/quality. Then you will run the audit that scores each one from absent to versioned-and-tested.Use this chapter whenYou inherit a repo agents already touch, you are about to add your first agent to a brownfield codebase, or you cannot say where your prompts, rules, and tool contracts actually live.
4. Chapter 3Structure — Layout and Entry PointsAn agent does not explore your repository. It forages, and a maze charges a toll on every wrong turn that a route never asks for.What you can do afterwardsYou will design the front door of a repository so a fresh agent, or a new engineer, can route in its first minute. The tree gets named entry points, predicate-rich directories, and a navigation map an agent reads on entry.Use this chapter whenA new agent re-derives your layout on every run. Use it when an agent reinvents code that already exists two directories over, or when "where does X live?" is answered only by the person who built the repo.
5. Chapter 4Workspaces and BoundariesA repository agents can navigate is the first half of Structure. The other half is a repository they can navigate without loading the parts they do not need. At scale, that second half decides whether your agents stay reliable or start hallucinating couplings that were never there.What you can do afterwardsYou will decide where to draw workspace boundaries so an agent can load a unit's full context and change it correctly. You will scope per-workspace instructions under one root and recognize the "distributed monolith" that blows the context budget.Use this chapter whenYour repo has grown past one cohesive thing. Use it when agents keep over-loading code to make small changes, or when you are choosing between a monorepo and several repos and want a reason that is not taste.
6. Chapter 5AGENTS.md and CLAUDE.mdA repository can hold five contradictory descriptions of how it works, and every agent that reads it will obey a different one. The cure is not a better instruction file. It is one instruction file the others bow to.What you can do afterwardsYou will author a single root constitution for your repository: scope, commands, shell mandate, safety floor, quality gates, and a repo map. Then you will wire every agent tool to read that one file instead of five drifting copies.Use this chapter whenYour `CLAUDE.md` disagrees with a `.cursorrules` that disagrees with the code, or you are adding your first root instruction file and want it to age well instead of bloating into noise.
7. Chapter 6Rules Across ToolsOne constitution, singular. That was Chapter 5's win for NexumOS, and within a month the question that breaks it: every tool wants its own copy, in its own folder, in its own dialect. So how do you keep one truth when five surfaces each demand to hold it?What you can do afterwardsYou will version your rules as code, scope them by glob, and keep one canonical source. Per-tool copies will be generated or imported from that source, curing the rule drift that made Chapter 1's agent right on Monday and wrong on Tuesday.Use this chapter whenYour team uses more than one agent tool, or your `.cursor/rules` and `CLAUDE.md` no longer agree. Use it when you have debugged "the agent ignored our rule" and found a second rule contradicting the first.
8. Chapter 7Agent SkillsWhat you can do afterwardsYou will take a prompt your team retypes from memory and turn it into a versioned, reviewable, testable skill package. The result is a folder with a `SKILL.md`, a trigger description, an on-demand body, and a golden test that pins behavior.Use this chapter whenThe same instructions get pasted into chat every week. Use it when your "good" prompts live in someone's head or a Slack thread, or when you cannot tell whether last month's edit made a capability better or worse.
9. Chapter 8Roles and SubagentsSkills give your repo capabilities. They do not answer who is chartered to use them, under what constraints, or when that worker must stop. That is where an agent that can do anything starts doing the wrong thing. A skill is a power; a role is the hire with a job description who is chartered to pick it up.What you can do afterwardsYou will replace generic "the agent" with a small roster of chartered roles. Each role gets a written mandate, least-privilege tool list, typed inputs and outputs, and a named escalation path. Each can become a scoped subagent that runs in its own clean context.Use this chapter whenOne catch-all agent is doing triage, deploys, and billing writes from the same context. Use it when destructive incidents trace to "the agent had every tool just in case," or when parallel agent workers are arriving faster than you can review their output.
10. Chapter 9Prompts, Commands, and WorkflowsChapter 8 gave NexumOS a roster of chartered roles. But a role is a who, not a what. The triage agent now has a mandate; it still has no script. This chapter writes the script, and writes it as code, because the operation your agents run forty times a week should not live in your memory of how the demo went.What you can do afterwardsYou will turn your most-repeated chat operation into a parameterized, version-controlled command with a golden test case. You will also learn to chain those commands into short workflows with named human checkpoints instead of one heroic pipeline.Use this chapter whenYou catch yourself retyping the same five-step instruction from memory. Use it when teammates each have their own version of "the way we ship a fix," or when last month's agent workflow quietly stopped producing the same shape of output.
11. Chapter 10Memory and Context TiersWhat you can do afterwardsYou will write a memory policy that sorts every piece of standing context into three tiers: hot session, warm project, cold archive. The agent will load the smallest high-signal set on each run, not the largest the window allows. You will leave with a copy-pasteable tier table and a context budget your repo can enforce.Use this chapter whenYour agent contradicts itself deep in a long session, a stale decision keeps resurfacing, or your root instruction file has crept past two screens. Use it when you cannot say which things in context were chosen and which merely accumulated.
12. Chapter 11MCP Servers and Tool ContractsWhat you can do afterwardsYou will turn the tools your agents call from bare functions into governed contracts: schema, auth, limits, timeouts, idempotency, and named failure modes. You will also make the chapter's highest-return security decision, local versus remote, on purpose instead of by default.Use this chapter whenYour agents call MCP servers nobody wrote a spec for. Use it when a tool lives in someone's personal config, when its scope is unclear, or when last week's tool silently changed what it does.
13. Chapter 12Hooks and GuardrailsA contract declares what a tool is allowed to do. It does not stop the tool from being asked to do something else.What you can do afterwardsYou will move the one invariant that must hold every run out of prose and into a deterministic hook. It fires on the event, validates the call, and holds no matter what the model chose. You will write, test, and ship your first PreToolUse gate this week.Use this chapter whenA rule in your `CLAUDE.md` says "never force-push," "always run tests before committing," or "don't touch `.env`." Use it when you have caught the agent doing the thing anyway, or when you cannot afford to.
14. Chapter 13Plugins and MarketplacesA skill you write is code you trust because you wrote it. A plugin you install is code you trust because someone else wrote it, and the agent that runs it holds your credentials and a shell. This chapter closes the gap between those two sentences.What you can do afterwardsYou will stop installing third-party agent capability on vibes. Instead, you will curate it as the supply-chain dependency it is: score every plugin against six dimensions, pin what you keep, and fork what you cannot pin.Use this chapter whenA teammate drops a "you have to try this" plugin in the channel. Use it when a marketplace listing promises exactly the thing you were about to build, or when you cannot name where your team's agents got their extra tools.
15. Chapter 14Shells and ReasonKit-toolsEvery plugin you install, every skill it bundles, every tool it exposes ends the same way: a command runs in a shell. Chapter 13 taught you to evaluate what you install. The shell is the room all of it executes inside, and most teams have never decided what that room contains. This chapter furnishes it.What you can do afterwardsYou will declare your repository's shell and CLI toolchain as versioned config. A human or agent should be able to recreate the environment from a new checkout. You will also learn when to use a structured shell that hands the agent rows it can filter, and when to use a POSIX shell for CI portability.Use this chapter whenA command works on your laptop and fails on a teammate's. Use it when an agent's pipeline breaks because the assumed CLI version is different, or when nobody can name the shells and tools your repo expects without asking the person who set it up.
16. Chapter 15Integrations, Evals, and CI for AgentsA green test suite is the only sentence in a codebase that says "this still works" and can be trusted. Rule files and skill files have never been allowed to say it. This chapter changes that.What you can do afterwardsYou will treat your `AGENTS.md`, your rules, and your skills as the untested production code they already are. Each gets a golden-task eval, a merge gate, a pass-rate threshold, and a cost budget. Agent runs also become traceable, so a "harmless" edit can no longer regress behavior in silence.Use this chapter whenYou cannot tell whether last week's rule tweak helped or hurt. Use it when a one-line prompt change broke a workflow nobody noticed for days, or when your only test of "did this help" is whether the next demo feels good.
17. Chapter 16Vibe Coding vs Production DisciplineSpeed does not threaten maintainability; speed in the wrong container does. This chapter gives the wrong container a sanctioned shape and a door that only opens through the gates.What you can do afterwardsYou will stop treating speed and discipline as a choice. Instead, you will treat them as two modes with two territories: fast exploration in a sanctioned lane that never touches the main repo's invariants, and gated production work that decides what merges.Use this chapter whenYou are tempted to skip the gates "just this once" to keep momentum. Use it when an agent-generated spike looks good enough to merge straight to main, or when every fast win has left a little debt behind.
18. ConclusionConclusion: Maintain the StackA demo proves the model can do the work once. A versioned stack proves the work survives the people who built it and the model that replaces them. This book was the distance between those two sentences; this chapter is the habit that keeps you on the second one.What you can do afterwardsYou will leave with a maintenance habit, not a finish line: the STACK audit, completed once for NexumOS. Then you will put the same audit on a cadence for your own repo, so the five layers stay versioned instead of rotting back into folklore.Use this chapter whenYou have built the stack: structure, configuration, connections, and knowledge. Now you have to keep it alive through model upgrades, new teammates, and a hundred small "just this once" shortcuts.

Editions

## Editions and specifications

Edition Formats Chapters Pages Reading time ISBN (paperback) English The Agentic Codebase Kindle, Paperback, Hardcover 18 482 ± 7 hours 9798187627509 Dutch De agentische codebase Kindle, Paperback, Hardcover 18 520 ± 7 hours 9798187630967

Both editions are written natively. The Dutch text is not a machine translation of the English. · Trim size: 6x9″

## Get the book

One title, every Amazon marketplace. Pick your format and your store.

## Get the book

KindleFree to read on Kindle Unlimitedon Amazon.com→Paperbackon Amazon.com→Hardcoveron Amazon.com→

[Also on Bol.com →](https://www.bol.com/nl/nl/p/systems-for-the-strategic-self-the-agentic-codebase/9300000338805992/)Third-party listing (not our storefront). Amazon remains the primary buy path.

Reading from another country?Pick your own Amazon marketplace — same edition, your store.

- [🇺🇸United Statesamazon.com](https://www.amazon.com/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle&tag=lenvanderho0f-20)
- [🇬🇧United Kingdomamazon.co.uk](https://www.amazon.co.uk/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇨🇦Canadaamazon.ca](https://www.amazon.ca/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇦🇺Australiaamazon.com.au](https://www.amazon.com.au/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇩🇪Germanyamazon.de](https://www.amazon.de/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇳🇱Netherlandsamazon.nl](https://www.amazon.nl/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle&tag=lenvanderho01-21)
- [🇫🇷Franceamazon.fr](https://www.amazon.fr/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇪🇸Spainamazon.es](https://www.amazon.es/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇮🇹Italyamazon.it](https://www.amazon.it/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇯🇵Japanamazon.co.jp](https://www.amazon.co.jp/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇧🇷Brazilamazon.com.br](https://www.amazon.com.br/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇲🇽Mexicoamazon.com.mx](https://www.amazon.com.mx/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)
- [🇮🇳Indiaamazon.in](https://www.amazon.in/dp/B0H964XXTS?utm_source=lenvanderhof&utm_medium=buy_grid&utm_campaign=the-agentic-codebase&utm_content=kindle)

Amazon links may include affiliate tags. That does not change the price you pay. Bol.com listings are third-party.

Frequently asked

## What readers usually want to know

### What is The Agentic Codebase about?

STACK turns repositories into operating systems for human-agent collaboration: structure, toolchain, agent configuration, connection, and knowledge gates that survive tool churn. The subtitle is: The Five-Layer Architecture That Makes Agent Work Survive Production.

### What is the STACK framework?

STACK: Structure, Toolchain, Agent configuration, Connection and Knowledge and quality. Structure, Toolchain, Agent configuration, Connection, Knowledge/quality

### In which formats is The Agentic Codebase available?

The Agentic Codebase ships as Kindle, Paperback and Hardcover, on every Amazon marketplace worldwide. The Kindle edition is enrolled in Kindle Unlimited, so KU members read it free.

### Is there a Dutch edition?

Yes. The Dutch edition is De agentische codebase, written as a native edition rather than a machine translation. It is available on Amazon too.

### How long is The Agentic Codebase?

This edition runs 18 chapters, 482 pages in print and roughly 7 hours of reading.

### Who is The Agentic Codebase for?

If you build with agents and refuse to let speed erode your standard, this was written for the engineer you are when the diff is large, the agent is confident, and the contract is yours to define.

### Is there companion material for The Agentic Codebase?

Yes. The companion archive downloads from this book page: copyable artifacts that sit next to the chapters.

### This will slow us down.

What slows you down is a repo that cannot survive a second engineer or a model upgrade. STACK is the architecture that keeps agent work reproducible.

### Our stack changes every month.

That is why the layers are versioned. Toolchain and MCP contracts are allowed to churn; Structure and Knowledge gates are what keep the bar from sliding.

### We are too small for architecture.

A solo founder plus agents is already a multi-actor repo. STACK is sized for that, not for an enterprise platform team.

### Vibe coding works for us.

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.

The production system

## How this book was made

Every title moves through the same gated production line: sourced research, a claim-level evidence ledger, structural review, fact-checking, red-team critique, and a bilingual final edit. AI agents do specialist work inside those gates; judgment, voice, and accountability stay human.

- Claims enter an evidence ledger with a source and a confidence grade before they reach the page
- English and Dutch are two native editions, not a translation of one another
- Every chapter clears readability, rhythm, and style gates before it is typeset

Read the system in The Agentic Author→Production filesFront PDFBack PDFFull cover PDFKindle front JPG

## Terminology

- [STACK](https://lenvanderhof.com/glossary/stack/)
- [MCP](https://lenvanderhof.com/glossary/mcp/)

## Essays on this site

- [What is an AI agent?](https://lenvanderhof.com/en/blog/what-is-an-ai-agent/)
- [MCP explained for founders](https://lenvanderhof.com/en/blog/mcp-explained-for-founders/)
- [The Agentic Codebase: introduction](https://lenvanderhof.com/en/blog/the-agentic-codebase-introduction/)
- [Version the agent OS](https://lenvanderhof.com/en/blog/stack-version-the-agent-os/)
- [An agentic workflow is not an automation](https://lenvanderhof.com/en/blog/agentic-workflow-vs-automation/)
- [LLM integration is an operating-design problem](https://lenvanderhof.com/en/blog/llm-integration-is-operating-design/)
- [MCP meaning: Model Context Protocol, not a product](https://lenvanderhof.com/en/blog/mcp-meaning/)
- [What is STACK? Five layers, not a vendor diagram](https://lenvanderhof.com/en/blog/what-is-stack/)

The production system

## In this system

The full seriesThe frameworkThe introduction

Books

## More in this series

AI Agents for Startup StrategyThe Multi-Agent OrganizationThe RAG EngineerTo Amazon↓

```json
{
	"@context": "https://schema.org",
	"@graph": [
		{
			"@type": "Person",
			"@id": "https://lenvanderhof.com/#person",
			"name": "Len P. van der Hof",
			"alternateName": [
				"Len van der Hof",
				"L.P. van der Hof",
				"Leendert Pieter van der Hof"
			],
			"honorificSuffix": "MSc",
			"url": "https://lenvanderhof.com/",
			"image": [
				"https://lenvanderhof.com/photos/len-portrait-1.jpg",
				"https://lenvanderhof.com/photos/len-portrait-2.jpg",
				"https://lenvanderhof.com/photos/len-portrait-3.jpg",
				"https://lenvanderhof.com/photos/len-portrait-4.jpg",
				"https://lenvanderhof.com/photos/len-speaking.jpg",
				"https://lenvanderhof.com/photos/len-hero.jpg"
			],
			"jobTitle": "Entrepreneur, AI Innovator and Venture Builder",
			"description": "Len P. van der Hof, MSc, is a Dutch entrepreneur and AI innovator in Zwijndrecht. He builds ReasonKit, MindSesh, Undominated.ai, books under his name, the fiction imprint LPH98.lifestyle, and technology ventures through LPH98.ventures. Eleven titles in Systems for the Strategic Self are available now, in English and Dutch.",
			"address": {
				"@type": "PostalAddress",
				"addressLocality": "Zwijndrecht",
				"addressCountry": "NL"
			},
			"alumniOf": {
				"@type": "CollegeOrUniversity",
				"name": "Rotterdam School of Management, Erasmus University"
			},
			"knowsAbout": [
				"Artificial intelligence",
				"AI agents",
				"Agentic AI systems",
				"LLM routing",
				"SEO",
				"Generative engine optimization",
				"Answer engine optimization",
				"Venture building",
				"Founder performance",
				"Founder psychology",
				"Evidence-based decision-making"
			],
			"sameAs": [
				"https://www.linkedin.com/in/lenvanderhof/",
				"https://x.com/LenvanderHof",
				"https://www.youtube.com/channel/UCTG20buKqYYbitqqf7l3zJA",
				"https://www.instagram.com/Lenvanderhof/",
				"https://www.threads.com/@lenvanderhof",
				"https://github.com/Lenvanderhof",
				"https://huggingface.co/LPH98",
				"https://www.npmjs.com/~lenvanderhof",
				"https://www.goodreads.com/author/show/70983905.Len_P_van_der_Hof",
				"https://www.amazon.com/author/lenvanderhof",
				"https://www.bol.com/nl/nl/b/len-p-van-der-hof-msc/609879394/",
				"https://bsky.app/profile/lenvanderhof.com",
				"https://mastodon.social/@Lenvanderhof",
				"https://crates.io/users/Lenvanderhof",
				"https://cursor.com/@Lenvanderhof",
				"https://medium.com/@Lenvanderhof",
				"https://gitlab.com/Lenvanderhof",
				"https://hub.docker.com/u/lenvanderhof/",
				"https://dev.to/lenvanderhof",
				"https://www.facebook.com/Lenvanderhof",
				"https://soundcloud.com/Lenvanderhof"
			],
			"affiliation": [
				{
					"@id": "https://lenvanderhof.com/#publisher"
				},
				{
					"@id": "https://lenvanderhof.com/#mindsesh"
				},
				{
					"@id": "https://lenvanderhof.com/#lifestyle"
				}
			]
		},
		{
			"@type": "WebSite",
			"@id": "https://lenvanderhof.com/#website",
			"url": "https://lenvanderhof.com/",
			"name": "Len P. van der Hof",
			"description": "Len P. van der Hof, MSc, is a Dutch entrepreneur and AI innovator in Zwijndrecht. He builds ReasonKit, MindSesh, Undominated.ai, books under his name, the fiction imprint LPH98.lifestyle, and technology ventures through LPH98.ventures. Eleven titles in Systems for the Strategic Self are available now, in English and Dutch.",
			"inLanguage": [
				"en",
				"nl"
			],
			"publisher": {
				"@id": "https://lenvanderhof.com/#person"
			}
		},
		{
			"@type": "Organization",
			"@id": "https://lenvanderhof.com/#publisher",
			"name": "LPH98.ventures",
			"url": "https://lph98.ventures",
			"founder": {
				"@id": "https://lenvanderhof.com/#person"
			}
		},
		{
			"@type": "Organization",
			"@id": "https://lenvanderhof.com/#mindsesh",
			"name": "MindSesh",
			"url": "https://mindsesh.net",
			"founder": {
				"@id": "https://lenvanderhof.com/#person"
			}
		},
		{
			"@type": "SoftwareApplication",
			"@id": "https://lenvanderhof.com/#reasonkit",
			"name": "ReasonKit",
			"url": "https://reasonkit.sh",
			"creator": {
				"@id": "https://lenvanderhof.com/#person"
			}
		},
		{
			"@type": "SoftwareApplication",
			"@id": "https://lenvanderhof.com/#undominated",
			"name": "Undominated.ai",
			"url": "https://undominated.ai",
			"creator": {
				"@id": "https://lenvanderhof.com/#person"
			}
		},
		{
			"@type": "Organization",
			"@id": "https://lenvanderhof.com/#lifestyle",
			"name": "LPH98.lifestyle",
			"url": "https://lph98.lifestyle",
			"founder": {
				"@id": "https://lenvanderhof.com/#person"
			}
		},
		{
			"@type": "WebPage",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#webpage",
			"url": "https://lenvanderhof.com/books/the-agentic-codebase/",
			"name": "The Agentic Codebase — The Five-Layer Architecture That Makes Agent Work Survive Production",
			"description": "STACK turns repositories into operating systems for human-agent collaboration: structure, toolchain, agent configuration, connection, and knowledge gates…",
			"inLanguage": "en",
			"isPartOf": {
				"@id": "https://lenvanderhof.com/#website"
			},
			"about": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			},
			"primaryImageOfPage": "https://lenvanderhof.com/books/covers/the-agentic-codebase-en-front.jpg",
			"breadcrumb": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#breadcrumb"
			},
			"speakable": {
				"@type": "SpeakableSpecification",
				"cssSelector": [
					".showcase__title",
					".showcase__hook",
					".showcase__desc",
					".bookfaq__a"
				]
			}
		},
		{
			"@type": "Book",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work",
			"name": "The Agentic Codebase",
			"alternativeHeadline": "The Five-Layer Architecture That Makes Agent Work Survive Production",
			"url": "https://lenvanderhof.com/books/the-agentic-codebase/",
			"author": {
				"@id": "https://lenvanderhof.com/#person"
			},
			"publisher": {
				"@id": "https://lenvanderhof.com/#publisher"
			},
			"inLanguage": "en",
			"abstract": "STACK turns repositories into operating systems for human-agent collaboration: structure, toolchain, agent configuration, connection, and knowledge gates that survive tool churn.",
			"description": "Prompts live in chat history, rules get copy-pasted across tools, and MCP servers sprawl without contracts, until the repo no longer survives a model upgrade or a second engineer. The Agentic Codebase introduces STACK, a five-layer framework for repositories that humans and agents maintain together. This is architecture, not a tutorial: the repo is the operating system, and every layer is versioned, tested, and owned like production code.",
			"genre": "AI & agents",
			"keywords": "The Agentic Codebase, AI & agents, STACK framework, Structure, Toolchain, Agent configuration, Connection, Knowledge and quality",
			"image": [
				"https://lenvanderhof.com/books/covers/the-agentic-codebase-en-front.jpg",
				"https://lenvanderhof.com/books/covers/the-agentic-codebase-en-back.jpg"
			],
			"isPartOf": {
				"@id": "https://lenvanderhof.com/series/systems-for-the-strategic-self/#series"
			},
			"position": 4,
			"workTranslation": {
				"@id": "https://lenvanderhof.com/boeken/the-agentic-codebase/#work"
			},
			"numberOfPages": 482,
			"hasPart": [
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-00"
				},
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-01"
				},
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-02"
				},
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-03"
				},
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-04"
				},
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-05"
				},
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-06"
				},
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-07"
				},
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-08"
				},
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-09"
				},
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-10"
				},
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-11"
				},
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-12"
				},
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-13"
				},
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-14"
				},
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-15"
				},
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-16"
				},
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-99"
				}
			],
			"workExample": [
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#edition-kindle"
				},
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#edition-paperback"
				},
				{
					"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#edition-hardcover"
				}
			]
		},
		{
			"@type": "Book",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#edition-kindle",
			"name": "The Agentic Codebase (Kindle Edition)",
			"description": "Prompts live in chat history, rules get copy-pasted across tools, and MCP servers sprawl without contracts, until the repo no longer survives a model upgrade or a second engineer. The Agentic Codebase introduces STACK, a five-layer framework for repositories that humans and agents maintain together. This is architecture, not a tutorial: the repo is the operating system, and every layer is versioned, tested, and owned like production code.",
			"image": "https://lenvanderhof.com/books/covers/the-agentic-codebase-en-front.jpg",
			"bookFormat": "https://schema.org/EBook",
			"inLanguage": "en",
			"url": "https://www.amazon.com/dp/B0H964XXTS",
			"author": {
				"@id": "https://lenvanderhof.com/#person"
			},
			"publisher": {
				"@id": "https://lenvanderhof.com/#publisher"
			},
			"exampleOfWork": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			},
			"sku": "B0H964XXTS",
			"productID": "asin:B0H964XXTS"
		},
		{
			"@type": "Book",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#edition-paperback",
			"name": "The Agentic Codebase (Paperback)",
			"description": "Prompts live in chat history, rules get copy-pasted across tools, and MCP servers sprawl without contracts, until the repo no longer survives a model upgrade or a second engineer. The Agentic Codebase introduces STACK, a five-layer framework for repositories that humans and agents maintain together. This is architecture, not a tutorial: the repo is the operating system, and every layer is versioned, tested, and owned like production code.",
			"image": "https://lenvanderhof.com/books/covers/the-agentic-codebase-en-front.jpg",
			"bookFormat": "https://schema.org/Paperback",
			"inLanguage": "en",
			"url": "https://www.amazon.com/dp/B0H96NPJ1B",
			"author": {
				"@id": "https://lenvanderhof.com/#person"
			},
			"publisher": {
				"@id": "https://lenvanderhof.com/#publisher"
			},
			"exampleOfWork": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			},
			"isbn": "9798187627509",
			"gtin13": "9798187627509",
			"sku": "B0H96NPJ1B",
			"productID": "asin:B0H96NPJ1B",
			"numberOfPages": 482
		},
		{
			"@type": "Book",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#edition-hardcover",
			"name": "The Agentic Codebase (Hardcover)",
			"description": "Prompts live in chat history, rules get copy-pasted across tools, and MCP servers sprawl without contracts, until the repo no longer survives a model upgrade or a second engineer. The Agentic Codebase introduces STACK, a five-layer framework for repositories that humans and agents maintain together. This is architecture, not a tutorial: the repo is the operating system, and every layer is versioned, tested, and owned like production code.",
			"image": "https://lenvanderhof.com/books/covers/the-agentic-codebase-en-front.jpg",
			"bookFormat": "https://schema.org/Hardcover",
			"inLanguage": "en",
			"url": "https://www.amazon.com/dp/B0H96LZH39",
			"author": {
				"@id": "https://lenvanderhof.com/#person"
			},
			"publisher": {
				"@id": "https://lenvanderhof.com/#publisher"
			},
			"exampleOfWork": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			},
			"isbn": "9798187627745",
			"gtin13": "9798187627745",
			"sku": "B0H96LZH39",
			"productID": "asin:B0H96LZH39",
			"numberOfPages": 482
		},
		{
			"@type": "Chapter",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-00",
			"position": 1,
			"name": "Introduction: The Repo Is the Agent OS",
			"inLanguage": "en",
			"abstract": "You will understand why agentic systems fail in repositories rather than in models. You will name the disease, agentic repo debt, and leave with STACK: the five-layer map every agentic codebase must get right.",
			"isPartOf": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			}
		},
		{
			"@type": "Chapter",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-01",
			"position": 2,
			"name": "The Agentic Repo Problem",
			"inLanguage": "en",
			"abstract": "You will be able to name the four ways an ad-hoc agent setup decays a repository. You will recognize each one in your own tree, and you will see why they are not four bugs. They are one missing layer of architecture.",
			"isPartOf": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			}
		},
		{
			"@type": "Chapter",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-02",
			"position": 3,
			"name": "STACK: Five Layers",
			"inLanguage": "en",
			"abstract": "You will map any repository to the five-part STACK sequence: Structure, Toolchain, Agent configuration, Connection, and Knowledge/quality. Then you will run the audit that scores each one from absent to versioned-and-tested.",
			"isPartOf": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			}
		},
		{
			"@type": "Chapter",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-03",
			"position": 4,
			"name": "Structure — Layout and Entry Points",
			"inLanguage": "en",
			"abstract": "You will design the front door of a repository so a fresh agent, or a new engineer, can route in its first minute. The tree gets named entry points, predicate-rich directories, and a navigation map an agent reads on entry.",
			"isPartOf": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			}
		},
		{
			"@type": "Chapter",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-04",
			"position": 5,
			"name": "Workspaces and Boundaries",
			"inLanguage": "en",
			"abstract": "You will decide where to draw workspace boundaries so an agent can load a unit's full context and change it correctly. You will scope per-workspace instructions under one root and recognize the \"distributed monolith\" that blows the context budget.",
			"isPartOf": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			}
		},
		{
			"@type": "Chapter",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-05",
			"position": 6,
			"name": "AGENTS.md and CLAUDE.md",
			"inLanguage": "en",
			"abstract": "You will author a single root constitution for your repository: scope, commands, shell mandate, safety floor, quality gates, and a repo map. Then you will wire every agent tool to read that one file instead of five drifting copies.",
			"isPartOf": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			}
		},
		{
			"@type": "Chapter",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-06",
			"position": 7,
			"name": "Rules Across Tools",
			"inLanguage": "en",
			"abstract": "You will version your rules as code, scope them by glob, and keep one canonical source. Per-tool copies will be generated or imported from that source, curing the rule drift that made Chapter 1's agent right on Monday and wrong on Tuesday.",
			"isPartOf": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			}
		},
		{
			"@type": "Chapter",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-07",
			"position": 8,
			"name": "Agent Skills",
			"inLanguage": "en",
			"abstract": "You will take a prompt your team retypes from memory and turn it into a versioned, reviewable, testable skill package. The result is a folder with a `SKILL.md`, a trigger description, an on-demand body, and a golden test that pins behavior.",
			"isPartOf": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			}
		},
		{
			"@type": "Chapter",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-08",
			"position": 9,
			"name": "Roles and Subagents",
			"inLanguage": "en",
			"abstract": "You will replace generic \"the agent\" with a small roster of chartered roles. Each role gets a written mandate, least-privilege tool list, typed inputs and outputs, and a named escalation path. Each can become a scoped subagent that runs in its own clean context.",
			"isPartOf": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			}
		},
		{
			"@type": "Chapter",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-09",
			"position": 10,
			"name": "Prompts, Commands, and Workflows",
			"inLanguage": "en",
			"abstract": "You will turn your most-repeated chat operation into a parameterized, version-controlled command with a golden test case. You will also learn to chain those commands into short workflows with named human checkpoints instead of one heroic pipeline.",
			"isPartOf": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			}
		},
		{
			"@type": "Chapter",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-10",
			"position": 11,
			"name": "Memory and Context Tiers",
			"inLanguage": "en",
			"abstract": "You will write a memory policy that sorts every piece of standing context into three tiers: hot session, warm project, cold archive. The agent will load the smallest high-signal set on each run, not the largest the window allows. You will leave with a copy-pasteable tier table and a context budget your repo can enforce.",
			"isPartOf": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			}
		},
		{
			"@type": "Chapter",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-11",
			"position": 12,
			"name": "MCP Servers and Tool Contracts",
			"inLanguage": "en",
			"abstract": "You will turn the tools your agents call from bare functions into governed contracts: schema, auth, limits, timeouts, idempotency, and named failure modes. You will also make the chapter's highest-return security decision, local versus remote, on purpose instead of by default.",
			"isPartOf": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			}
		},
		{
			"@type": "Chapter",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-12",
			"position": 13,
			"name": "Hooks and Guardrails",
			"inLanguage": "en",
			"abstract": "You will move the one invariant that must hold every run out of prose and into a deterministic hook. It fires on the event, validates the call, and holds no matter what the model chose. You will write, test, and ship your first PreToolUse gate this week.",
			"isPartOf": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			}
		},
		{
			"@type": "Chapter",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-13",
			"position": 14,
			"name": "Plugins and Marketplaces",
			"inLanguage": "en",
			"abstract": "You will stop installing third-party agent capability on vibes. Instead, you will curate it as the supply-chain dependency it is: score every plugin against six dimensions, pin what you keep, and fork what you cannot pin.",
			"isPartOf": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			}
		},
		{
			"@type": "Chapter",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-14",
			"position": 15,
			"name": "Shells and ReasonKit-tools",
			"inLanguage": "en",
			"abstract": "You will declare your repository's shell and CLI toolchain as versioned config. A human or agent should be able to recreate the environment from a new checkout. You will also learn when to use a structured shell that hands the agent rows it can filter, and when to use a POSIX shell for CI portability.",
			"isPartOf": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			}
		},
		{
			"@type": "Chapter",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-15",
			"position": 16,
			"name": "Integrations, Evals, and CI for Agents",
			"inLanguage": "en",
			"abstract": "You will treat your `AGENTS.md`, your rules, and your skills as the untested production code they already are. Each gets a golden-task eval, a merge gate, a pass-rate threshold, and a cost budget. Agent runs also become traceable, so a \"harmless\" edit can no longer regress behavior in silence.",
			"isPartOf": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			}
		},
		{
			"@type": "Chapter",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-16",
			"position": 17,
			"name": "Vibe Coding vs Production Discipline",
			"inLanguage": "en",
			"abstract": "You will stop treating speed and discipline as a choice. Instead, you will treat them as two modes with two territories: fast exploration in a sanctioned lane that never touches the main repo's invariants, and gated production work that decides what merges.",
			"isPartOf": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			}
		},
		{
			"@type": "Chapter",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work-chapter-99",
			"position": 18,
			"name": "Conclusion: Maintain the Stack",
			"inLanguage": "en",
			"abstract": "You will leave with a maintenance habit, not a finish line: the STACK audit, completed once for NexumOS. Then you will put the same audit on a cadence for your own repo, so the five layers stay versioned instead of rotting back into folklore.",
			"isPartOf": {
				"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#work"
			}
		},
		{
			"@type": "BookSeries",
			"@id": "https://lenvanderhof.com/series/systems-for-the-strategic-self/#series",
			"name": "Systems for the Strategic Self",
			"alternateName": "Systems for the Strategic Self",
			"url": "https://lenvanderhof.com/series/systems-for-the-strategic-self/",
			"description": "An operator-grade nonfiction series on founder psychology, agentic AI systems, and evidence-based decision-making, published in native English and Dutch editions.",
			"author": {
				"@id": "https://lenvanderhof.com/#person"
			},
			"inLanguage": [
				"en",
				"nl"
			]
		},
		{
			"@type": "BreadcrumbList",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#breadcrumb",
			"itemListElement": [
				{
					"@type": "ListItem",
					"position": 1,
					"name": "Home",
					"item": "https://lenvanderhof.com/"
				},
				{
					"@type": "ListItem",
					"position": 2,
					"name": "Books",
					"item": "https://lenvanderhof.com/books/"
				},
				{
					"@type": "ListItem",
					"position": 3,
					"name": "The full series",
					"item": "https://lenvanderhof.com/series/systems-for-the-strategic-self/"
				},
				{
					"@type": "ListItem",
					"position": 4,
					"name": "The Agentic Codebase",
					"item": "https://lenvanderhof.com/books/the-agentic-codebase/"
				}
			]
		},
		{
			"@type": "FAQPage",
			"@id": "https://lenvanderhof.com/books/the-agentic-codebase/#faq",
			"mainEntity": [
				{
					"@type": "Question",
					"name": "What is The Agentic Codebase about?",
					"acceptedAnswer": {
						"@type": "Answer",
						"text": "STACK turns repositories into operating systems for human-agent collaboration: structure, toolchain, agent configuration, connection, and knowledge gates that survive tool churn. The subtitle is: The Five-Layer Architecture That Makes Agent Work Survive Production."
					}
				},
				{
					"@type": "Question",
					"name": "What is the STACK framework?",
					"acceptedAnswer": {
						"@type": "Answer",
						"text": "STACK: Structure, Toolchain, Agent configuration, Connection and Knowledge and quality. Structure, Toolchain, Agent configuration, Connection, Knowledge/quality"
					}
				},
				{
					"@type": "Question",
					"name": "In which formats is The Agentic Codebase available?",
					"acceptedAnswer": {
						"@type": "Answer",
						"text": "The Agentic Codebase ships as Kindle, Paperback and Hardcover, on every Amazon marketplace worldwide. The Kindle edition is enrolled in Kindle Unlimited, so KU members read it free."
					}
				},
				{
					"@type": "Question",
					"name": "Is there a Dutch edition?",
					"acceptedAnswer": {
						"@type": "Answer",
						"text": "Yes. The Dutch edition is De agentische codebase, written as a native edition rather than a machine translation. It is available on Amazon too."
					}
				},
				{
					"@type": "Question",
					"name": "How long is The Agentic Codebase?",
					"acceptedAnswer": {
						"@type": "Answer",
						"text": "This edition runs 18 chapters, 482 pages in print and roughly 7 hours of reading."
					}
				},
				{
					"@type": "Question",
					"name": "Who is The Agentic Codebase for?",
					"acceptedAnswer": {
						"@type": "Answer",
						"text": "If you build with agents and refuse to let speed erode your standard, this was written for the engineer you are when the diff is large, the agent is confident, and the contract is yours to define."
					}
				},
				{
					"@type": "Question",
					"name": "Is there companion material for The Agentic Codebase?",
					"acceptedAnswer": {
						"@type": "Answer",
						"text": "Yes. The companion archive downloads from this book page: copyable artifacts that sit next to the chapters."
					}
				},
				{
					"@type": "Question",
					"name": "This will slow us down.",
					"acceptedAnswer": {
						"@type": "Answer",
						"text": "What slows you down is a repo that cannot survive a second engineer or a model upgrade. STACK is the architecture that keeps agent work reproducible."
					}
				},
				{
					"@type": "Question",
					"name": "Our stack changes every month.",
					"acceptedAnswer": {
						"@type": "Answer",
						"text": "That is why the layers are versioned. Toolchain and MCP contracts are allowed to churn; Structure and Knowledge gates are what keep the bar from sliding."
					}
				},
				{
					"@type": "Question",
					"name": "We are too small for architecture.",
					"acceptedAnswer": {
						"@type": "Answer",
						"text": "A solo founder plus agents is already a multi-actor repo. STACK is sized for that, not for an enterprise platform team."
					}
				},
				{
					"@type": "Question",
					"name": "Vibe coding works for us.",
					"acceptedAnswer": {
						"@type": "Answer",
						"text": "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."
					}
				}
			]
		}
	]
}
```
