Architecture · Rust workspace · MIT · status: pre-release

jilog

An append-only event ledger and nightly learning loop for personal AI infrastructure. jilog watches what your agents actually do, keeps a durable record of it, and surfaces patterns nightly — what the system keeps getting wrong, where prompts are failing, what's worth fixing.

jilog is the observation and structuring layer. LLM synthesis, prompt rewrites, and triage decisions sit one level up — in the agent or workflow that wraps jilog. This keeps it Rust-pure, usable without an API key, and integrable with any agent stack.

Cross-machine and cross-harness by design. Pluggable readers normalize sessions from Claude Code, Amplifier, NanoClaw, or any JSONL agent stack into one Signal type — the same nightly loop runs across all of them. ledger-spool replicates segment files between hosts, giving you one logical event ledger across a fleet (desktop, laptop, cloud worker, agent host) without a server in the middle.

01 What jilog watches

Each scan of session transcripts emits typed Signals. Detectors are simple, deterministic heuristics — no LLM in the loop — so the same input always produces the same signals.

Each signal carries the session_id it came from, so digests and issues link back to the originating conversation.

02 What jilog produces

A nightly run writes a markdown digest and (optionally) files issues to your tracker. The digest layout is byte-stable so downstream tooling can grep it.

digest excerpt

---
date: 2026-05-09
signals_captured: 7
p0_count: 1
corrections: 3
errors: 2
workarounds: 2
---

# Learning Digest — 2026-05-09

## P0 Alerts
- **P0 ALERT**: `bash` failed in 4
  distinct sessions: 0e91a2b4…, 2f1c8d77…,
  8a4b1e09…, c5d76f02…

## Corrections
- `0e91a2b4-…` — 'no, use the gog cli for
  calendar, not osascript'
- `2f1c8d77-…` — 'wrong path — that file is
  in jibrain/atlas, not switchboard/people'

## Errors
- `0e91a2b4-…` / `bash`:
    Command timed out after 30 seconds
- `c5d76f02-…` / `read_file`:
    ~ was not expanded; use $HOME

## Workarounds
- `2f1c8d77-…` pattern=`for now`:
    'Hardcoding the retry count to 3…'

issue filed in beads

{
  "id": "myproj-a1b",
  "title": "[jilog/error] bash:
       Command timed out after 30 seconds",
  "type": "bug",
  "priority": 1,
  "status": "open",
  "labels": ["jilog", "p0", "tool:bash"],
  "body": "Detected by jilog/review on
   2026-05-09. Tool `bash` failed in 4
   distinct root sessions in the last
   24h, exceeding the P0 threshold (3).

   Example sessions:
   - 0e91a2b4-7d3f-…
   - 2f1c8d77-91ab-…
   - 8a4b1e09-3344-…
   - c5d76f02-aabb-…

   First observed message:
   > Command timed out after 30s",
  "source": "jilog/review",
  "created": "2026-05-09T08:02:11Z"
}

On the next nightly run, this issue will be in list_open() and not refiled. Tracker::create dedups against open issues automatically.

03 Two flows, one CLI

jilog has two independent data flows. supervise wraps recurring tasks and feeds the ledger directly. review reads agent session transcripts and emits signals. Both write to the same event ledger; both can be queried.

YOUR WORLD jilog OUTPUTS recurring tasks heartbeats, jobs, pipelines, cron supervise jilog supervise wrap task; emit events: ingest · health · state_change AI sessions ~/.claude/projects ~/.amplifier/projects readers jilog review parse → detect signals corr · err · workaround · p0 📦 event ledger append-only segment files + rebuildable SQLite index durable · integrity-checked query digest + issues jilog query filter ledger events --since · --class 📋 digest + 📂 issues markdown report beads · github · kata

supervise instruments your jobs; review mines your agent transcripts. Both write events to the same ledger. A nightly review also files issues for novel patterns.

04 The mental model

Four layers, top to bottom. Segment files are the source of truth; everything below them is derivable. Nothing generated is ever manually edited.

Intent what your agents are supposed to do · config Event Plane append-only segment files · source of truth crc32 · per-zone · never deleted Projection SQLite index · rebuildable at any time Action jilog CLI · supervise · query · review · issues

05 Pluggable backends

Readers and trackers are independent extension points. Each Reader normalizes its native log format into Vec<Message>; detectors are blind to where the messages came from.

Readers — where session logs live

ReaderScans
claude-code~/.claude/projects/*/ JSONL
amplifier~/.amplifier/projects/*/transcript.jsonl
nanoclawSSH into NanoClaw host, scan session logs
genericAny JSONL matching the jilog signal schema

Trackers — where issues get filed

TrackerBackend
beadsJSONL in .beads/, git-managed
kataLocal SQLite daemon (wesm/kata)
githubgh issue CLI wrapper
noneMarkdown digest only, no issues filed

Configure one or more in jilog.toml; the nightly loop merges signals across all configured readers and writes through to the configured tracker.

06 Crates and event classes

A small Rust workspace with five crates, plus ten core event classes appended to the ledger.

Ten event classes

07 Patterns it surfaces in practice

Drawn from real runs against Amplifier and Claude Code transcripts. The point isn't that any one is interesting in isolation — it's that the same signal across many distinct sessions is a load-bearing operational fact.

08 Commands

jilog supervise # wrap tasks with ledger events + retry
jilog query [--since N] [--json] # filter ledger events
jilog review nightly [--json] # digest + issue filing
jilog review sessions # session-level summary by reader
jilog issues list # open jilog-learning issues
jilog issues pending # learnings not yet filed
jilog rebuild # rebuild SQLite from segments
jilog status # ledger health