LifeOS - Reconhecimento de Padrões para Vida
pelzade127/lifeOS
IA para detectar padrões comportamentais e simular consequências de decisões
Ver no GitHubSistema de apoio à vida baseado em IA que identifica padrões comportamentais recorrentes, simula consequências de decisões em múltiplos horizontes temporais e interrompe ciclos de autossabotagem. Desenvolvido para adultos de alto potencial com transtornos mentais ou neurodivergência, funciona como interface conversacional sem formulários rígidos.
Instalação
npx convez-ai pelzade127/lifeOS1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Identificar ciclos repetitivos de decisões sabotadoras
- Simular impacto de escolhas em horizontes de 1 semana, 1 mês e 6 meses
- Interromper padrões de escape, acomodação de terceiros e impulsos com alertas contextualizados
- Monitorar alinhamento de decisões com valores pessoais
Veredito

LifeOS é um plugin inovador que combina psicologia comportamental com IA para oferecer suporte real no reconhecimento de padrões autodestrutivos. Sua arquitetura minimalista (HTML/React em arquivo único) e ausência de dependências externas o tornam acessível, mas a qualidade das insights depende fortemente da implementação do mecanismo de detecção de padrões e calibração de tone.
README
A tradução para o português deste README ainda está na fila.
LifeOS - Pattern Recognition for Life
A free, web-based AI life-support system built for high-potential adults with mental illness or neurodivergence who feel like they are "doing life wrong."
🎯 Core Problem
Users make decisions that feel right in the moment but have lasting negative consequences they couldn't anticipate. LifeOS exists to help users identify hidden patterns in behavior and decision-making, simulate long-term outcomes, and interrupt self-sabotage.
✨ Key Features
1. Chat-First Interface
- Natural conversation as the primary interaction
- No forced forms or rigid structure
- Adaptive tone based on user state
2. Pattern Detection Engine
- Identifies recurring themes across conversations
- Tracks decision archetypes (escape decisions, people-pleasing, impulse-driven choices)
- Detects temporal and emotional patterns
3. Decision Simulation
- 3-horizon framework: 1 week / 1 month / 6 months
- Second-order effect exploration
- Values alignment scoring
4. Insight Surfacing
- Pattern summaries with contextual examples
- "Déjà vu alerts" when current decisions mirror past patterns
- Real-time pattern notifications
🚀 Quick Start
Option 1: Open Directly in Browser
- Download
lifeos.html - Open it in any modern browser (Chrome, Firefox, Safari, Edge)
- Start conversing
That's it. No installation, no servers, no dependencies.
Option 2: Deploy to Vercel (Production)
# 1. Install Vercel CLI
npm i -g vercel
# 2. Create a new directory
mkdir lifeos-app
cd lifeos-app
# 3. Copy lifeos.html to directory
cp /path/to/lifeos.html index.html
# 4. Deploy
vercel
Follow the prompts. Your app will be live in ~30 seconds.
🏗️ Technical Architecture
┌─────────────────────────────────────────────────────────┐
│ USER INTERFACE LAYER │
│ (React 18 - Single File App) │
└─────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────┐
│ CONVERSATION MANAGER │
│ - Intent classification │
│ - Context window management │
│ - Tone calibration │
└─────────────────────────────────────────────────────────┘
↓
┌──────────────────┴──────────────────┐
↓ ↓
┌──────────────────┐ ┌──────────────────────┐
│ PATTERN ENGINE │ │ DECISION SIMULATOR │
│ │ │ │
│ • Keyword │ │ • Consequence trees │
│ analysis │◄────────────►│ • Time horizons │
│ • Theme tagging │ │ • Risk assessment │
│ • Cycle detection│ │ │
└──────────────────┘ └──────────────────────┘
↓ ↓
┌─────────────────────────────────────────────────────────┐
│ LOCAL STORAGE LAYER │
│ (Browser localStorage API) │
│ │
│ Keys: │
│ • lifeos_messages (conversation history) │
│ • lifeos_patterns (detected patterns) │
│ • lifeos_settings (user preferences) │
└─────────────────────────────────────────────────────────┘
Technology Stack
| Component | Technology | Reasoning |
|---|---|---|
| Frontend | React 18 (CDN) | No build step, instant load, works offline |
| Styling | Pure CSS | Zero dependencies, full control, excellent performance |
| Storage | localStorage | Privacy-first, works offline, no backend needed |
| AI | Simulated (Claude API ready) | Pattern matching with keyword detection, easy to swap in real API |
| Fonts | Google Fonts | Crimson Pro (elegant serif) + IBM Plex Mono (technical feel) |
🎨 Design Philosophy
Visual Identity
- Dark theme: Reduces cognitive load, creates calm environment
- Animated gradients: Subtle depth without distraction
- Crimson Pro serif: Warm, literary, thoughtful
- IBM Plex Mono: Technical precision for data/patterns
Color System
--bg-primary: #0a0e12 /* Deep space black */
--accent-primary: #7aa2f7 /* Calming blue */
--accent-secondary: #bb9af7 /* Thoughtful purple */
--accent-warm: #ff9e64 /* Gentle orange for emphasis */
UX Principles
- Conversation-first: No barriers to starting
- Progressive disclosure: Complex features appear as needed
- Calm technology: Smooth animations, generous spacing
- Transparency: Show why patterns were detected
🧠 Pattern Detection Algorithm
Current Implementation (MVP)
// Three primary pattern types
1. Escape When Overwhelmed
Triggers: quit, leave, escape, overwhelmed, drowning
2. Repeating Mistakes
Triggers: again, same, keep, always, every time
3. Impulse-Driven Decisions
Triggers: right now, immediately, urgent, need to
Pattern Detection Logic
- Analyzes last 5 user messages
- Requires 2+ keyword matches to trigger
- Stores examples for user review
- Increments detection count on recurrence
Future Enhancements (Post-MVP)
- Semantic similarity using embeddings
- Temporal pattern analysis (time-of-day, day-of-week)
- Emotional tone tracking via sentiment analysis
- Cross-pattern correlation
🛡️ Ethical Safeguards
Crisis Detection
// Immediate override for crisis keywords
const crisisKeywords = [
'kill myself',
'suicide',
'end it all',
'want to die',
'hurt myself'
];
// Response: Crisis resources + professional referral
Hard Boundaries
- ❌ No medical diagnoses
- ❌ No therapeutic treatment
- ❌ No spiritual authority claims
- ❌ No financial advice
- ✅ Pattern observation only
- ✅ Professional referrals when needed
Privacy
- All data stored locally (localStorage)
- No analytics, no tracking
- User controls all data (clear/export)
- No third-party API calls in demo
📊 Data Structures
Message Object
{
role: 'user' | 'assistant',
content: string,
timestamp: number
}
Pattern Object
{
id: string, // 'escape-when-overwhelmed'
title: string, // 'Escape When Overwhelmed'
description: string, // Human-readable explanation
detectedCount: number, // How many times triggered
examples: string[] // Conversation snippets
}
Settings Object
{
userName: string, // Optional personalization
worldview: string, // secular | faith-based | philosophical
apiKey: string // For future Claude API integration
}
🔌 Integrating Real AI (Claude API)
Currently, LifeOS uses simulated responses for demo purposes. To integrate the real Claude API:
1. Get API Key
# Sign up at https://console.anthropic.com
# Create API key
2. Update sendMessage Function
const sendMessage = async () => {
// ... existing validation ...
try {
const response = await fetch('https://api.anthropic.com/v1/messages', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': settings.apiKey,
'anthropic-version': '2023-06-01'
},
body: JSON.stringify({
model: 'claude-sonnet-4-20250514',
max_tokens: 1000,
system: SystemPrompts.getSystemPrompt(settings.userName, settings.worldview, patterns),
messages: newMessages.map(m => ({
role: m.role,
content: m.content
}))
})
});
const data = await response.json();
const assistantMessage = {
role: 'assistant',
content: data.content[0].text,
timestamp: Date.now()
};
// ... rest of existing logic ...
} catch (error) {
console.error('API error:', error);
// Fallback to simulated response
}
};
3. Add API Key Input to Settings
Already built into the settings modal - just needs backend integration.
🎯 Success Metrics (Demo)
For portfolio demonstration:
- Pattern Detection Accuracy: Does it catch the 3 core patterns?
- User Experience: Smooth, calming, non-judgmental?
- Ethical Boundaries: Clear crisis handling and referrals?
- Technical Excellence: Clean code, good performance, responsive?
🚧 Current Limitations
MVP Constraints
- Simulated AI: Keyword-based pattern detection (not semantic)
- No backend: All data in browser localStorage
- No authentication: Single-user device only
- Limited patterns: 3 types (escape, repetition, impulse)
- No analytics: Can't track effectiveness over time
Future Features (Post-MVP)
- Real Claude API integration
- Semantic pattern detection with embeddings
- Weekly/monthly reflection summaries
- Data export (JSON, PDF report)
- Multi-device sync (optional backend)
- Advanced decision simulation with probabilistic outcomes
📝 Example Usage Flow
User opens LifeOS
↓
Reads welcome message
↓
Clicks "Start Conversation"
↓
LifeOS: "Hey. I'm LifeOS. Think of me as a pattern-recognition
system for your life..."
↓
User: "I keep fucking up at work. Thinking about quitting."
↓
LifeOS: "Have you made a big change like this before when you
felt overwhelmed?"
↓
User: "Yeah, I quit my last job too."
↓
LifeOS: [PATTERN DETECTED: Escape When Overwhelmed]
"I'm noticing this decision follows the same pattern as the
last time. This might be a pattern, not a solution."
↓
User: "...fuck. Yeah. That's exactly it."
↓
LifeOS: "Let's focus on reducing overwhelm within this job
for two weeks, then reassess?"
🎨 Design Tokens
Typography
/* Display */
font-family: 'Crimson Pro', serif;
font-weight: 300 | 400 | 600;
/* Monospace (data/code) */
font-family: 'IBM Plex Mono', monospace;
font-weight: 400 | 500;
Spacing Scale
--space-xs: 0.25rem; /* 4px */
--space-sm: 0.5rem; /* 8px */
--space-md: 1rem; /* 16px */
--space-lg: 1.5rem; /* 24px */
--space-xl: 2rem; /* 32px */
--space-2xl: 3rem; /* 48px */
Animation Timing
--timing-fast: 0.2s;
--timing-base: 0.3s;
--timing-slow: 0.6s;
--easing: cubic-bezier(0.4, 0, 0.2, 1);
🤝 Contributing
This is a portfolio project, but feedback is welcome:
- Found a bug? Open an issue with steps to reproduce
- Have an idea? Describe the use case and why it matters
- Want to improve UX? Show before/after designs
Development Setup
# No setup needed - it's a single HTML file!
# Just open in browser and start editing
# For live reload during development:
npx live-server
📄 License
MIT License - feel free to use, modify, and learn from this code.
Built by Pelz as part of a comprehensive fintech portfolio, demonstrating:
- Applied cognitive psychology and behavioral economics
- Ethical AI system design with clear safety boundaries
- Compassionate user experience for high-stakes scenarios
- Full-stack technical execution (React, localStorage, API-ready architecture)
- Product thinking: solving real problems for specific user segments
🎯 Portfolio Positioning (For Fintech Interviews)
This project demonstrates capabilities highly valued in financial services:
Why This Matters for Financial Services
1. Risk Assessment & Decision Modeling
- LifeOS's 3-horizon decision simulation mirrors risk modeling in trading/lending
- Shows understanding of second-order effects and probabilistic thinking
- Demonstrates ability to help users evaluate decisions under uncertainty
2. Pattern Detection & Behavioral Analysis
- Core competency for fraud detection systems
- Behavioral pattern recognition applies to customer financial behavior analysis
- Shows understanding of how to surface insights from temporal data
3. Ethical AI & Responsible Design
- Critical for banks deploying AI in consumer products
- Clear boundaries, crisis detection, and privacy-first architecture
- Demonstrates thinking about AI safety before deploying
4. User Trust & Security
- Privacy-first design (local storage, no tracking) aligns with banking security
- Crisis intervention shows understanding of high-stakes user scenarios
- Ethical guardrails demonstrate mature product thinking
5. Full-Stack Capability
- Complements your fintech portfolio (Budget Buddy, Fraud Detection, Stress Simulator)
- Shows you can go from concept → design → implementation → deployment
- Clean architecture that scales from prototype to production
Skills Demonstrated
| Skill | How LifeOS Shows It |
|---|---|
| Behavioral Economics | Decision simulation, pattern detection in user choices |
| Risk Modeling | 3-horizon consequence analysis, probabilistic outcomes |
| System Design | Modular architecture, separation of concerns |
| Ethics & Compliance | Clear boundaries, crisis protocols, privacy design |
| Frontend Excellence | Production-quality React, accessibility, responsive design |
| Product Thinking | Solved a real problem for a specific user segment |
How to Present This
In interviews, position LifeOS as:
"A pattern recognition system that helps users make better decisions by simulating long-term consequences and detecting behavioral patterns. It demonstrates my ability to build ethical AI systems with clear risk boundaries—skills directly applicable to consumer banking products that require both technical excellence and responsible design."
Key talking points:
- Built with ethical AI principles and responsible design practices
- Pattern detection similar to fraud/anomaly detection in banking
- Decision modeling parallels credit risk assessment
- Privacy-first architecture aligns with financial data security
- Complete solo build (design → code → deploy) in portfolio timeline
This is your "I can build thoughtful, ethical systems" project that complements your "I can build technical fintech systems" projects.
🔗 Resources
💭 Philosophy
"LifeOS doesn't fix you. It helps you see yourself clearly enough to fix what's fixable — and accept what isn't."
This is not a replacement for therapy, spiritual guidance, or human connection. It's a tool for pattern recognition — nothing more, nothing less.
Use it wisely. Use it kindly. Use it as a supplement, not a substitute.
Version: 1.0.0-MVP
Last Updated: January 2026
Status: Portfolio Demo (Production-Ready Architecture)