Skip to main content

Agent contract

The agent contract is the repo-specific rule set that keeps AI-assisted work safe and reviewable.

It should answer:

  • when the agent must stop and ask
  • what it must verify before claiming success
  • which areas are risky
  • which areas are safer to edit

Example

Good contract guidance:

  • Pause before changing public SDK behavior or wire contracts.
  • Run focused repo checks before claiming success.
  • Transport boundaries and migration-sensitive code are risky.

Bad contract guidance:

  • Be careful.
  • Run tests.
  • Avoid risky files.

Why this matters

Agents behave much better when the repo boundaries are explicit. A thin but specific contract is more useful than a long page of generic caution.

Next steps