Build a self-improving agent loop in one sentence:
Build me a workflow that loops over each project in my GitHub and
saves a summary of its open issues. After the loop is done, the
workflow runs self-improve on itself.
Or don't do that β just ask Claude or Codex for any one-off task of any size, like you normally would. Every request autoroutes to the smallest subagent-driven workflow that can prove it's done: a one-line answer stays a one-line answer; a product-sized build gets a frozen spec, tickets, parallel subagents, and a verification gate. 37 composable skills. Claude Code and Codex, Windows and POSIX. By default the planner/reviewer subagent is Fable 5 on high effort on Claude Code and GPT-5.6 Sol on ultra on Codex; workers are Sonnet 5 on xhigh and GPT-5.6 Sol on high. Think of it as an upgraded, cross-harness Dynamic Workflows.
Skill libraries break the same four ways:
Overly specific, handcrafted prompts. As models get smarter, overprescription degrades output quality.Manual chaining by the user. First run/brainstorm
, then run/to-prd
, then run... blah blah blah.Domain-specific. The workflow for writing a blog is basically the workflow for shipping a feature: outline the goal, build each section in parallel, review the output for cohesion and consistency. You don't need a/write-blog
skill and a/build-feature
skill.Static. Run 100 hits the same snags as run 1.
orchflows answers each in structure:
Tiny, composable skills. Every word of every skill has to fight for its life. Heavily avoids context rot.Workflows, not prompts. Every request autoroutes to the smallest workflow. No more memorizing skill names or chains.Domain-blind. Smart model outlines the task β cheaper parallel subagents deliver β smart model reviews. The same shape works for blogs, code, or research.Self-improving.orch-self-improve
can run at any time to mine the logs for friction points in agent behavior and reasoning, and improve the workflows over time.orch-evolve
is its sibling: a tournament-style improvement loop over any artifact, runnable or static.
One brick, one job.orch-deliver
ships,orch-critique
attacks,orch-judge
scores blind,orch-loop
iterates,orch-fix
proves the cause before repairing it.One stud pattern. Six frozen contracts β spec, work-item, delegation, verdict, worklog, pack-signature β are the only interfaces. Anything that emits one plugs into anything that takes one.Swappable baseplates. Workflows are domain-blind; a pack (code | content | research | design) is pure data that retargets the whole tower. The pipeline that ships a feature also ships a research report β swap one pack, change zero control flow.
You snap bricks by naming them; the agent snaps them by routing. Same bricks either way.
git clone https://github.com/DanMcInerney/orchflows
cd orchflows
./install.sh # install.cmd on Windows
The wrapper resolves an interpreter (uv β python3 β python; any
Python 3 works) and
auto-detects your harnesses β Claude Code (~/.claude
), Codex
(~/.codex
) β configuring whichever exists. Update: git pull
,
rerun. Committable per-project routing block: python install.py --project PATH
. Uninstall: python install.py --user --uninstall
removes only what it generated; --dry-run
previews either.
Just talk. Routing reads the request and picks the smallest shape:
> fix the flaky login test
> why did memory double last release?
> ship dark mode
> build me a custom workflow that reads all the documentation, then
researches similar projects, then builds a spec doc to copy their
best features and implements them
Or name the bricks yourself:
> orch-loop orch-deliver until `pytest -q` exits 0
> orch-panel these three cache designs β blind judges, pick one
> orch-critique src/auth under the security lens
Or build your own custom workflow:
> build me a workflow that does spec > deliver, then always updates
the documentation afterwards (favoring edits and deletions over
additions), and automatically PRs and merges it
Custom workflows are project-local. In the example above, if you were
working in my-personal-site/
you'd get a workflow named something
like /site-work-and-merge
, callable only when you're working in
my-personal-site/
.
Routing too eager? orch-off
stands it down for the session. The
routing law is rules/topology.md
Β§2, installed as
~/.orchflows/host-block.md
.
Chain any bricks and put orch-self-improve
last:
> my release workflow: orch-investigate what merged since the last
tag β orch-deliver the release notes under the content pack β
orch-self-improve
Every run auto-logs its friction β retries, missing inputs,
workarounds β under an always-on law, and trace.py
logs every
session's agent reasoning and secret-redacted tool calls.
orch-self-improve
mines the logs into single-owner proposals you accept or reject. Proposals I've seen in my own usage:
- Offload a repeated piece of agent reasoning to a deterministic script
- A tiny AGENTS.md addition telling agents to use the packaged Python
interpreter instead of whatever
python
is on$PATH
- Remove overlapping
orch-verify
steps from a workflow to speed it up - Add a documentation-update step to a workflow because the user kept asking for it manually
The coolest part of orch-self-improve
is that you can run it on
itself. I run orch-self-improve
across all sessions in a project,
then point a second orch-self-improve
run at the first one.
orch-visualize
renders anything you hand it as a verified Mermaid diagram β a workflow, your session trace, a codebase, a website, a process from a doc. Every diagram is syntax-verified against a real Mermaid renderer before it comes back, and on request it emits a self-contained HTML page. This is its drawing of the delivery pipeline that ships every orchflows run:
flowchart TD
spec["orch-spec β freeze exactly what should be made"] --> pack{"pack: code | content | research | design"}
pack --> ws["orch-workspace β clean, isolated working area"]
ws --> dec["orch-decompose β cut the spec into ordered tickets"]
dec --> frontier["orch-frontier β dispatch every ready ticket"]
frontier --> task["orch-task"]
task --> del["orch-delegate β hand the ticket to the right agent"]
del --> exec["executor: orch-tdd | orch-draft / orch-edit | orch-investigate / orch-synthesize | orch-render"]
exec -.-> chk["orch-check β fresh agent double-checks (when needed)"]
exec --> integ["orch-integrate β accept or reject the returned work"]
chk --> integ
integ -.->|rejected| frontier
integ --> ver1["orch-verify β run any remaining checks"]
ver1 --> frontier
frontier --> gate["orch-review-fix β critique, repair confirmed defects, re-verify"]
gate --> final["orch-verify β final result matches the original request"]
orchflows
β
βββ Layer 0 Β· contracts/ β Shared forms that keep every part of the system speaking the same language
β βββ delegation β Says what another agent should do, use, avoid, and return
β βββ pack-signature β Lists what every project-type setup must provide
β βββ spec β Records exactly what the user wants made
β βββ verdict β Records whether a check passed and what proves it
β βββ work-item β Describes and tracks one piece of work
β βββ worklog β Records the progress and current state of a larger job
β
βββ Layer 1 Β· skills/ β Things the agents know how to do
β β
β βββ kernel/ β Basic building blocks used by the rest of the system
β β βββ orch-check β Has a fresh agent double-check the work and correct problems
β β βββ orch-critique β Reviews something and lists the most important problems
β β βββ orch-decompose β Breaks a large job into smaller pieces in the right order
β β βββ orch-delegate β Hands one clearly defined task to another agent
β β βββ orch-elicit β Asks the user when a decision cannot safely be made for them
β β βββ orch-integrate β Decides whether returned work is acceptable and can be used
β β βββ orch-investigate β Researches one focused question using reliable evidence
β β βββ orch-judge β Rates one option using standards agreed on beforehand
β β βββ orch-mechanize β Turns a repeatedly performed step into a reusable script
β β βββ orch-synthesize β Combines findings from several sources into one answer
β β βββ orch-verify β Runs the agreed checks to see whether the work passes
β β βββ orch-worklog β Updates the job's progress record
β β βββ orch-workspace β Prepares a clean and safe place in which to work
β β
β βββ engines/ β Reusable ways of organizing work
β β βββ orch-task β Takes one ready piece of work from start to acceptance
β β βββ orch-frontier β Starts each piece of work as soon as the work it needs is finished
β β βββ orch-loop β Repeats work until an agreed check says it is done
β β βββ orch-panel β Uses several independent reviewers to compare choices fairly
β β
β βββ workflows/ β Complete processes made from the smaller building blocks
β β βββ orch-spec β Turns a request into a clear, agreed plan
β β βββ orch-deliver β Runs a project from the agreed plan to a checked final result
β β βββ orch-goal β Runs the delivery process again to improve the result further
β β βββ orch-bench β Sets the rules and tests before different options are compared
β β βββ orch-evolve β Creates and compares improved versions over several rounds
β β βββ orch-diagnose β Reproduces a problem and finds what is actually causing it
β β βββ orch-fix β Finds the cause of a problem, repairs it, and proves it stays fixed
β β βββ orch-repair β Applies the smallest change that fixes a known problem
β β βββ orch-review-fix β Reviews the result once, fixes valid problems, and checks it again
β β βββ orch-build β Creates or changes a reusable part of the orchflows library
β β βββ orch-fixture β Saves a finished task as an example that can be run again later
β β βββ orch-self-improve β Studies past difficulties and proposes improvements to the system
β β βββ orch-triage β Sorts a list of work into what is ready, blocked, or needs a person
β β
β βββ instances/ β Skills that perform a particular kind of hands-on work
β β βββ orch-tdd β Writes software in small steps and checks each step with tests
β β βββ orch-resolve-conflicts β Decides how to combine two sets of changes that clash
β β βββ orch-draft β Writes one section using only the supplied information
β β βββ orch-edit β Combines separate sections into one consistent document
β β βββ orch-render β Builds a screen and checks how it actually looks and behaves
β β
β βββ utilities/ β Small optional helpers
β βββ orch-visualize β Turns supplied information into a diagram
β βββ orch-off β Stops orchflows from automatically choosing skills
β
βββ Layer 2 Β· packs/ β Setups for different kinds of projects
β βββ orch-code-pack β Tells the system how to organize, save, and check software work
β βββ orch-content-pack β Tells the system how to organize and review written documents
β βββ orch-research-pack β Tells the system how to answer questions using trustworthy sources
β βββ orch-design-pack β Tells the system how to build and visually check interfaces
β
βββ Layer 3 Β· compositions/ β Example playbooks showing how the parts can be combined
βββ delivery-loop β Repeats delivery until a chosen measurement says to stop
βββ drift-canary β Reruns known examples to detect changes in agent behavior
βββ evidence-to-document β Researches a subject first, then turns the findings into a document
βββ evolve β Produces several versions and selects the strongest one
βββ feature-plus-docs β Builds a software feature and then documents what was built
βββ improvement-delivery β Turns an approved process improvement into a tested change
βββ renovate β Reviews an existing project and completes selected improvements
βββ skill-tournament β Tests competing versions of a skill to see which works best
Four layers, dependencies pointing one way. contracts/
is the narrow
waist: six hash-pinned data shapes that are the only interfaces between
skills. skills/
is everything callable β kernel primitives that call
no other skill, engines that add control flow, workflows assembled from
both, instances that do the domain's hands-on work, and a couple of
utilities. packs/
is per-domain data, never control flow.
compositions/
is non-normative worked examples, free to churn.
UNITS OF WORK β the orchflows ladder
β
βββ (floor) Tested script
β no model, no ticket β a unit of certainty, not of work
β orch-mechanize keeps pushing repetition down here
β
βββ U0 β Direct answer
β question answered from context already in hand
β no deliverable change β no record, no ticket
β
βββ U1 β Verified ad-hoc ticket
β one ticket + one execution + one external verdict
β U1ΓN: a small ticket graph with edges, run on the frontier
β
βββ U2 β The run (spec β delivery)
β a frozen spec governs a ticket graph β rolling frontier β
β one review gate β final verification
β
βββ U3 β Composition
control flow OVER units: chained runs, goal loops
Every request lands on the cheapest rung that can still prove it's done. A question you can answer from context costs nothing; a small fix gets one ticket and one external verdict; only work that genuinely needs a frozen spec pays for one; and repetition keeps getting pushed below the floor into tested scripts that need no model at all.
packs/
βββ orch-code-pack β delivers code Β· deterministic oracles Β· executor orch-tdd
β workspace: git, one worktree per work item
βββ orch-content-pack β delivers documents Β· judged oracles Β· executor orch-draft, assembly orch-edit
β workspace: document tree with outline slots
βββ orch-design-pack β delivers rendered UI Β· capture oracles Β· executor orch-render
β workspace: git plus render (view Γ breakpoint Γ state)
βββ orch-research-pack β delivers answers Β· evidence oracles Β· executor orch-investigate, assembly orch-synthesize
workspace: evidence store of lane packets
A pack is pure data β no control flow. It supplies the domain's vocabulary, oracle classes, executors, workspace rules, and design principles, all satisfying one frozen pack-signature, so everything the library builds inside a domain stays cohesive. Stamp a different pack on the spec and the identical pipeline ships code, documents, research, or UI.
Cross-harness. One library drives both Claude Code and Codex, on Windows and POSIX.Workflows persist. A custom workflow is admitted as a project-local skill β versioned, callable by name, improvable β not regenerated from scratch each session.Verification is structural. Named oracles, fresh-context checkers, and one review gate stand between an executor's claim and "done" β the agent never grades its own homework.Self-improving. Friction and full session traces are always logged;orch-self-improve
mines them into concrete fixes to the workflows themselves β including to itself.Survives session death. Specs, tickets, and worklogs are files in.orch/
, so any fresh context can resume a run mid-flight.Smallest-first routing. One intake for everything: a one-line question never pays workflow ceremony, and a launch never gets typo-fix rigor.