### One-Liner Xcode Setup Script Source: https://github.com/samvallad33/vestige/blob/main/docs/blog/xcode-memory.md Executes a setup script to automate the installation and configuration of Vestige for Xcode. This is a convenient alternative to manual setup. ```bash curl -sSL https://raw.githubusercontent.com/samvallad33/vestige/main/scripts/xcode-setup.sh -o xcode-setup.sh bash xcode-setup.sh ``` -------------------------------- ### Install and Configure Vestige Source: https://github.com/samvallad33/vestige/blob/main/docs/launch/demo-script.md Download and install the Vestige binary, then register it as an MCP server for Claude. ```bash curl -L https://github.com/samvallad33/vestige/releases/latest/download/vestige-mcp-aarch64-apple-darwin.tar.gz | tar -xz claude mcp add vestige vestige-mcp -s user ``` ```bash # Install (macOS Apple Silicon) curl -L https://github.com/samvallad33/vestige/releases/latest/download/vestige-mcp-aarch64-apple-darwin.tar.gz | tar -xz sudo mv vestige-mcp vestige vestige-restore /usr/local/bin/ ``` ```bash # Connect to Claude Code claude mcp add vestige vestige-mcp -s user ``` -------------------------------- ### Quick Setup for Vestige Memory Source: https://github.com/samvallad33/vestige/blob/main/docs/CLAUDE-SETUP.md Basic configuration to initialize Vestige memory checks at the start of a conversation. ```markdown ## Vestige Memory System At the start of every conversation, check Vestige for context: 1. Recall user preferences and instructions 2. Recall relevant project context 3. Operate in proactive memory mode - save important info without being asked Query: `search` with "user preferences" and "instructions" ``` -------------------------------- ### Install and Configure Vestige MCP Source: https://github.com/samvallad33/vestige/blob/main/docs/launch/show-hn.md Download the binary, move it to the system path, and register the MCP server with Claude. ```bash curl -L https://github.com/samvallad33/vestige/releases/latest/download/vestige-mcp-aarch64-apple-darwin.tar.gz | tar -xz sudo mv vestige-mcp vestige vestige-restore /usr/local/bin/ claude mcp add vestige vestige-mcp -s user ``` -------------------------------- ### Install Vestige Tool Source: https://github.com/samvallad33/vestige/blob/main/docs/launch/reddit-cross-reference.md Bash command to install the Vestige tool. This is a quick installation process that takes approximately 30 seconds. ```bash curl -L https://vestige.sh/install.sh | bash ``` -------------------------------- ### Install vestige-mcp-server Source: https://github.com/samvallad33/vestige/blob/main/packages/vestige-mcp-npm/README.md Installs the vestige-mcp-server globally using npm. This command downloads the correct binary for your platform. ```bash npm install -g vestige-mcp-server ``` -------------------------------- ### Install Vestige CLI Tools Source: https://github.com/samvallad33/vestige/blob/main/docs/blog/xcode-memory.md Installs the Vestige command-line tools to your system's PATH. Ensure you have curl and tar installed. ```bash curl -L https://github.com/samvallad33/vestige/releases/latest/download/vestige-mcp-aarch64-apple-darwin.tar.gz | tar -xz sudo mv vestige-mcp vestige vestige-restore /usr/local/bin/ ``` -------------------------------- ### Project-Specific Memory Setup Source: https://github.com/samvallad33/vestige/blob/main/docs/CLAUDE-SETUP.md Configuration for project-level memory management and architectural decision tracking. ```markdown ## Project Memory This project uses Vestige for persistent context. ### On Session Start - `codebase(action="get_context", codebase="[project-name]")` - `search` query="[project-name] architecture decisions" ### When Making Decisions - Use `codebase(action="remember_decision")` for all architectural choices - Include: decision, rationale, alternatives considered, affected files ### Patterns to Remember - Use `codebase(action="remember_pattern")` for recurring code patterns - Include: pattern name, when to use it, example files ``` -------------------------------- ### Verify Installation Path Source: https://github.com/samvallad33/vestige/blob/main/README.md Check if the binary is in your PATH or add it to the Claude MCP configuration. ```bash which vestige-mcp # Or use the full path: claude mcp add vestige /usr/local/bin/vestige-mcp -s user ``` -------------------------------- ### Verify binary installation Source: https://github.com/samvallad33/vestige/blob/main/docs/integrations/vscode.md Checks if the Vestige binary is correctly located in the system path. ```bash which vestige-mcp && echo "Found" || echo "Not found" ``` -------------------------------- ### Example Interaction with Claude Source: https://github.com/samvallad33/vestige/blob/main/crates/vestige-mcp/README.md A demonstration of how Claude interacts with the Vestige MCP server to store and retrieve architectural decisions. ```text User: Remember that we decided to use FSRS-6 instead of SM-2 because it's 20-30% more efficient. Claude: [calls remember_decision] I've recorded that architectural decision. User: What decisions have we made about algorithms? Claude: [calls get_codebase_context] I found 1 decision: - We decided to use FSRS-6 instead of SM-2 because it's 20-30% more efficient. ``` -------------------------------- ### Configure Global Memory Source: https://github.com/samvallad33/vestige/blob/main/docs/STORAGE.md Default setup for shared memory across all projects. ```bash # Default behavior - no configuration needed claude mcp add vestige vestige-mcp -s user ``` -------------------------------- ### Install Vestige and Configure Xcode Project Source: https://github.com/samvallad33/vestige/blob/main/docs/blog/xcode-memory.md Installs Vestige and sets up the necessary .mcp.json file in your project root for Xcode integration. Ensure you run this from your project's root directory. ```bash # Install Vestige curl -L https://github.com/samvallad33/vestige/releases/latest/download/vestige-mcp-aarch64-apple-darwin.tar.gz | tar -xz sudo mv vestige-mcp vestige vestige-restore /usr/local/bin/ # Add to your project (run from project root) cat > .mcp.json << 'EOF' { "mcpServers": { "vestige": { "type": "stdio", "command": "/usr/local/bin/vestige-mcp", "args": [], "env": { "PATH": "/usr/local/bin:/usr/bin:/bin" } } } } EOF # Restart Xcode. Done. ``` -------------------------------- ### Install Vestige MCP on macOS Source: https://github.com/samvallad33/vestige/blob/main/docs/launch/reddit-cross-reference.md Command to download, extract, and install the Vestige MCP binary on macOS. This is a prerequisite for running the Vestige system locally. ```bash curl -L https://github.com/samvallad33/vestige/releases/latest/download/vestige-mcp-aarch64-apple-darwin.tar.gz | tar -xz sudo mv vestige-mcp /usr/local/bin/ ``` -------------------------------- ### Verify Vestige Installation in Xcode Agent Source: https://github.com/samvallad33/vestige/blob/main/docs/integrations/xcode.md After setup, type `/context` in Xcode's Agent panel to verify that Vestige is listed as an available MCP server with its associated tools. ```text /context ``` -------------------------------- ### Configure Project-Specific Memory Source: https://github.com/samvallad33/vestige/blob/main/docs/integrations/windsurf.md Example configuration for setting a custom data directory for Vestige using project-specific paths. ```json { "mcpServers": { "vestige": { "command": "/usr/local/bin/vestige-mcp", "args": ["--data-dir", "${env:HOME}/projects/my-app/.vestige"], "env": {} } } } ``` -------------------------------- ### Check vestige-mcp Installation Path Source: https://github.com/samvallad33/vestige/blob/main/docs/FAQ.md Verify that the `vestige-mcp` executable is correctly added to your system's PATH after installation. If not found, you may need to specify the full path in your configuration. ```bash which vestige-mcp ``` ```bash # Should output: /usr/local/bin/vestige-mcp ``` ```bash # Use full path in Claude config claude mcp add vestige /full/path/to/vestige-mcp -s user ``` -------------------------------- ### Install Vestige on macOS (Apple Silicon) Source: https://github.com/samvallad33/vestige/blob/main/README.md Installs the Vestige MCP binary on macOS with Apple Silicon. Ensure you have `curl` and `tar` installed. This command downloads the latest release and places the binaries in your system's PATH. ```bash # 1. Install (macOS Apple Silicon) curl -L https://github.com/samvallad33/vestige/releases/latest/download/vestige-mcp-aarch64-apple-darwin.tar.gz | tar -xz sudo mv vestige-mcp vestige vestige-restore /usr/local/bin/ ``` -------------------------------- ### Install Vestige on Linux (x86_64) Source: https://github.com/samvallad33/vestige/blob/main/README.md Installs the Vestige MCP binary on Linux for x86_64 architecture. This command downloads the release and places the binaries in your system's PATH. ```bash curl -L https://github.com/samvallad33/vestige/releases/latest/download/vestige-mcp-x86_64-unknown-linux-gnu.tar.gz | tar -xz sudo mv vestige-mcp vestige vestige-restore /usr/local/bin/ ``` -------------------------------- ### Example of Vestige Interaction Commands Source: https://github.com/samvallad33/vestige/blob/main/docs/FAQ.md Illustrates key commands for interacting with Vestige during a work session, including loading identity, project context, checking reminders, and remembering patterns or decisions. ```bash search(query="my preferences my style who I am") ``` ```bash codebase(action="get_context", codebase="[project]") ``` ```bash intention(action="check") ``` ```bash codebase(action="remember_pattern") ``` ```bash codebase(action="remember_decision") ``` ```bash importance() ``` ```bash promote_memory ``` ```bash demote_memory ``` -------------------------------- ### Setup Force-Directed Graph Simulation Source: https://github.com/samvallad33/vestige/blob/main/crates/vestige-mcp/src/graph.html Initializes and configures a force-directed simulation for graph nodes and edges. Requires pre-defined nodes and edges data structures. The simulation is updated on a 'tick' event to reposition graph elements. ```javascript var w = $container.clientWidth; var h = $container.clientHeight; var linkForce = forceLink(edges, function(n) { return n.id; }); linkForce.resolve(nodes); simulation = new ForceSimulation(nodes); simulation .force("charge", forceManyBody(-150 - nodes.length * 0.5)) .force("link", linkForce) .force("center", forceCenter(w / 2, h / 2)) .force("collide", forceCollide(function(n) { return nodeRadius(n) + 4; })) .on("tick", function() { // Update edge positions var lines = edgeGroup.querySelectorAll(".edge"); var resolvedLinks = linkForce.resolvedLinks(); for (var i = 0; i < resolvedLinks.length; i++) { var link = resolvedLinks[i]; if (lines[i]) { lines[i].setAttribute("x1", link.source.x); lines[i].setAttribute("y1", link.source.y); lines[i].setAttribute("x2", link.target.x); lines[i].setAttribute("y2", link.target.y); } } // Update node positions var nodeEls = nodeGroup.querySelectorAll(".node"); for (var j = 0; j < nodes.length; j++) { if (nodeEls[j]) { nodeEls[j].setAttribute("transform", "translate(" + nodes[j].x + "," + nodes[j].y + ")"); } } }) .start(); ``` -------------------------------- ### SVG Initialization and Filter Setup Source: https://github.com/samvallad33/vestige/blob/main/crates/vestige-mcp/src/graph.html Initializes the SVG container and creates a glow filter effect for nodes. ```javascript function initSvg() { var w = $container.clientWidth; var h = $container.clientHeight; $svg.setAttribute("viewBox", "0 0 " + w + " " + h); // Clear $svg.innerHTML = ""; // Defs: glow filters var defs = createSvgEl("defs"); // Node glow filter var glowFilter = createSvgEl("filter"); glowFilter.setAttribute("id", "glow"); glowFilter.setAttribute("x", "-50%"); glowFilter.setAttribute("y", "-50%"); glowFilter.setAttribute("width", "200%"); glowFilter.setAttribute("height", "200%"); var feBlur = createSvgEl("feGaussianBlur"); feBlur.setAttribute("stdDeviation", "3"); feBlur.setAttribute("result", "coloredBlur"); var feMerge = createSvgEl("feMerge"); var feMergeNode1 = createSvgEl("feMergeNode"); feMergeNode1.setAttribute("in", "coloredBlur"); var feMergeNode2 = createSvgEl("feMergeNode"); feMergeNode2.setAttribute("in", "SourceGraphic"); feMerge.appendChild(feMergeNode1); feMerge.appendChild(feMergeNode2); glowFilter. ``` -------------------------------- ### Check Vestige Version Source: https://github.com/samvallad33/vestige/blob/main/docs/CONFIGURATION.md Display the currently installed version of the vestige-mcp executable. ```bash vestige-mcp --version ``` -------------------------------- ### Access Vestige database via SQLite Source: https://github.com/samvallad33/vestige/blob/main/docs/FAQ.md Commands to open the SQLite database and example queries for inspecting knowledge nodes. ```bash # macOS sqlite3 ~/Library/Application\ Support/com.vestige.core/vestige.db # Example queries SELECT content, retention_strength FROM knowledge_nodes ORDER BY retention_strength DESC LIMIT 10; SELECT content FROM knowledge_nodes WHERE tags LIKE '%identity%'; SELECT COUNT(*) FROM knowledge_nodes WHERE retention_strength < 0.1; ``` -------------------------------- ### Get Context with codebase Source: https://context7.com/samvallad33/vestige/llms.txt Use the codebase tool to retrieve context. Specify the action, codebase, and an optional limit for the number of results. ```json // MCP Tool Call: codebase (Get Context) { "action": "get_context", "codebase": "vestige", "limit": 10 } ``` ```json // Response: { "patterns": [ {"name": "Error Handling Pattern", "description": "All API endpoints wrap errors..."} ], "decisions": [ {"decision": "Use SQLite with WAL mode", "rationale": "Single-user local application..."} ], "crossProjectInsights": [] } ``` -------------------------------- ### Query for Database Usage Source: https://github.com/samvallad33/vestige/blob/main/docs/launch/reddit-cross-reference.md An example query to the cross_reference tool to determine the database used by the project. This helps in verifying factual information stored in the AI's memory. ```javascript cross_reference({ query: "what database does the project use?" }) ``` -------------------------------- ### SVG Initialization and Setup Source: https://github.com/samvallad33/vestige/blob/main/crates/vestige-mcp/src/graph.html Initializes the SVG canvas by creating a defs element for filters and patterns, a background rectangle, and a main group for graph elements. ```javascript $svg.appendChild(defs); // Background pattern — subtle grid var bgRect = createSvgEl("rect"); bgRect.setAttribute("width", "100%"); bgRect.setAttribute("height", "100%"); bgRect.setAttribute("fill", "#0d1117"); $svg.appendChild(bgRect); // Main group for transform svgGroup = createSvgEl("g"); svgGroup.setAttribute("id", "graph-group"); $svg.appendChild(svgGroup); ``` -------------------------------- ### Verify Vestige-mcp Binary Path Source: https://github.com/samvallad33/vestige/blob/main/docs/integrations/xcode.md Ensure the vestige-mcp binary is correctly installed and accessible at the specified absolute path. This confirms the tool's availability. ```bash ls -la /usr/local/bin/vestige-mcp ``` -------------------------------- ### Intelligent Memory Ingestion (Single) Source: https://context7.com/samvallad33/vestige/llms.txt The `smart_ingest` tool stores memories with automatic Prediction Error Gating to decide whether to CREATE, UPDATE, or SUPERSEDE content. This single-mode example shows storing a bug fix. ```json // MCP Tool Call: smart_ingest (Single Mode) { "content": "BUG FIX: Authentication timeout was caused by missing await on token refresh. Root cause: The refreshToken() call was not awaited, causing race condition. Solution: Added await and proper error handling in auth middleware.", "tags": ["bug-fix", "authentication", "async"], "node_type": "fact", "source": "PR #423" } // Response: { "success": true, "decision": "create", "nodeId": "550e8400-e29b-41d4-a716-446655440000", "message": "Smart ingest complete: Created new memory - content was different enough", "hasEmbedding": true, "similarity": 0.42, "predictionError": 0.58, "importanceScore": 0.72, "reason": "Created new memory - content was different enough from existing memories" } ``` -------------------------------- ### Pre-load Demo Environment Source: https://github.com/samvallad33/vestige/blob/main/docs/launch/demo-script.md Commands to cache the embedding model, verify the cache directory, and ingest sample memory data for the demonstration. ```bash # 1. Ensure embedding model is cached (130MB, downloads on first use) # Run any search to trigger download: vestige health # 2. Verify cache exists: ls ~/.fastembed_cache/ # Should show: nomic-ai--nomic-embed-text-v1.5/ # 3. Pre-load ~20 diverse memories so the graph looks alive: vestige ingest "TypeScript is my preferred language for frontend development" --tags preference,typescript vestige ingest "React Server Components eliminate client-side data fetching waterfalls" --tags pattern,react vestige ingest "Decided to use Axum over Actix-web for Vestige's HTTP layer because of tower middleware ecosystem" --tags decision,architecture vestige ingest "BUG FIX: SQLite WAL mode requires separate reader/writer connections for concurrent access" --tags bug-fix,sqlite vestige ingest "FSRS-6 uses 21 parameters trained on 700M+ Anki reviews, achieving 30% better efficiency than SM-2" --tags fsrs,science vestige ingest "Prediction Error Gating: similarity > 0.92 = reinforce, > 0.75 = update, < 0.75 = create new" --tags pe-gating,science vestige ingest "Synaptic Tagging (Frey & Morris 1997): memories become important retroactively when a significant event occurs within 9 hours" --tags science,synaptic-tagging vestige ingest "Three.js InstancedMesh renders 1000+ nodes at 60fps using GPU instancing" --tags pattern,threejs vestige ingest "MCP protocol uses JSON-RPC 2.0 over stdio — no HTTP overhead, native tool integration" --tags mcp,architecture vestige ingest "Bjork dual-strength model: storage strength never decreases, retrieval strength decays with time" --tags science,bjork vestige ingest "HyDE query expansion classifies intent into 6 types and generates 3-5 hypothetical document variants" --tags hyde,search vestige ingest "Ebbinghaus forgetting curve: R = e^(-t/S) where R=retrievability, t=time, S=stability" --tags science,ebbinghaus vestige ingest "USearch HNSW index is 20x faster than FAISS for nearest neighbor search" --tags performance,search vestige ingest "Reconsolidation (Nader 2000): retrieved memories enter a labile state for 24-48 hours where they can be modified" --tags science,reconsolidation vestige ingest "Anderson 1994 retrieval-induced forgetting: retrieving one memory suppresses competing memories" --tags science,competition vestige ingest "Einstein & McDaniel 1990 prospective memory: remember to do X when Y happens, with time/context/event triggers" --tags science,prospective-memory vestige ingest "Vestige search pipeline: overfetch -> rerank -> temporal boost -> accessibility filter -> context match -> competition -> spreading activation" --tags architecture,search-pipeline vestige ingest "Vestige has 734 tests, 77,840 lines of Rust, 29 cognitive modules, and ships as a 22MB binary" --tags vestige,stats vestige ingest "The difference between Vestige and every other AI memory tool: we implemented the actual neuroscience, not just a vector database with timestamps" --tags vestige,philosophy vestige ingest "Spreading activation: when you search for one thing, related memories light up automatically, like how thinking of 'doctor' primes 'nurse'" --tags science,spreading-activation ``` -------------------------------- ### Initialize Development Environment Source: https://github.com/samvallad33/vestige/blob/main/CONTRIBUTING.md Commands to clone the repository, build the dashboard, compile the Rust workspace, and run initial tests. ```bash git clone https://github.com/samvallad33/vestige.git cd vestige # Build the dashboard (required for include_dir! embedding) cd apps/dashboard && pnpm install && pnpm build && cd ../.. # Build the Rust workspace cargo build # Run tests VESTIGE_TEST_MOCK_EMBEDDINGS=1 cargo test --workspace ``` -------------------------------- ### Launch Dashboard Source: https://github.com/samvallad33/vestige/blob/main/docs/launch/demo-script.md Open the local dashboard in the default browser. ```bash open http://localhost:3927/dashboard ``` -------------------------------- ### Build the Vestige bundle Source: https://github.com/samvallad33/vestige/blob/main/packages/vestige-mcpb/README.md Use the mcpb CLI to pack the project after downloading the necessary platform binaries. ```bash # Install mcpb CLI npm install -g @anthropic-ai/mcpb # Download binaries from GitHub release ./build.sh # Pack mcpb pack ``` -------------------------------- ### Initialization and Background Tasks Source: https://github.com/samvallad33/vestige/blob/main/crates/vestige-mcp/src/dashboard.html Initializes the application by checking health, loading statistics, and fetching memories. Also sets up a recurring task to check health every 30 seconds. ```javascript checkHealth(); loadStats(); fetchMemories(false); // Refresh health every 30 seconds setInterval(checkHealth, 30000); ``` -------------------------------- ### Create VS Code MCP directory Source: https://github.com/samvallad33/vestige/blob/main/docs/integrations/vscode.md Initializes the directory for project-specific MCP configurations. ```bash mkdir -p .vscode ``` -------------------------------- ### Initialize Cursor MCP Configuration Source: https://github.com/samvallad33/vestige/blob/main/docs/integrations/cursor.md Create the necessary directory and configuration file for MCP servers on macOS or Linux. ```bash # macOS / Linux mkdir -p ~/.cursor open -e ~/.cursor/mcp.json ``` -------------------------------- ### Install Vestige on macOS (Intel) Source: https://github.com/samvallad33/vestige/blob/main/README.md Installs the Vestige MCP binary on macOS for Intel processors. This command downloads the appropriate release and places the binaries in your system's PATH. ```bash curl -L https://github.com/samvallad33/vestige/releases/latest/download/vestige-mcp-x86_64-apple-darwin.tar.gz | tar -xz sudo mv vestige-mcp vestige vestige-restore /usr/local/bin/ ``` -------------------------------- ### Run Benchmarks Source: https://github.com/samvallad33/vestige/blob/main/CLAUDE.md Execute performance benchmarks for the core library. ```bash cargo bench -p vestige-core ``` -------------------------------- ### GET /memory_health Source: https://context7.com/samvallad33/vestige/llms.txt Retrieves statistics and health metrics regarding memory retention and distribution. ```APIDOC ## GET /memory_health ### Description Returns memory health statistics including average retention, distribution, and maintenance recommendations. ### Method GET ### Endpoint /memory_health ### Response #### Success Response (200) - **averageRetention** (float) - Average retention score. - **distribution** (object) - Retention strength buckets. - **trend** (string) - Current health trend. - **totalMemories** (integer) - Total count of stored memories. #### Response Example { "averageRetention": 0.72, "distribution": { "0-20%": 12, "80-100%": 71 }, "trend": "stable", "totalMemories": 242 } ``` -------------------------------- ### Define memory tags Source: https://github.com/samvallad33/vestige/blob/main/docs/FAQ.md Examples of hierarchical, project-specific, and categorical tagging conventions for organizing memories. ```text # Hierarchical topics tags=["programming", "programming/rust", "programming/rust/async"] # Project-specific tags=["project:my-app", "feature:auth", "sprint:q1-2024"] # Memory types tags=["preference", "decision", "learning", "mistake"] # Identity-related tags=["identity", "self", "values", "communication-style"] # Urgency/importance tags=["critical", "nice-to-have", "deprecated"] ``` -------------------------------- ### Build the Vestige MCP Server Source: https://github.com/samvallad33/vestige/blob/main/crates/vestige-mcp/README.md Commands to navigate to the project directory and compile the server in release mode. ```bash cd /path/to/vestige/crates/vestige-mcp cargo build --release ``` -------------------------------- ### Claude Memory Interaction Source: https://github.com/samvallad33/vestige/blob/main/docs/launch/demo-script.md Example prompts used to demonstrate memory creation and retrieval in the terminal. ```text You: Remember that I'm presenting at MCP Dev Summit NYC and my talk is about cognitive memory systems ``` ```text You: What do you know about how I'm using memory science in my work? ``` ```text You: Dream about my recent memories ``` -------------------------------- ### Build Project Binaries Source: https://github.com/samvallad33/vestige/blob/main/CONTRIBUTING.md Commands to compile debug and release versions of the MCP server. ```bash # Debug build cargo build -p vestige-mcp # Release build (22MB binary with embedded dashboard) cargo build --release -p vestige-mcp # The release binary is at target/release/vestige-mcp ``` -------------------------------- ### Claude Code Interaction Source: https://github.com/samvallad33/vestige/blob/main/docs/launch/demo-script.md Examples of user prompts for storing and retrieving preferences via the Vestige MCP tool. ```text You: Remember that I prefer Rust over Go for systems programming, and TypeScript for frontend work. ``` ```text You: What programming languages do I prefer? ``` -------------------------------- ### Build Optimized Vestige Binary Source: https://github.com/samvallad33/vestige/blob/main/docs/CONFIGURATION.md Build an optimized release binary for Vestige, including all features. ```bash cargo build --release --all-features ``` -------------------------------- ### Perform Search Query in Claude Code Source: https://github.com/samvallad33/vestige/blob/main/docs/launch/demo-script.md Example of triggering a search operation within the Claude Code terminal interface. ```text You: How does FSRS-6 work? ``` -------------------------------- ### JavaScript Application Initialization Source: https://github.com/samvallad33/vestige/blob/main/crates/vestige-mcp/src/dashboard.html Initializes the application state, caches DOM references, and sets up API helper functions. ```javascript (function() { "use strict"; // ──────────────────────────────────────────── // State // ──────────────────────────────────────────── var state = { memories: [], selectedId: null, total: 0, offset: 0, pageSize: 50, view: "browser", // "browser" | "timeline" deleteTargetId: null, searchTimer: null, retentionTimer: null }; // ──────────────────────────────────────────── // DOM references // ──────────────────────────────────────────── var $version = document.getElementById("js-version"); var $healthDot = document.getElementById("js-health-dot"); var $healthText = document.getElementById("js-health-text"); var $btnBrowser = document.getElementById("js-btn-browser"); var $btnTimeline = document.getElementById("js-btn-timeline"); var $statTotal = document.getElementById("js-stat-total"); var $statRetention = document.getElementById("js-stat-retention"); var $statEmbed = document.getElementById("js-stat-embeddings"); var $statDue = document.getElementById("js-stat-due"); var $search = document.getElementById("js-search"); var $filterType = document.getElementById("js-filter-type"); var $filterRet = document.getElementById("js-filter-retention"); var $retVal = document.getElementById("js-retention-val"); var $filterSort = document.getElementById("js-filter-sort"); var $mainBrowser = document.getElementById("js-main-browser"); var $mainTimeline = document.getElementById("js-main-timeline"); var $memList = document.getElementById("js-memory-list"); var $detailPanel = document.getElementById("js-detail-panel"); var $detailEmpty = document.getElementById("js-detail-empty"); var $detailBody = document.getElementById("js-detail-body"); var $timelineView = document.getElementById("js-timeline-view"); var $deleteModal = document.getElementById("js-delete-modal"); var $modalCancel = document.getElementById("js-modal-cancel"); var $modalConfirm = document.getElementById("js-modal-confirm"); var $toastContainer = document.getElementById("js-toast-container"); // ──────────────────────────────────────────── // API Helper // ──────────────────────────────────────────── function apiFetch(path, opts) { return fetch(path, opts).then(function(res) { if (!res.ok) throw new Error("HTTP " + res.status); return res.json(); }); } // ──────────────────────────────────────────── // Health Check // ──────────────────────────────────────────── function checkHealth() { apiFetch("/api/health").then(function(data) { $healthDot.className = "health-dot ok"; $healthText.textContent = "Connected"; if (data.version) $version.textContent = "v" + data.version; }).catch(function() { $healthDot.className = "health-dot error"; $healthText.textContent = "Dis ``` -------------------------------- ### Show All Vestige MCP Options Source: https://github.com/samvallad33/vestige/blob/main/docs/CONFIGURATION.md Display all available command-line options for the vestige-mcp executable. ```bash vestige-mcp --help ``` -------------------------------- ### Initialize Graph Loading from URL Parameters Source: https://github.com/samvallad33/vestige/blob/main/crates/vestige-mcp/src/graph.html Parses URL parameters for initial query and center ID. Loads the graph based on these parameters, defaulting to a full load if no specific parameters are found. Handles 'q', 'query', and 'center_id' parameters. ```javascript // Parse URL params var urlParams = new URLSearchParams(window.location.search); var initQuery = urlParams.get("q") || urlParams.get("query") || ""; var initCenter = urlParams.get("center_id") || ""; if (initQuery) $query.value = initQuery; // Load graph on page load if (initCenter) { loadGraph(initCenter); } else { loadGraph(); } })(); ``` -------------------------------- ### Configure CLAUDE.md for Proactive Memory Source: https://github.com/samvallad33/vestige/blob/main/README.md Add these instructions to your CLAUDE.md file to enable automatic memory management at the start of every session. ```markdown ## Memory At the start of every session: 1. Search Vestige for user preferences and project context 2. Save bug fixes, decisions, and patterns without being asked 3. Create reminders when the user mentions deadlines ``` -------------------------------- ### Get Node Color Source: https://github.com/samvallad33/vestige/blob/main/crates/vestige-mcp/src/graph.html Retrieves the color for a node based on its type, using a predefined color map. Falls back to a default grey. ```javascript function nodeColor(type) { return TYPE_COLORS[type] || TYPE_COLORS[(type || "").toLowerCase()] || "#8b949e"; } ``` -------------------------------- ### Initialize Session Context Source: https://context7.com/samvallad33/vestige/llms.txt Use `session_context` to combine search queries, project context, and session status into a single token-budgeted response. This reduces token usage significantly compared to multiple separate calls. ```json // MCP Tool Call: session_context { "queries": ["user preferences", "project context"], "context": { "codebase": "my-project", "topics": ["authentication", "rust"], "file": "src/auth/login.rs" }, "token_budget": 2000, "include_status": true, "include_intentions": true, "include_predictions": true } // Response: { "context": "## Session (142 memories, healthy) **Memories:** - (Mar 15, 2024) User prefers TypeScript over JavaScript - (Mar 14, 2024) Always use dependency injection for testability **Triggered:** - Review authentication refactor (high) [due Mar 20] **Status:** 142 memories | healthy | 98% embeddings **Codebase (my-project):** - [pattern] Use Arc> for shared state in async contexts - [decision] Chose PostgreSQL for transactional consistency", "tokensUsed": 450, "tokenBudget": 2000, "expandable": ["uuid-1", "uuid-2"], "automationTriggers": { "needsDream": true, "needsBackup": false, "needsGc": false } } ``` -------------------------------- ### Get Edge Color Source: https://github.com/samvallad33/vestige/blob/main/crates/vestige-mcp/src/graph.html Retrieves the color for an edge based on its type, using a predefined color map. Falls back to a default grey. ```javascript function edgeColor(type) { return EDGE_COLORS[type] || EDGE_COLORS[(type || "").toLowerCase()] || "#30363d"; } ``` -------------------------------- ### Initialize Force Simulation Source: https://github.com/samvallad33/vestige/blob/main/crates/vestige-mcp/src/graph.html Initializes a minimal d3-force-compatible physics engine for graph layout. It uses Verlet integration and includes many-body repulsion, link attraction, center gravity, and collision avoidance. No external libraries are required. ```javascript // ============================================================================ // MINIMAL FORCE SIMULATION ENGINE // ============================================================================ // Implements Verlet integration with: many-body repulsion, link attraction, // center gravity, and collision avoidance. No external library needed. // ============================================================================ function ForceSimulation(nodes) { this.nodes = nodes; this.alpha = 1.0; this.alphaMin = 0.001; this.alphaDecay = 1 - Math.pow(this.alphaMin, 1 / 300); this.alphaTarget = 0; this.velocityDecay = 0.4; this.forces = {}; this._running = false; this._onTick = null; this._onEnd = null; this._frameId = null; // Initialize positions if not set var n = nodes.length; for (var i = 0; i < n; i++) { var node = nodes[i] if (node.x == null) node.x = Math.cos(2 * Math.PI * i / n) * 200 + 400; if (node.y == null) node.y = Math.sin(2 * Math.PI * i / n) * 200 + 300; if (node.vx == null) node.vx = 0; if (node.vy == null) node.vy = 0; } } ForceSimulation.prototype.force = function(name, f) { if (arguments.length === 1) return this.forces[name]; this.forces[name] = f; return this; }; ForceSimulation.prototype.on = function(event, fn) { if (event === "tick") this._onTick = fn; if (event === "end") this._onEnd = fn; return this; }; ForceSimulation.prototype.start = function() { this.alpha = 1.0; this._running = true; this._step(); return this; }; ForceSimulation ``` -------------------------------- ### Initialize Session Context Source: https://github.com/samvallad33/vestige/blob/main/CLAUDE.md Use session_context to initialize the cognitive environment at the start of a conversation. It returns context, automation triggers, and IDs for further retrieval. ```json session_context({ queries: ["user preferences", "[current project] context"], context: { codebase: "[project]", topics: ["[current topics]"] }, token_budget: 2000 }) ``` ```json session_context({ queries: ["user preferences", "project context"], // search queries context: { codebase: "project-name", topics: ["svelte", "rust"], file: "src/main.rs" }, token_budget: 2000, // 100-100000, controls response size include_status: true, // system health include_intentions: true, // triggered reminders include_predictions: true // proactive memory predictions }) ``` -------------------------------- ### Build Dashboard Source: https://github.com/samvallad33/vestige/blob/main/CONTRIBUTING.md Builds the dashboard application. This command should be run if changes are made to the dashboard. ```bash cd apps/dashboard && pnpm build ``` -------------------------------- ### Add Vestige MCP to Claude Source: https://github.com/samvallad33/vestige/blob/main/docs/launch/reddit-cross-reference.md Installs the Vestige MCP server and adds it as a tool for Claude. Ensure you have the necessary permissions to move files to /usr/local/bin. ```bash curl -L https://github.com/samvallad33/vestige/releases/latest/download/vestige-mcp-aarch64-apple-darwin.tar.gz | tar -xz sudo mv vestige-mcp /usr/local/bin/ claude mcp add vestige vestige-mcp -s user ``` -------------------------------- ### Pin Vestige to Specific Version Source: https://github.com/samvallad33/vestige/blob/main/docs/CONFIGURATION.md Checkout a specific version of Vestige using git and build the release binary. ```bash git checkout v1.1.2 cargo build --release ``` -------------------------------- ### Configure Proxy for Model Downloads Source: https://github.com/samvallad33/vestige/blob/main/README.md Set the HTTPS_PROXY environment variable if the initial model download is blocked by a proxy. ```bash export HTTPS_PROXY=your-proxy:port ``` -------------------------------- ### Connect Vestige to Codex Source: https://github.com/samvallad33/vestige/blob/main/README.md Connects the installed Vestige binary to Codex. This command registers Vestige as a system-level MCP service, specifying the path to the binary. ```bash # Or connect to Codex codex mcp add vestige -- /usr/local/bin/vestige-mcp ``` -------------------------------- ### Run Code Formatting Source: https://github.com/samvallad33/vestige/blob/main/CONTRIBUTING.md Ensures code adheres to project formatting standards. Run this before committing changes. ```bash cargo fmt --all ``` -------------------------------- ### Remember Architectural Decision with codebase Source: https://context7.com/samvallad33/vestige/llms.txt Use the codebase tool to remember an architectural decision. Include the action, decision, rationale, alternatives, relevant files, and codebase. ```json // MCP Tool Call: codebase (Remember Decision) { "action": "remember_decision", "decision": "Use SQLite with WAL mode instead of PostgreSQL", "rationale": "Single-user local application doesn't need network DB. WAL provides good concurrent read performance. Simplifies deployment to single binary.", "alternatives": ["PostgreSQL", "Embedded RocksDB", "JSON files"], "files": ["src/storage/mod.rs"], "codebase": "vestige" } ``` -------------------------------- ### Date Comparison Function Source: https://github.com/samvallad33/vestige/blob/main/crates/vestige-mcp/src/dashboard.html Compares two dates, returning the difference in milliseconds. Handles null or invalid dates by treating them as epoch start (0). ```javascript function cmpDate(a, b) { var da = a ? new Date(a).getTime() : 0; var db = b ? new Date(b).getTime() : 0; return da - db; } ``` -------------------------------- ### Connect Vestige to Claude Code Source: https://github.com/samvallad33/vestige/blob/main/README.md Connects the installed Vestige binary to Claude Code using the MCP protocol. This command registers Vestige as a user-level MCP service. ```bash # 2. Connect to Claude Code claude mcp add vestige vestige-mcp -s user ``` -------------------------------- ### Get Vestige Memory Statistics Source: https://github.com/samvallad33/vestige/blob/main/docs/CONFIGURATION.md Retrieve memory statistics for Vestige. Use the --tagging flag for retention distribution and --states for cognitive state distribution. ```bash vestige stats ``` ```bash vestige stats --tagging ``` ```bash vestige stats --states ``` -------------------------------- ### Execute Project Tests Source: https://github.com/samvallad33/vestige/blob/main/CONTRIBUTING.md Commands for running specific test suites, including core library, MCP server, E2E protocols, and dashboard builds. ```bash # All tests (746+ total) VESTIGE_TEST_MOCK_EMBEDDINGS=1 cargo test --workspace # Core library tests only (352 tests) VESTIGE_TEST_MOCK_EMBEDDINGS=1 cargo test -p vestige-core --lib # MCP server tests only (378 tests) VESTIGE_TEST_MOCK_EMBEDDINGS=1 cargo test -p vestige-mcp --lib # E2E MCP protocol tests (requires release build) cargo build --release -p vestige-mcp cargo test -p vestige-e2e-tests --test mcp_protocol -- --test-threads=1 # Dashboard build test cd apps/dashboard && pnpm build ``` -------------------------------- ### Browse Memory Timeline Source: https://github.com/samvallad33/vestige/blob/main/CLAUDE.md Use `memory_timeline` to browse memories chronologically. You can specify a start and end date, node type, tags, limit, and detail level for the summary. ```javascript memory_timeline({ start: "2026-02-01", end: "2026-03-01", node_type: "decision", tags: ["vestige"], limit: 50, detail_level: "summary" }) ```