spb/khaelor Public
KHAELOR — a terminal-native autonomous engineering agent powered by Anthropic.
TypeScript 82.9%
HTML 14.9%
CSS 1.1%
JavaScript 0.7%
1<!doctype html>2<!--3KHAELOR4File: website/public/docs/memory.html5Description: Docs — Auto-maintained project memory with event-anchored provenance: the remember tool, MEMORY.md format, hygiene.6Author: Simon-Pierre Boucher7Contact: contact@spboucher.ai8-->9<html lang="en">10<head>11<meta charset="utf-8">12<meta name="viewport" content="width=device-width, initial-scale=1">13<title>Project memory — KHAELOR docs</title>14<meta name="description" content="Auto-maintained project memory with event-anchored provenance: the remember tool, MEMORY.md format, hygiene.">15<link rel="stylesheet" href="/styles.css">16<script>17(function(){try{var t=localStorage.getItem("khaelor-theme");if(!t&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches)t="light";if(t==="light")document.documentElement.setAttribute("data-theme","light");}catch(e){}})();18</script>19<script defer src="/site.js"></script>20</head>21<body>2223<header class="site-header"><div class="inner">24 <a class="wordmark" href="/"><span class="glyph">❯</span><span class="g-ember">KHAELOR</span></a>25 <nav>26 <a href="/docs/getting-started.html">Docs</a>27 <a href="/#install">Install</a>28 <button id="theme-toggle" type="button" aria-label="Toggle color theme">light</button>29 </nav>30</div></header>3132<main class="page"><div class="docs-layout">3334<aside class="sidebar">35 <div class="group"><div class="group-title">Start</div>36 <a href="/docs/getting-started.html">Getting started</a>37 <a href="/docs/cookbook.html">Cookbook</a>38 </div>39 <div class="group"><div class="group-title">Using KHAELOR</div>40 <a href="/docs/usage.html">The TUI</a>41 <a href="/docs/commands.html">Commands & keyboard</a>42 <a href="/docs/tools.html">Tools</a>43 <a href="/docs/sessions.html">Sessions</a>44 </div>45 <div class="group"><div class="group-title">Autonomy</div>46 <a href="/docs/phases.html">Phase gates</a>47 <a href="/docs/verification.html">Verification</a>48 <a href="/docs/worktrees.html">Parallel worktrees</a>49 <a href="/docs/daemon.html">The daemon</a>50 </div>51 <div class="group"><div class="group-title">Intelligence</div>52 <a href="/docs/repograph.html">Semantic index</a>53 <a href="/docs/memory.html">Project memory</a>54 <a href="/docs/context.html">Context engine</a>55 <a href="/docs/fork-replay.html">Fork · replay · sdiff</a>56 </div>57 <div class="group"><div class="group-title">Control</div>58 <a href="/docs/permissions.html">Permissions</a>59 <a href="/docs/configuration.html">Configuration</a>60 <a href="/docs/cli.html">CLI reference</a>61 </div>62 <div class="group"><div class="group-title">Internals</div>63 <a href="/docs/architecture.html">Architecture</a>64 <a href="/docs/events.html">The event model</a>65 <a href="/docs/theming.html">Theming & terminal</a>66 </div>67 <div class="group"><div class="group-title">Help</div>68 <a href="/docs/faq.html">FAQ & troubleshooting</a>69 </div>70</aside>7172<article class="content">7374<h1>Project memory</h1>75<p class="lead">KHAELOR maintains its own memory of your project — and unlike free-form notes,76every entry is anchored to the exact session and event that produced it.</p>7778<h2 id="cycle">The life cycle<a class="anchor" href="#cycle">#</a></h2>79<ol>80 <li><strong>Write</strong> — when the agent discovers a durable fact (a convention, a build81 command, a pitfall) it calls the lightweight <code>remember</code> tool. Auto-approved: writing82 to <code>.khaelor/MEMORY.md</code> is allowed in every phase, because remembering IS understanding.</li>83 <li><strong>Read</strong> — the file is injected into the instruction tier at every session84 start, alongside <code>KHAELOR.md</code>/<code>CLAUDE.md</code>.</li>85 <li><strong>Audit</strong> — <code>/memory</code> lists entries with their provenance.</li>86 <li><strong>Hygiene</strong> — low-confidence entries not re-confirmed surface as purge87 candidates at the next <code>/compact</code>.</li>88</ol>8990<h2 id="format">The format<a class="anchor" href="#format">#</a></h2>91<pre><code># Project memory9293## Conventions94- Errors flow through Result<T, KError>; never throw in src/core.95 <!-- khaelor: session=01J8K2… tool=toolu_01… confidence=high date=2026-08-10 -->9697## Commands98- Full build: npm run check (includes the mandatory header check).99 <!-- khaelor: session=01J8K2… tool=toolu_02… confidence=high date=2026-08-10 -->100101## Pitfalls102- src/tui/render.ts: never touch the buffer outside the 16ms tick — tearing.103 <!-- khaelor: session=01J8F1… tool=toolu_09… confidence=medium date=2026-08-09 --></code></pre>104<p>Readable, hand-editable, git-versionable. The provenance comment is the differentiator: the105<code>tool</code> id links to a durable <code>tool.requested</code> event in the referenced106session's JSONL — you can open the log and see exactly what the agent had just observed when it107decided to remember.</p>108109<h2 id="tool">The remember tool<a class="anchor" href="#tool">#</a></h2>110<table>111 <tr><th>Param</th><th>Meaning</th></tr>112 <tr><td><code>fact</code></td><td class="wrap">One or two sentences. Durable facts only — never transient task state.</td></tr>113 <tr><td><code>section</code></td><td class="wrap">conventions · commands · pitfalls · architecture · notes.</td></tr>114 <tr><td><code>confidence</code></td><td class="wrap">high · medium (default) · low. Low-confidence entries are purge candidates.</td></tr>115</table>116<p>Each write also emits a durable <code>memory.written</code> event in the current session —117memory changes are themselves part of the auditable history.</p>118119<h2 id="vs">Versus free-form memory files<a class="anchor" href="#vs">#</a></h2>120<p>Plain markdown memories rot: you find a claim and cannot tell when it was true or what justified121it. KHAELOR's memories always answer three questions — <em>who wrote this</em> (which session),122<em>based on what</em> (which event), <em>how sure was it</em> (confidence) — and the hygiene loop123retires what stops being confirmed.</p>124125<div class="pager">126 <div><span class="label">Previous</span><a href="/docs/repograph.html">← Semantic index</a></div>127 <div class="next"><span class="label">Next</span><a href="/docs/context.html">Context engine →</a></div>128</div>129130</article>131</div></main>132133<footer class="site-footer"><div class="inner">134 <span>KHAELOR — Simon-Pierre Boucher · <a href="mailto:contact@spboucher.ai">contact@spboucher.ai</a></span>135 <span>Anthropic-powered · terminal-native by design</span>136</div></footer>137138</body>139</html>140