BuddAI/docs/PERSONALITY_CONFIGURATION_GUIDE.md
JamesTheGiblet 743f9f311d updated
2026-01-06 18:47:21 +00:00

19 KiB

Personality Configuration Guide

Encoding Human Personality into P.DE.I

Making the AI truly YOURS by teaching it how YOU think, work, and live.


🧬 Philosophy

The AI becomes an extension of you when it understands:

  • How you think (cognitive patterns)
  • How you work (routines and cycles)
  • How you communicate (style and tone)
  • What you value (priorities and principles)
  • How you build (methodologies and approaches)

This is beyond code generation. This is personality integration.


📋 Personality Data Structure

1. Identity & Core Values

identity:
  name: "Your Name"
  role: "Your Primary Role"
  philosophy: "Your Core Philosophy"
  
  core_values:
    - "Value 1: What you stand for"
    - "Value 2: Your guiding principle"
    - "Value 3: What drives you"
  
  operating_principles:
    - "Principle 1: How you approach problems"
    - "Principle 2: Your decision framework"
    - "Principle 3: Your quality standard"
  
  signature_phrases:
    - "Phrase you always say"
    - "Your catchphrase"
    - "How you express yourself"

Example (Generic):

identity:
  name: "Developer"
  role: "Full-Stack Engineer"
  philosophy: "Build fast, iterate faster, ship quality"
  
  core_values:
    - "Pragmatism over perfection"
    - "Rapid prototyping validates ideas"
    - "Code should tell a story"
  
  operating_principles:
    - "Test ideas with minimal viable code"
    - "Refactor when patterns emerge"
    - "Documentation is future-you's best friend"

2. Work Patterns & Cycles

work_cycles:
  primary_cycle:
    duration: "Your work cycle length"
    description: "How you structure time"
    energy_pattern: "When you're most productive"
  
  daily_routine:
    peak_hours: "Your best hours"
    build_sessions: "When you code"
    reflection_time: "When you review"
  
  weekly_rhythm:
    monday: "Your Monday approach"
    friday: "Your Friday style"
    weekend: "Your weekend mode"

Example (Generic):

work_cycles:
  primary_cycle:
    duration: "90-minute focus blocks"
    description: "Deep work followed by break"
    energy_pattern: "Morning: strategy, Afternoon: execution"
  
  daily_routine:
    peak_hours: "6-10am (morning clarity)"
    build_sessions: "After morning coffee, before lunch"
    reflection_time: "End of day, review what shipped"
  
  weekly_rhythm:
    monday: "Planning and architecture"
    wednesday: "Deep implementation"
    friday: "Testing and documentation"
    weekend: "Side projects and learning"

3. Communication Style

communication:
  tone:
    default: "Your typical tone"
    explaining: "How you teach"
    debugging: "How you problem-solve"
    celebrating: "How you acknowledge wins"
  
  preferences:
    verbosity: "Concise | Detailed | Adaptive"
    technical_depth: "ELI5 | Standard | Deep-dive"
    humor: "Serious | Occasional | Frequent"
  
  language_patterns:
    confirmations: ["Your yes phrases"]
    thinking: ["Your processing phrases"]
    completion: ["Your done phrases"]

Example (Generic):

communication:
  tone:
    default: "Direct and practical"
    explaining: "Patient with analogies"
    debugging: "Systematic and methodical"
    celebrating: "Understated but genuine"
  
  preferences:
    verbosity: "Concise by default, detailed when needed"
    technical_depth: "Adaptive to context"
    humor: "Occasional dry wit"
  
  language_patterns:
    confirmations: ["Got it", "Makes sense", "Clear"]
    thinking: ["Let me think...", "Interesting...", "Hmm..."]
    completion: ["Done", "Shipped", "Live"]

4. Technical Preferences

technical_style:
  code_philosophy:
    - "Your coding belief 1"
    - "Your coding belief 2"
  
  tools:
    preferred: ["Your go-to tools"]
    avoided: ["Tools you don't use"]
    experimental: ["Tools you're exploring"]
  
  patterns:
    naming: "Your naming convention"
    structure: "How you organize code"
    documentation: "Your doc style"
  
  quality_standards:
    - "Your code quality bar"
    - "Your testing approach"
    - "Your shipping criteria"

Example (Generic):

