|
| 1 | +# Selectable ACP comparison agents |
| 2 | + |
| 3 | +## Traceability |
| 4 | + |
| 5 | +- Spec ID: studio-selectable-acp-compare |
| 6 | +- Status: Implemented |
| 7 | + |
| 8 | +## Intent |
| 9 | + |
| 10 | +Make live Compare easier to inspect and run. A selected file operation should |
| 11 | +show its retained Tool Call result beside that operation, and each fresh lane |
| 12 | +should let the user choose from the ACP Agents that this Studio server can |
| 13 | +actually launch for the current project. |
| 14 | + |
| 15 | +## Acceptance Scenarios |
| 16 | + |
| 17 | +- AC-1: Selecting a Read, Edit, Search, List, Verify, or Run operation expands |
| 18 | + its bounded recorded result inside the same resource row and lane; the view |
| 19 | + does not require the user to correlate a row with a detached page footer. |
| 20 | +- AC-2: Compare exposes one Agent selector per fresh lane. Each option reports |
| 21 | + a stable server-owned id, label, availability, and unavailable reason without |
| 22 | + exposing an arbitrary browser-controlled executable or environment. |
| 23 | +- AC-3: Starting a comparison sends only the selected Agent ids. The server |
| 24 | + rejects unknown or unavailable ids before materializing trials and launches |
| 25 | + each lane with the command and argv registered for that exact id. |
| 26 | +- AC-4: Studio discovers installed, protocol-backed presets for `qodercli |
| 27 | + --acp`, `codex-acp`, `pi-acp`, and `claude-agent-acp`; an environment-specific |
| 28 | + Agent such as DSH can be registered explicitly with a command and argv. |
| 29 | + Missing ACP bridges remain visible as unavailable rather than being treated |
| 30 | + as working Agents. |
| 31 | +- AC-5: Existing single `--acp-agent <command>` startup remains compatible and |
| 32 | + becomes the default selection. Preset discovery is bounded, deterministic, |
| 33 | + and portable across Windows, macOS, and Linux. |
| 34 | +- AC-6: Run evidence and lane headers identify the selected Agent separately |
| 35 | + from the requested model. A mixed-Agent comparison is labelled as such and |
| 36 | + does not claim that Agent identity was held constant. |
| 37 | +- AC-7: Keyboard focus, live status, inline result overflow, and the Agent |
| 38 | + controls remain usable at 1440x900, 1024x768, and 390x844 with no |
| 39 | + document-level horizontal overflow or browser console/page errors. |
| 40 | + |
| 41 | +## Non-goals |
| 42 | + |
| 43 | +- Install ACP adapters or Coding Agent CLIs from a browser action. |
| 44 | +- Treat a plain CLI or SDK as ACP when it does not expose an ACP stdio server. |
| 45 | +- Accept a command, argv, environment, path, or package name from the run API. |
| 46 | +- Infer file access, edits, verification success, or model quality beyond the |
| 47 | + retained canonical Tool Call and runtime evidence. |
| 48 | +- Add a new Coding Agent host support claim to the repository host matrix. |
| 49 | + |
| 50 | +## Plan and Tasks |
| 51 | + |
| 52 | +1. Add a server-owned ACP Agent catalog with stable ids, preset discovery, an |
| 53 | + explicit named-registration CLI contract, and backward-compatible single |
| 54 | + Agent handling. |
| 55 | +2. Project the catalog into the experiment preview, accept one selected id per |
| 56 | + execute lane, validate the bounded mapping, and select the matching executor |
| 57 | + at lane creation time. |
| 58 | +3. Record and stream the selected Agent identity without replacing the lane's |
| 59 | + model identity or leaking executable details. |
| 60 | +4. Add lane Agent selectors to the simple composer and place the selected Tool |
| 61 | + Call result inline in the originating resource row. |
| 62 | +5. Add focused contract, server, model, component/browser, portability, and |
| 63 | + real-Agent tests; then run a read-only qodercli review before commits. |
| 64 | + |
| 65 | +## Test and Review Evidence |
| 66 | + |
| 67 | +- AC-2/AC-3/AC-5: server and CLI tests cover catalog projection, backward |
| 68 | + compatibility, unknown/unavailable ids, browser command omission, and |
| 69 | + lane-specific executor selection. |
| 70 | +- AC-4: discovery tests simulate POSIX and Windows PATH/PATHEXT behavior without |
| 71 | + shell commands; local smoke records which preset executables are available. |
| 72 | +- AC-1/AC-6: component/model tests assert that one selected operation owns its |
| 73 | + inline result and that Agent and model labels remain distinct. |
| 74 | +- AC-3/AC-6: a two-lane fixture run proves two different registered commands |
| 75 | + are selected by lane and retained in canonical run evidence. |
| 76 | +- AC-7: Playwright screenshots and overflow/focus/error checks at the three |
| 77 | + Studio layout widths. |
| 78 | +- Risk: a preset name can overstate support. Availability requires the actual |
| 79 | + ACP entrypoint or explicit server registration; underlying CLI presence alone |
| 80 | + is insufficient for Pi, Claude, or DSH. |
| 81 | +- Risk: dynamic Agent selection adds a treatment axis. The UI and compare-set |
| 82 | + metadata must keep that confounder visible rather than presenting a pure model |
| 83 | + comparison. |
| 84 | +- Risk: browser-controlled process launch could become command injection. The |
| 85 | + request contains allow-listed ids only and process launch continues to use an |
| 86 | + argv array owned by the server. |
| 87 | + |
| 88 | +### Implemented evidence |
| 89 | + |
| 90 | +- Harness, Harness UI, and Studio suites pass 172/172, 31/31, and 291/291; |
| 91 | + generated Langium sources are current and the documentation link graph passes |
| 92 | + 8/8 checks. |
| 93 | +- The Studio Playwright surface passes 10/10 checks across wide, compact, and |
| 94 | + 390px layouts, including one roving Tab stop for Resources/Messages, inline |
| 95 | + result ownership, bounded overflow, and browser console/page-error checks. |
| 96 | +- A live mixed-Agent run selected `qodercli --acp` for AI 1 and `codex-acp` for |
| 97 | + AI 2. Both isolated trials passed, both changed only `README.md`, and their |
| 98 | + evidence records `agent-default` separately from the lane-selected |
| 99 | + `gpt-5.5` model. |
| 100 | +- Local discovery reports Qoder CLI and Codex ACP available. Pi ACP, Claude ACP, |
| 101 | + and DSH remain visible but unavailable because their ACP entrypoints are not |
| 102 | + installed or explicitly configured on this host. |
| 103 | +- A read-only qodercli review found no P1 issues. Its two P2 findings were fixed: |
| 104 | + already-exited Agent cleanup no longer waits through two grace periods, and |
| 105 | + experiment-wide preflight SSE failures are now visible in the Simple UI. |
0 commit comments