Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

ADR 26002: Adoption of the Pre-commit Framework

Title

Using the pre-commit package to manage and orchestrate Git hook execution.

Status

Accepted

Date

2026-01-09

Context

While ADR 26001 established Python and OOP as the standard for writing hook logic to improve testability and maintainability, we require a standardized way to distribute and execute these hooks across the team.

Currently, a configure_repo.sh script exists to manually install the pre-commit package and set up the Git hooks. Without a formal framework:

Decision

We will adopt the pre-commit framework as our primary hook manager.

  1. Configuration: All hooks will be defined in a .pre-commit-config.yaml file at the root of the repository.

  2. Local Hooks: Our existing Python scripts (e.g., sync_and_verify.py, format_string.py) will be integrated as repo: local hooks within the config.

  3. Installation: The configure_repo.sh script will remain the entry point for developers, using uv to install the dependency and execute pre-commit install.

Consequences

Positive

Negative

Alternatives

References

Participants

  1. Vadim Rudakov

  2. Gemini (AI Thought Partner)