Instructions
Instructions provide persistent guidance so agents follow your conventions without repeating them in every session. Keep personal preferences in your own settings, company-wide standards in organization instructions, and codebase rules alongside the code in AGENTS.md.
Instruction layers
| Layer | Where it lives | Scope |
|---|---|---|
| Current request | Your message in the session | Applies to the current task or session. |
| Personal instructions | Settings → Preferences → AI → Instructions | Applies to your own sessions across the workspace. |
| Organization instructions | Settings → General → AI → Organization instructions | Applies across the entire workspace. Requires an owner or admin to edit. |
| Repository rules | AGENTS.md at the repository root or in subdirectories | Applies when working in that repository or directory. |
Personal and organization instructions
Use Personal instructions for individual working preferences, such as formatting, reporting style, or verification expectations. Use Organization instructions for standards every member and agent should follow, such as naming conventions or release policies.
- Personal instructions: open Settings → Preferences → AI → Instructions.
- Organization instructions: open Settings → General → AI → Organization instructions (owners and admins only).
Repository rules (AGENTS.md)
AGENTS.md is a plain Markdown file for codebase-specific guidance. Place it at the repository root for project-wide rules, or in subdirectories to scope instructions to a specific package or service.
# Repository instructions
## Style and structure
- Keep changes surgical and match existing patterns in surrounding files.
- Return structured errors rather than throwing raw strings.
## Verification
- Run the package test suite before opening a pull request.
- Report the exact commands run and any checks that could not run.Nested AGENTS.md files combine with parent directories when the agent works in that area of the codebase.
Precedence and boundaries
When directions conflict, the agent follows this order from highest to lowest priority:
- Your current message in the session
- Personal instructions
- Organization instructions
- Repository files (
AGENTS.md)
Repository files tell agents how to work in a codebase. They never grant new external permissions or override permissions and approval policies.
AGENTS.md and tell me which checks apply to a docs-only change. Don't edit anything yet.Best practices
- Be concrete: "List any checks you could not run" produces consistent behavior; vague guidance like "Be thorough" does not.
- Keep rules focused: avoid duplicating full style guides or common tool usage the agent already knows.
- Pick the right tool: use Skills for repeatable multi-step procedures and Memory for decisions and facts that evolve over time.
- Keep secrets out: never store tokens or passwords in instructions—use Secrets instead.