Repository navigation
Description
Epic Summary
Research and replace Husky with Lefthook in lightspeedwp/.github, preserving existing Git-hook checks while evaluating earlier validation feedback for agentic coding workflows.
Retain CI as the final enforcement layer. Limit implementation to this repository; do not roll out changes across other repositories automatically.
Linked Child Issues/Stories/Tasks/PRs
Linked sub-issues:
- research: git-hooks - Research Lefthook compatibility and specification #3886
Verify the candidate version, installation behaviour, supported platforms and agent lifecycle integrations. Produce reviewed specification, plan and dependency-ordered tasks. - dependency: git-hooks - Replace Husky while preserving validation #3887
Migrate installation, dependencies and hook-health checks. Preserve lint-staged behaviour and pre-push validation of every pushed branch ref. - aiops: git-hooks - Pilot agent lifecycle validation and failure feedback #3888
Verify support for Claude Code, Codex, Cursor and Copilot. Document each supported agent’s failure-response contract and demonstrate feedback without assuming automatic correction. - test: git-hooks - Verify migration parity, installation and rollback #3889
Cover partial staging, exclusions, filenames with spaces, Windows paths, multiple pushed refs, deletions, tags and installation with lifecycle scripts disabled. - docs: git-hooks - Document Lefthook setup and CodeRabbit/CI handoff #3890
Update setup, troubleshooting, rollback and changelog documentation. Record SOP/configuration discrepancies without silently changing review or merge policy.
Sequence: research/specification first; Git-hook migration and agent pilot follow; validation precedes documentation and final handoff.
All five issues are linked as native sub-issues. No native blocking relationships have been created.
Milestones & Timeline
Phases: research and specification → migration and agent pilot → validation → documentation and maintainer review.
No dates or release commitment supplied.
Acceptance Criteria
- All linked stories/tasks completed
- Documentation and changelog updated
- Tests/QA complete
- PR description updated with relevant details
- Changelog entry prepared for PR (if applicable)
- Labels/types match org standards
- Existing staged-file checks, exclusions and partial-staging behaviour preserved
- Pre-push branch validation preserves argument and stdin handling
- Supported agent lifecycle integrations demonstrate actionable failure feedback; unsupported integrations documented
- Installation and rollback verified without weakening existing CI enforcement
Dependencies / Blockers
- Lefthook version and agent integration behaviour require verification.
scripts/check-git-hooks.mjscurrently assumes Husky installation paths.- Spec Kit configuration uses
.github/specs, but generated instructions contain conflicting rootspecs/guidance. - Live CodeRabbit configuration disables draft reviews, contrary to the supplied SOP.
- Pasted SOP-04 specifies 80% suggestion acceptance; the attached SOP-05 specifies greater than 60%. Policy reconciliation remains separate from migration implementation.
- Locked governance files and organisation-wide rollout are excluded.
Additional Context
Repository inspected at revision 65a013b25eb4f81806496965adad8e3f458a34e5.
Relevant paths: .husky/pre-commit, .husky/pre-push, .lintstagedrc.cjs, lib/hooks/pre-push, scripts/check-git-hooks.mjs, .coderabbit.yml and docs/HUSKY_PRECOMMITS.md.
Use the supplied SOP as supporting context, retaining the discrepancies above.
Definition of Ready (DoR)
- Epic goal and scope defined
- Linked stories/tasks listed
- Milestones and timeline mapped
- Dependencies/blockers identified
- Estimate added (if applicable)
- Stakeholders/approvers listed
Definition of Done (DoD)
- Approved by at least one maintainer
- All linked stories/tasks completed and closed
- Documentation/changelog updated
- QA and testing complete
- All child issues closed before epic can be closed
- Epic issue must be updated with latest status before being closed
Metadata
Metadata
Assignees
Type
Fields
Priority
Activity
linear-code commentedon Oct 10, 2026
GIT-2670