agentleFS
DojoGenesisDojoGenesis/openclaw-plugin/skills/workflow-router/SKILL.md

workflow-router

Skill0 starsChanged 9 months agoMITView on GitHub

Routes user goals to the appropriate specialist agent workflow with resource allocation confirmation. Use when: the user wants to start a task but hasn't specified a workflow, asks "how should I approach this?", or needs orchestration across research → plan → build → fix stages.

10 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use review-gate and diagnose.

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

    review-gate

    Reviews a change across correctness, design, readability, security, and performance before it merges. Use when reviewing a PR, self-reviewing your own diff, or sanity-checking an AI-generated change prior to shipping.

    Also in 3 projects that use this

  • MicrosoftSkill

    diagnose

    Use to systematically diagnose why scenarios fail — identifies root causes by analyzing agent traces, codebase, and behavioral patterns

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the goal is not provided or is ambiguous, ask:

    line 37
  2. Distinctive:

    If intent is clear from context (e.g., "this test is failing" → Fix), infer without asking.

    line 48
  3. Distinctive:

    Build goal: Ask if implementing an existing plan.

    line 56
  4. Distinctive:

    Default to Balanced for unspecified or Auto selection.

    line 73
  5. Distinctive:

    If fix requires code changes, spawn implementation agent with the diagnosis as context

    line 86
  6. Distinctive:

    Wait for confirmation before dispatching.

    line 104
  7. Distinctive:

    If a plan exists, summarize risks before dispatching:

    line 132

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

Routes user goals to the appropriate specialist agent workflow with explicit resource allocation and confirmation before dispatch.

Description

Classifies an incoming goal into one of four categories (Research, Plan, Build, Fix), maps it to the appropriate specialist agent(s), confirms resource allocation with the user, and dispatches. Handles the Fix workflow as a two-stage process (investigate first, then implement). Preserves context across agent handoffs using shared handoff documents. This skill is the entry point for multi-agent orchestration when the user knows what they want to accomplish but not which agent or workflow to use.

When to Use

  • User wants to start a non-trivial task without specifying a workflow
  • User asks "how should I approach this?" or "what's the best way to tackle X?"
  • A task requires multiple sequential agents (Research → Plan → Build)
  • You need explicit resource allocation agreement before spawning agents

Workflow

Step 1: Classify the Goal

If the goal is not provided or is ambiguous, ask:

What's your primary goal for this task?

- Research — Understand/explore something (unfamiliar code, libraries, concepts)
- Plan — Design/architect a solution (implementation plans, problem decomposition)
- Build — Implement/code something (new features, components, implementation from a plan)
- Fix — Debug/fix an issue (investigate and resolve bugs, failing tests)

If intent is clear from context (e.g., "this test is failing" → Fix), infer without asking.

Step 2: Check for Existing Plans

ls thoughts/shared/plans/*.md 2>/dev/null || ls docs/plans/*.md 2>/dev/null
  • Build goal: Ask if implementing an existing plan; load it to avoid duplication
  • Plan goal: Surface existing plans to prevent redundant work
  • Research / Fix: Proceed without plan check

Step 3: Confirm Resource Allocation

Present options and confirm before spawning:

How would you like to allocate resources?

- Conservative — 1-2 agents, sequential (minimal context, simple tasks)
- Balanced (recommended) — appropriate agents for the task, some parallelism
- Aggressive — max parallel agents (time-critical tasks)
- Auto — system decides based on complexity

Default to Balanced for unspecified or Auto selection.

Step 4: Map Goal to Agent

GoalPrimary Agent TypeDescription
Researchgeneral-purpose (research mode)Multi-source research using web and documentation tools
PlanPlanCreate phased implementation plans with architectural trade-offs
Buildgeneral-purpose (implementation mode)Coding tasks, feature implementation, component creation
Fixgeneral-purpose (debug mode) → then implementationInvestigate first, implement fix after diagnosis

Fix workflow (two stages):

  1. Spawn debug agent to investigate: produce diagnosis and recommended fix
  2. If fix requires code changes, spawn implementation agent with the diagnosis as context

Step 5: Show Execution Summary and Confirm

## Execution Summary

Goal: [Research / Plan / Build / Fix]
Resource Allocation: [Conservative / Balanced / Aggressive]
Agent(s) to dispatch: [agent descriptions]

What will happen:
- [Brief description of each agent's task]
- [Expected output / deliverable and where it will be written]

Proceed? [Yes / Adjust settings]

Wait for confirmation before dispatching. If "Adjust settings", return to the relevant step.

Step 6: Dispatch Agents

Research

Dispatch: general-purpose agent (research mode)

Prompt:
  Research: [topic]
  Scope: [what to investigate — libraries, APIs, patterns, concepts]
  Output: Write findings to research/[topic-slug].md and summarize key points

Plan

Dispatch: Plan agent

Prompt:
  Create implementation plan for: [feature/task]
  Context: [relevant codebase context, constraints, goals]
  Output: Save plan to docs/plans/[plan-slug].md with phased breakdown and trade-offs

Build

If a plan exists, summarize risks before dispatching:

  • Identify any HIGH severity blockers (missing dependencies, ambiguous interfaces)
  • Surface them to the user before proceeding
Dispatch: general-purpose agent (implementation mode)

Prompt:
  Implement: [task]
  Plan: [path to plan, if applicable]
  Constraints: [language, framework, test requirements]
  Output: Working implementation with tests passing; write handoff to handoffs/[session]/

Fix (two stages)

Stage 1 — Dispatch: general-purpose agent (debug mode)

Prompt:
  Investigate: [issue description]
  Symptoms: [what's failing, error messages, test output]
  Output: Diagnosis document with root cause and recommended fix path

Stage 2 — (after diagnosis) Dispatch: general-purpose agent (implementation mode)

Prompt:
  Fix: [issue as diagnosed]
  Diagnosis: [diagnosis document path]
  Output: Working fix with tests passing

Handoff Preservation

Each dispatched agent should write a handoff before completing:

handoffs/{session-id}/{agent-type}-{timestamp}.md

The handoff captures: what was accomplished, what was found, decisions made, open questions, and what the next agent needs to know.

Output

A confirmation message showing:

  • Which agent(s) were dispatched
  • Their assigned prompts
  • Expected output locations
  • Status after dispatch completes

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.