This skill should be used when the user asks to break down tasks, create subtask files, identify next work, implement/execute TODO items, or mentions TODO_N.md files. Also use when discussing task granularity, atomicity of work items, planning implementation order for a phased roadmap, or when a task seems too large to tackle directly. Trigger even if the user just says 'break this down' or 'what should I work on next' in the context of a TODO-driven workflow. CRITICAL: Also trigger when the user asks to implement, execute, or work on TODO*.md files — this skill defines the completion marking protocol ([DONE] prefix, bottom-up propagation) that MUST be followed during and after execution.
Break down non-atomic TODO items into subtask files until every item is atomic and ready to execute.
Conciseness rule: TODO_N.md files must be ~100-150 lines max. Items are titles + brief descriptions + checkpoints. No complete code dumps — the executor reads source files at execution time.
The TODO stack is a rose tree (general ordered tree) serialized as one file per node group.
Tree a = Leaf a | Branch a [Tree a]
where a = (item_id, description, checkpoint)
Leaf = atomic task, ready to execute
Branch = non-atomic task, children in another file
TODO.md is the root. Items use plain numeric IDs: 1, 2, 3, ...TODO_N.md files use sequential indices (N=1, 2, 3...). Items use prefix N.: N.1, , ...N.2Parent: / Children: pointers, not implied by N.TODO_N.md files have a Status in their header:
Status: active — Currently being worked on. The traversal algorithm starts here.Status: planned — Pre-planned breakdown for future work. May need revision when activated.When a planned file becomes the next to work on, the executor must verify the breakdown against the current codebase before executing (see Execution Protocol).
Execution order: Post-order DFS within each file — deepest leaves first, then parents marked complete, bubbling up to root.
Every node except the root needs a parent pointer. Every non-leaf needs child pointers. Without these, completion propagation breaks.
Parent pointer (in child file): **Parent:** 2.4
Child pointer (in parent file): **Children:** TODO_3 items 3.1, 3.2
File header: Parent: TODO_{N}.md + Decomposes: 2.4 → (3.1, 3.2)
Prepend [DONE] to the item heading:
## [DONE] 3.1 — UserService.Create Happy Path Tests
Use the Edit tool to prepend [DONE] to the ## heading. Do not rewrite the rest of the item.
Items explicitly marked as deferred (e.g., "Deferred to Phase 2") are NOT incomplete — they are intentionally out-of-scope for the current decomposition. Deferred items:
[DONE] prefix (they were never in-scope)When checking "are all children done?", skip deferred items.
Parent: pointer).Glob for TODO*.md in the working directory. Sort by N. Read the deepest file.
Apply the atomicity predicate to every incomplete item. Classify each as LEAF or BRANCH.
All items are LEAF: Tree is fully expanded. Report the first incomplete leaf.
Some items are BRANCH: Create the next TODO_{N}.md (where N is the next unused index):
Decomposes: header with Status: active (or planned for future work)**Parent:** to each child**Children:**Do not stop after one level of decomposition. After each expansion, re-run Step 2 against every newly created child. Continue creating TODO_{N+1}, TODO_{N+2}, ... until a full pass over all incomplete items yields zero BRANCH classifications.
The user should never have to say "break them down further." If they do, you stopped early — the decomposition was incomplete.
Fixpoint rule: decomposition is complete only when applying the atomicity predicate to every incomplete non-deferred item in every file yields LEAF for all of them.
Each expansion must strictly reduce scope. If children aren't clearly smaller than the parent, flag for human review.
Before reporting the breakdown complete, grep the final set of leaf descriptions for these keywords:
decide, decision, choose, choice, pick betweeninvestigate, determine, figure out, trace, auditexplore, assess, evaluate optionsand then, after that, followed by (sequence markers)also, plus, as well as (scope-creep markers)Any match indicates an unexpanded branch. Split the leaf into: (a) the investigation/decision step as its own leaf, (b) the implementation, (c) the verification (tests/docs). Then re-run Step 4.
A node is a leaf when ALL of:
A node is a branch when ANY of:
# Subtasks: {brief description}
Status: active | planned
Parent: `TODO.md` (or `TODO_{M}.md` if decomposing a sub-item)
Decomposes: #X → (N.1, N.2), #Y → (N.3, N.4)
## N.1 — {Concise title}
**Parent:** #X
**Create/Modify:** `path/to/File.cs`
{1-3 sentences: what this does, key design decisions if any.}
**Checkpoint:** `{build/test command}` — expected result
For test items, list test cases in a table (name + what it asserts) rather than writing complete test bodies.
**Parent:** and **Checkpoint:** lines**Children:** (don't rewrite the item)When executing a leaf node:
**Checkpoint:** line. Do not mark [DONE] until it passes.**Deviation:** note to the leaf before marking [DONE].When a Status: planned file becomes the next to work on:
Status: active.**Revised:** note explaining what changed and why.function next_task(files):
# 1. Find the active file
active = find file with Status: active
if active:
for item in active (in order):
if item is incomplete and not deferred: return item
# All items complete — finish this file
propagate_completion(active) # mark parents [DONE] in parent file
delete active # REQUIRED — completed files are ephemeral
# 2. Activate the next planned file
planned = find lowest-N file with Status: planned
if planned:
activate(planned) # Status: planned → active, verify breakdown
return next_task(files)
# 3. No files left — all work complete
return null
Completion propagation: When all non-deferred children of parent X are [DONE], mark X as [DONE] in the parent file (identified via Parent: header).
When all items in a non-root TODO_N.md are [DONE] (or deferred), you MUST delete the file immediately. Non-root TODO files are ephemeral work-tracking artifacts, not permanent documentation. Root TODO.md is never deleted.
This is not optional. A completed TODO_N.md left on disk creates confusion about what work remains. Delete it in the same response where you mark the last item [DONE].
TODO files track execution (how to build). Spec documents in docs/todos/ track what to build — phase-mapped specs with lifecycle management. Use /audit-todos-dlabs to audit spec docs against codebase state, detect completed/stale/outdated specs, and clean up after implementation work. The entry point for specs is docs/todos/ROADMAP.md.