Pre-flight Checklist
🔍 Affected Area
TUI (terminal UI)
💡 Problem Statement
PR #505 ships the backend for VS Code Copilot SDD multi-mode — adapter activation, embedded templates, profile generator, injection wiring. After it merges, running gentle-ai → Start installation → VS Code Copilot → SDD multi-mode correctly writes the 10 default .agent.md files.
But the named-profile flow is not reachable from the TUI. The current OpenCode SDD Profiles entry in the welcome menu is hardcoded to OpenCode (internal/tui/screens/welcome.go:41-44, profiles.go:11-19). VS Code users have no way to:
- Create a named profile like
cheap or fast with per-phase model assignments
- See the list of existing VS Code profiles on disk
- Delete a profile and clean up
~/.copilot/agents/sdd-*-{name}.agent.md files
Same business context as #504: with GitHub Copilot moving to AI Credits in June, the per-phase model assignment story is exactly the cost lever enterprise teams need — and right now that story stops at the Go API. Without TUI integration, the feature is invisible to the people who would benefit most.
📦 Proposed Solution
Hybrid approach: keep one set of profile screens, make them adapter-aware. Single ActiveProfileAdapter model.AgentID field threads through the flow.
New backend helper
vscode.DetectVSCodeProfiles(agentsDir) — scans ~/.copilot/agents/sdd-*-{name}.agent.md, returns deduplicated []model.Profile. Mirrors sdd.DetectProfiles for OpenCode.
TUI changes
- New
hasDetectedVSCode() helper and VSCodeProfileList field in Model
- Welcome menu: new conditional entry
VS Code SDD Profiles (N) next to the existing OpenCode entry
- Profiles screen: title and subtitle parameterized by active adapter (
OpenCode vs VS Code)
- ProfileDelete screen: wording adapts (
opencode.json vs ~/.copilot/agents/), and skips the sync step for VS Code (direct file deletion via RemoveVSCodeProfileAgents)
- Profile create: a new
VSCodeModelPickerState driven by the static vscModelEntries table (the 9 Copilot models). Step 1 of create lets the user assign different models per phase, matching what OpenCode profiles already do. On confirm, calls GenerateVSCodeProfileFiles directly (no sync pipeline — VS Code profiles are just files).
- Router:
ScreenProfiles, ScreenProfileCreate, ScreenProfileDelete reused; behavior gated by ActiveProfileAdapter.
After this lands, the flow for a VS Code Copilot user mirrors what OpenCode users have today:
gentle-ai → welcome → VS Code SDD Profiles (0)
Create new profile → name it (e.g. cheap) → pick a model per phase from the Copilot list → confirm
- 10
sdd-*-cheap.agent.md files written to ~/.copilot/agents/ with resolved model: field
- Copilot picks them up immediately
🔄 Alternatives Considered
- Parallel screens (
ScreenVSCodeProfiles, etc.) — doubles screen count and duplicates handler logic, ~600+ LOC and harder to keep in sync.
- Fully generalize the existing screens via interface — requires abstracting the sync pipeline and
SyncOverrides, much more invasive than necessary for two adapters.
- Skip per-phase model picker for V1 — leaves the cost-lever story incomplete. Defeats the AI Credits motivation.
📎 Additional Context
Depends on #504 / PR #505 (backend foundation). This PR is stacked on feat/vscode-copilot-sdd-multimode and will rebase onto main automatically when PR #505 merges.
Expected diff: ~430 LOC (production + tests). Hybrid approach keeps shared screens; only adapter-specific branches diverge.
Pre-flight Checklist
status:approved🔍 Affected Area
TUI (terminal UI)
💡 Problem Statement
PR #505 ships the backend for VS Code Copilot SDD multi-mode — adapter activation, embedded templates, profile generator, injection wiring. After it merges, running
gentle-ai→ Start installation → VS Code Copilot → SDD multi-mode correctly writes the 10 default.agent.mdfiles.But the named-profile flow is not reachable from the TUI. The current
OpenCode SDD Profilesentry in the welcome menu is hardcoded to OpenCode (internal/tui/screens/welcome.go:41-44,profiles.go:11-19). VS Code users have no way to:cheaporfastwith per-phase model assignments~/.copilot/agents/sdd-*-{name}.agent.mdfilesSame business context as #504: with GitHub Copilot moving to AI Credits in June, the per-phase model assignment story is exactly the cost lever enterprise teams need — and right now that story stops at the Go API. Without TUI integration, the feature is invisible to the people who would benefit most.
📦 Proposed Solution
Hybrid approach: keep one set of profile screens, make them adapter-aware. Single
ActiveProfileAdapter model.AgentIDfield threads through the flow.New backend helper
vscode.DetectVSCodeProfiles(agentsDir)— scans~/.copilot/agents/sdd-*-{name}.agent.md, returns deduplicated[]model.Profile. Mirrorssdd.DetectProfilesfor OpenCode.TUI changes
hasDetectedVSCode()helper andVSCodeProfileListfield inModelVS Code SDD Profiles (N)next to the existing OpenCode entryOpenCodevsVS Code)opencode.jsonvs~/.copilot/agents/), and skips the sync step for VS Code (direct file deletion viaRemoveVSCodeProfileAgents)VSCodeModelPickerStatedriven by the staticvscModelEntriestable (the 9 Copilot models). Step 1 of create lets the user assign different models per phase, matching what OpenCode profiles already do. On confirm, callsGenerateVSCodeProfileFilesdirectly (no sync pipeline — VS Code profiles are just files).ScreenProfiles,ScreenProfileCreate,ScreenProfileDeletereused; behavior gated byActiveProfileAdapter.After this lands, the flow for a VS Code Copilot user mirrors what OpenCode users have today:
gentle-ai→ welcome →VS Code SDD Profiles (0)Create new profile→ name it (e.g.cheap) → pick a model per phase from the Copilot list → confirmsdd-*-cheap.agent.mdfiles written to~/.copilot/agents/with resolvedmodel:field🔄 Alternatives Considered
ScreenVSCodeProfiles, etc.) — doubles screen count and duplicates handler logic, ~600+ LOC and harder to keep in sync.SyncOverrides, much more invasive than necessary for two adapters.📎 Additional Context
Depends on #504 / PR #505 (backend foundation). This PR is stacked on
feat/vscode-copilot-sdd-multimodeand will rebase ontomainautomatically when PR #505 merges.Expected diff: ~430 LOC (production + tests). Hybrid approach keeps shared screens; only adapter-specific branches diverge.