feat: add a doctor self-check so stale/broken installs self-diagnose#21
Merged
Conversation
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.
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.
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.4path bug made/pixelslopfail 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:.pixelslop-doctor-cache.json), fail-soft offline so a flaky network never blocks a scanThe skill runs it at preflight:
npx pixelslop@latest update" and stopstale: true→ surface the update once, then continueok→ proceed silentlySo a stale or broken install self-diagnoses instead of failing mid-scan.
Tests
1057 passing. New
doctor.test.jscovers 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.