Issue 301 offline doctor implementation record

Selection and boundaries

Live queue: PRs #455, #456 and #457 were CLEAN with passing executed checks, no requested changes and no review threads. Scheduled external link checks were skipped by design. Existing files in those PRs are outside this change.

Ten candidates were evaluated, without reusing existing branches or worktrees:

Issue Disposition
#293 (P0) Skip: existing agent/issue293-* and codex/issue-293-* branches.
#332 (P0) Skip: codex/issue-332-null-contract-20260925 and its worktree exist.
#336 (P1) Skip: existing branch/worktree and PR #457.
#297 (P1) Skip: replay handoff validation overlaps PR #455.
#298 (P1) Skip: codex/issue-298-quality-dashboard exists.
#345 Skip: agent/issue345-screen-full-snapshot-20260905 exists.
#344 Skip: remaining items are author design questions; no decision supplied.
#349 Skip: existing branch/worktree and PR #456.
#404 Skip: replay normalization and tests overlap PR #455.
#301 (P2) Select: offline doctor preparation slice; no corresponding existing branch/worktree.

Remote heads were verified through the GitHub API after sandbox SSH DNS failed. The root checkout was on another branch and was left unchanged. Work starts from origin/main 06f6b15b6284fe46e68becbda3925a12e0f8cc7c in an isolated worktree.

Plan

  1. Add a standard-library-only offline doctor with text and JSON output.
  2. Inspect Python policy, installed project dependency distributions, pre-commit, and credential presence. Never connect, load dotenv files, install, or expose credential values. Missing dependencies are warnings with repair hints.
  3. Distinguish installation/presence from runtime or service validation. Report deferred checks explicitly; do not claim skillsets are runnable.
  4. Add missing-environment, malformed-metadata, redaction and CLI regression tests.
  5. Document usage and residual scope; run targeted tests and repository checks.
  6. Obtain independent plan and implementation reviews (maximum three each), resolve findings, commit and create one draft PR with Refs #301.

Issue #301 remains open: live connectivity, per-skillset readiness, quick start, fictional demo, one-command installation and three-question triage are deferred.

Review and verification

  • Plan review: 1 round, PASS; no blocking findings. Implementation retains the reviewer’s cautions about unknown syntax, secret-free error text, Python repair hints and an explicitly simulated missing TOML parser.
  • Implementation review: 1 round, PASS; reviewer independently ran all 23 tests.
  • python3.9 -m pytest scripts/tests/test_doctor.py -q: 23 passed.
  • Targeted ruff check and ruff format --check: passed.
  • Catalog, skill docs, workflow docs, skillset docs and navigator snapshot drift checks: passed.
  • Strict metadata/workflow index validation and skillset validation: passed.
  • No skills or packaged assets changed; skill package regeneration is not needed.
  • The change is a standalone diagnostic with no changes to skill execution; targeted tests are the local test boundary. The full skill suite runs in PR CI.
  • pre-commit run --all-files: passed. Synthetic credential fixtures have inline secret-scanner annotations; no real credentials were added.
  • git diff --check and staged diff whitespace checks: passed.