Skip to content

feat(#3): add doctor command for diagnostics#31

Closed
KalebCole wants to merge 1 commit intomainfrom
feat/doctor
Closed

feat(#3): add doctor command for diagnostics#31
KalebCole wants to merge 1 commit intomainfrom
feat/doctor

Conversation

@KalebCole
Copy link
Copy Markdown
Owner

Summary

  • Adds partiful doctor command that runs diagnostic health checks
  • Checks: config file, auth tokens, token refresh, API reachability, Firestore reachability, Node.js version
  • API 500s are warnings (not failures), 401s show actionable fix messages
  • Exit code 0 if all critical checks pass, 1 if any fail

Closes #3

Test plan

  • node partiful doctor with valid auth shows all green checks
  • node partiful doctor with missing config shows actionable error
  • node partiful doctor when API is down shows warning but still exits 0

🤖 Generated with Claude Code

Adds `partiful doctor` that checks config file, required auth fields,
token refresh, Partiful API, Firestore API, and Node.js version.
API server errors (5xx) are reported as warnings, not failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@KalebCole
Copy link
Copy Markdown
Owner Author

Code Review Spec — PR #31 (doctor)

[Important] Missing diagnose/check aliases

skill.md alias table lists diagnose and check as aliases for doctor, but the CLI switch only has case 'doctor':.

Fix: Add case 'diagnose': case 'check': fall-through in the command switch, or remove them from the skill alias table.

[Suggestion] Early-exit duplication

Two early-exit paths (config missing, invalid JSON) duplicate Node.js version print + summary logic.

Fix: Extract a doctorEarlyExit(failures) helper to DRY up the duplicated exit paths.

@KalebCole
Copy link
Copy Markdown
Owner Author

Stale — doctor command already shipped in PR #43. This PR modifies the old monolith file which was refactored.

@KalebCole KalebCole closed this Mar 30, 2026
@KalebCole KalebCole deleted the feat/doctor branch March 30, 2026 01:56
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.

[P2] Doctor command for diagnostics

1 participant