docs(readme): legendary README — badges, wordmark, session demo, feature matrix, honesty contract
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Showing 1 changed file with +154 and −36
modified
README.md
+154 −36
@@ -5,73 +5,191 @@ Author: Simon-Pierre Boucher | ||
| 5 | 5 | Contact: contact@spboucher.ai |
| 6 | 6 | --> |
| 7 | 7 | |
| 8 | −# KHAELOR | |
| 8 | +<div align="center"> | |
| 9 | 9 | |
| 10 | −**A terminal-native autonomous engineering agent powered by Anthropic.** | |
| 10 | +``` | |
| 11 | +██╗ ██╗██╗ ██╗ █████╗ ███████╗██╗ ██████╗ ██████╗ | |
| 12 | +██║ ██╔╝██║ ██║██╔══██╗██╔════╝██║ ██╔═══██╗██╔══██╗ | |
| 13 | +█████╔╝ ███████║███████║█████╗ ██║ ██║ ██║██████╔╝ | |
| 14 | +██╔═██╗ ██╔══██║██╔══██║██╔══╝ ██║ ██║ ██║██╔══██╗ | |
| 15 | +██║ ██╗██║ ██║██║ ██║███████╗███████╗╚██████╔╝██║ ██║ | |
| 16 | +╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝ | |
| 17 | +``` | |
| 18 | + | |
| 19 | +### The autonomous engineer whose every decision you can replay, fork, and diff. | |
| 20 | + | |
| 21 | +[](https://www.khaelor.sh) | |
| 22 | +[](#development) | |
| 23 | +[](package.json) | |
| 24 | +[](https://www.anthropic.com) | |
| 25 | + | |
| 26 | +[](https://www.khaelor.sh/docs/theming.html) | |
| 27 | +[](https://www.khaelor.sh/docs/events.html) | |
| 28 | +[](https://www.khaelor.sh/docs/phases.html) | |
| 29 | +[](https://www.khaelor.sh/docs/verification.html) | |
| 30 | +[](#the-honesty-contract) | |
| 11 | 31 | |
| 12 | −KHAELOR is not another Claude Code clone. It combines the strongest architectural ideas from Claude Code, Hermes Agent, OpenCode, OpenHands, and mini-swe-agent — with its own architecture and identity, built on one principle: | |
| 32 | +**[Website](https://www.khaelor.sh)** · **[Docs](https://www.khaelor.sh/docs/getting-started.html)** · **[Cookbook](https://www.khaelor.sh/docs/cookbook.html)** · **[The daemon](https://www.khaelor.sh/docs/daemon.html)** · **[Architecture](https://www.khaelor.sh/docs/architecture.html)** | |
| 33 | + | |
| 34 | +</div> | |
| 35 | + | |
| 36 | +--- | |
| 37 | + | |
| 38 | +KHAELOR is **not** another coding-agent clone. It designs before it implements, verifies before it | |
| 39 | +claims done, and writes every action — even the ones at 3 AM — into an append-only log you can | |
| 40 | +audit. **Autonomy without auditability is scary. KHAELOR ships auditable autonomy.** | |
| 13 | 41 | |
| 14 | 42 | ``` |
| 15 | −Understand first. Design second. Implement third. | |
| 43 | +Understand first. Design second. Implement third. Verify always — even at 3 AM. | |
| 16 | 44 | ``` |
| 17 | 45 | |
| 18 | −## Install | |
| 46 | +## ⚡ Install | |
| 19 | 47 | |
| 20 | 48 | ```sh |
| 49 | +curl -fsSL https://www.khaelor.sh/install.sh | sh # hosted installer | |
| 50 | +# or | |
| 21 | 51 | npm install -g khaelor |
| 22 | 52 | ``` |
| 23 | 53 | |
| 24 | −Or via the hosted installer: | |
| 25 | − | |
| 26 | 54 | ```sh |
| 27 | −curl -fsSL https://www.khaelor.sh/install.sh | sh | |
| 55 | +export ANTHROPIC_API_KEY=sk-ant-... | |
| 56 | +cd your-project | |
| 57 | +khaelor | |
| 58 | +``` | |
| 59 | + | |
| 60 | +## 🔥 What a session looks like | |
| 61 | + | |
| 62 | +``` | |
| 63 | + KHAELOR ▸ my-project · main | |
| 64 | + | |
| 65 | + ❯ fix the memory leak in the renderer | |
| 66 | + | |
| 67 | + ├─ symbols "RenderBuffer" · 3 hits · 12ms | |
| 68 | + ├─ refs appendLine · callers · 14 sites | |
| 69 | + ╰─ read src/tui/render.ts · 240 lines | |
| 70 | + | |
| 71 | + ◑ design submitted · 2 files · replace growing buffer with a ring | |
| 72 | + ✓ design auto-approved · 2 files | |
| 73 | + | |
| 74 | + ├─ edit src/tui/render.ts +31 −12 | |
| 75 | + ╰─ edit src/tui/buffer.ts +8 −3 | |
| 76 | + | |
| 77 | + ⟳ verify typecheck ✓ 1.2s · tests ✓ 4.1s · lint ✓ | |
| 78 | + ✓ verified 4.1s | |
| 79 | + | |
| 80 | + ● IMPLEMENT ─ main │ sonnet │ ▰▰▰▱▱▱▱▱ 38% │ in 45k · out 3.2k | |
| 28 | 81 | ``` |
| 29 | 82 | |
| 30 | −## Usage | |
| 83 | +## 🏛️ Six things no other CLI agent does together | |
| 84 | + | |
| 85 | +| | Feature | The point | | |
| 86 | +|---|---|---| | |
| 87 | +| ◐◑● | **[Phase gates](https://www.khaelor.sh/docs/phases.html)** | "Understand → design → implement" is a *runtime mechanism*. Write tools stay locked until a design artifact is approved. `--gate strict\|auto\|off` | | |
| 88 | +| ⟳ | **[Native verification](https://www.khaelor.sh/docs/verification.html)** | After each edit batch KHAELOR runs *your* typecheck/tests/lint itself and repairs failures in a bounded loop — before handing back | | |
| 89 | +| ⑂ | **[Fork · replay · sdiff](https://www.khaelor.sh/docs/fork-replay.html)** | `/fork` any checkpoint. `/replay` a run with another model in a throwaway worktree. `/sdiff` the two runs. *Run it twice, diff the runs* | | |
| 90 | +| ◈ | **[Semantic index](https://www.khaelor.sh/docs/repograph.html)** | `symbols` finds definitions with signatures; `refs` maps callers/callees/importers before an edit. Skeletons instead of whole files | | |
| 91 | +| ✎ | **[Memory with provenance](https://www.khaelor.sh/docs/memory.html)** | The agent maintains `.khaelor/MEMORY.md` itself — every entry anchored to the exact session + event that produced it | | |
| 92 | +| ⇄ | **[Parallel worktrees](https://www.khaelor.sh/docs/worktrees.html)** | `/spawn` subtasks in isolated git worktrees with attenuated capabilities. Supervised `--no-ff` merges. Your working copy is never touched | | |
| 93 | + | |
| 94 | +## 🌙 khaelord — the engineer that lives | |
| 95 | + | |
| 96 | +A persistent daemon with **structured, event-sourced goals** — not a prose checklist: | |
| 31 | 97 | |
| 32 | 98 | ```sh |
| 33 | −export ANTHROPIC_API_KEY=sk-ant-... | |
| 34 | −khaelor # start the interactive TUI in the current project | |
| 35 | −khaelor --model <model-id> # pick an Anthropic model | |
| 36 | −khaelor --print "prompt" # non-interactive: run one agent turn, print the answer | |
| 99 | +khaelord goal add "keep npm deps fresh without breaking changes" \ | |
| 100 | + --type maintain --schedule "0 6 * * 1" --budget 5 --escalation draft-pr | |
| 101 | +khaelord start | |
| 102 | +``` | |
| 103 | + | |
| 104 | +``` | |
| 105 | + 03:12 ● goal deps-fresh check failed → run r7f2 in worktree khaelor/goal-r7f2 | |
| 106 | + 03:14 ◑ design recorded · 3 files · in the log, replayable | |
| 107 | + 03:17 ✓ verified · typecheck ✓ tests ✓ · branch left for review | |
| 108 | + 03:17 spent today: $1.84 / $20 · runs 1/8 | |
| 37 | 109 | ``` |
| 38 | 110 | |
| 39 | −Inside the TUI: | |
| 111 | +Every run: throwaway worktree → phase gates (even at night) → mandatory verification → hard budget | |
| 112 | +ceilings → async approval queue (a suspended run costs **zero**). Every decision: one line in an | |
| 113 | +event log you can replay the next morning. **[→ The daemon](https://www.khaelor.sh/docs/daemon.html)** | |
| 40 | 114 | |
| 41 | −- `/model` `/config` `/permissions` `/context` `/sessions` `/resume` `/new` `/compact` `/cost` `/status` `/diff` `/processes` `/help` `/quit` | |
| 42 | −- `Ctrl+K` — universal command palette | |
| 43 | −- `@` — fuzzy file mentions · `!cmd` — shell mode · `Esc` — interrupt immediately | |
| 44 | −- Type while the agent works — steering messages are queued and injected safely | |
| 115 | +## 🧾 The honesty contract | |
| 45 | 116 | |
| 46 | −## Architecture | |
| 117 | +| | | | |
| 118 | +|---|---| | |
| 119 | +| Costs & tokens | summed from **real API usage metadata** — never estimated, never invented | | |
| 120 | +| Test results | your own commands, real exit codes, errors-first truncation | | |
| 121 | +| History | append-only JSONL, torn-write recovery, **byte-exact replay** | | |
| 122 | +| Permissions | capability-based, deny > ask > allow — **silence is never consent** | | |
| 123 | +| 3 AM decisions | one event log per goal run — `Enter` replays exactly what happened | | |
| 47 | 124 | |
| 48 | −A deliberately small kernel surrounded by services: | |
| 125 | +## 🎛️ Inside the TUI | |
| 49 | 126 | |
| 50 | 127 | ``` |
| 51 | −TUI → Session Engine → Agent Kernel → { Context Engine · Tool Runtime · Model Runtime } | |
| 52 | − Repository Index · Workspace · Permissions | |
| 128 | +/phase /verify /fork /replay /sdiff /memory /spawn /tasks /merge /goals ← v2 | |
| 129 | +/model /config /permissions /context /sessions /resume /new /compact | |
| 130 | +/cost /status /diff /processes /help /quit | |
| 53 | 131 | ``` |
| 54 | 132 | |
| 55 | −- **Event-sourced sessions** — append-only JSONL logs; resume = replay | |
| 56 | −- **First-class streaming** — typed event bus, 16 ms coalesced rendering | |
| 57 | −- **7 powerful tools** — read · write · edit (9-strategy replacer) · grep · glob · bash · process (background process manager) | |
| 58 | −- **Capability-based permissions** — allow/ask/deny with precise, persisted grants | |
| 59 | −- **Context engine** — token-pressure-aware compaction with structured checkpoints, prompt-cache byte-stability | |
| 60 | −- **Custom ANSI renderer** — print-once scrollback, bounded live region, flat memory, sub-millisecond input latency | |
| 133 | +- `Ctrl+K` universal palette · `@` fuzzy file mentions · `!cmd` shell mode · `Esc` interrupt | |
| 134 | +- **Type while it works** — steering messages queue and inject at a safe seam | |
| 135 | +- Theme **khaelis** (obsidian + magma), OKLCH gradients, truecolor → 256 → 16 → mono ladder | |
| 136 | +- `khaelor --doctor-tui` prints detected capabilities *with reasons* · `--splash` for the opening moment | |
| 61 | 137 | |
| 62 | −Design documents live in `docs/` (`ARCHITECTURE.md`, `EVENT_MODEL.md`, `TUI_DESIGN.md`, `TOOL_PROTOCOL.md`, `PERMISSION_MODEL.md`); the Phase 0 reference research lives in `docs/research/`. | |
| 138 | +<details> | |
| 139 | +<summary><b>🏗️ Architecture — a deliberately small kernel</b></summary> | |
| 63 | 140 | |
| 64 | −## Development | |
| 141 | +``` | |
| 142 | + KHAELOR TUI ──── khaelord (daemon) | |
| 143 | + │ │ | |
| 144 | + ▼ ▼ | |
| 145 | + Session Engine (JSONL event log) | |
| 146 | + │ | |
| 147 | + ▼ | |
| 148 | + Agent Kernel ← deriveNext(state) — a pure fold | |
| 149 | + ┌───────────────┼───────────────────┐ | |
| 150 | + ▼ ▼ ▼ | |
| 151 | + Context Engine Tool Runtime Model Runtime | |
| 152 | + (tiers, cache, (permissions, (Anthropic SDK, | |
| 153 | + compaction) phase gate, streaming) | |
| 154 | + │ verify loop) | |
| 155 | + ▼ ▼ | |
| 156 | + RepoGraph Workspace ── the ONLY fs/process seam | |
| 157 | + Memory │ | |
| 158 | + Phases Files · Processes · Git worktrees | |
| 159 | +``` | |
| 160 | + | |
| 161 | +- **40 durable event types** — everything is a fold over the log: the conversation, the costs, | |
| 162 | + the diffs, the phases, even "what should happen next" | |
| 163 | +- **11 tools** — read · write · edit (9-strategy replacer) · grep · glob · bash · process · | |
| 164 | + **design · remember · symbols · refs** | |
| 165 | +- **Custom ANSI renderer** — print-once scrollback, bounded live region, 16 ms coalesced frames, | |
| 166 | + sub-millisecond input latency | |
| 167 | +- Design docs in [`docs/`](docs/) · v2 notes in [`docs/V2_IMPLEMENTATION.md`](docs/V2_IMPLEMENTATION.md) | |
| 168 | + | |
| 169 | +</details> | |
| 170 | + | |
| 171 | +<details> | |
| 172 | +<summary><b>🧪 Development</b></summary> | |
| 65 | 173 | |
| 66 | 174 | ```sh |
| 67 | 175 | npm install |
| 68 | −npm run check # typecheck + lint + tests + mandatory header check | |
| 69 | −npm run dev # run from source | |
| 70 | −npx tsx src/tui/demo.ts # TUI demo with mocked model events | |
| 176 | +npm run check # typecheck + eslint + 698 tests + mandatory header check | |
| 177 | +npm run dev # run from source | |
| 178 | +npx tsx src/tui/demo.ts # TUI demo with mocked model events | |
| 179 | +node website/server.mjs # the docs site, locally | |
| 71 | 180 | ``` |
| 72 | 181 | |
| 73 | −V1 is Anthropic-only by design. The model layer is isolated behind a single `ModelClient` interface — clean architecture, not a provider framework. | |
| 182 | +V1/V2 are Anthropic-only by design. The model layer is isolated behind a single `ModelClient` | |
| 183 | +interface — clean architecture, not a provider framework. | |
| 184 | + | |
| 185 | +</details> | |
| 186 | + | |
| 187 | +--- | |
| 188 | + | |
| 189 | +<div align="center"> | |
| 190 | + | |
| 191 | +**[www.khaelor.sh](https://www.khaelor.sh)** — *run it twice, diff the runs.* | |
| 74 | 192 | |
| 75 | −## Author | |
| 193 | +Simon-Pierre Boucher · [contact@spboucher.ai](mailto:contact@spboucher.ai) | |
| 76 | 194 | |
| 77 | −Simon-Pierre Boucher — contact@spboucher.ai | |
| 195 | +</div> | |
| 78 | 196 | |