Protocol
Put the real build and validation path in repository instructions
The repository should teach a new contributor how correctness is checked.
When it fits
- An agent guesses how to build or test the project and either wastes time or validates the wrong thing.
When to avoid it
- Instructions can be wrong or stale; CI and human review remain independent checks.
Why it matters
Document the minimal authoritative setup, build, test, lint and targeted validation commands the agent should use, including path-specific exceptions. Point to the source of truth rather than copying huge manuals into the prompt. Keep the instructions current when CI changes.
Steps
- Setup command documented.
- Targeted test command documented.
- Full validation path documented.
- Path-specific rules documented where needed.
- Source-of-truth docs linked.
- Instructions updated with CI changes.
An example
AGENTS.md tells an agent to run one fast unit suite for local iteration and the full contract validator before a PR is considered complete.
Check your result
The agent can state and execute the same validation path a human maintainer expects.
Keep this limit in mind
- Instructions can be wrong or stale; CI and human review remain independent checks.
Evidence and sources
GitHub repository instructions can provide agents with project-specific build, test and validation guidance, including repository-wide, path-specific and AGENTS.md instructions.
Instruction files improve context but are not a security boundary or substitute for permissions.
Adding repository custom instructions for GitHub Copilot · Repository custom instructions