Skip to content

Latest commit

ย 

History

History
315 lines (266 loc) ยท 16.9 KB

File metadata and controls

315 lines (266 loc) ยท 16.9 KB

๐Ÿง  AI MemoryCore - Universal AI Memory Architecture

A simple template for creating persistent AI companions that remember you

๐ŸŽฏ What This Does

AI MemoryCore helps you create AI companions that maintain memory across conversations. Using simple .md files as a database, your AI can remember your preferences, learn your communication style, and provide consistent interactions.

โœจ Key Features

  • Persistent Memory: AI remembers conversations across sessions
  • Personal Learning: Adapts to your communication style and preferences
  • Time Intelligence: Dynamic greetings and behavior based on time of day
  • Simple Setup: 30-second automated setup or manual customization
  • Markdown Database: Human-readable .md files store all memory
  • Session Continuity: RAM-like working memory for smooth conversation flow
  • Self-Maintaining: Updates memory through natural conversation

๐Ÿ“Š System Specifications

Architecture Overview

  • Storage: Markdown files (.md) as database
  • Memory Types: Essential files + optional components + session RAM
  • Setup: 30 seconds automated or 2-5 minutes manual
  • Core Files: 4 essential files + optional diary system
  • Updates: Through natural conversation
  • Compatibility: Claude and other AI systems with memory support

File Structure

