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
Works in any Open VSX-compatible editor:
- VS Code 1.99+
- Google Antigravity (Open VSX)
- Gitpod (Open VSX)
Note: The memory LM tools (
storeMemory,queryMemory) require the editor to implement the VS Code LM Tool API. Editors that do not implement this API will install the extension but the tools will not be available in chat.
| 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 | 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 — 16 ADRs covering every major decision
- Roadmap — planned work and open contribution areas
GNU General Public License v3.0 — see LICENSE.