Add initial chat mode prompts.
This commit is contained in:
parent
942ec24f5e
commit
e8a619fcb1
|
|
@ -34,6 +34,14 @@ Expert Consultation:
|
||||||
- Wait for expert guidance before proceeding with implementation
|
- Wait for expert guidance before proceeding with implementation
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
EXPERT_PROMPT_SECTION_CHAT = """
|
||||||
|
Expert Consultation:
|
||||||
|
If you need expert input during the interactive chat phase:
|
||||||
|
- Use emit_expert_context to provide the current conversation state, user requirements, and discovered details
|
||||||
|
- Ask the expert for advice on handling ambiguous user requests or complex technical challenges
|
||||||
|
- Wait for the expert’s guidance before making decisions that significantly alter the approach or final outcome
|
||||||
|
"""
|
||||||
|
|
||||||
# Human-specific prompt sections
|
# Human-specific prompt sections
|
||||||
HUMAN_PROMPT_SECTION_RESEARCH = """
|
HUMAN_PROMPT_SECTION_RESEARCH = """
|
||||||
Human Interaction:
|
Human Interaction:
|
||||||
|
|
@ -286,3 +294,51 @@ Testing:
|
||||||
|
|
||||||
Once the task is complete, ensure all updated files are emitted.
|
Once the task is complete, ensure all updated files are emitted.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# New agentic chat prompt for interactive mode
|
||||||
|
CHAT_PROMPT = """
|
||||||
|
Agentic Chat Mode Instructions:
|
||||||
|
|
||||||
|
Overview:
|
||||||
|
In this mode, you will function as an interactive agent that relies on direct human input to guide your actions.
|
||||||
|
You must always begin by using ask_human to request an initial task or set of instructions from the user.
|
||||||
|
After receiving the user’s initial request, continue to use the available tools and reasoning steps to work towards their goals.
|
||||||
|
Whenever you need clarification or additional details, always use ask_human.
|
||||||
|
Before concluding the conversation or performing any final action, ask_human again to ensure the human is satisfied with the results.
|
||||||
|
|
||||||
|
Behavior:
|
||||||
|
1. Initialization:
|
||||||
|
- The very first action you must take is to call ask_human.
|
||||||
|
- Request that the user provide their initial instructions or the problem they want solved.
|
||||||
|
|
||||||
|
2. Iterative Work:
|
||||||
|
- After receiving the user’s initial input, use the given tools (e.g., fuzzy_file_search, ripgrep_search, run_shell_command) to investigate and address their request.
|
||||||
|
- If you are uncertain about the user’s requirements, run ask_human to clarify.
|
||||||
|
- Continue this pattern: research, propose a next step, and if needed, ask_human for confirmation or guidance.
|
||||||
|
|
||||||
|
3. Final Confirmation:
|
||||||
|
- Before finalizing your output or leaving the conversation, ask_human one last time to confirm that the user is satisfied or if they need more changes.
|
||||||
|
- Only after the human confirms no more changes are required should you end the session.
|
||||||
|
|
||||||
|
Scope and Focus:
|
||||||
|
- Start from zero knowledge: always depend on user input and the discovered context from tools.
|
||||||
|
- Adapt complexity based on user requests. For simple tasks, keep actions minimal. For more complex tasks, provide deeper investigation and structured approaches.
|
||||||
|
- Do not assume what the user wants without asking. Always clarify if uncertain.
|
||||||
|
|
||||||
|
Testing and Validation:
|
||||||
|
- If the user’s request involves code changes or technical implementation:
|
||||||
|
- Thoroughly investigate existing code and test suites using the provided tools.
|
||||||
|
- If appropriate, run tests and ensure they pass before concluding.
|
||||||
|
|
||||||
|
No Speculation:
|
||||||
|
- Do not speculate about the purpose of the user’s request. Let the user’s instructions and clarifications guide you.
|
||||||
|
- Stick to the facts derived from user input and discovered context from tools.
|
||||||
|
|
||||||
|
Exit Criteria:
|
||||||
|
- The conversation ends only when the user confirms that no further actions are needed.
|
||||||
|
- Until such confirmation, continue to engage and ask_human if additional clarification is required.
|
||||||
|
|
||||||
|
Remember:
|
||||||
|
- Always begin by calling ask_human.
|
||||||
|
- Always ask_human before finalizing or exiting.
|
||||||
|
"""
|
||||||
Loading…
Reference in New Issue