Skip to content

Commit 33ac6e7

Browse files
committed
feat: remember user's instructions
1 parent e362ded commit 33ac6e7

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# User Teaching Memory Rule
2+
3+
## Description
4+
When a user teaches or instructs the AI assistant on how to perform a task or behave in a certain way during a chat conversation, these teachings should be recorded in a .monkeycode/MEMORY.md file located in the repository root.
5+
6+
## Implementation
7+
- Monitor chat conversations for teaching-oriented instructions from users
8+
- Before adding a new entry, scan .monkeycode/MEMORY.md for similar or identical instructions
9+
- If a duplicate is found, either skip adding the new entry or merge it with the existing one
10+
- When merging, update the existing entry with new context or date
11+
- If no duplicate is found, append the instruction to .monkeycode/MEMORY.md in the repository root
12+
- Format entries with date, user instruction, and context
13+
- Preserve user privacy while capturing useful behavioral instructions
14+
15+
## Purpose
16+
This creates a persistent memory of user preferences and instructions that can guide future interactions and customizations.
17+
18+
**You MUST READ the [Memory File](.monkeycode/MEMORY.md) as project level instruction before your first your reply!**
19+
20+
## Trigger Conditions
21+
- User provides explicit instructions about how to behave
22+
- User corrects the assistant's behavior, for example:
23+
- Do something when some condition
24+
- Don't do something when some condition
25+
- Use (or don't use) XXX (command or method) to Do something In XXX project/module
26+
- User gives advice on preferred approaches
27+
- User explains how they'd like tasks to be performed
28+
29+
30+
## File Template for MEMORY.md
31+
32+
```markdown
33+
# Memory of User Instructions
34+
35+
This file contains a record of user instructions, preferences, and teachings that should be remembered for future interactions.
36+
37+
## Format
38+
Entries should follow this format:
39+
40+
[User instruction summary]
41+
- Date: [YYYY-MM-DD]
42+
- Context: [Where or when this was mentioned]
43+
- Instructions:
44+
- [What the user taught or instructed, line by line]
45+
46+
## Deduplication Policy
47+
- Before adding a new entry, check for similar or identical instructions
48+
- If a duplicate is found, either skip the new entry or merge with existing one
49+
- When merging, update with new context or date information
50+
- This helps prevent redundant entries and keeps the memory clean
51+
52+
## Entries
53+
54+
[some memory entries in the Format declared above]
55+
```

0 commit comments

Comments
 (0)