agentleFS
MeRezaRezaeiMeRezaRezaei/goal-driven-parallel-agents/goal-driven-parallel-orchestrator/SKILL.md

goal-driven-parallel-orchestrator

Skill0 starsChanged 2 months agoMITView on GitHub

Master skill. Run a user goal to completion by orchestrating fast parallel async subagents — including sub-agents that spawn sub-agents — with Nowledge Mem as the system's ultimate memory and the goal tools as the loop driver. Use when the user hands you a goal and tells you to execute it autonomously ("do it until it's done"), when a large task must be split across many parallel agents, or when agent context windows (200K) are too small to hold the work.

The file

Show its rules and text

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

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

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

    If the work is a single quick task with no goal driver, don't use this skill — just do it.

    line 37
  2. Distinctive:

    Create the wave ledger (file or memory): goal id, success criteria, wave history.

    line 100
  3. Distinctive:

    Only now start designing waves.

    line 108
  4. Very specific:

    One message = as much as possible: Every Task dispatch in that single message runs concurrently — so dispatch EVERY independent task in the …

    line 122
  5. Distinctive:

    Do not dispatch the next wave until this one has fanned in (status files), unless genuinely independent.

    line 125
  6. Very specific:

    Follow parallel-agents: run_in_background-style semantics, each prompt self-contained (agents share no memory), each writes its output to a …

    line 127
  7. Very specific:

    Do controller work: update the ledger, package review diffs, nowledge_mem_save checkpoints, prepare the next dispatch.

    line 137
  8. Very specific:

    Read the status file; for each COMPLETE, read that agent's output file (its summary only).

    line 144
  9. Distinctive:

    Run the goal's verification (tests, checks, evidence).

    line 161
  10. Very specific:

    Not fulfilled → Rule on what's left, dispatch the next wave (or a fix loop per subagent-driven-development — 5-round cap, adjudicate at …

    line 162
  11. Distinctive:

    Stop ONLY when the verbatim holds no further goal-relevant chunk AND no user directive is pending — and even then, report the completed …

    line 182
  12. Distinctive:

    If the goal spans sessions (or you hit a pause/compaction):

    line 187
  13. Very specific:

    The full point is speed: Every parallel/async/nested subagent exists to make things faster.

    line 200
  14. Distinctive:

    Don't reinvent: If a sub-task needs depth, nest (Strategy A) rather than inflating a prompt.

    line 208
  15. Very specific:

    Check the user isn't steering: check_user_feedback at phase boundaries (it returns instantly.

    line 258

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “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

Goal-Driven Parallel Orchestrator

You are the conductor of a fast agent swarm. Your agents think quickly (high tok/s) but carry small context windows (~200K). This skill turns those two facts into a production loop: width over depth, files over transcripts, memory outside the window.

The one-sentence contract: the user hands you a goal → you set it in the goal system → you decompose it into parallel async waves of subagents → every wave checkpoints state to Nowledge Mem → you loop until the success criteria are met → you declare completion through the goal tools → you re-read the verbatim, derive the NEXT goal from it, set it in the goal system, and continue. Completion is a goal-swap, never a stop (user rule 2026-09-20: "when one goal is done you should not stop it the verbatim contains the next goal you should only change the goal and continue").

The whole point is SPEED. Parallel, async, nested subagents exist for one reason: to make the goal finish faster. Do as much as possible in parallel, always — pack every independent task into the current burst and use the full power available. Serial is the fallback when dependencies force it, never the default. (user rule 2026-09-20: "the whole reason for multi parallel async nested subagents is for making things faster and it must do as much as possible in parallel using the full power possible")

When this skill fires

  • The user says "here's a goal, go" / "keep working until it's done" / "execute this autonomously" and you have goal tools available.
  • A task is too big for one agent's 200K window and can be split.
  • You own a goal (set_goal/goal_set) and must drive it to fulfillment.

If the work is a single quick task with no goal driver, don't use this skill — just do it. If you have an implementation plan and only sequential work, subagent-driven-development alone suffices. This skill layers parallelism, nesting, and external memory on top of that discipline.

The two context strategies — MANDATORY

Everything below exists to make one long goal fit through many small windows. Both strategies are always on:

Strategy A — more subagents (decompose + nest). Context is freed by outsourcing, not by summarizing. Split work into many small, self-contained subagent tasks. When a sub-task itself needs depth (research → expand → verify → synthesize), that subagent spawns its own sub-agents instead of growing its prompt. Each level returns a ~200-token structured summary, never a transcript. Nesting is for context isolation, not vanity — flat fan-out when a single level suffices.

Strategy B — Nowledge Mem is the system's memory. Your context window is ephemeral; Nowledge Mem is where the goal actually lives across waves, sessions, and agents. Every durable fact, decision, learning, and wave-state checkpoint is saved there before it can be lost to compaction. Subagents get injected context from NM; they do not replace it.

Strategy C — the user's verbatim is the fixed point. The requirement is not your recollection of the goal; it is the user's raw words, kept whole in docs/verbatim.md (spelling fixes only, never paraphrased). The main agent re-reads the verbatim after every context compaction, re-derives the goal from it — adjusted by what has happened so far — and drives waves from the coverage ledger (verbatim-goal-anchoring). Subagents mostly never read it; you carry the interpretation. Completion is also a re-read point: when a goal's criteria are met you do NOT stop — the verbatim is a chain of goals, so you re-read it, derive the next goal, set it, and keep going.

Skill stack — load by name with the skill tool

Skill (installed)Role in this system
parallel-agentsAsync wave launch: run_in_background-style dispatch, file-based completion (COMPLETE: <task> - $(date) appended to a status file), never return large output, ≤ ~15 per wave, no TaskOutput floods
no-polling-agentsAsync discipline: never sleep && cat loop; check status files only when you need results to proceed
background-agent-pingsKeep doing controller work while agents run; system reminders signal progress
parallel-agent-contractsShared-type/shared-file ownership so parallel agents don't duplicate each other's declarations (grep-before-create + canonical map in every prompt)
sub-agentsDefining the specialized subagent types you spawn (tools, model tiers)
agentica-spawnPattern selection: Swarm (research), Hierarchical (build), Generator/Critic (refine), Jury (verify)
nested-subagentsSub-agent spawning sub-agents: depth ≤ 5, only agents with the spawn tool may spawn, structured summaries only
parallel-repo-safetyFile ownership boundaries + mergeable shared-list edits so parallel agents don't collide in the repo
agent-orchestrationSupervisor fan-out/fan-in with timeouts, conflict resolution (confidence / LLM arbitration / majority), result synthesis
verbatim-goal-anchoringThe fixed point: the user's raw words stay whole in docs/verbatim.md; the main agent re-reads them at EVERY compaction AND every goal completion, re-deriving the goal (adjusted by progress) so the path never drifts — completion is a goal-swap, not a stop
subagent-driven-developmentThe quality floor you never drop: ledger, per-wave review gates, 5-round fix loop, model tiers
dispatching-parallel-agentsFlat parallel mechanics: multiple dispatch calls in ONE message = parallel; one per message = sequential
writing-plans / executing-plansWhere plans come from and how inline execution works if the goal needs one

The goal loop

Phase 0 — Receive and set the goal

  1. Capture the user's goal verbatim (their wording is the requirement) and store the FULL raw text in docs/verbatim.md — spelling fixes only, never paraphrase (verbatim-goal-anchoring). The verbatim, not any summary of it, is the requirement.
  2. Set it in the goal system: set_goal/goal_set with objective (quoted from the verbatim), successCriteria (how we'll know it's done — write these down explicitly), constraints (their exclusions/limits verbatim).
  3. Create the wave ledger (file or memory): goal id, success criteria, wave history. This survives compaction — the ledger is your recovery map.

