Skip to content

Doctor: Add Claude Code CLI check #3

Closed

Description

@admarble

Problem

sequant doctor doesn't verify that the Claude Code CLI (claude) is installed. This is a critical dependency - without it, none of the skills work.

Users who run sequant init may get a green doctor check but then fail when trying to use /spec or /exec.

Proposed Solution

Add a doctor check that verifies:

  1. claude command exists in PATH
  2. Optionally: claude --version returns a valid version

Acceptance Criteria

  • Doctor checks for claude CLI presence
  • Clear error message if missing with install link
  • Check is marked as critical (causes failure, not warning)

Priority

High - this is the core dependency for all sequant functionality.

Activity

  1. added
    enhancement
    on Jan 9, 2026
  2. admarble commented on Jan 9, 2026

    @admarble
    ContributorAuthor

    📋 Plan Review: Doctor Claude Code CLI Check

    Acceptance Criteria Checklist

    • AC-1: Doctor checks for claude CLI presence

      • Verification: Unit test with mocked commandExists
      • Pattern: Same as existing GitHub CLI check
    • AC-2: Clear error message if missing with install link

      • Verification: Unit test checks output contains install URL
      • URL: https://docs.anthropic.com/en/docs/claude-code
    • AC-3: Check is marked as critical (causes failure)

      • Verification: Unit test confirms process.exit(1) called
      • Status: "fail" not "warn"

    Implementation Plan

    Phase Step Files
    1 Add Claude CLI check after GitHub CLI check src/commands/doctor.ts
    2 Add unit tests following gh CLI test patterns src/commands/doctor.test.ts
    3 Run tests & build, manual verification -

    Assumptions to Validate

    Open Questions

    1. Version check - Skip for MVP? (Recommended: Yes, presence check is sufficient)

    Effort Estimate

    • Complexity: Low - follows established patterns
    • Existing worktree: feature/3-doctor-add-claude-code-cli-check (ready for /exec)

    Generated by /spec workflow

  3. admarble commented on Jan 10, 2026

    @admarble
    ContributorAuthor

    📋 Updated Plan Review: Doctor Claude Code CLI Check

    Acceptance Criteria with Verification

    AC Description Verification Status
    AC-1 Doctor checks for claude CLI presence Unit test with mocked commandExists ⏳
    AC-2 Clear error message if missing with install link Unit test verifies URL in output ⏳
    AC-3 Check is marked as critical (causes failure) Unit test confirms process.exit(1) ⏳

    Verification Criteria

    AC-1: CLI Presence Check

    • Given: commandExists("claude") returns true/false
    • When: doctorCommand({}) executes
    • Then: Output shows "Claude Code CLI" with appropriate pass/fail status

    AC-2: Install Link

    • Given: CLI not found
    • When: Doctor runs
    • Then: Output contains https://docs.anthropic.com/en/docs/claude-code

    AC-3: Critical Failure

    • Given: CLI not found, all other checks pass
    • When: Doctor runs
    • Then: Status is "fail" (not "warn"), process.exit(1) called

    Implementation Plan

    Phase Step Files
    1 Add Claude CLI check after GitHub CLI check src/commands/doctor.ts
    2 Add unit tests following gh CLI test patterns src/commands/doctor.test.ts
    3 Run tests & build, manual verification -

    Assumptions Validated

    Open Questions

    1. Version check - Skip for MVP? Recommendation: Yes, presence check is sufficient

    Recommended Workflow

    Phases: exec → qa
    Quality Loop: disabled
    Reasoning: Low-complexity feature following established patterns

    Ready for Execution

    Worktree exists: feature/3-doctor-add-claude-code-cli-check


    Generated by /spec workflow

  4. added a commit that references this issue on Jan 10, 2026
  5. admarble commented on Jan 10, 2026

    @admarble
    ContributorAuthor

    🚀 Implementation Complete

    AC Coverage Summary

    AC Description Status
    AC-1 Doctor checks for claude CLI presence ✅ Done
    AC-2 Clear error message if missing with install link ✅ Done
    AC-3 Check is marked as critical (causes failure) ✅ Done

    Files Changed

    Checks Run

    • ✅ npm test - 159 tests pass (including 3 new Claude CLI tests)
    • ✅ npm run build - TypeScript compilation successful

    PR Created

    PR #46: #46

    Implementation Notes

    • Check follows existing GitHub CLI pattern
    • Uses commandExists("claude") from lib/system.js
    • Status is "fail" (critical), not "warn"
    • Error message includes install URL: https://docs.anthropic.com/en/docs/claude-code

    Generated by /exec workflow

  6. admarble commented on Jan 10, 2026

    @admarble
    ContributorAuthor

    🔍 QA Review for Issue #3

    AC Coverage

    AC Description Status Notes
    AC-1 Doctor checks for claude CLI presence ✅ MET Uses commandExists("claude"), same pattern as GitHub CLI check
    AC-2 Clear error message if missing with install link ✅ MET Message includes https://docs.anthropic.com/en/docs/claude-code
    AC-3 Check is marked as critical (causes failure) ✅ MET Status is "fail" (not "warn"), triggers process.exit(1)

    Coverage: 3/3 AC items fully met


    Quality Metrics

    Metric Value Status
    Type issues (any) 0 ✅ OK
    Deleted tests 0 ✅ OK
    Files changed 2 ✅ OK
    Lines added +58 -
    Lines deleted -2 -

    Code Review

    Strengths:

    • Follows existing patterns exactly (mirrors GitHub CLI check structure)
    • Uses existing commandExists from lib/system.js - no code duplication
    • Test coverage is comprehensive (3 tests)
    • All 16 doctor tests pass

    Minor Items (non-blocking):

    • Install URL redirects (301) but resolves correctly
    • Check number comments skip from 10 to 12 (cosmetic)

    Verdict: ✅ READY_FOR_MERGE

    Implementation fully satisfies all acceptance criteria with clean code and comprehensive test coverage.

    Next Steps

    1. Merge PR feat(#3): Add Claude Code CLI check to doctor command #46
    2. Optionally run /docs 3 for feature documentation

    Generated by /qa workflow

  7. added 2 commits that reference this issue on Jan 10, 2026
  8. added 2 commits that reference this issue on Jan 18, 2026
  9. added a commit that references this issue on Sep 9, 2026
  10. added 2 commits that reference this issue on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions