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 26001: Use of Python and OOP for Git Hook Scripts

Title

Standardizing Git Hook Implementation with Python and Object-Oriented Programming (OOP)

Status

Accepted

Date

2026-01-06

Context

The project requires a robust mechanism for enforcing local development standards (e.g., commit message formats, linting, and branch naming conventions). Traditionally, Shell scripts are used for Git hooks, but they present several challenges as project complexity grows:

Decision

We will implement all Git hooks using Python following an Object-Oriented (OOP) architecture.

Key Implementation Requirements:

All Git hooks will be written in Python. These scripts must follow Object-Oriented Programming (OOP) principles to encapsulate hook logic. Furthermore, every hook must have a corresponding test suite written in pytest to ensure automation reliability and prevent regressions.

Consequences

Positive

Negative/Risks

Alternatives Considered

References

Participants

  1. Vadim Rudakov

  2. Senior AI Architect (Gemini 3 Flash)