feat(cli): promote scripts/doctor.py to sol doctor subcommand
Move the install diagnostic from a standalone script into a registered
sol subcommand. think/doctor.py now holds the canonical logic;
scripts/doctor.py is a stdlib-only shim that delegates to it so
make doctor and pre-install fragile-mode invocations keep working.
- think/doctor.py: stdlib-only diagnostic module, exposes main(argv).
- scripts/doctor.py: thin sys.path bootstrap → think.doctor.main.
- think/sol_cli.py: registers "doctor" in COMMANDS, adds an
"Installation" group between "Specialized tools" and "Help".
- tests/test_doctor.py: drop importlib.util fixture, import
think.doctor directly; add e2e subprocess test of sol doctor --json.
- docs/SOLCLI.md, INSTALL.md: document sol doctor and the
fragile-mode python3 scripts/doctor.py fallback.
Output, exit codes, JSON schema, default port (5015), check battery,
severities, and fix lines are byte-for-byte identical (modulo
argparse prog in --help). Verified: diff between sol doctor --json
and python3 scripts/doctor.py --json is empty.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>