agentleFS
jalbarrangjalbarrang/skills/workflows/SKILL.md

workflows

Skill2 starsChanged 3 months agoMITView on GitHub

Design, validate, and run bounded multi-agent workflows from any harness with a shell — Cursor, Codex, pi, or anything that supports .agents/. Declarative JSON chains of sequential agent steps, static parallel groups, and bounded fan-out (maxItems, ≤100 agents), executed by spawning harness CLIs (pi, codex, cursor-agent) as subagent runners. Supports foreground and background runs, status inspection, stop, resume with completed-phase reuse, and saved reusable chains. Use when the user says design a workflow, run a workflow, fan out subagents, parallelize agents, orchestrate agents, workflow chain, background agent run, or workflow status.

17 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use arming-thought, concentrate-forces and 8 more.

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.
  • SanjithBolloju18Skill

    arming-thought

    触发:在每次新的顶层对话开始时自动调用,用于建立“实事求是”的总原则,并在明确适用时为后续任务选择下游 skill;如果你是被派遣执行单一具体任务的子 agent,则跳过此 skill。 English: Trigger at the start of each new top-level conversation to establish the core methodology and select downstream skills only when clearly useful. Skip this skill when you are a delegated sub-agent handling a narrow, concrete task.

    Also in 3 projects that use this

  • SanjithBolloju18Skill

    concentrate-forces

    触发:当多个任务同时争夺时间、注意力、算力或预算,必须确定主攻方向并停止分散用力时调用;常见信号包括优先级过多、资源紧张、推进分散、需要决定先做什么。 English: Trigger when limited resources are being split across too many tasks and one main target must be chosen. Use this skill to concentrate effort, sequence work decisively, and finish a meaningful breakthrough before expanding.

    Also in 3 projects that use this

  • +8 more from SanjithBolloju18

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 13 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:

    Read reference/format.md before writing your first workflow JSON.

    line 10
  2. Distinctive:

    Approve: ALWAYS show the user the exact validated JSON, the phase list, and the maximum agent count, and get explicit approval before …

    line 33
  3. Very specific:

    Run state lives in .agents/workflow-runs/<run-id>/ (state.json + per-phase output files + runner.log for background runs).

    line 47

“Common” is measured: kept by at least 6 in 10 of the 13 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

workflows

Bounded, declarative multi-agent orchestration as plain scripts. A workflow is a JSON chain of phases — a single agent step, a static parallel group, or a bounded fan-out over an earlier phase's JSON output — validated before anything runs, with a statically known worst-case agent count. This is a harness-agnostic port of pi-plan-mode's /workflow system: the design loop, format, and limits are identical, but execution spawns harness CLIs directly, so it works from Cursor, Codex, pi, or any harness that can run Node. (Claude Code has native workflows — don't install this there.)

Read reference/format.md before writing your first workflow JSON; it owns the full format, templating, and config documentation.

Setup

  1. Node ≥ 20 (node --version).
  2. The pi CLI on PATH — the only CLI required by default, since pi is the default runner. codex, cursor-agent, and claude runner templates are built in but entirely optional: a CLI is needed only when a step's runner actually selects it, and run.mjs preflights every selected runner before spawning anything, failing fast with an actionable message instead of dying mid-run.
  3. Agent definitions: each agent referenced by a workflow is a markdown file in .agents/subagents/<name>.md (project) or ~/.agents/subagents/<name>.md (user) — flat YAML frontmatter (name, description, model, thinking, runner), body is the system prompt. A workflow that references an undefined agent fails validation at dry-run/run time with the list of available agents.
  4. Optional config in .agents/workflows.json (project, walk-up) or ~/.agents/workflows.json:
{
  "defaultRunner": "pi",
  "timeoutMinutes": 20,
  "runners": {
    "pi-sandboxed": ["pi", "-p", "--no-session", "--model", "{model}", "{prompt}"]
  }
}

The loop: design → validate → approve → run

  1. Design. Investigate the task, then draft the workflow JSON (see reference/format.md). Prefer one mutation-capable worker at a time; parallel agents should be independent readers, reviewers, or isolated-worktree tasks. Every fan-out must declare maxItems.
  2. Validate. node <skill-dir>/scripts/validate.mjs my-workflow.json — fix every error before showing the user anything.
  3. Approve. ALWAYS show the user the exact validated JSON, the phase list, and the maximum agent count, and get explicit approval before running. Never launch a workflow the user has not seen.
  4. Run. node <skill-dir>/scripts/run.mjs my-workflow.json (foreground) or --background (detached; prints a run id). Use --dry-run first to see every resolved command without spawning anything.

Commands

CommandPurpose
node scripts/validate.mjs <file|chain>Validate; print phase digest + max agent count
node scripts/run.mjs <file|chain> [--dry-run] [--background] [--runner <name>]Execute a workflow
node scripts/run.mjs --resume <run-id> [--background]Resume a stopped/failed run, skipping completed phases
node scripts/status.mjsTable of all runs
node scripts/status.mjs <run-id>One run: phases, output files, error
node scripts/status.mjs --stop <run-id>Terminate a running workflow

Run state lives in .agents/workflow-runs/<run-id>/ (state.json + per-phase output files + runner.log for background runs). Resume reuses persisted outputs of completed phases — an upgrade over pi's restart-from-scratch resume.

Saved chains

A reviewed workflow saved as <name>.chain.json is reusable by bare name: node scripts/run.mjs <name>. Search order: project .agents/chains/, project .pi/chains/ (pi-plan-mode compatible), ~/.agents/chains/, ~/.pi/agent/chains/. To save one, copy the approved JSON into one of those directories.

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.