Nine Phase 2 sub-plans operationalising ADR 0002 against the Phase 2
master plan, each sized to fit a focused implementation session and
handed to Claude Code as a /goal brief without requiring the agent to
load the master plan.
Order of execution (each depends on the previous unless noted):
- 0002a-skeleton-and-feature-gate.md -- postgres-backend Cargo feature
+ PgMemoryStore skeleton with todo!() bodies. D1+D2.
- 0002b-pool-and-config.md -- PgPool builder, VestigeConfig/
PostgresConfig, vestige.toml loader wired into vestige-mcp. D3+D7
(master plan numbering).
- 0002c-migrations.md -- sqlx migrations 0001_init/0002_hnsw including
D7 (users/groups/memberships, owner/visibility/shared_with_groups)
and D8 (codebase column). SQLite V15 parity migration. D4.
- 0002d-store-impl-bodies.md -- real CRUD + registry bodies; trivial
fts_search/vector_search bodies. D2+D6.
- 0002e-hybrid-search.md -- one-statement RRF query. D5.
- 0002f-migrate-cli.md -- vestige migrate copy (SQLite -> Postgres),
--dry-run, idempotent re-runs, --allow-source-upgrade for pre-V15
sources. D8+D10.
- 0002g-reembed.md -- vestige migrate reembed (offline rebuild).
D9 + D10 reembed arm. Ships resolve_embedder helper as a workaround
for the missing Embedder::from_name(&str) constructor.
- 0002h-testing-and-benches.md -- testcontainers harness, six
integration test files, Criterion bench at 1k/100k. D14+D15.
- 0002i-runbook.md -- operator-facing deployment + day-2 runbook. D16.
Supersession notice added to the master plan (0002-phase-2-postgres-
backend.md) pointing at ADR 0002; body retained as archival reference.
PR B carries this commit plus the previous two (ADR 0002 + Phase 1
amendment sub-plans); no code change.
Three sub-plans operationalising ADR 0002 D1 + D3 on the existing
feat/storage-trait-phase1 branch (790c0c8, not yet pushed upstream):
- 0001a-trait-rewrite.md -- rewrite MemoryStore with
#[trait_variant::make(MemoryStore: Send)] generating a non-Send
LocalMemoryStore companion. Production callers use Arc<Storage> and are
unaffected; only the trait declaration and SQLite impl block change.
- 0001b-sqlite-split.md -- pure code motion. Split sqlite.rs (8713 lines)
into a sqlite/ directory (mod, crud, search, scheduling, graph, domain,
registry, portable_sync, trait_impl). Public re-exports unchanged; tests
green commit-by-commit. Depends on 0001a so trait_impl.rs picks up the
trait_variant attribute once.
- 0001c-async-trait-sunset.md -- rewrite Embedder the same way, then
remove async-trait = "0.1" from crates/vestige-core/Cargo.toml. End
state: zero async_trait references in the workspace.
Together these three lands as PR A.
Binding ADR for Phase 2 Postgres backend integration plus the Phase 1
amendment that removes async_trait from the storage and embedder traits.
Decisions D1-D8:
- D1: sunset async_trait across MemoryStore + Embedder via trait_variant
- D2: PgMemoryStore::connect(url, max_connections) mirrors SqliteMemoryStore;
no Embedder in constructor; register_model handles pgvector typmod
- D3: split sqlite.rs into a sqlite/ directory as Phase 1 amendment
- D4: postgres/ as a directory from day one
- D5: sub-plan layout -- 3 Phase 1 amendment + 9 Phase 2 sub-plans
- D6: no separate ADR for the SQLite split (pure code motion)
- D7: reserve multi-tenancy schema (users/groups/group_memberships +
owner_user_id/visibility/shared_with_groups) in Phase 2 so Phase 3 auth
is additive, not an online migration over an HNSW-indexed table
- D8: codebase promoted to a first-class indexed column on knowledge_nodes;
mcp_client_id and session_id stay in metadata JSONB
PR cadence: PR A = Phase 1 amendment (code on feat/storage-trait-phase1);
PR B = this ADR + Phase 2 sub-plans (docs only); PR C = Phase 2
implementation. Phase 4 sharing_rules table sketched in Follow-ups.
Same reconciliation as the prior commit — three files missed the first
pass because of a Read-before-Edit harness constraint. Bumps CONTRIBUTING
module table and both Windsurf + Xcode integration guides to the
asserted-in-server.rs tool count of 24.
Includes HN post with prepared FAQ, Reddit cross-posts (r/rust, r/ClaudeAI,
r/LocalLLaMA), MCP Dev Summit demo scripts (30s/3min/10min versions), and
technical blog post covering FSRS-6, PE Gating, HyDE, STC, and dreaming.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Discovered that Xcode's claudeai-mcp feature gate blocks custom MCP
servers from the global .claude config. Project-level .mcp.json files
bypass this gate entirely — this is now the documented method.
- Add scripts/xcode-setup.sh: auto-installs vestige-mcp and configures
.mcp.json for any Xcode project with checksum verification
- Rewrite docs/integrations/xcode.md with .mcp.json method, gate bypass
docs, and new troubleshooting for "Agent has been closed" error
- Add docs/blog/xcode-memory.md: launch blog post for Vestige on Xcode
- Add integration guides for Xcode 26.3, Cursor, VS Code, JetBrains, Windsurf
- First cognitive memory server with documented Xcode 26.3 MCP support
- Add npx @vestige/init — zero-config CLI that auto-detects IDEs and injects config
- Overhaul README: "The open-source cognitive engine for AI"
- Add "Why Not Just Use RAG?" comparison and cognitive science stack docs
- Update license badge to AGPL-3.0
Previously, fastembed created .fastembed_cache in the current working
directory, polluting project folders with symlinks.
Now uses platform-appropriate cache directories:
- macOS: ~/Library/Caches/com.vestige.core/fastembed
- Linux: ~/.cache/vestige/fastembed
- Windows: %LOCALAPPDATA%\vestige\cache\fastembed
Can still be overridden with FASTEMBED_CACHE_PATH env var.
Fixes user feedback about .fastembed_cache appearing in random folders.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
FSRS-6 spaced repetition, spreading activation, synaptic tagging,
hippocampal indexing, and 130 years of memory research.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>