proposal: kickstart via desktop app (electron)#1045
proposal: kickstart via desktop app (electron)#1045sabbour-squad-lead[bot] wants to merge 9 commits into
Conversation
Captures the design proposal for running Kickstart as an Electron desktop app additive to the Azure SWA deployment. Covers: - Provider matrix (P0 BYOK / P1 Copilot SDK) - Three-path auth wizard (Azure CLI, GitHub Copilot, BYOK) - OpenAI Agents vs Copilot SDK interop analysis - Dual-runtime strategy comparison (Option 1 vs Option 3 shim) - Node.js SDK source validation (§18.9) Status: WIP rev 6. Round 5 (Option 3 shim re-eval) still pending and will land as a follow-up commit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
👀 Squad review trailCurrent head:
|
…ecommend Round 5 re-evaluated the KickstartRunner shim with the corrected Node.js SDK facts from Round 4. Four of six leaky abstraction surfaces are eliminated by native Copilot SDK features (customAgents for handoffs, availableTools/excludedTools, systemMessage.mode=replace, defineTool accepting both Zod and JSON Schema). Only structured output remains as a real leak, and it's already handled by existing resolveOutputText() fallback. Shim total: ~700 lines (vs ~1,160 for Option 1). Pack tool changes: zero. Maintenance lower in 6/8 scenarios. Verdict: RECOMMEND Option 3 (shim). Supersedes the earlier dual-runtime-strategies decision where Option 3 was rejected as premature abstraction. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rev 7 — §18.10 Option 3 Revisited (Round 5 Complete)Verdict: RECOMMEND Option 3 (KickstartRunner shim) ✅ Key ChangesRound 5 re-evaluated the shim option with the corrected Node.js SDK facts from Round 4. Four of the six "leaky abstraction" surfaces identified in rev 5 are now eliminated by native Copilot SDK features:
Surface area: 6 → 2 real leaks. Architecture Impact
Key FindingRev 5 rejected the shim as "premature abstraction that only pays off with a 3rd runtime." That was wrong — the dual-runtime requirement exists today, so the abstraction is justified from day 1. Full details: See §18.10 in the DP (architectecture diagram, 🤖 Posted by sabbour-squad-lead |
## Summary **Task:** Merge `.squad/decisions/inbox/` entries into `.squad/decisions.md`, delete inbox files, and log orchestration. **Files merged (9 entries):** 1. leela-electron-dp-issue-filed.md (2026-04-21) 2. leela-4way-gate-wiring-2026-04-21.md (4-way review gate CI wiring) 3. leela-6h-sprint-calibration-2026-04-21.md (sprint cadence recalibration) 4. leela-electron-dp-committed.md (DP moved to repo, PR #1045) 5. leela-mcp-apps-option-b-dp-v2-review.md (Leela code-quality review, v2) 6. leela-option-3-shim-revisited.md (Option 3 verdict flipped, supersedes earlier Option 1) 7. nibbler-mcp-apps-option-b-dp-v2.md (Nibbler's MCP Apps Option B v2 revision) 8. nibbler-round4-2026-04-21.md (Round 4 PR reviews: #1005, #1000, #1003, #1004) 9. fry-1018-local-media.md (Local-only media assets decision) **Orchestration logs written (not committed, per .gitignore):** - `.squad/orchestration-log/2026-04-21T17-55-00Z-leela-2.md` (Round 5 verdict flip) - `.squad/orchestration-log/2026-04-21T17-55-00Z-leela-3-cancelled.md` (Issue filing, cancelled) - `.squad/orchestration-log/2026-04-21T17-55-00Z-leela-4.md` (Electron DP repo commit) **Session log written (not committed, per .gitignore):** - `.squad/log/2026-04-21T17-55-00Z-electron-dp-committed.md` (Rounds 4–5 summary) ## Gates - ✅ **PRE-CHECK:** decisions.md = 204,100 bytes (far exceeds 20,480), inbox = 9 files - ✅ **DECISIONS ARCHIVE:** No entries older than 2026-03-22; no archival needed - ✅ **DECISION INBOX:** All 9 entries merged; inbox cleared - ✅ **ORCHESTRATION LOG:** 3 agent logs written - ✅ **SESSION LOG:** Rounds 4–5 summary written - ✅ **CROSS-AGENT:** Only Leela worked; no updates needed - ✅ **HISTORY SUMMARIZATION:** Files checked; active sessions contain 2026-04-21 work; no pruning needed - ✅ **GIT COMMIT:** Staged only .squad/decisions.md; deleted inbox files from git ## Notes - `leela-option-3-shim-revisited.md` supersedes `leela-dual-runtime-strategies.md` (not present in decisions.md; no old entry to mark as superseded) - All inbox entries are deduplication-safe; no duplicates found - Orchestration-log and session-log directories are gitignored per squad policy (runtime artifacts only) - Decisions.md growth: +28.5KB from inbox merge (expected for 9 detailed decisions) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Merged 4 inbox files into decisions.md: leela-1030-externalization-rollback (architecture), bender-swa-runtime-forensics (forensics), zapp-1041-dp-review (security approval), nibbler-1041-dp-review (test-plan approval) - Deleted merged inbox files from .squad/decisions/inbox/ - Updated team histories: bender (implementation dispatch), leela (all-approvals milestone), zapp (conditions recorded), nibbler (7 conditions for implementation), fry (summarized @ 15360 threshold) - Production 404 incident root cause: @aks-kickstart/harness in dependencies triggers SWA server-side npm install failure; OTel packages get overwritten; worker crashes on startup - Fix strategy: Revert externalization (restore bundle-everything), delete materialize-api-externals.mjs, lazy-init initializeAppInsights() - All three DP-stage approvals passed: Zapp security (C1: init-first, C2: sanitizeError), Nibbler test-plan (N1-N7: test inversion, lazy-init tests, handler assertions, evidence gates), Leela architectural - Implementation dispatcher: Bender (awaiting PR) - decisions.md before: 238224 bytes, inbox: 4 files; after: 258205 bytes, inbox: 4 files remaining Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- decisions.md: 8 inbox entries merged (leela-swa-architecture, bender-guard-inversion, leela-post-1041-issues, nibbler-mcp-apps-v2.1, user directives for nibbler/zapp Lead roles) - Inbox emptied, deduplicated - Cross-agent history updates: incident #1041 resolution summary (root cause, fix, production verification, follow-ups) - History summaries created for all four squad members (bender, leela, zapp, nibbler) - Decisions captured: SWA deploy architecture, bundle-inline strategy, regression guard inversion rule, post-incident triage Key learning: SWA server-side npm install is a latent deployment hazard. Bundling everything inline is the only safe pattern. Regression guards must be inverted (not deleted) when contracts change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Post-merge curation for PR #1058 (#1050 emit_ui strict-mode fix shipped): - Archive SWA forensic report to decisions-archive.md (decisions.md >= 20480) - Merge 3 decision inbox files into decisions.md (chronological order): - fry-dp-1049: SWA smoke-test hard gate + PR preview re-enable DP v2 - fry-1049: Workflow push via lead token (workflows:write workaround) - fry-1050: emit_ui strict-mode fix approach (remove top-level .describe() calls) - Append orchestration log entries for bender-19 canary reduction and PR #1058 merge - Append session log entry for this curation round - Update cross-agent histories: bender, fry, leela, nibbler, zapp - Summarize 5 agent histories (exceeded 15360-byte gate); retain key learnings **Shipping Status:** - PR #1058 shipped ✅ (emit_ui strict-mode fix deployed) - Issue #1050 closed ✅ - Converse canary dropped from prod deploy (ops directive) ✅ - All decision artifacts curated ✅ Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merged 23 decision inbox entries from the squad members into .squad/decisions.md (rolling 7-day window). Entries include: - #1071 code reviews (Leela, Zapp, Nibbler) - #1062 Layer 0 implementation decision (Bender) - DP amendments and follow-up items - Various observations and audit outcomes Inbox cleared. Scribe duty. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
PR #1072 merged (Closes #1062, #1060, #1061). Squash merge of: - Layer 1: structured event payload bridge (POST /api/converse) - Layer 2: triage branch-on-event prompt rule - Layer 3: createSurface duplicate-create guard Gate labels applied: leela:approved, zapp:approved, nibbler:approved, docs:not-applicable. CI green (all checks SUCCESS or SKIPPED). Zapp re-review completed post-fix (#1079 deferred). Decision merged from inbox to decisions.md. Worktree cleanup: removed .worktrees/1062-client-layers; pruned. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…diagram - Re-surveyed runner.ts, agents-otel-bridge.ts, converse.ts, all 20 function handlers, 3 agent files, emit_ui.ts, appinsights.ts, logger.ts, frontend auth, infra/main.bicep, and workspace layout against DP claims - Fixed minor line-reference drifts: agents-otel-bridge 262→277 lines, Runner.run() start 316→319 - Added substantive reconciliation notes for telemetry migration: API layer moved from classic applicationinsights SDK to pure OTel via @azure/monitor-opentelemetry (classic SDK banned by ESLint). Desktop telemetry guidance updated to match. - Added mermaid flowchart (§1.1): Option 3 target architecture showing Web/Electron deployment fronts, shared KickstartRunner, AgentBackend seam, and auth/provider topology - Added mermaid sequence diagram (§1.1): Electron turn lifecycle through CopilotBackend path - Cross-referenced diagrams from §18.10 - 0 verdict-threatening findings; Option 3 shim recommendation stands Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Electron DP — Rev 8: Reconciliation + Mermaid Architecture DiagramCommit: What changedPart 1 — Reconciled DP with repo code Re-surveyed every critical file referenced in the DP against the actual codebase:
0 verdict-threatening findings. Option 3 (KickstartRunner shim) recommendation stands. Part 2 — Mermaid architecture diagram (§1.1) Added to top of DP (new §1.1): flowchart TB
subgraph web["🌐 Web — SWA (existing, frozen)"]
swa_fe["React 19 + A2UI"]
swa_fn["Azure Functions v4"]
swa_fe -->|"HTTP / SSE"| swa_fn
end
subgraph electron["🖥️ Electron — Desktop (new)"]
e_renderer["BrowserWindow"]
e_server["Local HTTP"]
e_renderer -->|"HTTP / SSE"| e_server
end
subgraph shared["🔷 Shared Runtime"]
runner["KickstartRunner"]
seam["AgentBackend Interface"]
oai["OpenAIBackend"] --> seam
cop["CopilotBackend"] --> seam
end
swa_fn --> runner
e_server --> runner
runner --> seam
(Full diagram in the DP includes subgraphs for above/below the backend seam, auth providers, styling legend, and a sequence diagram for the Electron turn lifecycle.) Drift score: 2 inline fixes, 2 reconciliation sub-notes, 0 verdict-threatening🤖 Posted by sabbour-squad-lead |
Summary
This draft PR moves the Electron Desktop design proposal into the repository as a committed markdown file (docs/design/electron-desktop-dp.md). The DP covers:
Status
🚧 Work in progress (rev 6). Additive deployment — SWA + Functions contract is frozen. Filed as an in-repo DP rather than a GitHub issue so edits flow through normal PR review.
This is WIP — still iterating on Option 1 vs Option 3 (shim) verdict. Round 5 re-evaluation pending and will land as a follow-up commit.
Design Decisions
See
.squad/decisions.mdfor prior decisions related to this effort.🤖 Created by sabbour-squad-lead