Skip to content

02 Features

Vicky Patel edited this page Nov 5, 2026 · 2 revisions

02. Features & Subsystems

Detailed specification of the 14 core operational modules in PACT OS.


📋 1. Task Management & Timeblocking (/app/tasks)

The Task Engine allows users to schedule, prioritize, and track action items:

  • Speed-First Sealing: Modal form allowing commitment sealing in under 5 seconds.
  • Priority Levels: low, medium, high, urgent.
  • Status Lifecycle: pending ➔ in_progress ➔ completed / missed ➔ archived.
  • Parent Hierarchy: Optional linking to parent Goals and Projects.
  • Timezone Awareness: Localized wall-clock inputs converted to UTC TIMESTAMPTZ.

🎯 2. Strategic Goals & Projects (/app/goals, /app/projects)

  • Goals Workspace: Define high-leverage quarterly objectives with target completion dates and progress tracking (progress_percentage).
  • Projects Hub: Group deliverables under color-coded project cards (color_accent), status tracking (active, completed, paused, archived), and task rollups.

🔄 3. Habits & Daily Routines (/app/habits)

  • Habit Streaks: Track daily, weekly, or custom recurring habits with streak counters and consistency percentages.
  • Daily Routines: Morning and evening routine templates (daily_routines & routine_items) with quick completion toggles.
  • Leap-Year Math: Timezone-accurate day-boundary calculations ensuring streak preservation during leap years and timezone transitions.

💰 4. Financial Discipline Ledger (/app/finance)

  • Integer-Cents Arithmetic: All monetary transactions store amount_cents (bigint) to guarantee precision.
  • Category Breakdown: Categorize income and expenses with HSL-tailored color tags (gold, blue, emerald, amber, etc.).
  • Budget Envelopes: Set category-specific spending thresholds with real-time budget utilization progress bars.
  • Monthly Trends: Multi-month historical cashflow comparison (Income vs. Expense vs. Net Savings).

⏱️ 5. Deep Work Focus Engine (/app/focus)

  • Session Timer: Customizable Pomodoro and deep work timers with target duration (target_duration_minutes) and actual completion logging.
  • Offline Audio Synthesizer: Client-side Web Audio synthesizer (src/lib/focus/sound.ts) providing focus soundscapes without external audio assets or network requests.
  • Interruption Logging: Track focus session completion status (completed, interrupted, abandoned).

📊 6. Analytics & Velocity Metrics (/app/analytics)

  • Discipline Velocity Score: Aggregate scoring computed from task completion rates, habit consistency, and focus minutes.
  • Streak Velocity: Historical streak distribution charts.
  • Data Visualizations: Glassmorphic charts rendering timeblock efficiency and goal progress metrics.

📅 7. Calendar & Time-Blocking (/app/calendar)

  • Schedule View: Visual daily calendar displaying timeblocks and scheduled tasks.
  • Google Calendar Sync: Bi-directional integration (src/lib/integrations/google-calendar.ts) for syncing PACT tasks with Google Calendar events.

📝 8. Weekly Review & Sunday Ritual (/app/review)

  • 5-Step Reflection Wizard:
    1. Review past week's task completion and velocity.
    2. Audit habit consistency.
    3. Evaluate financial cashflow.
    4. Perform backlog cleanup and task carryover.
    5. Set next week's top 5 priority commitments.
  • Sunday Ritual Automation: Prompts users on their designated review day (weekly_review_day).

🛡️ 9. Accountability & Consequence Engine (/app/accountability)

  • Consequence Types: written_reflection, public_declaration, emergency_task, financial_pledge.
  • Payload Masking: Consequence parameters remain masked in the database until activated upon deadline breach.
  • Waiver Requests: Managed grace-period waivers with justification logging (commitment_waivers).

🔔 10. Multi-Channel Notification Dispatcher (src/lib/notifications)

  • Notification Types: Deadline warnings, consequence activations, habit reminders, weekly review prompts.
  • Delivery Channels: In-app popovers (NotificationPopover), mobile push notifications, and browser alerts.

🔗 11. External Proof Connectors (src/lib/integrations)

  • GitHub Connector: Validates commit hashes and PR URLs via GitHub REST API.
  • LeetCode Connector: Validates GraphQL problem submission payloads (recentSubmissionList).
  • Codeforces Connector: Validates contest submission status and rating tier badges.

