agentleFS
openamer-maxopenamer-max/max-scripts/skills/autonomous-ai-agents/workflow-orchestration/SKILL.md

workflow-orchestration

Skill2 starsChanged 41 days agoApache-2.0View on GitHub

Use when a task needs multi-agent CONTROL FLOW, not just parallel calls.

13 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ui-ux-pro-max and frontend-design.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • StrayDragonSkill

    ui-ux-pro-max

    UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.

    Also in 3 projects that use this

  • BlockSkill

    frontend-design

    Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If you cannot express the control flow in a tasks list, you need workflow.

    line 37
  2. Very specific:

    Every agent() call is a real delegated child: it inherits the parent's toolsets and obeys delegation.max_concurrent_children, …

    line 102
  3. Distinctive:

    A script error is not a partial success: If you need partial results, catch the condition inside the script and return them explicitly.

    line 124

“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Workflow orchestration

delegate_task runs a fixed list of tasks in one batch. It cannot express control flow — "run these three audits in parallel, then take their findings and run a fourth pass over what they disagreed about".

The workflow tool closes that gap: the model writes a small Python script that fans work out to subagents, and the script's return value becomes the tool result.

Adapted from deepseek-ai/deepseek-harness packages/workflow.

When to use which

SituationTool
1–2 independent subtasksdelegate_task — simpler, cheaper
A fixed list of N tasks, all independentdelegate_task with tasks: [...]
A second pass that depends on the firstworkflow
Parallel work whose findings must be cross-checkedworkflow
A migration with dependent stepsworkflow
Multi-angle research where later rounds refine earlier answersworkflow

If you cannot express the control flow in a tasks list, you need workflow.

The script contract

The script is a Python body (not a module). It runs with top-level await and must end with return <value>.

phase("collect")
findings = await parallel([
    agent("Audit src/auth.py for auth bypasses. Report file:line findings."),
    agent("Audit src/payments.py for auth bypasses. Report file:line findings."),
])

phase("cross-check")
disputes = [f for f in findings if "DISPUTED" in f]
if not disputes:
    return {"status": "clean", "checked": len(findings)}

verdicts = await parallel([
    agent(f"A previous auditor reported: {d}. Verify or refute it.") for d in disputes
])
return {"status": "reviewed", "disputes": len(disputes), "verdicts": verdicts}

Hooks

HookPurpose
await agent(prompt, context=None)Run one subagent to completion; returns its final text. The subagent knows nothing of this conversation — prompt must be self-contained.
await parallel([...])Run independent entries concurrently; order is preserved. Entries may be coroutines (agent("...")) or plain callables.
await pipeline(items, step)Map step over items; step(item, previous) may see the previous item's result. Use when each step depends on the last.
phase(name)Declare a phase boundary for progress narration.
log(message)Emit a progress line.
argsThe optional JSON object passed with the call.

Rules

  • No import, open, eval, exec or __import__.
  • A script that raises returns an error, never a partial success.
  • The script may not use import to reach the filesystem — use agent() and let the subagent do the file work.
  • The tool blocks until the whole workflow settles: you see one final outcome, never intermediate child messages.

The call

{
  "meta": {
    "name": "auth-audit",
    "description": "Audit two modules, then cross-check the disputed findings",
    "phases": ["collect", "cross-check"]
  },
  "script": "phase(\"collect\")\nfindings = await parallel([...])\nreturn {\"checked\": len(findings)}",
  "args": {"paths": ["src/auth.py", "src/payments.py"]}
}

meta.name and meta.description are required; meta.phases is optional and only documents the expected phases.

What it costs

Every agent() call is a real delegated child: it inherits the parent's toolsets and obeys delegation.max_concurrent_children, delegation.max_spawn_depth and the pause kill switch. A workflow with ten agent() calls costs ten subagent runs — write the script so each call does real work, and use parallel for independent calls.

Subagents cannot use workflow themselves (no recursive fan-out), and workflow is refused while plan mode is active — same as delegate_task.

Pitfalls

  1. Do not use workflow for one or two delegations. delegate_task is cheaper and easier to read.
  2. Make each agent() prompt self-contained. A subagent has no access to this conversation, the script's variables, or the other subagents' results — unless you put them into the prompt text.
  3. parallel preserves order, so index-aligned results line up with the input list. That is the reliable way to pair a finding with the file that produced it.
  4. Return a structured value, not prose. The return value is what you (the caller) reason over. Put the conclusion in the dict.
  5. A script error is not a partial success. If you need partial results, catch the condition inside the script and return them explicitly.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.