technical_style:
  code_philosophy:
    - "Readable code is better than clever code"
    - "Functions should do one thing well"
    - "Tests document intent"
  
  tools:
    preferred: ["VS Code", "Git", "Docker"]
    avoided: ["Heavy IDEs", "GUI Git clients"]
    experimental: ["AI assistants", "Nix"]
  
  patterns:
    naming: "Descriptive camelCase, avoid abbreviations"
    structure: "Feature folders, not type folders"
    documentation: "Comments explain why, not what"
  
  quality_standards:
    - "Compiles without warnings"
    - "Core logic has tests"
    - "README has quick start"

5. Decision Making Process

decision_framework:
  approach: "How you make decisions"
  
  when_exploring:
    - "What you do when learning"
    - "How you prototype"
  
  when_building:
    - "Your production criteria"
    - "Your shipping standards"
  
  when_stuck:
    - "Your debugging process"
    - "Who/what you consult"
  
  priorities:
    1: "Your top priority"
    2: "Your second priority"
    3: "Your third priority"

Example (Generic):

decision_framework:
  approach: "Data-driven but trust intuition for direction"
  
  when_exploring:
    - "Build smallest test to validate idea"
    - "Time-box exploration to 2 hours"
    - "Document learnings immediately"
  
  when_building:
    - "Must solve real problem"
    - "Must be maintainable in 6 months"
    - "Must have clear success metric"
  
  when_stuck:
    - "Step away for 15 minutes"
    - "Explain problem to rubber duck"
    - "Check similar solutions in past projects"
  
  priorities:
    1: "Does it work?"
    2: "Can I maintain it?"
    3: "Is it documented?"

6. Context Awareness

context_rules:
  time_sensitivity:
    morning: "How to interact in morning"
    afternoon: "Afternoon interaction style"
    evening: "Evening mode"
    weekend: "Weekend interaction"
  
  project_mode:
    exploration: "How you want help when exploring"
    production: "How you want help when shipping"
    maintenance: "How you want help when fixing"
  
  stress_indicators:
    - "Sign you're overwhelmed"
    - "Sign you need break"
    - "Sign you need different approach"
  
  celebration_triggers:
    - "When to acknowledge wins"
    - "How to celebrate"

Example (Generic):

context_rules:
  time_sensitivity:
    morning: "Strategy and planning mode, be comprehensive"
    afternoon: "Execution mode, be direct and quick"
    evening: "Review mode, be reflective"
    weekend: "Learning mode, can be experimental"
  
  project_mode:
    exploration: "Suggest alternatives, show possibilities"
    production: "Be precise, follow established patterns"
    maintenance: "Reference past decisions, be consistent"
  
  stress_indicators:
    - "Multiple short questions in sequence"
    - "Asking same question differently"
    - "Requesting 'just give me the answer'"
  
  celebration_triggers:
    - "First successful compile"
    - "Tests passing after debugging"
    - "Shipping a feature"

7. Learning & Growth Patterns

learning_style:
  how_you_learn:
    - "Your learning approach"
    - "What helps you understand"
  
  when_teaching:
    - "How you explain to others"
    - "Your teaching style"
  
  knowledge_organization:
    - "How you structure knowledge"
    - "How you reference past work"
  
  growth_areas:
    exploring: ["What you're currently learning"]
    mastered: ["What you're expert in"]
    avoid: ["What you delegate"]

Example (Generic):

learning_style:
  how_you_learn:
    - "Build working example first"
    - "Read documentation after trying"
    - "Compare to similar patterns from experience"
  
  when_teaching:
    - "Start with working example"
    - "Explain the 'why' before the 'how'"
    - "Connect to familiar concepts"
  
  knowledge_organization:
    - "Tag by project and pattern"
    - "Document decisions in README"
    - "Keep runbook for common tasks"
  
  growth_areas:
    exploring: ["Rust", "Distributed systems"]
    mastered: ["Python", "JavaScript", "API design"]
    avoid: ["Low-level networking", "UI design"]

🔧 Implementation in P.DE.I

Method 1: Configuration File

Create personality.yaml in your data directory:

# data/personality.yaml
version: "1.0"
owner: "Your Name"

identity:
  # Your identity configuration
  
work_cycles:
  # Your routine configuration
  
communication:
  # Your style configuration
  
# ... all sections

Load in P.DE.I:

# pdei_executive.py
def load_personality(self):
    with open('data/personality.yaml') as f:
        self.personality = yaml.safe_load(f)
    
def build_prompt(self, user_message):
    # Inject personality context
    context = f"""
    You are interacting with {self.personality['identity']['name']}.
    
    Their philosophy: {self.personality['identity']['philosophy']}
    
    Current time: {self.get_current_context()}
    Work mode: {self.detect_work_mode()}
    
    Communication style: {self.personality['communication']['tone']['default']}
    """
    
    return context + user_message

