Objective
Make OpenCode the hosted browser chat agent instead of ContextGatheringAgent and the current Forma server-side conversation flow.
Current locations
apps/api/context_gathering_api.py:context_gathering_agent() constructs the current agent.
apps/api/context_gathering_api.py:gather_project_context_endpoint() owns the current conversation/build handoff.
apps/web/app/forma-workspace.tsx submits /projects/{project_id}/context/messages, /generate, and /iterate requests.
apps/web/app/forma-workspace/home-chat-view.tsx renders context suggestions, build-now actions, and current progress.
Required behavior
- OpenCode owns the conversation, project authoring, and revision intent.
- Forma owns typed Hardware IR compilation, deterministic validation, rendering, persistence, and revision ownership.
- Use session/message/event APIs backed by durable Vercel records.
- Do not silently fall back to
ContextGatheringAgent, forma.generate_project, or simulated generation.
- If the connector or OpenCode instance is unavailable, return a typed unavailable state.
Acceptance criteria
- The allowed test user can use browser chat to create and modify a project through OpenCode.
- Existing project ownership and revision controls remain enforced.
- Context questions and server-side build handoffs are removed from OpenCode mode.
- Legacy endpoints are either removed from hosted chat or explicitly disabled behind a documented migration flag.
- Browser messages contain only sanitized OpenCode events.
Related
Objective
Make OpenCode the hosted browser chat agent instead of
ContextGatheringAgentand the current Forma server-side conversation flow.Current locations
apps/api/context_gathering_api.py:context_gathering_agent()constructs the current agent.apps/api/context_gathering_api.py:gather_project_context_endpoint()owns the current conversation/build handoff.apps/web/app/forma-workspace.tsxsubmits/projects/{project_id}/context/messages,/generate, and/iteraterequests.apps/web/app/forma-workspace/home-chat-view.tsxrenders context suggestions, build-now actions, and current progress.Required behavior
ContextGatheringAgent,forma.generate_project, or simulated generation.Acceptance criteria
Related