Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 12, 2026

The instruction files prompt in computeAutomaticInstructions.ts only mentions "modifying or creating new code", causing AI models to skip reading instruction files (especially nested AGENTS.md files) during non-coding tasks like code exploration, documentation lookups, and architecture discussions.

Changes

  • Updated prompt wording to be inclusive of all codebase-related tasks:
    • "rules for modifying or creating new code" → "rules for working with this codebase"
    • "ensuring that the code is modified or created correctly" → "understanding the codebase structure, conventions, and best practices"
    • "before making any changes to the code" → "before working with the codebase"
Original prompt

This section details on the original issue you should resolve

<issue_title>Instruction files prompt should include non-coding tasks like code exploration</issue_title>
<issue_description>## Problem

The current instruction file prompt text in computeAutomaticInstructions.ts only mentions "modifying or creating new code":

entries.push('Here is a list of instruction files that contain rules for modifying or creating new code.');
entries.push('These files are important for ensuring that the code is modified or created correctly.');
entries.push('Please make sure to follow the rules specified in these files when working with the codebase.');

This wording causes the model to skip reading instruction files (especially nested AGENTS.md files) when the user is performing non-coding tasks like:

  • Asking questions about source code
  • Code exploration and understanding
  • Documentation lookups
  • Architecture discussions

Current Behavior

When a user asks a question about the codebase (e.g., "How does feature X work?"), the system finds the relevant AGENTS.md files but the model often refuses to read them because:

  1. The prompt explicitly says these files are for "modifying or creating new code"
  2. The task at hand (code exploration) doesn't involve writing or modifying code

Expected Behavior

Instruction files should be read and applied for any task related to the codebase, not just code modification tasks. This is especially important for nested AGENTS.md files that contain context-specific guidance.

Suggested Fix

Update the prompt wording to be more inclusive:

entries.push('Here is a list of instruction files that contain rules for working with this codebase.');
entries.push('These files are important for understanding the codebase structure, conventions, and best practices.');
entries.push('Please make sure to follow the rules specified in these files when working with the codebase.');

Or alternatively:

entries.push('Here is a list of instruction files that contain rules for understanding, modifying, or creating code.');
entries.push('These files are important for any task involving this codebase, including answering questions about the code.');
entries.push('Please make sure to acquire and follow the rules specified in these files when working with the codebase.');

Location

src/vs/workbench/contrib/chat/common/promptSyntax/computeAutomaticInstructions.ts</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: TylerLeonhardt <2644648+TylerLeonhardt@users.noreply.github.com>
Copilot AI changed the title [WIP] Update instruction files prompt to include non-coding tasks Update instruction file prompt to include non-coding tasks like code exploration Jan 12, 2026
Copilot AI requested a review from TylerLeonhardt January 12, 2026 19:02
Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Instruction files prompt should include non-coding tasks like code exploration

2 participants