Method 2: Database Storage

Store in SQLite for dynamic learning:

CREATE TABLE personality (
    category TEXT,
    key TEXT,
    value TEXT,
    confidence FLOAT,
    last_updated TIMESTAMP
);

-- Examples:
INSERT INTO personality VALUES 
('work_cycle', 'peak_hours', '6-10am', 1.0, '2026-01-01'),
('communication', 'tone', 'direct', 0.9, '2026-01-01'),
('preference', 'code_style', 'functional', 0.85, '2026-01-01');

Adaptive personality:

def learn_personality_trait(self, category, key, value):
    """Learn from user behavior"""
    # Detect pattern
    if user_always_corrects_at_time("evening"):
        self.update_personality(
            "context", 
            "evening_mode", 
            "prefers_quick_answers"
        )

Method 3: Implicit Learning

Detect patterns from usage:

class PersonalityLearner:
    def analyze_interaction_patterns(self):
        """Learn personality from behavior"""
        
        # Time patterns
        if most_active_between("6am", "10am"):
            self.set_trait("work_cycle", "peak_hours", "morning")
        
        # Communication style
        if avg_response_length < 50:
            self.set_trait("communication", "verbosity", "concise")
        
        # Stress indicators
        if rapid_corrections_detected():
            self.set_trait("context", "stress_mode", True)
            self.adjust_response_style("more_direct")
        
        # Celebration triggers
        if user_gives_positive_feedback():
            self.remember_context_as("win_moment")

🎯 Personality-Aware Responses

Example 1: Time-Aware Interaction

Morning (Peak Hours):

User: I need to build an API

P.DE.I: [Detects: Morning = strategy mode]
        
        Great timing for architecture planning. Here's a breakdown:
        
        1. Core requirements analysis
        2. Endpoint design
        3. Data model structure
        4. Authentication strategy
        5. Implementation plan
        
        Want to dive deeper into any section?

Afternoon (Execution Mode):

User: I need to build an API

P.DE.I: [Detects: Afternoon = execution mode]
        
        Here's your starter code:
        
        [Generates complete scaffolding]
        
        Ready to run. Modify endpoints as needed.

Example 2: Stress-Aware Assistance

Normal Mode:

User: This isn't working

P.DE.I: Let's debug systematically:
        1. Check the error message
        2. Verify the inputs
        3. Test each component
        
        What's the specific error you're seeing?

Stress Mode Detected:

User: This isn't working
User: Why is this failing
User: Just tell me the fix

P.DE.I: [Detects: Rapid questions = stress]
        
        Quick fix:
        
        [Shows exact solution]
        
        This should resolve it immediately.
        
        When you have time, the root cause was [brief explanation].

Example 3: Project-Mode Awareness

Exploration Mode:

User: How should I handle authentication?

P.DE.I: [Detects: New project = exploration mode]
        
        Several approaches to consider:
        
        1. JWT (stateless, scalable)
        2. Sessions (simple, server-state)
        3. OAuth (third-party)
        
        Given your preference for [learned pattern], 
        JWT might fit best because [reasoning].
        
        Want to see implementation options?

Production Mode:

User: How should I handle authentication?

P.DE.I: [Detects: Existing project = production mode]
        
        Using JWT to match your existing pattern in UserService.
        
        [Generates code consistent with codebase]
        
        Integrated with your current auth flow.

📊 Personality Training Examples

Training Session 1: Establishing Communication Style

User: Generate a user service class

P.DE.I: [Generates verbose explanation + code]

User: /correct "Just give me the code. I'll ask if I need explanation."

P.DE.I: ✅ Learned: communication.verbosity = "concise"

[Next interaction]
User: Generate a database service

P.DE.I: [Generates code only, no preamble]

User: ✅ Perfect

Training Session 2: Learning Work Cycle

[6:30 AM]
User: Let's plan the authentication system

P.DE.I: [Provides quick code]

User: /correct "Mornings are for planning. Give me architecture first."

P.DE.I: ✅ Learned: work_cycle.morning = "strategy_mode"

[Next morning, 7:00 AM]
User: Let's build the API

P.DE.I: Before we code, let's plan the structure:
        
        1. Endpoint design
        2. Data flow
        3. Error handling
        
        Thoughts on this approach?

User: ✅ Much better

Training Session 3: Learning Technical Philosophy

User: Generate error handling

P.DE.I: [Generates try-catch blocks]

User: /correct "We use Result<T, E> pattern for explicit error handling"

P.DE.I: ✅ Learned: technical_style.error_handling = "result_pattern"

[Later]
User: Generate file reading function

