The AGENTS.md File
The AGENTS.md file located at the root of the repository is the master instruction set for all AI agents operating within the codebase.
The AGENTS.md file located at the root of the repository is the master instruction set for all AI agents operating within the codebase.
Purpose
AI models have vast general knowledge, but they lack the specific context of your project's architecture. AGENTS.md provides this context, instructing the AI on:
- Workspace Boundaries: Where specific types of code belong (e.g., UI components in
packages/ui, backend logic inpackages/backend/convex). - Tooling: Enforcing the use of
buninstead ofnpmoryarn. - Coding Style: Mandating declarative, functional TypeScript and specific naming conventions.
- Verification: Reminding the AI to run type checks (
bun run typecheck) and linters after making changes.
Best Practices
- Keep it Updated: As your project evolves, update
AGENTS.mdto reflect new architectural decisions or libraries. - Be Specific: Vague instructions are often ignored by AI. Be direct and clear about what is allowed and what isn't.
- Reference Sub-Guidelines:
AGENTS.mdserves as a routing layer, pointing the AI to more specific documents likepackages/backend/AGENTS.mdfor backend tasks.
AI Agent Developer Experience (DX)
The Leave Localhost Starter is heavily optimized for AI-assisted development. We provide specific files and guidelines that AI agents (like Cursor, Copilot, Claude Code, and Codex) consume to write better, more consistent code that adheres to our project conventions.
Convex Agent Guidelines
When working with Convex, it's crucial that AI agents understand the specific API patterns and best practices, as these can sometimes differ from the generalized React or Node.js knowledge the AI was trained on.