design-doc
2 questions
- AI
When you ask Claude to execute a plan, how faithfully does the implementation track it?
A captured `claude --print` session that executes the 196-line plan from scenario #33. The prompt anchored Claude to the plan: 'do not deviate; if the plan is wrong, fix the plan in a comment in the test file rather than changing the structure.' Claude implemented exactly to spec for everything except one genuine plan defect (a `mockReturnValueOnce` that would have silently failed because `markFailed` calls `now()` twice), which it surfaced as a six-line `PLAN-FIX` comment instead of silently fixing. The article shows the 16-tool-call execution sequence, the parts that stuck, the one deviation, and what that workflow buys you over straight implementation.
- AI
What does Claude Code's plan mode actually produce on a real refactor?
A captured `claude --print --permission-mode plan` session that asked Claude to add a retry mechanism with exponential backoff and a dead-letter queue to the demo's notifications service. Plan mode redirects Claude to read, explore, and write a plan to `~/.claude/plans/`, with no project edits. The output was a 196-line specification with a decision table, state machine, file list, 23 enumerated test cases, and a backwards-compatibility note. The article shows what plan mode produces, what it skips, and when the plan beats the implementation as the deliverable.