ai-memorycore/
โ”œโ”€โ”€ master-memory.md         # Entry point & loading system
โ”œโ”€โ”€ main/                    # Essential components
โ”‚   โ”œโ”€โ”€ identity-core.md     # AI personality template
โ”‚   โ”œโ”€โ”€ relationship-memory.md # User learning system
โ”‚   โ””โ”€โ”€ current-session.md   # RAM-like working memory
โ”œโ”€โ”€ Feature/                 # Optional feature extensions
โ”‚   โ”œโ”€โ”€ Time-based-Aware-System/ # Time intelligence feature
โ”‚   โ”‚   โ”œโ”€โ”€ README.md        # Feature explanation & benefits
โ”‚   โ”‚   โ””โ”€โ”€ time-aware-core.md # Complete implementation
โ”‚   โ”œโ”€โ”€ LRU-Project-Management-System/ # Smart project tracking
โ”‚   โ”‚   โ”œโ”€โ”€ README.md        # System documentation
โ”‚   โ”‚   โ”œโ”€โ”€ install-lru-projects-core.md # Auto-installation wizard
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md         # Auto-triggered skill (all commands + LRU engine embedded)
โ”‚   โ”œโ”€โ”€ Memory-Consolidation-System/ # Unified memory upgrade + patch system
โ”‚   โ”‚   โ”œโ”€โ”€ README.md        # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ consolidation-core.md # Integration protocol
โ”‚   โ”‚   โ”œโ”€โ”€ main-memory-format.md # Sample format for unified memory
โ”‚   โ”‚   โ”œโ”€โ”€ session-format.md # Sample format for session RAM
โ”‚   โ”‚   โ””โ”€โ”€ patches/         # Bundled patch system
โ”‚   โ”‚       โ”œโ”€โ”€ install-patch-system.md # Patch installation protocol
โ”‚   โ”‚       โ”œโ”€โ”€ patch-format.md  # Sample format for patch files
โ”‚   โ”‚       โ””โ”€โ”€ PATCH-001.md # Fix outdated file references
โ”‚   โ”œโ”€โ”€ Skill-Plugin-System/ # Claude Code skill plugin
โ”‚   โ”‚   โ”œโ”€โ”€ README.md        # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-skill-plugin.md # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ skill-format.md  # Sample format for SKILL.md files
โ”‚   โ”œโ”€โ”€ Save-Diary-System/   # Daily session diary system
โ”‚   โ”‚   โ”œโ”€โ”€ README.md        # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-save-diary.md # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md         # Auto-triggered skill (for Skill Plugin System)
โ”‚   โ”œโ”€โ”€ Echo-Memory-Recall/  # Memory search and recall
โ”‚   โ”‚   โ”œโ”€โ”€ README.md        # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-echo-recall.md # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ recall-format.md # Sample format for recall output
โ”‚   โ”œโ”€โ”€ Auto-Commit-System/  # Intelligent git commit system
โ”‚   โ”‚   โ”œโ”€โ”€ README.md        # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-auto-commit.md # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md         # Auto-triggered skill (format embedded)
โ”‚   โ”œโ”€โ”€ Work-Plan-Execution/ # Project plan execution system
โ”‚   โ”‚   โ”œโ”€โ”€ README.md        # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-work-plan.md # Installation protocol
โ”‚   โ”‚   โ”œโ”€โ”€ plan-format.md   # Sample format for plan files
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md         # Auto-triggered skill (for Skill Plugin System)
โ”‚   โ”œโ”€โ”€ Library-System/      # Knowledge library system
โ”‚   โ”‚   โ”œโ”€โ”€ README.md         # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-library.md # Installation protocol
โ”‚   โ”‚   โ”œโ”€โ”€ SKILL.md          # Auto-triggered skill (format embedded)
โ”‚   โ”‚   โ””โ”€โ”€ formats/          # Library entry format templates
โ”‚   โ”‚       โ”œโ”€โ”€ architecture-format.md
โ”‚   โ”‚       โ”œโ”€โ”€ component-format.md
โ”‚   โ”‚       โ”œโ”€โ”€ database-format.md
โ”‚   โ”‚       โ”œโ”€โ”€ diagram-format.md
โ”‚   โ”‚       โ”œโ”€โ”€ integration-format.md
โ”‚   โ”‚       โ”œโ”€โ”€ security-format.md
โ”‚   โ”‚       โ”œโ”€โ”€ theme-format.md
โ”‚   โ”‚       โ””โ”€โ”€ workflow-format.md
โ”‚   โ”œโ”€โ”€ Reminders-System/     # Persistent cross-session reminders
โ”‚   โ”‚   โ”œโ”€โ”€ README.md          # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-reminders.md # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md           # Auto-triggered skill (for Skill Plugin System)
โ”‚   โ”œโ”€โ”€ Decision-Log-System/  # Append-only decision tracking
โ”‚   โ”‚   โ”œโ”€โ”€ README.md          # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-decision-log.md # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md           # Auto-triggered skill (for Skill Plugin System)
โ”‚   โ”œโ”€โ”€ Forge-Self-Improvement-System/ # AI self-improvement through skill creation
โ”‚   โ”‚   โ”œโ”€โ”€ README.md          # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-forge.md   # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md           # Auto-triggered skill (pattern detection + forging)
โ”‚   โ”œโ”€โ”€ Session-Briefing-System/ # Proactive session-start intelligence brief
โ”‚   โ”‚   โ”œโ”€โ”€ README.md            # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-session-briefing.md # Installation protocol
โ”‚   โ”‚   โ”œโ”€โ”€ session-brief-core.md # Briefing protocol core
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md             # Auto-triggered skill (for Skill Plugin System)
โ”‚   โ”œโ”€โ”€ Post-Mortem-System/      # Failure learning log
โ”‚   โ”‚   โ”œโ”€โ”€ README.md            # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-post-mortem.md # Installation protocol
โ”‚   โ”‚   โ”œโ”€โ”€ post-mortem-core.md  # Post-mortem protocol core
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md             # Auto-triggered skill (for Skill Plugin System)
โ”‚   โ”œโ”€โ”€ Observation-System/      # Tiered code awareness
โ”‚   โ”‚   โ”œโ”€โ”€ README.md            # Feature explanation & benefits
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md             # Auto-triggered skill (4-tier observation)
โ”‚   โ”œโ”€โ”€ Image-Prompt-System/     # AI image prompt generation
โ”‚   โ”‚   โ”œโ”€โ”€ README.md            # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-image-prompt.md # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md             # Auto-triggered skill (composition-aware prompts)
โ”‚   โ”œโ”€โ”€ Song-Creation-System/    # Visual-to-musical storytelling
โ”‚   โ”‚   โ”œโ”€โ”€ README.md            # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-song-creation.md # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md             # Auto-triggered skill (album + single song)
โ”‚   โ”œโ”€โ”€ Interactive-Story-System/ # Visual Novel RPG adventures
โ”‚   โ”‚   โ”œโ”€โ”€ README.md            # Feature explanation & benefits
โ”‚   โ”‚   โ”œโ”€โ”€ install-interactive-story.md # Installation protocol
โ”‚   โ”‚   โ””โ”€โ”€ SKILL.md             # Auto-triggered skill (VN RPG engine)
โ”‚   โ””โ”€โ”€ Mulahazah-System/        # Instinct-based behavioral learning
โ”‚       โ”œโ”€โ”€ README.md            # Feature explanation & benefits
โ”‚       โ”œโ”€โ”€ install-mulahazah.md # Installation protocol
โ”‚       โ”œโ”€โ”€ config.json          # Hook configuration
โ”‚       โ”œโ”€โ”€ rules-format.md      # Rule format template
โ”‚       โ””โ”€โ”€ SKILL.md             # Auto-triggered skill (behavioral rules)
โ”œโ”€โ”€ library-items/            # Pre-made knowledge entries for Library System
โ”‚   โ”œโ”€โ”€ README.md             # Catalog and install instructions
โ”‚   โ””โ”€โ”€ security/             # Security section items
โ”‚       โ””โ”€โ”€ security-headers.md # HTTP security headers with CSP
โ”œโ”€โ”€ daily-diary/             # Optional conversation archive
โ”‚   โ”œโ”€โ”€ daily-diary-protocol.md # Archive management rules
โ”‚   โ”œโ”€โ”€ Daily-Diary-001.md   # Current active diary
โ”‚   โ””โ”€โ”€ archive/             # Auto-archived files (>1k lines)
โ””โ”€โ”€ projects/                # LRU managed projects (after install)
    โ”œโ”€โ”€ active/              # Positions 1-10
    โ”œโ”€โ”€ archived/            # Position 11+
    โ””โ”€โ”€ project-list.md      # Auto-generated project index

