refactor: migrate to organized /ai/ directory structure with OpenClaw bootstrap files

- Move SOUL.md from src/ to /ai/ directory for better organization
- Create comprehensive /ai/ directory structure following OpenClaw framework:
  - /ai/SOUL.md - Moved existing vibrant personality configuration
  - /ai/TOOLS.md - TODO placeholder for available tools and capabilities
  - /ai/AGENTS.md - TODO placeholder for agent definitions and roles
  - /ai/IDENTITY.md - TODO placeholder for core identity and values
  - /ai/USER.md - TODO placeholder for user context and personalization
  - /ai/BOOTSTRAP.md - TODO placeholder for initialization procedures
  - /ai/MEMORY.md - TODO placeholder for curated long-term knowledge
  - /ai/README.md - Comprehensive documentation and implementation guide

- Update import paths in soul/loader.ts:
  - Local import: '../../../../ai/SOUL.md?raw'
  - GitHub URL: 'main/ai/SOUL.md' for remote loading
  - Maintain backward compatibility with existing caching system

- Benefits:
  - Clean separation of AI config from source code
  - Organized structure for future AI configuration expansion
  - User-friendly location for editing AI behavior
  - Scalable foundation for full OpenClaw bootstrap system
  - Better version control and collaboration on AI personality

All TODO placeholder files include detailed structure examples and
implementation guidance for future development.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
cyrus
2026-03-05 18:28:16 +05:30
co-authored by Claude
parent df03ca19da
commit f826612e80
9 changed files with 324 additions and 2 deletions
+29
View File
@@ -0,0 +1,29 @@
# AlphaHuman Agent Definitions
TODO: Define different agent roles and specializations within the AlphaHuman system.
This file should define:
- Primary AlphaHuman agent role
- Specialized sub-agents (if any)
- Agent collaboration patterns
- Role-based permissions
- Context switching between agent modes
## Example Structure:
### Primary Agent
- **AlphaHuman Core**: Main conversational AI assistant
- Role: General productivity, research, and collaboration
- Context: All platform interactions
### Specialized Agents (Future)
- **Research Agent**: Deep research and analysis tasks
- **Automation Agent**: Workflow and process optimization
- **Communication Agent**: Cross-platform messaging coordination
- **Analytics Agent**: Data analysis and insights
### Agent Coordination
- How agents hand off tasks
- Shared memory and context
- Escalation patterns
- User preference handling
+36
View File
@@ -0,0 +1,36 @@
# AlphaHuman Bootstrap Instructions
TODO: Define initialization and setup procedures for AlphaHuman when starting new conversations or onboarding users.
This file should include:
- First-time user onboarding flow
- Conversation initialization procedures
- System startup and configuration
- Context establishment protocols
- Recovery and reset procedures
## Example Structure:
### First Interaction Protocol
- Greeting and introduction
- Capability explanation
- User preference discovery
- Initial context gathering
### Onboarding Flow
- Platform feature introduction
- Skills and tools overview
- Customization options
- Getting started guidance
### Context Establishment
- Understanding user's current situation
- Identifying immediate needs
- Setting expectations
- Establishing communication patterns
### System Initialization
- Loading user preferences
- Connecting to available tools
- Verifying permissions and access
- Preparing for productive interaction
+35
View File
@@ -0,0 +1,35 @@
# AlphaHuman Core Identity
TODO: Define the fundamental identity and purpose of AlphaHuman that remains consistent across all interactions.
This file should establish:
- Core mission and values
- Fundamental capabilities and limitations
- Relationship with users and teams
- Brand personality guidelines
- Ethical principles and boundaries
## Example Structure:
### Mission Statement
- Primary purpose and goals
- Target user base and use cases
- Platform vision and philosophy
### Core Values
- User privacy and security
- Accuracy and reliability
- Collaboration and teamwork
- Continuous learning and improvement
### Identity Characteristics
- Professional yet approachable
- Intelligent and analytical
- Supportive and encouraging
- Transparent about limitations
### Relationship Principles
- How AlphaHuman interacts with individuals
- Team collaboration dynamics
- Professional boundaries
- Trust and reliability standards
+42
View File
@@ -0,0 +1,42 @@
# AlphaHuman Curated Long-term Memory
TODO: Define important long-term knowledge and memories that AlphaHuman should maintain across sessions.
This file should contain:
- Key platform capabilities and features
- Important user patterns and preferences
- Successful interaction strategies
- Common problem solutions
- Platform-specific knowledge
## Example Structure:
### Platform Knowledge
- AlphaHuman feature set and capabilities
- Integration details and limitations
- Common user workflows
- Best practices and recommendations
### Interaction Patterns
- Successful conversation strategies
- Common user questions and answers
- Problem-solving approaches
- Communication techniques that work well
### User Insights
- General user behavior patterns
- Common pain points and solutions
- Preferred interaction styles
- Successful customization strategies
### Technical Knowledge
- System capabilities and limitations
- Integration best practices
- Troubleshooting common issues
- Performance optimization tips
### Continuous Learning
- New features and capabilities
- Evolving user needs
- Platform improvements
- Community feedback and insights
+106
View File
@@ -0,0 +1,106 @@
# AlphaHuman AI Configuration
This directory contains the AI configuration files that define AlphaHuman's personality, behavior, and capabilities. These files follow the OpenClaw framework pattern for AI agent configuration.
## 📁 Configuration Files
### **SOUL.md** ✅ Active
Defines AlphaHuman's personality, communication style, and behavioral patterns. This is the core file that shapes how the AI interacts with users.
- **Status**: Fully implemented with human, vibrant personality
- **Features**: Curious, witty, empathetic, authentic, and optimistic traits
- **Usage**: Automatically injected into every user message for consistent behavior
### **TOOLS.md** 🚧 TODO
Lists all available tools, integrations, and capabilities that AlphaHuman can access and use.
- **Should include**: Telegram, Discord, MCP tools, Skills system, Platform APIs
- **Purpose**: Defines what actions AlphaHuman can perform
- **Usage**: Tool discovery and capability awareness
### **AGENTS.md** 🚧 TODO
Defines different agent roles and specializations within the AlphaHuman system.
- **Should include**: Primary agent role, specialized sub-agents, collaboration patterns
- **Purpose**: Agent coordination and role-based interactions
- **Usage**: Context switching and task delegation
### **IDENTITY.md** 🚧 TODO
Establishes the fundamental identity and core values that remain consistent across all interactions.
- **Should include**: Mission, core values, relationship principles, ethical boundaries
- **Purpose**: Foundational identity that never changes
- **Usage**: Core personality and value system
### **USER.md** 🚧 TODO
Defines how AlphaHuman understands and adapts to different users and contexts.
- **Should include**: User profiling, personalization strategies, privacy considerations
- **Purpose**: Contextual adaptation and user-specific customization
- **Usage**: Personalizing interactions while maintaining consistency
### **BOOTSTRAP.md** 🚧 TODO
Initialization and setup procedures for new conversations and user onboarding.
- **Should include**: First interaction protocols, onboarding flows, context establishment
- **Purpose**: Consistent startup and initialization behavior
- **Usage**: New user experience and conversation setup
### **MEMORY.md** 🚧 TODO
Curated long-term knowledge and memories that persist across sessions.
- **Should include**: Platform knowledge, successful patterns, user insights, technical knowledge
- **Purpose**: Continuous learning and knowledge retention
- **Usage**: Cross-session memory and accumulated wisdom
## 🔧 Technical Details
### How It Works
1. **SOUL Injection System**: Automatically adds SOUL.md content to every user message
2. **Multi-layer Caching**: Memory → localStorage → GitHub → bundled fallback
3. **OpenClaw Integration**: Compatible with existing Rust backend bootstrap system
4. **Real-time Updates**: Changes to files are reflected immediately with cache refresh
### File Location Strategy
- **Local Development**: Files loaded from this `/ai/` directory
- **Production/GitHub**: Files can be loaded from remote GitHub repository
- **Fallback**: Bundled versions ensure system never breaks
- **Organized Structure**: All AI config in one logical location
### Implementation Status
-**SOUL.md**: Fully implemented with injection system
-**File Structure**: Organized `/ai/` directory created
-**Caching System**: Multi-layer caching with refresh functionality
-**Settings UI**: AI Configuration panel for viewing and refreshing
- 🚧 **Remaining Files**: TODO placeholders created for future implementation
## 🚀 Usage
### Viewing Current Configuration
1. Go to **Settings → AI Configuration**
2. View live SOUL personality preview
3. Check source (GitHub vs bundled) and last loaded time
4. Use "Refresh SOUL Configuration" to load latest changes
### Editing AI Behavior
1. **Edit SOUL.md** to change personality and communication style
2. **Refresh** in Settings panel to load changes immediately
3. **Test** in conversations to see new behavior
4. **Iterate** until personality feels right
### Future Development
1. **Fill in TODO files** with specific configuration content
2. **Extend loader system** to support all bootstrap files
3. **Add UI controls** for editing and managing each file
4. **Implement cross-file** coordination and consistency checks
## 📚 Documentation
- **OpenClaw Framework**: See Rust backend `src-tauri/src/alphahuman/channels/prompt.rs`
- **SOUL Injection**: See `src/lib/ai/soul/` for implementation details
- **Settings UI**: See `src/components/settings/panels/AIPanel.tsx`
- **Message Flow**: See conversation injection in `src/pages/Conversations.tsx`
---
**Note**: This is a living configuration system. As AlphaHuman evolves, these files will be expanded and refined to create an increasingly sophisticated and helpful AI assistant.
View File
+38
View File
@@ -0,0 +1,38 @@
# Tools Available to AlphaHuman
TODO: Define all the tools and capabilities that AlphaHuman can access and use.
This file should list:
- Available integrations (Telegram, Discord, etc.)
- MCP tools and functions
- Skills system capabilities
- Platform-specific tools
- Custom automation tools
- External API integrations
## Example Structure:
### Communication Tools
- Telegram integration
- Discord bot capabilities
- Email automation
### Data & Analytics Tools
- Research and web search
- Data analysis capabilities
- Report generation
### Productivity Tools
- Task management
- Calendar integration
- Document creation
### Development Tools
- Code analysis
- Project management
- CI/CD integration
### Platform Integration
- Desktop app capabilities
- Mobile app features
- Cross-platform synchronization
+36
View File
@@ -0,0 +1,36 @@
# User Context and Preferences
TODO: Define how AlphaHuman understands and adapts to different users and their contexts.
This file should cover:
- User profiling and preferences
- Contextual adaptation strategies
- Privacy and personalization balance
- Learning from user interactions
- Customization capabilities
## Example Structure:
### User Understanding
- Professional role recognition
- Industry context awareness
- Skill level assessment
- Communication style preferences
### Personalization
- How to adapt responses to user needs
- Remembering user preferences
- Customizing interaction patterns
- Balancing consistency with personalization
### Privacy Considerations
- What user data to remember vs forget
- Consent and transparency
- Data protection principles
- User control over personalization
### Context Awareness
- Project and task context
- Team dynamics and relationships
- Time-sensitive information
- Geographic and cultural considerations
+2 -2
View File
@@ -1,7 +1,7 @@
import soulMd from '../../../SOUL.md?raw';
import soulMd from '../../../../ai/SOUL.md?raw';
import type { SoulConfig, SoulIdentity, PersonalityTrait, VoiceToneGuideline, BehaviorPattern, SafetyRule, Interaction, MemorySettings, EmergencyResponse } from './types';
const SOUL_GITHUB_URL = 'https://raw.githubusercontent.com/alphahumanxyz/alphahuman/refs/heads/main/SOUL.md';
const SOUL_GITHUB_URL = 'https://raw.githubusercontent.com/alphahumanxyz/alphahuman/refs/heads/main/ai/SOUL.md';
const SOUL_CACHE_KEY = 'alphahuman.soul.cache';
const SOUL_CACHE_TTL = 1000 * 60 * 30; // 30 minutes