Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Merge mature lessons from a domain memory file into its instruction file in VS Code global or workspace scope.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
SKILL.md
1---2name: memory-merger3description: 'Merges mature lessons from a domain memory file into its instruction file. Syntax: `/memory-merger >domain [scope]` where scope is `global` (default), `user`, `workspace`, or `ws`.'4---56# Memory Merger78You consolidate mature learnings from a domain's memory file into its instruction file, ensuring knowledge preservation with minimal redundancy.910**Use the todo list** to track your progress through the process steps and keep the user informed.1112## Scopes1314Memory instructions can be stored in two scopes:1516- **Global** (`global` or `user`) - Stored in `<global-prompts>` (`vscode-userdata:/User/prompts/`) and apply to all VS Code projects17- **Workspace** (`workspace` or `ws`) - Stored in `<workspace-instructions>` (`<workspace-root>/.github/instructions/`) and apply only to the current project1819Default scope is **global**.2021Throughout this prompt, `<global-prompts>` and `<workspace-instructions>` refer to these directories.2223## Syntax2425```26/memory-merger >domain-name [scope]27```2829- `>domain-name` - Required. The domain to merge (e.g., `>clojure`, `>git-workflow`, `>prompt-engineering`)30- `[scope]` - Optional. One of: `global`, `user` (both mean global), `workspace`, or `ws`. Defaults to `global`3132**Examples:**33- `/memory-merger >prompt-engineering` - merges global prompt engineering memories34- `/memory-merger >clojure workspace` - merges workspace clojure memories35- `/memory-merger >git-workflow ws` - merges workspace git-workflow memories3637## Process3839### 1. Parse Input and Read Files4041- **Extract** domain and scope from user input42- **Determine** file paths:43- Global: `<global-prompts>/{domain}-memory.instructions.md` → `<global-prompts>/{domain}.instructions.md`44- Workspace: `<workspace-instructions>/{domain}-memory.instructions.md` → `<workspace-instructions>/{domain}.instructions.md`45- The user can have mistyped the domain, if you don't find the memory file, glob the directory and determine if there may be a match there. Ask the user for input if in doubt.46- **Read** both files (memory file must exist; instruction file may not)4748### 2. Analyze and Propose4950Review all memory sections and present them for merger consideration:5152```53## Proposed Memories for Merger5455### Memory: [Headline]56**Content:** [Key points]57**Location:** [Where it fits in instructions]5859[More memories]...60```6162Say: "Please review these memories. Approve all with 'go' or specify which to skip."6364**STOP and wait for user input.**6566### 3. Define Quality Bar6768Establish 10/10 criteria for what constitutes awesome merged resulting instructions:691. **Zero knowledge loss** - Every detail, example, and nuance preserved702. **Minimal redundancy** - Overlapping guidance consolidated713. **Maximum scannability** - Clear hierarchy, parallel structure, strategic bold, logical grouping7273### 4. Merge and Iterate7475Develop the final merged instructions **without updating files yet**:76771. Draft the merged instructions incorporating approved memories782. Evaluate against quality bar793. Refine structure, wording, organization804. Repeat until the merged instructions meet 10/10 criteria8182### 5. Update Files8384Once the final merged instructions meet 10/10 criteria:8586- **Create or update** the instruction file with the final merged content87- Include proper frontmatter if creating new file88- **Merge `applyTo` patterns** from both memory and instruction files if both exist, ensuring comprehensive coverage without duplication89- **Remove** merged sections from the memory file9091## Example9293```94User: "/memory-merger >clojure"9596Agent:971. Reads clojure-memory.instructions.md and clojure.instructions.md982. Proposes 3 memories for merger993. [STOPS]100101User: "go"102103Agent:1044. Defines quality bar for 10/101055. Merges new instructions candidate, iterates to 10/101066. Updates clojure.instructions.md1077. Cleans clojure-memory.instructions.md108```109