Context engineering is deciding what a model sees on each run: which instructions, which reference material, which facts, and in what order. For the agent that drafts posts on this site, everything it could read adds up to about 107,000 words. The playbook it follows has it load about 20,000. The rest is left out on purpose, either because it loads only when needed, because a script reads it instead, or because a 70-word summary does the same job as a 4,700-word file. This post goes through those decisions with the word counts, so you can apply the same audit to your own agent.
Everything the agent could read comes to about 107,000 words
The agent runs in this website's repository, so in principle it can open any file in it. These are the files that bear on writing a post, counted on 17 November 2026:
| Source | Words | What it is |
|---|---|---|
CLAUDE.md | 304 | Project instructions, loaded at the start of every session |
marketing/README.md | 1,007 | The human's guide to the pipeline |
marketing/PLAYBOOK.md | 1,363 | The run's step-by-step instructions |
.agents/product-marketing.md | 882 | Audience, voice and the list of facts still unknown |
marketing/backlog.json | 4,688 | Every topic, approved or not |
| Six marketing skills with all their reference files | 61,204 | Writing, editing, SEO and social guidance |
| The 22 published post bodies | 32,279 | Everything already on the blog |
app/content.ts | 4,960 | Site copy the gate compares drafts against |

Loading all of it would cost a run somewhere around 140,000 tokens before it wrote a word, at a rough 1.3 tokens per English word. Most of it would also be irrelevant to the one post being written.
What a run loads is about a fifth of that
| Loaded | Words |
|---|---|
CLAUDE.md | 304 |
PLAYBOOK.md | 1,363 |
product-marketing.md | 882 |
| Four skill files (content strategy, copywriting, AI SEO, copy editing) | 13,516 |
| The list of AI writing tells the gate enforces | 3,384 |
| One topic, passed as JSON by the pre-flight script | about 70 |
| Titles and target keywords of the other posts | 376 |
The topic's first-hand material from marketing/inputs/ | typically 150 to 2,300 |
That totals roughly 20,000 words with a mid-sized material file. The sections below explain where each saving comes from.
The always-loaded file holds only what code cannot tell you
CLAUDE.md is the one file loaded into every session, whatever the task. Anthropic describes Claude Code as a hybrid: it drops these files into context up front and uses search tools like glob and grep to fetch everything else "just in time" (Anthropic, effective context engineering). Every word in that file is paid for on every run, so ours is short, and the three facts in it that matter most are ones the agent could not work out by reading the code:
- Marketing work must start by loading the marketing skills and the brand file, and must never invent statistics, customers or quotes.
- Which branch does what: work happens on one branch that builds a staging copy of the site, the live site changes only through a publish step the owner approves, and the branch of the old site must never be pushed.
- Posts are written as markdown and a workflow converts them into the files the site renders, so the converted files must never be edited by hand.
The second item is the clearest case, and we learned it the hard way. On 16 November the site moved to a new host and a new branch, while the old site's code and branch stayed in the repository looking perfectly ordinary. One of our own working sessions, which had started before the move, prepared a batch of posts against the old branch: the checks passed, the build passed, and none of it would ever have reached the live site. Three lines in the always-loaded file now say which branch is which, and nothing in the code itself could have told the agent.
What we keep out of it matters as much. The pipeline's history, the reasons behind past decisions and the status of each topic all live in other files that are read when relevant. A file loaded on every run is the worst place for a log that grows.
Skills load in three layers
The six marketing skills hold 61,204 words between them, and most of that is reference material. The AI SEO skill alone has 15 reference files totalling 19,556 words, on subjects from YouTube citations to multilingual search, none of which a typical post needs.
Anthropic's skill format handles this with what it calls progressive disclosure: an agent starts with only each skill's name and description, reads the main skill file when the task calls for it, and opens a reference file only if the skill points it there (Anthropic, Agent Skills). For our six skills, the first layer is 795 words of descriptions. The playbook then names the four skill files a run should read and the one reference file it must read, the list of writing tells, because the quality gate enforces that list and a writer who has not seen it will fail the gate.
One topic, not the backlog
The pre-flight script, next-topic.mjs, reads the 4,688-word backlog and hands the model one topic of about 70 words: the title, the target keyword, the audience, the angle and the files it needs. The model starts from that one topic. It touches the backlog file again only at the end, to change that topic's status.
The same thinking applies to the existing posts. The writer needs to know what the blog already covers so it does not repeat it, and the playbook gets that from a one-line grep of titles and target keywords, 376 words in place of 32,279. The check that a draft does not copy an existing post happens in the quality gate, which compares five-word phrases across every post in milliseconds. The same goes for the 4,960 words of site copy in app/content.ts: the playbook tells the writer not to read it, because the gate does.
This is the most useful move we know in context engineering: when a job is mechanical, give it to a script and keep it out of the model's context altogether. A model asked to check its draft against 32,000 words of other posts would spend its context reading them and still could not compare phrases as exactly as a short loop in code.
Snapshots beat logs
The marketing folder has a handoff file that the next session reads first. It opens by calling itself "a snapshot of what is true now" and asks whoever works on the pipeline to update it before they stop. The dated history of how the pipeline evolved sits in a separate file in marketing/inputs/, read only when a post is about that history, like the post on our blog pipeline. The handoff itself shows how hard the rule is to keep: by 17 November it had grown to about 1,800 words, with five dated status sections stacked one under another, each written by a session that was asked to update it and chose to add. It is due for the same trim we recommend below.
The split is deliberate. A log is useful for an investigation and wasteful as a starting point: a new session needs to know what is true, and it does not need the six things that were true before that. Every line of history in a first-read file is paid for by every session that follows, and it competes for attention with the lines that matter now.
Context rot is the reason to bother
Saving tokens is the obvious benefit and the smaller one. Anthropic describes "context rot": as the number of tokens in the context grows, a model's ability to recall information from it falls, which it says shows up across all models to some degree, and it frames good context engineering as finding "the smallest possible set of high-signal tokens" for the task (Anthropic, effective context engineering).
We saw the retrieval version of the same trade in our own RAG chunking test: bigger chunks found the right section more often but sent the model about seven times as much text, and the extra text is not free for the model to read past. The writing agent is the same problem from the other side. Each of the 86,000 words we leave out is a word that cannot distract it.
Auditing your own agent's context
- List every file and tool output your agent could load, with word counts. Most teams have never added them up.
- Mark what is loaded on every run. Keep that layer to facts the agent cannot discover from the code or data, and to rules whose violation is expensive.
- Move reference material behind a pointer: a skill description, a file name, a search the agent runs when it needs it.
- Find the mechanical checks the model is doing by reading, and give them to a script.
- Replace logs in first-read files with a current snapshot, and keep the history somewhere it is read on purpose.
- Count again after every change, because context grows back quietly as people add one more useful paragraph.
