AI SummaryA Cursor rules file attempting to provide a memory engine interface with transformer-based architecture, but lacks concrete implementation and practical integration guidance for actual use.
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "mcp-titan — Cursor Rules" prompt rules to my project. Repository: https://github.com/henryhawke/mcp-titan Please read the repo to find the rules/prompt file, then: 1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type) 2. If there's an existing rules file, merge the new rules in rather than overwriting 3. Confirm what was added
Description
This tool is a cutting-edge memory engine that blends real-time learning, persistent three-tier context awareness, and seamless plug-n-play LLM integration to continuously evolve and enrich your AI’s intelligence.
Core Memory Tools
• init_model `typescript interface InitModelParams { inputDim?: number; // Default: 768 hiddenDim?: number; // Default: 512 memoryDim?: number; // Default: 1024 transformerLayers?: number; // Default: 6 numHeads?: number; // Default: 8 ffDimension?: number; // Default: 2048 dropoutRate?: number; // Default: 0.1 maxSequenceLength?: number; // Default: 512 memorySlots?: number; // Default: 5000 similarityThreshold?: number; // Default: 0.65 surpriseDecay?: number; // Default: 0.9 pruningInterval?: number; // Default: 1000 gradientClip?: number; // Default: 1.0 } const response = await callTool("init_model", { inputDim: 768, memorySlots: 10000, transformerLayers: 8, }); ` • forward_pass `typescript interface ForwardPassParams { x: number[] | string; // Input vector or text memoryState: { shortTerm: number[]; longTerm: number[]; meta: number[]; timestamps: number[]; accessCounts: number[]; surpriseHistory: number[]; }; } const { predicted, memoryUpdate } = await callTool("forward_pass", { x: "const x = 5;", // or vector: [0.1, 0.2, ...] memoryState: currentMemory, }); ` • train_step `typescript interface TrainStepParams { x_t: number[] | string; // Current input x_next: number[] | string; // Next input } const result = await callTool("train_step", { x_t: "function hello() {", x_next: " console.log('world');", }); ` • get_memory_state `typescript interface GetMemoryStateParams { type?: string; // Optional memory type filter } const state = await callTool("get_memory_state", {}); // Returns: { stats: { meanActivation: number; patternDiversity: number; surpriseScore: number; timestamps: number[]; accessCounts: number[]; }, capacity: number; status: "active" | "pruning" | "error"; } ` • manifold_step `typescript interface ManifoldStepParams { base: number[]; // Base memory state velocity: number[]; // Update direction } const newBase = await callTool("manifold_step", { base: memory.meta, velocity: [0.1, 0.2, ...] // or analysis.stats.meanActivation }); ` • prune_memory `typescript interface PruneMemoryParams { threshold: number; // Pruning threshold (0-1) } await callTool("prune_memory", { threshold: 0.65, }); ` • save_checkpoint `typescript interface SaveCheckpointParams { path: string; // Checkpoint file path } await callTool("save_checkpoint", { path: "/backups/memory-snapshot.json", }); ` • load_checkpoint `typescript interface LoadCheckpointParams { path: string; // Checkpoint file path } const recovered = await callTool("load_checkpoint", { path: "/backups/last-stable.json", }); ` • reset_gradients `typescript // No parameters needed await callTool("reset_gradients", {}); `
Memory Management Examples
• Safe Tensor Operations `typescript const result = memoryManager.wrapWithMemoryManagement(() => { const input = vectorProcessor.processInput(userInput); const validated = vectorProcessor.validateAndNormalize(input, [768]); return model.forward(validated, currentState); }); ` • Async Memory Operations `typescript const result = await memoryManager.wrapWithMemoryManagementAsync(async () => { const encoded = await vectorProcessor.encodeText(text); const processed = vectorProcessor.processInput(encoded); return model.forward(processed, currentState); }); ` • Secure State Saving `typescript const encryptedState = memoryManager.wrapWithMemoryManagement(() => { const state = model.getMemorySnapshot(); return { shortTerm: memoryManager.encryptTensor(state.shortTerm), longTerm: memoryManager.encryptTensor(state.longTerm), meta: memoryManager.encryptTensor(state.meta), }; }); `
Tool Chain Examples
• Memory-Safe Code Analysis `typescript const result = await memoryManager.wrapWithMemoryManagementAsync(async () => { // Process code input const processed = vectorProcessor.processInput(codeBlock); // Forward pass with memory management const { predicted, memoryUpdate } = await model.forward( processed, currentMemory ); // Check memory health const state = await model.getMemoryState(); if (state.stats.surpriseScore > 0.85) { // Update memory safely const newBase = await model.manifoldStep( memory.meta, state.stats.meanActivation ); await model.trainStep(processed, predicted); } return predicted; }); ` • Secure Memory Maintenance `typescript const maintenance = await memoryManager.wrapWithMemoryManagementAsync( async () => { // Save current state securely const encrypted = memoryManager.encryptTensor(currentState); await saveToFile(encrypted); // Prune memory if needed const health = await model.getMemoryState(); if (health.capacity < 0.3) { await model.pruneMemory(currentState, 0.5); } // Verify health const postPrune = await model.getMemoryState(); return postPrune.status === "active"; } ); `
Tool Usage Rules
• Initialization Requirements • MUST call init_model at start of session • MUST specify at least inputDim and memorySlots • MUST handle initialization errors • Forward Pass Requirements • MUST call before processing any input • MUST provide complete memory state • MUST handle both vector and text inputs • Training Requirements • MUST call after every interaction • MUST provide sequential inputs • MUST maintain context continuity • Memory State Requirements • MUST check every 5 interactions • MUST monitor all stats fields • MUST act on critical thresholds • Maintenance Requirements • MUST prune when capacity < 30% • MUST save checkpoints every 5 minutes • MUST reset on gradient explosions
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts