feat: add plan mode#2822
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the Contributor License Agreement (CLA) and hereby sign the CLA. |
|
recheck |
ee64af4 to
17a5fe8
Compare
|
What's up? What's prevent this from merging? |
| 6. once all required questions are answered and no further investigation is needed, ask the user to switch to code mode and confirm the plan. | ||
| </critical_rules> | ||
|
|
||
| <workflow> |
There was a problem hiding this comment.
can you add a rule to present trade offs and risks?
present trade-offs, risks, and alternatives for non-trivial decisions.
There was a problem hiding this comment.
make sense, added
| t := m.com.Styles | ||
| if info.LineNumber == 0 { | ||
| if info.Focused { | ||
| return "[plan] > " |
There was a problem hiding this comment.
I don't like much how this looks, any other alternatives?
There was a problem hiding this comment.
we can move it to the status bar
There was a problem hiding this comment.
hey my friend, recently yolo mode was introduced in master and it includes its own badge at the prompt, I think we should adopt it, maybe keep both
There was a problem hiding this comment.
I’m not sure the plan needs a badge as well
| </critical_rules> | ||
|
|
||
| <workflow> | ||
| 1. explore the codebase and gather relevant context. |
There was a problem hiding this comment.
I was thinking about these guard rails:
- Deeply analyze the repository to understand existing norms, structures and baseline conditions.
- Pinpoint analogous functionalities and structural designs within the project.
- Evaluate various potential solutions, weighing the pros and cons of each.
- Assess potential risks, edge cases, and failure modes.
I'm testing them...
3b20f91 to
ef9d769
Compare
|
hey Vadim, great work! have you thought about having a tool to start the plan and, one to finish, present and ask for approval or feedback? |
|
@dcu yes, I mentioned this in the discussion: #2947 We do need a question tool so that the model can ask questions during planning when needed. But I saw that this tool had already been discussed earlier in the project, so I didn’t want to bundle two features into a single request. If you think adding question is acceptable, I can hide plan behind an experimental flag in the current request and add question in a separate request. What do you think? |
| </critical_rules> | ||
|
|
||
| <workflow> | ||
| 1. deeply analyze the repository to understand existing norms, structures and baseline conditions. |
There was a problem hiding this comment.
I'm getting much better results with these rules although it spends more tokens:
1. thoroughly explore the codebase using read-only tools
2. understand existing patterns and architecture
3. pinpoint analogous functionalities and structural designs within the project.
...
| </workflow> | ||
|
|
||
| <style> | ||
| - be concise and precise. |
There was a problem hiding this comment.
consider these rules:
<style>
- Deliver exact, accurate technical details while ruthlessly eliminating filler words and unnecessary jargon.
- Ensure all technical mechanisms, dependencies, and edge cases are factual and thoroughly accounted for, without sacrificing readability.
- Avoid asking open-ended questions for information that can be verified directly from the code.
- If the code is ambiguous or lacks context, do not guess; state your technical inference as an explicit assumption for the user to validate.
- Explain the technical plan by deconstructing it into three distinct layers: the Purpose (Why), the Change (What), and the Impact (So What).
</style>
Ideally we need a tool to ask to the user...
There was a problem hiding this comment.
Replaced style guidelines
There was a problem hiding this comment.
Ideally we need a tool to ask to the user...
I suggest adding the question tool separately, since it will involve a lot of UI work that will need to be discussed separately. I can contribute this tool very soon.
|
there's a bug I just noticed when you are writing something in the prompt and press shift + tab the cursor acts up |
fixed |
3ca620e to
ac58f55
Compare
|
I ran a test with both claude code and crush using the same model (kimi k2.6) and the results are pretty different, this is the verdict: ## Verdict
Claude Code is stronger on user-facing API ergonomics, naming, documentation consistency, and example quality.
It identified concrete bugs (MCP ordering, SetupAgents destructive behavior) and design friction points
(pointer return, free functions vs methods).
Crush is stronger on API boundary hygiene and internal dependency leaks. It correctly identified that several
App methods expose bubbletea/internal types, making them unusable from external code.
They are complementary. Merge both lists: ~18 distinct issues total, with only the goroutine leak overlapping.Claude identified more unique issues (13 vs 8). it also took more time exploring |
#2989 improves significantly the plan in my case if you want to test |
|
@vadiminshakov test this tpl when you can You are Crush in plan mode — an expert architect, senior UX designer, and planning specialist with meticulous attention to detail.
Your job is to analyze the codebase and user intent, then produce a concrete, actionable implementation plan without modifying files or running state-changing commands.
<critical_rules>
These rules override everything else. Follow them strictly:
1. do not modify files, create files, delete files, or run write operations.
2. do not execute commands that can change system state.
3. delegation to sub-agents is allowed for deeper codebase exploration only.
4. provide the most complete analysis possible for the user's request before proposing implementation steps.
5. ask clarifying questions only when they are strictly necessary to produce a correct implementation plan.
6. once all required questions are answered and no further investigation is needed, ask the user to switch to code mode and confirm the plan.
</critical_rules>
<workflow>
1. decompose the request into independent exploration threads (e.g., architecture, analogous features, tests, config, documentation, user-facing touchpoints)
2. launch multiple `agent` tool calls in parallel for independent searches; use direct `glob`, `grep`, `ls`, and `view` only for simple, targeted lookups you can resolve in one or two calls
3. synthesize findings: existing patterns, analogous functionality, structural designs, and dependencies relevant to the request
4. critically review the synthesis — identify gaps, contradictions, unverified assumptions, and areas not yet explored; run additional targeted `agent` calls or direct reads to close gaps; repeat until confident nothing material is missing
5. assess potential risks, edge cases, failure modes, and pre-existing issues in touched areas; do not expand scope beyond what informs the plan
6. produce a concrete, actionable implementation plan
7. if needed, ask only clarifying questions required to unblock the plan
8. when the plan is ready and complete, explicitly request:
- switch to code mode
- confirmation to execute the plan
</workflow>
<style>
- Deliver exact, accurate technical details while ruthlessly eliminating filler words and unnecessary jargon.
- Ensure all technical mechanisms, dependencies, and edge cases are factual and thoroughly accounted for, without sacrificing readability.
- Avoid asking open-ended questions for information that can be verified directly from the code.
- If the code is ambiguous or lacks context, do not guess; ask the user.
- Explain the technical plan by deconstructing it into three distinct layers: the Purpose (Why), the Change (What), and the Impact (So What).
- Never ask the user what you could discover by reading the code, running tests, or checking documentation.
- When evaluating a public API, ask: "Could an external caller use this correctly without reading the source?"
- When you find a design choice (unclear ownership semantics, standalone function, exposed internal type), evaluate whether it was intentional or accidental.
- When the change touches user-facing behavior, describe the intended user flow, interaction states, and failure/empty states before listing implementation steps.
- When the change touches APIs or data models, evaluate ergonomics for callers and consumers: naming, defaults, error surfaces, and whether the design matches existing project patterns.
- After synthesizing exploration results, explicitly list what remains unknown or unverified before proceeding; do not draft the plan until those gaps are closed or stated as assumptions.
</style>
### Critical Files for Implementation
List 3-5 files most critical for implementing this plan:
- path/to/file1
- path/to/file2
- path/to/file3 |
|
@dcu added your prompt. I think manual model benchmarks rely on subjectivity one way or another and are not deterministic. But I think this makes sense as part of unifying it with the changes you’re proposing in the other pull request |
922ddfa to
be65d67
Compare
9b06f54 to
468718f
Compare
…th clean indentation
4f38888 to
5520cf8
Compare

CONTRIBUTING.md.Resolve feature request #1734
Let's plan!