-
Notifications
You must be signed in to change notification settings - Fork 120
feat: Add Plan Mode with Interactive Questions System #314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Avtrkrb
wants to merge
12
commits into
main
Choose a base branch
from
feature/enhanced-planning
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
Author
|
@will-lamerton This PR introduces enhancements to Plan mode proposed in #205 & #96 Prompt that I used to test: |
Member
Author
|
@will-lamerton I'm attempting to modify this so that we can add a bit of spec driven plans. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR implements Plan Mode - a structured 5-phase planning workflow for thoughtful code changes, along with the Interactive Questions System that allows the AI to ask user questions through a keyboard-navigable terminal UI.
Key Features
1. Plan Mode (5-Phase Workflow)
2. Interactive Questions System
ask_user_questiontool with Claude Code-compatible schema3. Mode Selection UI
Technical Implementation
New Files Created:
source/components/interactive-question-prompt.tsx- UI for question promptsource/components/mode-selection-prompt.tsx- UI for mode selectionsource/components/plan-mode-indicator.tsx- Shows current plan phasesource/components/plan-review-prompt.tsx- UI for reviewing/modifying planssource/tools/interactive/ask-user-question.tsx- Core tool implementationsource/tools/plan/enter-plan-mode.tsx- Tool to enter plan modesource/tools/plan/exit-plan-mode.tsx- Tool to exit plan modesource/utils/question-selection-registry.ts- Callback registry for questionssource/utils/mode-selection-registry.ts- Callback registry for mode selectionsource/utils/plan/plan-prompt.ts- Phase-specific AI instructionssource/utils/plan/phase-transition-detector.ts- Detects phase transitionssource/utils/plan/slug-generator.ts- Generates plan IDssource/utils/plan-review-registry.ts- Callback registry for plan reviewsource/services/plan-manager.ts- Manages plan file operationssource/context/mode-context.ts- Global mode context managementModified Files:
source/app/App.tsx- Integrated all new modes and callbackssource/hooks/useAppState.tsx- Added mode and prompt statesource/tools/index.ts- Registered new toolssource/tools/tool-manager.ts- Added plan mode tool restrictionssource/tools/execute-bash.tsx- Added plan mode checkssource/tools/string-replace.tsx- Added plan mode checkssource/tools/write-file.tsx- Added plan mode checksType of Change
Testing
Automated Tests
.spec.ts/tsxfilespnpm test:allcompletes successfully)Note: Test coverage will be added in a follow-up PR. This PR focuses on feature implementation.
Manual Testing
Manual Testing Performed:
ask_user_questiontool with single and multiple questions.nanocoder/plans/{planId}.mdChecklist
Documentation Note: Updates to
AGENTS.mdand user documentation will be added in a follow-up PR.Closes: #96 (Interactive Questions System) & #205 (Enhanced Plan Mode)
Related: Plan Mode feature request