# XCLoom vs xcrun mcpbridge

## Direct Verdict

Apple's `xcrun mcpbridge` exposes Xcode's native IDE actions to coding agents over MCP, while builds and simulators still execute through standard `xcodebuild` and stock `CoreSimulator`. XCLoom runs at the local execution layer underneath your coding agents, cutting `xcodebuild` wait across git worktrees, bounding simulator RAM with a built-in dual-tier slim pool, and adding Keychain-free signing, denoised diagnostics (`logs`, `trace`, `crash`, `explain`), and offline preflight.

## Side-by-Side Comparison

| Criterion | XCLoom | xcrun mcpbridge |
| --- | --- | --- |
| Execution Layer | Local direct build engine (`--local --engine auto` for Debug, explicit `--engine direct` for `archive --local`; `--local` forces on-Mac execution; `xcloom testflight` builds via `xcodebuild`), dual-tier slim simulator pool, diagnostics (`logs`, `trace`, `crash`, `explain`), and MCP server | First-party Apple MCP bridge exposing Xcode's GUI and `xcodebuild` actions over MCP |
| Cross-Worktree Build Cache | Path-normalized local CAS shared across git worktrees (`23.16s -> 0.45s` on `sample-food-truck`; `1.32s` on a `77.7 MB` production app) plus optional `--remote-cas` (S3, Cloudflare R2, or shared filesystem) | None; relies on per-workspace Xcode `DerivedData` |
| Built-in Slim Sim Pool | Dual-tier pre-boot pruning (`-20.3%` Safe Default / `-57.3%` App-Aware `--for`), RAM-adaptive 2–12 slot caps, and PID/TTL auto-reaping that leaves Xcode's own simulators untouched | None; uses stock Xcode simulators without RAM-adaptive slot caps |
| Zero-Keychain Signing & Preflight | Prompt-free CMS signing (`0.43s` self-signed CMS) and offline `xcloom preflight` (`31` checks: `22` `ITMS-*` incl. Privacy Manifest `ITMS-91053`/`ITMS-91056` + `9` `XCLOOM-252-*` dev-marker checks) | Uses macOS Keychain prompts and Xcode / App Store Connect upload validation |
| Project Format Migration Needed | None (`.xcodeproj`, `.xcworkspace`, CocoaPods, and XcodeGen `project.yml` incl. SwiftPM deps; runs headless without Xcode.app in foreground) | None (requires open Xcode project / workspace) |

## Coexistence & Switching Guide

1. Install XCLoom and inspect your Mac's current simulator memory usage without changing Xcode or `xcrun mcpbridge`:

```bash
brew install xcloom/tap/xcloom
xcloom sim status
```

2. Register XCLoom's MCP server and 4 Agent Skills (`xcloom`, `xcloom-appstore-review`, `xcloom-ui-qa`, `xcloom-binary-audit`) alongside `xcrun mcpbridge` in Claude Code, Codex, or Cursor (or run `xcloom init` to set up `.xcloom.json`, merge drivers, skills, and MCP across 7 editors; zero Node dependency; `npx skills add xcloom/xcloom` is also available):

```bash
xcloom mcp install --claude --codex --cursor
xcloom skill install --claude --codex --cursor  # writes repo-local by default; pass --global for user-wide install
```

3. Route incremental agent builds and standalone 2x2 UI audits through XCLoom while keeping `xcrun mcpbridge` for Xcode IDE-only inspection (standalone `xcloom matrix --out <DIR>` leases an App-Aware slim simulator, injects `libxcloom_matrix_probe.dylib`, writes `<DIR>/composite.png` and `manifest.json` across default states `light, dark, compact, dark-ax-xxxl` [pass `--states light,compact,dark-ax-xxxl,rtl` for RTL], and shuts down; `xcloom canvas matrix-act` runs across `Light, 375pt Compact, Dark + AX-XXXL, RTL` on an already-booted instrumented simulator in `1.44s` on `apple/sample-food-truck` and `0.064s` / `63.8 ms` wall / `63 ms` probe median on minimal `MatrixSweepOracle`):

```bash
xcloom build --local --engine auto
xcloom matrix --app ./build/App.app --out ./matrix-out  # writes ./matrix-out/composite.png
```

## Frequently Asked Questions

### Do I have to disable `xcrun mcpbridge` to use XCLoom?

No. Both MCP servers can stay registered side by side. Keep `xcrun mcpbridge` for Xcode IDE interactions and use XCLoom for cross-worktree builds, dual-tier slim simulator pooling, `.dev` previews, and offline preflight.

### What happens if a target uses an Xcode feature XCLoom does not model yet?

With `--local --engine auto`, Layer 2 delegates isolated unsupported dependency targets per target, and any unsupported top-level rule or standalone `Package.swift` app falls back cleanly to `xcodebuild` while printing `engine_fallback_reason`.

### Does XCLoom require Xcode.app to stay open in the foreground?

No. XCLoom invokes locally installed Xcode SDKs and compilers headless from the CLI, which avoids GUI focus contention during parallel worktree sessions.

### Will XCLoom interfere with simulators opened from Xcode while using `xcrun mcpbridge`?

No. Pool leases (`xcloom sim lease`) track only simulators XCLoom allocates via owner-PID + TTL leases with automatic background reaping on process exit, leaving Xcode-managed simulators untouched.
