The Loop
Execute a workflow. Record what happened. Let AI write a better one. Repeat. Each cycle, your processes get faster, cheaper, more reliable.
.osop defines what should happen. .osoplog records what actually happened. The gap between them is where optimization lives.
pip install osopExecute
Run the .osop workflow with osop run. Agent nodes call real LLMs. CLI nodes run commands. Human nodes wait for approval.
osop run workflow.osop --allow-execRecord
A .osoplog is produced automatically. Every node: duration, cost, status, tool calls, AI reasoning, human decisions.
# .osoplog.yaml generatedSynthesize
Feed multiple .osoplog files to AI. It reads the patterns and writes a better .osop. Slow steps parallelized. Failures handled.
osop synthesize *.osoplog.yamlDiff & Repeat
Compare runs with osop diff. See what got faster, cheaper, or broke. Apply the optimized .osop. Run again. The loop never stops.
osop diff run-v1.osoplog run-v2.osoplogThe tools
osop diff compares runs. osop synthesize writes better workflows from execution data.
osop diff — compare two runs
$ osop diff monday.osoplog tuesday.osoplog Workflow: feature-build Run A: Mon Apr 1 | Run B: Tue Apr 2 Node | Duration | Cost | Status ───────────────────────────────────────────────────────────── plan [AI] | 2.1s → 1.8s | $0.02 → $0.01 | same explore [AI] | 12s → 5.2s | $0.08 → $0.03 | same implement [AI] | 45s → 32s | $0.15 → $0.12 | same type_check [CI] | 3.2s → 3.1s | — | same review [Human] | 120s → 60s | — | same ───────────────────────────────────────────────────────────── Total | 182s → 102s | $0.25 → $0.16 | -44%
osop synthesize — AI writes a better workflow
AI discovered: sessions with planning completed faster.
Read source files in parallel with test exploration.
Understand existing test patterns before writing code.
Generate implementation based on plan and exploration.
Immediate verification. 0% regression rate when done after every edit.
Full test suite.
AI discovered: catches security issues that tests miss.
Only after risk review passes.
9 CLI commands
Everything from scaffolding to synthesis.
osop runExecute with real LLM calls, security gates, cost controls
osop diffCompare two runs or two definitions
osop synthesizeFeed logs to AI, get optimized workflow
osop validateCheck .osop against JSON Schema
osop validate-logCheck .osoplog files
osop initScaffold a new workflow from 5 templates
osop renderGenerate Mermaid, ASCII, or SVG diagrams
osop testRun test cases defined in the workflow
osop reportGenerate HTML execution reports