✨ feat: doctor checks a Claude cloud session instead of refusing it
Merged
AT
1mo ago+448+448+012345678901234567890123456789-27-27-01234567890123456789
Slice: #51
Builds State #171 of P-22: process-rules doctor checks a Claude cloud session instead of refusing it. A cloud session ran doctor on 2026-11-07 and got only "process-rules supports macOS only", exit 1.
src/doctor.ts: whenCLAUDE_CODE_REMOTE=true(the test session-start andas-agentuse), doctor runscloudDoctorbefore it looks for a token store. Same grouped ✓/▲/✗ layout, a fix per problem, exit 1 on any ✗:- This cloud session:
.github/process-rules/cloud-setup.shagainst the workflow's pin (✗ when they disagree or the file is missing or isn't onboard's →process-rules onboard again; ▲ when the workflow pins no one version); the running CLI against that release (▲ →bash .github/process-rules/cloud-setup.sh, or a new session);/opt/process-rules/from-setup(▲ → paste whatprocess-rules cloud-setupprints into the Setup script, once). - GitHub: the account the proxy acts as is one of the settings' agents, as session-start checks it (✗ → connect claude.ai's GitHub as the agent);
PROCESS_RULES_AGENTis set to an agent, so session-start lifted the lock (✗ → a new session). - This repo:
hooksHittingLock, as on a Mac.
On any other machine without a token store, the refusal stands. The Mac path is unchanged; its printing and the hook findings moved intoreportandrepoFindings, which both paths share.
- This cloud session:
src/cloud.ts:repoReleases(sys, root)reads the workflow's one pin and the version the cloud setup file installs; session-start'scloudDriftnow uses it too. An unreadable setup file counts as missing.src/session-start.ts: exportsrepoRootfor doctor.- Tests come first: 16 new cloud tests on a fake
Sys(Linux, no keychain, proxy token), plus Linux withoutCLAUDE_CODE_REMOTEstill refused. - README (Agent identity, doctor, Claude cloud sessions) and docs/decisions.md are updated. The version is not bumped; the coordinator does that.
pnpm check: 959 tests pass, 99.35% line coverage.
🤖 Generated with Claude Code
Summary by cubic
process-rules doctor now checks a Claude cloud session instead of refusing with "process-rules supports macOS only". On any other machine without a token store, the refusal stands; the Mac path is unchanged.
- Runs cloud checks before looking for a token store when
CLAUDE_CODE_REMOTE=true. - Checks the repo's cloud setup file against the workflow's pin, the running CLI release, the Setup script's
/opt/process-rules/from-setupmark, and the proxy account among the settings' agents; the session-start identity must match that account, case-insensitively, in the same grouped ✓/▲/✗ layout with a fix per problem. - Shares
repoReleases(the pin and setup-file reader) with session-start's drift check; exportsrepoRootfrom session-start for doctor. - Adds 16 cloud doctor tests on a fake Linux
Sys; non-cloud Linux is still refused.