# `rho doctor`

## Purpose

`rho doctor` owns setup checks, dependency checks, environment validation, and guided repair.

It exists so that users can get a working system without pushing setup logic into every other command.

## Responsibilities

- check whether required dependencies are installed
- suggest or run installation helpers where appropriate
- validate key and identity setup
- validate repo structure and Rho manifests
- validate crypto policy availability
- check agent backend readiness
- check sandbox readiness
- report actionable fixes

## Preserve From The Old System

- explicit operational tooling instead of assuming the environment is already correct
- tests and scenarios as evidence of expected runtime behavior

## Simplify

- one clear diagnostics command instead of scattered environment checks
- guided checks over hidden auto-configuration
- actionable output tied to specific commands and files

## Replace Old Functionality With

- deterministic readiness checks for the v1 stack
- a standard report format for failed checks
- a small set of repair actions or instructions

## Leave Off In V1

- daemon supervision
- background self-healing services
- opaque installation side effects
- broad package-manager abstraction layers

## Suggested Checks

- `identity`
- `crypto`
- `repo`
- `messages`
- `agent`
- `sandbox`

## Important Rule

`rho doctor` should diagnose and help repair.
It should not silently mutate trust or policy state without explicit user action.

## Current Slice

The first implemented diagnostic surface is repo-local:

```bash
rho repo doctor --root <repo>
```

It validates the committed Rho collaboration spine, membership, participant
bundles, permissions policy, governance signatures, Git attributes, and whether
private-read files are actually encrypted to the expected recipients.
`--no-governance` is only for explicit bootstrap diagnostics before the owner
has signed the governance set.
