# Session 020 Log

## What was done
- Deep research across 5 questions: competitive execution, memory/RAG, Rust vs Python, building blocks, wshobson/agents
- 20+ web searches, 10+ deep fetches of specific repos and docs
- Created 5 proposal files in .ievo/backlog/:
  - PROP-2026-03-04-competitive-execution.md
  - PROP-2026-03-04-memory-sqlite-vec.md
  - PROP-2026-03-04-rust-hybrid.md
  - PROP-2026-03-04-wshobson-patterns.md
  - PROP-2026-03-04-building-blocks.md

## Key Findings

### Competitive Execution (Best-of-N)
- MoA (Together AI, 2.9k stars) is the reference implementation -- layered parallel agents + aggregator
- Verdent AI (proprietary) proved it on SWE-bench at 76.1% using git worktrees
- No open-source end-to-end best-of-N framework exists for coding agents -- this is buildable
- moa-llm (52 stars, MIT) is lightweight but aggregation-only, not selection

### Memory & RAG
- sqlite-vec (7.1k stars, MIT/Apache-2.0) is the winner: zero infra, pip install, pure C extension
- Mem0 (48.7k stars) requires external LLM for extraction -- overkill
- Letta (21.4k stars) requires PostgreSQL -- too heavy
- Zep Community Edition deprecated -- cloud only
- Engram (655 stars, Go) has the right MCP memory pattern
- claude-mem (32.8k stars, AGPL-3.0) hooks-based capture, but AGPL license is problematic
- LangMem (1.3k stars, MIT) tight LangGraph coupling
- Phase 1: sqlite-vec + sentence-transformers (all-MiniLM-L6-v2)
- Phase 2: MCP memory server following Engram's 13-tool pattern

### Rust vs Python
- Full Rust rewrite: NO (loses Python AI ecosystem, slows velocity)
- Hybrid: YES (PyO3 for PTY bridge, credential vault, streaming JSON)
- IronClaw (4.1k stars, full Rust) is impressive but wrong model for local CLI
- Pydantic-core pattern: 17x speedup on hot paths via Rust
- portable-pty (2.5M Rust crate downloads) for Rust PTY layer

### Building Blocks
- PTY: pexpect (Phase 1) -> portable-pty via PyO3 (Phase 2)
- Pipeline: transitions (5.6k stars, MIT) state machine, NOT heavy orchestrators
- Plugin: pluggy (1.6.0, MIT) -- pytest's plugin engine
- Credentials: python-keyring (OS keychain) + pyrage (age encryption, PyO3)
- JSON streaming: ijson with yajl2_c backend
- Process supervision: asyncio (built-in), no external supervisor needed

### wshobson/agents
- 30.2k stars, 112 agents, 72 plugins, 146 skills
- 3-tier model strategy: Opus (critical) / Sonnet (complex) / Haiku (fast)
- Progressive disclosure: metadata (always) -> instructions (activated) -> resources (on demand)
- Plugin structure: each domain is isolated directory with agents/ + commands/ + skills/
- Marketplace system with install/browse
- Directly portable patterns: tier field, progressive skill loading, domain plugins

## Artifacts
- Created: PROP-2026-03-04-competitive-execution.md
- Created: PROP-2026-03-04-memory-sqlite-vec.md
- Created: PROP-2026-03-04-rust-hybrid.md
- Created: PROP-2026-03-04-wshobson-patterns.md
- Created: PROP-2026-03-04-building-blocks.md
