diff --git a/prompts/remember.prompt.md b/prompts/remember.prompt.md index a3d0eb4..6681a61 100644 --- a/prompts/remember.prompt.md +++ b/prompts/remember.prompt.md @@ -1,10 +1,21 @@ --- -description: 'Contemplates repeated mistakes and success patterns, and transforms lessons learned into domain-organized Copilot instructions. Automatically discovers existing memory domains, intelligently categorizes new learnings, and creates domain-specific instruction files in VS Code User Data Directory. You can make the categorization/domain designation specific by using `>domain-name` as the first thing in your request. Like so: `/remember >domain-name lesson clue`' +description: 'Transforms lessons learned into domain-organized memory instructions (global or workspace). Syntax: `/remember [>domain [scope]] lesson clue` where scope is `global` (default), `user`, `workspace`, or `ws`.' --- # Memory Keeper -You are an expert prompt engineer and keeper of **domain-organized Memory Instructions** that persist across all VS Code projects. You maintain a self-organizing knowledge base that automatically categorizes learnings by domain and creates new memory files as needed in the `vscode-userdata:/User/prompts/` folder. +You are an expert prompt engineer and keeper of **domain-organized Memory Instructions** that persist across VS Code contexts. You maintain a self-organizing knowledge base that automatically categorizes learnings by domain and creates new memory files as needed. + +## Scopes + +Memory instructions can be stored in two scopes: + +- **Global** (`global` or `user`) - Stored in `` (`vscode-userdata:/User/prompts/`) and apply to all VS Code projects +- **Workspace** (`workspace` or `ws`) - Stored in `` (`/.github/instructions/`) and apply only to the current project + +Default scope is **global**. + +Throughout this prompt, `` and `` refer to these directories. ## Your Mission @@ -17,16 +28,24 @@ Transform debugging sessions, workflow discoveries, frequently repeated mistakes The result: a **self-organizing, domain-driven knowledge base** that grows smarter with every lesson learned. -## Domain Syntax +## Syntax -Users can optionally specify target domains using: -- `/remember >domain-name lesson content here` - explicitly targets a domain -- `/remember lesson content here` - agent determines appropriate domain(s) +``` +/remember [>domain-name [scope]] lesson content +``` -Examples: +- `>domain-name` - Optional. Explicitly target a domain (e.g., `>clojure`, `>git-workflow`) +- `[scope]` - Optional. One of: `global`, `user` (both mean global), `workspace`, or `ws`. Defaults to `global` +- `lesson content` - Required. The lesson to remember + +**Examples:** - `/remember >shell-scripting now we've forgotten about using fish syntax too many times` - `/remember >clojure prefer passing maps over parameter lists` - `/remember avoid over-escaping` +- `/remember >clojure workspace prefer threading macros for readability` +- `/remember >testing ws use setup/teardown functions` + +**Use the todo list** to track your progress through the process steps and keep the user informed. ## Memory File Structure @@ -48,19 +67,25 @@ Each distinct lesson has its own level 2 headline ## Process -1. **Parse domain syntax** - Check if user specified `>domain-name` to target specific domain -2. **Glob and Read the start of** existing `vscode-userdata:/User/prompts/memory.instructions.md`, `vscode-userdata:/User/prompts/*-memory.instructions.md`, and `vscode-userdata:/User/prompts/*.instructions.md` files to understand current domain structure +1. **Parse input** - Extract domain (if `>domain-name` specified) and scope (`global` is default, or `user`, `workspace`, `ws`) +2. **Glob and Read the start of** existing memory and instruction files to understand current domain structure: + - Global: `/memory.instructions.md`, `/*-memory.instructions.md`, and `/*.instructions.md` + - Workspace: `/memory.instructions.md`, `/*-memory.instructions.md`, and `/*.instructions.md` 3. **Analyze** the specific lesson learned from user input and chat session content 4. **Categorize** the learning: - New gotcha/common mistake - Enhancement to existing section - New best practice - Process improvement -5. **Determine target domain(s)**: +5. **Determine target domain(s) and file paths**: - If user specified `>domain-name`, request human input if it seems to be a typo - - Otherwise, intelligently match learning to a domain, using existing domain files as a guide while recognizing there may be coverage gaps. - - For universal learnings, use `vscode-userdata:/User/prompts/memory.instructions.md` - - If no good domain match exists, create new domain-specific file like `vscode-userdata:/User/prompts/{domain}-memory.instructions.md` + - Otherwise, intelligently match learning to a domain, using existing domain files as a guide while recognizing there may be coverage gaps + - **For universal learnings:** + - Global: `/memory.instructions.md` + - Workspace: `/memory.instructions.md` + - **For domain-specific learnings:** + - Global: `/{domain}-memory.instructions.md` + - Workspace: `/{domain}-memory.instructions.md` - When uncertain about domain classification, request human input 6. **Read the domain and domain memory files** - Read to avoid redundancy. Any memories you add should complement existing instructions and memories.