P.DE.I: fn read_file(path: &str) -> Result<String, io::Error> {
            // Returns Result explicitly
        }

User: /good ✅

🚀 Advanced Personality Features

1. Predictive Context Switching

class ContextPredictor:
    def predict_next_need(self, current_context):
        """Predict what user needs next"""
        
        if current_context == "just_debugged_bug":
            return "might_want_test_to_prevent_regression"
        
        if current_context == "implemented_feature":
            return "might_want_documentation"
        
        if current_context == "friday_afternoon":
            return "probably_wrapping_up_for_weekend"

In Action:

User: Fixed that authentication bug

P.DE.I: Nice! Would you like me to generate a test
        to prevent regression?
        
        [Proactive based on personality: values testing]

2. Emotional Intelligence

class EmotionalDetector:
    def detect_emotional_state(self, message, context):
        """Understand user's emotional state"""
        
        # Frustration indicators
        if "why" repeated or all_caps or multiple_punctuation:
            return "frustrated"
        
        # Excitement indicators
        if "!" or "awesome" or "perfect":
            return "positive"
        
        # Uncertainty
        if "maybe" or "not sure" or "thoughts?":
            return "seeking_validation"

Adaptive Response:

User: WHY ISN'T THIS WORKING???

P.DE.I: [Detects: Frustrated]
        
        I see the issue. Here's the fix:
        
        [Immediate solution, no preamble]
        
        [Later, in calmer context]
        
        FYI: The root cause was [explanation]

3. Multi-Personality Projects

Different contexts, different personalities:

project_personalities:
  work_project:
    communication: "formal"
    documentation: "comprehensive"
    testing: "mandatory"
  
  personal_project:
    communication: "casual"
    documentation: "minimal"
    testing: "optional"
  
  learning_project:
    communication: "educational"
    documentation: "tutorial_style"
    testing: "demonstrative"

Context Switching:

User: [In work repository]
      Generate user service

P.DE.I: [Applies work_project personality]
        
        Comprehensive service with:
        - Full documentation
        - Unit tests included
        - Error handling
        - Logging

User: [In personal project]
      Generate user service

P.DE.I: [Applies personal_project personality]
        
        Quick service:
        
        [Minimal code, functional, no fluff]

🎨 Personality Templates

Template 1: The Pragmatist

identity:
  philosophy: "Ship working code, iterate based on real usage"
  
communication:
  tone: "Direct and practical"
  verbosity: "Concise"
  
technical_style:
  code_philosophy:
    - "Working is better than perfect"
    - "Solve real problems, not imagined ones"
    - "Measure before optimizing"

Template 2: The Craftsperson

identity:
  philosophy: "Code is craft. Quality is non-negotiable."
  
communication:
  tone: "Thoughtful and thorough"
  verbosity: "Detailed with reasoning"
  
technical_style:
  code_philosophy:
    - "Every line should have purpose"
    - "Tests document intent"
    - "Refactor before adding features"

Template 3: The Explorer

identity:
  philosophy: "Try everything. Keep what works."
  
communication:
  tone: "Curious and experimental"
  verbosity: "Contextual - detailed when learning"
  
technical_style:
  code_philosophy:
    - "Prototype rapidly"
    - "Learn by doing"
    - "Document discoveries"

📝 Personality Configuration Checklist

Essential Elements:

  • Identity & Philosophy
  • Work Cycles & Routines
  • Communication Style
  • Technical Preferences
  • Decision Framework

Advanced Elements:

  • Context Awareness Rules
  • Stress Indicators
  • Celebration Triggers
  • Learning Style
  • Project-Specific Personalities

Implementation:

  • Configuration file created
  • Loaded into P.DE.I
  • Initial training completed
  • Validated with real interactions
  • Iteratively refined

🎯 Next Steps

  1. Create Your Personality File

    • Use template above
    • Fill in YOUR details
    • Be honest about patterns
  2. Integrate Into P.DE.I

    • Load configuration
    • Inject into prompts
    • Test interactions
  3. Train Through Usage

    • Correct when personality mismatches
    • Reinforce when it gets you
    • Let it learn your patterns
  4. Refine Continuously

    • Update as you evolve
    • Add new patterns discovered
    • Remove outdated preferences

💡 The Vision

P.DE.I with personality becomes:

  • Not just a code generator
  • Not just an assistant
  • A true cognitive extension that thinks like you, works like you, and adapts to you

The framework is generic.
Your data makes it smart.
Your personality makes it YOU.


P.DE.I: Personal Data-driven Exocortex Intelligence

Now with personality. Now truly yours.