executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
burndown-fullDrive a planned mechanical change to 100% repo coverage after a run stopped early. Use when "finish the burndown", "it stopped halfway", "apply this everywhere", or "half-migrated". One plan plus deferrals → complete-everything.
Independent GitHub snapshot · Automated classification · Original documentation governs
Degree of freedom: MIXED. Signature and batch sizing [HIGH freedom];
from-scratch re-search and the zero-hit gate [LOW freedom — run exactly].
Observe: plan listed 8 files; fresh
rg Button2finds 14 (plus a story and a re-export). Interpret: the plan was a hypothesis; barrels were missed. Classify: 6 extra call sites still-old; CHANGELOG mention is false-positive. Done: re-search → 0 real hits; typecheck/lint/tests green.
complete-everything; inventory → housekeep-backlogA coding agent is given a plan, generates it, starts executing, and then stops before the change is actually complete across the codebase. The user is left with a half-migrated repo. This is not a motivation problem — it is a well-documented set of failure modes in long-horizon LLM agents:
The countermeasures below are drawn from how robust coding agents (Claude Code's TodoWrite, etc.) actually achieve reliable completion: enumerate before executing, externalize the worklist to a file so it survives context truncation, work in small focused batches, and define "done" by a fresh verification pass rather than by the agent's memory.
The plan is a starting hypothesis about scope, never the limit of scope. Memory is not a source of truth — a fresh repo-wide search is. You are not done when the planned files are edited; you are done when a from-scratch search for the old pattern returns zero, and the whole project type-checks, lints, and tests clean.
Internalize this loop: enumerate → batch-execute → persist progress → verify from scratch → if anything remains, loop. Never exit the loop on a feeling of completion.
Repo-wide parked-work inventory (every plan, TODO, skip, open finding) is
housekeep-backlog. This skill burns down one mechanical change.
Reconstruct, in one precise sentence, what the change actually is. Pull from:
git diff, git diff --staged, git log --oneline -15, git status.Then convert the change into a machine-checkable signature — the concrete pattern(s) that distinguish "still needs changing" from "already changed." Define both explicitly:
Examples of (MATCH → DONE):
TWEEN_* constant names → SPRING_PHYSICS_*<OldButton> / useOldHook → replacementIf the change cannot be expressed as a searchable pattern (grep / structural / AST), STOP and say so. Ask the user to make the criterion concrete, or agree on a per-file judgment checklist instead. Proceeding on "vibes" is the exact thing that causes the early stop — verification by search is what makes a full burndown provable. Do not skip this.
Also discover the project's verification commands up front (don't assume them):
package.json scripts, Makefile, justfile, README, AGENTS.md/CLAUDE.md, CI config.tsc --noEmit), lint, test, build. Note the exact commands. If none exist, say so — verification will rely on search + build only.Run an exhaustive, repo-wide search for MATCH. Search the whole repo, not the plan's file list. Cast wide with ripgrep; include every plausibly relevant extension and location:
rg -n --hidden \
-g '!node_modules' -g '!.git' -g '!dist' -g '!build' -g '!.next' -g '!coverage' -g '!*.lock' \
-e '<MATCH_PATTERN>'
Deliberately hunt the categories plans habitually miss:
export * from, export { X } from)import { X as Y }, import * as M)*.stories.*), e2e*.d.ts), generated types*.config.*, .env*, CI yaml), scripts, docs/READMEIf MATCH is multi-form (e.g. a symbol imported several ways), run a query per form and union the results. Don't trust a single grep to capture every flavor.
Write the result to a durable checklist file: .cursor/burndown-state.md. This file is your working memory; it must survive context truncation. One line per (file + occurrence/role). Format:
# Burndown: <one-sentence change definition>
MATCH: <pattern>
DONE: <pattern>
Verify: typecheck=`<cmd>` lint=`<cmd>` test=`<cmd>` build=`<cmd>`
Total occurrences found: N across M files
Plan originally named: P files
## Worklist
- [ ] src/components/Button.tsx:42 — direct usage
- [ ] src/index.ts — barrel re-export
- [ ] src/components/Button.stories.tsx — story + snapshot
- [ ] tests/button.test.tsx:17 — assertion references old name
...
## Exceptions (intentionally NOT changed — justify each)
- (none yet)
## Newly discovered during execution (append here, then work them)
- (none yet)
State the totals out loud to the user: "Found N occurrences across M files; the original plan named only P. I'll burn down all N." Announcing the full count up front commits you to the real scope and makes any later shortfall visible. Also create the equivalent native task list (TodoWrite / Cursor task list) so progress is visible in the UI — but .cursor/burndown-state.md is the source of truth because it persists.
Work the checklist top-to-bottom in small batches (5–10 files is a good default) so every batch is ticked in the state file before the next starts. For each batch:
[ ] → [x] in .cursor/burndown-state.md. Do the bookkeeping per-batch, never deferred — if context is truncated mid-run, an un-ticked completed item is lost work and a ticked incomplete item is a false "done."Do not stop between batches to ask "should I continue?" — continue until the worklist is exhausted. Compaction may happen mid-run; after any compaction, re-read .cursor/burndown-state.md to recover the remaining list rather than trusting memory. A long run is not a reason to wrap up.
Report done only when every check below passes — completion is defined by verification, not by the sense of having finished.
rg for MATCH across the entire repo as if starting over. Expected: zero hits, except items explicitly listed under Exceptions (each justified). Any new hit → add to worklist, return to Phase 2.tsc --noEmit. New errors reveal remaining work.[ ] lines remain in .cursor/burndown-state.md.If any check surfaces new occurrences or failures, add them to the checklist and loop back to Phase 2. Repeat the gate until a fresh search is clean and all configured checks pass. The loop terminates on verified emptiness, not on effort spent.
Produce a concise final report:
rg <MATCH> → 0 hits; typecheck → clean; lint → clean; tests → pass; build → ok. Show the actual commands and outcomes.Leave .cursor/burndown-state.md in place (fully ticked) as an audit trail unless the user asks to delete it, and keep it out of the commit. Suggest committing the change as one reviewable unit, or splitting mechanical vs. judgment edits into separate commits if that aids review.
audit-gate-logic. Whether the transform preserved behavior is audit-codemod-safety.