Skip to content

feat(cli): add focus doctor command#56

Merged
samuelds merged 1 commit into
developfrom
feat/cli-doctor
Apr 24, 2026
Merged

feat(cli): add focus doctor command#56
samuelds merged 1 commit into
developfrom
feat/cli-doctor

Conversation

@samuelds
Copy link
Copy Markdown
Contributor

Summary

  • New focus doctor [--json] command auditing local FocusMCP state
  • 5 check categories: install integrity, manifest validity,
    dependency completeness, version drift, catalog reachability
  • Exit code 0 = healthy, 1 = at least one error
  • --json flag for machine-readable output

Changes

  • src/commands/doctor.ts — pure command with injected DoctorIO
  • src/commands/doctor.test.ts — 11 tests covering all 5 categories
  • src/bin/focus.ts — dispatch + inline DoctorIO adapter
  • src/adapters/npm-installer-adapter.ts — adds getBricksDir/getFocusDir

Test plan

  • pnpm test — 193 tests pass
  • focus doctor on healthy install → "No issues found"
  • focus doctor --json → valid JSON output

🤖 Generated with Claude Code

Audits local state across 5 categories:
- Install integrity (missing pkgs, no dist, bad manifest)
- Manifest validity (kebab name, semver, tools array)
- Dependency completeness (missing declared deps)
- Version drift (updates available in catalog)
- Catalog sources (reachability)

Exit 0 if no errors, 1 if errors. --json for machine output.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@samuelds samuelds merged commit 7b68dc4 into develop Apr 24, 2026
8 checks passed
@samuelds samuelds deleted the feat/cli-doctor branch April 27, 2026 12:36
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