|
| 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 at any task start.** |
| 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 | +- User gives advice on preferred approaches |
| 26 | +- User explains how they'd like tasks to be performed |
| 27 | + |
| 28 | + |
| 29 | +## File Template for MEMORY.md |
| 30 | + |
| 31 | +```markdown |
| 32 | +# Memory of User Instructions |
| 33 | + |
| 34 | +This file contains a record of user instructions, preferences, and teachings that should be remembered for future interactions. |
| 35 | + |
| 36 | +## Format |
| 37 | +Entries should follow this format: |
| 38 | +- Date: [YYYY-MM-DD] |
| 39 | +- Instruction: [What the user taught or instructed] |
| 40 | +- Context: [Where or when this was mentioned] |
| 41 | + |
| 42 | +## Deduplication Policy |
| 43 | +- Before adding a new entry, check for similar or identical instructions |
| 44 | +- If a duplicate is found, either skip the new entry or merge with existing one |
| 45 | +- When merging, update with new context or date information |
| 46 | +- This helps prevent redundant entries and keeps the memory clean |
| 47 | + |
| 48 | +## Entries |
| 49 | + |
| 50 | +[some memory entries in the Format declared above] |
| 51 | +``` |
0 commit comments