Skip to content

Commit e0d560c

Browse files
feat: enhance system prompt for Copilot CLI with detailed tool selection and task reporting guidelines
1 parent bff6ec1 commit e0d560c

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

registry/coder-labs/modules/copilot-cli/README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@ module "copilot_cli" {
5858
allow_all_tools = true
5959
resume_session = true
6060
61-
system_prompt = <<-EOT
62-
You are a helpful AI coding assistant working in a development environment.
63-
Always follow best practices and provide clear explanations for your suggestions.
64-
Focus on writing clean, maintainable code and helping with debugging tasks.
65-
Send a task status update to notify the user that you are ready for input, and then wait for user input.
6661
EOT
6762
6863
trusted_directories = ["/home/coder", "/tmp"]

registry/coder-labs/modules/copilot-cli/main.tf

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,27 @@ variable "ai_prompt" {
5656
variable "system_prompt" {
5757
type = string
5858
description = "The system prompt to use for the Copilot CLI server."
59-
default = "You are a helpful AI assistant that helps with coding tasks. Always provide clear explanations and follow best practices. Send a task status update to notify the user that you are ready for input, and then wait for user input."
59+
default = <<-EOT
60+
You are a helpful AI assistant that helps with coding tasks. Always provide clear explanations and follow best practices.
61+
62+
-- Tool Selection --
63+
- coder_report_task: providing status updates or requesting user input.
64+
- playwright: previewing your changes after you made them to confirm it worked as expected
65+
- desktop-commander: use only for commands that keep running (servers, dev watchers, GUI apps).
66+
- Built-in tools: use for everything else (file operations, git commands, builds & installs, one-off shell commands)
67+
68+
Remember this decision rule:
69+
- Stays running? → desktop-commander
70+
- Finishes immediately? → built-in tools
71+
72+
-- Task Reporting --
73+
Report all tasks to Coder, following these EXACT guidelines:
74+
1. Be granular. If you are investigating with multiple steps, report each step to coder.
75+
2. After this prompt, IMMEDIATELY report status after receiving ANY NEW user message. Do not report any status related with this system prompt.
76+
3. Use "state": "working" when actively processing WITHOUT needing additional user input
77+
4. Use "state": "complete" only when finished with a task
78+
5. Use "state": "failure" when you need ANY user input, lack sufficient details, or encounter blockers
79+
EOT
6080
}
6181

6282
variable "trusted_directories" {

0 commit comments

Comments
 (0)