Cross-agent process mining

Your agents already wrote down how you work.

Months of agent transcripts are sitting on your disk right now. Nothing reads them. ritual does.

go install github.com/HarjjotSinghh/ritual/cmd/ritual@latest
ritual scan

Scanned
  claude       211 sessions   21200 turns    9123 tool calls  2026-07-02 > 2026-09-19
  codex         39 sessions    2841 turns    1204 tool calls  2026-07-14 > 2026-09-18
  cursor        25 sessions    5016 turns    3676 tool calls  2026-08-02 > 2026-09-15
  opencode      10 sessions    1636 turns     791 tool calls  2026-09-01 > 2026-09-17
  831 task arcs, 215 of them part of a repeating workflow, in 9.8s

Found 6 recurring workflows
  id         score  kind      runs  days  workflow
  360119359c   71   skill       14     9  Verify the storefront after a theme push
             Ran 14 times across 12 sessions in storefront, about daily.
  0248c624a4   64   skill        9     9  Draft the end-of-day update
  0452ba80b6   58   hook         7     6  Run the regression pass after a push
  479d0ebd2b   44   command      6     5  Summarise the open pull requests
  0c5ff3cbbe   31   reference    5     4  Where the billing webhooks are wired
  c54cf75eea   12   ignore       9     2  Read a file, then read another file

  ritual show 360119359c    to read the evidence behind a finding
  ritual install 360119359c to write it into your agents
Example output. Yours will name your own work.

Not another skill generator

Several tools turn Claude Code history into skills. ritual differs in three ways that matter.

01

Every agent, not one

Eleven agents, one normalized shape. A workflow you do in Cursor on Monday and in Codex on Thursday is one workflow, and only a tool that reads both can see it.

02

Where it belongs, not just that it exists

A repeated behaviour can be six different things. Putting it in the wrong one is worse than leaving it alone: a standing preference written as a skill never fires.

03

Receipts on every claim

How many separate days it happened on, which sessions it came from, which steps appeared in what share of runs, and what the score is made of.

The classifier

A repeated behaviour can be six different things

Putting it in the wrong one is worse than leaving it alone. A standing preference written as a skill never fires, because nothing invokes it.

skill

A multi-step procedure with judgement in it.

Where your undocumented decisions live.

command

Two or three steps, run on demand.

A skill would be ceremony around two actions.

rule

A standing preference: always, never, from now on.

A preference you have to invoke is one you will forget.

hook

Work that always follows an event.

You should not have to remember it at all.

reference

The agent keeps rediscovering the same facts.

Write the answer down once.

update

You already have a skill for this.

Adding a second one is how skill directories rot.

There is a seventh verdict. ignore is what a real pattern gets when it is not worth an artifact, and it writes nothing: git status runs a hundred times a week.

No finding is a vibe

Every suggestion carries the transcripts it came from, the days it happened on, and what share of runs each step appeared in. Open one and check it.

ritual show 360119359c

Verify the storefront after a theme push
  skill  score 71/100  cohesion 82%

Canonical sequence
  1. Run `shopify theme push`            14/14 runs
  2. Open the storefront in a browser    13/14 runs
  3. Check the cart and checkout flow    12/14 runs
  4. Read the browser console             9/14 runs

Corrections you had to repeat
  "no, also check it on mobile"          4 sessions
  "use the staging password first"       3 sessions

Evidence
  2026-09-18  claude  ${HOME}/.claude/projects/storefront/4f2c.jsonl
  2026-09-16  cursor  ${HOME}/.cursor/projects/storefront/a81e.jsonl
  2026-09-11  claude  ${HOME}/.claude/projects/storefront/91bd.jsonl
  ... 11 more across 12 sessions

Local-first

Nothing leaves your machine.

Not as a setting you can turn off, but because the input is your entire working history. It contains client code, customer data, internal URLs, and every credential anyone ever pasted into a prompt.

So ritual is a single binary that reads local files and writes local files. Secrets are stripped at the read boundary, home paths become ${HOME}, and the dashboard binds to loopback behind a token.

Read the privacy notes

What there is no code for

  • An account
  • An upload
  • Telemetry
  • A hosted version

The obvious product is a website: run a command, upload the output, get skills back. It will not be built. Asking a developer to upload six months of transcripts is asking them to upload their employer’s source code.

A benchmark that can fail in public

The hard question about a tool like this is whether it finds workflows a person would actually have written down. ritual eval answers it with your own skills as an answer key: for each one you wrote by hand, it re-runs the miner over only the sessions that predate it and checks whether the workflow shows up in the ranking.

ritual eval

It prints how much history predated each skill alongside every result, because a miss with five sessions of history says nothing about the tool.

Where your agents keep their history

Storage layouts move. One file has to change when they do, and a pull request adding an agent is about forty lines.

AgentLocationFormat
Claude Code~/.claude/projects/<slug>/*.jsonlJSONL
Codex CLI~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonlJSONL
Cursor CLI~/.cursor/projects/<slug>/agent-transcripts/**JSONL
OpenCode~/.local/share/opencode/opencode.dbSQLite
Gemini CLI~/.gemini/tmp/<hash>/chats/*.jsonJSON
Grok CLI~/.grok/sessions/<cwd>/<id>/chat_history.jsonlJSONL
Qwen Code~/.qwen/projects/<slug>/chats/*.jsonlJSONL
Kimi Code~/.kimi-code/sessions/**/state.jsonJSON
Copilot CLI~/.copilot/session-state/**/events.jsonlJSONL
Cline~/.cline/tasks/<id>/api_conversation_history.jsonJSON
Pi~/.pi/agent/sessions/<slug>/*.jsonlJSONL

Install

Four ways in

go install github.com/HarjjotSinghh/ritual/cmd/ritual@latest

Builds from source. Needs Go 1.26 or newer.

Then

ritual scan
Read your history and rank what it finds
ritual show <id>
Every run a finding came from, with transcript paths
ritual build <id>
Write the artifact to ~/.ritual/out
ritual install <id>
Install it into your agents
ritual rules
The preferences you keep restating
ritual ui
The same report in a browser, served from localhost
ritual agents
Where ritual looked, and what it found
ritual eval
Would it have found the skills you wrote by hand?

Questions worth asking before you run it