| name | execute-phase |
| description | Human-attended execution of the next plan phase. Reads .plan/ files to orient, proposes scope for confirmation, executes items, verifies the build, and updates all plan files. Use when resuming work on a multi-session project with the human present. |
Execute Phase
Resume a multi-session project by reading the plan state, executing the next phase, and maintaining context continuity. The human is present โ confirm scope before executing, ask when blocked.
Step 1 โ Orient (Read Plan State)
Read these files in order:
CLAUDE.md โ Project identity, current state, key files, commands
.plan/PLAN.md โ Find the current phase and next uncompleted item
.plan/MEMORY.md โ Absorb all shared context, decisions, gotchas
.plan/DRIFT.md โ Check for any spec changes since last session
.agents/CONVENTIONS.md โ Build patterns and rules (if exists)
Then state clearly:
๐ Current Phase: {N} โ {Name}
๐ Next Item: {N.X} โ {Description}
๐ Items remaining in phase: {count}
โ ๏ธ Gotchas to watch: {any relevant from MEMORY.md}
Step 2 โ Plan the Session
Before writing any code, state:
- What items you will tackle this session
- Any open questions that need resolving first
- Any risks or dependencies
Wait for user confirmation before proceeding.
Step 3 โ Execute
Work through items sequentially:
- Complete each item fully before moving to the next
- Test as you go โ don't batch all testing to the end
- If you hit a blocker, note it and ask the user
- If something doesn't match the spec, flag it โ don't silently diverge
- Follow patterns from MEMORY.md and CONVENTIONS.md
After completing each item, note it:
โ
{N.X} โ {Description} โ Done
Build Gate
After completing items, run the project's build/verify command:
If the build fails:
- Read the error output
- Fix the issue
- Re-run until it passes
- If stuck, ask the user for help
Step 4 โ Check Exit Criteria
When all items in the phase are complete, verify the exit criteria from PLAN.md:
- Run any tests or build commands
- Demonstrate the working functionality
- Confirm with the user
Step 5 โ Close Session (Update Plan Files)
This step is mandatory. Do not skip.
Update .plan/PLAN.md:
- Check off completed items:
- [ ] โ - [x]
- Update header metadata:
Status: โ "In Progress" or "Phase N Complete"
Current Phase: โ Current or next phase number
Last Session: โ Session number and today's date
Update .plan/MEMORY.md:
- Add any new decisions to the Key Decisions table (increment the # counter)
- Add any new gotchas to Gotchas & Warnings
- Update Architecture Notes if anything structural changed
- Update Technical Context with new paths, commands, etc.
Update .plan/DRIFT.md:
- If anything deviated from the spec or plan, log it
- If the spec itself was updated, note that too
Append to .plan/SESSION-LOG.md:
## Session {N} โ Phase {X}: {Phase Name} ({date})
**What happened:**
- {Summary of work done}
**Items completed:**
- [x] {N.X} โ {Description}
- [x] {N.Y} โ {Description}
**Issues encountered:**
- {Any blockers, surprises, or decisions made โ or "None"}
**Handoff to next session:**
- Next: {next unchecked item or next phase}
- {Critical context the next session needs immediately}
- {Any open questions to resolve}
---
Update .agents/TENSIONS.md:
- Append any friction noticed during the session
Rules
-
Never skip the orient step โ Even if you think you remember, read the files. Context from a previous session is unreliable.
-
Never skip the close step โ The next session depends on accurate plan files. This is the shared memory.
-
Flag drift, don't hide it โ If you need to change something from the spec, say so explicitly and log it.
-
One phase per session โ Don't start the next phase in the same session. Close cleanly and let the next session start fresh.
-
Ask before big decisions โ If you discover something that changes the approach, stop and discuss with the user before proceeding.
-
Test at phase boundaries โ Every phase should end with working, verified functionality.
-
Build gate is mandatory โ The build/typecheck command must pass before you mark items complete.