Repository navigation
feat(setup): recommended hardening wires the triage pre-commit gates (increment 2c) - #331
Merged
Merged
Conversation
…(increment 2c) The triage gates (`kit triage check-deps` / `check-skills`) were documented as pre-commit steps but nothing installed them — only `kit security scan-staged` was wired into the recommended pre-commit hook. This adds both triage gates to `applyRecommendedHardening`, so `kit setup --recommended` turns the documented fail-closed gates into enforced ones: a commit adding an untriaged dep or a staged skill without a fresh --deep triage is now blocked at commit time. Both gates are cheap no-ops when nothing relevant is staged. Updates the setup prompt and the COMMANDS / ENFORCEMENT docs to match. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
|
✅ Docker image built successfully
|
Merged
10 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adoption step for the triage delegate line. The gates
kit triage check-deps(existing) andkit triage check-skills(increment 2b) were documented as pre-commit steps — but nothing installed them.kit setup --recommendedwired onlykit security scan-stagedinto the pre-commit hook, so the triage chokepoint existed on paper only.This adds both triage gates to
applyRecommendedHardening, turning the documented fail-closed gates into enforced ones: a commit that adds an untriaged dependency, or stages a skill without a fresh--deeptriage, is now blocked at commit time.Type of Change
Related Issues
check-skills), feat(triage): kit doctor deep-skill-scanner detection + record --deep in triage log (increment 2) #329/feat(triage): kit doctor deep-skill-scanner detection + record --deep… #328 (thedeepflag), feat(triage): kit triage skill --deep — SkillSpector delegate, Stage-1 only (no LLM, no egress) #327 (the delegate)Changes Made
src/recommended.ts: the recommendedpre-commithook now runssecurity scan-staged+triage check-deps+triage check-skills. Doc comment updated to explain the enforcement rationale.src/commands/setup.ts: the--recommendedconfirmation prompt now names the triage gates it wires.COMMANDS.mdlistskit triage check-skills;ENFORCEMENT_AND_AUDIT.mdnotes both triage gates are wired bykit setup --recommended.Testing
Both gates are cheap no-ops when nothing relevant is staged, so the addition doesn't disturb ordinary commits — it only fires on newly-added deps or staged skills.
Test Coverage
Updated existing tests (
recommended.test.tsnow asserts both triage gates land in the generated pre-commit hook)All tests pass (
npm test)npx tsc --noEmit— cleannpx eslint src— 0 errors (pre-existing warnings only)npm run build— cleannode scripts/test.mjs— 2805/2805 passPublic surface unchanged — no
public-surface.jsonregen neededManual Testing
kit setup --recommendedin a repo →.git/hooks/pre-commitcontains all three gate commands.package.jsonand commit → blocked bycheck-deps.--deeptriage and commit → blocked bycheck-skills.Breaking Changes
None / N/A. Only affects users who opt into
--recommended, and the gates no-op unless a dep/skill is actually staged.--no-verifyremains the audited escape hatch (logged to.kit-skipped-commits.jsonl).Checklist
npm test)Performance Impact
Reviewer Notes
This closes the same "exists but nothing installs it" gap that
--broker-gateclosed for the runtime egress/fs gates (#71). The gates were always designed to run at commit time; this just makes the recommended profile actually wire them.🤖 Generated with Claude Code
Generated by Claude Code