# Completion contract for agent-written changes

Paste this section into the repository's existing `AGENTS.md`, `CLAUDE.md`, or
equivalent instruction file. Keep any repository-specific build and test commands
beside it.

```markdown
## Completion contract

For every behavior-changing task:

1. Restate the acceptance criterion as an externally observable result before
   editing code.
2. Identify the production entry point that must produce that result.
3. Identify or add a test that reaches the production entry point. A test that
   writes the expected database state directly does not prove the application
   produces that state.
4. Do not delete, skip, weaken, or replace an assertion only to make a check pass.
   Report any required test-contract change explicitly.
5. Run the repository's focused test for the changed behavior, then run the
   repository's required local gate.
6. Record the exact commands and observed results. Do not replace command output
   with “tests pass.”
7. Report gaps, skipped checks, shared-state dependencies, and unverified claims.

For authorization, billing, tenant isolation, consent, and irreversible state
changes, do not mark the task complete until an independent reviewer has observed:

- the responsible test fail after a deliberate, reversible break in the
  production behavior; and
- the same test pass after the production behavior is restored.

The implementation session cannot act as the independent reviewer.
```
