Spec MemoryAI-agnostic memory functor for VSCode — structured long-term memory with pluggable intelligence. Memory as a Functor: the structure (Shape) is fixed, the intelligence (fmap) is swappable. Features
InstallFrom VS MarketplaceSearch "Spec Memory" in the Extensions panel. From
|
| Command | Description |
|---|---|
| Process Events Now | Flush buffered events into memories |
| Add Manual Note | Save a note to memory |
| Search Memories | Search by keyword or tag |
| Switch Provider | Change intelligence provider |
| Start/End Session | Manage coding sessions |
| Generate Idris2 Session File | Codegen typed .idr from current session |
| Extract Priming Patterns | Extract heuristics from episodic memories |
| Set Project Phase | Mark current development phase |
| Verify Spec | Compare spec vs implementation |
| Review Flagged | Review low-quality memories |
| Export/Import | Backup and restore memories |
Settings
| Setting | Default | Description |
|---|---|---|
specMemory.provider |
passthrough |
Intelligence provider (passthrough, manual, claude, openai) |
specMemory.claudeApiKey |
Anthropic API key (Claude provider) | |
specMemory.openaiApiKey |
OpenAI API key | |
specMemory.triggers.gitCommit |
true |
Auto-process on git commit |
specMemory.triggers.testResults |
true |
Auto-process on test pass/fail |
specMemory.triggers.periodic |
true |
Periodic flush (15 min) |
specMemory.triggers.phaseChange |
true |
Auto-process on phase change |
specMemory.triggers.qaComplete |
true |
Auto-process on QA completion |
specMemory.idris2Path |
Path to idris2 binary (auto-detected if empty) | |
specMemory.autoCompileSpec |
true |
Auto-compile .idr on save |
specMemory.supervisor.enabled |
true |
Enable Supervisor lifecycle orchestration |
specMemory.supervisor.idleTimeoutMinutes |
30 |
Minutes of inactivity before auto-ending session |
specMemory.supervisor.autoCodegen |
true |
Auto-generate .idr on session end |
specMemory.supervisor.autoPrimingExtract |
true |
Auto-extract priming patterns |
Architecture
WorkEvents → TriggerEngine → ProcessorBridge → Intelligence.mapEvents(fmap)
↓
Validate(Invariants) → Storage.save
↓
IdrisCodegen → LongTermMemory/*.idr
Formal Spec
Full specification in Specs/Extension/SpecMemory.idr — 7 Idris2 modules with 163 type-level QA test cases.
| Module | Lines | Contents |
|---|---|---|
| Types.idr | 350 | Core data types and records |
| Interfaces.idr | 226 | Intelligence, Storage, Trigger, Compiler |
| Context.idr | 383 | ProjectContext, IntelligenceV2, AutoSave |
| Features.idr | 388 | Codegen, Verification, Priming, Phase, QA |
| Supervisor.idr | 615 | Supervisor, SessionAuto, ProcessorBridge |
| Invariants.idr | 294 | 18 formal invariants |
| QASpec.idr | 588 | 163 QA test cases |
Development
npm install
npm test # 174/174 tests
npm run compile # TypeScript build
Test Results
| Category | Tests | Status |
|---|---|---|
| Schema | 8 | PASS |
| Storage | 10 | PASS |
| Intelligence | 8 | PASS |
| Events | 6 | PASS |
| Pipeline + Trigger | 9 | PASS |
| Session/Day | 9 | PASS |
| Compiler | 8 | PASS |
| Codegen | 22 | PASS |
| Supervisor | 28 | PASS |
| Background + Bridge | 20 | PASS |
| Quality + Priming | 21 | PASS |
| Context + Verifier | 25 | PASS |
| Total | 174 | ALL PASS |
License
MIT