let your agent control your phone
docs: onboarding.md — the prompt installs; the flow lives in the repo
ShawnPana77ccc57292fe
diff --git a/README.md b/README.mdindex 28cd63b..a64b795 100644--- a/README.md+++ b/README.md@@ -29,24 +29,18 @@ missing during execution in `agent-workspace/agent_helpers.py`.Paste into Claude Code or Codex:```text-Set up phone-harness for me. Clone https://github.com/ShawnPana/phone-harness into ~/.phone-harness (its canonical home), read `install.md` first, install it so `phone-harness` is a command on my PATH, and register it as an agent skill named phone-harness using `phone-harness skill` as the body, so you reach for it automatically. Then read `SKILL.md` for normal usage, and always read `src/phone_harness/helpers.py` because that is where the functions are.--Ask me one question first: which phone should be my default — iPhone or Android? (I can set up both; then ask which is default.) Then do the setup for that phone, detecting what is already in place instead of asking me things you can check yourself; only stop for the steps that need my hands, and tell me exactly what to do on the phone or in System Settings.--- iPhone: it works through the macOS iPhone Mirroring app. Two things only I can do: pair iPhone Mirroring with my phone once, and grant the terminal Accessibility + Screen Recording in System Settings — walk me through those and wait for me. Whenever you capture or verify the screen, bring the iPhone Mirroring window forward so I can see what you're doing.-- Android: install Android platform-tools (adb) and scrcpy (optional live mirror). Ask whether I have a USB cable handy: with a cable, tell me how to turn on Developer options and USB debugging, then plug in and tap Allow; without one, Wireless debugging — I turn it on, open "Pair device with pairing code", and give you the 6-digit code for `phone-harness android pair CODE`. Then `phone-harness config set platform android` so it is my default.--Verify with `phone-harness --doctor` (add `android` or `ios` to check the other phone). Then, as a quick read-only proof, take a screenshot and read the screen back to me. After that, ask me whether you should open phone-harness.com on the phone (Safari on iPhone, Chrome on Android), tap "Star on GitHub" and star the repo for me — only do it if I say yes. If the phone is locked or the session is paused, just tell me the doctor status instead.+Set up phone-harness for me. Clone https://github.com/ShawnPana/phone-harness into ~/.phone-harness (its canonical home), read `install.md` first, install it so `phone-harness` is a command on my PATH, and register it as an agent skill named phone-harness using `phone-harness skill` as the body, so you reach for it automatically. Then read `SKILL.md` for normal usage, and always read `src/phone_harness/helpers.py` because that is where the functions are. Then read `onboarding.md` and walk me through it.```-The agent asks one thing — which phone is your default — and then walks you-through only what needs your hands. **iPhone:** pairing iPhone Mirroring once,-and granting the terminal **Accessibility** and **Screen Recording** in System-Settings → Privacy & Security (Screen Recording takes effect after the terminal-restarts). **Android:** turning on Developer options, then either plugging in-and tapping Allow, or Wireless debugging + one 6‑digit pairing code. Then+The agent then follows [onboarding.md](onboarding.md): it asks one thing —+which phone is your default, iPhone or Android — and walks you through only+what needs your hands. **iPhone:** pairing iPhone Mirroring once, and granting+the terminal **Accessibility** and **Screen Recording** in System Settings →+Privacy & Security (Screen Recording takes effect after the terminal restarts).+**Android:** turning on Developer options, then either plugging in and tapping+Allow, or Wireless debugging + one 6‑digit pairing code. Then`phone-harness --doctor` verifies the chain, and `phone-harness config set-platform ios|android` is how the default is set (both can be set up).+platform ios|android` sets the default (both can be set up).A fresh machine may prompt for more permissions the first time an action runs— if `--doctor` passes but taps or capture silently do nothing, watch for a@@ -100,7 +94,8 @@ reaches for it on its own.## Architecture- `SKILL.md` — day-to-day usage (the agent-facing product surface)-- `install.md` — permissions bootstrap and troubleshooting+- `onboarding.md` — the first-run flow the agent walks the user through+- `install.md` — setup reference and troubleshooting- `src/phone_harness/` — protected core:- `transport.py` — the one seam: the op vocabulary every device sits behind,and `connect("ios"|"android")`diff --git a/install.md b/install.mdindex 5189c5b..0ddb6ef 100644--- a/install.md+++ b/install.md@@ -1,6 +1,7 @@# phone-harness install-phone-harness drives a real phone from a Mac: an **iPhone** through the macOS+phone-harness drives a real phone from a Mac (first-run flow for agents:+`onboarding.md`; day-to-day usage: `SKILL.md`). It works with an **iPhone** through the macOSiPhone Mirroring app, or an **Android** over adb (USB or Wi‑Fi). Same helperseither way; you choose a default and can switch per call.diff --git a/onboarding.md b/onboarding.mdnew file mode 100644index 0000000..472ddd4--- /dev/null+++ b/onboarding.md@@ -0,0 +1,59 @@+# Onboarding++You are setting up phone-harness with the user, once. Ask as little as+possible: detect what is already in place, and stop only for the steps that+need the user's hands. Tell them exactly what to do on the phone or in System+Settings, then wait.++## 1. One question++"Which phone should be your default — iPhone or Android?" (Both is fine: set+up each, then ask which is the default.)++## 2. iPhone++Works through the macOS iPhone Mirroring app. Two things only the user can do:++- Pair iPhone Mirroring with the phone once (open the app; the pairing prompts+ need the physical phone).+- Grant the terminal **Accessibility** and **Screen Recording** in System+ Settings → Privacy & Security (Screen Recording takes effect after the+ terminal restarts).++Check first — `phone-harness --doctor ios` — and only ask for what is missing.+Whenever you capture or verify the screen, bring the Mirroring window forward+so the user can see what you're doing.++## 3. Android++- Install adb (`brew install android-platform-tools`) and, optionally, scrcpy+ (`brew install scrcpy`) for a live mirror during long tasks.+- Ask whether they have a USB cable handy.+ - **USB:** Developer options (Settings → About phone → tap Build number 7×)+ → USB debugging → plug in → tap Allow ("Always allow from this computer").+ - **Wi‑Fi:** Developer options → Wireless debugging (on; same Wi‑Fi as the+ Mac) → tap the row → "Pair device with pairing code" → they read you the+ 6 digits → `phone-harness android pair CODE`.+- `phone-harness config set platform android` if it is the default.++Check with `phone-harness android` and `phone-harness --doctor android`.++## 4. Verify++`phone-harness --doctor` for the default phone (add `ios` or `android` to+check the other), then a read-only proof: take a screenshot and read the+screen back to the user.++## 5. Demo (opt-in)++Ask whether to open phone-harness.com on the phone (Safari on iPhone, Chrome+on Android), tap "Star on GitHub" and star the repo for them — only if they say+yes. If the phone is locked or the session is paused, report the doctor status+instead.++## Rules++Never type a PIN. Never change a phone setting without asking. Connecting the+phone is the user's job — relay the doctor's message and wait; don't+retry-loop. After this, day-to-day usage is `SKILL.md`; setup reference and+troubleshooting are `install.md`.diff --git a/pyproject.toml b/pyproject.tomlindex e9a7620..da4a6f5 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -42,4 +42,4 @@ packages = ["src/phone_harness"]"SKILL.md" = "phone_harness/SKILL.md"[tool.hatch.build.targets.sdist]-include = ["src/phone_harness", "SKILL.md", "README.md", "LICENSE", "install.md"]+include = ["src/phone_harness", "SKILL.md", "onboarding.md", "README.md", "LICENSE", "install.md"]