# ocelkit

A TypeScript toolkit that maps how work runs through software. Designed and built by Adam Amr as part of his bachelor’s thesis in Ulm.

[Visual walkthrough](https://adamamr.me/projects/ocelkit/) · [ocelkit.dev](https://ocelkit.dev/) · [Documentation](https://ocelkit.dev/docs)

## Why Adam made it

Software runs processes all day: an order is placed, confirmed, packed and paid. Seeing how that work really moves needs a record of what happened, and most software doesn’t keep one. The facts are spread across the app’s code, its database, its logs and the other systems it works with. Building the record takes many small decisions, and those decisions usually end up somewhere nobody looks again.

Adam’s thesis starts from the developer’s repository. That is where the code lives, where coding agents already work, and where a small file can state a view of a process and keep it. ocelkit is the toolkit he built around that idea.

## Process files

A process is described in a short TypeScript file. It names the steps that matter and the order they are expected in. Each file asks one question, such as whether customers pay once an order is confirmed or only after a reminder. The file sits next to the code it describes.

## The map

ocelkit reads the records and draws the file as a map, in a workspace that runs on the developer’s machine. The map has three kinds of marks: a box for each step, a line where objects went from one step to the next, and a number for how often they did.

Adam designed the map so that nothing on it has to be taken on trust. Every number is a button that opens the objects it counted, with their times, and every row opens that object. A single order can be followed on its own, with its path drawn across the map and its history replayed one event at a time. When the data can’t say which of two events came first, ocelkit counts those moves apart and never folds them into the rest. Everything that happened in the data and isn’t in the file is listed in a panel of its own, so a map never hides what it leaves out.

## For people and their agents

The same files serve a person and a coding agent. The person reads the map. The agent reads the files and runs a check without a browser. The check compares every name in a process file with the data, so a step an agent made up is reported as an error, with the closest real name beside it. The file is also the state of the work. It stays in the repository, where the person or the next agent can pick it up.

## Rebuilding what happened

Before there is a map, someone has to build the record of events. Adam wanted to know how far a coding agent can be trusted with that, so he built a test where the answer is known.

He set up a real business system as a purchasing company and replayed 15,314 real purchasing steps through it, with its clock set back so that every record carries its original date. Each agent then got a sealed copy of the system, with its code, database, logs and mail, and nothing else. It never saw what had been replayed, and it had nobody to ask. A script compared every rebuilt event with what had really happened.

The agents found over 99.8% of 14,237 actions and made up none. Adam studied how they worked and wrote a short skill for the job from what he saw. How much the agents found stayed the same. What improved was the file they handed back: every run with the skill passed all 24 format checks, where the runs without it passed 18 and 22, and every run tested its own file before reporting. The study covers one system and two models, and Adam reports it that way.

## The documentation

Adam designed and wrote the documentation, and it took longer than anything else. Understanding something, explaining it to someone, and writing it down for a reader who can’t ask are three different jobs. The guides build up one idea at a time, on maps drawn from real example data. One guide teaches the map by letting the reader pick a mark and watch the picture move to it. Another explains how events that share objects are counted, with a diagram the reader steps through while a small light travels from one box to the next.

## Design

Adam designed every surface of ocelkit: the workspace, the landing page and the documentation, each in a light theme and a dark theme that were drawn separately. Much of the work went into things a visitor only half notices: how a panel opens, how a count sits on its line, how a screenshot is framed so the part that matters is large enough to read, and how light moves through a diagram. The three share one visual language, so moving between the landing page, the docs and the workspace feels like staying in one place.
