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

  1. Setup command documented.
  2. Targeted test command documented.
  3. Full validation path documented.
  4. Path-specific rules documented where needed.
  5. Source-of-truth docs linked.
  6. 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

Supports

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

All sources (1)