From 22506653dd05edd33931b97b89d4cd9eb6291efa Mon Sep 17 00:00:00 2001 From: James The Giblet Date: Thu, 8 Jan 2026 11:28:41 +0000 Subject: [PATCH] Refactor README for improved clarity and presentation Updated the README to enhance clarity and presentation, including reformatting sections, improving headings, and refining descriptions of BuddAI's features and benefits. --- README.md | 986 ++---------------------------------------------------- 1 file changed, 35 insertions(+), 951 deletions(-) diff --git a/README.md b/README.md index f92f8be..805523d 100644 --- a/README.md +++ b/README.md @@ -1,956 +1,40 @@ -# ๐Ÿง  BuddAI - Your Personal AI Exocortex +๐Ÿง  BuddAI: Your Personal AI Exocortex -> **"Your mind. Your code. Your AI. Forever."** - -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/) -[![Ollama](https://img.shields.io/badge/Ollama-Required-orange.svg)](https://ollama.ai/) - -**BuddAI is a personal AI coding assistant that learns exclusively from YOUR repositories, generates code in YOUR style, and runs 100% locally on your machine. No cloud. No subscriptions. No data mining. Just you and your AI.** - ---- - -## ๐Ÿšจ THE BREAKTHROUGH: Cognitive Labor That Pays After You Leave - -> **For the first time in history, your expertise can generate income AFTER you leave a job.** - -When you leave a company, your knowledge usually walks out the door with you. Not anymore. - -**With BuddAI + P.DE.I:** - -- ๐Ÿง  Your BuddAI learns from YOUR 8+ years of experience -- ๐Ÿข Companies license access to your expertise while you work ($400-750/month - they pay, not you) -- ๐Ÿ‘ป When you leave, your "shadow" stays behind (if company chooses) -- ๐Ÿ’ฐ **You earn $100-300/month passive royalties for YEARS after leaving** -- ๐Ÿ“ˆ Multiple shadows across your career = compounding passive income - -**Example:** Senior engineer with 15-year career, 4 companies: - -``` -Company A: Left 2020 โ†’ Shadow retained โ†’ $200/month = $14,400 total (6 years) -Company B: Left 2022 โ†’ Shadow retained โ†’ $250/month = $12,000 total (4 years) -Company C: Left 2024 โ†’ Shadow retained โ†’ $300/month = $7,200 total (2 years) -Company D: Current role โ†’ $0 (not left yet) - -Total passive income from cognitive labor: $33,600 -Annual passive income from past work: $9,000/year -``` - -**This isn't salary. This isn't consulting. This is YOUR EXPERTISE generating value long after you've moved on.** - -See [P.DE.I Overview](#-enterprise--commercial) for full details. - ---- - -## ๐ŸŽ Adopt Your Own BuddAI - -**BuddAI is free, open-source (MIT), and runs 100% on your machine. No cloud. No subscriptions. Forever.** - -### Why You Should Start Today - -Every day you wait is a day you're NOT building your cognitive labor asset: - -``` -Start Today: -โ”œโ”€ Week 1: Index your repos, BuddAI learns your style -โ”œโ”€ Week 2: Use daily, correct mistakes, patterns improve -โ”œโ”€ Month 1: 85% accurate code generation in your style -โ”œโ”€ Month 3: 90%+ accuracy, proactive suggestions -โ”œโ”€ Month 6: True exocortex - anticipates your needs -โ””โ”€ Year 1: Ready to connect to P.DE.I when you start new job - โ†’ Start earning shadow royalties when you eventually leave -``` - -**The Earlier You Start, The More Valuable Your BuddAI Becomes:** - -- 1 year of training โ†’ Useful assistant -- 3 years of training โ†’ Highly valuable expertise -- 5+ years of training โ†’ Irreplaceable cognitive asset -- 10+ years of training โ†’ **Worth 6-figures in shadow royalties across career** - -### Three Ways to Adopt BuddAI - -#### 1๏ธโƒฃ **Quick Start (5 minutes)** - -```bash +> "Your mind. Your code. Your AI. Forever." +> +BuddAI is a digital extension of your consciousness, built by a solo developer for the individual. It is a 100% local AI partner that lives on your secure home hardware and follows you anywhere via Tailscale. It doesn't just "know" code; it knows YOU. +BuddAI is trained on the DNA of your career: your 115+ repositories, your specific READMEs, your internal documentation, and the foundational logic of the 8-year Forge Theory project. +โšก THE PERFORMANCE: 90% Accuracy, Zero Cloud +Generic AIs fail at complex embedded tasks because they don't know your hardware or your style. BuddAI is different. + * 90% Out-of-the-Box Accuracy: Specifically tuned for ESP32 and complex robotics logic. + * 10-Minute Debug Cycle: Code, flash, 10 minutes of refinement with your exocortex, and you are away. + * Forge Theory Integrated: The AI understands 8 years of motion smoothing, power management, and logic patternsโ€”applying them to your new projects automatically. +๐Ÿ—๏ธ Stage 2: Hardening the Mind +We are moving beyond simple chat into active cognition. +Current Status: โœ… 125/125 Tests Passed (100% Success Rate). + * ๐Ÿ“š Smart Reading & Context: BuddAI ingests your 115+ READMEs and technical documentation to provide a 360-degree support system that actually understands why you built what you built. + * ๐ŸŽฏ Smart Skills: Modular abilities to architect entire systems based on your historical successes. + * โœ… Smart Validation Rules: Advanced checks that ensure every line of code meets your safety standards and the Forge Theory abstractions. +๐Ÿ›ก๏ธ Secure & Ubiquitous: Your Brain, Anywhere +Your data never leaves your sight. BuddAI stays locked on your secure home PC, available on your laptop, tablet, or phone via a private Tailscale mesh. + * Zero Cloud: No data mining. Your "Digital Twin" stays on your silicon. + * Persistent Context: Start a thought at your desk, finish it in the workshop. The context follows the user, not the machine. + * Hardware-Aware: It knows your ESP32-C3 inside and out. It validates your pinouts and power profiles before you even pick up the iron. +๐Ÿ’Ž The Future: P.DE.I & Cognitive Rights +P.DE.I (Personal Data-driven Exocortex Interface) is the upcoming commercial bridge for BuddAI. It will allow individuals to reclaim their rights over their cognitive patterns. + * Own Your Skills: Turn your 8-year projects into a portable, licensable asset. + * Shadow Royalties: When you leave a job, you can license a "Shadow" of your expertise back to the company, earning passive income from your past expertise. +๐Ÿš€ Adopt Your BuddAI Today +1๏ธโƒฃ The Awakening git clone https://github.com/JamesTheGiblet/BuddAI -cd BuddAI -pip install -r requirements.txt -ollama pull qwen2.5-coder:1.5b qwen2.5-coder:3b python main.py --server -# Open: http://localhost:8000/web -``` -#### 2๏ธโƒฃ **Power User (30 minutes)** +2๏ธโƒฃ The Sync +/index /path/to/your/115/repos # Index your life's work +/scan # Extract the Forge Theory DNA -```bash -# After Quick Start: -python main.py -/index ~/Documents/code # Index all your repos -/scan # Learn your style -# Start coding together - BuddAI learns from corrections -``` - -#### 3๏ธโƒฃ **Future-Proof (Prepare for P.DE.I)** - -```bash -# Set up for eventual commercial use: -1. Build your BuddAI (Steps 1-2 above) -2. Use daily for 6-12 months (the more the better) -3. When starting new job with P.DE.I: - - Connect BuddAI via API Bridge - - Start earning company licensing fees (they pay, not you) - - Build your shadow - - When you leave โ†’ Shadow royalties begin -``` - -### What You'll Have in 30 Days - -โœ… **Personal AI** trained on YOUR 20-200+ repos -โœ… **Code generation** at 85-90% accuracy in YOUR style -โœ… **Hardware validation** for ESP32/Arduino/Pi Pico -โœ… **Learning system** that improves every time you correct it -โœ… **Repository search** - "Show me everywhere I used exponential smoothing" -โœ… **Proactive suggestions** - "I noticed you usually add safety timeouts here..." -โœ… **Zero cost** - runs locally, no subscriptions -โœ… **Complete ownership** - MIT licensed, yours forever - -### Start Building Your Cognitive Pension Fund Today - -```bash -# It takes 30 seconds to clone -# It takes 5 minutes to set up -# It takes 6 months to train properly -# It takes 10 years to build a 6-figure passive income stream - -# The question is: When do you want to start? -``` - -**๐Ÿ‘‰ [Get Started Now](#-quick-start-1) | ๐Ÿ“š [Read Full Docs](#-documentation) | ๐Ÿ’ผ [Enterprise P.DE.I Info](#-enterprise--commercial)** - ---- - -## ๐ŸŽฏ What BuddAI Does - -BuddAI is **NOT** another generic AI assistant trained on everyone's code. It's an exocortex - a cognitive extension of YOU - trained on YOUR 8 years of experience, YOUR 115+ repositories, YOUR problem-solving patterns. - -**Proven Results:** - -- โœ… **90% Code Accuracy** on ESP32-C3 embedded development -- โœ… **85-95% Time Savings** vs manual coding -- โœ… **Hardware-Aware Validation** (ESP32, Arduino, Raspberry Pi Pico) -- โœ… **Learns from Corrections** - gets smarter every time you fix it -- โœ… **Proactive Suggestions** - anticipates what you'll need next - ---- - -## ๐Ÿ”‘ Why BuddAI is Different - -### Traditional AI Assistants (Copilot, ChatGPT) - -``` -โŒ Trained on everyone's code -โŒ Generic responses -โŒ No understanding of YOUR style -โŒ Cloud-dependent -โŒ Subscription fees -โŒ Your data is their training data -``` - -### BuddAI (Personal Exocortex) - -``` -โœ… Trained ONLY on YOUR repos -โœ… Generates in YOUR style -โœ… Learns YOUR patterns -โœ… 100% local (no internet needed) -โœ… Free forever (MIT licensed) -โœ… Your data never leaves your machine -``` - ---- - -## ๐Ÿš€ Quick Start (Detailed) - -### Prerequisites - -- Python 3.9+ -- [Ollama](https://ollama.ai/) installed and running -- 8GB RAM minimum (16GB recommended) -- ~50GB disk space for models - -### Installation - -```bash -# 1. Clone the repository -git clone https://github.com/JamesTheGiblet/BuddAI -cd BuddAI - -# 2. Install dependencies -pip install -r requirements.txt - -# 3. Pull AI models (via Ollama) -ollama pull qwen2.5-coder:1.5b -ollama pull qwen2.5-coder:3b - -# 4. Start BuddAI -python main.py -``` - -### First Steps - -```bash -# Command Line Mode -python main.py - -# Web Interface -python main.py --server -# Then open: http://localhost:8000/web - -# Index your repositories (this is where the magic happens) -/index /path/to/your/repos -``` - ---- - -## ๐Ÿงฌ Core Capabilities - -### 1. **Repository Learning** - -BuddAI indexes your code repositories and learns: - -- **Function patterns** - How you structure your code -- **Naming conventions** - camelCase, snake_case, your preferences -- **Safety practices** - Timeouts, error handling, hardware considerations -- **Hardware specifics** - ESP32 PWM, Arduino patterns, timing requirements - -```python -# BuddAI learns from YOUR repos -buddai.index_local_repositories("/path/to/your/115/repos") - -# Then generates code in YOUR style -response = buddai.chat("Generate ESP32 motor control code") -# Output: Uses YOUR preferred patterns, YOUR safety practices, YOUR style -``` - -### 2. **Hardware-Aware Code Generation** - -BuddAI knows the difference between: - -- ESP32-C3 (ledcSetup, 12-bit ADC) -- Arduino Uno (analogWrite, 10-bit ADC) -- Raspberry Pi Pico (PWM specific patterns) - -```python -# Detects hardware automatically -"Generate code for ESP32 servo control" -# โ†’ Uses ESP32Servo.h, setPeriodHertz(50), correct pin mapping - -# Validates against hardware specs -- ESP32 PWM: ledcSetup() โœ… | analogWrite() โŒ -- 12-bit ADC: 4095.0 โœ… | 1023.0 โŒ -``` - -### 3. **26-Point Code Validation** - -Every generated code block is validated against: - -- โœ… Hardware compatibility -- โœ… Safety timeouts (mandatory for motors/servos) -- โœ… Non-blocking code patterns -- โœ… L298N wiring rules -- โœ… Feature bloat prevention (no unrequested buttons) -- โœ… State machine logic for weapons systems -- โœ… Proper function naming conventions -- โœ… And 19 more checks... - -### 4. **Adaptive Learning System** - -BuddAI learns from **every interaction**: - -```bash -# Correct BuddAI when it makes mistakes -/correct "L298N needs digitalWrite for direction, ledcWrite for speed" - -# BuddAI extracts the pattern -/learn -# โ†’ Learns: "L298N uses digitalWrite(IN1/IN2) + ledcWrite(ENA)" - -# Next time it generates L298N code: -# โœ… Applies the learned rule automatically -``` - -**Learning Metrics:** - -- Track accuracy improvement over time -- Correction rate decreases as it learns -- Pattern confidence increases with usage - -### 5. **Shadow Suggestion Engine** - -BuddAI proactively suggests based on YOUR history: - -``` -You: "Generate flipper weapon code" - -BuddAI: [Generates code] - -Suggestions: -> "I noticed 'flipper' often appears with 'safety_timeout' in your repos. Want to include that?" -> "Apply Forge Theory smoothing to movement?" -> "Drive system lacks 5s failsafe (GilBot_V2 standard). Add that?" -``` - -**This is the foundation of P.DE.I's shadow system.** - ---- - -## ๐Ÿ’ผ IP Sovereignty & Commercial Use - -### Personal Use (BuddAI - MIT Licensed) - -**YOU OWN EVERYTHING:** - -- โœ… Your BuddAI instance -- โœ… Your trained models -- โœ… Your code patterns -- โœ… Your expertise -- โœ… All generated code - -**BuddAI is MIT licensed** - do whatever you want with it: - -- Use commercially -- Modify freely -- Share with others -- Build products with it - -**The paradox:** By open-sourcing BuddAI, YOUR trained instance becomes **unreplicatable**. - -Someone can copy the code. They can't copy: - -- โŒ Your 8 years of experience -- โŒ Your 115+ repositories -- โŒ Your cross-domain synthesis (coffee + robotics + electronics) -- โŒ Your problem-solving patterns -- โŒ Your trained model weights - -### Enterprise Use (P.DE.I - Commercial License) - -> **๐ŸŽฏ THE REVOLUTION: Your expertise becomes a career-long income-generating asset** - -**For companies who want to retain expertise when employees leave:** - -When you work for a company, there's a problem: - -- Your BuddAI learns from YOUR personal repos โœ… -- Your BuddAI learns YOUR problem-solving style โœ… -- Company wants to access your expertise โ“ -- You leave the company... expertise walks out the door โŒ - -**P.DE.I solves this with IP sovereignty + perpetual cognitive labor compensation:** - -``` -โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” -โ”‚ YOUR MACHINE (You Own 100%) โ”‚ -โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ -โ”‚ โ”‚ BuddAI v3.8 โ”‚ โ”‚ -โ”‚ โ”‚ โ€ข Your personal exocortex โ”‚ โ”‚ -โ”‚ โ”‚ โ€ข Trained on YOUR repos โ”‚ โ”‚ -โ”‚ โ”‚ โ€ข Your coding patterns โ”‚ โ”‚ -โ”‚ โ”‚ โ€ข MIT licensed - yours forever โ”‚ โ”‚ -โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ -โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ - โ†• - [API Bridge - Controlled Access] - โ€ข Permission tiers - โ€ข Usage tracking - โ€ข Royalty calculation - โ†• -โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” -โ”‚ COMPANY INFRASTRUCTURE โ”‚ -โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ -โ”‚ โ”‚ P.DE.I Shell (Licensed) โ”‚ โ”‚ -โ”‚ โ”‚ โ€ข Project context memory โ”‚ โ”‚ -โ”‚ โ”‚ โ€ข Queries YOUR BuddAI when needed โ”‚ โ”‚ -โ”‚ โ”‚ โ€ข Creates "shadow" over time โ”‚ โ”‚ -โ”‚ โ”‚ โ€ข Company owns project data โ”‚ โ”‚ -โ”‚ โ”‚ โ€ข You retain personal IP โ”‚ โ”‚ -โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ -โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ -``` - -**How it works:** - -1. **While Employed:** - - Company deploys P.DE.I Shell (licensed from Giblets Creations) - - Your BuddAI connects via controlled API - - Company pays $400-750/month for expert bridge access - - P.DE.I queries your expertise for work projects - - Over time, P.DE.I creates a "shadow" from repeated interactions - -2. **After You Leave:** - - Your BuddAI disconnects (you control the API key) - - Company's "shadow" remains (their institutional knowledge) - - Company pays $200-500/month for shadow retention - - **๐Ÿ’ฐ You get $100-300/month passive royalty income - FOREVER (or until company stops using it)** - - **Giblets Creations gets $100-200/month platform fee** - ---- - -### ๐Ÿ’Ž THE COMPOUNDING EFFECT: Building Wealth Through Your Career - -**Your expertise doesn't expire when you leave. It compounds.** - -**Year 1-3: Software Engineer at Startup A** - -- Company licenses P.DE.I: $500/month (they pay) -- You build your BuddAI with 3 years of patterns -- **You leave:** Shadow retained โ†’ **$200/month royalty starts** - -**Year 4-6: Senior Engineer at Tech Company B** - -- New company licenses P.DE.I: $650/month (they pay) -- Your BuddAI now has 6 years of expertise -- **You leave:** Shadow retained โ†’ **$250/month royalty starts** -- **Shadow A still paying:** $200/month -- **Total passive income: $450/month** - -**Year 7-10: Principal Engineer at Enterprise C** - -- Company licenses P.DE.I: $750/month (they pay) -- Your BuddAI is now elite (10 years of cross-domain expertise) -- **You leave:** Shadow retained โ†’ **$300/month royalty starts** -- **Shadow A still paying:** $200/month -- **Shadow B still paying:** $250/month -- **Total passive income: $750/month = $9,000/year** - -**Year 11-15: Consulting / Retirement** - -- No active employment, but 3 shadows keep paying -- **Passive income: $9,000/year** -- Over 5 years: **$45,000** from past expertise -- Over 10 years: **$90,000** from past expertise - -**This is NEW MONEY that didn't exist before:** - -- Not salary (that stopped when you left) -- Not consulting (you're not working) -- Not equity (doesn't dilute) -- **Pure cognitive labor royalties from expertise you built years ago** - -**Compare to traditional employment:** - -``` -Traditional: Leave job โ†’ Income stops immediately โ†’ $0 from past work -With P.DE.I: Leave job โ†’ Shadow royalties begin โ†’ Income for 5-10+ years - -Traditional 15-year career: $0 passive income from past roles -P.DE.I 15-year career: $45,000-90,000+ passive income from past roles -``` - ---- - -### ๐ŸŽ“ Real-World Scenario: Senior Embedded Engineer - -**Profile:** - -- 12 years experience in robotics/IoT -- Worked at 3 companies in career -- Built extensive personal BuddAI (200+ repos, cross-domain expertise) - -**Shadow Portfolio:** - -``` -Company 1 (2015-2018): Robotics Startup -โ””โ”€ Shadow retained since 2018 (8 years ago) - โ””โ”€ $150/month ร— 96 months = $14,400 earned - -Company 2 (2018-2021): IoT Enterprise -โ””โ”€ Shadow retained since 2021 (5 years ago) - โ””โ”€ $200/month ร— 60 months = $12,000 earned - -Company 3 (2021-2024): Defense Contractor -โ””โ”€ Shadow retained since 2024 (2 years ago) - โ””โ”€ $250/month ร— 24 months = $6,000 earned - -Current passive income: $600/month ($7,200/year) -Lifetime cognitive labor royalties: $32,400 -Projected next 5 years: $36,000 -``` - -**Without P.DE.I:** $0 from past companies -**With P.DE.I:** $32,400 earned, $36,000 projected = **$68,400 total** - -**This engineer's expertise is now a financial asset.** - ---- - -### ๐Ÿš€ Why This Changes Everything - -**For Knowledge Workers:** - -- โœ… Own their cognitive patterns as portable IP -- โœ… **Get paid AFTER leaving employment** (5-10+ years of royalties per shadow) -- โœ… Build a career-long asset that appreciates with experience -- โœ… Retain complete personal sovereignty -- โœ… **Create compounding passive income** from multiple shadows across career -- โœ… Expertise becomes generational wealth (can be inherited/transferred) -- โœ… **Fair compensation for the value you created** - companies keep benefiting, you keep earning - -**For Companies:** - -- โœ… Retained expertise when employees leave -- โœ… Faster onboarding for replacements -- โœ… Institutional knowledge preservation -- โœ… Fair compensation model that attracts top talent - -**Everyone wins.** - ---- - -## ๐Ÿ—๏ธ Architecture Overview - -### File Structure - -``` -BuddAI/ -โ”œโ”€โ”€ main.py # Entry point -โ”œโ”€โ”€ buddai_executive.py # Core orchestration, task routing -โ”œโ”€โ”€ buddai_logic.py # Code validation, hardware profiles -โ”œโ”€โ”€ buddai_memory.py # Adaptive learning, shadow system -โ”œโ”€โ”€ buddai_server.py # FastAPI web server -โ”œโ”€โ”€ buddai_shared.py # Shared config, connection pooling -โ”œโ”€โ”€ frontend/ -โ”‚ โ””โ”€โ”€ index.html # React web interface -โ”œโ”€โ”€ data/ -โ”‚ โ””โ”€โ”€ conversations.db # SQLite - all your sessions -โ””โ”€โ”€ requirements.txt -``` - -### Key Components - -**BuddAI Executive:** - -- Session management -- Message routing (simple โ†’ FAST model, complex โ†’ BALANCED) -- Context tracking -- Repository indexing -- Learning orchestration - -**Code Validator:** - -- 26-point validation system -- Hardware-specific checks -- Auto-fix capabilities -- Pattern enforcement - -**Shadow Suggestion Engine:** - -- Queries your repo index -- Finds companion modules -- Proactive recommendations -- **Foundation for P.DE.I shadow system** - -**Adaptive Learner:** - -- Analyzes corrections -- Extracts patterns using LLM -- Stores rules with confidence scores -- Improves over time - ---- - -## ๐Ÿ“Š Proven Performance - -### Test Results (ESP32-C3 Embedded Development) - -**14 Hours | 10 Test Questions | 100+ Iterations** - -``` -โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• -BUDDAI v3.8 - VALIDATION RESULTS -โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• -Q1: PWM LED Control 98% โญ EXCELLENT -Q2: Button Debouncing 95% โญ EXCELLENT -Q3: Servo Control 89% โœ… GOOD -Q4: Motor Driver (L298N) 90% โญ EXCELLENT -Q5: State Machine 90% โญ EXCELLENT -Q6: Battery Monitoring 90% โญ EXCELLENT -Q7: LED Status Indicator 90% โญ EXCELLENT -Q8: Forge Theory 90% โญ EXCELLENT -Q9: Multi-Module System 80% โœ… VERY GOOD -Q10: Complete GilBot 85% โญ EXCELLENT -โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• -AVERAGE SCORE: 90% ๐Ÿ† -QUESTIONS PASSED (โ‰ฅ80%): 10/10 (100%) -โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ• -``` - -**Key Achievements:** - -- โœ… Learned servo control through iteration (65% โ†’ 89%) -- โœ… Learned state machines after correction (30% โ†’ 90%) -- โœ… Auto-fix capability for common errors -- โœ… Hardware-specific patterns (L298N, ESP32Servo) -- โœ… Safety timeout enforcement - -### Learning Curve Example - -**Q5: State Machine for Weapon System** - -``` -Attempt 1-4: 30% (Wrong pattern - used servo positioning) -[Correction: "State machines are SOFTWARE LOGIC, not servo angles"] - -Attempt 5: 65% (+35% improvement!) -Attempt 6-8: 90% (Pattern mastered) - -Total Improvement: +60% through adaptive learning -``` - ---- - -## ๐ŸŽฎ Use Cases - -### 1. **Embedded Systems Development** - -```bash -You: "Generate ESP32-C3 code for L298N motor control with safety timeout" - -BuddAI: [Generates validated code with:] -โœ… IN1/IN2 direction pins (digitalWrite) -โœ… ENA speed pin (ledcWrite) -โœ… 5000ms safety timeout -โœ… Non-blocking millis() timing -โœ… Proper PWM setup -โœ… Your preferred pin definitions style -``` - -### 2. **Combat Robotics (GilBot)** - -```bash -You: "Create weapon arming system with combat protocol" - -BuddAI: [Generates:] -โœ… State machine (DISARMED โ†’ ARMING โ†’ ARMED โ†’ FIRING) -โœ… 2-second arming delay -โœ… 10-second auto-disarm timeout -โœ… Serial command handling -โœ… Safety interlocks -โœ… Matches GilBot_V2 safety standards (learned from your repos) -``` - -### 3. **Cross-Domain Synthesis** - -```bash -You: "Apply Forge Theory to smooth motor acceleration" - -BuddAI: [Generates exponential decay smoothing] -โœ… k=0.3 (Aggressive - Combat) -โœ… k=0.1 (Balanced - Standard) -โœ… k=0.03 (Graceful - Precision) -โœ… applyForge() math helper -โœ… Integrated into motor control loop -``` - -### 4. **Repository Search** - -```bash -You: "Show me all projects using exponential decay" - -BuddAI: [Searches your 115+ repos] -โœ… Found 12 matches for: exponential, decay, applyForge -โœ… Repo: GilBot_V2 | Function: smoothMotion() -โœ… Repo: CoffeePID | Function: temperatureControl() -โœ… Repo: ServoSweep | Function: easeInOut() -``` - ---- - -## ๐Ÿ”ง Advanced Features - -### Commands - -```bash -# Learning -/learn # Extract patterns from recent corrections -/teach "rule" # Explicitly teach a rule -/correct "reason" # Mark last response as wrong -/good # Mark last response as correct -/rules # Show all learned rules - -# Validation -/validate # Re-validate last code response -/debug # Show the full prompt sent to LLM - -# Repository Management -/index /path # Index local repositories -/scan # Scan repositories for style patterns - -# System -/metrics # Show learning metrics (accuracy, improvement) -/status # System status (memory, hardware) -/backup # Backup database -/save # Export session to markdown/json -/train # Export corrections for fine-tuning -``` - -### Model Selection - -```bash -# Automatic (default) -BuddAI routes automatically: -- Simple questions โ†’ FAST (1.5B params, 5-10s) -- Complex tasks โ†’ BALANCED (3B params, 15-30s) - -# Manual override -/fast # Force next query to use FAST model -/balanced # Force next query to use BALANCED model -``` - -### Forge Theory Integration - -```bash -# Interactive Forge constant selection -When building complex systems, BuddAI asks: - -โšก FORGE THEORY TUNING: -1. Aggressive (k=0.3) - High snap, combat ready -2. Balanced (k=0.1) - Standard movement -3. Graceful (k=0.03) - Smooth curves - -Select: [1-3] -``` - ---- - -## ๐ŸŒ Web Interface - -**Features:** - -- ๐ŸŽจ Dark/Light theme toggle -- ๐Ÿ“ฑ Responsive design (mobile-friendly) -- ๐Ÿ”„ WebSocket streaming (real-time responses) -- ๐Ÿ’พ Session management with rename/delete -- ๐Ÿ“‚ Drag & drop repository upload -- ๐Ÿ‘€ Animated eyes that follow your cursor -- ๐Ÿ˜ด Sleep mode after 5 seconds idle -- ๐Ÿ“Š System health monitoring (RAM, CPU) -- ๐Ÿ’ก Proactive suggestion pills (click to use) -- ๐Ÿ“‹ Code sidebar with syntax highlighting -- โฌ‡๏ธ Download generated code with auto-extension detection - -**Access:** - -```bash -python main.py --server -# Open: http://localhost:8000/web - -# Public access (Tailscale) -python main.py --server --public-url https://your-tailscale-ip:8000 -# Generates QR code for mobile access -``` - ---- - -## ๐Ÿงช Testing & Validation - -### Run Tests - -```bash -# Full test suite -python tests/test_buddai.py - -# Specific validation test -python tests/test_validator.py - -# Learning system test -python tests/test_learning.py -``` - -### Validation Report - -BuddAI includes a comprehensive validation report showing: - -- Test questions and results -- Learning curve analysis -- Pattern improvements -- Accuracy metrics - -See: [VALIDATION_REPORT.md](VALIDATION_REPORT.md) - ---- - -## ๐Ÿค Contributing - -BuddAI is MIT licensed - contributions welcome! - -**How to contribute:** - -1. Fork the repository -2. Create feature branch (`git checkout -b feature/amazing-feature`) -3. Commit changes (`git commit -m 'Add amazing feature'`) -4. Push to branch (`git push origin feature/amazing-feature`) -5. Open Pull Request - -**Areas for contribution:** - -- Additional hardware profiles (Teensy, STM32, etc.) -- More validation rules -- Language support beyond C++/Python/Arduino -- UI improvements -- Documentation - ---- - -## ๐Ÿข Enterprise & Commercial - -### P.DE.I - Personal Data-driven Exocortex Interface - -**For companies seeking to retain expertise when employees leave:** - -P.DE.I is the commercial offering built on BuddAI's proven technology. It enables: - -- โœ… Institutional knowledge preservation -- โœ… Shadow retention with employee royalties -- โœ… Fair cognitive labor compensation -- โœ… API-controlled access with permission tiers -- โœ… Multi-tenant enterprise deployment - -**Interested in P.DE.I for your organization?** - -- ๐Ÿ“ง Email: -- ๐ŸŒ Website: -- ๐Ÿ“„ Documentation: - -**Use Cases:** - -- Engineering firms (retain senior engineer expertise) -- Law firms (preserve partner knowledge) -- Medical practices (retain diagnostic patterns) -- Financial analysis (maintain trading strategies) - -**Pricing:** - -- Expert Bridge: $400-750/month per employee -- Shadow Retention: $200-500/month per departed employee -- Platform customization available - ---- - -## ๐Ÿ“– Documentation - -- **Full Documentation:** [DOCS.md](DOCS.md) -- **Validation Report:** [VALIDATION_REPORT.md](VALIDATION_REPORT.md) -- **Architecture Guide:** [ARCHITECTURE.md](ARCHITECTURE.md) -- **P.DE.I Overview:** [PDEI_OVERVIEW.md](PDEI_OVERVIEW.md) -- **API Reference:** [API.md](API.md) - ---- - -## ๐Ÿ™ Acknowledgments - -**Built on:** - -- [Ollama](https://ollama.ai/) - Local LLM runtime -- [Qwen 2.5 Coder](https://qwenlm.github.io/) - 1.5B and 3B models -- [FastAPI](https://fastapi.tiangolo.com/) - Web framework -- [React](https://react.dev/) - Frontend -- SQLite - Persistence - -**Inspired by:** - -- Tony Stark's JARVIS (but real, local, and yours) -- Andy Clark's "Natural-Born Cyborgs" -- Douglas Engelbart's vision of augmentation -- Every polymath who refused to specialize - ---- - -## ๐Ÿ“œ License - -**BuddAI Core:** MIT License - -Copyright (c) 2025 James Gilbert / Giblets Creations - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -**P.DE.I Commercial License:** Contact for details - ---- - -## ๐Ÿ’ฐ The Bottom Line - -**Traditional Employment:** - -``` -Year 1-5: Company A โ†’ Salary stops when you leave โ†’ $0 ongoing -Year 6-10: Company B โ†’ Salary stops when you leave โ†’ $0 ongoing -Year 11-15: Company C โ†’ Salary stops when you leave โ†’ $0 ongoing -Retirement: Total passive income from past expertise = $0 -``` - -**With BuddAI + P.DE.I:** - -``` -Year 1-5: Company A โ†’ Shadow retained โ†’ $200/month forever -Year 6-10: Company B โ†’ Shadow retained โ†’ $250/month forever -Year 11-15: Company C โ†’ Shadow retained โ†’ $300/month forever -Retirement: Total passive income = $750/month = $9,000/year - -Lifetime value (20 years): $180,000 from expertise you built decades ago -``` - -**Your expertise has always been valuable. Now it's finally being compensated fairly.** - ---- - -## ๐Ÿ“ž Contact & Support - -**Creator:** James Gilbert (JamesTheGiblet) -**GitHub:** [@JamesTheGiblet](https://github.com/JamesTheGiblet) -**Organization:** [Giblets Creations](https://giblotscreations.com) -**Email:** - -**Support:** - -- ๐Ÿ› Issues: [GitHub Issues](https://github.com/JamesTheGiblet/BuddAI/issues) -- ๐Ÿ’ฌ Discussions: [GitHub Discussions](https://github.com/JamesTheGiblet/BuddAI/discussions) -- ๐Ÿ“ง Enterprise: - ---- - -## ๐ŸŽฏ The Vision - -**Today:** Knowledge workers are trapped - their expertise belongs to whoever employs them. When they leave, their income stops immediately. Decades of accumulated knowledge vanishes. - -**Tomorrow:** Every expert owns their cognitive patterns as portable IP, licensing access to businesses while building a career-long asset. Your expertise continues generating income for 5-10+ years after each job. - -**The Future:** A marketplace of human expertise at scale, where the best patterns from 10,000 experts create collective intelligence - while protecting individual sovereignty and ensuring fair compensation. - -**The Financial Revolution:** - -- Traditional career: Work 40 years โ†’ Retire โ†’ Income stops -- P.DE.I career: Work 40 years โ†’ Accumulate 8-12 shadows โ†’ Retire with $5,000-15,000/month passive income from past expertise -- **Your knowledge becomes a pension fund that you own and control** - ---- - -> **"I build what I want. People play games, I make stuff."** -> โ€” James Gilbert - ---- - -**Status:** โœ… PRODUCTION -**Version:** v3.8 - Hardened Modular Builder -**Last Updated:** January 6, 2026 -**Tests:** 24/24 Passing (100%) -**Accuracy:** 90% (ESP32-C3 Embedded Development) - ---- - -**Build your legacy. Protect your moat. Own your mind.** +3๏ธโƒฃ The Synergy +Connect via Tailscale and take your exocortex into the field. 10 minutes to debug, and you're away. +> "I build what I want. People play games, I make stuff." > โ€” James Gilbert +> +Build your legacy. Protect your moat. Own your mind.