Autonomous Intelligence Engines
Self-monitoring systems that proactively detect risks, generate insights, and plan corrective actions โ no user intervention required.
These engines implement autonomous monitoring โ they continuously analyze behavioral data, classify states into lifecycle phases, detect anomalies via statistical methods (linear regression, compound interest models, Mahalanobis distance), and generate actionable recommendations. Each engine operates independently but shares cross-cutting signals when metrics overlap.
Overview
The autonomous intelligence layer contains 15 engines that model different aspects of cognitive and behavioral health. Unlike standard CRUD services, these engines maintain rolling statistical windows, classify lifecycle phases, predict future states, and generate proactive interventions.
| Engine | Monitors | Key Metric | Intervention Style |
|---|---|---|---|
| Attention Debt | Deferred decisions & unresolved items | Debt Score (0โ100) | Sprint planning + amortization |
| Momentum Engine | Task completion throughput | Velocity (completions/day) | Adaptive micro-nudges |
| Drift Detector | Gradual lifestyle regression | Drift severity per metric | Recovery nudges + tipping-point prediction |
| Behavioral Fingerprint | 8-dimensional behavioral signature | Deviation distance from baseline | Change narratives |
| Burnout Detector | Multi-signal burnout risk | Risk level (lowโcritical) | Recovery recommendations |
| Willpower Budget | Daily cognitive resource depletion | Remaining budget (0โ100) | Strategic recovery actions |
| Ritual Engine | Daily routine adherence | Chain Health (0โ100) | Timing micro-adjustments |
| Regret Minimization | Decision outcomes over time | Regret patterns + bias detection | Personalized decision wisdom |
| Streak Guardian | Cross-tracker streak risk | Streak risk level (safeโbroken) | Proactive rescue strategies |
| Decision Fatigue | Decision quality degradation | Remaining capacity (0โ100) | Batch/defer recommendations |
| Stress Cascade | Inter-domain stress propagation | Cascade severity per domain | Buffer management + recovery forecasts |
| Focus Entropy | Attention fragmentation | Shannon entropy (bits) | Deep-work scheduling + flow coaching |
| Chronotype Optimizer | Circadian rhythm alignment | Alignment score (0โ100) | Time-of-day scheduling optimization |
| Social Capital | Relationship network health | Network health score (0โ100) | Relationship investment nudges |
| Friction Journal | Micro-frustration patterns | Friction score by category | Elimination strategies |
๐ง AttentionDebtService
lib/core/services/attention_debt_service.dart
Models cognitive overhead as financial debt โ unresolved items accrue cognitive interest over time using compound interest formulas. When total debt exceeds capacity, the system declares cognitive bankruptcy and triggers emergency triage.
Core Concepts
- Debt Item โ any deferred decision, postponed task, or unresolved mental load
- Cognitive Interest โ
baseCost ร (1 + dailyRate)^daysOpenโ grows exponentially - Postponement Penalty โ each postponement adds 20% multiplier to effective cost
- Debt Score โ 0โ100 scale mapped from total debt vs. 500-unit capacity via sigmoid
- Bankruptcy Threshold โ score โฅ 80 triggers emergency triage mode
Debt Categories & Interest Rates
| Category | Daily Interest | Base Cost | Rationale |
|---|---|---|---|
| ๐ Avoided Conversation | 15% | 12 | Avoidance is the most expensive debt |
| โ๏ธ Unresolved Conflict | 12% | 16 | Conflicts compound emotional overhead fast |
| ๐จ Pending Response | 10% | 6 | Social obligations create ambient anxiety |
| ๐คท Deferred Decision | 8% | 10 | Every open decision consumes working memory |
| ๐ Information Backlog | 6% | 7 | Unprocessed info creates guilt loops |
| โณ Postponed Task | 5% | 8 | Tasks grow harder the longer they wait |
| ๐ฏ Undefined Goal | 4% | 9 | Vague goals drain background attention |
| ๐๏ธ Incomplete Project | 3% | 14 | Slow burn but high base cost |
Urgency Classification
Based on the ratio of effectiveCost / baseCost:
| Urgency | Ratio Threshold | Meaning |
|---|---|---|
| ๐ข Low | < 1.5ร | Recently added, manageable |
| ๐ก Moderate | 1.5รโ3ร | Starting to accumulate interest |
| ๐ High | 3รโ6ร | Significant cognitive burden |
| ๐ด Critical | 6รโ12ร | Actively draining cognitive resources |
| ๐ Bankruptcy | โฅ 12ร | Item alone is overwhelming |
Sprint System
The service autonomously recommends sprint types based on current debt score:
| Sprint Type | Duration | Trigger (Debt Score) | Purpose |
|---|---|---|---|
| Micro Sprint | 15 min | < 30 | Resolve 1โ2 quick items |
| Focus Sprint | 45 min | 30โ60 | Tackle 1 medium item deeply |
| Deep Clean | 2 hours | 60โ80 | Clear multiple items |
| Emergency Triage | 60 min | โฅ 80 | Bankruptcy mode โ triage everything |
Key Methods
| Method | Returns | Description |
|---|---|---|
addItem(item) | void | Add a new debt item |
resolveItem(id) | void | Mark item as resolved (sets resolvedAt) |
postponeItem(id) | void | Increment postponement counter (+20% penalty) |
totalDebt | double | Sum of all open items' effective costs |
debtScore | double | 0โ100 cognitive load score |
topOffenders([n]) | List<AttentionDebtItem> | Top N most expensive open items |
itemsApproachingCritical({withinDays}) | List<AttentionDebtItem> | Items that will hit critical urgency within N days |
planSprintItems(type) | List<AttentionDebtItem> | Select priority items for a sprint session |
startSprint(type) | DebtSprint | Start a new debt reduction sprint |
completeSprint(id, resolvedIds) | void | Complete sprint, mark resolved items, record debt reduced |
generateAmortizationPlan({targetDays}) | List<AmortizationEntry> | Auto-schedule debt resolution over N days |
generateInsight() | String | Natural-language analysis of current debt situation |
getPortfolio() | DebtPortfolio | Complete portfolio analysis with all metrics |
Usage Example
๐ MomentumEngineService
lib/core/services/momentum_engine_service.dart
Tracks task/habit/goal completion velocity (completions per day) over rolling windows, classifies momentum into lifecycle phases, detects blockers, and generates adaptive micro-nudges to sustain productive flow.
Momentum Phases
| Phase | Description | Intervention |
|---|---|---|
| ๐ฅ Igniting | Just getting started, building initial velocity | Celebrate small wins, reduce friction |
| ๐ Accelerating | Velocity increasing between windows | Maintain current approach, stack momentum |
| โ๏ธ Cruising | Stable high velocity | Protect the flow state, avoid disruptions |
| ๐ถ Coasting | Velocity stable but declining slightly | Micro-nudges to prevent stalling |
| โ ๏ธ Stalling | Clear velocity drop, blockers likely | Blocker identification + targeted nudges |
| ๐ฅ Crashed | Near-zero velocity, momentum lost | Recovery protocol โ restart with micro-goals |
Key Concepts
- Velocity โ rolling completion rate over configurable windows (default: 7/14/30 days)
- Acceleration โ change in velocity between consecutive windows (positive = speeding up)
- Blocker Detection โ pattern analysis to identify what's causing momentum loss
- Micro-Nudges โ context-aware, adaptive suggestions calibrated to current phase
Key Methods
| Method | Returns | Description |
|---|---|---|
recordCompletion(item) | void | Log a task/habit/goal completion event |
velocity | double | Current rolling completion rate (per day) |
acceleration | double | Rate of change in velocity |
phase | MomentumPhase | Current lifecycle classification |
detectBlockers() | List<Blocker> | Identify patterns causing momentum loss |
generateNudge() | String | Context-aware micro-nudge for current phase |
getReport() | MomentumReport | Full momentum analysis with trends |
๐ธ DriftDetectorService
lib/core/services/drift_detector_service.dart
The "boiling frog" detector โ monitors gradual lifestyle regression across multiple metrics using linear regression over rolling windows. Detects slow negative changes that humans don't notice, predicts tipping points, and correlates cross-metric slides.
Drift Severity Levels
| Level | Meaning | Action |
|---|---|---|
| ๐ Improving | Metric trending positively | Reinforce current behavior |
| โก๏ธ Stable | No significant change | Continue monitoring |
| ๐ Drifting | Slight negative trend detected | Awareness nudge |
| โ ๏ธ Sliding | Consistent downward trajectory | Active intervention recommended |
| ๐ Freefall | Rapid degradation | Emergency recovery protocol |
How It Works
- Data Collection โ aggregates daily metric values from other services (sleep quality, mood, productivity, etc.)
- Rolling Regression โ fits linear regression over configurable windows to detect slope direction
- Tipping Point Prediction โ extrapolates when a metric will cross a danger threshold at current rate
- Cross-Metric Correlation โ detects when multiple metrics drift together (e.g., sleep down โ mood down โ productivity down)
- Recovery Nudges โ generates targeted suggestions based on which metrics are sliding and their correlations
Key Methods
| Method | Returns | Description |
|---|---|---|
recordMetric(name, value, date) | void | Log a daily metric data point |
analyzeMetric(name) | DriftAnalysis | Regression analysis for a single metric |
analyzeAll() | Map<String, DriftAnalysis> | Analyze all tracked metrics |
predictTippingPoint(name) | DateTime? | Estimated date metric crosses danger threshold |
findCorrelations() | List<MetricCorrelation> | Detect co-drifting metrics |
generateReport() | DriftReport | Full drift analysis with recovery suggestions |
๐ฌ BehavioralFingerprintService
lib/core/services/behavioral_fingerprint_service.dart
Creates a multi-dimensional behavioral signature from daily patterns across 8 measurable axes and detects when the user deviates significantly from their baseline self using Mahalanobis-inspired distance metrics.
Behavioral Dimensions
| Dimension | What It Measures |
|---|---|
| ๐ Activity Timing | When you tend to be active โ early bird vs. night owl patterns |
| โก Task Velocity | How quickly you complete tasks once started |
| ๐ Category Preferences | Which categories of activity dominate your time |
| ๐ Consistency | How regular your daily patterns are day-to-day |
| ๐ฅ Social Engagement | How much you interact with others vs. solo work |
| ๐ Energy Curve | Your energy distribution across the day |
| โ Completion Patterns | How you sequence and complete tasks |
| ๐งญ Exploration vs. Routine | How much you try new things vs. repeat familiar patterns |
Identity Phases
| Phase | Description |
|---|---|
| ๐ข Authentic | Behavior closely matches established baseline โ "being yourself" |
| ๐ก Shifting | Moderate deviation โ possible context change or adaptation |
| ๐ Exploring | Significant deviation โ actively trying new patterns |
| ๐ด Disrupted | Major deviation โ external disruption or crisis |
| ๐ฃ Transformed | Sustained deviation โ your baseline has fundamentally changed |
Key Methods
| Method | Returns | Description |
|---|---|---|
recordBehavior(snapshot) | void | Log a daily behavioral snapshot across all 8 dimensions |
getFingerprint() | BehavioralFingerprint | Current normalized signature vector |
getBaseline() | BehavioralFingerprint | Stable reference fingerprint from history |
deviation | double | Distance from baseline (Mahalanobis-inspired) |
identityPhase | IdentityPhase | Current behavioral classification |
dimensionBreakdown() | Map<BehaviorDimension, DeviationDetail> | Per-dimension deviation analysis |
generateNarrative() | String | Human-readable explanation of behavioral changes |
๐ฅ BurnoutDetectorService
lib/core/services/burnout_detector_service.dart
Multi-signal burnout risk analysis engine that aggregates stress indicators from across the app, computes resilience scores, detects warning patterns, and generates proactive recovery recommendations before burnout hits.
Risk Levels
| Level | Description | Response |
|---|---|---|
| ๐ข Low | Healthy balance, resilience strong | Continue current patterns |
| ๐ก Moderate | Some stress indicators present | Monitor, schedule recovery |
| ๐ Elevated | Multiple warning signals active | Reduce load, increase breaks |
| ๐ด High | Burnout trajectory confirmed | Immediate load reduction required |
| ๐ Critical | Active burnout state | Emergency intervention โ cancel non-essentials |
Signal Sources
- Sleep Quality โ declining sleep duration or quality trends
- Mood Patterns โ persistent low mood or emotional flatness
- Productivity Changes โ declining output despite same or increased effort
- Social Withdrawal โ reduced contact tracker activity
- Habit Disruption โ broken streaks across multiple trackers
- Energy Levels โ sustained low energy readings
- Screen Time โ excessive or erratic screen time patterns
Key Methods
| Method | Returns | Description |
|---|---|---|
analyze() | BurnoutAnalysis | Full multi-signal burnout assessment |
riskLevel | BurnoutRiskLevel | Current classification (lowโcritical) |
resilienceScore | double | 0โ100 resilience rating |
warningSignals | List<BurnoutSignal> | Active warning indicators with severity |
recommendations | List<String> | Prioritized recovery recommendations |
โก WillpowerBudgetService
lib/core/services/willpower_budget_service.dart
Models daily willpower as a finite, depletable resource based on ego depletion theory. Starts at 100 each day, drained by cognitive demands (decisions, resistance, focus blocks), and partially restored by strategic recovery actions. Predicts decision fatigue windows and rates how well the user manages cognitive resources.
Willpower Zones
| Zone | Budget Range | Behavior |
|---|---|---|
| ๐ข Full Tank | 80โ100 | Peak cognitive capacity โ make important decisions now |
| ๐ก Comfortable | 60โ80 | Good capacity โ routine decisions and focused work |
| ๐ Stretching | 40โ60 | Declining โ avoid major decisions, use routines |
| ๐ด Depleted | 20โ40 | Decision fatigue active โ autopilot mode recommended |
| ๐ Empty | 0โ20 | Ego depletion โ rest immediately, no decisions |
Demand & Recovery Model
- Demands โ decisions, resisting temptation, sustained focus, context switches, emotional regulation
- Recovery โ rest breaks, meals, exercise, meditation, nature exposure, sleep
- Fatigue Forecast โ predicts when budget will cross each zone boundary at current drain rate
- Strategic Score โ rates how well the user allocates high-demand tasks to high-budget periods
Key Methods
| Method | Returns | Description |
|---|---|---|
recordDemand(demand) | void | Log a willpower-draining event with cost |
recordRecovery(action) | void | Log a recovery action with restoration amount |
remainingBudget | double | Current willpower remaining (0โ100) |
currentZone | WillpowerZone | Current zone classification |
forecastFatigue() | FatigueForecast | Predict when each zone boundary will be crossed |
strategicScore | double | How well cognitive resources are being managed |
getDailyReport() | WillpowerReport | Full day analysis with demand/recovery timeline |
๐ RitualEngineService
lib/core/services/ritual_engine_service.dart
Tracks daily routine execution patterns, learns optimal timing windows via historical analysis, detects 6 types of disruptions with severity scoring, and generates context-aware micro-adjustments to improve ritual adherence.
Rhythm States
| State | Description |
|---|---|
| ๐ Locked In | Ritual executed consistently at optimal time โ fully habitualized |
| โ Consistent | Regular execution with minor timing variance |
| ๐ Drifting | Timing becoming inconsistent โ intervention window open |
| โ ๏ธ Disrupted | Active disruption detected โ pattern broken |
| โ Abandoned | No execution for extended period |
Key Concepts
- Timing Score (0โ100) โ how close each execution was to the learned optimal window
- Chain Health (0โ100) โ overall daily ritual sequence scoring
- Disruption Types โ 6 classified disruption patterns (schedule shift, motivation loss, external blocker, fatigue, overload, travel)
- Micro-Adjustments โ small, actionable timing/sequence changes based on recent data
Key Methods
| Method | Returns | Description |
|---|---|---|
defineRitual(ritual) | void | Register a ritual with target time window |
recordExecution(ritualId, timestamp) | void | Log a ritual execution event |
getRhythmState(ritualId) | RhythmState | Current lifecycle phase for a ritual |
timingScore(ritualId) | double | How close recent executions are to optimal |
chainHealth | double | Overall daily ritual chain health (0โ100) |
detectDisruptions() | List<Disruption> | Active disruptions with type and severity |
suggestAdjustments() | List<MicroAdjustment> | Context-aware timing/sequence recommendations |
๐ฎ RegretMinimizationService
lib/core/services/regret_minimization_service.dart
Inspired by Bezos's regret minimization framework โ records decisions with context and stakes, tracks outcomes over time, detects regret patterns (action vs. inaction), identifies recurring cognitive biases, and distills personalized decision-making wisdom. The ultimate question: "Will 80-year-old me regret NOT doing this?"
Decision Domains
Decisions are categorized across 8 life domains: Career, Relationships, Health, Finance, Education, Lifestyle, Creative, and Other. Each domain builds its own regret profile over time.
Analysis Pipeline
- Decision Recording โ log decisions with context, stakes, emotional state, and alternatives considered
- Outcome Tracking โ revisit decisions after configurable time periods to record actual outcomes
- Regret Classification โ categorize outcomes as regret of action (did it, wish I hadn't) or regret of inaction (didn't do it, wish I had)
- Bias Detection โ identify recurring cognitive biases from decision patterns (status quo bias, loss aversion, sunk cost, etc.)
- Wisdom Distillation โ generate personalized decision-making principles from your history
Key Methods
| Method | Returns | Description |
|---|---|---|
recordDecision(decision) | void | Log a new decision with context and stakes |
recordOutcome(decisionId, outcome) | void | Record the actual outcome after time passes |
analyzeRegretPatterns() | RegretAnalysis | Detect action-vs-inaction regret trends by domain |
detectBiases() | List<CognitiveBias> | Identify recurring decision-making biases |
generateWisdom() | List<String> | Personalized decision principles distilled from history |
futureRegretTest(scenario) | FutureRegretResult | "Will 80-year-old me regret not doing this?" |
getReport() | RegretReport | Full decision analysis with bias profile |
๐ก๏ธ StreakGuardianService
lib/core/services/streak_guardian_service.dart
Cross-tracker streak risk aggregator that monitors streaks from habits, workouts, meditation, water intake, sleep, and event activity. Detects at-risk streaks before they break and generates rescue strategies.
Risk Levels
| Level | Description | Action |
|---|---|---|
| ๐ข Safe | Streak on track, no concerns | Continue as normal |
| ๐ก Watch | Slight delay or variance detected | Gentle reminder |
| ๐ Danger | Streak at risk โ time running out today | Urgent nudge with specific action |
| ๐ด Critical | Hours remaining before streak breaks | Emergency rescue strategy |
| ๐ Broken | Streak has ended | Recovery plan + motivation boost |
Key Methods
| Method | Returns | Description |
|---|---|---|
registerStreak(tracker) | void | Register a streak source for monitoring |
assessRisk(trackerId) | StreakRiskAssessment | Evaluate risk for a specific streak |
assessAll() | List<StreakRiskAssessment> | Evaluate all monitored streaks |
atRiskStreaks() | List<StreakRiskAssessment> | Only streaks in danger/critical state |
generateRescue(trackerId) | RescueStrategy | Generate specific rescue action for at-risk streak |
healthScore | double | Overall streak portfolio health (0โ100) |
๐งฎ DecisionFatigueService
lib/core/services/decision_fatigue_service.dart
Tracks decision-making patterns throughout the day, detects cognitive degradation, estimates remaining decision capacity, identifies peak quality windows, and proactively recommends batching or deferring decisions when fatigue is predicted.
Core Concepts
- Decision Event โ each choice recorded with weight, category, and outcome
- Quality Score โ estimated decision quality that drops as capacity depletes
- Capacity โ daily decision budget (100 units) that depletes with each choice weighted by cognitive cost
- Peak Window โ historical time slots when decision quality was highest
- Batch Suggestion โ recommendation to group similar-category decisions together
Decision Weights & Cognitive Cost
| Weight | Symbol | Cognitive Cost | Example |
|---|---|---|---|
| Trivial | ยท | 1.0ร | What to eat for a snack |
| Minor | โ | 2.5ร | Reply to a routine email |
| Moderate | โ | 5.0ร | Accept a meeting invitation |
| Significant | โ | 10.0ร | Negotiate a contract term |
| Critical | โ | 20.0ร | Accept a job offer |
Fatigue Levels
| Level | Capacity Remaining | Recommendation |
|---|---|---|
| ๐ข Fresh | > 80% | Tackle important decisions now |
| ๐ต Alert | 60โ80% | Still sharp โ moderate decisions OK |
| ๐ก Mildly Tired | 40โ60% | Batch trivial decisions, defer significant ones |
| ๐ Fatigued | 20โ40% | Only essential decisions โ defer everything else |
| ๐ด Exhausted | < 20% | No major decisions โ defer to tomorrow |
Decision Categories
Decisions are grouped by category for pattern analysis: Scheduling, Financial, Social, Health, Work, Creative, Personal. The engine detects which categories cluster together and suggests batching windows.
Key Methods
| Method | Returns | Description |
|---|---|---|
recordDecision(event) | void | Log a decision with weight, category, and optional outcome |
addPendingDecision(...) | void | Register a pending decision that contributes to ambient load |
clearPendingDecisions() | void | Clear resolved pending decisions |
export() | String | JSON export of all decision history and fatigue state |
๐ StressCascadeEngineService
lib/core/services/stress_cascade_engine_service.dart
Models how stress in one life domain cascades into others, tracks resilience buffers, detects approaching tipping points, and forecasts recovery trajectories. Uses a 6-domain stress propagation model.
Stress Domains
| Domain | Emoji | Examples |
|---|---|---|
| Work | ๐ผ | Deadlines, conflicts, workload |
| Health | ๐ฅ | Illness, injury, sleep deprivation |
| Social | ๐ฅ | Relationship strain, isolation |
| Financial | ๐ฐ | Debt, unexpected expenses |
| Environmental | ๐ | Noise, commute, living conditions |
| Existential | ๐ง | Purpose, identity, meaning |
7 Sub-Engines
- Stress Source Tracker โ logs stressors with severity and domain classification
- Cascade Simulator โ models inter-domain stress propagation using weighted adjacency
- Resilience Scorer โ measures coping capacity via recovery rate analysis
- Tipping Point Detector โ identifies approaching breakdown thresholds per domain
- Buffer Analyzer โ tracks stress buffers (sleep, exercise, social support) and depletion rates
- Recovery Forecaster โ predicts time-to-recovery per domain based on historical patterns
- Insight Generator โ ranked actionable recommendations for stress management
Key Methods
| Method | Returns | Description |
|---|---|---|
addEvent(event) | void | Record a stress event with domain, severity, and source |
loadSampleData() | void | Populate with sample data for demo/testing |
events | List<StressEvent> | Unmodifiable list of all recorded stress events |
๐ฏ FocusEntropyEngineService
lib/core/services/focus_entropy_engine_service.dart
Uses Shannon entropy (H = โฮฃ p logโ p) to quantify how scattered attention is across life domains. Tracks context-switching costs, identifies deep-work blocks, scores flow-state quality, and forecasts focus trajectory via linear regression.
Focus Grades
| Grade | Emoji | Entropy Range | Meaning |
|---|---|---|---|
| Laser | ๐ฏ | < 0.5 bits | Near-total single-domain focus |
| Focused | ๐ฌ | 0.5โ1.2 bits | Concentrated with minimal switching |
| Balanced | โ๏ธ | 1.2โ2.0 bits | Healthy distribution across domains |
| Scattered | ๐ | 2.0โ2.8 bits | Too many context switches |
| Chaotic | ๐ช๏ธ | > 2.8 bits | Fragmented โ unable to sustain focus |
7 Sub-Engines
- Activity Logger โ records focus sessions with domain, timestamp, duration
- Entropy Calculator โ computes Shannon entropy on domain time distribution
- Context Switch Counter โ counts domain transitions and estimates switching cost
- Deep Work Detector โ identifies uninterrupted โฅ25-minute single-domain sessions
- Flow State Scorer โ composite 0โ100 score from deep-work ratio and entropy
- Focus Forecast โ linear-regression trend on daily entropy values
- Insight Generator โ ranked actionable recommendations for focus improvement
Key Concepts
- Deep Work Block โ any uninterrupted focus session โฅ 25 minutes on a single domain
- Context Switch Cost โ estimated 15โ23 minutes of reduced productivity per switch (based on UC Irvine research)
- Flow State โ composite of deep-work ratio, low entropy, and sustained duration
- Focus Forecast โ projects entropy trend forward to predict upcoming fragmentation risk
๐ฆ ChronotypeOptimizerService
lib/core/services/chronotype_optimizer_service.dart
Analyzes activity timing patterns to detect the user's natural chronotype, identifies peak performance windows for different task types, and provides personalized time-of-day recommendations for schedule optimization. Uses kernel density estimation on 24-hour energy curves.
Chronotypes
| Type | Emoji | Peak Hours | Profile |
|---|---|---|---|
| Lion | ๐ฆ | 5 AM โ 12 PM | Early riser, morning energy peak, evening wind-down |
| Bear | ๐ป | 10 AM โ 2 PM | Solar-aligned, most common type, steady mid-day energy |
| Wolf | ๐บ | 4 PM โ 12 AM | Night owl, creative bursts in evening, slow mornings |
| Dolphin | ๐ฌ | Variable | Light sleeper, irregular energy, multiple small peaks |
Task Types
| Type | Emoji | Best Scheduled When |
|---|---|---|
| Deep Work | ๐ง | During peak energy window |
| Creative | ๐จ | Slightly off-peak (relaxed inhibition) |
| Routine | ๐ | Low-energy periods (doesn't need focus) |
| Social | ๐ฅ | Mid-energy periods |
| Physical | ๐ | Depends on chronotype |
7 Sub-Engines
- Activity Clock Logger โ records activities with timestamps and task types
- Circadian Profile Builder โ constructs 24-hour energy curve via kernel density estimation
- Chronotype Classifier โ classifies user as Lion / Bear / Wolf / Dolphin
- Peak Window Detector โ identifies optimal time windows per task type
- Schedule Alignment Scorer โ scores current schedule vs. optimal alignment (0โ100)
- Drift Detector โ monitors circadian rhythm shifts over time
- Insight Generator โ ranked actionable scheduling recommendations
๐ค SocialCapitalEngineService
lib/core/services/social_capital_engine_service.dart
Autonomous relationship network health analyzer. Tracks social investment patterns, connection quality, reciprocity balance, and network diversity. Detects relationship neglect and provides proactive suggestions for maintaining social capital.
Key Concepts
- Social Capital Score โ composite network health metric (0โ100) combining diversity, reciprocity, and engagement
- Reciprocity Balance โ ratio of investment given vs. received per relationship
- Connection Decay โ relationships lose strength over time without interaction, modeled as exponential decay
- Network Diversity โ how many distinct social circles the user maintains (work, family, friends, community)
- Investment Nudges โ proactive suggestions when high-value relationships show decay signals
Relationship Tiers
| Tier | Max Connections | Interaction Cadence | Decay Rate |
|---|---|---|---|
| Inner Circle | ~5 | Weekly | Fastest decay if neglected |
| Close Friends | ~15 | Bi-weekly | Moderate decay |
| Active Network | ~50 | Monthly | Slow decay |
| Extended Network | ~150 | Quarterly | Very slow decay |
๐ง FrictionJournalService
lib/core/services/friction_journal_service.dart
Autonomous micro-frustration tracker. Categorizes and patterns recurring friction points in daily life, calculates cumulative time and energy costs, and generates elimination strategies. Surfaces the "death by a thousand cuts" problem that humans typically ignore.
Key Concepts
- Friction Entry โ a recorded frustration with category, severity, time cost, and context
- Pattern Detection โ identifies recurring friction (same source, same time, same trigger)
- Cumulative Cost โ aggregates minutes and energy spent on repeated micro-frustrations
- Elimination Strategy โ ranked recommendations: automate, delegate, eliminate, accept
- Friction Score โ per-category score combining frequency ร severity ร time cost
Friction Categories
| Category | Examples | Typical Strategy |
|---|---|---|
| Technology | Slow loading, app crashes, password resets | Automate or switch tools |
| Process | Approval delays, redundant meetings, paperwork | Streamline or delegate |
| Environment | Noise, temperature, commute, clutter | Environmental redesign |
| Social | Miscommunication, waiting on others, interruptions | Set boundaries or batch |
| Personal | Decision paralysis, procrastination, forgetting things | Systemize or build habits |
The autonomous engines work best when connected to each other's output signals. For example, the Drift Detector can feed into Burnout Detector, the Momentum Engine can inform Streak Guardian risk assessment, and the Willpower Budget can influence Ritual Engine micro-adjustments, the Decision Fatigue detector can gate Regret Minimization decision recording, and the Stress Cascade engine can feed into Burnout Detector risk signals. See Architecture for the cross-service signal flow.