{"_id":"@dualityinstitute/clone-ai","_rev":"6-fe8780ffc9973452824a3d367938eb62","name":"@dualityinstitute/clone-ai","dist-tags":{"latest":"0.2.26"},"versions":{"0.2.0":{"name":"@dualityinstitute/clone-ai","version":"0.2.0","keywords":["opencode","plugin","coding-agent","worktree"],"license":"MIT","_id":"@dualityinstitute/clone-ai@0.2.0","maintainers":[{"name":"duality-ins","email":"contact@duality.institute"}],"homepage":"https://github.com/duality-institute/clone-ai#readme","bugs":{"url":"https://github.com/duality-institute/clone-ai/issues"},"bin":{"clone":"dist/cli.js"},"dist":{"shasum":"07c755d839a4b2dc81e6387f34e529c3d9b0db57","tarball":"https://registry.npmjs.org/@dualityinstitute/clone-ai/-/clone-ai-0.2.0.tgz","fileCount":10,"integrity":"sha512-Y6FVdKJa5JTC+Jhe58CwW5bq3HjGvrdNfU+ZKyY5GZC75sD2KEvXog7WDTIPkH6NY89QKH0Hy3aO3L6A0VAU8w==","signatures":[{"sig":"MEYCIQC4/0vHY7ZZCz0C11WgzdNpM3j0s/0WvzD9sjwWFASUMQIhAM0d5ghbeYGNVJ02Z+jE6z9csFG02qTO36SBRtbRrDLY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1948017},"type":"module","engines":{"node":">=20"},"exports":{".":"./dist/plugin.js"},"gitHead":"0f3dd8c3ebe947289a8e1158d6d6eb380c0ae526","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/plugin.ts src/cli.ts --outdir dist --target bun --format esm && cp -R src/mobile/ui dist/ui","check":"tsc --noEmit","verify":"bun run check && bun test && bun run build","prepublishOnly":"bun run verify"},"_npmUser":{"name":"duality-ins","email":"contact@duality.institute"},"repository":{"url":"git+https://github.com/duality-institute/clone-ai.git","type":"git"},"_npmVersion":"10.8.2","description":"A native OpenCode engineering team with human oversight","directories":{},"_nodeVersion":"20.20.0","dependencies":{"zod":"4.4.3","qrcode":"1.5.4","jsonc-parser":"3.3.1","@opencode-ai/sdk":"1.18.16","@opencode-ai/plugin":"1.18.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"5.9.3","@types/qrcode":"1.5.6"},"_npmOperationalInternal":{"tmp":"tmp/clone-ai_0.2.0_1786466668688_0.14985618735353112","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@dualityinstitute/clone-ai","version":"0.2.1","keywords":["opencode","plugin","coding-agent","worktree"],"license":"MIT","_id":"@dualityinstitute/clone-ai@0.2.1","maintainers":[{"name":"duality-ins","email":"contact@duality.institute"}],"homepage":"https://github.com/duality-institute/clone-ai#readme","bugs":{"url":"https://github.com/duality-institute/clone-ai/issues"},"bin":{"clone":"dist/cli.js"},"dist":{"shasum":"0b754e2c8401e3437c95cbf66c6fa2bfa7bf5803","tarball":"https://registry.npmjs.org/@dualityinstitute/clone-ai/-/clone-ai-0.2.1.tgz","fileCount":13,"integrity":"sha512-Jh8LhOOvSzmVvSKxsoyPdrt8D3TSGGa0Qiad0haXGDDHigb5mnOwUK/r+Cct2luPN1TSOVA9yXxJsUwxpSrWzQ==","signatures":[{"sig":"MEUCIGFSRC68uxqNyaEZDHwxWSysWGWQpOJOBof45A39M/V0AiEA71BBgaAAMM8LBvFPiam5/7eZ0Kg2n5g12eTT3VFZjIc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1966418},"type":"module","engines":{"node":">=20"},"exports":{".":"./dist/plugin.js"},"gitHead":"0f3dd8c3ebe947289a8e1158d6d6eb380c0ae526","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/plugin.ts src/cli.ts --outdir dist --target bun --format esm && cp -R src/mobile/ui dist/ui && cp -R src/skills dist/skills","check":"tsc --noEmit","verify":"bun run check && bun test && bun run build","prepublishOnly":"bun run verify"},"_npmUser":{"name":"duality-ins","email":"contact@duality.institute"},"repository":{"url":"git+https://github.com/duality-institute/clone-ai.git","type":"git"},"_npmVersion":"10.8.2","description":"A native OpenCode engineering team with human oversight","directories":{},"_nodeVersion":"20.20.0","dependencies":{"zod":"4.4.3","qrcode":"1.5.4","jsonc-parser":"3.3.1","@opencode-ai/sdk":"1.18.16","@opencode-ai/plugin":"1.18.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"5.9.3","@types/qrcode":"1.5.6"},"_npmOperationalInternal":{"tmp":"tmp/clone-ai_0.2.1_1786472582560_0.709992472251646","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@dualityinstitute/clone-ai","version":"0.2.2","keywords":["opencode","plugin","coding-agent","worktree"],"license":"MIT","_id":"@dualityinstitute/clone-ai@0.2.2","maintainers":[{"name":"duality-ins","email":"contact@duality.institute"}],"homepage":"https://github.com/duality-institute/clone-ai#readme","bugs":{"url":"https://github.com/duality-institute/clone-ai/issues"},"bin":{"clone":"dist/cli.js"},"dist":{"shasum":"80d982a913902a12d30424b9e2b8b9144cd27c8e","tarball":"https://registry.npmjs.org/@dualityinstitute/clone-ai/-/clone-ai-0.2.2.tgz","fileCount":13,"integrity":"sha512-ZquqybbZ4IP0TJ33qzQSeL41wTdH6gdhAH7GinmWyzbBABM8YRJY8HZLY86pUQMK4/LKJuL5kvbD+PLe71m/uQ==","signatures":[{"sig":"MEUCIBm3oQ6YOVpdIPb+gNgo5HjlPOmf+suWI6tTo7FOiI/SAiEA0IQyxEeRX97CFpGDy6PCI334YTkwH/pyUh4ll2ve32k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1967460},"main":"./dist/plugin.js","type":"module","engines":{"node":">=20"},"exports":{".":"./dist/plugin.js","./server":"./dist/plugin.js"},"gitHead":"0f3dd8c3ebe947289a8e1158d6d6eb380c0ae526","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/plugin.ts src/cli.ts --outdir dist --target bun --format esm && cp -R src/mobile/ui dist/ui && cp -R src/skills dist/skills","check":"tsc --noEmit","verify":"bun run check && bun test && bun run build","prepublishOnly":"bun run verify"},"_npmUser":{"name":"duality-ins","email":"contact@duality.institute"},"repository":{"url":"git+https://github.com/duality-institute/clone-ai.git","type":"git"},"_npmVersion":"10.8.2","description":"A native OpenCode engineering team with human oversight","directories":{},"_nodeVersion":"20.20.0","dependencies":{"zod":"4.4.3","qrcode":"1.5.4","jsonc-parser":"3.3.1","@opencode-ai/sdk":"1.18.16","@opencode-ai/plugin":"1.18.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"5.9.3","@types/qrcode":"1.5.6"},"_npmOperationalInternal":{"tmp":"tmp/clone-ai_0.2.2_1786474116120_0.6608378400224155","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@dualityinstitute/clone-ai","version":"0.2.3","keywords":["opencode","plugin","coding-agent","worktree"],"license":"MIT","_id":"@dualityinstitute/clone-ai@0.2.3","maintainers":[{"name":"duality-ins","email":"contact@duality.institute"}],"homepage":"https://github.com/duality-institute/clone-ai#readme","bugs":{"url":"https://github.com/duality-institute/clone-ai/issues"},"bin":{"clone":"dist/cli.js"},"dist":{"shasum":"1c2f4533f55ebc087064694b37629ee24f5de14b","tarball":"https://registry.npmjs.org/@dualityinstitute/clone-ai/-/clone-ai-0.2.3.tgz","fileCount":13,"integrity":"sha512-xAY1cdfyRK+S3wOvsDXBqJAhDGlxYiZprKtqaJFnpEBcBCRzYKgE6lzN9b9Ckvsn73gOvM67BPT00iS2bJLY3w==","signatures":[{"sig":"MEUCIQDMsMw0JoE/trNz3P19QQ2c74DH6Lq2RMPpIPWjCqBy/AIge5w0tldYSv5h086IXWSuT1E+//qZ6vcajVq3bxZ9Flk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1973377},"main":"./dist/plugin.js","type":"module","engines":{"node":">=20"},"exports":{".":"./dist/plugin.js","./server":"./dist/plugin.js"},"gitHead":"c5e5d153e1f03ae1913cfb1a753cc6d1334c1de6","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/plugin.ts src/cli.ts --outdir dist --target bun --format esm && cp -R src/mobile/ui dist/ui && cp -R src/skills dist/skills","check":"tsc --noEmit","verify":"bun run check && bun test && bun run build","prepublishOnly":"bun run verify"},"_npmUser":{"name":"duality-ins","email":"contact@duality.institute"},"repository":{"url":"git+https://github.com/duality-institute/clone-ai.git","type":"git"},"_npmVersion":"10.8.2","description":"A native OpenCode engineering team with human oversight","directories":{},"_nodeVersion":"20.20.0","dependencies":{"zod":"4.4.3","qrcode":"1.5.4","jsonc-parser":"3.3.1","@opencode-ai/sdk":"1.18.16","@opencode-ai/plugin":"1.18.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"5.9.3","@types/qrcode":"1.5.6"},"_npmOperationalInternal":{"tmp":"tmp/clone-ai_0.2.3_1786474800526_0.32517537563341503","host":"s3://npm-registry-packages-npm-production"}},"0.2.5":{"name":"@dualityinstitute/clone-ai","version":"0.2.5","keywords":["opencode","plugin","coding-agent","worktree"],"license":"MIT","_id":"@dualityinstitute/clone-ai@0.2.5","maintainers":[{"name":"duality-ins","email":"contact@duality.institute"}],"homepage":"https://github.com/duality-institute/clone-ai#readme","bugs":{"url":"https://github.com/duality-institute/clone-ai/issues"},"bin":{"clone":"dist/cli.js"},"dist":{"shasum":"0b1f743d3def1b38a8e499f9bb6e17cb9d355d36","tarball":"https://registry.npmjs.org/@dualityinstitute/clone-ai/-/clone-ai-0.2.5.tgz","fileCount":13,"integrity":"sha512-P7R9hToWvY7c54UYhT0YEnOfj7DKkW4g0bLchydxmB9CQ5hIoniqb6SFiGhTD9qwDkcMeo8+p45Z+p/g5PqF4w==","signatures":[{"sig":"MEQCIFNgDiuOoBID9ggNFb2rEDgS711MdwoSPxUG9OCbY3XdAiAls8j9ZEoctBeBXzxQM3QwkXsCQgELFcsnFBvNGccXJA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1999831},"main":"./dist/plugin.js","type":"module","engines":{"node":">=20"},"exports":{".":"./dist/plugin.js","./server":"./dist/plugin.js"},"gitHead":"2d49814aec61dfac4baa23cf55cc26631c5d1548","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/plugin.ts src/cli.ts --outdir dist --target bun --format esm && cp -R src/mobile/ui dist/ui && cp -R src/skills dist/skills","check":"tsc --noEmit","verify":"bun run check && bun test && bun run build","prepublishOnly":"bun run verify"},"_npmUser":{"name":"duality-ins","email":"contact@duality.institute"},"repository":{"url":"git+https://github.com/duality-institute/clone-ai.git","type":"git"},"_npmVersion":"10.8.2","description":"A native OpenCode engineering team with human oversight","directories":{},"_nodeVersion":"20.20.0","dependencies":{"zod":"4.4.3","qrcode":"1.5.4","jsonc-parser":"3.3.1","@opencode-ai/sdk":"1.18.16","@opencode-ai/plugin":"1.18.16"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"5.9.3","@types/qrcode":"1.5.6"},"_npmOperationalInternal":{"tmp":"tmp/clone-ai_0.2.5_1786506281535_0.022849902487223517","host":"s3://npm-registry-packages-npm-production"}},"0.2.26":{"name":"@dualityinstitute/clone-ai","version":"0.2.26","description":"A native OpenCode engineering team with human oversight","license":"MIT","repository":{"type":"git","url":"git+https://github.com/duality-institute/clone-ai.git"},"homepage":"https://github.com/duality-institute/clone-ai#readme","bugs":{"url":"https://github.com/duality-institute/clone-ai/issues"},"publishConfig":{"access":"public"},"type":"module","main":"./dist/plugin.js","exports":{".":"./dist/plugin.js","./server":"./dist/plugin.js"},"bin":{"clone":"dist/cli.js"},"scripts":{"build":"rm -rf dist && bun build src/plugin.ts src/cli.ts --outdir dist --target bun --format esm && cp -R src/mobile/ui dist/ui && cp -R src/skills dist/skills","check":"tsc --noEmit","test":"bun test","verify":"bun run check && bun test && bun run build","prepublishOnly":"bun run verify"},"dependencies":{"@opencode-ai/plugin":"1.18.16","@opencode-ai/sdk":"1.18.16","jsonc-parser":"3.3.1","qrcode":"1.5.4","zod":"4.4.3"},"devDependencies":{"@types/bun":"latest","@types/qrcode":"1.5.6","typescript":"5.9.3"},"engines":{"node":">=20"},"keywords":["opencode","plugin","coding-agent","worktree"],"_id":"@dualityinstitute/clone-ai@0.2.26","gitHead":"c10f020c047d3a2efda49a6ca4ef7ffb3e3f3522","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-G3aWEIPZxKy9MuGp8Poo+IS/FdjnPsxvG6zFi0UfmxBvoME584fF6UmmmN+IMJnmCAkCHEQWsN9QRiXLvmvTkg==","shasum":"e9e488b632c1ab6f85abff1a9d0fd6837f398bfa","tarball":"https://registry.npmjs.org/@dualityinstitute/clone-ai/-/clone-ai-0.2.26.tgz","fileCount":13,"unpackedSize":2004166,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDDP2BgrpbyxOJOIUOAiPXQyo7pMSzVPuGvyyOygDG+VQIhAOjjA8FBywqfn4AvoSsmMiMDxvC3L83x/0ZwuQGidwAt"}]},"_npmUser":{"name":"duality-ins","email":"contact@duality.institute"},"directories":{},"maintainers":[{"name":"duality-ins","email":"contact@duality.institute"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/clone-ai_0.2.26_1786565340100_0.23925754640742447"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-11T16:44:28.564Z","modified":"2026-08-12T20:09:00.450Z","0.2.0":"2026-08-11T16:44:28.843Z","0.2.1":"2026-08-11T18:23:02.866Z","0.2.2":"2026-08-11T18:48:36.297Z","0.2.3":"2026-08-11T19:00:00.699Z","0.2.5":"2026-08-12T03:44:41.717Z","0.2.26":"2026-08-12T20:09:00.264Z"},"bugs":{"url":"https://github.com/duality-institute/clone-ai/issues"},"license":"MIT","homepage":"https://github.com/duality-institute/clone-ai#readme","keywords":["opencode","plugin","coding-agent","worktree"],"repository":{"type":"git","url":"git+https://github.com/duality-institute/clone-ai.git"},"description":"A native OpenCode engineering team with human oversight","maintainers":[{"name":"duality-ins","email":"contact@duality.institute"}],"readme":"<p align=\"center\">\n  <a href=\"https://www.duality.institute/\">\n    <img src=\"DI_logo_light.png\" alt=\"Duality Institute\" width=\"140\">\n  </a>\n</p>\n\n<h1 align=\"center\">clone-ai</h1>\n\n<p align=\"center\"><strong>A native OpenCode engineering team with human oversight.</strong></p>\n\nClone runs a task as a small engineering organization:\n\n- an **IC** researches, implements, and verifies the work;\n- a **Manager** reviews the actual repository state and assigns the next step;\n- **you** answer only genuine product decisions.\n\nYou are the **Skip-Level Manager**: set the goal, then step back. The Manager\nhandles planning, assignments, and review while the IC does the hands-on work.\nYou are brought back only for genuine product decisions, completion, or aborts.\n\n```mermaid\nflowchart LR\n    You([\"You - Skip-Level Manager\"]):::human\n\n    subgraph worktree [\"isolated worktree · agent loop\"]\n        direction LR\n        Manager[\"Manager - plan, assign & review\"]:::ai\n        IC[\"IC - research, implement & verify\"]:::ai\n        Manager <-->|\"assign / report\"| IC\n    end\n\n    You <-->|\"goals / decisions\"| Manager\n\n    classDef human fill:#1f6feb,stroke:#1158c7,color:#ffffff;\n    classDef ai fill:#8250df,stroke:#6639ba,color:#ffffff;\n    style worktree fill:transparent,stroke:#8b949e,stroke-dasharray:5 5;\n```\n\n🟦 **You** (human) · 🟪 **Manager** and **IC** (AI agents)\n\n## Requirements\n\n- [OpenCode](https://opencode.ai/)\n- [Bun](https://bun.sh/) 1.3 or newer\n- Git\n- macOS or Linux\n\n## Install\n\n```bash\nbunx @dualityinstitute/clone-ai@latest install\n```\n\nThe installer globally installs the `clone` CLI with Bun and adds\n`@dualityinstitute/clone-ai` to the existing global OpenCode plugin array\nwithout replacing unrelated settings. It removes only stale cached Clone plugin\ncopies so OpenCode resolves the newly installed release on restart. Restart\nOpenCode after installation. OpenCode installs npm plugins with Bun on startup.\n\n## Start a run\n\nInside the OpenCode TUI:\n\n```text\n/clone Fix the login redirect and verify it\n```\n\nClone creates two child sessions and an isolated worktree:\n\n```text\nYour OpenCode session\n├── Clone IC\n└── Clone Manager\n```\n\nIt also opens the owner process's authenticated local Clone Control dashboard\nin the default browser. `/clone-worktree` opens the same dashboard after\nstarting its run.\n\nOpenCode may not show custom-tool child sessions as inline cards. In the TUI,\nuse `Ctrl+X`, then `Down` to open the child Clone chat. Use `Left`/`Right` to\nswitch between IC and Manager, and `Up` to return to the parent session.\n\nThe Manager receives the task first. It keeps the run in planning until it has\na concrete implementation plan, then directs the IC. The main OpenCode client\nreceives notifications only for human decisions, completion, abort, or failure.\n\nTo start another task in an existing worktree instead of creating a new\nworktree:\n\n```text\n/clone-worktree <absolute-path> -- <task>\n```\n\nClone validates the Git worktree, refuses concurrent active use, and never\ndeletes a supplied worktree or branch.\n\nOther useful commands within OpenCode are scoped to the repository where that\nOpenCode process was launched:\n\n```text\n/clone-list # list clone runs\n/clone-status [run-id] # check a specific or the latest clone run\n/clone-stop <run-id> # stop a clone run\n```\n\nThe `clone` CLI handles installation, inspection, emergency stop, cleanup, and\ncontrol-panel connections:\n\n```bash\nclone list\nclone list --all\nclone status [run-id]\nclone stop <run-id>\nclone clean [--force] /path/to/clone-worktree\nclone deep-clean\nclone desktop\nclone mobile\n```\n\n`clone list` and `clone status` are scoped to the current Git repository.\n`clone list --all` shows retained runs across every repository.\n\n## Phone control\n\nClone Control is a responsive web app served from your computer. It is not a\nnative iOS or Android application.\n\nThe dashboard opens automatically when `/clone` or `/clone-worktree` starts a\nrun. To open it manually or reconnect later:\n\n```bash\nclone desktop\n```\n\nUse **Pair Phone** in the dashboard to start LAN access and display a QR code.\nWhile the handoff is visible, the desktop dashboard is dimmed and inert. Choose\n**Return to Desktop** to close LAN access and resume local control.\n\nYou can also print a LAN pairing link and QR from another terminal:\n\n```bash\nclone mobile\n```\n\nBoth CLI commands take no arguments and must be run inside a Git repository.\nThey connect only to a live Clone plugin process launched from that repository;\nif several match, Clone uses the newest. The dashboard shows only that\nrepository's retained runs. OpenCode must remain running because it serves\nClone Control and owns active HITL decisions and agent sessions.\nLocal desktop service remains available while LAN pairing runs on a separate\nlistener; LAN access exists only until **Return to Desktop** or plugin shutdown.\n\nScan the displayed QR code with the phone camera. The link contains a random,\nsingle-use token that expires after five minutes. Clone exchanges it for a\nrevocable, HTTP-only device session and removes the token from the URL.\n\nThe phone dashboard supports:\n\n- active phase and round;\n- Manager and IC activity;\n- decision buttons and custom guidance;\n- run abort;\n- latest Manager note;\n- expandable per-round Manager assignments, IC reports, and source diffs;\n- branch and run history.\n\nOn iOS, use Safari's **Add to Home Screen** action for an app-like standalone\nwindow. No App Store installation is involved.\n\n### Remote access with Tailscale\n\nFor access away from the local network, install Tailscale on the computer and\nphone, then proxy Clone's localhost dashboard with Tailscale Serve:\n\n```bash\ntailscale serve localhost:<clone-control-port>\n```\n\nUse the resulting private `https://*.ts.net` address as the plugin's\n`mobile.publicUrl`. Clone does not enable a public tunnel by default.\n\n## File-defined IC and Manager agents\n\nClone provides built-in IC and Manager prompts for direct tool use, repository\ndiscovery, implementation discipline, MCP use, failure recovery, and observable\nverification. OpenCode agent files can add project instructions and set each\nrole's model, temperature, and provider options. Create them globally for\npersonal defaults:\n\n```text\n~/.config/opencode/agents/clone-ic.md\n~/.config/opencode/agents/clone-manager.md\n```\n\nOr commit the same files under `.opencode/agents/` for repository-specific team\ndefaults. Project agent files must be committed so Clone's generated worktree\ncontains them.\n\n```markdown\n---\ndescription: Clone IC with project implementation conventions\nmode: subagent\nmodel: anthropic/claude-sonnet-4-6\ntemperature: 0.2\n---\n\nFollow the repository's architecture and prefer small, verified changes.\n```\n\n```markdown\n---\ndescription: Clone Manager with strict review conventions\nmode: subagent\nmodel: anthropic/claude-opus-4-6\ntemperature: 0.1\n---\n\nRequire evidence from tests and the actual diff before accepting work.\n```\n\nClone appends the file body as supplemental instructions, then reapplies its\nnon-overridable role invariants. Both roles can use direct repository, shell,\nweb, language-server, and configured MCP tools, but cannot delegate, spawn\nagents or teammates, enter plan mode, call Clone tools, or question the human\ndirectly. Clone also preserves the other file-defined settings while enforcing\nsubagent mode. Model precedence, from highest to lowest, is:\n\n1. a non-empty `model` in the Clone plugin tuple;\n2. the project agent file under `.opencode/agents/`;\n3. the global agent file under `~/.config/opencode/agents/`;\n4. the OpenCode session or provider default.\n\nA plugin tuple loads Clone together with an options object, for example:\n\n```jsonc\n{\n  \"plugin\": [\n    [\n      \"@dualityinstitute/clone-ai\",\n      {\n        \"ic\": { \"model\": \"anthropic/claude-sonnet-4-6\" },\n        \"manager\": { \"model\": \"anthropic/claude-opus-4-6\" }\n      }\n    ]\n  ]\n}\n```\n\nOmit tuple models when agent files should control model selection. Project\nagent files override global defaults for that repository.\n\n## Worktrees and retained state\n\nEach run stores its state beneath:\n\n```text\n~/.local/state/clone-ai/runs/<run-id>/\n├── run.json\n└── events.jsonl\n```\n\nThe snapshot is written atomically. The event journal records state changes for\ndiagnostics and reconnecting clients.\n\nTo continue later, inspect the retained worktree and start a fresh run with new\ninstructions:\n\n```text\n/clone-list\n/clone-status <run-id>\n/clone-worktree /path/from/clone-status -- <new task>\n```\n\nThis creates a new run ID. Clone reuses the latest IC/Manager pair when the\ncurrent OpenCode parent and canonical worktree path both match a previous run.\nChanging either the parent or worktree creates a new pair. Previous run records\nremain historical while files, branch, and same-worktree chat context continue.\n\nInspect and merge accepted work normally:\n\n```bash\nclone list\ngit merge clone/<run-id>\nclone clean /path/from/clone-status\n```\n\n`clone clean` takes an existing absolute or relative worktree path. For a\nClone-created worktree, it removes the worktree, branch, and every saved run\nrecord that references that path. It refuses active runs and user-supplied\nworktrees. Dirty worktrees or unmerged branches require `--force`.\n\nIf a worktree was deleted manually, its retained record can no longer be\nremoved with `clone clean`. Run `clone deep-clean` instead. It scans all saved\nruns for missing worktree paths, prints exactly which records it intends to\nremove, and asks for `y/N` confirmation. Pressing Enter or answering anything\nother than `y` leaves every record untouched.\n\n## Configuration\n\nPlugin options may be supplied as the second item of an OpenCode plugin tuple:\n\n```jsonc\n{\n  \"plugin\": [\n    [\n      \"@dualityinstitute/clone-ai\",\n      {\n        \"ic\": {\n          \"agent\": \"clone-ic\",\n          \"model\": \"anthropic/claude-sonnet-4-6\"\n        },\n        \"manager\": {\n          \"agent\": \"clone-manager\",\n          \"model\": \"anthropic/claude-opus-4-6\",\n          \"extraPrompt\": \"Prefer small changes and preserve public APIs.\"\n        },\n        \"loop\": {\n          \"turnTimeoutMs\": 0,\n          \"compactEveryRounds\": 0\n        },\n        \"git\": {\n          \"worktreeRoot\": \"\",\n          \"branchPrefix\": \"clone/\",\n          \"seedFiles\": [\".env\"]\n        },\n        \"mobile\": {\n          \"enabled\": true,\n          \"host\": \"127.0.0.1\",\n          \"port\": 0,\n          \"publicUrl\": \"https://your-machine.your-tailnet.ts.net\"\n        },\n        \"mcp\": {\n          \"enabled\": true,\n          \"playwright\": true\n        }\n      }\n    ]\n  ]\n}\n```\n\nEmpty model values use the selected OpenCode agent's default model. A default\nworktree root creates sibling `<repository>-clone/` directories. Clone adds\ndirect Exa web search, Context7 documentation, Grep.app code search, and\nPlaywright browser MCP servers when they are not already defined by the active\nOpenCode launcher. Existing definitions win, including an explicitly disabled\nserver. Set `mcp.enabled` to `false` to add none of them, or set\n`mcp.playwright` to `false` to omit only Playwright.\n\nThe bundled direct skills are:\n\n- `clone-playwright` for real browser QA through the Playwright MCP;\n- `clone-frontend-ui-ux` for design direction, responsive behavior,\n  accessibility, interaction states, and visual verification;\n- `clone-git` for status, history, branch safety, and commit planning while\n  leaving deterministic commits to Clone.\n\nThese skills do not start agents. Clone keeps\ntask, teammate, background-agent, question, plan-mode, and Clone-control\npermissions denied under plain `opencode`, `omo`, and `sandbox`. Launcher tools\nremain additive: `omo` can provide LSP, AST-grep, and its other direct tools;\n`sandbox` can provide its physics tools and MCP overrides.\n\nThe skill instructs Clone to download Chromium on first use when needed. To\nprepare it in advance, run:\n\n```bash\nnpx -y @playwright/mcp@latest install-browser chromium\n```\n\n## Security\n\n- The dashboard binds to `127.0.0.1` unless LAN mode is explicitly requested.\n- Pairing tokens are random, single-use, and short-lived.\n- Device sessions use HTTP-only, same-site cookies.\n- Mutating requests require matching origin and CSRF tokens.\n- Tailscale HTTPS is recommended for remote access.\n- Seed paths cannot escape the source repository.\n- Worktrees reduce repository overlap; they are not operating-system sandboxes.\n\nClone can execute commands and modify code using your account's permissions.\nReview changes before merging or deploying them. Repository content and prompts\nmay be sent to your configured model provider.\n","readmeFilename":"README.md"}