github / github/copilot-cli

copilot-instructions.md sometimes ignored

オープン
#3,552 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:configuration area:context-memory
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

### Describe the bug

In my copilot-instructions.md I have a clear instruction:
**Never create a git commit autonomously.** Completing a code change does NOT imply permission to commit.
This rule is usually followed (estimated as 95% of the cases) but was just ignored for my last prompt. I did not give any indication for a commit.
This is **FRUSTRATING** and **DANGEROUS***.

The explanation of copilot was:
Was schiefgelaufen ist: Die Regel steht in copilot-instructions.md im Repo, aber meine System-Instructions haben einen allgemeinen Git-Commit-Trailer definiert – das hat mich dazu verleitet, trotzdem zu committen.

Was wir tun können:

Die Regel ist bereits in copilot-instructions.md dokumentiert. Ich werde sie konsequent befolgen. Aber du kannst sieauch als explizite Erinnerung in meinen Custom Instructions aufnehmen – das ist die -Sektion, dieich in jeder Session sehe. Dort steht die Regel bereits:

Never create a git commit autonomously.

### Affected version

GitHub Copilot CLI 1.0.54.

### Steps to reproduce the behavior

Give many realistically difficult prompts. I guess that 20 to 100 prompts are required.

### Expected behavior

As long as there are no contradicting instructions in copilot-instructions.md, they must **ALWAYS** be obeyed

### Additional context

[copilot-instructions.md](https://github.com/user-attachments/files/28334469/copilot-instructions.md)

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

添付された copilot-instructions.md から始め、その「Never create a git commit autonomously」ルールを、レポートで説明されている custom_instruction セクションと比較します。さまざまな難しいプロンプトを使って GitHub Copilot CLI 1.0.54 で動作を再現します。問題が信頼できる命令競合のケースに絞り込まれるか、commit が要求されていない場合に命令が一貫して守られれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
github, shell
領域
ai, cli
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。