The text the model sees when a genre skill runs, for two skills at
opposite ends of the pipeline's complexity: textbook-chapter-writer,
a single-context skill, and deep-research, a multi-agent one, and why
their prompts are built differently. Files are named so you can verify
a claim, not because you need to have read them.
AGENTS.md is the rulebook for drafting
content (the citekey invariant, the four layers, the gate); SOUL.md
is the one-page "why" and the tie-breaker. CLAUDE.md points to
both rather than inlining them..claude/skills/<name>/SKILL.md. Invoking one loads its
full body into the current context as more text, not a function
call. Detail a step needs only sometimes lives in references/ (or
.claude/skills-common/references/ when shared) and enters the
context only when a step reads it..claude/agents/<name>.md) and
only the inputs it is handed. Neither side sees the other's
conversation; only the return crosses back.content/dossiers/<draft path minus suffix>/
(scope.md, evidence.md, rejected.md, retrieval.md,
steering.md, sections.md), recording the judgment behind a draft
so a revision need not reconstruct it
(DRAFT-ITERATION.md).textbook-chapter-writerThis skill never dispatches a subagent, so its prompt is one stack that only grows, in this order:
Layers 1-3 are a fixed cost on every turn, whatever the skill. Layer 4
makes it this skill. Layers 5-6 arrive as the numbered steps need them
(step 0 pulls in acronyms.toml, step 3 a retrieval call). Layer 7 is
the only one that changes between invocations.
deep-researchdeep-research shares layers 1-3 with every skill. From layer 4 it
differs because it is not one context: one orchestrating context
dispatches and discards a dozen short-lived subagent contexts, each
built fresh from only the fields the orchestrator hands it.
Same first three layers as any skill, then:
The orchestrator never pastes a returned packet, or the dossier's evidence, into a later subagent's dispatch prompt. It hands over a pointer:
python -m chitragupta.draft dossier brief content/drafts/deep-research-<slug>.md --section "<heading>"
Pasted evidence is spent as output tokens once per writer, while a pointer costs about forty tokens and the writer reads the rows itself (TOKENS.md). The orchestrator's prompt then grows only by the transcribed, deduplicated dossier, not by every packet returned.
Each subagent from Phases 2, 5 and 7 gets a fresh context without the
orchestrator's conversation, AGENTS.md or SOUL.md. CLAUDE.md does
arrive verbatim, so the one hard rule reaches every subagent. Layers 3-4
are replaced by one file the harness loads as its system prompt:
Three roles fill that shape differently:
| Role | Defined in | Gets (step 3) | Returns (step 4) |
|---|---|---|---|
deep-research-interviewer (Phase 2, one per persona, parallel) |
.claude/agents/deep-research-interviewer.md |
TOPIC, PERSPECTIVE, ROUNDS, DRAFT PATH (for --log) |
Core position, cited claims, one unique insight, citekeys consulted and discarded with query and reason |
deep-research-writer (Phase 5, one per section, parallel) |
.claude/agents/deep-research-writer.md |
TOPIC, READER, GLOSSARY, its outline fragment, and a dossier brief --section command instead of evidence |
The section's cited prose, plus ### Sources added / ### Candidates discarded blocks |
peer-reviewer (Phase 7a, one per role, parallel, standard/deep only) |
.claude/agents/peer-reviewer.md |
The assembled draft, DRAFT PATH, and one lens (domain-accuracy, methodology-rigor, clarity-completeness, devils-advocate); never another critique |
A verdict (ready / needs revision / reject) plus severity-rated concerns |
SKILL.md forbids any subagent to write to content/dossiers/. A
subagent's context vanishes on return, so the orchestrator transcribes
what is worth keeping in the same phase, before moving on; a packet
left unread while the next is dispatched is how a discarded citekey's
reasoning is lost.
textbook-chapter-writer |
deep-research |
|
|---|---|---|
| Number of contexts | One, for the whole run | One orchestrator + up to ~10 subagents in flight (capped per references/report.md ยง1), across Phases 2/5/7 |
| Where the citekey invariant lives | Read once, from AGENTS.md |
Restated in each .claude/agents/*.md, since a subagent does not inherit AGENTS.md |
| How evidence reaches later steps | Stays in the one context that found it | Transcribed to the dossier, then handed on as a dossier brief pointer, never pasted |
| What ends the run's growth | The chapter is written once | Nothing: the orchestrator grows across all 7 phases; the saving is in what each subagent is handed |
| Citation stance | Optional: a chapter with none is valid | Mandatory: every claim has a real citekey or says "not found in the corpus" |
Both obey the same router and hard rule, and both write a dossier so a later revision need not redo this run's judgment. What differs is where rule and judgment live: in one growing context, or handed piece by piece into contexts built, used once and thrown away.
Underneath what a skill adds sits whatever the session already held: earlier turns, tool output, files read for other tasks. After an hour's work that is the largest part of the prompt, and nobody designed it.
It carries a risk the gate cannot close. A fabricated citekey is
caught every time, since an absent key is absent from the ledger. A
real citekey carried in from an earlier task resolves, renders and
passes python -m chitragupta.draft gate, while the claim it is
attached to may have nothing to do with the paper; python -m chitragupta.review verbatim scan measures something else.
The remedy is procedural, and
AGENTS.md
states it: start each draft in a fresh session. That is affordable
because the dossier holds the scope, evidence, rejections and steering
on disk (DRAFT-ITERATION.md), the same fact that
lets deep-research discard a subagent's context. A context is worth
clearing once the judgment inside it is written down elsewhere.