# Rule: A2C pre-commit hooks (mandatory)

## Requirement

Every A2C-governed **software** repository must include **`a2c-pre-commit-hooks`** in `.pre-commit-config.yaml`, pinned by **release tag**, with **`check-changelog`** enabled at minimum.

## Pinning

- Use `rev: vX.Y.Z` from [a2c-pre-commit-hooks](https://gitlab.com/libesys/ai-workflows/a2c-pre-commit-hooks/-/tags)
- Do not pin to moving branches in production repos

## Additional hooks

Projects may add stack hooks (Ruff, Black, gitlint, etc.) but must not remove required A2C hooks without a project ADR exception.

## AI behavior

- **Bootstrap:** add A2C hooks repo + `check-changelog` when creating `.pre-commit-config.yaml`
- **Edit config:** preserve A2C hooks entry and required ids
- **Releases:** do not break changelog assumptions enforced by `check-changelog`
- **Exceptions:** require or propose a project ADR — do not silently omit hooks

## Canonical reference

[docs/workflow/a2c-pre-commit-hooks.md](../docs/workflow/a2c-pre-commit-hooks.md) and [ADR-0003](../docs/adr/0003-standardized-a2c-pre-commit-hooks.md).
