Goal
- Move every
### [.] <Title>task (in progress) into the# IN PROGRESS
section, under its topic's (IN PROGRESS) H2
- Move every
### [ ] <Title>task (not started) under# IN PROGRESSinto
# BACKLOG, under its topic's (BACKLOG) H2
- Move any H2 topic whose
(<Stage>)suffix does not match its enclosing H1 to the
H1 that the suffix names, with all its tasks
- Leave
### [x] ...tasks and nested checklist items (- [ ],- [x],- [.])
untouched
References
.claude/skills/todo.rules.md: defines the H1 stage / H2 topic / H3 task
organization and the ## <Topic> (<Stage>) header convention
Workflow
Load the Conventions
- Read
.claude/skills/todo.rules.md - Identify the H1 stage headers in
ai_task_queue.md(e.g.,# IN PROGRESS,
# BACKLOG - HIGH PRIORITY, # BACKLOG, # ICEBOX, # ALL TOPICS)
- Never touch the
# ALL TOPICSsection in this skill
Phase 1: Refile Mislabeled H2 Topics
- Run this phase first. Fixing a misfiled topic first keeps its tasks together,
instead of letting Phases 2 and 3 split them across stages
- For every H2 header
## <Topic> (<Stage>)outside# ALL TOPICS: - Compare
<Stage>to the name of its enclosing H1 - On mismatch, cut the entire H2 block (the header line through everything up to
the next H2 or H1) and move it under the H1 that matches <Stage>
- If an H2 with the same bare
<Topic>already exists under that H1, append the
moved block's task content there and drop the duplicate header line, instead
of creating a second header for the same topic
- Otherwise, insert the moved H2 block at the end of that H1's section (right
before the next H1 header)
- If
<Stage>names an H1 that does not exist anywhere in the file, do not
create it silently: list the header and ask the user whether to create that
stage or use a different one
- Keep the moved block's content (task titles, markers, bodies) byte-for-byte
unchanged aside from its position
- Example:
## Noesis (BACKLOG - HIGH PRIORITY)under# IN PROGRESSis cut and
moved, with all its ### ... tasks, under # BACKLOG - HIGH PRIORITY
Phase 2: Consolidate In-Progress Tasks
- For every
### [.] <Title>task outside# IN PROGRESS(including one exposed
by a Phase 1 move):
- Find its enclosing H2's bare topic name
- Move the task block (the header line through the next H2, H3, or H1) under
## <Topic> (IN PROGRESS) in the # IN PROGRESS section
- If that H2 does not exist yet under
# IN PROGRESS, create it at the end of
the section
- If the task's original H2 is left with no task content, remove the empty H2
header
Phase 3: Demote Not-Started Tasks Out of In Progress
- For every
### [ ] <Title>task under# IN PROGRESSafter Phases 1 and 2: - Find its enclosing H2's bare topic name
- Move the task block under
## <Topic> (BACKLOG)in the# BACKLOGsection - If that H2 does not exist yet under
# BACKLOG, create it at the end of the
section
- If the task's original H2 under
# IN PROGRESSis left with no task content,
remove the empty H2 header
Leave Untouched
### [x] ...tasks (handled bytodo.move_done, not this skill)- Nested checklist items (
- [ ],- [x],- [.]) inside a task body: these are
subtask progress, not task headers
- Any H3 header with no
[ ],[x], or[.]marker: flag it to the user, do not
guess its marker
- The
# ALL TOPICSsection
Ask User
- Any H2 whose
(<Stage>)suffix names a stage with no matching H1 in the file - Any H3 task header with a marker other than
[ ],[x], or[.] - Any case where a task's bare topic name does not clearly match an existing H2, and
it is unclear whether to create a new topic H2 or reuse a close match
- Do not guess: list the ambiguous item and ask before moving it
Report
- List every H2 topic block moved as
<Topic>: <old H1> -> <new H1> - List every
[.]task moved into IN PROGRESS as
<Title> (<old H2>) -> IN PROGRESS / <Topic>
- List every
[ ]task demoted out of IN PROGRESS as<Title> -> BACKLOG / <Topic> - List every empty H2 header removed as a result of these moves
Verification
- [ ] No
### [.] ...task remains outside the# IN PROGRESSsection - [ ] No
### [ ] ...task remains under the# IN PROGRESSsection - [ ] No H2 header outside
# ALL TOPICShas a(<Stage>)suffix that
mismatches its enclosing H1
- [ ] No H2 header is left empty (zero task content) after the moves
- [ ]
### [x] ...tasks and nested checklist items are unchanged and in their
original location
- [ ] Task content (title, body) is unchanged aside from its position
- [ ]
# ALL TOPICSsection is unchanged