Skip to content

feat: add openspec binary dependency check to doctor - #133

Merged
androidand merged 1 commit into
mainfrom
feat/doctor-checks-openspec-binary
Aug 19, 2026
Merged

feat: add openspec binary dependency check to doctor#133
androidand merged 1 commit into
mainfrom
feat/doctor-checks-openspec-binary

Conversation

@androidand

Copy link
Copy Markdown
Owner

Closes #132

specsync hard-depends on the openspec CLI binary at runtime, but specsync doctor never checked whether it was actually installed — a user could skip openspec init and hit a bare "executable file not found" failure deep inside an unrelated command instead of an upfront diagnostic.

  • checkOpenspecBinary(): probes exec.LookPath("openspec"), best-effort parses openspec --version. Never errors — "not found" and "unparseable version" are both reportable states.
  • doctor claude: surfaces a missing binary as a warning with an openspec init recommendation; additive-only JSON fields.
  • doctor install: gains an "External Dependencies" section, and its --json flag — previously silently ignored — now actually emits JSON.
  • Tests cover found+parseable, found+unparseable, found+failing --version, and absent.

See openspec/changes/doctor-checks-openspec-binary/ for the full proposal/design/spec.

- checkOpenspecBinary() probes exec.LookPath("openspec") and best-effort
  parses `openspec --version`; never errors, degrades to found/no-version.
- doctorClaude attaches Dependencies to DoctorResult, downgrades status to
  warning and recommends `openspec init` when missing, prints a
  Dependencies section in prose output.
- doctorInstall gains an External Dependencies section and a JSON branch
  (previously --json was silently ignored).
- Additive-only JSON fields; existing DoctorResult/InstallationInfo fields
  unchanged.
- Add unit tests for checkOpenspecBinary (present+parseable,
  present+unparseable, present+failing --version, absent) and additive-field
  guards for doctor claude/install --json.
- Update site/features.json and proposal.md release note.

(#132)
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying specsync with  Cloudflare Pages  Cloudflare Pages

Latest commit: c62e063
Status: ✅  Deploy successful!
Preview URL: https://4151a688.specsync.pages.dev
Branch Preview URL: https://feat-doctor-checks-openspec.specsync.pages.dev

View logs

@androidand
androidand merged commit e37d808 into main Aug 19, 2026
2 checks passed
@androidand
androidand deleted the feat/doctor-checks-openspec-binary branch August 19, 2026 12:15
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.

doctor-checks-openspec-binary

1 participant