task-graph-orchestration
Skill0 starsChanged 4 months agoMITView on GitHub
Use for a complex Claude Code task with substantial fan-out, several genuine dependencies, broad repository scope, layered consolidation, separate implementation and verification paths, or an approval-gated irreversible action — whether the root session executes every node itself or hands bounded nodes to helpers. Makes the work topology explicit in Markdown, runs only the parts whose inputs are ready, preserves completeness through consolidation, and reruns only what a failure actually invalidated. Skip it for small or genuinely linear work.
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- ArcanEdge-AI/coding-agent-playbook-codexedited, first seen Aug 17, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- ArcanEdge-AI/coding-agent-playbook-codex★ 311% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- aws-local-preflightSkill
- feature-branch-lifecycleSkill
- handoffSkill
- legacy-path-retirementSkill
- local-ci-preflightSkill
- multi-role-repo-reviewSkill
- multi-session-coordinationSkill
- platform-documentationSkill
- production-api-integrationSkill
- production-architecture-reviewSkill
- production-code-qualitySkill
- production-database-integritySkill
- production-devops-releaseSkill
- production-documentation-onboardingSkill
- production-pass-orchestratorSkill
- production-performance-reviewSkill
- production-readiness-reportSkill
- production-reliability-observabilitySkill
- production-security-reviewSkill
- production-testing-qaSkill
- production-ux-accessibilitySkill
- reference-doc-routingSkill
- senior-code-reviewSkill
- session-cleanupSkill
- subagent-orchestrationSkill
- technical-debt-auditorSkill
- worktree-lifecycleSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
26 rules. About 0 are common, 18 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
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
- Distinctive: line 14
Use a formal graph when several of these hold:
- Distinctive: line 29
Read the request, the repository state, the applicable CLAUDE.md, the validation surfaces, and who already owns what.
- Very specific: line 30
Run
multi-session-coordinationfirst: if other sessions, branches, worktrees, pull requests, or active-work records might touch this. - Very specific: line 36
Read references/templates/task-graph.md before creating a graph artifact.
- Very specific: line 37
Use the worktree-lifecycle skill if any node proposes or already uses an auxiliary checkout.
- Very specific: line 38
Use the feature-branch-lifecycle skill if any node creates, integrates, promotes, or deletes a branch.
- Very specific: line 40
Keep a medium graph in your working plan.
- Distinctive: line 52
only the upstream nodes whose accepted output it actually consumes
- Distinctive: line 53
read scope, and write ownership if it edits
- Distinctive: line 66
If yes, there is no data dependency.
- Distinctive: line 78
Add explicit consolidation nodes where several outputs must combine.
- Distinctive: line 86
If parallelism is unavailable, run ready nodes sequentially while preserving dependencies.
- Distinctive: line 87
Keep architecture, security judgment, destructive operations, migrations, concurrency design, public API compatibility, and final …
- Very specific: line 90
Start in the shared workspace with an auxiliary-worktree budget of zero.
- Very specific: line 92
When a helper executes a node, write the assignment with the subagent-orchestration skill and add:
- Distinctive: line 112
Check the output against its acceptance condition and the primary evidence.
- Distinctive: line 114
Keep dependents blocked while an output is missing, failed, or rejected.
- Distinctive: line 116
Before consolidating, write down which node IDs you expected, received, are missing, failed, or blocked.
- Very specific: line 122
Use an independent senior-reviewer or test-triager node when risk, blast radius, or unverifiable synthesis warrants it.
- Distinctive: line 124
When a gate fails:
- Distinctive: line 126
Keep accepted outputs from unrelated nodes.
- Distinctive: line 129
Update the affected portion of the graph when the failure reveals a missing dependency or a wrong decomposition.
- Distinctive: line 130
Stop retrying when the same failure repeats, and report the blocker.
- Distinctive: line 132
Before completion: verify combined behavior and the final diff, confirm the completeness counts, and confirm no required node or approval …
- Distinctive: line 136
Do the safe inspection, reversible preparation, and validation before the gate.
- Distinctive: line 148
Do not describe the result to the user as a graph runtime or a mechanically enforced workflow.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Task Graph Orchestration
For work complicated enough that "what can start now?" stops being obvious, write the topology down before you execute it.
This is a planning discipline expressed in Markdown. It adds no graph database, scheduler, runner, schema package, or orchestration framework. You still do the ordinary work yourself, with an optional bounded helper only where one earns its cost; the graph is how you keep track of what is ready, what is blocked, and what a failure invalidated — whether one agent or several execute the nodes.
When it earns its cost
Use a formal graph when several of these hold:
- Multiple independent investigations can run concurrently.
- One agent must carry many interdependent items without losing track of which are ready, or several helpers will be involved.
- Many similar items must be audited or transformed with no omissions.
- Results need layered consolidation.
- Implementation branches share contracts, schemas, interfaces, or mutable state.
- A schema or interface change creates downstream consumers.
- The result is hard for the user to verify by eye.
- The task ends in deployment, deletion, publication, outbound communication, or another approval-gated action.
Skip it when the work is small, genuinely linear, dominated by one coherent design judgment, confined to tightly coupled writes, or simply cheaper to do than to model, unless the user or a governing skill asks for a formal graph. Skipping the graph does not mean skipping the skills that apply, the verification, or the normal engineering loop.
Preflight
- Read the request, the repository state, the applicable
CLAUDE.md, the validation surfaces, and who already owns what. - Run
multi-session-coordinationfirst if other sessions, branches, worktrees, pull requests, or active-work records might touch this. Treat their work as external constraints; your graph does not control it. - State the goal and the observable success criteria.
- Select the skills whose triggers apply to this work, read each entrypoint before the work it covers, and note which nodes each skill governs.
- Set the helper launch and retry allowance before any node is assigned to a helper. Zero is a valid allowance; most graphs the root executes itself need none.
- Note the main session's model for provenance only, where you can observe it. It does not set a helper's route — a helper's model is chosen for its work within the approved routes, and its effort comes from its definition.
- Identify every action that will need explicit approval — audience-facing, destructive, irreversible, sensitive, production-affecting, materially costly, or outside current authority.
- Read
references/templates/task-graph.mdbefore creating a graph artifact. - Use the
worktree-lifecycleskill if any node proposes or already uses an auxiliary checkout. - Use the
feature-branch-lifecycleskill if any node creates, integrates, promotes, or deletes a branch. A branch is not automatically a node.
Keep a medium graph in your working plan. For long-running, multi-phase, or multi-session work, write .claude/coordination/task-graphs/<task-slug>.md when repository policy allows a local coordination artifact. Do not create a repository artifact for an informational question or a task that does not authorize changes.
Define the nodes
Each node gets:
- a stable ID
- one bounded goal
- an executor — yourself by default; a named subagent role only where the node's bounded output has a concrete benefit from a helper (independent evidence, genuine parallelism, or reading you would rather keep out of your context). Orchestration, integration, verification, approval, and final acceptance are always yours.
- the skills that govern its method and required checks, if any
- its authoritative inputs
- a declared output shape and acceptance condition
- only the upstream nodes whose accepted output it actually consumes
- read scope, and write ownership if it edits
- an exact workspace
- a verification gate proportionate to the risk
- a status
A node describes work and its dependencies, never an agent hierarchy. When a helper executes one, its role, model, effort, permission mode, tool boundary, and write ownership belong in a separate helper-assignment record — see the template — so the topology stays readable and a node never implies a dispatch.
Audit every edge
For each proposed dependency, ask one question:
Can the downstream node begin correctly without an accepted output or decision from the upstream node?
If yes, there is no data dependency. Delete the edge. Narrative order is not dependency, and every false edge costs you parallelism.
Then look separately for the constraints that do not appear as data edges:
- overlapping file or mutable-state writes
- schemas, migrations, interfaces, public contracts
- shared ports, services, environments, locks, credentials, rate limits
- cost or resource ceilings
- active ownership in another session or worktree
- worktree base-state requirements
- destructive, irreversible, production, or audience-facing actions
Add explicit consolidation nodes where several outputs must combine. Add independent verification nodes for high-risk claims. Add approval nodes immediately before actions that need authorization. Then identify the path that actually controls completion, and the initial ready set.
Execute only what is ready
A node is ready when every declared dependency has an accepted output and every hidden constraint is satisfied.
- Execute ready nodes yourself, in an order that respects the edges. A node is not a reason to launch a helper.
- Hand a ready node to a helper only when the executor decision above holds, the allowance has room, and there is runtime, safety, permission, and ownership capacity. Concurrent-subagent limits are backpressure, not a reason to queue speculative work.
- If parallelism is unavailable, run ready nodes sequentially while preserving dependencies.
- Keep architecture, security judgment, destructive operations, migrations, concurrency design, public API compatibility, and final acceptance with yourself.
- For helper-executed nodes: use
planmode roles for exploration, research, and review;defaultfor write-capable roles. Rememberplan-mode subagents cannot reliably run suites — route execution totest-triager. - For helper-executed nodes: first confirm the helper is worth its cost for that node — a graph node is never a reason by itself. Then pass an approved model explicitly on every dispatch, chosen for the node's work (
haikufor lookup or extraction,opusfor judgment), and use a bundled role so its definition's effort applies. The approved routes are the same at every layer, for retries, and for replacements; a forced subagent model or an allowlist substitution is a constraint to report, not a substitute to accept. - Start in the shared workspace with an auxiliary-worktree budget of zero. Only you may authorize
isolation: worktree, and descendants never request it.
When a helper executes a node, write the assignment with the subagent-orchestration skill and add:
Graph node:
Depends on (accepted outputs consumed):
Declared inputs:
Applicable skills (name and entrypoint path, read before the covered work):
Output shape and acceptance condition:
Read scope / write ownership:
Model: [haiku or opus, chosen for this node's work]
Role (and the effort its definition sets):
Permission mode and tools:
Exact workspace:
Verification gate:A subagent must not restructure your graph, consume undeclared inputs, widen its own capabilities, or report a blocked dependency as complete. A local-orchestrator manages only its declared subtree, and returns its output or an exact gap.
Update state after every node completes
- Check the output against its acceptance condition and the primary evidence.
- Record status, evidence, artifacts, and any assumption that changed.
- Keep dependents blocked while an output is missing, failed, or rejected.
- Recompute the ready set.
- Before consolidating, write down which node IDs you expected, received, are missing, failed, or blocked.
For large fan-out, consolidate in layers. Preserve node IDs, paths, evidence references, counts, severity, and confidence. Do not collapse specific findings into a vague summary — that is where completeness silently disappears. Confirm every expected node appears exactly once or is explicitly listed as missing, failed, blocked, or superseded.
Verify and retry narrowly
Use an independent senior-reviewer or test-triager node when risk, blast radius, or unverifiable synthesis warrants it. Give the verifier the source artifacts and the acceptance criteria — not the producer's summary. A verifier handed a summary verifies the summary.
When a gate fails:
- Keep accepted outputs from unrelated nodes.
- Rerun the failed node after stating the failure evidence and what will change. If a helper ran it, the retry stays within the approved routes and consumes the allowance; a different model is not a substitute for a sharper assignment, and effort is never raised to make it pass.
- Rerun downstream nodes only where the input they consumed actually became invalid.
- Update the affected portion of the graph when the failure reveals a missing dependency or a wrong decomposition.
- Stop retrying when the same failure repeats, and report the blocker.
Before completion: verify combined behavior and the final diff, confirm the completeness counts, and confirm no required node or approval gate is still open. Reconcile every task-created auxiliary worktree.
Approval gates
Do the safe inspection, reversible preparation, and validation before the gate.
Immediately before the gated action, state the exact target, scope, consequences, cost, audience, and rollback path. Then stop until authorization is explicit.
The active permission mode still applies, and you never change or bypass it to avoid a prompt. Approval of the plan, or of an earlier node, does not authorize a broader or different irreversible action.
What this is not
Soft semantics, not a scheduler. Concurrency may be unavailable, graph state can drift, your dependency classification can be wrong, and there is no caching or transactional state. Recheck repository state, ownership, node inputs, permission mode, and approval status at every consequential transition.
The graph authorizes nothing by itself — not helpers, not nesting, not worktrees, not spending. Each of those has its own gate.
Do not describe the result to the user as a graph runtime or a mechanically enforced workflow. It is a plan you are keeping honestly.
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
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.

