feat: add interactive questions system for plan mode#641
Conversation
|
Hey @akramcodez - Really nice work on this - the code quality is high across the board. Types are clean, the new module is properly unit-tested, and the I want to talk through the overall approach before we merge, because I think there's a simpler design hiding in here that would serve issue #96 better. None of this is a knock on the execution - it's a direction question. The thing I keep coming back to: we've ended up with two question systems that don't know about each other. There's the deterministic keyword engine ( On the deterministic engine specifically, a few things worry me for the long run:
A couple of smaller things I noticed in the
I don't want you to go fix those three line by line, because I think they're symptoms of the deterministic layer being the wrong shape rather than defects to patch. Here's the approach I'd like us to take instead. The insight is to lean entirely on the model plus 1. User submits → model clarifies. This is #96's ambiguity and decision questions. Pure prompt plus 2. Model explores and writes the plan, ending with an explicit "Assumptions I'm making" section. This is #96's assumption confirmation, expressed as plan content rather than a separate question type. One extra line in 3. Plan is presented -> action bar. Keep
That covers all three of #96's question types plus the action bar from the mockups, with the model doing in context what the keyword table was approximating. Net effect: we keep the One honest tradeoff to flag: the deterministic path guaranteed a question appeared before any tokens were spent, whereas this leans on the model following the prompt. For strong models that's reliable; a weak local model might jump straight to a plan. If we ever want a hard guarantee, the lever is prompt strength (or a light "did you consider asking?" nudge), not a static table. If you're up for it, I'd love for you to take a pass at the slimmed-down version - it's mostly deletion plus rewiring |
|
Hey @akramcodez! This is a big improvement - thank you for taking the earlier feedback on board. Dropping the keyword engine and leaning on the model plus I did find two blocking issues in the new wiring and one unrelated regression before it's ready to merge. None are conceptual - just the rewiring being a bit fresh.
A few smaller things while you're in here:
Really solid turnaround on the design though - once the dismiss loop and the double-input are sorted, I think this is close. |
Closes #96
Description
Enhances the existing Plan Mode (Shift+Tab+Tab) with an Interactive Questions System. Before generating a final implementation plan, the AI will now proactively pause and ask clarifying questions if it detects ambiguity, missing requirements, or needs to make an architectural decision. This reduces rework and ensures the generated plan perfectly aligns with user expectations.
Key updates:
usePlanClarification.tshook for contextual AI question generation.PlanReviewStatetouseAppState.tsxto handle the clarification UI lifecycle.useAppHandlers.tsxto prompt users with interactive questions.Type of Change
Testing
Automated Tests
.spec.ts/tsxfilespnpm test:allcompletes successfully)Manual Testing
Checklist