Run long multi-step tasks with file-based planning: set up plan, findings, and progress files at the start, checkpoint after each unit of work, detect stale plans, and recover when work drifts off course. Triggers on "long task", "multi-step project", "this will take several sessions", "pick up where I left off", "my plan drifted", or any job too big for one context window.
./install.sh long-task-planningname: long_task_planning description: Run long multi-step tasks with file-based planning: set up plan, findings, and progress files at the start, checkpoint after each unit of work, detect stale plans, and recover when work drifts off course. Triggers on "long task", "multi-step project", "this will take several sessions", "pick up where I left off", "my plan drifted", or any job too big for one context window.
Keep a long, multi-step task on course across sessions, context compactions, and interruptions. The method: keep the plan, the findings, and the progress in files, not in your head. The context window is RAM, the filesystem is disk. Anything important goes to disk. Every claim about what is done must be checkable on disk.
Create <task-dir>/ with three files:
PLAN.md: the work broken into small units, each with a status line and a done-criterion. Statuses are only todo, doing, done, blocked. No other statuses.FINDINGS.md: facts learned along the way: decisions, gotchas, error logs, anything the next session needs so it does not re-discover it.PROGRESS.md: an append-only log. Every unit of work gets one entry: date, what changed, what was verified, what is next.Keep each unit small enough to finish in one session. A unit whose done-criterion you cannot state is still two units.
Read order, every time:
PROGRESS.md from the tail upward, enough to find where work stopped.PLAN.md, to confirm which unit is marked doing.FINDINGS.md relevant sections.done still checks out. If the plan and reality disagree, reality wins: fix the plan first.Never start work from memory of the plan. Memory is the most stale copy.
Pick the highest-priority unit marked doing (or the first todo). Finish it, verify its done-criterion, then checkpoint before anything else:
PROGRESS.md entry.done in PLAN.md (or blocked, with the blocker noted in FINDINGS.md).No batching: a crash between unit 2 and unit 3 must never lose unit 2's record.
The classic failure: you write the plan, then keep working from your mental copy as it goes stale. Force a re-read of PLAN.md before any decision that changes scope, tools, or direction. If the decision invalidates part of the plan, rewrite that part of the plan before implementing.
A plan is stale when it no longer describes reality. Check with bin/plan_doctor.py <task-dir> or by hand:
done whose done-criterion no longer verifies on disk.doing with no PROGRESS entry newer than 48 hours.When stale, repair: re-verify each claimed-done unit, flip wrong ones back to todo, rewrite dead assumptions, and log the repair in PROGRESS.md.
Drift means the work moved but the plan did not, or the plan moved but the work did not. Signs: you cannot find where you stopped, two sessions redo the same work, or completed work contradicts the plan. Recovery:
references/recovery-playbooks.md.PLAN.md, FINDINGS.md, PROGRESS.md, written before real work begins.blocked unit always names the blocker and where it is documented.todo means not started. doing means exactly one unit at a time. done means verified against its done-criterion, not just attempted.agent-task-decomposition for splitting the work before the run, long-term-planning for dated human-facing roadmaps.publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e
No ratings yet — be the first to rate it.