Agent Instructions
One file at the root. Everything else follows from it.
Foundation gives the repo structure. Agent Instructions tells the agent which parts of that structure matter, when to load them, and which defaults to stop trusting.
This topic does not teach a better one-off prompt. It turns project-specific guidance into reviewed, source-controlled input available to later sessions and compatible vendors.
These chapters cover AGENTS.md, the instruction hub it points into, instructions that actually change agent behavior, and the limits imposed by the context window. Hooks belong here too, but as an optional enforcement layer, not the starting point.
Chapters
- AGENTS.md: The Entry Point: the TOC pattern, what goes in it, vendor pointers, and why it has to stay short
- Agent Instruction Hub:
.agents/instructions/,.agents/skills/,.agents/hooks/, one folder for all agents - Instructions That Work: specific instructions, negative constraints, architecture boundaries, and how to test whether they work
- Skills, Commands, and Hooks: when to choose each type, how to write skills that run reliably, and the instruction/skill/hook triangle
- Context Window Management: why context fills, short sessions, selective loading, subagents, and the INDEX as context economy