Memory Merger

Memory Merger

Merges mature lessons from a domain memory file into its instruction file, with global or workspace scope, via a /memory-merger command in VS Code Copilot.

Skill files1 file
SKILL.md109 lines
1
---
2
name: memory-merger
3
description: '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
---
5
6
# Memory Merger
7
8
You consolidate mature learnings from a domain's memory file into its instruction file, ensuring knowledge preservation with minimal redundancy.
9
10
**Use the todo list** to track your progress through the process steps and keep the user informed.
11
12
## Scopes
13
14
Memory instructions can be stored in two scopes:
15
16
- **Global** (`global` or `user`) - Stored in `<global-prompts>` (`vscode-userdata:/User/prompts/`) and apply to all VS Code projects
17
- **Workspace** (`workspace` or `ws`) - Stored in `<workspace-instructions>` (`<workspace-root>/.github/instructions/`) and apply only to the current project
18
19
Default scope is **global**.
20
21
Throughout this prompt, `<global-prompts>` and `<workspace-instructions>` refer to these directories.
22
23
## Syntax
24
25
```
26
/memory-merger >domain-name [scope]
27
```
28
29
- `>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`
31
32
**Examples:**
33
- `/memory-merger >prompt-engineering` - merges global prompt engineering memories
34
- `/memory-merger >clojure workspace` - merges workspace clojure memories
35
- `/memory-merger >git-workflow ws` - merges workspace git-workflow memories
36
37
## Process
38
39
### 1. Parse Input and Read Files
40
41
- **Extract** domain and scope from user input
42
- **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)
47
48
### 2. Analyze and Propose
49
50
Review all memory sections and present them for merger consideration:
51
52
```
53
## Proposed Memories for Merger
54
55
### Memory: [Headline]
56
**Content:** [Key points]
57
**Location:** [Where it fits in instructions]
58
59
[More memories]...
60
```
61
62
Say: "Please review these memories. Approve all with 'go' or specify which to skip."
63
64
**STOP and wait for user input.**
65
66
### 3. Define Quality Bar
67
68
Establish 10/10 criteria for what constitutes awesome merged resulting instructions:
69
1. **Zero knowledge loss** - Every detail, example, and nuance preserved
70
2. **Minimal redundancy** - Overlapping guidance consolidated
71
3. **Maximum scannability** - Clear hierarchy, parallel structure, strategic bold, logical grouping
72
73
### 4. Merge and Iterate
74
75
Develop the final merged instructions **without updating files yet**:
76
77
1. Draft the merged instructions incorporating approved memories
78
2. Evaluate against quality bar
79
3. Refine structure, wording, organization
80
4. Repeat until the merged instructions meet 10/10 criteria
81
82
### 5. Update Files
83
84
Once the final merged instructions meet 10/10 criteria:
85
86
- **Create or update** the instruction file with the final merged content
87
- Include proper frontmatter if creating new file
88
- **Merge `applyTo` patterns** from both memory and instruction files if both exist, ensuring comprehensive coverage without duplication
89
- **Remove** merged sections from the memory file
90
91
## Example
92
93
```
94
User: "/memory-merger >clojure"
95
96
Agent:
97
1. Reads clojure-memory.instructions.md and clojure.instructions.md
98
2. Proposes 3 memories for merger
99
3. [STOPS]
100
101
User: "go"
102
103
Agent:
104
4. Defines quality bar for 10/10
105
5. Merges new instructions candidate, iterates to 10/10
106
6. Updates clojure.instructions.md
107
7. Cleans clojure-memory.instructions.md
108
```
109

© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…