🧠 Memory Triggers Setup Guide

Complete step-by-step instructions for building your exact memory trigger system — From the Ground Up!

Built by Stuart & Jeem • April 2026

📋 Table of Contents

  1. 🎯 The Golden Rule
  2. ⚡ Key Memory Triggers
  3. 🔄 How Each Trigger Works
  4. 🗂️ Our Memory Layers
  5. 📖 Introduction
  6. 🔀 Understanding Dependencies
  7. 🐙 GitHub Setup
  8. 📁 File Structure Setup
  9. 💾 Remember Trigger
  10. 📚 Study Trigger
  11. 🔄 Full Sync Trigger
  12. 🔃 Sync Trigger
  13. 📥 Ingest Trigger
  14. 🚀 Mega Sync Trigger
  15. 🔁 The Auto-Backup System
  16. ✅ Testing Your Setup
  17. ❗ Troubleshooting
  18. 📋 Summary: Complete Trigger List

🎯 THE GOLDEN RULE

If you're going to ask Google or another human, ask YOUR AI AGENT INSTEAD!

The more you ask your AI to DO, the smarter it gets — AND the more YOU learn! 🌟

⚡ Key Memory Triggers

Trigger Say This What It Does
Remember"Remember"Save current conversation to memory + GitHub
Study"Study"Refresh all memory files, USER.md, SOUL.md
Full Sync"Full Sync"Complete system check (files + GitHub)
Sync"Sync"Compare local files with GitHub
Ingest"Ingest"Read GitHub state
Mega Sync"Mega Sync"Full system check (runs Full Sync + Sync + Ingest)

🔄 How Each Trigger Works

Remember

REMEMBER
├── 1. Save Memory - Create/update today's memory file
├── 2. GitHub Backup - Commit all changes
└── 3. Verify - Confirm backup worked

Study

STUDY
├── 1. Read Memory Files - Load all *.md from memory/
├── 2. Read USER.md - Your personal details
├── 3. Read SOUL.md - AI personality
├── 4. Read TRIGGERS_GUIDE.md - All trigger docs
├── 5. Read PROBLEMS_SOLUTIONS.md - Knowledge base
├── 6. Read HEARTBEAT.md - Scheduled tasks
├── 7. Check GitHub - Recent commits
└── 8. Verify - Confirm files loaded

Full Sync

FULL SYNC
├── 1. Check GitHub - Verify git status
├── 2. Check Memory Files - Verify local files
└── 3. Report Status - Present unified status

Mega Sync

MEGA SYNC
├── 1. Full Sync - Complete system health check
├── 2. Sync - Cross-reference local files + GitHub
└── 3. Ingest - Read GitHub state

🗂️ Our Memory Layers

