Skip to content

feat(triage): kit doctor deep-skill-scanner detection + record --deep in triage log (increment 2) - #329

Merged
sandstream merged 1 commit into
mainfrom
claude/web-kit-status-sync-p6fg9a
Jul 11, 2026
Merged

sandstream merged 1 commit into
mainfrom
claude/web-kit-status-sync-p6fg9a

Conversation

@sandstream

Copy link
Copy Markdown
Owner

Description

Increment 2 of the SkillSpector delegate (kit triage skill --deep, landed in #327). This wires the delegate into two places so its presence and use are observable — closing the loop between "the deep scanner exists" and "the operator can see whether it ran."

Type of Change

  • New feature (non-breaking change that adds functionality)

Related Issues

Changes Made

  • kit doctor deep-skill-scanner row (src/doctor.ts): checkDeepSkillScanner() reports pass when the skillspector binary is installed and skip when it's absent (it's an optional deep-scan delegate, not a required tool — never a fail). Wired into allChecks ahead of the control-plane row.
  • skillspectorStatus() (src/skillspector-delegate.ts): probes the delegate (mise-first, then PATH) and its --version using the same scrubbed env as a scan, so detection itself can never touch a provider or activate Stage 2.
  • Triage log deep flag (src/commands/triage.ts): TriageLogEntry.deep?: boolean; recordTriageRun(type, target, sandbox, deep=false) records whether a run used the deep delegate, so the audit trail distinguishes built-in-only triage from delegate-backed triage.

Testing

Zero-LLM / no-egress invariant stays enforced and tested: scrubbedEnv strips every SKILLSPECTOR_* and provider-key var, stage1Args never carries an LLM/provider flag, and an absent binary yields a fail-closed unavailable/skip (never a silent deep-clean).

Test Coverage

  • Added new tests (skillspectorStatus absent-binary case; doctor row)

  • All tests pass (npm test)

  • npx tsc --noEmit — clean

  • npx eslint src — 0 errors (pre-existing warnings only)

  • npm run build — clean

  • node scripts/test.mjs — 2796/2796 pass

  • Public surface unchanged (help-text only; no new subcommands) — no public-surface.json regen needed

Manual Testing

  1. kit doctor with skillspector absent → deep-skill-scanner row shows skip (optional).
  2. Install skillspector, re-run → row shows pass with version.
  3. kit triage skill --deep <target> → triage log entry carries deep: true.

Breaking Changes

None / N/A

Checklist

  • My code follows the project's style guidelines
  • All new code has test coverage
  • All tests pass locally (npm test)
  • No new warnings or errors introduced
  • No hardcoded secrets or sensitive data
  • Code has been self-reviewed

Performance Impact

  • No performance impact

Reviewer Notes

Fail-closed throughout: the delegate is an optional deep pass. kit doctor degrades honestly (skip, not fail) when it's absent, and the triage log's deep flag makes it auditable whether any given run was delegate-backed or built-in-only.

🤖 Generated with Claude Code


Generated by Claude Code

… in triage log (increment 2)

Second increment of the triage-skill delegate (design note: kit-research
pillar-triage-skill-delegate-5.0.md).

- skillspector-delegate: skillspectorStatus() detects the optional delegate
  (installed? version?) probed with the SAME scrubbed env as a scan, so detection
  can never touch a provider either.
- kit doctor: new "deep skill scanner" row — pass (installed → deep static skill
  triage available) / skip (not installed → --deep uses built-in checks). Optional
  delegate, so absence is a skip, never a failure. States plainly that kit never
  runs SkillSpector's LLM stage.
- triage log: record `deep` on the triage entry so a future pre-commit gate can
  require a deep scan for skills.

6 → 8 delegate tests (+ status-when-absent) and a doctor deep-row test. Full
suite 2796/2796. Public surface unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
@github-actions

Copy link
Copy Markdown

✅ Docker image built successfully

  • CLI image: docker.io/sandstream/kit:test

@sandstream
sandstream merged commit 649f0c2 into main Jul 11, 2026
33 checks passed
@sandstream
sandstream deleted the claude/web-kit-status-sync-p6fg9a branch July 11, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants