← The Loop
· WEEK 30 · 4 min

Building Spectroscope, part 1: it started with a habit of watching

TL;DR

Before there was a product, there was a 300-line habit: split every agent session into a reading view and an audit trace. One parse produces two views, and no LLM sits anywhere in the loop. Everything since grew out of that split.

Spectroscope is an agent orchestrator you can watch. I built it over eight weeks with AI agents doing most of the typing, and this series is the story of how that went, measured afterwards by the product's own instrument. Six parts, starting where it actually started: not with a harness, but with a habit of mine.

Every Claude Code run leaves a JSONL session log behind. Most people never open those files. I kept opening them, and the first artifact of this whole story is claude_chat_archiver, a small offline tool that takes that raw stream and, from a single parse, splits it two ways:

the splitstdout
raw session JSONL
   |
   |  parsing.parse_session   (one pass, deterministic, no LLM)
   |
   +--> reading view   the conversation as a person wants to read it
   +--> audit trace    everything the reading view throws away:
                       every tool call, every thinking step,
                       every permission gate, every error
fig. 01 — One source, read two ways. The views cannot drift apart, because they are the same events, filtered differently.

The conviction under that split is that an agent run should be observable, replayable and explainable. It is the same conviction that later shipped as a product. The archiver already treated the raw stream as worth keeping whole. A spectroscope reads, from pure light alone, what a star is made of, and this tool does the same with an event stream. The metaphor came later. The method came first.

the analogyimage
The spectroscope analogy as a diagram
fig. 02 — A raw stream of identical-looking JSON lines enters a prism and comes out dispersed: tokens, tool calls, the permission gate, sub-agents, lifecycle. The same run, read as a spectrum.

Two details from the record, because this series quotes its sources rather than romanticizing them. First: the archiver's own files are stamped 2026-05-30, but its first git commit is dated a month later. The project's story cites both dates instead of reconciling them, because where the record is ambiguous, you say so. Second: the archiver was later pointed at its own corpus to compute turn-exact behavioural metrics. That reflex of turning the instrument on itself comes back at the end of this series, five parts from now.

the audit traceimage
Screenshot of the audit trace view
fig. 03 — The trace view: what the reading view throws away, kept whole.

What I'd do differently

Commit from day one. The month between the first files and the first commit is a hole in the record that nothing can fill retroactively. The story of that period exists only because the session logs survived, and that is the lesson in one sentence: the stream remembers what I don't.