Inspiration
The traditional AI-assisted development workflow frustrated me: every session started with lost context, patterns had to be rediscovered or re-explained, & solutions didn't compound over time. Meanwhile, I wanted to create a cinematic cyberpunk experience where choices felt visceral, not just narrative, but physical & immediate through precision timing.
ARIA-404: Labyrinth Protocol was born from two questions:
- Can we make narrative choices feel like reflex-based gameplay with current generative AI tools?
- Can AI truly learn from a codebase instead of just generating code?
The game became the perfect testbed for SCMS (Sparse Contextual Memory Scaffolding), a continual learning framework I developed to help solve AI's catastrophic forgetting problem.
What it does
ARIA-404: Labyrinth Protocol is a cinematic cyberpunk narrative experience where players navigate a dystopian digital maze as ARIA-404, making split-second decisions through precision Quick Time Events (QTEs) where every mistake has consequences, unique failure sequences that demand perfect execution to progress.
Gameplay Innovation:
- Freeze-frame decision points within near-seamlessly integrated video sequences
- Dual-key QTE systems requiring exact timing (±50ms tolerance windows)
- Linear narrative with high-stakes fail states: Each mistake leads to unique failure videos; success is the only path forward
- Precision-based progression: Perfect execution required, creating tension through mechanical challenge.
- Cinematic immersion: Full-motion video with interactive overlays & minimal breaks in visual flow
The result is part interactive film, part reflex-based thriller, part timing puzzle, for players who want their execution to feel both visceral & consequential.
The Development Innovation: This is the first game built using SCMS, a novel AI continual learning framework that treats memory as an active validation pipeline, enabling the AI to learn & improve across development sessions.
How I built it
Technical Stack:
- Engine: Electron + Phaser 3 for cross-platform deployment
- Video Pipeline: FFmpeg with CRF 35 encoding & 64k audio bitrate for web optimization
- Development Framework: SCMS (Sparse Contextual Memory Scaffolding)
- Timeline: 5 months, solo developer + AI pair programming
SCMS Architecture:
SCMS implements a dual validation pipeline with temporal memory layers that transform AI from a code generator into a learning partner:
- L0 (Foundation): Probabilistic pattern testing via semantic retrieval + temporal decay
- L1 (Implementation): Deterministic validation—patterns promoted after $n \geq 2$ successful uses
- L2-L5 (Reference): SOPs, case studies, global rules, & overflow documentation
Key Innovation: Failure documentation is prioritized (3-10× more informative than successes), creating a constraint-based learning system that prevents entire classes of recurring bugs & code misallocation to previously solved problems.
Economic Model:
$$ \text{Cost}{\text{SCMS}} = \alpha \cdot \text{Cost}{\text{retrieval}} + (1-\alpha) \cdot \text{Cost}_{\text{generation}} $$
Where $\alpha$ is the retrieval ratio. At $\alpha = 0.35$:
$$ \text{Savings} = 1 - \frac{\$0.0081}{\$0.012} = 32.5\% $$
Achieved: 30-45% cost reduction with zero technical debt.
Challenges I ran into
1. Catastrophic Forgetting in AI-Assisted Development (The Core Challenge) The critical challenge that inspired SCMS: After a project hiatus, AI context went stale. Implementing the 6th QTE + video wiring integration took 2 full days of re-explaining patterns, re-discovering edge cases, & re-integrating components, work we'd already done 5 times before.
The Breaking Point: Similar patterns (QTE implementation, video wiring, state management) required complete re-explanation every time context aged, despite being identical to previous implementations. The AI had little context memory remaining; each session started from near zero.
Solution: Created SCMS. The 7th iteration (same pattern, with SCMS) took 30 minutes, a 96% time reduction. Not only did it retrieve the pattern, but it integrated three previously-separate concerns (QTE logic, video wiring, multi-branch capability) in a single pass with <10 refinement cycles.
2. Pattern Re-Discovery Becoming the Bottleneck As the codebase grew, more time was spent re-explaining existing patterns than building new features. Early iterations showed 40%+ of each session consumed by pattern re-discovery. Without a memory system, AI couldn't compound knowledge; every solution was regenerated from scratch.
Solution: SCMS validation pipeline with L0→L1 promotion. Patterns used 2+ times promote to deterministic retrieval, eliminating re-discovery overhead. Achieved 35%+ retrieval ratio, turning regeneration cost into retrieval savings.
3. Integration Complexity in Video-Based Gameplay QTE systems, video sequencing, & state management each had different edge cases. The traditional approach required implementing each separately over multiple sessions, then debugging integration issues. Each combination had unique timing requirements, fail state routing, & visual feedback needs.
Solution: SCMS pattern composition. Instead of three separate implementations, documented patterns combine automatically. The framework learned not just individual patterns, but how they integrate, capturing the "glue code" that traditional AI-assisted development misses.
4. Technical Debt from Repeated Mistakes Without failure documentation, the same bugs recurred across different QTE sequences: 100% gauge release edge cases, auto-fail timing windows, & pause-safety issues. Each bug was fixed locally, but failed patterns weren't extracted, leading to 4+ repeat occurrences.
Solution: Failure Documentation Pyramid in SCMS. Bug patterns documented at L0 prevent entire classes of errors. Anti-patterns (like "auto-fail at 100% breaks timing windows") became reusable constraints that AI checked automatically, reducing bug rediscovery by 75%+.
Accomplishments that I'm proud of
The Game:
- ✅ Near seamless freeze-frame QTE system with ±50ms timing precision
- ✅ Linear narrative with 20+ video sequences, including unique failure cinematics for each mistake
- ✅ Successfully deployed to both itch.io (web) & Steam (desktop)
- ✅ Zero gameplay-breaking bugs in production
The Innovation:
- ✅ Created SCMS: A novel continual learning framework for AI-assisted development
- ✅ Economic Improvements: Possible 30-45% cost reduction with measurable ROI
- ✅ 120+ AI sessions with compounding knowledge retention (zero catastrophic forgetting)
- ✅ Pattern library: 26 active patterns (18 validated, 17 promoted to quality gates), extensive anti-pattern & bug pattern documentation
- ✅ Independent validation: Google Research "Nested Learning" (NeurIPS 2025) independently validated SCMS multi-time-scale architecture; I published first (6 days prior) with a reproducible system
- ✅ Real-world validation:
- Video compression pattern used 8×
- QTE timing bugs prevented 4× through anti-pattern documentation
- Asset path resolution fixed at root, preventing 12+ downstream issues
- ✅ Open research: SCMS Starter Kit available on GitHub for reproducibility, unlike purely theoretical papers, SCMS is immediately testable
Most Proud Of: This project proves AI can be a true creative partner with continuous memory, not just a code generator with severe context-related constraints. Every bug documented, every pattern validated, every solution learned becomes a permanent asset that compounds over time.
What I learned
Technical Learnings:
- Failure documentation is 3-10× more valuable than success documentation. Documenting what didn't work prevents entire classes of bugs & saves exponentially more time than just documenting what did work.
- Constraint-based learning scales better than example-based learning. Teaching AI what NOT to do creates more robust systems than showing it what TO do.
- Temporal memory layers prevent catastrophic forgetting. Separating rare updates (L0) from medium (L1) from frequent (Dashboard) mirrors how human expertise develops.
Process Learnings:
- AI pair programming works when AI has memory. Without SCMS, I'd spend 40% of each session re-explaining patterns. With it, retrieval replaced regeneration.
- Economic validation is critical. Tracking every token, every pattern reuse, every cost saved turned SCMS from an interesting idea into a proven framework with measurable ROI.
- The obstacles become the innovations. Hit context limits? Create SCMS. Browser autoplay restrictions? Better UX. File size limits? Reusable compression patterns. Every constraint taught something valuable.
Meta Learning: The biggest lesson: This project isn't just a game, it's a proof of concept that continual learning in AI-assisted development is procedurally & economically transformative. We can move beyond "AI as code generator" to "AI as learning partner."
The Serendipitous Discovery: SCMS wasn't planned research; it emerged from necessity during development when catastrophic forgetting became a bottleneck. Only after Meta published their "Sparse Memory Fine-Tuning" paper (2025) did I realize I'd independently discovered the same fundamental pattern at the user-interface level of abstraction. What started as a practical workaround turned out to be a universal principle of continual learning.
Validation Timeline:
- Mid-October 2025: SCMS architecture discovered organically through development pain points
- Late-October 2025: Meta's Sparse Memory Fine-Tuning validates sparse activation at model level
- End-October 2025: Published SCMS Whitepapers & Stater Kit on GitHub
- Mid-November 2025: Google's Nested Learning (NeurIPS 2025) validates multi-time-scale architecture
- Result: Three independent discoveries of the same pattern at different abstraction levels (UI, fine-tuning, architecture)
What's next for ARIA-404: Labyrinth Protocol
For the Game:
- Branching narrative system: Add multiple story paths where choices lead to different outcomes (not just fail states)
- Consequence propagation: Early decisions ripple through later scenarios, creating emergent story combinations
- Achievement system: Track player choices & perfect runs across playthroughs
- New Game+ mode: Minimal HUD challenges for QTE precision masters
- Accessibility features: Multi-language support, colorblind modes, alternative input methods
For SCMS:
- Open-source the framework: Make SCMS available for research & community validation
- Academic publication: Submit findings on continual learning economics & failure documentation value
- Developer tools: Create SCMS dashboard & session tracking for other developers
- Cross-project validation: Test SCMS on non-game projects (web apps, data pipelines, etc.)
For the Future:
- Pattern marketplace: Allow developers to share validated patterns & anti-patterns
- AI fine-tuning integration: Use SCMS patterns to fine-tune project-specific AI models
- Economic benchmarking: Establish industry baselines for AI-assisted development costs
The Vision: Transform AI-assisted development from a cost center into a compounding intelligence asset. Every project should make the next one faster, cheaper, & better, not through brute force, but through validated learning that never forgets.
Play Now: https://loose-threads-interactive.itch.io/aria-404-labyrinth-protocol
Created by: Matthew "Manny" Walker
SCMS Framework: https://github.com/AIalchemistART/scms-starter-kit


Log in or sign up for Devpost to join the conversation.