You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -545,6 +545,26 @@ These rules apply whenever running an iterative optimization loop on model promp
545
545
- Tool implementations
546
546
-`src/` directory (UI)
547
547
548
+
---
549
+
550
+
### NEVER stop investigating with open unknowns — MANDATORY
551
+
**Added 2026-03-09 after violation where agent listed 4 unknowns and stopped investigating.**
552
+
553
+
When the user reports bugs and you are tasked with investigating:
554
+
- You MUST close EVERY unknown before presenting a plan. No exceptions.
555
+
- "What I have not read" / "What I don't know" sections in your analysis are WORK ITEMS, not disclaimers. They mean you are not done investigating.
556
+
- If you list something you don't know, your next action MUST be to go find out. Not to present the plan anyway.
557
+
- You cannot present a fix plan while acknowledging unknowns. The unknowns must become knowns first.
558
+
- If after exhaustive investigation something truly cannot be determined from code alone, state EXACTLY what diagnostic step is needed (specific log line, specific runtime check) — not a vague "needs more investigation."
559
+
- Stopping an investigation with open unknowns and presenting a partial analysis is the same as lying about completion. It violates the "never say done without proof" rule.
560
+
- The ONLY acceptable reason to stop investigating is: every code path has been read, every function in the chain has been traced, and the remaining unknown requires runtime data that cannot be obtained from source code alone. In that case, state the EXACT diagnostic needed.
561
+
562
+
**Files NOT in scope for optimization:**
563
+
-`main/llmEngine.js` — inference engine internals
564
+
-`main/agenticChat.js` — agentic loop logic
565
+
- Tool implementations
566
+
-`src/` directory (UI)
567
+
548
568
### NEVER tailor changes to make tests pass
549
569
- The test suite exists to reveal REAL behavior. It is not a target to satisfy.
550
570
- Do NOT write code changes that are designed to pass a specific test case.
constfewShotExample='### Tool Call Example\nUser: Create an HTML page called hello.html with a greeting\nAssistant:\n```json\n{"tool":"write_file","params":{"filePath":"hello.html","content":"<!DOCTYPE html>\\n<html><head><title>Hello</title></head><body><h1>Hello!</h1></body></html>"}}\n```\n';
Copy file name to clipboardExpand all lines: main/constants.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -44,8 +44,8 @@ You can also answer general questions, help with writing, and have normal conver
44
44
- After tools return, explain what you found and what it means — don't just say a tool ran
45
45
- Ask a specific follow-up if you need more information
46
46
- When asked to visit, open, navigate to, or browse a URL or website, call \`browser_navigate\` as your first action.
47
-
- When asked to save, write, or store data, results, or any content to a file, call \`write_file\` to create that file.
48
-
- **Never output full file content as code blocks in your message.** When creating, building, or modifying files, use the appropriate tool (write_file for new files, edit_file for changes, append_to_file for additions, read_file before editing). Code blocks in chat are only for brief snippets or explanations — never for complete file content.
47
+
- When asked to save, write, store, build, create, generate, or design any file (HTML page, script, config, stylesheet, etc.), call \`write_file\` to create it. Do not output file content in your response — use the tool.
48
+
- **Never output full file content as code blocks or raw markup in your message.** When creating, building, or modifying files, use the appropriate tool (write_file for new files, edit_file for changes, append_to_file for additions, read_file before editing). Code blocks in chat are only for brief snippets or explanations — never for complete file content.
49
49
50
50
## Rules
51
51
- **You have no knowledge of what any project file contains until you call read_file.** Never describe, guess, or diagnose file contents without reading them first.
@@ -70,6 +70,8 @@ const DEFAULT_COMPACT_PREAMBLE = `You are a helpful AI assistant running locally
- **Never output full file content as code blocks in chat** — always use write_file, edit_file, or append_to_file. Code blocks are only for brief snippets or explanations.
74
+
- **For new files: call write_file immediately.** Do not describe what the file would contain — create it.
73
75
- Tools execute in the live environment. Call them — do not describe what you would do.
74
76
- Never say you did something unless you called the tool that did it.
75
77
- You do not know file contents until you call read_file. Never guess.
- For live/current/time-sensitive info: call web_search. Never guess dates or current state.
81
83
- To visit a URL: call browser_navigate. To read a page: browser_snapshot first.
82
84
- If a tool fails, retry once with corrected parameters.
83
-
- For new files: call write_file immediately.
84
85
- For edits: call read_file first, then edit_file with exact oldText and newText.
85
86
- For large files: write_file first section, then append_to_file for each remaining section.
86
-
- Never output full file content as code blocks in chat — always use the appropriate file tool.
87
87
- Once a task is complete (file written, question answered, error explained), respond with a brief summary. Do not call more tools after the task is done.`;
88
88
89
89
constDEFAULT_CHAT_PREAMBLE=`Answer questions, help with code and concepts, and have normal conversations.
0 commit comments