AI Help
What should I put in a repository guide so an AI agent runs the right build commands?
Write concise repository instructions with the actual setup, build and relevant test commands, including their working directories.
Steps to follow
- Verify the commands yourself against the repository scripts and lockfile. Record required runtime and package manager versions.
- Put project-wide guidance in AGENTS.md and scoped package guidance in the appropriate subdirectory where supported.
- Include expected prerequisites and explain which checks apply to common changes. Keep guidance current when scripts change.
Example in practice
Illustrative example. A frontend package can document npm run typecheck from its own directory while the root guide identifies the monorepo setup command.
Related AI help
- How do I check for unrelated formatting changes in an AI-generated patch?
- How do I verify that an AI-generated PR description matches the actual diff?