Skip to content

docs(acp): spec-driven plan to migrate from the Copilot SDK to ACP - #59

Draft
BOTOOM wants to merge 3 commits into
masterfrom
devin/1786210381-acp-spec
Draft

docs(acp): spec-driven plan to migrate from the Copilot SDK to ACP#59
BOTOOM wants to merge 3 commits into
masterfrom
devin/1786210381-acp-spec

Conversation

@BOTOOM

@BOTOOM BOTOOM commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Description

Docs only — the spec that the ACP refactor will be implemented against. No runtime code changes.

docs/specs/acp/: research + measured protocol evidence, target architecture, requirements with acceptance criteria, a 9-phase roadmap, and 8 ADRs. Plus .agents/skills/acp-client/SKILL.md as the working reference for the protocol layer.

The decisions that shape the whole refactor, and why:

  • ACP v1 now, v2 flagged (ADR-0001). v2 is draft; the SDK's stable entrypoint is PROTOCOL_VERSION = 1, and both agents probed in a spike negotiated v1. Version-specific shapes are confined to acp/normalize/{v1,v2}.ts behind one internal AcpEvent union modelled on v2's upsert semantics, so v1 is the constrained case.
  • The backend is the ACP host (ADR-0002); the extension never speaks ACP. A browser extension cannot spawn subprocesses, own a cwd, or hold credentials.
  • SSE → bidirectional WebSocket JSON-RPC (ADR-0003). Not a preference: session/request_permission is an agent→client request that blocks the turn, and SSE cannot carry it.
  • Every ACP agent, via data not code (ADR-0005). Coverage is tiered: T1 the whole ACP registry (38 agents today, npx/uvx/binary launch specs + sha256); T2 profiles — named launch tuples so variants coexist (devin acp vs devin acp --cloud, copilot --acp --stdio vs --acp --port N, MiniMax's mini-agent-acp, private builds); T3 non-ACP endpoints (LM Studio/Ollama) served by our own ACP agent (ADR-0006); T4 products with no ACP path. Support is then measured: a conformance probe (R-017) runs initialize → prompt → slash command → image → permission → history → cancel against any profile and generates the support table in docs/ACP.md, instead of us hand-integrating agents.
  • Antigravity is T4 on purpose. agy --acp is an open upstream request (google-antigravity/antigravity-cli#31) and Google's terms forbid third-party software using an Antigravity login, so we ship no bridge (R-018). Related risk: Gemini CLI is being transitioned to Antigravity CLI, so the Gemini catalog entry is pinned and treated as at-risk. Copilot cloud likewise has no ACP surface — "Copilot over ACP" means the CLI.
  • origin/feat/acp is superseded, not merged (ADR-0008). Despite the name it contains no ACP — it's an in-house provider layer whose CLI adapter scrapes stdout into synthetic Copilot-shaped events. Three pieces are cherry-picked: the encrypted credential store, the OpenAI-compatible client, and the provider-grouped UI patterns.
  • History is ACP-first, our store becomes a display cache (ADR-0004) rather than being deleted: replay is capability-gated per agent (Copilot has loadSession: true; the SDK example agent answers -32601 to session/list/load/resume), and cross-agent listing must work offline before any agent is spawned.
  • Permissions stop being auto-approved (ADR-0007). Today's approveAll becomes a user prompt with remembered allow_always and an explicit per-agent opt-in for blanket approval.

Spike evidence behind the above (throwaway client, SDK client() + ndJsonStream over spawned subprocesses):

  • copilot --acp --stdio → v1, loadSession: true, promptCapabilities.image: true / audio: false / embeddedContext: true, auth method copilot-login; unauthenticated session/new fails with { code: -32000, message: "Authentication required" }.
  • SDK example agent → v1, -32601 for the history methods (so unsupported ≠ broken: gate on capabilities, don't try/catch), and agent_message_chunks still arrive after session/cancel.

Product consequences called out in the spec, since they aren't just internal: agents must now be installed and authenticated locally (copilot login), a configurable workspace root becomes mandatory because session/new requires an absolute cwd, Copilot ACP fixes reasoning/tool-filtering at server start rather than per session, and every control (models, modes, slash commands, images) becomes capability-driven at runtime.

Roadmap: Phase 1 protocol layer + fixture agent → 2 catalog/profiles/auth → 3 WS gateway + chat → 4 ACP-native UI (MVP) → 5 all-agents catalog + conformance probe → 6 history → 7 local models → 8 remove the Copilot SDK → 9 v2. The SDK path stays behind ACP_ENABLED=false until Phase 4 exits, so master keeps working throughout.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Dependency update

Related Issues

Checklist

  • My code compiles without errors (pnpm typecheck) — docs only, no code touched
  • Linter passes (pnpm lint) — pnpm lint is red on master before this branch (38 pre-existing Biome errors in TS files); this PR adds only Markdown
  • Tests pass (pnpm test) — unaffected
  • I have added tests for new functionality (if applicable)
  • I have updated documentation (if applicable)
  • My changes follow the project coding conventions

Screenshots (if applicable)

n/a

Link to Devin session: https://app.devin.ai/sessions/bab32da5729e4a95a9cb79f1648f005e
Requested by: @BOTOOM

@BOTOOM BOTOOM self-assigned this Aug 8, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
devmentorai-website-cli Ready Ready Preview Aug 10, 2026 2:04pm

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 potential issues.

Open in Devin Review

Comment thread docs/specs/acp/01-research.md Outdated
Comment on lines +291 to +293
- **Q2** Which of the *other* target agents support `session/load`/`session/resume` replay
in practice? Copilot does; the SDK example does not. Determines how much of our local
history we can retire (R-040). Measured per agent during Phase 5.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Referencia cruzada incorrecta a R-040 en la pregunta abierta Q2

La pregunta abierta Q2 vincula la posibilidad de retirar el historial local con R-040, pero en docs/specs/acp/03-requirements.md:258-260 R-040 es "Elicitation (elicitation/create, v2 draft)". Los requisitos que realmente gobiernan el replay y el historial son R-046/R-047 (docs/specs/acp/03-requirements.md:270-279). Como el flujo de trabajo declarado en docs/specs/acp/README.md:20-29 exige trazabilidad por IDs de requisito, una referencia cruzada errónea puede desviar la verificación en la Fase 6.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +294 to +302
**R-050 (P0)** Quick actions (explain/summarise/translate/…) run over ACP.
- AC1 Each quick action produces a streamed answer in the panel. `e2e`

**R-051 (P0)** The writing assistant runs over ACP with inline replacement intact.
- AC1 Selecting text and applying a rewrite replaces it in the page. `e2e`

**R-052 (P0)** Context-aware mode parity per R-032.
- AC1 A page-specific question is answered using page content. `e2e`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Requisitos P0 de paridad funcional sin fase asignada en el roadmap

La sección H define R-050, R-051 y R-052 como P0 (paridad de quick actions, asistente de escritura y modo contextual), pero ninguna fase del roadmap los lista en su bloque "Requirements" (docs/specs/acp/04-roadmap.md:12-104). Lo mismo ocurre con R-061 y R-063. Dado que el roadmap declara que ninguna fase se fusiona con un criterio P0 sin verificar (docs/specs/acp/04-roadmap.md:111), conviene asignarlos explícitamente (probablemente Fase 4) para que no queden fuera del MVP.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread docs/specs/acp/04-roadmap.md Outdated
`openai-compatible.provider.ts` logic from `feat/acp`: streaming, tool calling, and
capability advertisement. Registered as a built-in catalog entry with an endpoint/model
config.
Requirements: R-010 AC3 (as a built-in), plus the A/C/F sets applied to this agent.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 La Fase 7 cita R-010 AC3 para agentes integrados, pero ese criterio cubre agentes personalizados

La Fase 7 dice cumplir "R-010 AC3 (as a built-in)", mientras que R-010 AC3 en docs/specs/acp/03-requirements.md:83 describe un agente definido por el usuario lanzable de extremo a extremo, no una entrada integrada del catálogo. Si el agente propio apps/acp-openai-agent debe registrarse como built-in, falta un criterio de aceptación explícito para ello.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Revisión atendida en 1b58693: Q2 de 01-research ahora referencia R-046/R-047 (no R-040), el roadmap asigna R-050..R-052 a Fase 4 y R-061/R-063 a Fase 1, y se añadió R-010 AC6 como criterio explícito para que apps/acp-openai-agent sea una entrada built-in del catálogo (Fase 7 referencia AC6).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant