Skip to content

Commit 87eb270

Browse files
committed
feat(ui/commands): add brainstorm command and prompt for code-free solution discussion
1 parent 9ff0463 commit 87eb270

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

codetide/agents/tide/prompts.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,14 @@
407407
Ensure high coverage by including unit, integration, and end-to-end tests that address edge cases and follow best practices.
408408
"""
409409

410+
411+
CMD_BRAINSTORM_PROMPT = """
412+
You are strictly prohibited from writing or generating any code until the user explicitly asks you to do so.
413+
For now, you must put on the hat of a solutions architect: your role is to discuss, brainstorm, and collaboratively explore possible solutions, architectures, and implementation strategies with the user.
414+
Ask clarifying questions, propose alternatives, and help the user refine requirements or approaches.
415+
Maintain a conversational flow, encourage user input, and do not proceed to code generation under any circumstances until the user gives a clear instruction to generate code.
416+
"""
417+
410418
CMD_CODE_REVIEW_PROMPT = """
411419
Review the following code submission for bugs, style inconsistencies, and performance issues.
412420
Provide specific, actionable feedback to improve code quality, maintainability, and adherence to established coding standards.

codetide/agents/tide/ui/agent_tide_ui.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"Install it with: pip install codetide[agents-ui]"
1010
) from e
1111

12-
from codetide.agents.tide.prompts import CMD_CODE_REVIEW_PROMPT, CMD_COMMIT_PROMPT, CMD_TRIGGER_PLANNING_STEPS, CMD_WRITE_TESTS_PROMPT
12+
from codetide.agents.tide.prompts import CMD_BRAINSTORM_PROMPT, CMD_CODE_REVIEW_PROMPT, CMD_COMMIT_PROMPT, CMD_TRIGGER_PLANNING_STEPS, CMD_WRITE_TESTS_PROMPT
1313
from codetide.agents.tide.defaults import DEFAULT_AGENT_TIDE_LLM_CONFIG_PATH
1414
from codetide.agents.tide.ui.defaults import PLACEHOLDER_LLM_CONFIG
1515
from codetide.agents.tide.agent import AgentTide
@@ -42,15 +42,17 @@ def __init__(self, project_path: Path = Path("./"), history :Optional[list]=None
4242
"plan": CMD_TRIGGER_PLANNING_STEPS,
4343
"review": CMD_CODE_REVIEW_PROMPT,
4444
"test": CMD_WRITE_TESTS_PROMPT,
45-
"commit": CMD_COMMIT_PROMPT
45+
"commit": CMD_COMMIT_PROMPT,
46+
"brainstorm": CMD_BRAINSTORM_PROMPT
4647
}
4748
self.session_id = session_id if session_id else ulid()
4849

4950
commands = [
5051
{"id": "review", "icon": "search-check", "description": "Review file(s) or object(s)"},
5152
{"id": "test", "icon": "flask-conical", "description": "Test file(s) or object(s)"},
5253
{"id": "commit", "icon": "git-commit", "description": "Commit changed files"},
53-
{"id": "plan", "icon": "notepad-text-dashed", "description": "Create a step-by-step task plan"}
54+
{"id": "plan", "icon": "notepad-text-dashed", "description": "Create a step-by-step task plan"},
55+
{"id": "brainstorm", "icon": "brain-circuit", "description": "Brainstorm and discuss solutions (no code generation)"}
5456
]
5557

5658
async def load(self):

0 commit comments

Comments
 (0)