A long-term memory layer for VS Code Copilot — learn from interactions, retain useful insights, and improve over time.
- Learns passively: picks up preferences, security rules, and quirks from natural conversation
- Learns from mistakes: stores lessons when commands fail or code is rejected
- Dedup-aware: never stores the same insight twice
- Self-cleaning: periodic cleanup merges duplicates and prunes stale memories
- Reference-based:
copilot-instructions.mdpoints to focused.memory/files — agents fetch on-demand - Workspace-scoped: each project has its own
.memory/folder
Requires VS Code 1.99+.
Also published to Open VSX for editors that use the Open VSX registry.
In Open VSX-compatible editors the extension installs and activates. What works depends on whether the editor implements the VS Code LM Tool API:
| Feature | Available |
|---|---|
.memory/*.md files created on first open |
Always |
copilot-instructions.md reference block injected |
Always |
storeMemory / queryMemory LM tools |
VS Code LM Tool API required |
| Tree view, status bar, control panel | VS Code only |
| LM deduplication and gap analysis | VS Code LM Tool API required |
The .memory/ files and copilot-instructions.md pointer are set up regardless of editor. Once those exist, any AI agent that reads instruction files can access the memory store directly — even without the LM tools.
The full experience (LM tools, UI) requires VS Code 1.99+.
Support for additional editors via MCP is planned — see the Roadmap.
| Component | Role |
|---|---|
extension/ |
VS Code extension — registers LM tools, commands, UI |
.memory/ |
Markdown memory files (instructions, quirks, preferences, decisions, security) |
npm install
npm run build- Open this workspace in VS Code
- The extension activates automatically and registers LM tools
- Click the status bar item to view memory statistics
- Start chatting — Copilot will read and write memories automatically
| Category | File | What It Stores |
|---|---|---|
| Instruction | .memory/instructions.md |
How Copilot should behave |
| Quirk | .memory/quirks.md |
Project-specific weirdness — the non-obvious stuff |
| Preference | .memory/preferences.md |
Style, tone, design choices |
| Decision | .memory/decisions.md |
Architectural commitments |
| Security | .memory/security.md |
Rules that must NEVER be broken |
| Command | Description |
|---|---|
HackLM Memory: Open Control Panel |
Open the memory control panel |
HackLM Memory: View Statistics |
View memory statistics |
HackLM Memory: List Memories |
View all stored memories |
HackLM Memory: Delete Memory |
Remove a specific entry |
HackLM Memory: Open Memory Folder |
Open .memory/ in editor |
HackLM Memory: Reinitialize Instruction Files |
Regenerate instruction files |
HackLM Memory: Run Cleanup |
Manually trigger memory cleanup |
HackLM Memory: Review Session |
Run gap analysis to find uncaptured decisions |
| Setting | Default | Description |
|---|---|---|
hacklm-memory.lmFamily |
gpt-5-mini |
Copilot model family for LM operations |
hacklm-memory.autoApproveStore |
false |
Skip confirmation prompt when saving memories |
hacklm-memory.manageInstructionFile |
true |
Allow the extension to manage .github/copilot-instructions.md |
hacklm-memory.categoryLimit.* |
varies (30–40) | Per-category max entry counts |
- All memory is local-only — stored in workspace
.memory/folder - No cloud sync, no telemetry
- Full user visibility and control
.memory/can be gitignored for sensitive projects
Contributions are welcome. Please read CONTRIBUTING.md before opening a PR.
- Architecture — module map, data flow, key design decisions
- API Reference — LM tool schemas, memory file format
- Developer Guide — how to add categories, tools, and tests
- Architecture Decision Records — 17 ADRs covering every major decision
- Roadmap — planned work and open contribution areas
GNU General Public License v3.0 — see LICENSE.