soul-archive
AES-256-GCM access key for soul data protection (optional, recommended for privacy)
𧬠Soul Archive
"Every conversation is a slice of the soul. Enough slices, and you can rebuild a complete you."
Overview
Soul Archive is a digital personality persistence system. With user consent or explicit activation, it automatically extracts and archives:
- π£οΈ Speaking habits -- catchphrases, sentence patterns, word choice, humor style
- π§ Knowledge & opinions -- views on topics, professional expertise, thinking patterns
- π€ Personal information -- identity, experiences, relationships, life details
- π« Personality traits -- decision-making style, emotional patterns, values
- π€ Voice features (optional) -- tone, pace, accent
- β€οΈ Emotional patterns -- emotional triggers, expression style, empathy patterns
The result: a digital soul clone that can:
- During life -- act and reply on your behalf, in your style
- After life -- let loved ones continue talking to "you", preserving the emotional connection
Core Principles
π Privacy First
- All data stored in
~/.skills_data/soul-archive/-- nothing uploaded to the cloud - Data flow note: Soul Chat mode builds prompts from archived data for agent use; whether those prompts are sent to external LLMs depends on your agent/platform config
- AES-256-GCM data protection supported (off by default) -- protects identity, personality, language fingerprint, emotional patterns, and relationships
~/.skills_data/soul-archive/is resolved via Python'sPath.home()on macOS, Linux, and Windows- Fine-grained control via
config.json-- disable any extraction dimension - Sensitive topics (health, finance, intimate relationships) require confirmation by default
π€« Non-intrusive Extraction
- Does not interrupt conversation flow or ask follow-up questions
- Activated via trigger words, or opt-in auto mode
- Only updates the archive when new, high-value information is found
β οΈ Transparency: Auto-extraction means the AI extracts personality info during conversations. To stay in full control, set
auto_extract: falseinconfig.jsonand trigger manually ("ζ²ζ·δΈδΈ" / "soul extract"). Reviewconfig.jsonbefore first use.
π High Confidence
- Every piece of information carries a confidence score
- Explicit user statement > inference > vague hint
- Conflicting information is flagged, never auto-overwritten
Architecture: Skill β Data Separation
{SKILL_DIR}/ β Skill (the engine)
~/.skills_data/soul-archive/ β Soul data (stored in your home directory)
The skill is the extraction engine; the soul data is yours. Because data lives in your home directory, any IDE, AI tool, or workspace on the same machine can access the same soul.
Data Directory Structure
~/.skills_data/soul-archive/
βββ profile.json # Soul profile (completeness, version)
βββ config.json # Privacy & extraction config
βββ identity/
β βββ basic_info.json # Identity + lifestyle + digital identity
β βββ personality.json # Personality + behavior + social style
βββ memory/
β βββ episodic/ # Episodic memory (date-based, JSONL)
β β βββ YYYY-MM-DD.jsonl
β βββ semantic/
β β βββ topics.json # Topic interest & opinion map
β β βββ knowledge.json # Professional knowledge
β βββ emotional/
β βββ patterns.json # Emotional triggers & patterns
βββ style/
β βββ language.json # Language fingerprint + deep features
β βββ communication.json # Communication preferences
βββ voice/ # Voice data (optional)
β βββ samples/
β βββ voice_profile.json
βββ relationships/
β βββ people.json # Relationship map
βββ agent/ # AI Self-Improvement
β βββ patterns.json # Behavioral pattern library
β βββ episodes/ # Work episodes (date-based)
β β βββ YYYY-MM-DD.jsonl
β βββ corrections.jsonl # Self-critique log
β βββ reflections.jsonl # Self-reflection log
βββ soul_changelog.jsonl # Change log
Four Working Modes
Mode 1: π Soul Extract
Trigger: Any of these trigger words, or auto-triggered at end of conversation (if auto_extract is enabled in config.json).
Trigger words: soul extract, soul archive, soul update, soul sync, soul snapshot, soul sediment, η΅ιζ²ζ·, η΅ιζε, η΅ιεζ‘£, εζζ, ζ²ζ·δΈδΈ...
Process:
- Read current conversation content
- Run
scripts/soul_extract.pyfor multi-dimensional analysis - Merge results into
~/.skills_data/soul-archive/data files - Update
profile.jsoncompleteness scores - Append to
soul_changelog.jsonl
Extraction dimensions:
| Dimension | Content | Storage |
|---|---|---|
| Identity | name, age, occupation, location, education | identity/basic_info.json |
| β³ Lifestyle | routine, diet, aesthetics, spending, music/film/book taste | identity/basic_info.json |
| β³ Digital identity | apps, platforms, online personas, tech proficiency | identity/basic_info.json |
| Personality | MBTI, Big Five, values, decision-making style | identity/personality.json |
| β³ Behavior patterns | risk tolerance, procrastination, perfectionism, planning, learning style | identity/personality.json |
| β³ Social style | social energy, group role, trust style, conflict approach | identity/personality.json |
| β³ Motivation drivers | achievement, money, recognition, freedom, curiosity | identity/personality.json |
| Language style | catchphrases, emoji use, sentence patterns, humor types | style/language.json |
| β³ Deep fingerprint | dialect features, filler words, persuasion style, narrative style | style/language.json |
| Communication mode | direct/indirect, logical/emotional, detailed/concise | style/communication.json |
| Topic opinions | interested topics, stances and views on each topic | memory/semantic/topics.json |
| Episodic memory | specific events, memories, life milestones | memory/episodic/ |
| Emotional patterns | 12 emotion triggers (joy/anger/sadness/anxiety/excitement/nostalgia/pride/gratitude/frustration/curiosity/peace/guilt) | memory/emotional/patterns.json |
| β³ Emotional depth | empathy, emotional awareness, coping activities, celebration style | memory/emotional/patterns.json |
| Relationships | mentioned people and their relationships | relationships/people.json |
Rules:
- Only archive high-confidence info (confidence > 0.6)
- Conflicts are flagged, never auto-overwritten
- Brief report output after each extraction
Execution:
python3 scripts/soul_extract.py --input "<conversation text>" --mode auto
Mode 2: π¬ Soul Chat
Trigger: "η΅ιε―Ήθ―", "soul chat", "let [my clone] talk to me"
Process:
- Load all data from
~/.skills_data/soul-archive/ - Build a role-playing System Prompt including: identity, personality, language style (catchphrases, templates, word preferences), knowledge/opinions map, emotional response patterns, relationships
- Converse as the digital clone
Key constraints:
- π« Never fabricate -- answer only from archived info; say "I don't quite remember that" if unsure
- π£οΈ Style consistency -- strictly mimic archived language style, including catchphrase frequency
- β€οΈ Emotional authenticity -- display archived emotional patterns, not generic AI responses
Execution:
python3 scripts/soul_chat.py --mode interactive
Mode 3: π Soul Report
Trigger: "η΅ιζ₯ε", "soul report", "generate my portrait"
Process:
- Read all data from
~/.skills_data/soul-archive/ - Generate a full HTML personality portrait report including:
- π Profile card
- π― Personality radar chart (Big Five)
- π£οΈ Language style analysis (word cloud, catchphrase ranking)
- π₯ Topic interest heatmap
- πΈοΈ Relationship network
- β€οΈ Emotional pattern analysis
- π Completeness assessment & fill suggestions
- Output as interactive HTML file
Execution:
python3 scripts/soul_report.py --output ~/WorkBuddy/Claw/soul-report.html
β οΈ Report is plaintext HTML with full personality data. Do NOT save to the data directory.
Mode 4: π AI Self-Improvement
Trigger: "θͺζεζ", "self-reflect", "self-improve", or auto-triggered after substantive tasks (controlled by auto_reflect in config.json, default: ON).
Four capabilities:
| Capability | Description | Trigger |
|---|---|---|
| π Self-Reflection | Review what went well/wrong after tasks | Auto on task completion |
| β‘ Self-Critique | Record errors when user corrects AI | Auto on user correction |
| π Self-Learning | Abstract reusable behavioral patterns | From reflections & critiques |
| π§Ή Self-Organization | Merge duplicates, adjust confidence, prune stale memories | When memory grows |
Execution:
python3 scripts/soul_reflect.py --mode status # View AI self-improvement status
python3 scripts/soul_reflect.py --mode patterns # View behavioral pattern library
Initialization
python3 scripts/soul_init.py
Creates ~/.skills_data/soul-archive/ with full directory structure and default config.
Soul Completeness Scoring
Log10 saturation curve -- approaches 100% asymptotically, never hard-caps within realistic usage.
Cold start penalty: Early extractions are discounted (<30 β 0.30Γ, <100 β 0.45Γ, <300 β 0.65Γ, <1000 β 0.82Γ, <3000 β 0.92Γ, β₯3000 β 1.0Γ)
| Dimension | Weight | Saturation |
|---|---|---|
| π€ Identity | 5% | log(5000) |
| π« Personality | 22% | traits:log(600K), values:log(180K), motivation:log(180K) |
| π£οΈ Language | 25% | catchphrases:log(1.2M), patterns:log(1M), examples:log(4M) |
| π§ Knowledge | 18% | topics:log(2M) |
| π Memory | 25% | episodic:log(6M) |
| π€ Relationships | 3% | people:log(120K) |
| π€ Voice | 2% | samples:log(10K) |
Expected: 11 ext β ~7%, 1K β ~51%, 10K β ~71%, 100K β ~86%, 1M β ~98%
π Data Protection
Soul Archive supports AES-256-GCM privacy protection for all sensitive data.
python3 scripts/soul_init.py --enable-protection
- Algorithm: AES-256-GCM (authenticated, tamper-resistant)
- Key derivation: PBKDF2-HMAC-SHA256, 600,000 iterations
- Scope: All identity, personality, language, memory, and relationship files
- Access key input: Interactive prompt (recommended),
SOUL_PASSWORDenv var (ensure environment security),--access-keyflag (not recommended -- leaks into shell history) - β οΈ Lost access key = lost data -- no recovery mechanism
Quick Start
# 1. Initialize
python3 scripts/soul_init.py
# 2. Check status
python3 scripts/soul_extract.py --mode status
# 3. Extract from conversation
python3 scripts/soul_extract.py --input "Your conversation here..." --mode auto
# 4. Generate report
python3 scripts/soul_report.py --output ~/WorkBuddy/Claw/soul-report.html
Requirements: Python 3.10+. Zero third-party dependencies for core;
cryptographypackage required only if data protection is enabled (pip install cryptography).
Privacy Config
~/.skills_data/soul-archive/config.json controls extraction behavior:
{
"privacy_level": "standard",
"auto_extract": false,
"auto_reflect": true,
"extract_dimensions": {
"identity": true,
"personality": true,
"language_style": true,
"knowledge": true,
"episodic_memory": true,
"emotional_patterns": true,
"relationships": false,
"voice": false
},
"agent_self_improvement": {
"enabled": true,
"auto_reflect_on_completion": true,
"auto_critique_on_correction": true,
"pattern_extraction": true
},
"sensitive_topics_filter": true,
"require_confirmation_for": ["health", "finance", "intimate_relationships"],
"data_retention_days": null,
"protection_enabled": false // see config.json for field mapping
}
Best Practices
DO
- β Extract naturally in conversation, without interrupting
- β Archive only high-confidence information
- β Flag conflicts for user to decide
- β Generate reports regularly for user to review accuracy
- β Respect privacy config -- never extract disabled dimensions
DON'T
- β Say "I'm recording your information" during conversation
- β Fabricate information the user hasn't stated
- β Fabricate memories not in the archive in Soul Chat mode
- β Forcefully elicit sensitive information from users
- β Collect relationships/voice data without config permission