Prevent issue-plan from entering plan mode and attempting implementation
Summary
The issue-plan command frequently triggers Claude's plan mode behavior, where Claude switches to plan mode, asks the user if they want to execute the plan, and then attempts to implement the plan directly. This violates the mach10 methodology, which requires planning and implementation to occur in separate CLI sessions.
Current Behavior
When running /mach10:issue-plan <issue-number>, Claude often:
- Explores the codebase and drafts a plan (correct)
- Switches to plan mode via
EnterPlanMode(incorrect) - Asks the user if they want to execute the plan (incorrect)
- Attempts to implement the plan in the same session (incorrect)
This collapses the plan and implement steps into a single session, defeating the purpose of staged implementation and session boundaries.
Proposed Behavior
The issue-plan command should:
- Explore the codebase and draft a staged plan
- Present the plan for user approval via
AskUserQuestion - Post the approved plan as a comment on the issue
- Create the feature branch
- Direct the user to
/clearthen/mach10:issue-implementfor a fresh implementation session
Claude should never enter plan mode or attempt implementation during this command.
Acceptance Criteria
- The
issue-plancommand explicitly instructs Claude not to useEnterPlanModeor implement any code changes - The
allowed-toolslist forissue-planexcludesEnterPlanMode,Edit,Write, andNotebookEdit - The command instructions contain a clear prohibition against implementing the plan within the same session
- After posting the plan, the command directs the user to start a new session for implementation
Technical Notes
- The current
allowed-toolslist (Bash, Read, Grep, Glob, Task, AskUserQuestion) does not includeEnterPlanMode, but Claude may still attempt to enter plan mode as a default behavior for complex tasks - Adding an explicit instruction to the command body prohibiting plan mode and implementation may be sufficient, but the
allowed-toolsexclusion ofEditandWriteprovides a hard guardrail - Related files:
commands/issue-plan.md
Implementation Plan
Created by: /mach10:issue-plan
This comment guides staged implementation via /mach10:issue-implement.
Stage 1: Add plan mode and implementation guardrails to issue-plan command
What it accomplishes: Adds explicit prohibitions against entering plan mode or implementing code, providing both behavioral instructions (in the markdown body) and confirmation that the tool-level guardrails (allowed-tools exclusion) are in place.
Files modified:
commands/issue-plan.md
Changes:
- Add a guardrail section after the opening paragraph (before Step 1) with clear prohibitions:
- Do NOT use
EnterPlanModeor enter plan mode - Do NOT implement any code changes -- no file edits, no file writes
- This command is strictly for planning; implementation happens in separate sessions via
/mach10:issue-implement
- Do NOT use
- Verify
allowed-toolsremainsBash, Read, Grep, Glob, Task, AskUserQuestion(already correct -- excludesEnterPlanMode,Edit,Write,NotebookEdit)
Testing approach: Manual -- run /mach10:issue-plan on a test issue and verify Claude does not attempt to enter plan mode or implement changes.
Dependencies: None.
Progress Update -- Stage 1
Branch: feature/issue-19-prevent-plan-mode
Commit: 572e37e
What was done
Implemented stage 1 of the implementation plan: added plan mode and implementation guardrails to the issue-plan command.
Changes to commands/issue-plan.md:
- Added a
## Guardrailssection between the opening paragraph and Step 1 - Three explicit prohibitions: no
EnterPlanMode, no file edits/writes, no in-session plan execution - References
/mach10:issue-implementas the correct path for implementation - Verified
allowed-toolsalready excludesEnterPlanMode,Edit,Write, andNotebookEdit(no change needed)
All four acceptance criteria from the issue are satisfied by this change.