krz/orgstar

A native macOS editor for org-mode files. editor org-mode swift

docs/plans/2026-10-05-habits.md

b98a6509c5ae75e5172dd333d1b6105fd6ceee0e
orgstar/docs/plans/2026-10-05-habits.md rendered · source · history · blame · raw

17 lines · 1192 bytes

1 symbol in this file
 1# Habits Implementation Plan
 2
 3> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
 4
 5**Goal:** org-habit consistency graphs in the agenda.
 6
 7**Architecture:** `Habit` ports `org-habit-parse-todo`, `org-habit-get-urgency`, `org-habit-get-faces` and `org-habit-build-graph` with org-habit's defaults (21 days before, 7 after, `org-log-states-order-reversed` t). `AgendaSource` reads it for entries with `STYLE: habit`. `Agenda.list` applies org-habit's rules: habits only on today's agenda and not when done, always with their time, no leader, habit urgency, sorted after other entries (`habit-down`). The agenda view draws the graph as colored day cells with `*` for done days and `!` for today.
 8
 9**Tech Stack:** Swift 6.2 tools, Swift Testing, Emacs 31.1 / Org 9.8.7 oracle.
10
11**Spec:** `docs/design.md`, "Phase 6".
12
13---
14
15- [x] `Habit`; graph and parse oracle; agenda oracle with org-habit loaded (`frozenClock` also covers `time-subtract`/`time-add` with nil).
16- [x] Agenda rows draw the graph.
17- [x] Commit "Habit graphs".