microsoft/tasks-consistency
How to reconcile tasks.md with plan.md when plan changes are detected
npx skills add https://github.com/microsoft/upgrade-agent-plugins --skill tasks-consistency
Instructions for reconciling tasks.md with plan.md when the plan has been modified. Plan.md is the source of truth for what top-level tasks exist and their scope. Tasks.md is a derived view that must stay in sync.
> This skill covers 5 sections. Read all before starting reconciliation.
>
> | # | Section | Key Content |
> |---|---------|-------------|
> | 1 | When to Run + File Locations | Triggers, file paths |
> | 2 | Consistency Rules | 5 rules governing reconciliation |
> | 3 | Reconciliation Workflow | 8-step procedure (read, diff, remove, add, reorder, sync, stats, log) |
> | 4 | Edge Cases | Completed subtask removal, ID renames, subtask-level plan detail |
> | 5 | Important + Checklist | Critical — direct file editing rules, verification checklist |
Approach: Read the actual markdown files, edit them directly, and let the underlying tools recalculate state from the updated files on next access. Do not rely on tool APIs for reading state here — they may have stale cached data. You are the reconciler.
get_state(path) returns a tasksOutOfSync warning (plan.md was modified after tasks.md)All paths relative to scenario root: {RepoRoot}/.github/upgrades/{scenarioId}/
| File | Purpose |
|------|---------|
| plan.md | Authoritative task list — source of truth |
| tasks.md | Derived progress view — must match plan |
| tasks/{taskId}/task.md | Per-task detail — content mirrors plan section |
| tasks/{taskId}/progress-details.md | Execution artifacts — evidence of work done |
tasks/{taskId}/task.md must match the plan's task contentRead the actual files directly — do not use tool APIs for this since they may reflect pre-edit state.
plan.md — parse each ### {taskId}: {taskName} section to extract:Done when: line)tasks.md — parse the Task Hierarchy section to extract:> Note: Task lines may have auto-generated trailing links — a parenthesized group containing a Content link to tasks/{id}/task.md and a Progress link to tasks/{id}/progress-details.md. These are appended by the system when the corresponding files exist. Ignore them when parsing — extract only the description before any ( that starts a link group. When inserting new lines, use the plain format without links — the system adds them on the next regeneration.
Build two lists: planTasks[] (from plan.md) and currentTasks[] (from tasks.md).
Compare by task ID:
| Plan has | Tasks.md has | Action |
|----------|-------------|--------|
| ✅ Task X | ✅ Task X | Keep — preserve state and subtasks |
| ✅ Task X | ❌ Missing | Add — new task, state 🔲 |
| ❌ Missing | ✅ Task X | Remove — see Step 3 for safety checks |
| ✅ Task X (changed content) | ✅ Task X | Update — sync task.md file |
Also check: is the order of surviving tasks different?
For each top-level task in tasks.md that is not in plan.md:
tasks/{taskId}/ folder:progress-details.md exists or subtask folders have content → stop and warn user, list what would be losttasks/{taskId}/ directory and all its contentsFor each top-level task in plan.md that is not in tasks.md:
- 🔲 {taskId}: {taskName}
tasks/{taskId}/ directorytasks/{taskId}/task.md — write: # {taskId}: {taskName}
{content from plan.md task section, including Done-when}
*Continue reading — Steps 5-8 cover reordering, task.md syncing, statistics, and logging.*
If the set of tasks is the same but their order in plan.md differs from tasks.md:
For each top-level task that exists in both plan.md and tasks.md:
tasks/{taskId}/task.md### {taskId}: {taskName} and its content) # {taskId}: {taskName}
{updated content from plan.md, including Done-when}
After all edits to tasks.md, recalculate and update inline:
Progress: {completed}/{total} tasks complete <progress value="{pct}" max="100"></progress> {pct}%Legend: ✅ Complete | 🔄 In Progress | 🔲 Pending | ⚠️ Blocked | ❌ Failed*Continue reading — Edge cases and the verification checklist are essential for correct reconciliation.*
If a removed top-level task has completed (✅) subtasks or progress-details.md files:
If a task ID was renamed (same content, different ID):
{oldId} will be removed and {newId} addedPlan.md only defines top-level tasks. If the plan includes subtask-like structure:
NN-taskname)complete_task() / start_task() — those tools are for normal workflow execution, not bulk reconciliation. Direct edits are correct here.- {emoji} {taskId}: {description} with 2-space indentation per nesting level.Before marking reconciliation complete, verify:
tasks/{taskId}/task.md reflects current plan.md contentTake microsoft/tasks-consistency from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.