Skip to main content

offstage

Background QA for macOS apps while you keep using your Mac.

An AI agent (or a plain script) drives and verifies a native macOS app that never comes to the foreground. No synthetic input reaches whatever you're typing into.

┌────────────┐   press / menu (AXPress)   ┌──────────────────┐
│  offstage  │ ─────────────────────────▶ │  app under test  │
│   driver   │   port (line-JSON/UNIX)    │   (background,   │
│            │ ─────────────────────────▶ │  never frontmost)│
│            │ ◀───────────────────────── │                  │
└────────────┘   AX tree · SCK pixels ·   └──────────────────┘
                 UserDefaults ground truth

Four channels

channel what the agent gets
structure accessibility tree as compact text (observe)
pixels ScreenCaptureKit captures, canonical-state golden diffs (golden)
control AXPress for buttons and menus, a semantic port for typing and drags
ground truth the app's persisted state, so verification never trusts the UI

The one refusal: no synthetic keyboard or mouse events. Those land in whatever window is frontmost, including yours. What each channel can and can't do: docs/channels.md.

Why not a computer-use agent

A screenshot-driven agent needs the foreground, so it can't run while you work, and every observation costs an image.

Measured against screenshot-driven runs on seeded-defect apps:

  • Equal or better defect recall, at 3.6x to 28x fewer observation tokens.
  • Smaller models degrade less on text than on screenshots.
  • Scripted batteries catch 13/13 and 8/8 seeded defects in ~9 s, 0 tokens.

Full tables: docs/benchmarks.md.

Why not XCUITest

XCUITest takes the machine too. It brings the app under test to the foreground and synthesizes events, so a run and your typing can't share a desktop.

It also wants a compiled test target. Every new check is a code change, a rebuild, and a xcodebuild test cycle. An agent mid-conversation can't add one step and see the result.

offstage is the ad-hoc counterpart: one CLI call per step, no test target, against a running app that stays in the background. Keep XCUITest for the suite you commit. Use offstage for the exploratory pass and for checks an agent writes on the spot.

Quick start

pip install offstage
offstage probes build       # compile the Swift probes (one-time)
offstage doctor             # check session, permissions, toolchain

From a clone: pip install -e '.[dev]'.

Build the bundled fixture app:

cd examples/NotesApp && xcodegen generate
xcodebuild -project NotesApp.xcodeproj -scheme NotesApp -configuration Debug \
  -derivedDataPath /tmp/offstage-nb-dd build
cd ..

Drive it:

offstage start notesapp.manifest.json
offstage press notesapp.manifest.json addNote
offstage observe notesapp.manifest.json
offstage golden bake notesapp.manifest.json    # goldens are per-machine
offstage stop notesapp.manifest.json

The verbs

verb does
start / restart / stop launch fresh, relaunch without reset, quit
press <id> / menu <m> <i> AXPress a button or menu item
port '<json>' semantic action: typing, tabs, drags
observe AX rows, persisted state, port state, a11y counts
golden check / golden bake canonical-state pixel diff, or rewrite goldens
batch <steps> a whole journey in one call (below)

Run journeys with batch

One CLI call costs an agent one turn, so a ten-step journey costs ten. batch runs the list in one process and returns one JSON result.

offstage batch notesapp.manifest.json '[
  ["start"],
  ["press","addNote"],
  ["expect","/defaults/notes.v1/0/title","\"Untitled\""],
  ["port","{\"cmd\":\"rename\",\"index\":0,\"title\":\"TOP\"}"],
  ["expect","/port/titles","[\"TOP\"]"]]'

expect takes an RFC 6901 pointer into {defaults: the persisted store, port: the port's state reply}. It reads ground truth, not the actuation echo, so the result is pass/fail instead of a dump to interpret.

Steps can also be a .json file or - for stdin. Exit status is 1 when a step fails. Batching that journey: 1 turn instead of 12, ~340 tokens instead of ~2000.

Use with Claude Code, Codex, and other agents

The CLI is the agent interface. A ready-made skill teaches the workflow and the safety rules:

offstage skill install                           # into ~/.claude/skills
offstage skill install --target .agents/skills   # or anywhere else

Claude Code can install it as a plugin instead:

/plugin marketplace add thesepehrm/offstage
/plugin install offstage-qa@offstage

No skill mechanism? Paste skills/offstage-qa/SKILL.md into your AGENTS.md.

Your own app

  1. Write a manifest: docs/manifest.md.
  2. Embed the port in debug builds: swift/OffstagePort.
  3. Crystallize the journeys worth keeping as batch step files, or as a battery script (bench/) when they need conditionals.

Host requirements

  • macOS 15+ (measured on 26.1), Xcode command-line tools, xcodegen for the example apps.
  • Unlocked screen, display awake. Use caffeinate -du for long runs. The driver refuses to run into a locked session, because the channels degrade silently.
  • Accessibility and Screen Recording permission for the host terminal. Both are one-time manual grants that nothing can automate, including CI.

Limits

No synthetic input on a shared desktop. No background typing into SwiftUI fields, where AX set-value looks like it works but the store never changes. Goldens are byte-exact on the same machine only.

Full list, with the failure behind each rule: docs/limits.md.

Repo layout

path what
src/offstage/ Python driver + CLI (offstage), manifest validator
src/offstage/probes/ single-file Swift probes (AX, SCK, pixdiff, session lock)
swift/OffstagePort/ Swift package: the semantic port apps embed in debug builds
skills/ agent skill (Claude Code plugin layout)
examples/ two fixture apps (NotesApp, ConvertApp) + manifests
bench/ deterministic probe batteries (= integration tests)
docs/ channels, benchmarks, limits, manifest reference

Provenance

Extracted from a private research program on agentic macOS QA: channel measurement, perception ablations, seeded-defect benchmarks. Where a rule looks oddly specific, violating it broke a run.

License

MIT. See LICENSE.

Metadata

Release files for offstage 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for offstage 0.1.0
File Size Uploaded
offstage-0.1.0.tar.gz 32.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for offstage 0.1.0
File Interpreter ABI Platform
offstage-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 64.1 kB

Release files / offstage-0.1.0.tar.gz

Download URL offstage-0.1.0.tar.gz
Size 32.9 kB
Tags Source
SHA-256 checksum
How to use checksums
02d8b0a5bc338e2b32dfbe41ec622e5887561c2b4317151298a0ec00b5a718c0
BLAKE2b-256 checksum
How to use checksums
ab68416b07e6ca05e52bed177d2f911fec8d5b6832c33803890616ccb4391a9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.

Transparency log

Release files / offstage-0.1.0-py3-none-any.whl

Download URL offstage-0.1.0-py3-none-any.whl
Size 31.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
31e2d402ebe30aff260ae5d570dd8ec5d57522fe80e41d0756087aa03f12c991
BLAKE2b-256 checksum
How to use checksums
1af9d7803caeaf912a15d0d89423cb0743918ad6b54dfa8c002e4fd5bc99d9ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page