# Pre-commit policy checklist

Use when bootstrapping or reviewing an A2C-governed software repository.

## Configuration

- [ ] `.pre-commit-config.yaml` exists and matches the project's language or stack
- [ ] **`a2c-pre-commit-hooks`** is included, pinned by release tag, with **`check-changelog`** enabled
- [ ] Hook set is shared, versioned, and treated as standard engineering rails
- [ ] Stack profile or A2C template was reused where applicable
- [ ] `pre-commit install` and `pre-commit install --hook-type commit-msg` (if gitlint is used) have been run once per clone

## Day-to-day enforcement

- [ ] Local hooks run on **staged / changed files** at commit time (default)
- [ ] CI runs pre-commit on **changed files** for the MR or commit — not `--all-files` by default
- [ ] Commit checklist and development workflow document the changed-file model

## Deliberate full-tree cleanup

- [ ] Team knows `pre-commit run --all-files` is for **explicit** repository-wide cleanup only
- [ ] Full-tree runs are planned when adding hooks, tightening rules, or onboarding legacy code
- [ ] Cleanup results land in a dedicated commit; normal changed-file enforcement resumes afterward

## Performance

- [ ] Hooks are fast enough for frequent commits
- [ ] Heavy or slow test suites are outside the commit path unless explicitly adopted

## Related

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