Sparse Contextual Memory Scaffolding - A validated system for continual learning in AI-assisted development.
π₯ NEW (Dec 2025): Google's Titans and MIRAS papers (December 2025) provide definitive validationβmulti-layer memory architecture and forgetting mechanisms are essential for AI memory systems. SCMS's L0/L1/L2 architecture and decay mechanism align perfectly with Google's findings. Competitors using flat vector databases (Mem0, etc.) are now architecturally deficient per Google's research!
π Prior Validation (Nov 2025): Core SCMS principles independently validated across a 2-year convergenceβDavid Shapiro (2023) theorized sparse activation architecture, SCMS (2024-2025) implemented production system, Google Research (2025) validated with "Nested Learning" (NeurIPS 2025), and Ilya Sutskever (Nov 2025) confirmed the "bug oscillation" problem that SCMS failure documentation directly addresses!
π Research Papers: SCMS (Empirical) | Paradigm Shift (Design) | Mixture of Memories (Theory) | Economics | HUMANE (Alignment) NEW
Sparse Contextual Memory Scaffolding transforms AI memory from passive storage into active validation infrastructure. Unlike traditional documentation that AI may or may not follow, SCMS implements a dual validation pipeline where patterns are automatically tested (L0) and enforced (L1) through repeated use.
Validated Results (4-month game development project):
- β 91% reduction in pattern re-discovery time
- β 94% knowledge retention rate
- β 96% time reduction in stale-context scenarios
- β <2 hour documentation lag (was 2 days)
- β Zero documentation debt after stabilization
SCMS principles have been independently validated across a 2-year span by six independent sources:
1. David Shapiro (2023): Theoretical Foundation
- Raw logs β roll-ups β KB articles architecture
- Sparse activation with gating thresholds
- Asymptotic knowledge growth patterns
- Key insight: Architecture was theoretically sound but lacked production tooling
2. SCMS (2024-2025): Production Implementation
- First production realization with modern IDE integration
- 4-month validation: 91% time savings, 94% retention
- Dual validation pipeline (L0 testing + L1 enforcement)
3. Google Research (2025): Architectural Validation
- "Nested Learning" (Behrouz et al., NeurIPS 2025) published ~10 days after SCMS
- Perfect alignment on 6/6 fundamental principles:
| Principle | Validated | Details |
|---|---|---|
| Nested Hierarchical Structure | β | Multi-level organization (Google: optimization, SCMS: validation) |
| Multi-Time-Scale Updates | β | Different update rates per level (Google: parameters, SCMS: promotion) |
| Distinct Context Flows | β | Each level has its own information flow |
| Catastrophic Forgetting Prevention | β | Both solve forgetting through nesting |
| Associative Memory Compression | β | Key-value storage and retrieval |
| Continuum Memory System | β | Memory as a spectrum (Google: frequency, SCMS: abstraction) |
Perfect 6/6 alignment validates SCMS architecture from an S-tier research lab!
4. Ilya Sutskever (2025): Problem Space Validation
- Dwarkesh Podcast interview (November 25, 2025)
- Described the "bug oscillation" problem (AβBβAβB) that SCMS failure documentation directly addresses
- Identified missing "continual memory" as root causeβexactly what SCMS provides
- Key insight: Problem recognized at highest levels of AI research; SCMS offers a working solution
5. Google "Titans" Architecture (Dec 2025): Three-Layer Memory Validation
- Introduces three-layer memory architecture (Long-term, Core Attention, Persistent) that directly mirrors SCMS's L0/L1/L2
- Demonstrates multi-layer memory is essential for handling long contexts (>2M tokens)
- "Surprise metric" for deciding what to store validates SCMS's validation-based promotion approach
- Key insight: Flat vector databases cannot adequately capture rich information in long sequences
6. Google "MIRAS" Framework (Dec 2025): Forgetting Mechanism Validation
- Identifies four essential design choices: Memory Architecture, Attentional Bias, Retention Gate, Memory Algorithm
- Explicitly states: "Forgetting is as important as remembering"βvalidates SCMS's decay mechanism
- Competitors (Mem0, Claude-mem, etc.) using flat storage without forgetting are architecturally deficient per this research
- Key insight: SCMS's decay for unvalidated L0 memories aligns with Google's "retention gates"
Key Differences:
- SCMS: First application to AI-assistant cognition (interface layer) with production-validated system (127+ cycles)
- Google NL: Applied to neural network training (model weights) with theoretical proof-of-concept
Implications: Independent discovery of identical principles across abstraction levels suggests these are universal architectural patterns for continual learning systemsβnot domain-specific heuristics.
β Read full validation analysis
SCMS implements dual validation infrastructure optimized for 30-45% cost reduction through retrieval-over-generation:
- Retrieval-first bias: Search L0/L1 before generating new content
- Cost asymmetry: Retrieval ($0.018) vs Generation ($0.033) per full session
- Target efficiency: >70% retrieval-based responses
- Conservative impact: $200-400 annual savings for users, $2-3.5M for platforms
SCMS transforms AI memory from passive storage to active cost optimization:
βββββββββββββββββββββββββββββββββββββββββββ
β VALIDATION PIPELINE (Active) β
βββββββββββββββββββββββββββββββββββββββββββ€
β L0: Destructive Validation β
β β Tests via probabilistic retrieval β
β β Temporal decay removes unvalidated β
β β Natural selection for patterns β
βββββββββββββββββββββββββββββββββββββββββββ€
β L1: Stable Validation β
β β Enforces via deterministic loading β
β β AI MUST check before acting β
β β Quality gates for proven patterns β
βββββββββββββββββββββββββββββββββββββββββββ
β (references)
βββββββββββββββββββββββββββββββββββββββββββ
β REFERENCE DOCUMENTATION (Passive) β
βββββββββββββββββββββββββββββββββββββββββββ€
β L2: Standard Operating Procedures β
β β High-frequency patterns (5+ uses) β
β β Deep documentation for common tasks β
β L3: Case Studies & Architecture β
β β Complete implementation examples β
β β Multiple patterns working together β
β L4: Global Rules β
β β Universal standards & constraints β
β β Checked after L0 for compliance β
βββββββββββββββββββββββββββββββββββββββββββ
β (fallback)
βββββββββββββββββββββββββββββββββββββββββββ
β LOW-FREQUENCY OVERFLOW (Experimental) β
βββββββββββββββββββββββββββββββββββββββββββ€
β L5: Infrequent Patterns (3-6mo cycles) β
β β Validated but too rare for L0 β
β β Prevents regeneration waste β
β β Checked before novel generation β
β β Lightweight docs for seasonal tasks β
βββββββββββββββββββββββββββββββββββββββββββ
Key Innovation: L0 and L1 are complementary validation systemsβL0 tests patterns experimentally, L1 enforces them universally. This transforms memory from "things AI might remember" to "automated quality control infrastructure."
SCMS implements a cognitive architecture with three levels operating at different update frequenciesβdirectly validating Google's discovery that "multi time-scale update [is] the key component to unlock continual learning":
RARE βββββββββββββββββββββββββββββ FREQUENT
Update Frequency Spectrum
L0 (Foundation) L1 (Implementation) Dashboard (Session)
βββββββββββββββββ βββββββββββββββββββ ββββββββββββββββββ
Abstract patterns Concrete solutions Immediate context
Cross-project Project-specific Session-specific
Test via retrieval Enforce via loading Execute now
Days-weeks scale Hours-days scale Real-time scale
Example: Example: Example:
"QTE systems "QTE timeout: "Currently debugging
need timeout" cancelQTE() @ 30s" QTE cancellation"
Why Multi-Time-Scale Works: Different update frequencies create natural isolation. High-frequency session changes don't interfere with low-frequency pattern knowledgeβpreventing catastrophic forgetting at the interface level (parallel to how Google's Nested Learning solves it at model weights level).
Key Insight: Failures contain 10-100Γ more information than successes.
- Successes: "This worked" (1 bit: true)
- Failures: "This failed because X, Y, Z" (N bits: full causal model)
β±ββββββββββββ²
β± Bug Patterns β² β L0: Highest value
β± (Generalizable)β² (prevents entire bug classes)
β±ββββββββββββββββββ²
β± Anti-Patterns β² β L0: High value
β± (Design Lessons) β² (guides architecture)
β±ββββββββββββββββββββββ²
β± Failed Approaches β² β L0: Medium value
(Constraint Discovery) (narrows solution space)
βββββββββββββββββββββββ
Edge Cases β L1: Project value
(Specific Handling) (implementation details)
Real Impact: Documenting one bug pattern prevents 3-10 similar bugs. Failed approaches eliminate entire solution spaces, saving hours of exploration.
Real-World Validation (Labyrinth Protocol, 300+ interactions):
- 30-45% session cost reduction: Full accounting including thinking mode
- Response efficiency: 300 vs 600 tokens average (including thinking)
- Cost per session: $0.018 vs $0.033 (45% reduction conservative estimate)
User Economics (Conservative Projections):
- Heavy users: $200-400/year savings with algorithmic validation
- Medium users: $100-200/year savings
- Performance: 2-3Γ faster responses through retrieval optimization
Platform Economics (100K users):
- Annual savings: $2-3.5M at full adoption (conservative estimate)
- ROI: 200-400% over 3 years (realistic projections)
- Payback period: 6-12 months
Algorithmic validation replaces theoretical estimates with measurable data:
- Live session tracking: Full-session cost accounting including thinking mode
- Pattern ROI analysis: Measure actual savings from pattern reuse
- Comparative analysis: SCMS vs baseline sessions with statistical confidence
- Enhanced economic metrics: Margin transformation, ROI over time, economic signature classification
- Platform economics projections: Scale impact for 10K-100K users
- Export capabilities: Generate business cases with real data
π― SCMS DASHBOARD = YOUR CONTROL CENTER
The dashboard (docs/tools/scms-dashboard.html) is your one-stop shop for:
- Session Start & End Prompts (v3.0, copy-paste ready)
- Real-time cost tracking with live updates
- Economic analytics showing SCMS vs baseline savings
- Margin transformation visualization: See the "$5 β $32" economic signature
- ROI tracking: Watch cumulative returns compound over time
- Economic classification: Track your efficiency level (Baseline β Exponential Returns)
- Complete workflow instructions in one place
Pro Tip: Bookmark it and keep it open during development!
β Launch Dashboard Now | Theoretical Design Guide
Key Advantage: Transforms economic claims from estimates to empirically validated measurements.
For Individual Developers:
- Makes heavy AI usage economically sustainable
- Predictable costs through retrieval optimization
- Quality improvement via validated patterns
For Platform Providers:
- Transforms heavy users from loss-leaders to profit centers
- 30-45% cost advantage over competitors (conservative estimate)
- Sustainable scaling economics with measurable ROI
β Read full economic analysis
SCMS's L0 layer (active memories) works differently depending on your IDE:
- AI creates memories automatically during development
- Zero overhead - happens naturally
- Temporal decay keeps knowledge base clean
- This is TRUE SCMS as researched (91% time savings proven)
- Create markdown files in
docs/memories/ - Manual tracking and promotion
- Works with any AI assistant
- Better for teams and compliance needs
Setup script detects your IDE and helps you choose.
Full comparison: See L0_STRATEGY_COMPARISON.md
π€ Not sure which to choose?
- Testing SCMS? β Use Option B (Standalone)
- Adding to existing project? β Use Option A (Integration)
- Starting a new project? β Use Option B (Standalone)
Both options require running the setup script once to configure:
- β Promotion thresholds (greenfield/establishing/mature)
- β IDE detection (Windsurf/Cursor/Generic)
- β L0 strategy (auto-memory vs manual)
- β Team size and domain adjustments
Option A: Integrate into Existing Project
- Copies only SCMS templates into your project
- Your existing code stays separate
- Run setup script from your project root
Option B: Standalone (Recommended for testing/new projects)
- Clone SCMS as your complete project
- Run setup script to configure
- Everything ready to go!
SCMS requires a set of Global Rules in your AI's system memory to enforce protocol compliance (like failure logging and read-before-write safety).
- Locate your AI's system prompt or global memory file (e.g.,
memories/global_rules.mdin Windsurf). - Copy the contents of
docs/templates/GLOBAL_CODING_RULES_TEMPLATE.mdinto it. - This ensures your AI follows SCMS protocols across all projects.
β οΈ IMPORTANT: Open terminal in YOUR project root first, then run these commands.
Unix/Mac/Linux:
# Clone SCMS to temp location
cd ~/Downloads
git clone https://github.com/AIalchemistART/scms-starter-kit.git
# Return to your project and run setup (works from current directory!)
cd -
~/Downloads/scms-starter-kit/scripts/setup.sh
# Clean up temp files
rm -rf ~/Downloads/scms-starter-kitWindows (PowerShell):
# Clone SCMS to temp location
Set-Location $env:USERPROFILE\Downloads
git clone https://github.com/AIalchemistART/scms-starter-kit.git
# Return to your project and run setup (works from current directory!)
Pop-Location
& "$env:USERPROFILE\Downloads\scms-starter-kit\scripts\setup.ps1"
# Clean up temp files
Remove-Item -Recurse -Force "$env:USERPROFILE\Downloads\scms-starter-kit"What this does:
- Detects your current directory as the project root
- Creates
docs/scms/,docs/templates/,rules/there - Copies only templates (not the entire repo!)
- Initializes INDEX.md, WORKSPACE_RULES.md, etc.
β Simplest approach - 2 steps and you're running!
β οΈ ReplaceMY-PROJECT-NAMEwith your actual project name (e.g.,star-merchant-2d,my-game, etc.)
Unix/Mac/Linux:
Step 1: Clone and enter directory
git clone https://github.com/AIalchemistART/scms-starter-kit.git MY-PROJECT-NAME && cd MY-PROJECT-NAMEStep 2: Configure (2-3 min, interactive)
./scripts/setup.shβ Setup automatically installs dependencies and launches the dashboard!
π Relaunch Dashboard Later (if you close it):
npm run dashboard:appWindows (PowerShell):
Step 1: Clone and enter directory
git clone https://github.com/AIalchemistART/scms-starter-kit.git MY-PROJECT-NAME; cd MY-PROJECT-NAMEStep 2: Configure (2-3 min, interactive)
.\scripts\setup.ps1β Setup automatically installs dependencies and launches the dashboard!
π Relaunch Dashboard Later (if you close it):
npm run dashboard:appπ‘ What setup does: Detects your OS/IDE, asks about project phase (greenfield/mature), configures thresholds. Takes 2-3 minutes, only needed once.
Or Download ZIP:
# Windows
Invoke-WebRequest -Uri "https://github.com/AIalchemistART/scms-starter-kit/archive/refs/heads/master.zip" -OutFile "scms.zip"
Expand-Archive -Path "scms.zip" -DestinationPath "./"
Rename-Item -Path "scms-starter-kit-master" -NewName "your-project-name"
cd your-project-name
Remove-Item "../scms.zip"
.\scripts\setup.ps1 # Configure
npm install
npm run dashboard:app# Unix/Mac
curl -L https://github.com/AIalchemistART/scms-starter-kit/archive/refs/heads/master.zip -o scms.zip
unzip scms.zip
mv scms-starter-kit-master your-project-name
cd your-project-name
rm ../scms.zip
./scripts/setup.sh # Configure
npm install
npm run dashboard:appChoose your AI assistant:
- Windsurf: See config/windsurf/SETUP.md
- Cursor: See config/cursor/SETUP.md
- Other: See config/generic/SETUP.md
β Auto-Validation Built In: The dashboard automatically checks if setup was run. If not, you'll get clear instructions. No silent failures!
π― THE DASHBOARD IS YOUR GO-TO SOURCE FOR:
- β Session Start Prompt (v3.0) - Copy-paste ready, updated with latest workflow
- β Validation Commit Layer Prompt - Complete 7-step optimization loop (also called "Session Closure")
- β Real-Time Cost Tracking - Live token usage and savings calculations
- β Enhanced Economic Analytics - Margin transformation, ROI over time, economic signature
- β Platform Economics - Scale projections for 10K-100K users
- β Complete Instructions - All workflow steps in one place
π‘ Pro Tip: Keep the dashboard open during development as your SCMS reference guide!
π How to Launch the Dashboard:
Method 1: Electron App with Integrated Tracking (Recommended)
npm run dashboard:app- β All-in-one solution (monitoring + dashboard)
- β Real-time tracking (auto-refresh)
- β Visual interface with charts
- β Session controls (start/stop buttons)
Method 2: Browser-Based (Fallback)
- Open
docs/tools/scms-dashboard.htmlin your browser - Use when Electron not available
- Requires manual monitoring setup
Method 3: Quick CLI Check
npm run dashboard- Terminal output for quick status checks
- No real-time tracking
Method 4: Terminal Dashboard (Between Sessions)
npm run dashboard
# Quick CLI view of costs, patterns, ROI without opening browserπ― Automated Token Tracking (NEW!)
The checkpoint monitor automatically captures your Cascade AI token usage:
# First time only: Install dependencies
npm install
# Start monitor (if not using automated launcher)
npm run checkpoint:monitorHow it works:
- Monitor watches clipboard for Cascade checkpoint data
- Copy conversation anytime (Ctrl+A, Ctrl+C) to capture tokens
- Auto-parses costs, patterns, and updates dashboard
- Dashboard auto-refreshes every 5 seconds with live data!
Complete Workflow:
- Start:
npm run dashboard:app - Click "Start SCMS Session" in dashboard
- Click "Export Data" when finished
- Paste prompt in Windsurf (Ctrl+V) - AI creates checkpoint automatically!
- Watch dashboard update with live token costs β¨
- Click "End Session" when done
- Click "Export Data" for analysis
π View Results Anytime:
# Terminal Dashboard - Beautiful CLI display
npm run dashboard
# Shows: session costs, SCMS vs baseline comparison,
# top patterns with ROI, savings toward 30-45% targetKey Advantage: Algorithmic validation transforms economic claims from estimates to measurable facts! π
β Complete Checkpoint Tracking Guide
SCMS builds automatically as you work with your AI assistant!
You: "Implement feature X"
AI: [implements + auto-documents in L0]
You: [test and report results]
AI: [validates and promotes when pattern reused]
The Validation Commit Layer is essential for SCMS long-term success!
π Terminology Note: In academic literature, this is called the "Validation Commit Layer" (emphasizing its role as a mandatory architectural component). In practical workflows, we call it "Session Closure" for simplicity.
π GET THE LATEST PROMPTS: Launch the SCMS Dashboard App (
npm run dashboard:app)
All session prompts are copy-paste ready in the dashboard UI (v3.0)
Quick Version (see dashboard for full details):
You: "SCMS SESSION CLOSURE - CRITICAL SYSTEM UPDATE
Great work on this feature! Now let's close the SCMS optimization loop:
1. PATTERN REFLECTION & VALIDATION
- FAILURES FIRST (3-10Γ more informative than successes)
2. L0/L1 VALIDATION PIPELINE UPDATE (threshold: 2+ uses)
3. INDEX & CROSS-REFERENCE MAINTENANCE (NOT visual diagrams)
4. MEMORY DASHBOARD UPDATE (Cascade persistent memory)
5. ECONOMIC DASHBOARD UPDATE (cost/savings/ROI)
6. ORGANIZATIONAL FRAMING MAINTENANCE (L0/L1/Dashboard boundaries)
7. SYSTEM OPTIMIZATION (health status & compliance)
This ensures SCMS continues optimizing and compounding value over time."
AI: [reflects on session, updates L0/L1 pipeline, refreshes dashboards, promotes patterns]
Without session closure, SCMS degrades into passive documentation instead of active continual learning.
β Complete Session Closure Guide | Dashboard (Latest Prompts)
- Novel patterns captured as L0 memories immediately
- Marked as CANDIDATE until validated through testing
- No manual "remember to document" steps needed
- Patterns validated through repeated use (not guessing)
- Use count β₯2 β Promote to L1 (quick reference)
- Use count β₯5 β Create L2 SOP (detailed procedure)
- Complete examples β L3 case studies
- AI maintains its own knowledge base
- Documentation updates automatically after implementations
- System learns from every development cycle
- Works with Windsurf (native memories)
- Works with Cursor (.cursorrules)
- Works with any AI assistant (file-based)
docs/
βββ 00_DOCUMENTATION_HIERARCHY.md # How the system works
βββ WORKSPACE_RULES.md # L1: Quick reference patterns
βββ memories/ # L0: Active validation candidates
βββ sops/ # L2: Detailed procedures
βββ case-studies/ # L3: Complete examples
| Layer | Purpose | Update Trigger | Examples |
|---|---|---|---|
| L0 | Validation candidates | Every implementation | "Multi-key QTE pattern" |
| L1 | Quick reference | β₯2 uses (validated) | WORKSPACE_RULES.md |
| L2 | Detailed procedures | β₯5 uses (standard) | Save system SOP |
| L3 | Complete examples | Milestone features | Multi-sequence QTE case study |
| L4 | Historical record | Session/sprint end | Session summaries |
Problem: Complex Quick Time Event (QTE) system with pause/resume, multi-sequence patterns, fail states.
Without SCMS (Month 1):
- Re-discovered pause safety pattern 8 times (~24 min each)
- Documentation lagged weeks behind code
- Edge cases lost between sessions
With SCMS (Months 2-4):
- Pattern captured once, auto-retrieved on subsequent uses (<2 min)
- Documentation updated within hours (recursive mode)
- Edge cases preserved in memories, promoted to WORKSPACE_RULES
Result: 127 implementation cycles completed with 91% time savings and zero documentation debt.
v1.3 Research Finding: SCMS delivers differentiated benefits based on project characteristics and context freshness.
Best suited for:
- Stale context recovery: Picking up old projects after weeks/months of inactivity
- Long-horizon projects: Multi-month or multi-year development with iterative pattern discovery
- Complex evolving codebases: Numerous edge cases, architectural patterns, and domain-specific knowledge
- Knowledge-intensive work: Research projects, complex software systems, technical content creation
- Collaborative environments: Teams sharing context and patterns across members
Why it excels: SCMS's dual validation pipeline (L0 test + L1 enforce) prevents catastrophic forgetting when context has decayedβthe 96% time reduction in stale-context scenarios validates this.
Well suited for:
- Established codebases: Ongoing development with moderate pattern reuse
- Projects with session gaps: Regular breaks between work periods (days/weeks)
- Team knowledge sharing: Context continuity across developers
- Iterative feature development: Building on accumulated patterns
Why it helps: Continuous validation prevents re-discovery of known patterns and maintains knowledge continuity.
Still beneficial, but less critical:
- Greenfield projects: Starting from scratch with fresh context (though still helps establish patterns)
- Short-term tasks: Projects under 1 month duration with limited pattern accumulation
- Well-documented domains: Areas with comprehensive existing documentation
- Static workflows: Patterns that don't evolve significantly over time
Why it's less critical: Fresh context and short timelines reduce the impact of forgetting; benefits still present but magnitude is lower.
- Throwaway scripts: One-off automation with no reuse
- Purely preference-based memory: Personal facts, communication style (use standard AI memory for this)
- Compliance/audit requirements: Legal or regulatory documentation (use dedicated systems)
Is SCMS required or optional?
Research Answer (v1.3): SCMS is practically necessary for real-world projects under realistic constraints:
- Growing knowledge (K β β) + Fixed resources (C bounded) β Dense alternatives provably fail (O(KΒ²) interference)
- Temporal decay (context goes stale) β Without validation infrastructure, patterns are repeatedly re-discovered
- Continual learning pressure β Standard documentation can't keep pace with discovery
But: In edge cases (unlimited resources, static knowledge, no temporal decay), simpler approaches may sufficeβthough such edge cases rarely exist in practice.
Practical Guidance: If your project lasts >1 month with iterative pattern discovery, SCMS transitions from "nice to have" to "structural necessity."
- AI assistant with context/memory support (Windsurf, Cursor, Claude, ChatGPT, etc.)
- Text editor
- Git (recommended for version control)
- AI assistant with native memory system (Windsurf Cascade)
- Project using version control (git)
- Development environment with testing capability
- Read How SCMS Works
- Follow Setup Guide
- Review Examples
- Start with conservative strategy (validate before documenting)
- Enable Recursive Documentation
- Documentation updates automatically after implementations
- Evaluate results after 15+ implementations
SCMS is based on published research from the Labyrinth Protocol project:
π SCMS (Empirical) - v2.0
Sparse Contextual Memory Scaffolding: A User-Facing Architecture for Continual Learning in AI-Assisted Development Workflows
π SSRN Pre-print: papers.ssrn.com/abstract=5656271
Introduces the dual validation pipeline architecture where Layer 0 (destructive validation) tests patterns through natural selection and Layer 1 (stable validation) enforces proven patterns through deterministic loading. This transforms AI memory from passive storage into active quality control infrastructure.
v2.0 Additions: Google Titans/MIRAS validation (Dec 2025) - Three-layer memory architecture and forgetting mechanisms validated as essential. Competitors using flat vector databases now architecturally deficient per Google's research.
Key Results:
- 91% reduction in pattern re-discovery time
- 94% knowledge retention vs 37% baseline
- 96% time reduction in stale-context scenarios
- Documentation lag: 11.5 days β 4 hours
- Validated over 4 months, 127 implementation cycles
π Paradigm Shift (Design) - v2.1
Paradigm Shift in AI Memory: From Preference Storage to Continual Learning
Documents the emergent paradigm shift from AI memories as "digital filing cabinets" to dual validation infrastructure (L0 test + L1 enforce). Fewer than 1% of users have discovered this pattern.
v2.1 Additions: Google Titans/MIRAS validation (Dec 2025) - Validates paradigm shift from "save everything" to layered validation is architecturally necessary.
Includes comparative analysis across six dimensions, five design principles for validation-oriented systems, and multi-domain validation (research, content creation, data analysis, education).
π Mixture of Memories (Theory) - v2.1
Mixture of Memories: A Unified Framework for Sparse Activation Across Abstraction Levels
Proves that sparse selective activation is not merely an optimization but a structural necessity for continual learning at scale.
v2.1 Additions: Google Titans/MIRAS validation (Dec 2025) - Titans validates MoM's isomorphism between memory routing and MoE gating. MIRAS confirms impossibility theorems for dense alternatives.
Establishes formal mathematical framework proving structural isomorphism between SCMS dual validation pipeline (L0+L1) and Mixture of Experts architectures. Demonstrates sparse selective activation as a universal pattern from biological neurons to organizational systems.
π Economics of Continual Learning - v1.4
The Economics of Continual Learning: How SCMS Transforms AI Development Costs
Demonstrates that SCMS creates 30-45% cost reduction in AI interactions through retrieval-over-generation optimization. Using real-world development data (127 cycles), shows SCMS transforms heavy users from sustainable customers.
v1.4 Additions: Google Titans/MIRAS validation (Dec 2025) - Deep memory more efficient at scale; forgetting mechanisms prevent memory overflow.
Key Economic Findings:
- Individual developers: $200-400 annual savings (conservative)
- Platform providers: $2-3.5M annual savings potential
- Response efficiency: 2-3Γ faster through retrieval vs generation
- Quality improvement: Validated patterns eliminate hallucination
π HUMANE (Alignment) - v1.1
HUMANE: Human-like Understanding through Memory, Alignment, and Negative Encoding
Extends SCMS principles to AI alignment through severity-aware failure memory. Introduces the dual function of emotional processing (reward signal AND retrieval trigger) and the objective/subjective verification distinction that explains AI's "jagged" performance.
v1.1 Additions: Google Titans/MIRAS validation (Dec 2025) - "Surprise metric" mirrors severity encoding; retention gates validate severity-based retention.
Key Contributions:
- Theoretical reframing: Emotions as retrieval triggers, not just value functions
- The Puzzle vs Socks framework: Why AI excels at objective but fails at subjective tasks
- Four-layer HUMANE implementation stack with compounding benefits
- SCMS as proof-of-concept showing 2.8Γ completion rate improvement
Validated by Ilya Sutskever (Nov 2025) and Google Titans/MIRAS (Dec 2025).
Authors: Matthew S. Walker, Claude (Anthropic)
Full papers: SCMS on SSRN β’ Additional papers coming soon
- Documentation: Full docs in docs/
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Examples: See docs/examples/
We welcome contributions! See CONTRIBUTING.md for:
- Bug reports
- Feature requests
- Documentation improvements
- IDE integrations
- Success stories
Code & Scripts: MIT License
Documentation: CC-BY 4.0
Free to use in commercial and open-source projects. Attribution appreciated!
Yes! SCMS works with any AI assistant:
- Best: Windsurf (native memory support)
- Great: Cursor (.cursorrules integration)
- Good: Any AI with file access (file-based memories)
No! SCMS is a documentation system only. It doesn't modify your codebase.
~15-30 minutes for initial setup. Then it runs automatically.
Perfect timing! SCMS works best from day one, building your knowledge base as you develop.
Also great! Document your existing patterns as L1 entries, then SCMS maintains them going forward.
Yes! Multiple developers can share the same SCMS corpus. Patterns discovered by one developer benefit the entire team.
No! While validated in software development, SCMS works for any knowledge work:
- Content creation
- Research projects
- Documentation writing
- Data analysis workflows
git pull origin master
npm run dashboard:app # Test that everything worksβ
Your data is safe! All session data is protected by .gitignore.
# 1. Backup your data
cp economics-dashboard-data.json economics-dashboard-data.backup.json
# 2. Download new version, extract to new folder
# 3. Copy your data back
cp economics-dashboard-data.backup.json new-folder/economics-dashboard-data.json
# 4. Test
cd new-folder && npm run dashboard:appWhat Gets Updated:
- β Dashboard features & bug fixes
- β Documentation & guides
- β L1 validated patterns
What's Protected:
- π Your session data (
economics-dashboard-data.json) - π Your checkpoints (
checkpoints/) - π Your customizations (
WORKSPACE_RULES.custom.md)
β Complete Update Guide - Troubleshooting & version history
scms-starter-kit/
βββ docs/
β βββ scms/ # π― SCMS operational files (empty templates)
β β βββ INDEX.md # β
Use this for your project
β β βββ FAILURES.md
β β βββ ...
β βββ templates/ # π Copy these to create new files
β βββ guides/ # π How-to documentation
β βββ reference/ # π¬ Whitepapers & research
β βββ tools/ # π οΈ Dashboard & utilities
βββ examples/
β βββ dogfood/ # π‘ Real SCMS files from building this kit
β βββ INDEX.md # Example of mature SCMS project
β βββ FAILURES.md
β βββ README.md # Don't copy these - use templates!
βββ scripts/
β βββ setup.ps1 # π Initializes SCMS for your project
βββ README.md # You are here
Important: examples/dogfood/ contains real files from developing the starter kit itself (dogfooding). They're examples to show what SCMS looks like in actionβdon't copy them directly. Use docs/templates/ and run scripts/setup.ps1 to initialize fresh files for your project.
- Setup Guide - Detailed installation
- Documentation Hierarchy - How it works
- Examples - Real patterns from Labyrinth Protocol
- Workflows - Operational guides
- Templates - Ready-to-use templates
If you use SCMS in your research or project, please cite:
@misc{walker2025scms,
title={Sparse Contextual Memory Scaffolding: A User-Facing Architecture for Continual Learning in AI-Assisted Development Workflows},
author={Walker, Matthew S. and Claude (Anthropic)},
year={2025},
publisher={SSRN},
note={SSRN preprint},
url={https://papers.ssrn.com/sol3/papers.cfm?abstract_id=5656271}
}Get Started: SETUP.md | Learn More: Whitepaper | See Examples: docs/examples/
Built with β€οΈ by the Labyrinth Protocol team β’ Validated over 4 months of real development β’ Open source and free to use