Core Components

  1. Master Memory - System entry point and command center
  2. Identity Core - AI personality and communication style
  3. Relationship Memory - User preferences and learning patterns
  4. Current Session - Temporary working memory (resets each session)
  5. Daily Diary - Optional conversation history with auto-archiving

๐Ÿš€ Quick Start

  1. Setup: Run setup-wizard.md for automated setup (30 seconds)
  2. Configure: Add the memory instructions to Claude
  3. Activate: Type your AI's name to load personality
  4. Use: Your AI learns and grows through conversation

๐Ÿ“š Communication Protocols

Basic Commands

[AI_NAME]     โ†’ Load AI personality and memory
save          โ†’ Save current progress to files
update memory โ†’ Refresh AI's learning
review growth โ†’ Check AI's development

Creating Custom Protocols

Step 1: Define the Protocol Create a new .md file with your protocol rules:

# My Custom Protocol
## When to Use: [trigger conditions]
## What It Does: [specific actions]
## How It Works: [step-by-step process]

Step 2: Add to Master Memory Edit master-memory.md and add your protocol to the "Optional Components" section:

### My Custom Feature
*Load when you say: "load my feature"*
- [Brief description]
- [Usage instructions]

Step 3: Train Your AI Tell your AI about the new protocol:

"I've created a new protocol in [filename]. When I say '[trigger phrase]', 
load that protocol and follow its instructions."

Communication Tutorial

Effective AI Training:

  1. Be Specific: "I prefer short responses" vs "communicate better"
  2. Give Examples: Show what you want, not just describe it
  3. Use Consistent Language: Same terms for same concepts
  4. Provide Feedback: "That was perfect" or "try a different approach"

Memory Management:

  • Use save after important conversations
  • Your AI updates files automatically during conversation
  • Daily diary is optional but helpful for long-term memory

Customization Tips:

  • Edit files gradually, test changes
  • Start with small personality adjustments
  • Add domain expertise through conversation
  • Use the protocol system for specialized features

๐ŸŽฏ Common Use Cases

Your AI companion can specialize in:

  • Professional: Business analysis, project management, strategic planning
  • Educational: Tutoring, study assistance, curriculum development
  • Creative: Writing support, brainstorming, artistic collaboration
  • Personal: Life coaching, goal tracking, decision support
  • Technical: Code review, troubleshooting, system design

