Documentation

Plan coding-agent work before building

Design the work with Claude Code, Codex, or Cursor in a plan room: explore the code, run a pre-mortem and edge-case pass, and build nothing until you leave.

Updated

SHORT ANSWER

How do I plan coding-agent work before it starts building?

Open the plan room with /nightshift:plan. The agent explores the code, lays out options with a recommendation, and keeps a plan record across sessions. Edits are limited to the plan's own files and commits are blocked. Only you leave the room, and approved items go to the drafting table.

01

What happens in the room

The plan room is a conversation for deciding what to build. The agent reads the code, searches, uses the web and the tools you allow, asks questions, and proposes options with a recommendation. Nothing is implemented there.

  • A plan record holds where the discussion stands, the decisions, the options rejected and why, and the open questions.
  • A new conversation, a compaction, or a new day resumes from that record.
  • A plan goes to the drafting table only when you say yes; promoting it into the punch list stays yours.
  • Other conversations in the same project work normally.
02

Checks the room offers

Each check is offered once and changes the plan only on your yes.

  • Pre-mortem: “this shipped and failed a week later: why?” Each failure story you keep becomes a WHEN/THEN line, a new item, or a stated non-goal.
  • Edge-case pass: WHEN/THEN lines from edge-case packs for input, state, concurrency, failure, environment, and security.
  • Ordering and risk check: the item whose failure would break the most others moves first or gets a checkpoint item.
  • Size from history: the median and range per item from your own past receipts, with a suggested deadline and Budget line. Fewer than three readings estimate nothing.
  • Item check: a missing Verify or Commit line, a Verify that names nothing checkable, or a Budget that does not parse.
  • Evidence: for each item, the evidence kind that fits it, such as screenshots for a UI change or before-and-after figures for a performance change, offered once and added only on your yes.
03

What the room blocks and allows

On Claude Code and Codex every message you send carries a planning reminder. The edit tools write only the plan's own files: the drafting table, the plan record, and for a morning review the parking lot and snag log. The tools and commands on your planRoom lists are blocked, by default git commit, git push, and git tag. Cursor's prompt hook cannot add the reminder, so on Cursor the plan skill's own instructions and the edit check hold the room.

04

Only you leave

The agent cannot leave the room or start a shift from it; Start refuses while the room is open. Type the exit yourself, or leave and start in one step.

/nightshift:plan-exit     # Claude Code and Cursor
/nightshift:start         # leave and start
$nightshift:plan-exit     # Codex
ns plan-exit              # any terminal
05

Review a finished shift in the room

Opening the room after a shift lists what it left for you: the morning receipt, the receipts index, every parked decision and snag still open, and every item still open or stopped. The agent walks through them one at a time and writes each answer where it belongs, and new or reworked work is drafted for the next shift.

TRY IT

Start with a bounded prompt

This prompt names the outcome and preserves Nightshift’s review boundary. Paste it into the supported coding host from the project you want to change.

Open the Nightshift plan room for this change: explore the code, give me options with a recommendation, then offer a pre-mortem and an ordering check before we draft any items.
BOUNDARIES

What this workflow does not claim

  • The planning reminder is added on Claude Code and Codex; Cursor relies on the plan skill's instructions and the edit check.
  • The room limits edits and blocks the commands on your lists; it does not judge whether a plan is good.
SOURCES

Evidence and sources

These links support the released behavior, public outcomes, or problem language described on this page.

The plan roomState, limits, the plan record, leaving the room, and the morning review.Open evidence ↗Plan before you buildEntering and leaving the room on each host, shift-estimate, and check-items.Open evidence ↗Plan room checksThe shipped pre-mortem, edge-case pass, ordering check, and evidence prompts.Open evidence ↗
RELATED QUESTIONS

Continue from the question you have

write a punch list from a planRead the answer →ask a coding agent for evidence per taskRead the answer →limit time and tokens per coding taskRead the answer →
FAQ

Frequently asked questions

Can the agent leave the plan room on its own?

No. The room closes only on a command you type or the terminal exit, and Start refuses while it is open.

Does the plan room work in Cursor?

Yes. Cursor's prompt hook cannot add the planning reminder, so the plan skill's instructions and the edit check hold the room there.