Skip to main content

One Log of Everything

Share

Share this page

Pass it to someone who needs it.

Star on GitHub

Key takeaway: Log everything in one append-only ledger

Reports tell you what an agent found this morning. A ledger tells you everything that has ever happened, in order. You will not need it on day one, but the first time you ask "what led to this?" and cannot answer, this is the missing piece.

9.14.1Events are the nervous system

Underneath the folders and the agents, you keep a ledger: one running log of events.

A deploy happened. A signup came in. An alert fired, a warning that something is wrong. A job finished.

Every meaningful thing writes one line:

2026-07-10T08:00Z job.finished growth-daily ok 2026-07-10T08:14Z signup user=4821 2026-07-10T09:02Z alert.fired errors spiking

It is not a report you read top to bottom. It is the raw record the whole system pulses through, the thing everything else can look back at.

9.14.2Append only, never edit

The ledger has one rule that makes it trustworthy: you only ever add to it. You never rewrite a line.

That is what lets you reconstruct exactly what happened, and in what order, weeks later when something broke. You get the truth, not a summary someone tidied up. Its value is that nobody got to clean it.

9.14.3One place, both worlds

The real power shows up when your local work and your live service write to the same ledger. The way it works is one small rule: everything that logs an event calls the same single writer. The agent on your laptop and the app in production both append through one door, so there is one stream and not two.

Laptop and production both append through one writer, so there is one timeline, not two.

Now you have a single timeline of the whole system, machine and human, code and business, in one order. This is the third and last record surface, and each of the three has one job:

  • Status file: a department's current truth.
  • Report: one run's findings, written for you.
  • Ledger: the raw timeline for looking back.

When you ask "what led to this," the ledger is the one place to look.

9.14.4The ledger makes reflexes possible

A durable stream of events is not only for looking back. It is the surface an agent can watch, so it can react the instant a certain event lands. That is the next chapter.

Hint: you do not need a ledger while it is just you and a few daily agents. Add one when you cannot answer "what led to this," or when you want agents that react to events. Your plain log is the simple version; at scale the industry standard for this is OpenTelemetry, which records the same kind of timeline in a format built for it.

9.14.5Start your ledger

This prompt gives your system a memory of its own history:

Ready prompt
Act as a senior engineer adding an event log to my system. Read my operating base first: the departments, the scheduled jobs, and the status files already there, so the events you log are ones my system really emits. Create one append-only file in my control folder that my agents write a single line to whenever something meaningful happens (a job finished, a signup, an alert). Give each line a timestamp, an event name, and a short detail. Never edit past lines, and never duplicate what my status files or decision log already hold. Then add one line to my decision log naming what gets logged and what deliberately does not. If you need the full reasoning behind this step, read https://zalt.me/guides/vibe-coding/ai-os/event-ledger My system and the events worth logging:

Do this now: paste the prompt, start the log, and have one of your scheduled agents append a line every time it runs.

Mahmoud Zalt

Mahmoud Zalt

Software engineer, 16+ yrs · built Sistava.com in 3 months, idea to production, using these methods

Resources
Star on GitHubContribute
Donate

Support my work

A small tip keeps the free work coming.

© 2026 Mahmoud Zalt. Free to read, not to republish.
Copyright & license