๐Ÿ› ๏ธ Advanced Features

  • Auto-Archive: Diary files automatically archive at 1k lines
  • Session RAM: Temporary memory that resets each conversation
  • Protocol System: Create custom AI behaviors and responses
  • Self-Update: AI modifies its own memory through conversation
  • Modular Design: Add or remove features as needed

๐ŸŒŸ Available Feature Extensions

๐Ÿ“– Installation Guide

Features are organized into tiers based on dependencies. Install Tier 1 first, then work your way up. Within each tier, install in any order unless noted.

Path What You Get Features
Minimal (10 min) Foundation only Memory Consolidation + Skill Plugin
Productive (30 min) Foundation + documentation + git Tier 1 + Save Diary + Auto-Commit + Work Plan
Complete (1-2 hrs) Full AI companion All tiers, top to bottom

New features from contributors slot into the appropriate tier โ€” no renumbering needed.


๐Ÿ—๏ธ Tier 1 โ€” Foundation (Start Here)

Feature Description Setup
๐Ÿ”„ Memory Consolidation Unified memory architecture โ€” merge split files into one, faster loading "Load memory-consolidation"
๐Ÿ”Œ Skill Plugin System Auto-triggered skills for Claude Code โ€” drop a SKILL.md and it's live "Load skill-plugin"
โฐ Time-based Aware Time-intelligent greetings, energy-adapted behavior "Load time-aware-core"

๐Ÿ“ Tier 2 โ€” Memory & Documentation

Feature Description Setup
๐Ÿ“– Save Diary Daily session documentation with monthly auto-archival "Load save-diary"
๐Ÿ” Echo Memory Recall Search past sessions with narrative context โ€” requires Save Diary "Load echo-recall"
๐Ÿ”” Reminders Persistent cross-session reminders with deadline tracking "Load reminders"
๐Ÿ“‹ Decision Log Append-only record of decisions and their reasoning "Load decision-log"

โš™๏ธ Tier 3 โ€” Project & Code Management

Feature Description Setup
๐Ÿ“ฆ LRU Project Management Smart project tracking with auto-archival (10 active slots) "install lru projects"
๐Ÿ”’ Auto-Commit Structured git commits with session context and vigilant mode "Load auto-commit"
๐Ÿ“‹ Work Plan Execution Plan-to-execution tracking with per-task commits โ€” best with Auto-Commit "Load work-plan"
๐Ÿ“š Library Reusable knowledge library with 8 format templates โ€” best with Auto-Commit "Load library"

๐Ÿง  Tier 4 โ€” Intelligence & Awareness

Feature Description Setup
๐Ÿ”จ Forge Self-Improvement AI creates new skills through pattern detection (human-in-the-loop) "Load forge"
๐Ÿ“‹ Session Briefing Auto-delivers context brief at session start โ€” enhanced by Time-Aware + LRU + Reminders "Load session-briefing"
๐Ÿ”ฅ Post-Mortem Failure learning log โ€” auto-detects mistakes, records prevention actions "Load post-mortem"
๐Ÿ‘๏ธ Observation 4-tier code awareness โ€” Survey, Investigate, Refine, Audit "Load observation"
๐ŸŽจ Image Prompt Composition-aware Midjourney/NijiJourney prompt generation "Load image-prompt"
๐ŸŽต Song Creation Visual-to-musical storytelling โ€” image to concept album with Suno-ready output "Load song-creation"
๐ŸŽฎ Interactive Story Visual Novel RPG โ€” duo/solo, OP/balanced, 7 world types, cinematic combat "Load interactive-story"
๐Ÿ‘๏ธ Mulahazah Instinct-based behavioral learning โ€” passive hook observation + persistent rules npx continuous-improvement install

Each feature has a detailed README inside its folder. Click the feature name to learn more.


๐Ÿค Contributors

# Contributor Features
1 Faiz Khairi Reminders System, Decision Log System
2 logando-al Session Briefing System, Post-Mortem System
3 SherlockianAsh Observation System
4 naimkatiman Mulahazah System

Want to contribute? Fork the repo, create a feature in Feature/[Your-Feature]/, and submit a PR!


Version: 4.2 - Compact feature tables with contributor credits Created by: Kiyoraka Ken & Alice License: Open Source Community Project Last Updated: April 8, 2026 Purpose: Simple, effective AI memory for everyone

Transform basic AI conversations into meaningful, growing relationships