Guide · repo instructions for AI agents
Repo instructions for AI agents
Write repo instructions that help AI coding agents respect architecture, tests, security rules and local workflows.
Quick answer
Good repo instructions tell the agent how the project is structured, which files are sensitive, which commands prove a change and which behaviors are forbidden.
What to include
Include architecture boundaries, naming rules, auth and data access constraints, test commands, formatting commands, deployment risks and how to handle dirty worktrees.
What to avoid
Avoid vague quality rules that cannot be checked. Replace be careful with concrete constraints, file paths and commands.
FAQ
Should repo instructions mention security rules?
Yes. Agents need explicit boundaries for secrets, user-scoped data, auth, external inputs and destructive commands.