Skip to content

27 Discipline Intelligence and Analytics

Vicky Patel edited this page Sep 14, 2026 · 1 revision

27. Discipline Intelligence & Velocity Math

Specifications for discipline velocity scoring, streak multipliers, and aggregate analytics computation in src/lib/analytics.ts.


🧮 Discipline Velocity Score Formula

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)
  1. Task Completion Rate (40%): Percentage of commitments marked completed vs. total scheduled commitments (completed + missed).
  2. Habit Consistency % (35%): Ratio of active days habits were logged vs. target recurrence schedules.
  3. Focus Session Ratio (25%): Ratio of completed deep work minutes vs. target planned focus minutes.

📈 Streak Multipliers & Consistency

  • Streak Multiplier: Consecutive days meeting habit targets increment streak multiplier (1.0x1.5x2.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.

Clone this wiki locally