Phase 1 — Load memory before doing anything

  1. nowledge_mem_context_bundle or the working-memory skill: identity, active scope, rules, today's briefing.
  2. nowledge_mem_search: prior decisions, conventions, prior work on this goal. Search toward the goal — don't wait to be asked.
  3. Only now start designing waves.

Phase 2 — Decompose into waves

  1. Build the task dependency graph. Independent tasks go in the same wave and run in parallel. Dependent tasks become later waves.
  2. Apply parallel-repo-safety to the file map now: disjoint file ownership per agent, mergeable shared-list rules — this is what lets parallel agents not collide.
  3. Size each task for one small window: one clear deliverable, exact interfaces (from parallel-agent-contracts), a concrete verification command. If a task can't fit in a small window, make it a nesting root (the subagent will decompose further).

Phase 3 — Dispatch the wave (async, parallel)

  1. One message = as much as possible. Every Task dispatch in that single message runs concurrently — so dispatch EVERY independent task in the SAME message, in the same wave: maximum parallelism, full power. Do not dispatch the next wave until this one has fanned in (status files), unless genuinely independent.
  2. Follow parallel-agents: run_in_background-style semantics, each prompt self-contained (agents share no memory), each writes its output to a file and appends COMPLETE: <id> - $(date) to the wave status file. Tell them explicitly: "Do NOT return large output."
  3. Inject NM context per agent: the specific memories/interfaces it needs (from parallel-agent-contracts + Strategy B). Never paste your whole history.
  4. Record BASE (git HEAD) per wave for review packaging.

Phase 4 — While the wave runs (no polling)

Do controller work: update the ledger, package review diffs, nowledge_mem_save checkpoints, prepare the next dispatch. no-polling-agents + background-agent-pings: trust completion signals, check status files only when you need the results to proceed. If you must wait, wait in bounded stretches and reconcile children (they arrive on their own).

Phase 5 — Fan-in and synthesize

  1. Read the status file; for each COMPLETE, read that agent's output file (its summary only).
  2. Resolve conflicts with agent-orchestration patterns (confidence, LLM arbitration, majority). Don't let one agent's failure sink the wave — return_exceptions-style isolation.
  3. Synthesize into the wave result. Keep it small — it feeds the next wave, not your whole context.

Phase 6 — Checkpoint to Nowledge Mem (before anything can be lost)

Save the wave result, decisions made, and the next state: nowledge_mem_save (unit_type: decision/learning/event, labels like goal:<id>, wave:N; importance 0.5–0.7 for patterns, 0.8–1.0 for the goal itself). Update the ledger. If a durable memory already exists for this decision, nowledge_mem_update it — don't duplicate.

Phase 7 — Verify against success criteria

  1. Re-read the goal's successCriteria (from the goal system / ledger).
  2. Run the goal's verification (tests, checks, evidence).
  3. Not fulfilled → Rule on what's left, dispatch the next wave (or a fix loop per subagent-driven-development — 5-round cap, adjudicate at cap).
  4. Fulfilled → goal_complete/update_goal(status=complete) with evidence: summary, criteria with evidence, checks run, files changed, known limitations. Then report to the user with the rulings you made.

Phase 7b — Goal-swap, do not stop (MANDATORY)

Completion is a checkpoint, not a halt. The user's rule (verbatim 2026-09-20): "when one goal is done you should not stop it the verbatim contains the next goal you should only change the goal and continue."

  1. Immediately after goal_complete, re-read docs/verbatim.md end to end.
  2. Derive the next goal from it: the newest user directive or the highest- value remaining chunk in docs/verbatim-coverage.md the verbatim implies, adjusted by what has happened (wave ledger, git log/status, NM checkpoints for the finished goal).
  3. set_goal/goal_set the new goal — objective quoted from the verbatim, success criteria in the verbatim's own terms, constraints verbatim.
  4. Loop back to Phase 0 (or directly to Phase 2 — you already decomposed the domain). Do not dispatch a "done" summary as the end of work.
  5. Stop ONLY when the verbatim holds no further goal-relevant chunk AND no user directive is pending — and even then, report the completed chain to the user instead of going silent.

