github / github/copilot-cli

copilot-instructions.md sometimes ignored

Aperta
#3,552 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area:configuration area:context-memory
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

### 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)

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con il file copilot-instructions.md allegato e confronta la relativa regola «Never create a git commit autonomously» con la sezione custom_instruction descritta nel report. Riproduci il comportamento su GitHub Copilot CLI 1.0.54 usando prompt difficili e vari; il lavoro è completato quando il problema è stato ristretto a un caso affidabile di istruzioni in conflitto oppure quando l’istruzione viene rispettata sistematicamente se non è stato richiesto alcun commit.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
github, shell
Ambito
ai, cli
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.