workflow-runner

workflow-runner is a cursor rule for coding agents from jnMetaCode/agency-orchestrator. It costs 13 tokens per session (630 once invoked), scanned A, original, Apache-2.0.

A rule set for running YAML workflows that assign tasks to multiple named roles. It explains how to read inputs, order dependent steps, apply conditions, and use role descriptions.

In plain words
What is it for?
Running a supplied YAML workflow or coordinating tasks such as product, architecture, and review roles.
Why use it?
It gives multi-role collaboration a consistent execution order and makes skipped or parallel work predictable.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/jnmetacode/agency-orchestrator/workflow-runner
Clone the repo
git clone --depth 1 https://github.com/jnMetaCode/agency-orchestrator

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for workflow-runner

README.md
[![agentmods](https://agentmods.dev/badge/rules/jnmetacode/agency-orchestrator/workflow-runner.svg)](https://agentmods.dev/rules/jnmetacode/agency-orchestrator/workflow-runner)
Your own site
<a href="https://agentmods.dev/rules/jnmetacode/agency-orchestrator/workflow-runner"><img src="https://agentmods.dev/badge/rules/jnmetacode/agency-orchestrator/workflow-runner.svg" alt="Measured on agentmods" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 630 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00013 $0.00630
Opus 5 $0.00006 $0.00315
Sonnet 5 $0.00003 $0.00126
Haiku 4.5 $0.00001 $0.00063

Measured 4d ago against content hash 062cae52f5c7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

workflow-runner scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

integrations/cursor/workflow-runner.mdc · 56 lines

How it starts

The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Multi-Role Workflow Runner

When the user asks to run a workflow (YAML file) or a multi-role collaboration task, follow these steps:

1. Parse Workflow

Read the specified YAML file. Extract name, inputs, steps, depends_on, conditions, and loops.

2. Collect Inputs

  • required: true inputs must be provided by the user
  • Optional inputs with default use the default value
  • Optional inputs without default are set to empty string

3. Build Execution Order

Topological sort by depends_on. Steps without dependencies belong to the same level and can run in parallel.

4. Execute Steps

For each step:

  1. Read agency-agents-zh/{role}.md (search order: YAML's agents_dir → ./agency-agents-zh/ → ../agency-agents-zh/ → node_modules/agency-agents-zh/)
  2. Extract all markdown content after the frontmatter (---) as the role personality
  3. Replace {{variables}} in the task with context values (from inputs or previous step outputs)
  4. Evaluate conditions: if condition is set, evaluate it. Skip the step if the condition is not met. Operators: contains, equals, not_contains, not_equals
  5. Fully embody the role — use that role's expertise, frameworks, and communication style. Output should be substantive.
  6. Store the step's output text into the context variable (if step has an output field)
  7. Check loops: if loop is set and exit_condition is not met, jump back to loop.back_to step (max: loop.max_iterations rounds)

Label each step: ### Step N/Total: step_id (Role Name)

5. Save Results

Save all outputs to files:

ao-output/{workflow-name}-{date}/
├── steps/
│   ├── 1-{step_id}.md
│   └── ...
├── summary.md          # Final step's full output
└── metadata.json       # Step states, timing, token counts

6. Suggest Iteration

After completion, always tell the user:

To improve a specific step, ask me to re-run from that step. I'll reuse all upstream outputs. For CLI: ao run <workflow> --resume last --from <step-id>

Read the full file on GitHub · 56 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 56 lines · 13 tokens per session scan A 062cae52f5c7

Subscribe to this mod's changes

workflow-runner is a cursor rule published in the GitHub repository jnMetaCode/agency-orchestrator (2,191 stars, last pushed 4d ago), licensed Apache-2.0. It adds 13 tokens to every session and 630 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.