Skip to content

Commit 30b21b6

Browse files
committed
Add custom instruction for handling memory updates
1 parent deb721f commit 30b21b6

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
applyTo: "**"
3+
---
4+
5+
# Copilot Memory
6+
7+
Preferences and conventions learned from working in this repository. Any conventions that are not explicitly mentioned here should be inferred from the codebase.
8+
9+
## How to Handle Corrections
10+
11+
When a user corrects you on terminology, naming conventions, workflow preferences, or any other practice that applies repository-wide (not just to the current task), follow these steps:
12+
13+
1. **Recognize the correction.** A correction has occurred when the user tells you that something you said, named, or did is wrong or should be done differently — especially if it involves consistent patterns such as naming conventions, terminology, architectural practices, or tool usage.
14+
15+
2. **Assess the scope.** Ask yourself: *Would other contributors to this repository benefit from knowing this? Would a future agent session make the same mistake without this guidance?* If yes, it is a candidate for shared repository memory (this file). If the correction is personal to this user (e.g., a workflow preference or output style), it is a candidate for user memory instead.
16+
17+
3. **Ask the user before storing.** Do not silently write to either location. Instead, ask:
18+
19+
> "Should I remember this correction for the future? If so, should I add it to the **repository memory** (`copilot-memory.md`) so all contributors' agents benefit, or as a **user memory** (via the memory skill) that applies only to your sessions?"
20+
21+
Offer both options clearly and let the user decide.
22+
23+
4. **Act on the answer.**
24+
- If **repository memory**: add a concise, unambiguous entry under the appropriate section of this file (`copilot-memory.md`) and commit it.
25+
- If **user memory**: call the `store_memory` tool with a clear `fact`, a `reason` explaining when it applies, and a `citations` reference to this conversation or the relevant file.
26+
- If **neither**: acknowledge and move on without storing.
27+
28+
## Terminology
29+
30+
- Use **Packaged** and **Unpackaged** (not "Package context" / "Non-package context") when referring to the two WinGet execution contexts.

0 commit comments

Comments
 (0)