# Harness

> A native macOS developer tool that drives an iOS Simulator, a macOS app, or a web app with an AI agent so you can run real-user-style tests — not scripted UI tests.

You write a goal in plain language and a persona. Harness launches your target — iOS Simulator (built from your Xcode project), macOS app (pre-built `.app` or built from source), or web app (URL in an embedded WKWebView) — and an LLM agent reads screenshots, taps/types/scrolls, and pursues the goal, narrating what it sees, flagging UX friction, and stopping when it succeeds, fails, or would give up.

Three artifacts come out of every run: a verdict (success/failure/blocked), a replayable timeline, and a list of timestamped friction events.

Models are pluggable. Cloud — Anthropic (Claude Opus 4.7, Sonnet 4.6, Haiku 4.5), OpenAI (GPT-5 Mini, GPT-4.1 Nano), and Google (Gemini 2.5 Flash, Flash Lite); you bring your own API key, keys live in the macOS Keychain. Local — vision LLMs running on your own Mac via Ollama (Qwen3-VL 8B recommended, Gemma 4 Vision 9B, Llama 3.2 Vision 11B, plus a custom-model field). Local needs no key and no internet; screenshots never leave the machine.

Drive it from an agent: `harness-mcp` is a stdio MCP server (built from the same source as the app) that lets Claude — or any MCP client — create Applications, Personas, and Actions, stage per-app credentials, and start/poll/cancel runs against the same on-disk store the GUI uses. Agent-driven runs surface as first-class, badged history in the app (a dedicated Agent Sessions view, a live banner, threaded into per-Application history). Beyond full runs, five step-level UI-session tools (`start_ui_session`, `observe_ui`, `act_ui`, `end_ui_session`, `list_ui_sessions`) let a client drive a web or iOS target directly — see the screen and act on it, one step at a time — with no LLM loop and no API key; the binary is standalone and relocatable, so another product can bundle it. The app auto-updates via Sparkle (EdDSA-signed, notarized).

## Project resources

- [Source code](https://github.com/awizemann/harness) — Swift 6, SwiftUI, MVVM-F, native macOS app.
- [Wiki](https://github.com/awizemann/harness/wiki) — architecture, services, agent loop, run-replay format, design system, contributor guides.
- [Standards](https://github.com/awizemann/harness/tree/main/standards) — numbered architecture, code, and testing standards (read before contributing).
- [Roadmap](https://github.com/awizemann/harness/blob/main/docs/ROADMAP.md) — public build order and milestones.
- [Architecture overview](https://github.com/awizemann/harness/blob/main/docs/ARCHITECTURE.md) — system-level diagram and rationale.
- [Agent prompts](https://github.com/awizemann/harness/tree/main/docs/PROMPTS) — system prompt, friction vocabulary, default personas (loaded as a bundle resource at runtime).
- [Issues](https://github.com/awizemann/harness/issues) — bugs and feature requests.

## License

MIT — https://github.com/awizemann/harness/blob/main/LICENSE
