Repository navigation
feat(doctor): kit doctor row — is the triage pre-commit gate actually wired? (increment 2d) - #332
Merged
Merged
Conversation
… wired? (increment 2d)
Adds a "triage pre-commit gates" posture row that reads the repo's actual
.git/hooks/pre-commit and reports, never silently, whether the commit-time
triage chokepoint is live:
pass both `kit triage check-deps` + `check-skills` present
warn the hook exists but wires only one gate (partial drift — e.g. installed
before check-skills shipped); names the missing gate
skip not a git repo, or the gates aren't wired (optional; run
`kit setup --recommended`)
Closes the loop with increment 2c: 2c installs the gates, 2d makes their
presence auditable. Pure decision (triageGateStatus) split out and unit-tested.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
|
✅ Docker image built successfully
|
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
Closes the loop on the triage delegate line. Increment 2c installs the triage pre-commit gates via
kit setup --recommended; 2d makes their presence auditable.kit doctornow reads the repo's actual.git/hooks/pre-commitand reports — never silently — whether the commit-time triage chokepoint is live.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)Changes Made
src/doctor.ts: new"triage pre-commit gates"posture row (checkTriageGates), wired after the deep-skill-scanner row. Verdicts:pass— bothkit triage check-deps+check-skillspresent in the pre-commit hookwarn— the hook exists but wires only one gate (partial drift, e.g. installed beforecheck-skillsshipped); names the missing gateskip— not a git repo, or the gates aren't wired (optional; suggestskit setup --recommended)triageGateStatus(hookContent)split out and exported for deterministic unit testing (no git required).Testing
Honest posture is the point: the row is always present, degrades to
skiprather than a falsepass, and a partial wiring surfaces aswarninstead of being swallowed.Test Coverage
Added new tests (4 pure
triageGateStatuscases + 1runDoctorintegration assertion)All tests pass (
npm test)npx tsc --noEmit— cleannpx eslint src— 0 errors (pre-existing warnings only)npm run build— cleannode scripts/test.mjs— 2810/2810 passPublic surface unchanged — no
public-surface.jsonregen neededManual Testing
kit doctorin a repo without the gates → row showsskipwith thekit setup --recommendedhint.kit setup --recommended→ row showspass(both gates present).check-deps→ row showswarn, namingcheck-skillsas missing.Breaking Changes
None / N/A.
Checklist
npm test)Performance Impact
Reviewer Notes
Same "never silent" doctrine as the other posture rows (identity keystore, exec-broker scope/runtime): an inactive or partially-wired gate is surfaced, not hidden behind a green check.
🤖 Generated with Claude Code
Generated by Claude Code