rtk icon indicating copy to clipboard operation
rtk copied to clipboard

`rtk init -g --copilot` overwrites `copilot-instructions.md`

Open movy opened this issue 7 months ago • 3 comments

Instead of appending or preprending, running rtk init -g --copilot simply replaces existing copilot-instructions.md with its own instructions. Lucky if copilot-instructions.md had already been commited and this change can be easily spotted and reverted. Goofy move otherwise.

Image

movy avatar Apr 25 '26 02:04 movy

wshm · Automated triage by AI

🔍 Automated Triage

🐛 Category bug
🟡 Priority medium
🎯 Confidence 92%

Summary

rtk init -g --copilot destructively overwrites existing copilot-instructions.md instead of appending; PR #1513 already in progress.

This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.


Triaged automatically by wshm · This is an automated analysis, not a human review.

pszymkowiak avatar Apr 25 '26 02:04 pszymkowiak

Hi @pszymkowiak, I've created a PR for this.

season179 avatar Apr 25 '26 03:04 season179

Fixed by #1976, shipped in v0.41.0: rtk init --copilot now keeps your existing copilot-instructions.md and adds its own section between markers instead of replacing the file. Running rtk init -g --copilot on a file with existing rules now leaves those rules in place, and running it again does not duplicate the section. Please reopen if you still see the file overwritten on the latest release.

KuSh avatar Oct 18 '26 15:10 KuSh