|
| 1 | +# World's Best CLI - Improvement Plan |
| 2 | + |
| 3 | +## Current State Analysis |
| 4 | + |
| 5 | +Hawk is already a sophisticated AI coding agent with: |
| 6 | +- 200+ built-in tools |
| 7 | +- Bubble Tea TUI with slash commands |
| 8 | +- Multi-provider support via eyrie |
| 9 | +- Session persistence & recovery |
| 10 | +- Plugin system |
| 11 | +- Shell completions (bash/zsh/fish/powershell/json) |
| 12 | +- Man page generation |
| 13 | +- Container sandboxing |
| 14 | + |
| 15 | +## Competitive Analysis: Top OSS AI Coding Agents (2024-2025) |
| 16 | + |
| 17 | +| Agent | Stars | Language | Key Strengths | CLI/UX Patterns | |
| 18 | +|-------|-------|----------|---------------|-----------------| |
| 19 | +| **Aider** | 45.8k | Python | Git-native, multi-model, voice, IDE integration, /help with rich commands | REPL-first, slash commands, verbose flags, pipe-friendly | |
| 20 | +| **OpenHands** | 75.9k | TypeScript/Go | Web UI + headless, agent skills, runtime containers, eval harness | Web-first, headless API, skill marketplace | |
| 21 | +| **Continue** | 33.6k | TypeScript | IDE-native (VSCode/JetBrains), custom models, checks/CI | IDE sidebar, slash commands, config-driven | |
| 22 | +| **SWE-agent** | 19.4k | Python | Issue-to-fix automation, NeurIPS 2024, cybersecurity focus | Config YAML, single-command runs, docker-native | |
| 23 | +| **Open Interpreter** | 63.8k | Python | OS-level control, local execution, vision, voice | REPL, `interpreter -c`, multi-language | |
| 24 | + |
| 25 | +### Common World-Class Patterns Identified: |
| 26 | +1. **REPL mode** — `aider`, `open-interpreter` default to REPL, TUI optional |
| 27 | +2. **Pipe/JSONL streaming** — All support structured output for scripting |
| 28 | +3. **Config-driven** — YAML/TOML configs with full schema + env override |
| 29 | +4. **Skill/Plugin marketplace** — OpenHands skills, Continue checks, Aider conventions |
| 30 | +5. **Multi-model routing** — Aider's model aliases, Continue's custom models |
| 31 | +6. **Voice/TTS integration** — Aider voice-to-code, Open Interpreter voice |
| 32 | +7. **Watch/daemon modes** — File-watch auto-re-run, background servers |
| 33 | +8. **Git-native workflow** — Aider auto-commits, diff preview, branch mgmt |
| 34 | +9. **Rich help system** — Interactive `/help`, command palette (Cmd+K) |
| 35 | +10. **Onboarding wizard** — First-run setup, API key config, model picker |
| 36 | + |
| 37 | +## Gaps to World-Class |
| 38 | + |
| 39 | +### Phase 1: Performance & Startup Optimization |
| 40 | +- [ ] Sub-100ms cold start (lazy-load heavy deps) ✓ **started** |
| 41 | +- [ ] Background catalog/credential warming |
| 42 | +- [ ] Binary size optimization (`-ldflags="-s -w"`, trim debug) |
| 43 | +- [ ] Startup profiling ✓ **implemented `--startup-profile`** |
| 44 | + |
| 45 | +### Phase 2: Enhanced Discoverability & UX |
| 46 | +- [ ] **Interactive onboarding wizard** (`hawk init` — API keys, model picker, sandbox) |
| 47 | +- [ ] **Context-aware slash command suggestions** (fuzzy, frequent, project-aware) |
| 48 | +- [ ] **Built-in tutorial mode** (`hawk --tutorial` interactive walkthrough) |
| 49 | +- [ ] **Better error messages** with actionable fixes (did-you-mean, doc links) |
| 50 | +- [ ] **Command palette** (Cmd/Ctrl+K) — fuzzy search all commands/tools/skills |
| 51 | +- [ ] **Rich `/help`** with categories, examples, search (like Aider) |
| 52 | + |
| 53 | +### Phase 3: Advanced Shell Integration (HIGHEST IMPACT) |
| 54 | +- [ ] **REPL mode** (`hawk -p "prompt"` without TUI, streaming JSONL) — like Aider |
| 55 | +- [ ] **Pipe-friendly JSONL streaming** (`hawk -p "fix" --json | jq ...`) |
| 56 | +- [ ] **Watch mode** (`hawk watch "fix tests"` auto-re-runs on file changes) |
| 57 | +- [ ] **Shell widget/integration** (fzf-style inline picker, atuin-style history sync) |
| 58 | +- [ ] **Alias system** for common workflows (`hawk alias fix-tests="test ./..."`) |
| 59 | +- [ ] **Daemon/API server** (`hawk serve` — REST/SSE for IDE integrations) |
| 60 | + |
| 61 | +### Phase 4: Extensibility & API |
| 62 | +- [ ] **Lua/JS/WASM plugin runtime** (sandboxed, hot-reload) |
| 63 | +- [ ] **Tool protocol** for external tools (stdio/HTTP — like MCP but simpler) |
| 64 | +- [ ] **Hooks system** (pre/post tool, session events, config change) |
| 65 | +- [ ] **Configuration schema** with validation (JSON Schema → Go types) |
| 66 | +- [ ] **Skill marketplace** (install from GitHub/registry, versioned) |
| 67 | + |
| 68 | +### Phase 5: Reliability & Data Integrity |
| 69 | +- [ ] **CRDT-based session sync** for multi-device |
| 70 | +- [ ] **Undo/redo** at session level (tool call granularity) |
| 71 | +- [ ] **Automatic backup** before destructive ops (git commit, file snapshot) |
| 72 | +- [ ] **Crash recovery** with WAL ✓ **started** |
| 73 | + |
| 74 | +### Phase 6: Accessibility & Polish |
| 75 | +- [ ] **Screen reader support** (ARIA in TUI, semantic markup) |
| 76 | +- [ ] **High contrast themes** (WCAG AA) |
| 77 | +- [ ] **Reduced motion** option |
| 78 | +- [ ] **i18n framework** (gettext-style, locale files) |
| 79 | + |
| 80 | +## Priority Order (Updated from Competitive Analysis) |
| 81 | +1. **Phase 3: REPL + Watch + JSONL** — highest user impact, matches Aider/OpenInterpreter default UX |
| 82 | +2. **Phase 1: Performance** — foundation, sub-100ms target |
| 83 | +3. **Phase 2: Onboarding + Help + Command Palette** — critical for adoption |
| 84 | +4. **Phase 4: Plugin Runtime + Tool Protocol** — ecosystem growth |
| 85 | +5. **Phase 5: Reliability** — trust, production readiness |
| 86 | +6. **Phase 6: Accessibility** — inclusion |
| 87 | + |
| 88 | +## Implementation Notes |
| 89 | +- **REPL mode** can reuse `runPrint()` with streaming JSONL output |
| 90 | +- **Watch mode** uses `fsnotify` + debounce + session resume |
| 91 | +- **Command palette** extends existing `CommandPalette` in chat_model.go |
| 92 | +- **Plugin runtime** — evaluate `wazero` (WASM) or `go-lua`/`gopher-lua` |
| 93 | +- **Config schema** — `go-jsonschema` + codegen for type-safe Settings |
0 commit comments