Skip to content

feat: add a doctor self-check so stale/broken installs self-diagnose#21

Merged
gabelul merged 1 commit into
mainfrom
feat/doctor-selfcheck
Jun 16, 2026
Merged

feat: add a doctor self-check so stale/broken installs self-diagnose#21
gabelul merged 1 commit into
mainfrom
feat/doctor-selfcheck

Conversation

@gabelul

@gabelul gabelul commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Borrows screenslop's "doctor-in-the-skill" pattern (the genuinely useful idea from that project), scoped to pixelslop's existing installer.

Why

The 0.3.4 path bug made /pixelslop fail in other projects with an opaque "tools.cjs not installed" — the agent had no way to know the install was stale/broken and should update. Pixelslop already couples binary+skill in one install (so it doesn't need screenslop's decoupling), but it had no self-diagnosis in the skill flow. Now it does.

What

pixelslop-tools doctor:

  • reports the install version (manifest in an installed tree, package.json in the repo)
  • confirms the tool is reachable
  • flags when a newer version is published — a throttled npm check (cached 24h in .pixelslop-doctor-cache.json), fail-soft offline so a flaky network never blocks a scan

The skill runs it at preflight:

  • can't run → "install looks broken or incomplete, run npx pixelslop@latest update" and stop
  • stale: true → surface the update once, then continue
  • ok → proceed silently

So a stale or broken install self-diagnoses instead of failing mid-scan.

Tests

1057 passing. New doctor.test.js covers version reporting, reachability, and stale detection (seeded cache, no network). The discoverability drift-guard now also asserts the preflight runs doctor and tells the user how to update.

Ships as 0.3.5.

When an install is stale or broken (like the relative-path bug fixed in 0.3.4),
/pixelslop failed opaquely with "tools.cjs not installed" and the agent had no
way to know it should update. This borrows screenslop's doctor-in-the-skill
pattern.

`pixelslop-tools doctor` reports the install version, confirms the tool is
reachable, and flags when a newer version is published (a throttled npm check,
cached 24h, fail-soft offline). The skill runs it at preflight: if it can't run,
it tells the user the install is broken and to run `npx pixelslop@latest update`;
if it reports stale, it surfaces the update once and continues. Drift-guarded,
and tested including stale detection via a seeded cache so no network is touched.
@gabelul gabelul merged commit 92e20fb into main Jun 16, 2026
3 checks passed
@gabelul gabelul deleted the feat/doctor-selfcheck branch June 16, 2026 10:38
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.

1 participant