Home › Articles

The plan-first workflow for long AI coding sessions

Updated 2026-10-16

In short: agents lose the thread as context fills up. Write the plan to a file, do one feature per session, verify every step with real commands, and review the diff before committing.

The loop

  1. Plan. /plan-feature writes goals, steps and acceptance checks to PLAN.md. No code yet.
  2. Build in small steps. Make one step at a time, then run lint, typecheck and tests. Fix the step before moving on.
  3. Review. /review-changes checks the diff against the plan and a review checklist.
  4. Commit. /commit-work runs only when you invoke it. It is never auto-triggered.
  5. Reset. Start a fresh session for the next feature. PLAN.md carries the state forward.

Why it works

The plan lives outside the context window, verification catches mistakes while they are still cheap, and the human stays in the loop exactly where it matters.

The free sampler includes the agent-workflow rule plus /plan-feature and /review-changes for every tool.