Skip to content

fix(cli): doctor reports "healthy" on a project that was never set up #465

Description

@blafourcade

Problem

On a project with no manifest, aidd doctor prints three Warning: [scope] No AIDD manifest found... lines, then still prints "Installation is healthy" and exits 0.

Root cause

src/application/use-cases/global/doctor-all-use-case.ts:47-55's computeHealthy treats each errored (null) scope report as vacuously healthy: ai === null || ai.healthy.

Evidence

Verified on an empty directory:

$ node dist/cli.js doctor
Warning: [ai] No AIDD manifest found...
Warning: [ide] No AIDD manifest found...
Warning: [plugins] No AIDD manifest found...
✔ Installation is healthy

Exit code 0.

Why it matters

A CI gate like aidd doctor && deploy passes green on a project that was never initialized — the exact failure mode doctor exists to catch.

Fix

Either make doctor report unhealthy (non-zero exit) when any scope errored, or drop the "healthy" success line entirely when errors.length > 0 and print a neutral "nothing to check, run aidd setup first" message instead.

Acceptance criteria

  • aidd doctor on an uninitialized project does not print "Installation is healthy"
  • Exit code reflects the actual state (non-zero, or a distinct "not set up" signal)

Found by a UI/terminal-UX audit of cli/ — full report: cli/aidd_docs/tasks/2026_07/2026_07_22_audit/ui.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    None yet

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions