An autonomous engineer whose every decision is an event you can replay, fork, and diff.
KHAELOR designs before it implements, verifies before it claims done, and writes every action — even the ones at 3 AM — into an append-only log you can audit. Autonomy without auditability is scary. KHAELOR sells auditable autonomy.
curl -fsSL https://www.khaelor.sh/install.sh | sh
KHAELOR ▸ my-project · main
❯ fix the memory leak in the renderer
├─ symbols "RenderBuffer" · 3 hits · 12ms
├─ refs appendLine · callers · 14 sites
╰─ read src/tui/render.ts · 240 lines
◑ design submitted · 2 files · replace growing buffer with a ring
✓ design auto-approved · 2 files
├─ edit src/tui/render.ts +31 −12
╰─ edit src/tui/buffer.ts +8 −3
⟳ verify typecheck ✓ 1.2s · tests ✓ 4.1s · lint ✓
✓ verified 4.1s
● IMPLEMENT ─ main │ sonnet │ ▰▰▰▱▱▱▱▱ 38% │ in 45k · out 3.2k◐◑● Phase gates
“Understand → design → implement” is a runtime mechanism, not a slogan. Write tools stay
locked until a design artifact — goal, approach, files, risks, verification — is approved.
Small designs auto-approve; big ones ask you. --gate strict|auto|off.
⟳ Native verification
After each edit batch, KHAELOR runs your typecheck, tests, and lint itself — in parallel —
and repairs failures in a bounded loop before handing back. No PR-shaped guesses:
.khaelor/verify.json or auto-detected.
⑂ Fork · replay · sdiff
Every session is an append-only event log. /fork any checkpoint,
/replay a run against another model in a throwaway worktree, then
/sdiff the two runs — turns, tool calls, files, tokens. Run it twice, diff the runs.
◈ Semantic index
A RepoGraph over your codebase: symbols finds definitions with signatures,
refs maps callers, callees, and importers before an edit. Skeletons instead of
whole files — exploration for a fraction of the tokens.
✎ Memory with provenance
The agent maintains .khaelor/MEMORY.md itself — conventions, commands, pitfalls —
and every entry is anchored to the exact session and event that produced it.
You always know why it believes something.
⇄ Parallel worktrees
/spawn runs subtasks in isolated git worktrees with attenuated capabilities and
their own child sessions. Supervised --no-ff merges; conflicts abort cleanly.
Your working copy is never touched.
No spinner theater, no screen flicker — a print-once scrollback, a bounded live region, and a 16 ms frame budget. Here is what your day actually looks like.
❯ /f
╭──────────────────────────────────────────╮
│ /fork fork this session at a checkpoint │
│ /diff working-tree changes │
│ /verify run the verify checks now │
│ /config resolved configuration │
╰──────────────────────────────────────────╯/ — fuzzy filtering, descriptions,
keyboard-only. Ctrl+K opens the same registry as a universal palette. ❯ refactor @ker
╭──────────────────────────────────────────╮
│ src/agent/kernel.ts │
│ tests/agent/kernel.test.ts │
│ docs/research/KERNEL_NOTES.md │
╰──────────────────────────────────────────╯@ opens fuzzy repository search backed by the
live index; selection inserts a structured reference, not a pasted file. ╭─ KHAELOR requests permission ──────────────╮
│ Run │
│ npm install │
│ │
│ Working directory ~/dev/my-project │
│ [Enter] allow once │
│ [a] always allow in this project │
│ [Esc] deny │
╰────────────────────────────────────────────╯process.execute,
git.modify, network.access…), deny > ask > allow. The
interaction takes milliseconds; silence is never consent. edit · src/kernel/dispatch.ts +8 −3
42 │ if (!grant) {
43 │− throw new PermissionError(cap);
43 │+ return Result.err(new PermissionError(cap));
44 │+ // phase gate: blocked in understand
⋮ 2 hunks folded — [x] expandd expands any edit instantly;
/diff goes full-screen side-by-side. processes
● 3121 npm run dev running 04:32
● 3198 pytest -x running 00:18
○ 3012 npm test exited code 0
the agent starts a dev server, keeps editing,
reads its output, runs tests — nothing blocks sdiff
01J8K2… (sonnet) 01J8K9… (haiku)
agent turns 12 17
tool calls 34 61
files modified 2 3
tokens (in/out) 145k / 12k 210k / 19k
verify failures 0 2
outcome completed completed
files only in B: src/c.ts/replay a run with another model, then /sdiff the two logs. cost · this session (real API usage)
per turn ⣀⣄⣤⣶⣿⣷⣄⣀⣠⣤
requests 14
input tokens 145,032 cache-read 118,240
output tokens 12,884
total $2.14 (with configured pricing) memory · .khaelor/MEMORY.md (4 entries)
Conventions
· errors flow through Result<T,KError> [high · 2026-08-10 · session 01J8K2…]
Commands
· full build: npm run check [high · 2026-08-10 · session 01J8K2…]
Pitfalls
· never touch render buffer off-tick [medium · session 01J8F1…]
1 low-confidence entry — purge candidate at next /compact tasks
● fix-auth-bug ◑ design $0.42 ⠹ edit…
✓ add-rate-limit done +118 −24 · verify ✓
○ deps-update (goal) idle · next run 06:00
merge a finished task with /merge (--no-ff, supervised) ⟳ verify typecheck ✓ 1.2s · tests ✗ · lint ✓
FAIL src/context/engine.test.ts
→ compaction preserves running processes
KHAELOR is repairing the failure…
├─ edit src/context/compaction.ts +6 −2
⟳ verify typecheck ✓ · tests ✓ 5.3s · lint ✓
✓ verified 5.3s ─── Here is the fix ───────────────────────
The leak came from `appendLine` growing the
buffer unboundedly. Ring buffer instead:
╭─ typescript ───────────────────────╮
│ export class RingBuffer { │
│ constructor(capacity: number) {} │
│ } │
╰────────────────────────── ⏎ copy ──╯ ├─ bash npm test · running · 12s
❯ also update the CHANGELOG
⋯ 1 queued — injected at the next safe seamA persistent daemon with structured, event-sourced goals — not a prose checklist. Each run gets a throwaway worktree, phase gates even at night, mandatory verification, hard budget ceilings, and an asynchronous approval queue: a suspended run costs zero.
$ khaelord goal add "keep npm deps fresh without breaking changes" \
--type maintain --schedule "0 6 * * 1" --budget 5 --escalation draft-pr
$ khaelord start
khaelord running — project ~/dev/my-project
03:12 ● goal deps-fresh check failed → run r7f2 in worktree khaelor/goal-r7f2
03:14 ◑ design recorded · 3 files · in the log, replayable
03:17 ✓ verified · typecheck ✓ tests ✓ · branch left for review
03:17 spent today: $1.84 / $20 · runs 1/8Other agents give you an assistant that lives. KHAELOR gives you an engineer that lives — and whose every nocturnal decision is an event you can replay, fork, and diff the next morning.
understand · design · implement · verify always — even at 3 AM
╭─ ◑ DESIGN — approval required ─────────────────────────╮
│ Goal Fix the renderer memory leak │
│ Files src/tui/render.ts · src/tui/buffer.ts │
│ Approach Replace the growing buffer with a ring… │
│ Risks ▪ scrollback regression (medium) │
│ Verify vitest run tests/tui + manual demo │
├────────────────────────────────────────────────────────┤
│ [a] approve [r] reject │
╰────────────────────────────────────────────────────────╯| KHAELOR | |
|---|---|
| Costs & tokens | summed from real API usage metadata — never estimated, never invented |
| Test results | your own commands, real exit codes, errors-first truncation |
| History | append-only JSONL, torn-write recovery, byte-exact replay |
| Permissions | capability-based (file.write.project, git.modify, network.access…), deny > ask > allow, silence is never consent |
| 3 AM decisions | one event log per goal run — Enter on a run replays exactly what happened |
curl -fsSL https://www.khaelor.sh/install.sh | sh
export ANTHROPIC_API_KEY=<your key>
cd your-project
khaelor