plan-to-dag
Skill2 starsChanged 6 months agoMITView on GitHub
Convert large multistep plans, implementation roadmaps, architecture plans, migration plans, or vague next-step requests into dependency-aware DAGs with execution waves, parallel worksets, ownership boundaries, validation gates, and subagent-ready prompts. Use when the user asks for a task graph, DAG, wave plan, dependency plan, implementation breakdown, or subagent prompt pack.
In this repository10 other files it gives its agents.
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 12 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 43
Prefer small implementation nodes with clear write scopes.
- Distinctive: line 47
Use these dependency defaults unless the repo proves otherwise:
- Distinctive: line 57
Read-path switch before deleting compatibility paths.
- Distinctive: line 96
Commit boundaries should align with waves or independently reviewable slices.
- Distinctive: line 100
Keep blocking work local when immediate next actions depend on it.
- Distinctive: line 102
Before proposing subagents, explicitly answer:
- Distinctive: line 143
Always tell worker subagents:
- Distinctive: line 153
If a structured DAG artifact is useful, emit JSON and validate it with:
- Very specific: line 159
Use references/dag-json-schema.md only when a strict machine-readable DAG is requested or when the user asks to save the DAG as an artifact.
- Distinctive: line 165
every non-root task has at least one dependency or a clear reason it is root
- Distinctive: line 166
no task depends on itself
- Distinctive: line 168
every wave contains only tasks whose dependencies are in earlier waves
- Distinctive: line 169
every task has a validation gate
≈ “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
Plan To DAG
Core Rule
Turn the plan into an execution graph before implementation. Do not produce a flat task list for work that has dependencies, shared files, rollout gates, or multiple agents.
Workflow
- Extract concrete tasks.
- Mark blockers, dependencies, and shared write surfaces.
- Classify tasks by type and risk.
- Build a DAG.
- Compress the DAG into execution waves.
- Define validation gates for each wave.
- Produce subagent prompts only for tasks that can run independently.
- State what must stay local on the critical path.
Task Extraction
Convert prose into task nodes. Each node must have:
id:
title:
type: research | design | code | test | docs | migration | ops | review
owner: local | worker | explorer | human | external
write_scope:
inputs:
outputs:
depends_on:
parallel_with:
risk: low | medium | high
validation:
done_when:Prefer small implementation nodes with clear write scopes. Avoid vague nodes such as “integrate platform” or “improve system”.
Dependency Rules
Use these dependency defaults unless the repo proves otherwise:
- Contracts before producers and consumers.
- Schemas before generated types.
- DB migrations before stores and APIs.
- Store methods before API handlers.
- API handlers before UI integration.
- Runtime registry before runtime execution.
- Feature flags before behavior changes.
- Dual-write before read-path switch.
- Read-path switch before deleting compatibility paths.
- Tests beside each behavior change, not only at the end.
- Docs/ADRs before irreversible architecture changes.
Parallelization Rules
Parallelize only when write scopes do not overlap and the tasks do not depend on each other.
Good parallel splits:
- schema/type work vs documentation
- platform API tests vs vehicle runtime tests
- UI handoff docs vs backend migration design
- independent app handlers with separate files
Bad parallel splits:
- two workers editing the same generated API file
- implementation before schema is settled
- tests for behavior not yet implemented
- cleanup that touches files active workers are editing
Wave Design
Group tasks into waves where every task in a wave can start after prior waves complete.
Each wave must include:
wave:
objective:
tasks:
parallelism:
critical_path:
validation_gate:
rollback_or_backout:
commit_boundary:Commit boundaries should align with waves or independently reviewable slices. Avoid a mega-commit that mixes contract, DB, API, UI, and docs.
Critical Path
Keep blocking work local when immediate next actions depend on it. Use subagents for bounded sidecar work that can run without blocking the main rollout.
Before proposing subagents, explicitly answer:
- What am I doing locally right now?
- Which tasks can safely run in parallel?
- Which files or modules does each worker own?
- What must not be touched by each worker?
Output Format
For normal planning, output:
- Direction check.
- DAG table.
- Wave plan.
- Subagent prompt pack.
- Validation matrix.
- Risks and kill criteria.
For implementation handoff, add:
- exact repo paths
- file ownership per worker
- forbidden files or behaviors
- expected commits
- test commands
Subagent Prompt Pack
Each prompt must be self-contained and bounded:
Task:
Context:
Ownership:
Do not touch:
Inputs:
Expected output:
Validation:
Return:Always tell worker subagents:
You are not alone in the codebase. Do not revert edits made by others. Keep your write scope tight and adapt to surrounding changes.For explorer subagents, ask specific codebase questions, not broad “understand everything” prompts.
Validation
If a structured DAG artifact is useful, emit JSON and validate it with:
python3 <skill-dir>/scripts/validate_dag.py path/to/dag.jsonUse references/dag-json-schema.md only when a strict machine-readable DAG is requested or when the user asks to save the DAG as an artifact.
Quality Bar
The DAG is acceptable only if:
- every non-root task has at least one dependency or a clear reason it is root
- no task depends on itself
- no cycles exist
- every wave contains only tasks whose dependencies are in earlier waves
- every task has a validation gate
- subagent tasks have disjoint write scopes
- high-risk tasks have rollback or kill criteria
- the first wave creates evidence or a durable seam, not process-only work
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.

