Repository navigation
fix(instructions): require Lefthook only where the repo configures it - #263
Conversation
The devsecninja-conventions instruction and the commit-and-release skill made `mise exec -- lefthook run pre-commit` mandatory before every PR and commit. Repos that don't configure Lefthook, such as net-worth-calculator, can't satisfy that. Keep the Lefthook gate for repos with a Lefthook config and otherwise run the repo's documented lint, hook and test commands. Closes #261 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the changes making Lefthook requirements conditional on repository configuration.
No open issues 🎉
What changed in this PR
This PR resolves #261 by making Lefthook checks conditional on repository configuration in the shared APM instruction and release skill, allowing consumer repositories to use their documented checks.
Changes:
- Require Lefthook only in repositories that configure it; otherwise use documented lint, hook, and test commands.
- Preserve execution-authorization requirements and the prohibition on committing or opening PRs with known-failing checks.
- Clarify that agents should not install Lefthook solely to satisfy these instructions.
| File | Description |
|---|---|
.apm/skills/commit-and-release/SKILL.md |
Makes step 4 conditional on Lefthook configuration while retaining repository tests. |
.apm/instructions/devsecninja-conventions.instructions.md |
Aligns pre-PR and pre-commit requirements with each repository’s configured tooling. |
Review effort: Balanced
SkillSpector report: ✅ PassedSkillSpector 2.13.4 static scan (no LLM, no network) of 22 AI primitive targets at
Top findings
Showing 10 of 83 findings, blocking first; see Code Scanning for all. Analysis limitations (37)
Showing 10 of 37 limitations; see the run summary for all. Full results: Code Scanning alerts · workflow run and full reports |
Summary
The
devsecninja-conventionsinstruction mademise exec -- lefthook run pre-commitmandatory before every PR and every commit. Copilot flagged this on DevSecNinja/net-worth-calculator#57: that repo has no Lefthook config and documents its own checks inCONTRIBUTING.md, so an agent can't follow the rule there.Changes
devsecninja-conventions(pre-PR checks and "Tooling and files"): repos with a Lefthook config still must runmise exec -- lefthook run pre-commitplus their test command. Other repos run the lint, hook and test commands they document, and agents shouldn't add Lefthook just to satisfy the rule. Never opening a PR with failing checks and the execution-authorization gate stay as they were.commit-and-releaseskill, step 4: the same condition, since it repeated the unconditional Lefthook step.INDEX.mdand the README index are unchanged because no description or category changed. The.github/copies andapm.lock.yamlhashes get updated by the usual materialize PR.Validation
bash tests/validate-prompts.shandscripts/check-index.shpass in an isolated copy.Rollout
After the next release, config-sync delivers the updated instruction to consumer repos and refreshes DevSecNinja/net-worth-calculator#57.
Closes #261
Summary by CodeRabbit