
workflow-orchestration-plugin
Workflow orchestration plugin adding preflight checks, checkpointed refactors, and agent wave dispatch to Claude Code.
- version
- 1.20.0
- GitHub stars
- 60
What it does
- Adds
/workflow:preflightand/workflow:checkpoint-refactorplus skills for run recovery, budgeting, bake-offs, and implement-verify fan-outs - Covers pre-work validation of remote state, open PRs, branch conflicts, gh auth, and merge gates before an agent wave starts
- Keeps large refactors resumable across context limits with persistent checkpoint files and
--continue,--status, and--phaseflags - Designed for multi-branch operations where agents fan out in worktrees and the orchestrator handles all pushes and PR creation
Workflow orchestration - preflight checks, checkpoint refactoring, wave dispatch, run recovery and budgeting
Add marketplace
/plugin marketplace add laurigates/claude-pluginsRun it inside Claude Code once, then install the plugin below.
Install
/plugin install workflow-orchestration-plugin@laurigates-claude-pluginsRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceBake-off: Compete, Judge, Refine
One Workflow template, compete-and-judge, for work where the right answer is
not known in advance: several independent attempts at the same target, judged
side by side, with the winner taken forward. A protocol for measured A/B
experiments follows in Measured arms; it is prose, not a
second template.
The template's one hard rule: the winner is computed in JavaScript from the
judges' rankings or measured numbers. No agent reads the verdicts and picks.
A model that picks from verdicts can only turn near-ties into a confident
answer: the coin-flip laundering that .claude/rules/workflow-vs-skill.md
§ The two shapes with no fit here warns about.
Where this came from
It was distilled from 4 ad-hoc tournament runs across 4 projects, judged on taste (a logo, game meshes, a UI design) or on a shared metric (a schematic layout). They used 7–10 agents and 1.2–2.9 M tokens each.
- Three of the four let a model pick. Two had a synthesizer agent "start from the design the judges favour overall"; the third had its single metric judge apply the rule and name the winner itself.
- The fourth aggregated in JS (Borda, mean score as tiebreak) but had no quorum check: had every judge died, the all-zero tally would have sorted stably and the first entry would have been refined as "the winner". Here a panel short of quorum crowns nobody.
- Its Borda points also came from the length of each judge's list, so a judge who ranked only two entries gave less to its first place than a full ranker did. Here points come from the number of surviving entries, and each key counts once.
When to Use This Skill
| Use this skill when… | Use instead… |
|---|---|
| 2–5 genuinely different approaches to one target, and judging needs the artefacts side by side | One approach: build it and review it (agent-patterns-plugin:adversarial-review) |
| The ranking is a judgement (taste, fitness) or a number a script measures | The ranking is already a deterministic score: sort it, no judges needed |
| Several units of known scope, each needing a fix and a check | workflow-implement-verify |
| Arms × seeds against a shared metric, with a human verdict at the end | Measured arms |
| Comparing skills or prompts in this repo | evaluate-plugin:evaluate-skill |
Inputs
| Field | Meaning | Default |
|---|---|---|
context | the brief every entrant and judge sees, including hard requirements | — |
out | absolute output directory; entry k writes only ${out}/${k}, judge j keeps scratch in ${out}/_judges/${j}, the refine writes ${out}/final | — |
entries | 2–5 { key, angle }; order is the final tiebreak | — |
judges | 1–3 { key, lens } | — |
setup | 0–2 { key, brief } for what everyone must share (render harness, measurement script) | [] |
metric_defs, acceptance | shared definitions and acceptance bullets | — |
aggregation | borda or metric | borda |
metric | metric mode: { command, keys: [{ name, better: lower|higher }] } | — |
self_iterate | { min, max } rounds per entrant | { 2, 6 } |
finish | refine or none | refine |
skills, decisions | skills to name, user decisions to relay verbatim | — |
Keys must match [A-Za-z0-9][A-Za-z0-9_-]* (they become directory names, and
cannot start with _, so none can be _judges), be unique across setup,
entries and judges, and not be final.
How the winner is computed
| Mode | Order |
|---|---|
borda | Borda points (K−1−position over the K surviving entries, summed over judges), then mean score (one score per judge per entry), then caller order |
metric | meets acceptance per every measuring judge, then each metric.keys entry in turn (median across judges, one measurement row per judge per entry and one value per name in it, missing values last), then caller order |
- Judges re-measure. An entrant's self-reported metrics and self-assessment are never used in the aggregation.
- A judge counts toward the quorum (2, or 1 when
judgeshas one row) only if it returned something the aggregation can use: a ranking naming a surviving entry, or inmetricmode a measurement row with a finite value for ametric.keysname. A row with no such value counts as unmeasured everywhere: in the quorum, in acceptance, and inranking_gaps. Short of quorum, the run returnsreason: no-quorumand runs no refine agent. - A tie that reaches caller order is reported as
tie: truewithtied_with. List an incumbent first if it should keep ties.
The result carries winner, standings, ranking_gaps (the entries each judge
left unranked or unmeasured), every entry, every verdict a judge returned
(verdicts, including unusable ones, whose judges are listed in
excluded_judges), and refined. A no-quorum result carries verdicts and
excluded_judges too.
Workflow harness (template)
workflows/compete-and-judge.workflow.js ships beside this skill. It is a TEMPLATE to adapt,
not a script to run verbatim. Read it, then rewrite it for the work in front of you.
Adapt freely: the agent prompts, the entrant angles and judge lenses, MAX_ENTRIES,
MAX_JUDGES and QUORUM, the refine step (a decision document or a contract instead of a
polished artefact), and the setup briefs.
The design this template was cut from also has a baseline row (metric judges measure the unchanged starting point beside the entries) and a verify round after Refine (a verifier, one fix, one re-verify: up to 3 more agents). Neither is in the template; an adaptation that needs one adds it, with a scenario in the test.
Agent budget: 11 — at most 2 setup agents, 5 entrants, 3 judges and 1 refine agent. A run without setup, with 3 entries, 3 judges and a refine, spawns 7.
Preserve across any adaptation: (a) entries and judges come from the caller's args, cut
by .slice(0, N) literals in the fan-out after an explicit over-cap abort, never truncated
silently; (b) the winner is standings[0] of the JS aggregation, ties break on mean score and
then caller order, a tie is reported, and short of quorum there is no winner; no agent runs
between Judge and Refine; (c) metric mode ranks on judge-measured numbers only; (d) the two
barriers: setup completes before any entrant starts, because entries must be comparable, and
every judge sees every surviving entry, because a ranking needs all of them;
(e) scripts/tests/test-compete-and-judge.sh passes.
If an adaptation makes entrants commit (isolation: 'worktree', one branch per entry), two
clauses apply. Never Workflow({resumeFromRunId}) to retry a few failed worktree agents — a
resume re-runs agents that already succeeded and opens duplicate PRs (#1868). Re-dispatch the
failed units fresh and sequentially after checking
gh pr list --head <branch> --state all --json number,state. Push, PR creation, and GitHub
mutations happen only in the single sequential finalise stage, never inside a fanned-out
agent; that stage also deletes the losing branches and worktrees by name.
Skip the harness when: there is one plausible approach, or one reviewer's opinion is the whole question. That is a linear pass, and the harness is pure overhead. Inputs and How the winner is computed remain the authoritative description of what each stage must produce; the harness only fixes how the work is split.
Measured arms
A/B experiments (arms × seeds, a shared metric, a human verdict) share a protocol but not a skeleton: 2 ad-hoc runs in 2 projects had different phase structures, too few to fix one. Write the run as its own script and keep these clauses:
- Fix the design before running. Name the arms, the one variable each changes, the seeds (at least 3, the same seeds for every arm), the metric, and the rule that will decide the outcome.
- One variable per arm. Diff each arm's emitted inputs against the baseline's; any difference beyond the intended variable is a defect that invalidates the comparison.
- Gate the instrument on a known-good case before any verdict. A scorer that cannot separate a known-good from a known-bad case must refuse to report.
- Build in parallel, land in sequence. The arm harness and the scorer can be built side by side and each checked by a fresh verifier, but merging and PR creation happen in one sequential stage.
- Claim an effect only above the seed-to-seed spread, and analyse per group (subject, shot, character) before pooling. A pooled trend can reverse within every group.
- Blind judging when a model judges outputs: it reads anonymised packets only, and the arm key is stored outside the repo where the judge cannot read it.
- A human watch list. For each output, list where the instrument's claim is most fragile (the frames, items or regions to look at) with an empty verdict line per item. Agents never fill the verdicts.
- An independent checker re-derives every headline number from the committed raw data, not from the write-up, and audits the arm-vs-baseline input diff itself.
With few arms and one cheap run each, compete-and-judge in metric mode can
carry the experiment: each arm is an entry and each judge runs the scorer.
Related
.claude/rules/workflow-vs-skill.md— the three gating axes; § The two shapes with no fit here scopes where this template fits (Tournament)workflow-implement-verify— the sibling template for known units that each need a fix and a checkworkflow-scale-budget— sizing a run before it startsagent-patterns-plugin:adversarial-review— one reviewer per lens, when there is one artefact rather than severalagent-patterns-plugin:multi-model-delegation— the inverse of a judge: the disagreement is the output
Readme
workflow-orchestration-plugin
Workflow orchestration patterns for preflight checks, checkpoint-based refactoring, sequential-wave agent dispatch, and Workflow run recovery and budgeting. Addresses common friction in multi-branch operations, permission restrictions, and context limits.
Flow
See docs/flow.md for a diagram of the preflight → checkpoint → refactor pipeline.
Skills
| Skill | Command | Description |
|---|---|---|
| workflow-preflight | /workflow:preflight | Pre-work validation: check remote state, existing PRs, branch conflicts; --recon adds gh auth, merge gates and required secrets before an agent wave |
| workflow-checkpoint-refactor | /workflow:checkpoint-refactor | Multi-phase refactoring with persistent state across sessions |
| workflow-interrupted-run-recovery | — | Recover a Workflow run killed mid-flight: salvage killed agents' worktrees, resume without duplicating PRs the completed agents opened |
| workflow-scale-budget | — | Size a Workflow script's agent count before running it: cost per agent, per-item multipliers, theme grouping, re-drive design. scripts/workflow-run-tally.sh tallies a finished run's realised agents and tokens from its transcripts, and a session's total across its runs |
| workflow-implement-verify | — | Workflow templates: implement 2–5 units in worktrees with a fresh verifier each and at most one repair round, then open PRs sequentially; or close verifier findings on existing branches (repair-round) |
| workflow-bake-off | — | Workflow template: 2–5 independent attempts, 1–3 lens judges, a winner computed in JS (Borda or a metric rule, deterministic tiebreaks), then an optional refine that grafts runner-up ideas; plus a protocol for measured A/B arms |
| workflow-verify-before-filing | /workflow:verify-before-filing | Verify accumulated bug claims at upstream HEAD and dedup against trackers before filing issues |
| workflow-wave-dispatch | — | Sequential-wave dispatch for multi-agent work with cross-task dependencies, gating each wave on verification |
Parallel issue processing and the CI-fix pipeline moved out of this plugin:
- Parallel issues (formerly
/workflow:parallel-issues) →/git:issue --parallel(git-plugin): issue to PR end-to-end, several issues at once. - CI fix (formerly
/workflow:ci-fix) →/git:fix-pr(git-plugin) to fix a PR's failing checks;/github:workflow-auto-fix(github-actions-plugin) to set up a CI workflow that fixes failures automatically.
Usage
Preflight Check
Run before starting any implementation work:
/workflow:preflight 42
/workflow:preflight feat/new-feature
Checkpoint Refactoring
Large refactors that survive context limits:
/workflow:checkpoint-refactor --init
/workflow:checkpoint-refactor --continue
/workflow:checkpoint-refactor --status
/workflow:checkpoint-refactor --phase=3
Design Principles
These skills were designed based on analysis of common workflow friction:
- Push delegation: Sub-agents never push directly; the orchestrator handles all push/PR operations sequentially to avoid TLS errors and sandbox blocks
- Worktree isolation: Parallel agents work in isolated worktrees to prevent branch conflicts
- Preflight validation: Check remote state before starting work to avoid redundant effort
- Persistent state: Large refactors write progress to plan files so work survives context limits and session boundaries
- Error recovery: Interrupted
Workflowruns and failed phases have documented recovery patterns
Related Plugins
- git-plugin - Core git workflows, worktree patterns, commit/PR skills
- github-actions-plugin - GitHub Actions CI/CD workflow analysis
- testing-plugin - Test execution and TDD workflows
- code-quality-plugin - Code review and refactoring patterns
Details
- Marketplace
- laurigates/claude-plugins
- Source
- workflow-orchestration-plugin
- Author
- Lauri Gates
- Category
- Automation
- License
- MIT
- Keywords
- workflow, orchestration, parallel-agents, wave-dispatch, preflight, checkpoint, refactoring, worktree
- Listed since
- Apr 7, 2026
More from laurigates/claude-plugins
All 52- youtube-pluginv1.1.0
- accessibility-pluginv2.3.6
- agent-patterns-pluginv2.58.5
- agents-pluginv1.16.3
- api-pluginv2.0.1
- bevy-pluginv1.4.2
- bios-pluginv1.2.0
- blog-pluginv1.3.4
- blueprint-pluginv3.52.0
- cloud-pluginv1.1.1
- code-quality-pluginv1.30.4
- codebase-attributes-pluginv1.3.4
- comfyui-pluginv1.15.7
- communication-pluginv1.2.7
- component-patterns-pluginv1.5.4
- configure-pluginv1.43.12
- container-pluginv2.11.5
- css-pluginv1.2.4
- documentation-pluginv1.16.1
- evaluate-pluginv1.21.1
- feedback-pluginv1.16.3
- finops-pluginv1.4.7
- foundryvtt-pluginv1.6.4
- git-pluginv2.74.4
Similar to workflow-orchestration-plugin
More Agent Workflow & Planning
orchestrationPluginmbruhler/claude-orchestration222 starsMulti-agent workflow orchestration with natural language creation, parallel execution, conditional flows, and visual progress tracking
taskwarrior-pluginPluginlaurigates/claude-plugins60 starsCoordination layer for multi-agent work using taskwarrior - parallel-safe queries, urgency scoring, and optional GitHub linkage via ghid/ghpr UDAs
voltagent-metaPluginVoltAgent/awesome-claude-code-subagents26.6K starsAgent coordination and meta-programming - multi-agent orchestration, workflow automation, and safe refactor governance. Works best with other voltagent plugins
agent-workflowSkillruvnet/ruflo1.4K installsEvent-driven workflow automation agent that designs, executes, and monitors multi-step pipelines with agent assignment.
agent-orchestrationPlugingreyhaven-ai/claude-code-config31 starsMulti-agent orchestration with context management, workflow composition, and agent coordination. Enables complex multi-step tasks through systematic agent deleg