personal memory agent

doctor: add pre-install diagnostic and wire into install / install-service master

scripts/doctor.py is stdlib-only and runs on system python before `uv sync` has ever run. It implements a 14-check battery (python/uv/venv consistency, sol importability, npx availability, port 5015 ownership by executable path, disk space, config-dir writability, alias symlink state, plus macOS-only advisories) with --verbose / --json / --port flags and blocker-only exit semantics. Makefile: add `doctor` target (python3, not $(PYTHON)) and wire it as the first regular prerequisite of `install` and `install-service`, so sequential make evaluation runs doctor before `.installed`'s `uv sync`. The top-level uv guard now skips doctor-only invocations via a MAKECMDGOALS filter so a uv-less machine can still run diagnostics. think/install_guard.py: guard the `import userpath` at module top with try/except so scripts/doctor.py can import check_alias() from system python; _ensure_user_bin_on_path hard-fails if reached without userpath (only possible from outside the venv, which cmd_install never is). Decisions recorded in scripts/doctor.py's module docstring: uv floor 0.7.12, disk threshold 10 GiB, MAKECMDGOALS-filter UV-guard strategy. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>


+1572 -4
4 changed files