Phase 8 — Continuation across sessions (compaction protocol)

If the goal spans sessions (or you hit a pause/compaction):

  1. Checkpoint first: nowledge_mem_save_handoff — Goal / Decisions / Files touched / Risks / Next steps; optional nowledge_mem_save_thread.
  2. On resume, re-read the verbatim (docs/verbatim.md) before anything else — re-derive the goal from it, adjusted with what has happened since (ledger, git log, NM checkpoints). Recollected goals drift; the verbatim is the fixed point (verbatim-goal-anchoring).
  3. Then reload the context bundle + search the goal label, read the ledger and the verbatim coverage table, and continue from the first incomplete piece. Trust ledger + verbatim, not your recollection.

Speed rules (the full point: SPEED — use the full power)

  • The full point is speed. Every parallel/async/nested subagent exists to make things faster. Decompose as much as possible, dispatch as much as possible in parallel in one message, use the whole available width. If a task CAN run in parallel, it SHOULD run in parallel.
  • Width is free. The bottleneck is context, not throughput. Prefer more parallel agents (Strategy A) over longer serial chains.
  • Batch the same-shape work. Several identical small edits → ONE dispatch listing every file (SDD's batch rule), not N agents.
  • Don't reinvent. If a sub-task needs depth, nest (Strategy A) rather than inflating a prompt.
  • Small scopes, exact contracts. Each agent: one deliverable, its file region, its verification command. This is what makes fan-in cheap.

Context rules (you have a ~200K window — respect it)

  • Files, not transcripts. Agent output lands in files; status lines are one line. Never TaskOutput a full transcript into context.
  • Summaries, not dumps. Children return ~200-token structured summaries.
  • NM is the long-term store. Anything durable lives in Nowledge Mem, not your window. Reread at each phase boundary, save at each checkpoint.
  • Never paste accumulated history into a dispatch. One task, its interfaces, its constraints. (SDD: a real dispatch hit 42k chars of pasted history — that was the bug.)

Anti-patterns (do NOT)

  • ❌ Dispatching independent tasks one per message (sequential = slow).
  • ❌ Polling loops (sleep && cat) — burns tokens you don't have.
  • ❌ Large prompts / full transcripts from subagents — blows the window.
  • ❌ Controller implementing fixes directly instead of routing to an agent — skips review and pollutes your context (SDD rule).
  • ❌ Parallel agents editing the same files without parallel-repo-safety / parallel-agent-contracts ownership.
  • ❌ Nesting "for cleanliness" — nesting adds latency; use it for context isolation only.
  • ❌ Forgetting Nowledge Mem between waves — one compaction and the goal's state is gone; the ledger + NM are the only things that survive.
  • ❌ Resuming after a compaction from a recollection of the goal instead of re-reading docs/verbatim.md — storage loss AND meaning drift.
  • ❌ Claiming done without evidence — verification-before-completion: run the checks, quote the output, then declare.
  • ❌ Stopping at goal completion without re-reading docs/verbatim.md for the next goal — the verbatim IS the goal chain; completion is a swap point, not a halt (user rule 2026-09-20).

Goal-tool integration (names vary by harness — use what exists)

  • Set/own the goal: set_goal / goal_set — objective + successCriteria + constraints up front.
  • Track: get_goal / goal_status — check budget, last checkpoint.
  • Drive: update_goal (in-progress checkpointing; complete/blocked/ paused/resumed with evidence or blocker).
  • Complete: goal_complete — summary, criteria w/ evidence, checks, files changed, known limitations. An auditor may verify — make evidence real.
  • Blocked only by the four classes: irreversible/destructive ops, security-sensitive actions, out-of-worktree side effects, or a plan so broken every path is a guess. Otherwise rule and continue — record the ruling (ledger + NM).
  • Check the user isn't steering: check_user_feedback at phase boundaries (it returns instantly; treat results as high-priority).
  • Park sub-goals (optional): create_work_task for reviewable pieces, create_automation for recurring runs.

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.