Record what AI does.
Repeat it for free.
OSOP captures any Claude Code session as .osop + .osoplog from real transcript evidence — then re-runs the same path with a fresh AI agent. Collect runs, diff them, optimize the workflow.
Open source · Apache 2.0 · 8 CLI commands · canonical osoplog v1.0 schema
osop log
Capture any Claude Code session into .osop + .osoplog from the real transcript JSONL — every tool call, every timestamp, every output. No LLM self-report.
Optional SessionEnd hook auto-runs `osop log` after every session. Each capture is honest evidence: real timestamps, real tool counts, real failures. The first half of the loop.
osop replay
Re-execute a captured .osop with a fresh AI agent via `claude -p`. Same prompts, same tool sequence, same path — producing a comparable .osoplog you can diff against the original.
Each replay = one more data point for `osop diff` and `osop optimize`. Run a workflow N times to see what's deterministic vs noisy, what got faster, what regressed. The second half of the loop.
See it in action
OSOP uses its own format to explain itself. Click Visual to see the flow. Click .osop to see the YAML.
Stripe Payment Flow (API SOP)
Create a Stripe customer with email and metadata.
Create a payment intent. Amount, currency, customer ID.
Confirm the payment with a payment method.
Verify the payment succeeded.
AI generates a personalized receipt email.
The Record / Repeat Loop
Capture a real Claude Code session into .osop + .osoplog from the transcript JSONL.
Re-execute the captured .osop with a fresh AI agent via claude -p, producing more .osoplog files.
Side-by-side compare two .osoplog runs. Per-step duration, cost, status changes.
Feed multiple .osoplog files to AI. It writes a better .osop.
Accept, modify, or reject. The human decides what lands.
Everything serves the two pillars
CLI, editor, SDKs, converters, MCP server, agent integrations. All open source.
SOP Doc
“It started with wanting to know what the AI did. Then I realized every team has the same problem — processes are invisible. Every API sequence, every company workflow, every human-AI collaboration. If you can't see it, you can't improve it. OSOP makes it visible.”
— Why OSOP exists
Record what AI does. Repeat it for free.
`osop log` captures the session. `osop replay` re-runs it. The two files (.osop + .osoplog) make every Claude Code run a re-runnable, diffable, optimizable workflow.
pip install osop