Skip to content

[Spec 0602] VS Code Extension for Codev Agent Farm#656

Merged
waleedkadous merged 8 commits intomainfrom
spir/0602-vscode-extension
Apr 5, 2026
Merged

[Spec 0602] VS Code Extension for Codev Agent Farm#656
waleedkadous merged 8 commits intomainfrom
spir/0602-vscode-extension

Conversation

@amrmelsayed
Copy link
Copy Markdown
Collaborator

@amrmelsayed amrmelsayed commented Apr 3, 2026

Summary

  • SPIR specification for a VS Code extension that integrates Codev's Agent Farm into the IDE as a thin client over Tower's existing API
  • Monorepo setup with npm workspaces (packages/codev + packages/codev-vscode)
  • VS Code extension scaffold with esbuild bundler, verified cross-package imports
  • Two rounds of expert consultation (Gemini 3 Pro, GPT-5.4 Codex, Claude) with all feedback incorporated
  • Updated for v3.0.0 architecture (afx rename, forge system, workspace-scoped routes, EscapeBuffer, layered config)
  • Team feedback incorporated (unified sidebar, editor-area terminals, auto-start Tower)

Key Decisions

  • Thin client: All state stays in Tower/shellper, extension is a viewport
  • Unified Codev sidebar: Single pane with Needs Attention, Builders, PRs, Backlog, Team, Status sections
  • Terminal layout: Architect in left editor group, builders as tabs in right editor group
  • Auto-start Tower: Extension starts Tower as detached daemon on activation
  • Review comments: Snippet + Decorations for V1, full Comments API post-V1
  • Shared packages: Phased extraction — types before V1, API client after
  • Monorepo: npm workspaces with root package.json, cross-package imports verified

Commits

Spec

  • Initial spec draft
  • v3.0.0 updates (afx rename, forge, workspace routes, EscapeBuffer)
  • Second consultation feedback (Gemini, Codex, Claude)
  • PR feedback: unified sidebar, editor-area terminals, auto-start Tower
  • Resolve all open questions (URI scheme, terminal naming)

Infrastructure

  • npm workspaces monorepo setup
  • VS Code extension scaffold (packages/codev-vscode/)
  • Root .vscode/ config (launch, tasks, settings, extensions)
  • Bundler module resolution for cross-package ESM imports

Ref #602

Test plan

  • Team reviews spec for completeness
  • F5 launches extension from monorepo root
  • npm run build in packages/codev still passes
  • npm test in packages/codev still passes (2422 tests)
  • Approve spec to proceed to Plan phase

Comprehensive SPIR spec for integrating Codev Agent Farm into VS Code.

Covers: terminal integration via Pseudoterminal + WebSocket, Work View
TreeView, status bar, Command Palette commands, file link handling,
review comments via Comments API, shell terminals, needs attention,
cloud tunnel status, team view, cron tasks, and analytics Webview.

Includes shared package extraction strategy (codev-types, codev-api-client)
and expert consultation from Gemini 3 Pro and GPT-5.1 Codex.
- Rename all af references to afx (Spec 647)
- Update version from v1.x to v3.x
- Add .codev/config.json layered config system
- Add forge-agnostic language (GitHub/GitLab/Gitea support)
- Add afx spawn --branch support to Spawn Builder command
- Add author attribution (@username) to TreeView items (Spec 637)
- Add EscapeBuffer for incomplete ANSI sequences across WS frames (Bugfix #630)
- Add resize deferral during replay (Bugfix #625)
- Document workspace-scoped vs global API routes in Connection Manager
- Add SSE heartbeat handling (Bugfix #580)
- Expand references with Specs 618, 627, 637, 647
- Architect terminal opens as a side editor (full vertical height) via
  workbench.action.terminal.moveIntoEditor + vertical split
- Builders/shells stay in the bottom terminal panel
- Merge UX walkthrough (browser vs VS Code comparison) into the spec
- Delete standalone walkthrough file
…Claude)

Critical fixes:
- TextDecoder must use { stream: true } for multi-byte Unicode safety
- Review comments use WorkspaceEdit, not Tower fs.writeFileSync endpoint
- Never drop PTY frames — disconnect and reconnect via ring buffer
- WebSocket auth via control message, not query param (prevents log leaks)

Architecture changes:
- Architect editor-split opt-in with panel fallback (undocumented API risk)
- Auth key re-read from disk on 401 for rotation handling
- Workspace path traverses up to .codev/config.json root
- Shared package extraction phased (types before V1, API client after)
- Monorepo workspace prerequisite noted

New sections:
- Error Handling UX
- Extension Settings schema (6 settings)
- Default Keyboard Shortcuts
- Output Channel for diagnostics
- Promote afx open URI scheme to Critical open question
waleedkadous
waleedkadous previously approved these changes Apr 3, 2026
- Extension runs afx tower start as detached process if Tower not responding
- Never auto-stops Tower — daemon outlives VS Code so builders keep running
- Add codev.autoStartTower setting (default: true)
- Resolve open question: auto-start vs manual start
Architect in left group (1 tab), builders + shells in right group
(N tabs). Replaces bottom panel layout. Update diagrams, settings,
and walkthrough to match.
Propose consolidating Work View, Team, and Status into a single
sidebar container with collapsible sections. Includes full-width
layout diagram showing sidebar, architect, and builder groups.
V1: snippet/command to insert REVIEW comments + Decorations API to
highlight existing ones visually. Post-V1: full Comments API with
gutter buttons and threading.
Copy link
Copy Markdown
Contributor

@waleedkadous waleedkadous left a comment

Choose a reason for hiding this comment

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

Approved! Love the codev sidebar idea. On board with everything.

@waleedkadous waleedkadous merged commit 47a78e9 into main Apr 5, 2026
6 checks passed
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.

2 participants