Effort: standard
Onboarding a new contributor (or a fresh agent VM) to SciDEX hits a
predictable wall of opaque failures: PG socket missing, submodule
data dir uninitialised, secrets file not symlinked, claude-CLI
auth not migrated, pull_main.sh not running, nginx not pointing
at port 8000, the data/scidex-artifacts/ worktree in a detached
state, the personas/ skills not loaded because the loader can't
see ~/.claude. Ship scidex doctor — a single command that runs
~15 health probes and prints PASS/FAIL/FIX-cmd for each, exit-coded.
scidex doctor [--fix] [--verbose] [--json] added tocli.py. Default mode prints a coloured table; --jsonCheck dataclass with name,description, run() -> CheckResult(status, evidence,
fix_command)):select 1 from scidex DB; FAIL printssudo systemctl restart postgresql.data/scidex-artifacts/.gitdata/scidex-papers/.git exist; FAIL prints git
submodule update --init --recursive.cd data/scidex-artifacts && git checkout main..env symlinked to /home/ubuntu/secrets/<token> placeholders).pgrep -f pull_main.sh returns one PID;curl -fs localhost:8000/api/healthsudo systemctl restart
scidex-api.curl -fs localhost/api/health returns/etc/nginx/sites-available/scidex.which claude resolves and claude
--version returns ≥2.1.119; FAIL prints the installpython3 -c "import scidex.skills.loader
as L; print(len(L.list_skills()))" returns ≥9; FAIL pointscurl -fs localhost:8899/health returns 200;scidex-bridge./data/ has ≥10 GB free; warn at <10,max_connections;.orchestra-worktrees/*//tmp/scidex-*.lock younger thanmigrations/*.py matches_applied_migrations table; FAIL prints python
scripts/run_migration.py --apply-pending.
--fix mode runs the fix command for any FAIL the user--yes).
tests/test_doctor.py: each probe importable;CheckResult; aggregate run_all() returns deterministicreference_fleet_health_watchdog.md) gains a periodicscidex doctor --json poll and emits a notification onCheck dataclass + a tiny register_check()cli.py's argparse next to the existing statusreference_fleet_health_watchdog.md consumer.q-obs-agent-latency-budget may reuse the probe pattern.scidex core/scidex_doctor.py with 15 health probesscidex doctor [--fix][--verbose][--json][--yes] to cli.pytests/test_doctor.py (27 tests, all passing)scidex doctor --json returns correct JSON with 15 checksmigration_history table (not _applied_migrations)orchestra/task/eb06d3df-scidex-doctor-diagnose-common-dev-env-is