What is an agent instruction file?

Definition

An agent instruction file gives a coding agent concise project-specific direction that cannot be inferred safely from source alone. It can define scope, approval boundaries, naming, architecture, security rules, required checks, documentation duties, and how narrower directory instructions inherit or override broader ones.

The file should contain durable guidance rather than temporary plans or duplicated implementation detail. It must be maintained with the project, kept internally consistent, and written so that a future agent can verify requirements through current source and executable checks.

ELI5

An agent instruction file is a saved guide that tells an AI agent how work in a project should be done. It prevents the user from repeating the same important preferences in every conversation.

For example, a design instruction file can say to avoid decorative gradients, use the project's spacing scale, and compare the rendered page with supplied references before finishing.

What belongs in an agent instruction file?

Include durable scope, safety, approval, architecture, naming, workflow, verification, documentation, and repository-specific constraints.

Should an agent instruction file describe every implementation detail?

No. Details that can be inspected from current source should remain there so the instruction file does not become a stale duplicate.

  1. Theo Browne beside the words Delete the Memory
  2. Portrait of Greg Isenberg beside the words Build AI Employees
  3. Hassan El Mghari beside the words Design Taste Beats AI Slop
  4. Words Agent Ideas Can Spread above a simplified chain of connected nodes
  5. Portraits of David Ondrej, Alex Lieberman and Dan Zakon beside the words Context Is the System
    Context as Code for Agentic Engineering
    David Ondrej51m 54s2 VIEWS
  6. Christopher Burns beside the words Make Libraries Visible to AI Agents
  7. Greg Isenberg in an attention-blue top and Michael Shimeles in an off-white top on a black background beside the headline “BUILD A SOFTWARE FACTORY”.
  8. Igor Pogany beside the words Five Skills Better AI
  9. Philipp Schmid in a light attention-blue top on a black background beside the headline “FILES REPLACE AGENT CODE”.
Definition card for agent instruction file: What is an agent instruction file?

An agent instruction file is a repository document that defines durable rules, workflow constraints, conventions, and verification expectations for coding agents.