Record. Repeat. Diff. Optimize.

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

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)

stripe-payment-flow.osop.yaml
POST /v1/customersapi

Create a Stripe customer with email and metadata.

sequentialPOST /v1/payment_intents
POST /v1/payment_intentsapi

Create a payment intent. Amount, currency, customer ID.

sequentialPOST /v1/payment_intents/{id}/confirm
POST /v1/payment_intents/{id}/confirmapi

Confirm the payment with a payment method.

sequentialGET /v1/payment_intents/{id}
fallbackPOST /v1/payment_intents
GET /v1/payment_intents/{id}api

Verify the payment succeeded.

conditionalAI Generate Receipt
AI Generate Receiptagent

AI generates a personalized receipt email.

The Record / Repeat Loop

the-loop.osop.yaml
osop logcli

Capture a real Claude Code session into .osop + .osoplog from the transcript JSONL.

sequentialosop replay
osop replaysystem

Re-execute the captured .osop with a fresh AI agent via claude -p, producing more .osoplog files.

sequentialosop diff
osop diffagent

Side-by-side compare two .osoplog runs. Per-step duration, cost, status changes.

sequentialosop optimize
osop optimizecli

Feed multiple .osoplog files to AI. It writes a better .osop.

sequentialHuman Reviews
Human Reviewshuman

Accept, modify, or reject. The human decides what lands.

looposop log

Everything serves the two pillars

CLI, editor, SDKs, converters, MCP server, agent integrations. All open source.

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