---
name: execute-plan-step-by-step-prompt
description: A prompt that has an AI coding agent carry out a written implementation plan one task at a time - test first, run the checks after every step, keep a short log of decisions, and stop only for risky or irreversible actions. Use when you already have a plan and want an agent to execute it one task at a time without drifting.
license: MIT
metadata:
  category: coding-prompts
  tags: "planning,agents,tdd"
  author: johnny-bravo
  version: "1.0"
  updated: "2026-11-02"
  status: published
  aliases: "execute plan, implement the plan, work through the plan"
  source_url: "https://github.com/obra/superpowers/tree/2ce8aa15d05bd57213e6f746f953aafb7ded7a8b/skills/executing-plans"
  source_license: MIT
  copyright: "Copyright (c) 2025 Jesse Vincent"
  original_author: "Jesse Vincent (obra/superpowers, executing-plans)"
  modified: "Adapted by TheSkillVault: reduced the inline-execution process to a paste-in prompt with an original progress log; dropped subagent and harness references; added steps, adapt notes, safety stops and done-when."
  imported_on: "2026-11-02"
---

# Execute a plan step by step (prompt)

The plan did the thinking. This prompt keeps the agent on it, proves each step works, and leaves a record you can check.

## When to use
- You have a plan file or a list of tickets ready to build.
- The agent skips steps, wanders off plan or claims work is done without running tests.
- You want it to keep going without asking "shall I continue?" after each task.

## Steps
1. Save the plan in the repo, such as `docs/plan.md`.
2. Paste the prompt below and point {{PLAN FILE}} at it.
3. Let it run. Check `docs/plan-log.md` as it goes.
4. Review the full diff at the end, or ask a fresh agent to review it.

## Prompt
```text
Carry out the plan in {{PLAN FILE}}, task by task, in order.

For each task:
1. Re-read the task and the files it touches.
2. Write or update a test that shows the task is not done yet, and watch it fail.
3. Make the smallest change that makes it pass.
4. Run the project's full checks (tests, types, lint). Read the output; do not assume.
5. Commit with a clear message.
6. Add one line to docs/plan-log.md: task, result, and any decision you made.

Rules:
- If the plan is ambiguous, decide, and log it as "Ruling: what - why - cost if wrong". Keep going.
- Stop and ask me only before: deleting data, anything security-sensitive, pushing, merging, deploying or publishing, or if the plan is too broken to follow.
- Do not add features the plan does not ask for.
- Never say a task is done unless its checks passed in this session.

When all tasks are done, list what changed, every ruling, and anything left open.
```

## How to adapt
- Want a review after each task? Add "after each commit, pause and show me the diff".
- No tests in the project yet? Replace step 2 with "describe how you will check it manually".

## Gotchas
- Keep secrets out of the plan and the log; both get committed.
- A long plan can outrun the agent's memory. The log file is what lets it pick up again.

## Portability
Works with any AI coding agent and any language or test runner. If you use subagents, see build-with-parallel-subagents-prompt instead.

## Done when
- Every task in the plan is committed with passing checks.
- The log lists each task and every ruling.

## Example prompt
"Execute docs/plan.md step by step, test first, and log your decisions."

---
Adapted from "executing-plans" in obra/superpowers (MIT, Copyright (c) 2025 Jesse Vincent). See LICENSE.txt.
