OpenTime Specification
A human-readable, plain-text format for representing goals, tasks, habits, reminders, events, appointments, and projects.
Format version: opentime_version: "0.2"
1. Introduction
OpenTime is a plain-text file format designed to do for time what Markdown did for notes. An OpenTime file (with extension .ot) describes a collection of items such as goals, tasks, habits, reminders, events, appointments, and projects in a way that is both human-readable and machine-parseable.
This document describes the normative specification for the OpenTime format v0.2. Implementations SHOULD validate against the JSON Schema and MUST NOT remove unknown fields when reading and writing .ot files.
2. Document Structure
An OpenTime file is a single YAML document with the following top-level structure:
opentime_version: "0.2" # required string, semantic-style version
default_timezone: "Asia/Tokyo" # optional IANA timezone name
generated_by: "Elysium 0.3" # optional free-form string
created_at: "2025-12-02T12:00:00Z" # optional ISO8601 timestamp
items:
- type: task
id: task_1
title: "Example task"
status: todoAll top-level properties are defined as follows:
| Property | Required | Description |
|---|---|---|
opentime_version | Yes | Semantic-style version string (e.g., "0.2" or "0.2.1") |
default_timezone | No | IANA timezone identifier used when item-level timestamps omit an explicit timezone |
generated_by | No | Free-form string describing the generating tool and version |
created_at | No | ISO8601 timestamp indicating when this file was generated |
items | Yes | An array of OpenTime items conforming to one of the item definitions below |
3. Items and Types
Every entry in items is an object with at minimum the fields type, id, and title. The type field acts as a discriminator and determines the required and optional fields for that item.
Supported item types:
goaltaskhabitremindereventappointmentproject
The id field MUST be a non-empty string and SHOULD be unique within the document. The title field MUST be a non-empty human-readable string.
4. Common Field Types
OpenTime reuses a small set of common scalar types across item definitions:
| Type | Format | Example |
|---|---|---|
date | YYYY-MM-DD | 2025-12-03 |
datetime | ISO8601 timestamp | 2025-12-03T09:00:00+09:00 |
time | HH:MM | 06:00 |
progress | Number 0.0–1.0 | 0.75 |
tags | Array of strings | ["work", "urgent"] |
The links field is an array of link objects with the following structure:
target_id: "goal_novel"
kind: "relates_to" # optional free-form relation label
label: "Related goal" # optional display label5. Item Definitions
This section summarizes the required and notable optional fields for each item type. See the JSON Schema for full details.
5.1 Goal
Represents a single-step intention or outcome (e.g., "Finish novel draft").
| Field | Required | Type |
|---|---|---|
type | Yes | Must be "goal" |
id | Yes | string |
title | Yes | string |
kind | Yes | Must be "goal" |
target_date | No | date |
progress | No | progress |
project_id | No | string |
tags, notes, links | No | common fields |
5.2 Task
Represents an atomic action that can be completed (e.g., "Write 500 words").
| Field | Required | Type |
|---|---|---|
type | Yes | Must be "task" |
id | Yes | string |
title | Yes | string |
status | Yes | todo | in_progress | done | cancelled |
due | No | date |
scheduled_start | No | datetime |
estimate_minutes | No | integer ≥ 0 |
actual_minutes | No | integer ≥ 0 |
priority | No | number |
goal_id, project_id | No | string |
5.3 Habit
Represents a recurring behavior (e.g., "Morning walk").
| Field | Required | Type |
|---|---|---|
type | Yes | Must be "habit" |
id | Yes | string |
title | Yes | string |
pattern | No | object (see below) |
window | No | object (see below) |
streak | No | object (see below) |
The pattern object describes frequency:
pattern:
freq: "daily" # "daily", "weekly", or custom app-defined valuesThe window object describes a preferred time window:
window:
start_time: "06:00"
end_time: "08:00"The streak object tracks habit streaks:
streak:
current: 12
longest: 215.4 Reminder
Represents a lightweight notification at a specific time, optionally repeating.
| Field | Required | Type |
|---|---|---|
type | Yes | Must be "reminder" |
id | Yes | string |
title | Yes | string |
time | Yes | datetime |
repeat | No | RRULE-style string |
link | No | ID of related item |
5.5 Event
Represents a block of time, typically solo (e.g., "Deep work").
| Field | Required | Type |
|---|---|---|
type | Yes | Must be "event" |
id | Yes | string |
title | Yes | string |
start | Yes | datetime |
end | Yes | datetime |
all_day | No | boolean |
timezone | No | IANA identifier |
location | No | string |
recurrence | No | RRULE-style string |
5.6 Appointment
Represents an event with one or more attendees, such as a meeting.
| Field | Required | Type |
|---|---|---|
type | Yes | Must be "appointment" |
id | Yes | string |
title | Yes | string |
start | Yes | datetime |
end | Yes | datetime |
attendees | Yes | array of at least one string |
location | No | string |
provider | No | string (e.g., "dentist", "Zoom") |
5.7 Project
Represents a container for related goals, tasks, events, and other items.
| Field | Required | Type |
|---|---|---|
type | Yes | Must be "project" |
id | Yes | string |
title | Yes | string |
kind | Yes | Must be "project" |
children | No | array of item IDs |
progress | No | progress |
target_date | No | date |
6. Extensions and x_* Fields
OpenTime is designed to be extensible. Item definitions allow additional properties, and applications are encouraged to place app-specific extensions under a namespaced key starting with x_(e.g., x_elysium, x_other_app).
Implementations MUST NOT discard unknown fields when reading and writing .ot files. This allows multiple applications to interoperate on the same file without clobbering each other's data.
- type: event
id: ev_extended
title: "Event with extensions"
start: "2025-12-20T10:00:00+09:00"
end: "2025-12-20T11:00:00+09:00"
x_elysium:
focus_mode: "deep"
color: "#3B82F6"
x_other_app:
custom_field: "preserved on round-trip"7. Validation and Conformance
The canonical definition of OpenTime v0.2 is provided as a JSON Schema. Implementations SHOULD validate files against this schema in development and may choose to do so in production environments depending on performance constraints.
At minimum, conforming implementations MUST:
- Require
opentime_versionanditemsat the document root - Require
type,id, andtitlefor all items, plus any additional type-specific required fields - Preserve unknown fields, including
x_*extension fields, when reading and writing files - Treat
date,datetime, andtimefields as opaque strings unless they need to manipulate them semantically; when they do, they SHOULD follow ISO8601 rules
8. Examples and Resources
For a complete example that exercises all item types, see the sample.ot file in the OpenTime repository.
- Quick Reference — At-a-glance lookup for all fields and values
- JSON Schema — Validate your .ot files programmatically
- Examples — Browse example
.otfiles - Developer Guide — Implement OpenTime in your app