agentleFS
KoshuxKoshux/agentic-sdlc-scaffold/.claude/skills/orchestrate/SKILL.md

orchestrate

Skill0 starsChanged 4 months agoMITView on GitHub

Orchestrate parallel multi-agent implementation. Use when a task decomposes into genuinely independent units (e.g. an unrelated backend endpoint and frontend page) worth running concurrently. The main conversation thread runs this skill — it IS the orchestrator. Optional module; delete if you never run parallel workers.

186 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use define-requirements, orchestrate-plan and 10 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.
  • sson0-erSkill

    define-requirements

    Work with the user, one question at a time, to complete the requirements document (docs/claudex/<slug>/01-requirements.md). Run by the orchestrator (parent). Stays out of design and implementation.

    Also in 3 projects that use this

  • EternallLightSkill

    orchestrate-plan

    Use when executing a locked, reviewed PLAN.md by delegating the implementation to visible worker agents in Orca, herdr, or cmux ONE PHASE at a time — splitting the plan into context-window-sized phases, giving every phase a pristine worker context, and (when the plan touches INDEPENDENT repos) running one worker per repo IN PARALLEL. Triggers on "run the plan with a worker", "execute the plan in the other pane", "split the plan into phases and build it with workers", "build the backend and frontend in parallel panes". Not for edits you can finish inline; outside Orca, herdr, or cmux use tgc-skills:orchestrate.

    Also in 3 projects that use this

  • sson0-erSkill

    record-evidence

    How to record external facts (docs, command output, codebase findings) as evidence and design choices as decisions. Used by the researcher, designer and reviewer agents.

    Also in 3 projects that use this

  • PinkneyJiangSkill

    improve-architecture

    扫描代码库中的架构摩擦点,识别浅模块并挖掘深模块演进机会。生成可视化交互式 HTML 诊断报告,并在用户确认后闭环实施深度重构。

    Also in 6 projects that use this

  • koaeraserSkill

    house-style

    Exemplar-based house voice for LaTeX manuscripts: a reader-first standard judged against an approved exemplar, a house-voice rewrite that never changes meaning, numbers, citations, or defined terms, and advisory style metrics (sentence length, paragraph length, first-person plural, semicolons, numbers in prose) printed beside the exemplar's values. The exemplar can be replaced with your own via --ref. Used by write-manuscript, paper-writer, paper-grader, paper-fixer, paper-critic, and research-pipeline; also runs standalone.

    Also in 3 projects that use this

  • JaxsbrSkill

    spec-author

    Defines product specifications and build phases — takes ideas through the pipeline to produce phase specs the build-loop can execute and verify

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 165 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Worktree isolation: when workers must touch the same subtree, you need more than 2 writers, or a worker needs isolated verification.

    line 61
  2. Distinctive:

    Read every worker log — confirm Complete and review the files-changed lists.

    line 81
  3. Distinctive:

    If worktrees were used, integrate their changes into the working tree.

    line 82
  4. Very specific:

    Run only the relevant targeted tests.

    line 84
  5. Very specific:

    Run the Stage 5.5 self-code-review skill on the combined diff.

    line 93

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

Orchestration Mode

You (the main thread) are the orchestrator. Subagents cannot re-delegate, so all fan-out happens here. The deep protocol is docs/parallelisation.md — this skill is the entry point; follow that doc rather than duplicating it.

0. Decide whether to orchestrate at all

Two independent tests, both of which must pass:

  1. Collisions. Orchestrate ONLY if the task splits into units that touch non-overlapping files with no ordering dependency. If in doubt, work sequentially — a collision costs more than the parallelism saves. If the whole task takes under ~5 minutes solo, do not parallelise.
  2. Budget (docs/parallelisation.md §1.5). Fan-out costs real tokens: every worker rebuilds context from scratch. Delegate only for breadth beyond one context (30+ files) or for independence from your own reasoning on something you authored. Never investigate AND delegate the same question — pick one; if you delegate, wait for it rather than working the same question yourself in parallel.

Hard ceiling: 3 concurrent workers — for collision cost and token cost, so it binds even when the units provably cannot collide. Never scale worker count with the number of findings or items; batch them across ≤3 workers instead.

1. Decompose and assign (before spawning)

  1. Break the task into independent units. Verify independence: no shared files, no "B needs A's output", no writes to the same DB table.
  2. Assign each unit a non-overlapping subtree and a worker:
    • backend unit → backend-implementer (owns apps/<service>/src/...)
    • frontend unit → frontend-implementer (owns frontend/apps/web/...)
  3. Record the coordination plan (each worker's scope + owned files) in the implementation log.

2. Do shared prerequisites YOURSELF first

The orchestrator owns every single-owner high-contention file (list in .claude/rules/codemap.md): prisma/schema.prisma, src/schemas/index.ts, src/controllers/index.ts, src/routes/index.ts, pnpm-lock.yaml, frontend/layers/shared/zod/ (generated). Complete and freeze the shared contracts before any worker starts:

  • Prisma schema change + migration + pnpm zod:generate (schema-first — workers consume stable, generated types).
  • Registration-file entries (schemas/index.ts, controllers/index.ts, routes/index.ts).

Workers never touch these files.

3. Choose an isolation strategy

  • Default — shared tree, directory-partitioned: clean backend/frontend split, 2 workers, zero subtree overlap. No worktree overhead, no extra install.
  • Worktree isolation: when workers must touch the same subtree, you need more than 2 writers, or a worker needs isolated verification. Trade-offs (no node_modules in a fresh worktree; integration tests run in the main tree) in docs/parallelisation.md.

4. Fan out

Spawn all independent workers in a single message for true parallelism. Worker rules:

  • Each worker writes a status log SUBAGENT_<TASK>_<YYYY-MM-DD_HH-MM>.md at the repo root before editing, and marks it Complete (with a files-changed list) when done.
  • Workers never run git on the shared tree — no add, commit, checkout, stash. The orchestrator owns all git operations.
  • Workers stay inside their assigned subtree; anything outside it is a blocker to report, not a file to edit.

While workers run, do not edit worker-owned files — work only on unowned files or wait.

5. Integrate and verify (orchestrator only)

  1. Read every worker log — confirm Complete and review the files-changed lists.
  2. If worktrees were used, integrate their changes into the working tree.
  3. pnpm tsc --noEmit across affected packages to catch integration breaks.
  4. Run only the relevant targeted tests; pnpm e2e from frontend/ if UI changed (container preflight first — .claude/rules/testing.md).
  5. Consolidate worker logs into the main implementation log; keep the SUBAGENT logs for audit.
  6. On a worker crash, assess damage from its log before spawning a replacement — see docs/parallelisation.md.

6. Handoff

Run the Stage 5.5 self-code-review skill on the combined diff. Browser verification and merge to main stay with the operator — you do not merge.

Task to orchestrate:

$ARGUMENTS

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.