Collapse the public Platform literal from ios/macos to apple (with the appleOs discriminant carrying the OS). This is the highest-diff, public-compatibility step — keep it last, after b.2/b.3/d.1/d.2/d.5.
Size (current grep, non-test unless noted)
platform === 'macos' 51 + platform !== 'macos' 8 = ~59 macOS-branch sites across 28 non-test files: src/core/dispatch-interactions.ts, src/core/interactors/apple.ts, src/daemon/app-log.ts, src/daemon/handlers/{session-perf,session-open-target,session-open-surface,snapshot-*,session-state}.ts, src/daemon/request-lock-policy.ts, src/daemon/handlers/record-trace-recording-backends.ts, src/kernel/device.ts, src/utils/parsing.ts, plus src/platforms/apple/core/*.
isApplePlatform = 47 non-test references (~30+ call sites across daemon/** and core/**), plus uncounted === 'ios' sites.
- Public surface:
PLATFORMS (src/kernel/device.ts:8), parsePlatform (src/utils/parsing.ts:109-117), CLI --platform enum, MCP projection, and any persisted session records.
Approach
Strangler-fig with parity tests; do not flatten the leaves. Needs a back-compat story for the public ios/macos strings (CLI, persisted state, MCP). Human judgment required.
Label rationale
ready-for-human — public compatibility + sequencing judgment.
Refs
perfect-shape.md §7 ("the Platform collapse is the LAST, highest-diff step"); ADR-0009. (Phase 3 step d.3.)
Part of #972 (Phase 3 — Apple PlatformPlugin).
Collapse the public
Platformliteral fromios/macostoapple(with theappleOsdiscriminant carrying the OS). This is the highest-diff, public-compatibility step — keep it last, after b.2/b.3/d.1/d.2/d.5.Size (current grep, non-test unless noted)
platform === 'macos'51 +platform !== 'macos'8 = ~59 macOS-branch sites across 28 non-test files:src/core/dispatch-interactions.ts,src/core/interactors/apple.ts,src/daemon/app-log.ts,src/daemon/handlers/{session-perf,session-open-target,session-open-surface,snapshot-*,session-state}.ts,src/daemon/request-lock-policy.ts,src/daemon/handlers/record-trace-recording-backends.ts,src/kernel/device.ts,src/utils/parsing.ts, plussrc/platforms/apple/core/*.isApplePlatform= 47 non-test references (~30+ call sites acrossdaemon/**andcore/**), plus uncounted=== 'ios'sites.PLATFORMS(src/kernel/device.ts:8),parsePlatform(src/utils/parsing.ts:109-117), CLI--platformenum, MCP projection, and any persisted session records.Approach
Strangler-fig with parity tests; do not flatten the leaves. Needs a back-compat story for the public
ios/macosstrings (CLI, persisted state, MCP). Human judgment required.Label rationale
ready-for-human— public compatibility + sequencing judgment.Refs
perfect-shape.md §7 ("the
Platformcollapse is the LAST, highest-diff step"); ADR-0009. (Phase 3 step d.3.)Part of #972 (Phase 3 — Apple PlatformPlugin).