Objective
Extract the Git hook payloads and supporting hook-specific runtime logic from fast-forward/dev-tools into a dedicated fast-forward/git-hooks package.
Current Limitation
fast-forward/dev-tools currently owns the packaged hook templates, placeholder rendering, DevTools-specific config-path resolution, and installation workflow for Git hooks. That coupling makes the hook surface harder to evolve independently, prevents reuse outside DevTools, and keeps hook-specific packaging concerns mixed into a broader automation package.
Proposed Work
Create a focused fast-forward/git-hooks repository/package that owns the packaged hook payloads and the hook-specific runtime support currently embedded in DevTools. fast-forward/dev-tools should become a consumer and orchestrator of that package instead of the canonical home for hook internals.
The extraction may evaluate fast-forward/composer-installers when it helps standardize installation paths or package layout, but the initiative should not depend on adopting it unless it clearly simplifies the integration.
Scope
- Define the package boundary between
fast-forward/dev-tools and fast-forward/git-hooks.
- Move packaged Git hook templates and their dedicated rendering/path-resolution support into the extracted package.
- Update DevTools to consume the extracted package during
git-hooks and dev-tools:sync flows.
- Preserve the current GrumPHP behavior where hooks prefer a project-local
grumphp.yml and otherwise use the managed packaged fallback.
Non-goals
- Extract unrelated sync assets such as workflows, CODEOWNERS, licenses, docs scaffolding, or other consumer automation payloads in the same initiative.
- Redesign the supported Git hook behavior beyond what is required to complete the extraction safely.
- Require
fast-forward/composer-installers adoption if the extraction can stay simpler without it.
Acceptance Criteria
Delivery Criteria
Architectural / Isolation Criteria
- MUST: The core logic MUST be isolated into dedicated classes or services instead of living inside command or controller entrypoints.
- MUST: Responsibilities MUST be separated across input resolution, domain logic, processing or transformation, and output rendering when the change is non-trivial.
- MUST: The command or controller layer MUST act only as an orchestrator.
- MUST: The implementation MUST avoid tight coupling between core behavior and CLI or framework-specific I/O.
- MUST: The design MUST allow future extraction or reuse with minimal changes.
- MUST: The solution MUST remain extensible without requiring major refactoring for adjacent use cases.
- MUST: Argument and option resolution MUST be validated separately from command execution logic.
- MUST: Console formatting and rendering MUST stay separate from domain processing.
- MUST: Exit behavior, error messaging, and generated output MUST remain deterministic and testable.
Objective
Extract the Git hook payloads and supporting hook-specific runtime logic from
fast-forward/dev-toolsinto a dedicatedfast-forward/git-hookspackage.Current Limitation
fast-forward/dev-toolscurrently owns the packaged hook templates, placeholder rendering, DevTools-specific config-path resolution, and installation workflow for Git hooks. That coupling makes the hook surface harder to evolve independently, prevents reuse outside DevTools, and keeps hook-specific packaging concerns mixed into a broader automation package.Proposed Work
Create a focused
fast-forward/git-hooksrepository/package that owns the packaged hook payloads and the hook-specific runtime support currently embedded in DevTools.fast-forward/dev-toolsshould become a consumer and orchestrator of that package instead of the canonical home for hook internals.The extraction may evaluate
fast-forward/composer-installerswhen it helps standardize installation paths or package layout, but the initiative should not depend on adopting it unless it clearly simplifies the integration.Scope
fast-forward/dev-toolsandfast-forward/git-hooks.git-hooksanddev-tools:syncflows.grumphp.ymland otherwise use the managed packaged fallback.Non-goals
fast-forward/composer-installersadoption if the extraction can stay simpler without it.Acceptance Criteria
Delivery Criteria
fast-forward/git-hookspackage boundary is defined with explicit integration points for DevTools.fast-forward/dev-toolsinto the extracted package.fast-forward/dev-toolsconsumes the extracted package forgit-hooksanddev-tools:syncorchestration instead of owning the hook internals directly.grumphp.ymlpreference and packaged fallback behavior.Architectural / Isolation Criteria