The build-detection pattern (BuildSystemDetector.detect → buildSystem.build() → BuildContext) and device-resolution pattern (prefer booted, then first available) are duplicated 4-5x across RunCommand, SnapshotCommand, and MCPServer.
Extract into shared helpers to reduce duplication. Each call site has slightly different error handling (MCP returns CallTool.Result, CLI prints to stderr), so the helper should return a Result type or throw.
Identified in PR #3 review.