|
| 1 | +# droid-control |
| 2 | + |
| 3 | +Terminal, browser, and computer automation plugin for Droids. |
| 4 | + |
| 5 | +Droids can read and write code. This plugin enables them to *operate* it: launch apps, type commands, click buttons, record what happens, and produce polished video evidence of it. No human hands required (they don't have any). |
| 6 | + |
| 7 | +## What you get |
| 8 | + |
| 9 | +**Record a demo video from a PR:** |
| 10 | + |
| 11 | +``` |
| 12 | +/demo pr-1847 |
| 13 | +``` |
| 14 | + |
| 15 | +Droid reads the PR, scripts the interactions that prove the change works, records both branches in parallel, and renders a side-by-side comparison video. Factory preset for cinematic warmth, macos preset for clean and utilitarian. |
| 16 | + |
| 17 | +**Verify a behavior claim:** |
| 18 | + |
| 19 | +``` |
| 20 | +/verify "ESC cancels streaming in bash mode" |
| 21 | +``` |
| 22 | + |
| 23 | +Droid launches the app, attempts the claim, and reports what actually happened, with screenshots and text snapshots as evidence. If the claim is false, that's a valid finding, not a failure. |
| 24 | + |
| 25 | +**Run a QA flow against a web app:** |
| 26 | + |
| 27 | +``` |
| 28 | +/qa-test https://app.example.com -- login, create a project, invite a member |
| 29 | +``` |
| 30 | + |
| 31 | +Droid drives the browser through the flow, captures each step, and reports pass/fail with annotated screenshots. |
| 32 | + |
| 33 | +## Quick start |
| 34 | + |
| 35 | +```bash |
| 36 | +# Register the Factory plugins marketplace (if not already added) |
| 37 | +droid plugin marketplace add https://github.com/Factory-AI/factory-plugins |
| 38 | + |
| 39 | +# Install the plugin |
| 40 | +droid plugin install droid-control@factory-plugins --scope user |
| 41 | + |
| 42 | +# Install Remotion dependencies (one-time, only needed for video rendering) |
| 43 | +# Find the plugin install path with: droid plugin list --scope user |
| 44 | +cd <plugin-path>/remotion && npm install |
| 45 | +``` |
| 46 | + |
| 47 | +Or use the `/plugins` UI: Browse tab, select droid-control, install. |
| 48 | + |
| 49 | +Then open a Droid session and run `/demo`, `/verify`, or `/qa-test`. |
| 50 | + |
| 51 | +## Commands |
| 52 | + |
| 53 | +### `/demo` |
| 54 | + |
| 55 | +Plans and records a demo video. Accepts a PR number, GitHub URL, or free-text description. Comparison PRs get side-by-side layout by default; new features get single-branch. Add "showcase" for cinematic polish, "keys" for keystroke overlay. |
| 56 | + |
| 57 | +### `/verify` |
| 58 | + |
| 59 | +Tests a specific behavior claim and reports findings with evidence. Frames the droid as an investigator. Anti-fabrication rules prevent staging evidence to match expected outcomes. |
| 60 | + |
| 61 | +### `/qa-test` |
| 62 | + |
| 63 | +Automated QA against terminal CLIs or web/Electron apps. Accepts a URL, CLI command, or app description with optional test steps after `--`. |
| 64 | + |
| 65 | +## How it works |
| 66 | + |
| 67 | +Three layers: |
| 68 | + |
| 69 | +- **Orchestrator** -- routes each request through three independent lookups (target, stage, artifact) to determine which skills to load. ~93 lines. |
| 70 | +- **10 atom skills** -- self-contained background knowledge loaded on demand. Driver atoms (tuistory, true-input, agent-browser), target atoms (droid-cli, pty-capture), stage atoms (capture, compose, verify), and a polish atom (showcase). |
| 71 | +- **3 commands** -- thin intent declarations that parse arguments into commitments, then delegate to atoms via hybrid handoffs. |
| 72 | + |
| 73 | +Every workflow flows through **capture → compose → verify**. Commands declare *what* to produce; atoms own *how*. |
| 74 | + |
| 75 | +## Video rendering |
| 76 | + |
| 77 | +The compose stage uses [Remotion](https://www.remotion.dev/) (React-based video renderer) for all compositing. 6 visual presets, automatic cinematic layers (warm backgrounds, floating particles, noise overlay, motion blur transitions), and effect-driven layers (spotlight, zoom, keystroke overlay, section headers). |
| 78 | + |
| 79 | +The `render-showcase.sh` helper handles the full pipeline: `.cast` conversion via `agg`, clip staging, duration detection, Remotion render, and cleanup. |
| 80 | + |
| 81 | +## Prerequisites |
| 82 | + |
| 83 | +| Stage | Platform | Required | |
| 84 | +|---|---|---| |
| 85 | +| tuistory | All | `tuistory`, `asciinema`, `agg` | |
| 86 | +| true-input | Linux/Wayland | `cage`, `wtype`, Wayland terminal | |
| 87 | +| true-input | Windows (KVM) | `libvirt`, `qemu`, KVM VM with SSH | |
| 88 | +| true-input | macOS (QEMU) | `qemu`, `socat`, macOS VM with SSH | |
| 89 | +| agent-browser | All | `agent-browser` | |
| 90 | +| compose | All | `ffmpeg`, `ffprobe`, `agg` | |
| 91 | +| showcase | All | Node.js (>= 18), Chrome/Chromium | |
| 92 | + |
| 93 | +```bash |
| 94 | +npm install -g tuistory # virtual PTY driver |
| 95 | +pip install asciinema # terminal recording |
| 96 | +cargo install --git https://github.com/asciinema/agg # .cast → .gif converter |
| 97 | +sudo apt-get install -y ffmpeg # video processing |
| 98 | +agent-browser install # browser automation (downloads Chromium) |
| 99 | +cd plugins/droid-control/remotion && npm install # Remotion (video rendering) |
| 100 | +``` |
| 101 | + |
| 102 | +Only install what you need for your use case. Terminal demos need tuistory, asciinema, agg, and ffmpeg. Web/Electron automation just needs agent-browser. |
0 commit comments