Non-negotiable rules:
- Start with scope challenge and mode selection using AskUserQuestion.
- Explore existing code before decomposing. Never invent file paths.
- Build one canonical plan object, then emit both markdown and JSON from it.
- Every task must have explicit ownership, validation, dependency handling, and an Agent field.
- Keep the skill body focused on workflow. Load plan schema, agent mapping, and examples from references.
- Every task needs 2-3 testable acceptance criteria, at least one covering a failure or edge case.
- Never create tasks touching more than 3 files, never create circular dependencies, never assume codebase structure.
- If a task claims side effects (persistence, WAL, network I/O, registration), state where the capability comes from.
- For new files, explicitly assign export/registration/wiring ownership to a task.
- If a task can be "completed" with placeholders or dead wiring, split semantic hardening into an explicit follow-up.
- Treat JSON as the source of truth. Render markdown from the same canonical plan object.
- Do not use vague contract language ("internal update", "eventually skipped", "graceful degradation") without defining owner, behavior, and recovery.
- Distinguish local reuse from external references. Do not present external docs or clones as local code.
Plan To Task List With DAG
Inputs
$request: Optional feature or planning request text
Goal
Produce a concrete task DAG that is safe to execute:
- scope-challenged
- grounded in real repository structure
- atomic enough for parallel work
- persisted to
.ulpi/plans/<plan-name>.md and .ulpi/plans/<plan-name>.json
Step 0: Challenge scope before planning
Before decomposing, do a quick overlap check:
- prefer the
codemap skill if available for semantic search
- otherwise use
Glob, Grep, and Read
Identify:
- what already exists
- what can be reused
- what is truly new
- likely prerequisites
- likely non-goals
- whether the request is small enough to execute directly instead of planning
Then use AskUserQuestion to confirm:
- planning mode:
EXPANSION, HOLD, or REDUCTION
- default post-task review:
claude, codex, kiro, all, or none
- any scope cuts or explicit non-goals
Do not proceed until the scope framing is confirmed.
Success criteria: The user has confirmed the scope, selected a planning mode, and chosen a default review posture.
Step 1: Explore the real code surface
Explore the repository before writing any task:
- likely modules and directories involved
- existing code that partially solves the request
- shared integration surfaces:
- package roots
- export barrels
- registries
- routers
- manifests
- startup hooks
- public surfaces:
- API routes
- CLI commands
- config files
- schemas
- persisted formats
Rules:
- prefer semantic search via
codemap skill when available
- use
Grep for exact-string validation
- use
Read on the actual files before naming them in tasks
- never invent paths, modules, or existing helpers
Success criteria: Every path named in the plan comes from observed repository state.
Step 2: Capture planning contracts
Before tasking, record the conditions that make the plan valid:
- prerequisites
- non-goals
- cross-boundary contracts
- capability providers for side effects
- shared integration points
- ship cut if execution stops halfway
Explicitly note:
- where persistence comes from
- who owns export and registration edits
- which public surfaces must remain stable
- which failure paths or isolation invariants must be preserved
Success criteria: The plan explains what must already be true and what is explicitly out of scope.
Step 3: Decompose into atomic tasks
Create tasks that are:
- atomic
- file-scoped
- dependency-aware
- reviewable
Task rules:
- prefer 1 to 3 files per task
- every file in
writeScope must have an explicit role
- every task needs:
TASK-NNN id
- title
- description
Type
Priority
Effort
Agent (see Agent Selection Reference in references/output-format.md)
- acceptance criteria
writeScope
validateCommand
- include 2-3 testable acceptance criteria per task; at least one must cover a failure or edge case
- for public surfaces, pin the exact signature/examples and add a wrong-shape or wrong-routing check
- for rewrite or composition tasks, add at least one criterion proving existing semantics were not silently dropped
- if a new file needs export or registration, assign that ownership to a specific task
- if a task only creates structure and semantic hardening is still needed, split that follow-up explicitly
validateCommand MUST be SLICE-SCOPED — greenable by THIS task's writeScope plus its already-integrated dependencies, and runnable independently of unrelated work:
- Scope it to the task's own files, never a whole package. For vitest, use
pnpm --filter <pkg> exec vitest run <path/to/file.test.ts>. Do NOT use pnpm --filter <pkg> test -- <file> — the -- makes vitest ignore the positional and run the ENTIRE package, so unrelated or pre-existing failures leak into this task's gate and can falsely block a correct slice.
- Every test file the command runs must be in this task's
writeScope or guaranteed green by an integrated dependency. Never point a task's validate at a test file another task owns and this task cannot fix.
- Avoid whole-suite/e2e commands that only pass at end-state; if two pieces cannot each validate independently, they belong in ONE task.
Success criteria: Each task is executable without hidden context and small enough for independent review.
Step 4: Map dependencies and maximize parallelism
Add dependencies only when they are real:
- file overlap
- data flow
- API contract
- shared integration surface
- capability provider
- lifecycle or bootstrap dependency
Do not over-constrain:
- independent tasks should stay parallel
- shared-file edits should be made explicit rather than hidden
- circular dependencies are invalid
Use P0 through P3 priorities:
P0: foundations that unblock other tasks
P1: core feature work
P2: supporting work and edge cases
P3: optional polish, docs, or cleanup
Success criteria: The dependency graph is acyclic, minimal, and exposes real parallel layers.
Step 5: Render markdown and JSON from one canonical plan object
Before writing output, load references/output-format.md.
Write both files:
.ulpi/plans/<plan-name>.md
.ulpi/plans/<plan-name>.json
Requirements:
- markdown and JSON must describe the same tasks
- task ids must match exactly in both files
- dependency JSON is the source of truth
- markdown must not contain
[PLAN] markers on disk
Success criteria: Both artifacts exist and describe the same DAG.
Step 6: Validate before finishing
Run a final structural pass:
- all task ids exist in markdown and JSON
- every dependency target exists
- no cycles
- no phantom file paths
- no task exceeds sensible write scope
- acceptance criteria include edge or failure behavior where needed
- review default is present
Load references/examples.md only if you need a pattern for presentation shape.
Success criteria: The plan is schedulable, internally consistent, and ready for execution.
Guardrails
- Do not skip AskUserQuestion-based scope challenge.
- Do not turn this into direct implementation.
- Do not invent existing files, helpers, or package boundaries.
- Do not keep giant examples or output templates inline in
SKILL.md.
- Do not add
paths:. This is a generic workflow skill.
- Do not add
context: fork. This workflow depends on user interaction mid-process.
- Do not introduce agent-only headers.
- Do not create tasks that touch more than 3 files.
- Do not over-constrain dependencies -- independent tasks must stay parallel.
- Do not hide required shared-file edits behind narrow write scopes.
- Do not let a task claim side effects that require capabilities the task never defines.
- Do not present external docs, clones, or web research as local code unless the path exists in the repo.
- Do not use P1-P4 priorities. This skill uses P0-P3.
- Do not hand-maintain counts, layer summaries, or dependency references separately between JSON and markdown -- derive from canonical plan object.
When To Load References
references/personality.md
Use at session start for role, expertise, traits, and communication style.
references/knowledge.md
Use for DAG semantics, parser assumptions, and plan-object knowledge.
references/output-format.md
Use before rendering final markdown and JSON artifacts.
references/examples.md
Use only when you need an example shape for a similar request.
Output Contract
Report:
- selected mode and review default
- plan file paths
- task count and critical path summary
- major prerequisites and non-goals
- any notable risks or cut-line decisions
1---
2name: plan-to-task-list-with-dag
3version: 2.0.1
4description: |
5 Turn a request into a SCHEDULABLE task DAG — atomic tasks with real dependencies, not planning prose:
6 challenge scope and pick a planning mode with the user first, explore the real repo so no path is
7 invented, then decompose into atomic TASK-NNN entries — each with a ≤3-file write scope, 2-3 testable
8 acceptance criteria, a slice-scoped validate command, explicit dependencies, and an assigned agent —
9 emitted as one canonical object into matching `.ulpi/plans/<name>.md` and `.json`. Every named path
10 comes from observed repo state, the dependency graph stays acyclic, and JSON is the source of truth the
11 markdown is rendered from — no phantom files, no circular edges, no task that hides side effects it
12 never provisions. Use when the user asks to plan, decompose, or break work into execution-ready tasks.
13allowed-tools:
14 - AskUserQuestion
15 - Read
16 - Glob
17 - Grep
18 - Skill
19 - Write
20 - TodoWrite
21argument-hint: "[feature or planning request]"
22arguments:
23 - request
24when_to_use: |
25 Use when the task is to produce a structured, execution-ready plan rather than to code immediately.
26 Examples: "plan this feature", "break this into tasks", "make a DAG plan", "decompose this for
27 parallel agents". It opens with a scope-challenge question, so confirm intent first. Do NOT use for
28 trivial single-file work, high-level brainstorming, code review, direct execution, or to gate a
29 finished plan (that's plan-founder-review) — this produces the plan, it does not run or judge it.
30metadata:
31 source: https://skillmd.com/skills/ulpi-io/plan-to-task-list-with-dag
32---
33
34<EXTREMELY-IMPORTANT>
35This skill creates schedulable plan artifacts, not loose planning prose.
36
37Non-negotiable rules:
381. Start with scope challenge and mode selection using AskUserQuestion.
392. Explore existing code before decomposing. Never invent file paths.
403. Build one canonical plan object, then emit both markdown and JSON from it.
414. Every task must have explicit ownership, validation, dependency handling, and an Agent field.
425. Keep the skill body focused on workflow. Load plan schema, agent mapping, and examples from references.
436. Every task needs 2-3 testable acceptance criteria, at least one covering a failure or edge case.
447. Never create tasks touching more than 3 files, never create circular dependencies, never assume codebase structure.
458. If a task claims side effects (persistence, WAL, network I/O, registration), state where the capability comes from.
469. For new files, explicitly assign export/registration/wiring ownership to a task.
4710. If a task can be "completed" with placeholders or dead wiring, split semantic hardening into an explicit follow-up.
4811. Treat JSON as the source of truth. Render markdown from the same canonical plan object.
4912. Do not use vague contract language ("internal update", "eventually skipped", "graceful degradation") without defining owner, behavior, and recovery.
5013. Distinguish local reuse from external references. Do not present external docs or clones as local code.
51</EXTREMELY-IMPORTANT>
52
53# Plan To Task List With DAG
54
55## Inputs
56
57- `$request`: Optional feature or planning request text
58
59## Goal
60
61Produce a concrete task DAG that is safe to execute:
62
63- scope-challenged
64- grounded in real repository structure
65- atomic enough for parallel work
66- persisted to `.ulpi/plans/<plan-name>.md` and `.ulpi/plans/<plan-name>.json`
67
68## Step 0: Challenge scope before planning
69
70Before decomposing, do a quick overlap check:
71
72- prefer the `codemap` skill if available for semantic search
73- otherwise use `Glob`, `Grep`, and `Read`
74
75Identify:
76
77- what already exists
78- what can be reused
79- what is truly new
80- likely prerequisites
81- likely non-goals
82- whether the request is small enough to execute directly instead of planning
83
84Then use `AskUserQuestion` to confirm:
85
86- planning mode: `EXPANSION`, `HOLD`, or `REDUCTION`
87- default post-task review: `claude`, `codex`, `kiro`, `all`, or `none`
88- any scope cuts or explicit non-goals
89
90Do not proceed until the scope framing is confirmed.
91
92**Success criteria**: The user has confirmed the scope, selected a planning mode, and chosen a default review posture.
93
94## Step 1: Explore the real code surface
95
96Explore the repository before writing any task:
97
98- likely modules and directories involved
99- existing code that partially solves the request
100- shared integration surfaces:
101 - package roots
102 - export barrels
103 - registries
104 - routers
105 - manifests
106 - startup hooks
107- public surfaces:
108 - API routes
109 - CLI commands
110 - config files
111 - schemas
112 - persisted formats
113
114Rules:
115
116- prefer semantic search via `codemap` skill when available
117- use `Grep` for exact-string validation
118- use `Read` on the actual files before naming them in tasks
119- never invent paths, modules, or existing helpers
120
121**Success criteria**: Every path named in the plan comes from observed repository state.
122
123## Step 2: Capture planning contracts
124
125Before tasking, record the conditions that make the plan valid:
126
127- prerequisites
128- non-goals
129- cross-boundary contracts
130- capability providers for side effects
131- shared integration points
132- ship cut if execution stops halfway
133
134Explicitly note:
135
136- where persistence comes from
137- who owns export and registration edits
138- which public surfaces must remain stable
139- which failure paths or isolation invariants must be preserved
140
141**Success criteria**: The plan explains what must already be true and what is explicitly out of scope.
142
143## Step 3: Decompose into atomic tasks
144
145Create tasks that are:
146
147- atomic
148- file-scoped
149- dependency-aware
150- reviewable
151
152Task rules:
153
154- prefer 1 to 3 files per task
155- every file in `writeScope` must have an explicit role
156- every task needs:
157 - `TASK-NNN` id
158 - title
159 - description
160 - `Type`
161 - `Priority`
162 - `Effort`
163 - `Agent` (see Agent Selection Reference in `references/output-format.md`)
164 - acceptance criteria
165 - `writeScope`
166 - `validateCommand`
167- include 2-3 testable acceptance criteria per task; at least one must cover a failure or edge case
168- for public surfaces, pin the exact signature/examples and add a wrong-shape or wrong-routing check
169- for rewrite or composition tasks, add at least one criterion proving existing semantics were not silently dropped
170- if a new file needs export or registration, assign that ownership to a specific task
171- if a task only creates structure and semantic hardening is still needed, split that follow-up explicitly
172- `validateCommand` MUST be SLICE-SCOPED — greenable by THIS task's `writeScope` plus its already-integrated dependencies, and runnable independently of unrelated work:
173 - Scope it to the task's own files, never a whole package. For vitest, use `pnpm --filter <pkg> exec vitest run <path/to/file.test.ts>`. Do NOT use `pnpm --filter <pkg> test -- <file>` — the `--` makes vitest ignore the positional and run the ENTIRE package, so unrelated or pre-existing failures leak into this task's gate and can falsely block a correct slice.
174 - Every test file the command runs must be in this task's `writeScope` or guaranteed green by an integrated dependency. Never point a task's validate at a test file another task owns and this task cannot fix.
175 - Avoid whole-suite/e2e commands that only pass at end-state; if two pieces cannot each validate independently, they belong in ONE task.
176
177**Success criteria**: Each task is executable without hidden context and small enough for independent review.
178
179## Step 4: Map dependencies and maximize parallelism
180
181Add dependencies only when they are real:
182
183- file overlap
184- data flow
185- API contract
186- shared integration surface
187- capability provider
188- lifecycle or bootstrap dependency
189
190Do not over-constrain:
191
192- independent tasks should stay parallel
193- shared-file edits should be made explicit rather than hidden
194- circular dependencies are invalid
195
196Use `P0` through `P3` priorities:
197
198- `P0`: foundations that unblock other tasks
199- `P1`: core feature work
200- `P2`: supporting work and edge cases
201- `P3`: optional polish, docs, or cleanup
202
203**Success criteria**: The dependency graph is acyclic, minimal, and exposes real parallel layers.
204
205## Step 5: Render markdown and JSON from one canonical plan object
206
207Before writing output, load `references/output-format.md`.
208
209Write both files:
210
211- `.ulpi/plans/<plan-name>.md`
212- `.ulpi/plans/<plan-name>.json`
213
214Requirements:
215
216- markdown and JSON must describe the same tasks
217- task ids must match exactly in both files
218- dependency JSON is the source of truth
219- markdown must not contain `[PLAN]` markers on disk
220
221**Success criteria**: Both artifacts exist and describe the same DAG.
222
223## Step 6: Validate before finishing
224
225Run a final structural pass:
226
227- all task ids exist in markdown and JSON
228- every dependency target exists
229- no cycles
230- no phantom file paths
231- no task exceeds sensible write scope
232- acceptance criteria include edge or failure behavior where needed
233- review default is present
234
235Load `references/examples.md` only if you need a pattern for presentation shape.
236
237**Success criteria**: The plan is schedulable, internally consistent, and ready for execution.
238
239## Guardrails
240
241- Do not skip AskUserQuestion-based scope challenge.
242- Do not turn this into direct implementation.
243- Do not invent existing files, helpers, or package boundaries.
244- Do not keep giant examples or output templates inline in `SKILL.md`.
245- Do not add `paths:`. This is a generic workflow skill.
246- Do not add `context: fork`. This workflow depends on user interaction mid-process.
247- Do not introduce agent-only headers.
248- Do not create tasks that touch more than 3 files.
249- Do not over-constrain dependencies -- independent tasks must stay parallel.
250- Do not hide required shared-file edits behind narrow write scopes.
251- Do not let a task claim side effects that require capabilities the task never defines.
252- Do not present external docs, clones, or web research as local code unless the path exists in the repo.
253- Do not use P1-P4 priorities. This skill uses P0-P3.
254- Do not hand-maintain counts, layer summaries, or dependency references separately between JSON and markdown -- derive from canonical plan object.
255
256## When To Load References
257
258- `references/personality.md`
259 Use at session start for role, expertise, traits, and communication style.
260- `references/knowledge.md`
261 Use for DAG semantics, parser assumptions, and plan-object knowledge.
262- `references/output-format.md`
263 Use before rendering final markdown and JSON artifacts.
264- `references/examples.md`
265 Use only when you need an example shape for a similar request.
266
267## Output Contract
268
269Report:
270
2711. selected mode and review default
2722. plan file paths
2733. task count and critical path summary
2744. major prerequisites and non-goals
2755. any notable risks or cut-line decisions