# XCLoom vs simslim

## Direct Verdict

`simslim` is a focused standalone utility for disabling non-essential background services inside iOS simulators. XCLoom builds dual-tier categorized pre-boot `disabled.plist` pruning (`19` categories, `147` entries in Safe Default [`-20.3%`], up to `160` with App-Aware `--for` [`-57.3%`], `24` always-protected daemons including `assistantd`, `gamed`, and `dtuhidd`, `--stock` restoring exact original bytes) natively into its own pool with zero `simslim` dependency, adding hardware-adaptive slot caps (2 to 12 slots, `1 stock = 3 slim`), a 2 slim / 1 stock concurrent cold-boot cap (`--wait-secs`), `sim lease` owner-PID + TTL auto-reaping, `ri_phys_footprint` diagnostics, and direct integration with cross-worktree builds and 2x2 UI audits.

## Side-by-Side Comparison

| Criterion | XCLoom | simslim |
| --- | --- | --- |
| Execution Layer | Full local execution stack: direct build engine (`--local --engine auto`), native dual-tier slim simulator pool, signing, `.dev` OTA, 2x2 UI audit, and offline preflight | Standalone simulator daemon-pruning CLI utility |
| 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) | None |
| Built-in Slim Sim Pool | Built-in dual-tier pruning: Safe Default `-20.3%` (`1.88 -> 1.50 GiB`) and App-Aware `--for` `-57.3%` (`1.70 -> 0.72 GiB`), `24` protected daemons, `2–12` RAM slots, `2 slim / 1 stock` cold-boot cap, PID/TTL auto-reap, and `ri_phys_footprint` tracking | Daemon trimming only; no app-aware `--for` analysis, RAM-adaptive pool scheduler, cold-boot cap, or owner-PID + TTL reaper |
| 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-*`) | None |
| Project Format Migration Needed | None (simulator pool works standalone on any iOS app, even with `xcodebuild` or Bazel) | None |

## Coexistence & Switching Guide

1. Install XCLoom and inspect every booted simulator's real `ri_phys_footprint` and `launchd_sim` process count read-only:

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

2. Boot slim simulators directly with XCLoom's built-in dual-tier `disabled.plist` pruning (`xcloom sim boot` slims by default with `147` Safe Default entries while `--stock` opts out; `--for` applies up to `160` App-Aware entries, keeping `24` critical daemons protected and requiring no external `simslim` binary):

```bash
xcloom sim boot --json
xcloom sim boot --for ./build/App.app --json
```

3. Pair cross-worktree direct builds with standalone 2x2 UI audits (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 on exit; `xcloom canvas matrix-act` runs on an already-booted instrumented simulator with default states `Light, 375pt Compact, Dark + AX-XXXL, RTL`):

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

## Frequently Asked Questions

### Does XCLoom shell out to `simslim` internally?

No. XCLoom implements categorized pre-boot `disabled.plist` pruning (`19` categories, `147` default / `160` app-aware `--for`, `24` always-protected daemons including `assistantd`, `gamed`, and `dtuhidd`, reversible byte-for-byte with `--stock`) natively inside the `xcloom` binary.

### Why does XCLoom measure simulator memory with `ri_phys_footprint` instead of `ps` RSS?

`ps` RSS double-counts shared dyld pages mapped across `launchd_sim` child processes. XCLoom measures physical memory via macOS `proc_pid_rusage` (`ri_phys_footprint`) and binds published numbers directly to `scripts/bench/bench-sim-slim-vs-stock.sh`.

### What happens when a coding agent crashes mid-session?

Pool leases (`xcloom sim lease`, used automatically by `run`, `matrix`, and `test`) track allocated simulators with owner-PID + TTL leases and automatic background reaping on process exit. Manual `xcloom sim boot` stays up until `xcloom sim shutdown`. Simulators opened by Xcode stay untouched in either case.

### Can I use XCLoom's slim simulator pool without adopting the direct build engine yet?

Yes. `xcloom sim status`, `xcloom sim boot`, and `xcloom sim lease` work independently on any iOS app, even if you keep running `xcodebuild` or Bazel for compilation.
