From 0f22cb4450087dfa3999815573d6b197b1f2bab0 Mon Sep 17 00:00:00 2001 From: Affaan Mustafa Date: Sun, 22 Mar 2026 15:50:32 -0700 Subject: [PATCH] docs: add ECC 2.0 reference architecture from competitor research Summarizes patterns from superset-sh/superset (Electron, 7.7K stars), standardagents/dmux (Ink TUI, 1.2K stars), and others. Defines the three-layer architecture (daemon + runtime + TUI) and patterns to adopt. --- docs/ECC-2.0-REFERENCE-ARCHITECTURE.md | 54 ++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 docs/ECC-2.0-REFERENCE-ARCHITECTURE.md diff --git a/docs/ECC-2.0-REFERENCE-ARCHITECTURE.md b/docs/ECC-2.0-REFERENCE-ARCHITECTURE.md new file mode 100644 index 00000000..691e02a3 --- /dev/null +++ b/docs/ECC-2.0-REFERENCE-ARCHITECTURE.md @@ -0,0 +1,54 @@ +# ECC 2.0 Reference Architecture + +Research summary from competitor/reference analysis (2026-03-22). + +## Competitive Landscape + +| Project | Stars | Language | Type | Multi-Agent | Worktrees | Terminal-native | +|---------|-------|----------|------|-------------|-----------|-----------------| +| **ECC 2.0** | - | Rust | TUI | Yes | Yes | **Yes (SSH)** | +| superset-sh/superset | 7.7K | TypeScript | Electron | Yes | Yes | No (desktop) | +| standardagents/dmux | 1.2K | TypeScript | TUI (Ink) | Yes | Yes | Yes | +| opencode-ai/opencode | 11.5K | Go | TUI | No | No | Yes | +| smtg-ai/claude-squad | 6.5K | Go | TUI | Yes | Yes | Yes | + +## Three-Layer Architecture + +``` +┌─────────────────────────────────┐ +│ TUI Layer (ratatui) │ User-facing dashboard +│ Panes, diff viewer, hotkeys │ Communicates via Unix socket +├─────────────────────────────────┤ +│ Runtime Layer (library) │ Workspace runtime, agent registry, +│ State persistence, detection │ status detection, SQLite +├─────────────────────────────────┤ +│ Daemon Layer (process) │ Persistent across TUI restarts +│ Terminal sessions, git ops, │ PTY management, heartbeats +│ agent process supervision │ +└─────────────────────────────────┘ +``` + +## Patterns to Adopt + +### From Superset (Electron, 7.7K stars) +- **Workspace Runtime Registry** — trait-based abstraction with capability flags +- **Persistent daemon terminal** — sessions survive restarts via IPC +- **Per-project mutex** for git operations (prevents race conditions) +- **Port allocation** per workspace for dev servers +- **Cold restore** from serialized terminal scrollback + +### From dmux (Ink TUI, 1.2K stars) +- **Worker-per-pane status detection** — fingerprint terminal output + LLM classification +- **Agent Registry** — centralized agent definitions (install check, launch cmd, permissions) +- **Retry strategies** — different policies for destructive vs read-only operations +- **PaneLifecycleManager** — exclusive locks preventing concurrent pane races +- **Lifecycle hooks** — worktree_created, pre_merge, post_merge +- **Background cleanup queue** — async worktree deletion + +## ECC 2.0 Advantages +- Terminal-native (works over SSH, unlike Superset) +- Integrates with 116-skill ecosystem +- AgentShield security scanning +- Self-improving skill evolution (continuous-learning-v2) +- Rust single binary (3.4MB, no runtime deps) +- First Rust-based agentic IDE TUI in open source