Programmable Time. Semantically Rich. Model-Driven.
UTMS-Core is the foundation of the Universal Time Modeling System, a programmable framework for modeling, tracking, and reasoning about time. It allows you to define semantic, relative, and conditionally-resolved time entities using a Lisp-based language (Hy).
UTMS is not a calendar, clock, or task manager. It's a temporal substrate: time as programmable code.
UTMS is not just a schedulerโitโs a programmable time engine. You define when, why, and how things happen, and UTMS orchestrates your life accordingly. Here's whatโs already possible:
Use Case | Description |
---|---|
โจ๏ธ Arduino-driven task execution | Tap a key on your custom keypad before sleep, and UTMS tracks the event, suspends your laptop, logs the interruption, and timestamps it semantically. |
๐ถ Focus automation | Start coding on a #utms entity, and UTMS automatically opens Emacs, starts a focus playlist in your music player, and logs duration for later review. |
๐ Semantic time logging | Log "break", "interruption", or "deep work" with one command. UTMS records exact time, context, and activation reasonโwithout needing to predefine categories. |
๐ธ๏ธ Chain reactions | A single event (e.g., "wake up") can trigger a chain: stop sleep logging, start morning routine, preload calendar, run mood check-in, notify assistant agent. |
๐ง Reflective feedback | At dayโs end, UTMS can auto-prompt you with reflection questions based on logged entities: "Why was your coding block interrupted at 15:04?" |
โ๏ธ Custom automation | Define arbitrary behavior in Hy: "If I'm coding and it's raining, and it's before 5pm, auto-delay my walking routine and update calendar". |
๐ Multi-modal interaction | Use CLI, web UI, Arduino devices, or even dynamic time prompts to interact. All components sync via the same programmable time core. |
Every "thing" you care about in time becomes a first-class entity: an event, an anchor, a habit, a measurement, a phase, a condition. Each entity can store logic, activation conditions, relative timing, and HyLisp expressions.
๐ง โTimeโ in UTMS isnโt a number. Itโs an intelligent, contextual fabric for living.
- This repo contains the core engine, not a standalone tool.
- The CLI is legacy. UTMS is now modular: Web UI, API, hardware integrations exist in separate repositories.
- Installation is non-trivial and not documented. Intended for developers comfortable with Python, Hy, and reading source code.
UTMS reimagines time as something you define, query, and compose.
Instead of tracking what happened, you model why and how things relate across time:
- "Breakfast = 30 minutes after wakeup"
- "Mark task as done if any subtasks are started"
- "Trigger reminder only if itโs not raining"
Time becomes a semantic object graph, not a flat schedule.
UTMS models time through composable entities:
Task
โ events with optional conditionsAnchor
โ reference points (e.g. โsunriseโ, โboot timeโ)Variable
โ dynamic or fixed dataCondition
โ logical expressions for activation/resolutionMetric
โ anything numeric tracked over timePattern
โ recurring time blocks (e.g., Pomodoro, lunar cycles)
All are defined in Hy, a Lisp dialect embedded in Python. Note that the user doesn't have to write all this code, in fact the user should never have to write code unless they want to, all of this code is automatically generated from the frontend.
Define a new entity type TASK:
(def-entity "TASK" entity-type
(title {:type "string" :label "Title" :required True})
(description {:type "string" :label "Description" :default_value ""})
(context {:type "entity_reference" :label "Context" :reference_entity_type "context"})
(priority {:type "integer" :label "Priority" :default_value 0})
(status {:type "string" :label "Status" :default_value "pending"})
(deadline {:type "datetime" :label "Deadline" :default_value None})
(creation_date {:type "datetime" :label "Created" :default_value current-time})
(occurrences {:type "list" :item_schema_type "OCCURRENCE"})
(active-occurrence-start-time {:type "datetime"})
(exclusive_resource_claims {:type "list" :item_type "string" :label "Exclusive Resource Claims" :default_value []})
(on-start-hook {:type "code" :label "Code to run on start"})
(on-end-hook {:type "code" :label "Code to run on end"})
)
Define a new TASK:
(def-task "UTMS coding"
(active-occurrence-start-time None)
(context (entity-ref "context" "default" "UTMS"))
(creation_date None)
(deadline None)
(description None)
(exclusive_resource_claims ["USER_PRIMARY_FOCUS"])
(occurrences [{:start_time (datetime 2025 6 13 17 37 32 14816) :end_time (datetime 2025 6 13 17 37 36 346748) :notes "" :metadata {}}])
(on-start-hook (do (shell "notify-send 'working on UTMS'") (shell "/home/daniel/bin/ytmusic.py" :bg True)))
(priority 0)
(status "")
(title "UTMS coding")
)
UTMS treats time like a data structure:
- Relative: "15m after X", "if condition Y"
- Composable: tasks depend on anchors, variables, sensors
- Contextual: multiple timelines (personal, project, cosmic)
- Meta-Temporal: models can operate over simulations or nested timelines
utms-core/
โโโ core/ # Time engine (Hy DSL, units, formats, models)
โโโ cli/ # Legacy CLI (shell, commands, clock)
โโโ web/ # Web API + templates (FastAPI, Jinja)
โโโ utils/ # Display, filesystem, parsing, hy helpers
โโโ utms_types/ # Typed protocols and domain models
โโโ resources/ # Default entities, patterns, prompts
Feature | Status |
---|---|
Hy-based time DSL | โ Stable |
Arbitrary time units | โ Working |
Relative + absolute time modeling | โ Working |
Conditional activation | โ Working |
Persistent entity storage | โ Partial |
Web API | โ In progress |
Web UI | ๐ก Early dev |
Arduino integration | ๐ก Prototyped |
Entity macros | ๐ Planned |
Probabilistic durations | ๐ Planned |
Multi-threaded timelines | ๐ Planned |
Detailed installation instructions will be added later on.
This repo includes a FastAPI backend.
python utms/web/main.py
Frontend development is moving to utms-frontend.
utms-arduino: LCD display, sensors, input devices
Hardware triggers: time-driven events from sensors, physical anchors
AI-assist: optional resolution help via LLMs (non-core)
UTMS is designed to be a universal protocol for time modeling. It enables:
- Personal tracking beyond schedules
- Simulation of causal time chains
- Emergent task activation
- Interdisciplinary time modeling (scientific, phenomenological, project-based)
It offers a programmable substrate to build new apps, agents, devices, and modelsโwhere time is the first-class citizen.
โCalendars are for dates. UTMS is for everything else.โ
This project is pre-alpha and still evolving.
Ways to help:
- Try writing your own entities and patterns
- Help build the web UI
- Extend the plugin system
- Suggest ideas in issues