Architecture
This is a practical overview of how Chronos fits together so you can extend it confidently.
Runtime Overview
- CLI Entrypoint:
Modules/Console.pyloads commands and scripts, sets UTF‑8, and dispatches to modules. - Item System:
Modules/ItemManager.pyreads/writes YAML items inUser/and applies defaults. - Conditions:
Modules/Conditions.pyprovidesiflogic with parentheses andexists/matches. - Scheduler:
Modules/Scheduler.py+Commands/Today.pybuild and refine the day plan. - Listener:
Modules/Listener/Listener.pyhandles alarms/reminders/timer in the background. - Dashboard:
Utilities/Dashboardserves APIs and mounts vanilla‑JS widgets.
Data Model
Items are YAML files with name, type, and properties. Many items nest children to form a fractal hierarchy (routines → subroutines → microroutines → items).
Settings
Settings live under User/Settings/ and prefer lowercase filenames (e.g., points_settings.yml, <item>_defaults.yml). The Settings widget allows direct editing with validation.
Dashboard API (selected)
POST /api/cli— run commandsGET /api/today,POST /api/today/rescheduleGET /api/items,GET /api/item,POST /api/item*GET /api/goals,GET /api/habitsGET/POST /api/settings— list/read/write settings files
Extending Chronos
- Commands: add
Commands/MyCommand.pywithrun(args, properties). - Item modules: add
Modules/My_Item/main.pywithhandle_*orhandle_command. - Widgets/views: add
Utilities/Dashboard/Widgets/<Name>/index.jsand wire indashboard.html.