Layer What It Does
Local FilesDaily markdown summaries (memory/*.md)
GitHubVersion control and backup for all files
Permanent DataCore preferences (USER.md, SOUL.md)

Simple, powerful, and no complex setup required!

📖 Introduction

Our memory system is built on six powerful triggers that work together:

Trigger Type Best For
RememberMainSaving important conversations
StudyMainGetting context before a new topic
Full SyncMainQuick health check
SyncDependencyComparing local vs GitHub
IngestDependencyReading GitHub state
Mega SyncSuperComplete system diagnosis

But these triggers aren't magic — they're built from smaller pieces called dependencies. This guide shows you how to build the COMPLETE system from scratch!

🔀 Understanding Dependencies

Remember Dependencies

REMEMBER
├── 1. Save Memory - Create/update today's memory file
├── 2. GitHub Backup - Commit all changes
└── 3. Verify Push - Confirm backup worked

Study Dependencies

STUDY
├── 1. Read Memory Files - Load all *.md from memory/
├── 2. Read USER.md - Your personal details
├── 3. Read SOUL.md - AI personality
├── 4. Read TRIGGERS_GUIDE.md - All trigger docs
├── 5. Read PROBLEMS_SOLUTIONS.md - Knowledge base
├── 6. Read HEARTBEAT.md - Scheduled tasks
├── 7. Check GitHub - Recent commits
└── 8. Verify - Confirm files loaded

Full Sync Dependencies

FULL SYNC
├── 1. Check GitHub - Verify git status
├── 2. Check Memory Files - Verify local files
└── 3. Report Status - Present unified status

Mega Sync Dependencies

MEGA SYNC
├── 1. Full Sync - Complete system health check
├── 2. Sync - Cross-reference local files + GitHub
└── 3. Ingest - Read GitHub state

🐙 GitHub Setup ⭐ (Do This First!)

GitHub is the foundation of our entire memory system. All your files and memories are backed up here. Set this up FIRST!

Step 1: Create Repository

  1. Go to github.com → Sign up/Login
  2. Click "+" → "New repository"
  3. Name: your-ai-backup
  4. Choose Public or Private
  5. Click "Create repository"
  6. Copy the URL (e.g., https://github.com/YOURUSERNAME/your-repo.git)

Step 2: Connect Your Server

git config --global user.name "YourName"
git config --global user.email "[email protected]"
git clone https://github.com/YOURUSERNAME/your-repo.git
cd your-repo

Step 3: Test It Works

echo "test" > test.txt
git add test.txt
git commit -m "Test"
git push

📁 File Structure Setup

Create this exact folder structure in your workspace:

your-workspace/
├── memory/                    # Daily memory files
│   └── YYYY-MM-DD.md         # Auto-created (e.g., 2026-04-22.md)
├── USER.md                   # All about YOU (name, preferences, family)
├── SOUL.md                   # AI's personality & behavior rules
├── PROBLEMS_SOLUTIONS.md     # Your knowledge base
├── HEARTBEAT.md              # Scheduled tasks
├── TRIGGERS_GUIDE.md         # All trigger documentation
├── openclaw.json             # Your AI config
├── downloads/                # Generated files (TTS, PDFs)
└── .git/                     # GitHub backup (hidden)

💾 Remember Trigger - Complete Setup

What It Does

Saves the current conversation to memory and GitHub.

Configuration

### "Remember" Trigger
Anytime you say "remember" (in any context), I will:
1. **SAVE MEMORY** - Create/update today's memory file with conversation summary
2. **GITHUB BACKUP** - Commit all changes and push
3. **VERIFY PUSH** - Confirm backup succeeded (retry if needed)

Code

#!/bin/bash
# Remember Trigger

WORKSPACE="/path/to/your/workspace"
MEMORY_PATH="${WORKSPACE}/memory"
TODAY=$(date +%Y-%m-%d)

# Step 1: Save Memory File
cat > ${MEMORY_PATH}/${TODAY}.md << 'MEMEOF'
# Memory: $(date +%B\ %d,\ %Y)

## Summary of Chat

### Topics Discussed
- [Add your topics here]

### Decisions Made
- [Add decisions here]

### Tasks
- [Add tasks here]

### Tags
#session #topic
MEMEOF

# Step 2: GitHub Backup
cd ${WORKSPACE}
git add memory/ *.md
git commit -m "Memory: $(date +%Y-%m-%d)"
git push -u origin main

# Step 3: Verify Push
git status

Test It

# Test
echo "remember" | ./trigger-remember.sh
# Check: ls memory/ and git log --oneline -1

📚 Study Trigger - Complete Setup

What It Does

Refreshes all memory files and loads USER.md and SOUL.md.

Configuration

### "Study" Trigger
Anytime you say "study" (in any context), I will:
1. **READ MEMORY FILES** - Load all dated files from memory/
2. **READ USER.MD** - Refresh on your personal details
3. **READ SOUL.MD** - Refresh on AI personality
4. **READ TRIGGERS_GUIDE.MD** - Know all available triggers
5. **READ PROBLEMS_SOLUTIONS.MD** - Refresh knowledge base
6. **READ HEARTBEAT.MD** - Check scheduled tasks
7. **CHECK GITHUB** - See recent commits
8. **VERIFY** - Confirm files loaded

Code

#!/bin/bash
# Study Trigger

WORKSPACE="/path/to/your/workspace"
MEMORY_PATH="${WORKSPACE}/memory"

echo "=== Reading Memory Files ==="
ls -la ${MEMORY_PATH}/

echo "=== Reading USER.md ==="
cat ${WORKSPACE}/USER.md

echo "=== Reading SOUL.md ==="
cat ${WORKSPACE}/SOUL.md

echo "=== Reading TRIGGERS_GUIDE.md ==="
cat ${WORKSPACE}/TRIGGERS_GUIDE.md

echo "=== Reading PROBLEMS_SOLUTIONS.md ==="
cat ${WORKSPACE}/PROBLEMS_SOLUTIONS.md

echo "=== Reading HEARTBEAT.md ==="
cat ${WORKSPACE}/HEARTBEAT.md

echo "=== GitHub Recent Commits ==="
cd ${WORKSPACE}
git log --oneline -10

echo "=== Verification ==="
echo "Memory files: $(ls ${MEMORY_PATH}/*.md | wc -l)"

Test It

echo "study" | ./trigger-study.sh

🔄 Full Sync Trigger

This trigger can be called directly or by Mega Sync!

What It Does

Complete system health check - verifies GitHub, local files, and overall status.

Configuration

### "Full Sync" Trigger
Anytime you say "full sync", I will:
1. **CHECK GITHUB** - Verify git status and last commit
2. **CHECK LOCAL** - Verify memory files exist
3. **REPORT STATUS** - Present unified status

Code

#!/bin/bash
# Full Sync Trigger

WORKSPACE="/path/to/your/workspace"

echo "=== Full Sync ==="

cd ${WORKSPACE}

echo "Git Status:"
git status --short

echo "Last Commit:"
git log --oneline -1

echo "Memory Files:"
ls -la memory/ 2>/dev/null || echo "No memory folder"

echo "Config Files:"
ls -la *.md 2>/dev/null | head -5

echo "=== Full Sync Complete ==="

🔃 Sync Trigger

Cross-references local files with GitHub.

What It Does

Compare what's in local files vs what's in GitHub to ensure everything is synced.

Configuration

### "Sync" Trigger
Anytime you say "sync", I will:
1. **LIST LOCAL FILES** - Show what's in workspace
2. **LIST GITHUB** - Show recent commits
3. **CROSS-REFERENCE** - Compare local vs remote
4. **REPORT** - What's synced, what's pending

Code

#!/bin/bash
# Sync Trigger

WORKSPACE="/path/to/your/workspace"

cd ${WORKSPACE}

echo "=== Sync Check ==="

echo "Local changes:"
git status --short

echo "Recent GitHub commits:"
git log --oneline -5

echo "Unpushed commits:"
git log origin/main..HEAD --oneline

echo "=== Sync Complete ==="

📥 Ingest Trigger

Reads the current GitHub state.

What It Does

Analyzes what's in the GitHub repository - recent changes, current branch, file structure.

Configuration

### "Ingest" Trigger
Anytime you say "ingest", I will:
1. **READ GITHUB STATE** - Current branch, recent commits
2. **ANALYZE CHANGES** - What's been modified recently
3. **REPORT** - Current repository status

Code

#!/bin/bash
# Ingest Trigger

WORKSPACE="/path/to/your/workspace"

cd ${WORKSPACE}

echo "=== Ingest: Reading GitHub State ==="

echo "Current branch:"
git branch --show-current

echo "Recent commits (last 5):"
git log --oneline -5

echo "Files changed recently:"
git diff --name-status HEAD~5..HEAD

echo "Total commits:"
git rev-list --count HEAD

echo "=== Ingest Complete ==="

🚀 Mega Sync Trigger - Complete Setup

Complete system check - runs 3 sub-triggers in sequence.

What It Does

Runs Full Sync + Sync + Ingest in sequence, then presents ONE unified status report.

Configuration

### "Mega Sync" Super Trigger
Anytime you say "mega sync" (in voice or text), I will run ALL of these in sequence:
1. **FULL SYNC** - Complete system health check
2. **SYNC** - Cross-reference local files + GitHub
3. **INGEST** - Read GitHub state

Then present ONE unified status report with all results combined.

Code

#!/bin/bash
# Mega Sync Trigger

WORKSPACE="/path/to/your/workspace"

echo "=========================================="
echo "       MEGA SYNC - Starting..."
echo "=========================================="

echo "=== 1. Running Full Sync ==="
cd ${WORKSPACE}
echo "Git status: $(git status --short)"
echo "Last commit: $(git log --oneline -1)"

echo "=== 2. Running Sync ==="
echo "Memory files: $(ls memory/ 2>/dev/null | wc -l)"
echo "GitHub commits: $(git log --oneline -5)"

echo "=== 3. Running Ingest ==="
echo "Branch: $(git branch --show-current)"
echo "Recent changes:"
git diff --name-status HEAD~3..HEAD

echo "=========================================="
echo "       MEGA SYNC - Complete!"
echo "=========================================="

Test It

echo "mega sync" | ./trigger-mega-sync.sh

🔁 The Auto-Backup System

One of the best features: your AI automatically backs up when you say goodbye!

Goodbye Triggers

Just say any of these to end a session:

What Happens Automatically

#!/bin/bash
# Auto-Backup on Goodbye

cd ${WORKSPACE}
MODIFIED=$(git status --porcelain)

if [ -n "$MODIFIED" ]; then
    echo "Backing up..."
    git add -A
    git commit -m "Auto-backup $(date +%Y-%m-%d\ %H:%M)"
    git push -u origin main
    echo "✅ Backup successful!"
else
    echo "No changes to backup"
fi

✅ Testing Your Setup

Test Command Check
RememberrememberMemory file created, GitHub updated
StudystudyAll files read, commits shown
Mega Syncmega syncFull system status report
Full Syncfull syncHealth check complete
SyncsyncLocal vs GitHub compared
IngestingestGitHub state displayed
Auto-BackupSay "bye for now"Changes committed automatically

❗ Troubleshooting

"GitHub push fails"

git status
git remote -v
git push -u origin main

"Memory file not created"

ls -la memory/
chmod 755 memory/

📋 Summary: Complete Trigger List

Trigger Type Dependencies
RememberMainSave Memory → GitHub Backup → Verify
StudyMainRead files → Check GitHub → Verify
Full SyncMainGit status → Local files → Report
Mega SyncSuperFull Sync → Sync → Ingest
SyncDependencyList local → List GitHub → Cross-ref
IngestDependencyRead GitHub state → Analyze → Report