OpenTime/Reference

Reference

A practical, at-a-glance reference for the .ot file format: types, fields, and structures.

How to Use This Reference

This page is meant for day-to-day development work. It summarizes the core building blocks of OpenTime:

  • Common scalar types (date, datetime, time, progress)
  • Shared structures (links, habit patterns, windows, streaks)
  • Each item type with its required and optional fields

For the full formal definition, see the Specification and JSON Schema.

Common Scalar Types

date

PatternExampleDescription
YYYY-MM-DD2025-12-03Date only, no time or timezone information.

datetime

PatternExamplesDescription
YYYY-MM-DDTHH:MM:SS(±HH:MM|Z)2025-12-03T09:00:00+09:00
2025-12-03T00:00:00Z
ISO8601 datetime with explicit timezone offset or Z for UTC.

time

PatternExampleDescription
HH:MM06:00, 14:30Local wall-clock time in 24-hour format.

progress

TypeRangeDescription
number0.01.0Completion percentage (0 = not started, 1 = complete).

Shared Structures

link

Used inside links arrays on items.

FieldTypeRequiredDescription
kind"url" | "ref"Yes"url" for external URLs, "ref" for internal item references.
valuestringYesURL or item ID being referenced.

habitPattern

FieldTypeRequiredDescription
freq"daily" | "weekly" | "custom"NoFrequency of the habit.
days_of_weekstring[]NoDays of week (e.g. ["mon","wed","fri"]).

habitWindow

FieldTypeRequiredDescription
start_timetimeNoPreferred start of the habit window.
end_timetimeNoPreferred end of the habit window.

habitStreak

FieldTypeRequiredDescription
currentinteger ≥ 0NoCurrent streak count.
longestinteger ≥ 0NoLongest streak ever achieved.

Item Types

All items share a few concepts:

  • type: discriminator for the item kind.
  • id: non-empty string, SHOULD be unique within the document.
  • title: non-empty, human-readable label.
  • Optional tags, notes, links on most item types.
  • Implementations MAY include additional custom fields (especially under x_* namespaces).

Goal

Represents a single-step intention or outcome.

FieldTypeRequiredDescription
type"goal"YesDiscriminator for the goal item.
idstringYesUnique identifier for this goal.
titlestringYesHuman-readable goal title.
kind"goal"YesConstant marker for goal kind.
target_datedateNoTarget completion date.
progressprogressNoGoal completion between 0.0 and 1.0.
project_idstringNoID of the project this goal belongs to.
tagsstring[]NoLabels for filtering and grouping.
notesstringNoFree-form notes.
linkslink[]NoExternal URLs or internal references.

Task

Represents an atomic action that can be completed.

FieldTypeRequiredDescription
type"task"YesDiscriminator for the task item.
idstringYesUnique identifier for this task.
titlestringYesHuman-readable task title.
status"todo" | "in_progress" | "done" | "cancelled"YesCurrent status of the task.
duedateNoDue date for the task.
scheduled_startdatetimeNoPlanned start time.
estimate_minutesinteger ≥ 0NoEstimated time to complete in minutes.
actual_minutesinteger ≥ 0NoActual time spent in minutes.
prioritynumberNoPriority level (e.g., 1–10).
goal_idstringNoID of the goal this task supports.
project_idstringNoID of the project this task belongs to.
tagsstring[]NoLabels for filtering and grouping.
notesstringNoFree-form notes.
linkslink[]NoExternal URLs or internal references.

Habit

Represents a recurring behavior (daily, weekly, or custom).

FieldTypeRequiredDescription
type"habit"YesDiscriminator for the habit item.
idstringYesUnique identifier for this habit.
titlestringYesHuman-readable habit title.
patternhabitPatternNoFrequency and days-of-week configuration.
windowhabitWindowNoPreferred time-of-day window.
streakhabitStreakNoCurrent and longest streak counts.
goal_idstringNoRelated goal ID, if any.
project_idstringNoRelated project ID, if any.
tagsstring[]NoLabels for filtering and grouping.
notesstringNoFree-form notes.
linkslink[]NoExternal URLs or internal references.

Reminder

Represents a lightweight notification at a specific time.

FieldTypeRequiredDescription
type"reminder"YesDiscriminator for the reminder item.
idstringYesUnique identifier for this reminder.
titlestringYesHuman-readable reminder title.
timedatetimeYesWhen this reminder fires first.
repeatstring (RRULE)NoRRULE-style recurrence rule (e.g. FREQ=HOURLY;COUNT=4).
linkstringNoID of a related item (task/event/habit/goal).
tagsstring[]NoLabels for filtering and grouping.
notesstringNoFree-form notes.
linkslink[]NoExternal URLs or internal references.

Event

Represents a block of time, typically solo (e.g. deep work).

FieldTypeRequiredDescription
type"event"YesDiscriminator for the event item.
idstringYesUnique identifier for this event.
titlestringYesHuman-readable event title.
startdatetimeYesEvent start time.
enddatetimeYesEvent end time.
all_daybooleanNoWhether this is an all-day event.
timezonestringNoIANA timezone name; falls back to default_timezone.
locationstringNoWhere the event takes place.
recurrencestring (RRULE)NoRRULE-style recurrence rule.
goal_idstringNoRelated goal ID, if any.
project_idstringNoRelated project ID, if any.
tagsstring[]NoLabels for filtering and grouping.
notesstringNoFree-form notes.
linkslink[]NoExternal URLs or internal references.

Appointment

Represents an event with attendees, like a meeting or appointment.

FieldTypeRequiredDescription
type"appointment"YesDiscriminator for the appointment item.
idstringYesUnique identifier for this appointment.
titlestringYesHuman-readable appointment title.
startdatetimeYesStart time.
enddatetimeYesEnd time.
attendeesstring[]YesNames or emails of attendees (at least one).
locationstringNoPhysical or virtual location.
providerstringNoService provider (e.g. "dentist", "therapist", "Zoom").
goal_idstringNoRelated goal ID, if any.
project_idstringNoRelated project ID, if any.
tagsstring[]NoLabels for filtering and grouping.
notesstringNoFree-form notes.
linkslink[]NoExternal URLs or internal references.

Project

Represents a container for related goals, tasks, events, etc. It helps group work under a single umbrella.

FieldTypeRequiredDescription
type"project"YesDiscriminator for the project item.
idstringYesUnique identifier for this project.
titlestringYesHuman-readable project title.
kind"project"YesConstant marker for project kind.
childrenstring[]NoList of item IDs that belong to this project.
progressprogressNoOverall project completion between 0.0 and 1.0.
target_datedateNoTarget completion date for the project.
tagsstring[]NoLabels for filtering and grouping.
notesstringNoFree-form notes.
linkslink[]NoExternal URLs or internal references.