v0.5.1 — Task editing CRUD
First tagged release of powerplan. Covers the v0.5 plan-structure work: the backlog-last invariant and the task editing tools.
Task editing (v0.5.1)
Tasks could be ticked but never edited. Three new MCP tools:
update_task— rewrite a task's text, preserving its done state and any existing agent tagremove_task— delete a task from an iterationdefer_task— move a task to the backlog, stamped with its origin iteration and an optional reason
Addressing
Address a task by task (the existing substring matcher) or a 1-based index within the iteration — exactly one per call. get_iteration now returns that index per task.
No task ids: they would pollute a human-readable document. No line numbers: they go stale on every mutation and would force the full-file reads the agent-first tools exist to avoid. Across 147 iterations in the three reference plans there are zero duplicate task texts within an iteration, so text stays the ergonomic default and index is the disambiguator.
Compare-and-swap guard
All edit tools take an optional expect — the task's current text must match or the edit is refused, guarding against a plan that moved underneath the caller. Agent tags are ignored in that comparison.
complete_task and reopen_task accept index and expect too; positional task still works for existing callers.
Backlog pinned last (v0.5.0)
The backlog is now always the final section of a plan. Previously every top-level mutation appended blindly, so once a backlog existed any later create_major / create_iteration / append_prose landed after it and stranded it mid-document.
- New top-level inserts go above the backlog
- Existing plans are healed on their first mutation; a plain parse → write is untouched, so the byte-identical round-trip guarantee holds
- A divider that separated the backlog from later sections is dropped on relocation rather than trailing at end of file
check_plangained acontent_after_backloglint code
Verification
73 tests, plus an MCP stdio smoke exercising all 22 tools. Every error path returns a clean error envelope rather than crashing, and a rejected edit leaves the plan file byte-identical.
Known gaps
Backlog entries are still append-only — update_backlog_item / remove_backlog_item are on the backlog.