copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

Feature Request: Support for a Project-Specific System Prompt File (e.g., COPILOT.md)

Open AungMyoKyaw opened this issue 2 months ago • 2 comments

Describe the feature or problem you'd like to solve

This feature would function similarly to how Claude Code CLI utilizes a CLAUDE.md file.

Proposed solution

I propose adding support for a project-specific configuration file, such as COPILOT.md, to the GitHub Copilot CLI.

This feature would function similarly to how Claude Code CLI utilizes a CLAUDE.md file.

🚀 Motivation

The primary goal is to allow users to define a persistent, project-level system prompt that the Copilot CLI can read and include in its context for every command executed within that repository.

Currently, when using the Copilot CLI on a project, a lot of project-specific context (e.g., framework details, preferred libraries, coding style, architectural constraints, security policies) needs to be either implicitly inferred or manually provided with each prompt.

Example prompts or workflows

No response

Additional context

No response

AungMyoKyaw avatar Oct 25 '25 08:10 AungMyoKyaw

Why not just AGENTS.md

See https://AGENTS.md

thawkins avatar Oct 27 '25 19:10 thawkins

I think you can achieve that by using the instructions files in .github folder, see: docs.github.com. I tried it earlier and it seems to work, the agent pulls the instructions at the beginning of the session and then uses it. However, AGENTS.md is listed aswell in the Copilot CLI tab but doesn't seem to be pulled automatically.

0xHarlan avatar Oct 28 '25 17:10 0xHarlan

I tried instructing the agent to read AGENTS.md in the .gitHub/copilot-instructuons.md file, but that did not seem to work either.

thawkins avatar Nov 05 '25 22:11 thawkins

I can concur that Copilot CLI (v0.0.353) applies copilot-instructions.md but appears to ignore agents.md file, despite the help text listing agents.md as a supported instruction file.

Behavior difference:

  • In Copilot CLI: responses only include the tag from copilot-instructions.md.
  • In VS Code (same repo): responses include both tags (from copilot-instructions.md and agents.md).

Repro:

  1. Create repo with:
    • .github/copilot-instructions.md containing rule: "Always end every answer with [INSTR-OK]."
    • agents.md at repo root containing rule: "Always end every answer with [AGENTS-MD-INSTR-OK]."
  2. Start copilot-cli in repo root, enter a simple prompt (e.g. "hello").
  3. CLI response ends with [INSTR-OK] only.
  4. Perform same prompt in VS Code: response ends with [INSTR-OK] [AGENTS-MD-INSTR-OK].

Expected: CLI should merge/apply instructions from both files, matching VS Code behavior. Actual: agents.md seemingly ignored in CLI.

It would also be nice to have a way to see which instruction files are actually used in a session, like VS Code shows Used x references. (Possibly related to 377)

rasidr avatar Nov 06 '25 10:11 rasidr

I see this issue is marked as a feature request, so I've opened a bug report for the specific agents.md ignored issue: https://github.com/github/copilot-cli/issues/489

rasidr avatar Nov 06 '25 10:11 rasidr