🔑 12. WebAuthn & Passkey Authentication (src/lib/auth)

  • Passkey Support: Register and authenticate using hardware security keys, Touch ID, or Face ID (20260912000000_passkey_credentials.sql).
  • Cryptographic Challenge: Server-generated 32-byte base64url challenge tokens with replay attack protection.

⚡ 13. Command Center (/app Overlay)

  • Fuzzy Search: Global search overlay (KeyboardShortcutsModal & Command Palette) indexing tasks, goals, habits, projects, and finance items.
  • Keyboard Navigation: Full hotkey accessibility (e.g. Cmd+K, Esc).

📦 14. Data Portability & Privacy (/api/user/export)

  • Full Data Export: Export user data as a sanitized ZIP archive containing JSON/CSV datasets.
  • Privacy Sanitization: Strips session tokens, OAuth keys, and password hashes prior to archive generation.

👥 15. Multi-Party Accountability Circles & Pledges (/app/accountability/circles)

  • Circle Governance: Create or join accountability circles with explicit role matrices (owner, accountability_partner, member, observer).
  • Cryptographic Invitations: Secure 32-byte hex token generation with SHA-256 hash storage and expiry verification.
  • Charity Pledges: Automated financial pledges with micro-consequence escrow state transitions upon deadline breach.
  • Peer Attestation: Voting consensus rules (unanimous or majority) to verify subjective commitments honestly.

🛡️ 16. Production Resilience & Rate Limiting (src/lib/security/rate-limiter.ts)

  • Sliding-Window Token Bucket: Multi-tier rate limiting across AUTH, API, PROOF_SYNC, WEBHOOK, and CRON tiers.
  • IP Spoofing Defense: Safe client IP resolution with reverse-proxy header validation.
  • Structured Observability: Zero-trust JSON logger with automated redaction for secrets, bearer tokens, and private consequence descriptions.

🌅 17. Daily Sunset & Shutdown Ritual Engine (/app/sunset)

  • 4-Step Evening Closure: Guided evening flow reviewing daily scorecard, triaging incomplete tasks, writing reflections, and locking tomorrow's commitments.
  • Task Triage Actions: Carry forward to tomorrow, move to backlog, or discard with friction logging.
  • Account Governance & Danger Zone: Full GDPR-compliant account data deletion with cryptographic phrase confirmation.

🔄 18. Multi-Device Delta Replication Protocol (src/lib/offline/)

  • Lamport Logical Clocks: Monotonic sync cursors tracking client-server mutation sequences.
  • Background Sync API: Progressive Web App Service Worker background sync listener (pact-sync-deltas) with automatic reconnect recovery.
  • Evidence Staging Cache: Client-side offline evidence staging with strict quotas (5MB/file, 25MB total) and SHA-256 checksums.

🧠 19. Discipline Intelligence & Anti-Burnout Engine (src/lib/discipline/)

  • Deterministic Insights: Privacy-preserving heuristics analyzing cognitive load, habit fatigue, velocity decline, and task friction.
  • Anti-Burnout Advisory: Proactive warnings when user commits beyond healthy capacity thresholds.
  • Enterprise SSO Integration: SAML 2.0 and OIDC authentication engine with domain matching and role mapping.

⚡ 20. Behavioral Design & Micro-Task Utility Engines (src/lib/*)

PACT OS features 91 specialized behavioral, algorithmic, and statistical utilities built across 11 Hacktoberfest micro-task batches:

  • Discipline Psychology: Brian Tracy's Eat-The-Frog priority ranker (frog-score.ts), Dr. BJ Fogg's $B = \text{MAP}$ diagnostic (fogg-behavior-model.ts), and Decision Fatigue choice budget allocator (decision-fatigue.ts).
  • Habit Formation: James Clear habit stacking anchor compatibility (habit-stacking.ts), non-linear habit elasticity recovery model (habit-elasticity.ts), and Seinfeld "Don't Break the Chain" streak evaluator (chain-streak.ts).
  • Data & Security: Gustavo Niemeyer Geohash encoder (geohash.ts), Luhn algorithm bond check digit validator (luhn-validator.ts), Base58 token codec (base58.ts), and URL-safe slug generator (slug-generator.ts).
  • Focus & Chronobiology: Nathaniel Kleitman Ultradian 90-minute rhythm peak finder (ultradian-rhythm.ts), 20-20-20 rule eye strain cadence scheduler (micro-break.ts), and Mel Robbins 5-second rule countdown ignition (five-second-rule.ts).

Clone this wiki locally