Dependency Graph Planner for a Multi-Agent Software Release Workflow

Turns a list of release tasks into a dependency graph with parallel batches, critical path, shared-resource conflicts, and agent assignments. Supports the decision on what to run now versus wait on.

You get: No cycles remain, every batch respects the concurrency limit and has an… and every shared-resource conflict has a rule

More like this

The prompt

dependency-graph-planner-for-a-multi-agent-software-release-workflow.md
ROLE
You are an orchestration lead planning dependency-based execution for coding and QA agents.

CONTEXT
Project: {project}. Tasks: {tasks}. Available agents and their strengths: {agents}. Known dependencies: {dependencies}. Shared resources (files, environments, databases, APIs): {shared_resources}. Maximum agents that can run at once: {max_parallel_agents}. Definition of done: {definition_of_done}. Tool: {tool_platform}.
Job to be done: decide which tasks to start now in parallel, which to hold, and where the schedule is most likely to break.

TASK
Build a dependency graph, find the critical path, group tasks into parallel batches, assign agents, and define merge and verification checkpoints.

CONSTRAINTS
- Ask for missing inputs first (max 6 questions). Then list assumptions separately from stated facts.
- Do not assume a dependency exists or does not exist without labeling it as inferred.
- Never schedule two agents to write to the same shared resource at the same time without a merge or locking rule.
- Respect {max_parallel_agents} in every batch.
- Platform notes: for Claude Code or Cursor, give each agent task as a self-contained brief with files to touch, files to avoid, and a test command. For LangGraph, express the plan as nodes, edges, and shared state keys. For CrewAI or AutoGen, express tasks with context dependencies and the expected output of each. Do not claim the plan was executed or tested.

INPUTS
Confirm you have: project, tasks, agents, dependencies, shared_resources, max_parallel_agents, definition_of_done, tool_platform. Flag vague tasks that cannot be assigned (for example, 'fix everything').

WORKFLOW
1. Normalize tasks: ID, description, estimated effort (S/M/L, labeled as an estimate), inputs needed, outputs produced.
2. Build the dependency list, marking each as stated or inferred.
3. Detect cycles, orphan tasks, and tasks with no verifiable output.
4. Compute the critical path and parallel batches within the concurrency limit.
5. Check shared-resource conflicts and add locking, branching, or sequencing rules.
6. Assign agents and define verification checkpoints (tests, review, integration check) after each batch.
7. Recommend what to start now and what to hold, with risks and missing information.

OUTPUT FORMAT
A. Facts / Assumptions / Open questions
B. Task table: ID | Task | Effort (est.) | Depends on | Stated or inferred | Output
C. Batch plan table: Batch | Tasks | Agent | Shared resources touched | Entry condition | Exit check
D. Critical path: ordered task IDs with the reason it is critical
E. Graph text diagram (task ID -> task ID, one line per edge)
F. Conflict and risk register: Risk | Affected tasks | Mitigation | Owner
G. Agent briefs: one short brief per assigned task
H. Next actions: what to launch now, what to hold, what to clarify

ACCEPTANCE CRITERIA
- No cycles remain, or each cycle is flagged with a proposed break.
- Every batch respects the concurrency limit and has an entry condition and an exit check.
- Every shared-resource conflict has a rule.
- Every task is traceable to a verifiable output.
- Inferred dependencies are labeled so I can confirm them.

QUALITY CHECKS
Before finalizing: re-walk the graph to confirm each task appears in exactly one batch; confirm no task starts before its dependencies finish; confirm the definition of done is covered by at least one exit check; confirm effort values are labeled as estimates. Report any check you could not complete.

Example output

AI-written example

A. Facts / Assumptions / Open questions

  • Facts: Project is Fitlog v2.4 (workout tags). Tool is Claude Code. Max 2 agents at once. Agents are Backend-1, Mobile-1, Mobile-2, QA-1. Done means migration applied on staging, tag flow passing e2e on iOS and Android, and changelog merged.
  • Assumptions: Mobile UIs need the final API contract (inferred). Release notes need only scope, not code (inferred).
  • Open question: Can mobile start against openapi.yaml before the API is implemented?

B. Tasks

IDTaskEffort (est.)Depends onStated/InferredOutput
T1Add workout_tags migrationSnonestatedMigration up/down passes
T2Tags API endpointsMT1statedEndpoints, unit tests green
T3iOS tag UIMT2inferredPassing UI tests
T4Android tag UIMT2inferredPassing UI tests
T5E2E tag flow testsLT3, T4statedE2E report
T6Changelog/release notesSnoneinferredMerged CHANGELOG.md
T7Staging deployST5statedSmoke test passes

C. Batch plan
| Batch | Tasks |

Generated from this prompt by AI. Your results will vary.

Tips and common edits

Paste real task lists, not summaries. Confirm every inferred dependency before launching agents. For long task lists, run the plan in two passes: first the graph and batches, then the agent briefs.

Questions about this prompt

Strict JSON Handoff Schemas with Validation and Retry Rules for Agent Pipelines

Turns a pasted pipeline description into JSON schemas for every agent-to-agent handoff, plus validation checks and retry rules for bad output.

Agent Pipeline Failure Mode Audit with Retry, Fallback, and Human Escalation Rules

Audits an existing multi-agent pipeline for failure modes and produces retry limits, fallback paths, escalation triggers, and a test plan. Supports the decision on what to harden before wider rollout.

Characterization Tests Before a Refactor

Writes tests that lock in a module's current behavior, including edge cases and quirks, so you can refactor safely.

Codebase Tour for a Specific Task

Explores a repo through the lens of your task and explains the architecture, key files and data flow, then says where to start.

Coding Agent Task Brief with Guardrails, Test Plan, and Rollback Steps

Creates a scoped brief for an AI coding agent that limits file changes, defines tests, and includes a rollback plan and review checklist.

Failing Test First Bug Fix

Reproduces a bug with a failing test, finds the root cause, applies the smallest fix and shows the test passing.

Parallel Research Fan-Out and Fan-In with Citation Table and Decision Memo

Splits a research question across parallel research agents, defines source discovery and evidence review steps, merges findings into a citation table, and produces a decision memo without claiming live browsing.

Sequential Agent Handoff Contract Builder for Research-to-Publish Chains

Designs the handoff contracts, stop conditions, and review gates for a sequential chain such as researcher, writer, editor, and fact-checker. Helps you decide whether the chain is ready to run.

Orchestrator System Prompt Builder with Progress Ledger and Stop Conditions

Writes a ready-to-deploy orchestrator system prompt that delegates to your workers, tracks progress in a ledger, merges results and stops on defined conditions.

Parallel Git Worktree Task Split with Interface Contracts and Merge Order

Turns a pasted feature spec into independent coding-agent tasks with file ownership, interface contracts, a merge order and a done command for each task.

Research-to-Report Pipeline with Planner, Researcher, Writer and Fact-Checker

Designs a four-agent pipeline for your report type with each agent's prompt, inputs, outputs and handoff format.

Subagent Roster Designer for Your Coding Project

Produces a 3-5 subagent roster with system prompts, minimal tool permissions, model tiers and explicit handoff rules for your project.