Skip to content

Commit cf931a9

Browse files
authored
Apply feedback on instruction generation wording (microsoft#252723)
1 parent 2f6b1d5 commit cf931a9

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

src/vs/workbench/contrib/chat/browser/actions/chatActions.ts

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -809,8 +809,8 @@ export function registerChatActions() {
809809
constructor() {
810810
super({
811811
id: 'workbench.action.chat.updateInstructions',
812-
title: localize2('updateInstructions', "Automatically Update Instructions"),
813-
shortTitle: localize2('updateInstructions.short', "Auto-update Instructions"),
812+
title: localize2('updateInstructions', "Generate Instructions"),
813+
shortTitle: localize2('updateInstructions.short', "Generate Instructions"),
814814
category: CHAT_CATEGORY,
815815
icon: Codicon.sparkle,
816816
f1: true,
@@ -828,20 +828,25 @@ export function registerChatActions() {
828828
const commandService = accessor.get(ICommandService);
829829

830830
// Use chat command to open and send the query
831-
const query = `Analyze this workspace and create or update \`.github/copilot-instructions.md\`. The file guides future AI coding agents here.
831+
const query = `Analyze this codebase to generate or update \`.github/copilot-instructions.md\` for guiding AI coding agents.
832832
833-
Add:
834-
- Core commands, especially build, lint, test (incl. single-test run), docs, migrations, etc.
835-
- High-level architecture, including major packages, services, data stores, external APIs, etc.
836-
- Repo-specific style rules, including formatting, imports, typing, naming, error handling, etc.
837-
- Relevant agent rules detected in \`.cursor/**\`, \`.cursorrules\`, \`AGENTS.md\`, \`AGENT.md\`, \`CLAUDE.md\`, \`.windsurfrules\`, existing Copilot file, etc.
838-
- Summarize important parts of README or other docs instead of copying them.
833+
Focus on discovering the essential knowledge that would help an AI agents be immediately productive in this codebase. Consider aspects like:
834+
- The "big picture" architecture that requires reading multiple files to understand - major components, service boundaries, data flows, and the "why" behind structural decisions
835+
- Critical developer workflows (builds, tests, debugging) especially commands that aren't obvious from file inspection alone
836+
- Project-specific conventions and patterns that differ from common practices
837+
- Integration points, external dependencies, and cross-component communication patterns
838+
839+
Source existing AI conventions from: \`**/{.github/copilot-instructions.md,AGENT.md,AGENTS.md,CLAUDE.md,.cursorrules,.windsurfrules,.clinerules,.cursor/rules/**,.windsurf/rules/**,.clinerules/**,README.md}\`.
839840
840841
Guidelines (read more at https://aka.ms/vscode-instructions-docs):
841-
- If \`.github/copilot-instructions.md\` exists, patch/merge. Never overwrite blindly.
842-
- Be concise; skip boilerplate, generic advice, or exhaustive file listings.
843-
- Use Markdown headings + bullets; keep prose minimal and non-repetitive.
844-
- Cite only facts found in the repo (don't invent information).`;
842+
- If \`.github/copilot-instructions.md\` exists, merge intelligently - preserve valuable content while updating outdated sections
843+
- Write concise, actionable instructions (~20-50 lines) using markdown structure
844+
- Include specific examples from the codebase when describing patterns
845+
- Avoid generic advice ("write tests", "handle errors") - focus on THIS project's specific approaches
846+
- Document only discoverable patterns, not aspirational practices
847+
- Reference key files/directories that exemplify important patterns
848+
849+
After generating the initial instructions (in less than 20 tool calls, count down after each tool call), ask for feedback on any unclear or incomplete sections and iterate on the instructions based on their input.`;
845850

846851
await commandService.executeCommand('workbench.action.chat.open', {
847852
mode: 'agent',

src/vs/workbench/contrib/chat/browser/promptSyntax/pickers/promptFilePickers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ const UPDATE_INSTRUCTIONS_OPTION: IPromptPickerQuickPickItem = Object.freeze({
124124
type: 'item',
125125
label: `$(refresh) ${localize(
126126
'commands.update-instructions.select-dialog.label',
127-
'Auto-update instructions...',
127+
'Generate instructions...',
128128
)}`,
129129
value: URI.parse(INSTRUCTIONS_DOCUMENTATION_URL),
130130
pickable: false,

0 commit comments

Comments
 (0)