Chapter 6 of 8

Foundations for your coding agent

A coding agent builds what its context describes. Give it foundations: how the product is put together, including how it stays secure, and what it must do. Write ARCHITECTURE.md, with a Security section, and FEATURES.md.

Save your progress

Sign up for free with your email to tick off what you read and to check your tasks.

Start for free

Try it: the context window

Move things in and out of an agent’s working memory and watch what is left for the work. It is the same playground as on Workflows.

Playground · a session start

What your agent sees when a session starts.

Three layers fill the window before the first prompt: documents, memory and knowledge. Your tool takes its own share. Play the two approaches, switch items on and off, or change the window size.

Window
Your context window at the start of a session · to scale≈79.8k in use · 40%
0100k200k tokens
The curated part, enlargedto its own scale · ≈29.8k · 14.9% of the window
Build plan 3.5k
Architecture 6k
CLAUDE.md · AGENTS.md 2.5k
Second brain 9k
Shared brain 6k
Documents · foundationsMemory · working stateKnowledge · second and shared brainYour tool's shareUncurated
1DocumentsFoundations: the canonical documents the project is built against
2MemoryWorking state: what carries from one session to the next
3KnowledgeCompounded knowledge, pulled by relevance
4Your tool's shareSystem prompt and tools of the harness. Always there
×Without curationWhat gets pasted in when nobody curates
79.8ktokens in the window
40%of the window used
100%of what you added is curated
0.9×relative cost per call

Curated and lean

The agent reads the build plan, the standing brief and the latest handoff first. It knows the goal, the rules and where the last session stopped.

Illustrative numbers, close to a real project in The Curator. The tool's share is an estimate: no tool reports it.See The Curator →

Read

  1. Context as Architecture: Full-Corpus Grounding, Orchestrated Agentic Development, and Compliance-by-Design in a Production AI Assistant Platform

    Read in the Library (opens in a new tab)

    Quiz: 3 questions. Get 2 right to complete this article.

    Sign up for free to take the quiz and save your result.

  2. The Right Context, Not All of It

    Read on Substack (opens in a new tab)

    Quiz: 5 questions. Get 4 right to complete this article.

    Sign up for free to take the quiz and save your result.

  3. Every Product Needs a Home

    Read on Substack (opens in a new tab)

    Quiz: 4 questions. Get 3 right to complete this article.

    Sign up for free to take the quiz and save your result.

  4. Field Notes: the opening prompt

    Read on Field Notes (opens in a new tab)

Do

  1. ARCHITECTURE.md with a Security section

    File in the repository

    Add ARCHITECTURE.md to the root of your repository, with a section headed Security.

    The course looks for ARCHITECTURE.md in your repository, with a section headed Security.

  2. FEATURES.md in your repository

    File in the repository

    Add FEATURES.md to the root of your repository.

    The course looks for FEATURES.md in your repository.