Skip to content

chronomancy-io/chronoquit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChronoQuit

Intelligent auto-quit for macOS.

standard-readme compliant License WASP v1.0.0 CDE v1.0.0 MSS v1.0.0

Encodes each running app into a 7-dimensional CDE state vector, then drives a lifecycle state machine that auto-quits idle, low-priority apps. It still polls on a timer and the core trigger is an idle threshold — the CDE vector augments that threshold with protection and priority signals rather than replacing it.

Background

CDE Implementation

Dimensions (Definition)

Each running app is encoded into a 7-dimensional vector, every component normalized to [0.0, 1.0] (see Models/AppStateDimensions.swift and Services/CDEAppStateEncoder.swift):

  1. Activity level1.0 if frontmost, otherwise decays toward 0.0 as time since last activity approaches the timeout.
  2. System impact — coarse resource-cost estimate keyed off the bundle id (browsers, IDEs, media editors, chat apps).
  3. Protection level1.0 whitelisted, 0.0 blacklisted, 0.5 otherwise.
  4. Interaction frequency0.5 if an activity timestamp is known, else 0.1.
  5. System priority — heuristic by bundle id / name (Apple system apps, Finder, IDEs, office, mail, etc.).
  6. Lifecycle stage — time since launch normalized over a 300s equilibrium window.
  7. User preference alignment1.0 whitelisted, 0.0 blacklisted, 0.5 otherwise.

Note: the source doc-comments still call this a "GGDP vector"; the project's framing is CDE. The math (7 normalized components, L2 norm) is the same either way.

Decision logic (Definition)

The encoder does not emit "log / prompt / exit". It feeds a lifecycle state machine (Models/AppLifecycleState.swift, Services/AppStateTransitionManager.swift) whose states are launching → active → idle → pendingQuit → terminated. Transitions:

  • launching → active when lifecycleStage > 0.8
  • active → idle when activityLevel <= 0.3
  • idle → pendingQuit when idleScore > idleThreshold AND systemPriority < priorityThreshold (defaults: idleThreshold = 0.7, priorityThreshold = 0.8; per-app overrides supported)
  • pendingQuit → terminated, after AppQuitHelper issues the quit

where idleScore = (1 - activityLevel) × (1 - protectionLevel). Reaching pendingQuit is what triggers the actual quit. The trigger is fundamentally an idle threshold; the additional dimensions gate it (protection lowers idleScore, priority can veto the quit).

Minimal Sufficient Statistic (Assumption)

The claim that these 7 dimensions are a minimal sufficient statistic for the quit decision is a design assumption, not a proven guarantee — there is no proof or test in this repo establishing minimality or sufficiency. The decision is in fact computed from only two derived scalars (idleScore and systemPriority), so several dimensions are unused by the current quit rule and exist for the UI/analytics views.

Install

open chronoquit.xcodeproj
# ⌘B to build, ⌘R to run

Requirements

  • macOS 12.0+
  • Xcode 14.0+

Usage

On first quit attempt the app requests permissions in System Settings (Automation under Privacy & Security; it also checks Accessibility via AXIsProcessTrusted). Grant these, then configure thresholds and the per-app whitelist/blacklist via the menu bar icon. The auto-quit loop runs on a 60-second timer while enabled.

Contributing

See CONTRIBUTING.md for development guidelines.

License

Apache-2.0 © 2026 Jacob Coleman — See LICENSE for details.

About

A macOS menu bar utility that encodes each running app as a seven dimensional CDE state vector and runs a lifecycle state machine, quitting idle low priority apps once they cross a threshold.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors