Repository navigation
27 Discipline Intelligence and Analytics
Vicky Patel edited this page Nov 5, 2026
·
2 revisions
Specifications for discipline velocity scoring, cognitive heuristics, and behavioral psychology models across
src/lib/discipline/,src/lib/analytics/, andsrc/lib/habits/.
PACT OS computes an authoritative Discipline Velocity Score (0–100) to quantify execution momentum without vanity metrics:
Velocity Score = (Task Completion Rate × 0.40) + (Habit Consistency % × 0.35) + (Focus Session Ratio × 0.25)
-
Task Completion Rate (40%): Percentage of commitments marked
completedvs. total scheduled commitments (completed+missed). - Habit Consistency % (35%): Ratio of active days habits were logged vs. target recurrence schedules.
- Focus Session Ratio (25%): Ratio of completed deep work minutes vs. target planned focus minutes.
PACT OS incorporates scientific behavioral models to prevent procrastination, decision fatigue, and burnout:
- Underlying Science: Danziger, Levav & Avnaim-Pesso (2011) judicial decision fatigue & Kathleen Vohs ego depletion.
- Mechanism: Quantifies decision complexity points throughout the day. Alerts users when their daily cognitive choice budget is depleted to prevent poor evening commitments.
-
Underlying Science: Brian Tracy's "Eat That Frog!" heuristic (
$S = \text{impact} \times \text{resistance} / \text{time}$ ). - Mechanism: Scores pending tasks on a 0–100 scale, ranking the highest-resistance, highest-impact item to tackle during peak willpower morning windows.
3. Fogg Behavior Model ($B = \text{MAP}$ ) Task Friction Diagnostic (src/lib/discipline/fogg-behavior-model.ts)
-
Underlying Science: Dr. BJ Fogg's Behavior Model (
$B = \text{Motivation} \times \text{Ability} \times \text{Prompt}$ ). - Mechanism: Diagnoses failure friction across 6 sub-dimensions (Time, Money, Physical Effort, Brain Cycles, Social Deviance, Non-Routine) and evaluates whether the task crosses the Action Line.
- Underlying Science: Claude Shannon's Information Entropy ($H(X) = -\sum p(x) \log_2 p(x)$).
-
Mechanism: Measures the mathematical regularity of habit execution hours (0–23). Distinguishes automated routines (
$H < 1.5$ bits) from erratic ad-hoc patterns ($H > 3.5$ bits).
- Underlying Science: James Clear & BJ Fogg Habit Stacking ("After [Anchor Habit], I will [Target Habit]").
- Mechanism: Evaluates spatial location compatibility, energy state transitions, and environmental latency between an existing anchor habit and a new target habit.
- Underlying Science: Elasticity decay curves with non-linear momentum restoration.
- Mechanism: Mitigates "all-or-nothing" discouragement by calculating elastic habit recovery credits when a user resumes a streak after a short slip.
- Underlying Science: Jerry Seinfeld's calendar chain productivity technique.
- Mechanism: Evaluates uninterrupted calendar streaks, identifies momentum fragility, and provides visual chain metrics.
- Underlying Science: Nathaniel Kleitman's Basic Rest-Activity Cycle (BRAC).
- Mechanism: Calculates alternating 90-minute high-alertness focus waves and 20-minute restorative dips relative to user wake-up time.
-
Streak Multiplier: Consecutive days meeting habit targets increment streak multipliers (
1.0x➔1.5x➔2.0x). - Missed Day Penalty: Missing a habit resets current streak count while preserving historical total completion records.
-
Server Views (
20260917000000_discipline_intelligence_and_enterprise_sso.sql): PostgreSQL views calculate weekly velocity rollups server-side for optimal rendering performance.
| 🏛️ Project Hub | 🛠️ Developer Docs | 💬 Community & Support |
|---|---|---|
| GitHub Repository | System Architecture | GitHub Discussions |
| Beginner Issue Catalog | Design System | Open Issues |
| Production Deployment | API Reference | Pull Requests |
| Project Roadmap | Testing & QA Matrix | Maintainer Governance |
- Codebase Tour
- Domain Model
- Database Architecture
- Security Model
- Financial System
- Consequence System
- External Integrations
- Discipline Intelligence
- Data Portability & Sync