Xale's model Intentions
Habits Frequency and logs
A Habit is something the person repeats, with a cadence that is a soft target. Xale counts progress in the current period and never counts streaks.
Fields
xale_ returns active Habits (filter with areaId):
| Field | What it is |
|---|---|
id, title | The Habit |
cadence | How often, below |
surfaceKind | habit, or event, meaning it's offered on set weekdays |
anchor | { "dows": [1, 3, 5] }: ISO weekdays, 1 is Monday, 7 is Sunday |
archived | true or false |
areaIds, linkedProjectIds | Areas, Projects |
workerIds | The People who do it |
steps | Checkable steps with IDs, labels and optional durations |
linkedMilestoneIds, milestones | Visible link IDs and bounded details (id, title, date, endDate) |
milestonesTruncated | Some linked Milestone lookups were skipped |
A batch looks up at most 500 distinct Milestone IDs across all Habits. A single-Habit retry gets its own budget of up to 20. If milestonesTruncated is true, pass the Habit's id for an individual read. For other visible linkedMilestoneIds, use xale_.
A Habit has no time of day. To give it time, put an occurrence into a day with xale_ (kind: "habit").
Cadence
cadence | Target |
|---|---|
{ "kind": "daily" } | Once a day |
{ "kind": "perWeek", "target": 3 } | 1 to 21 a week |
{ "kind": "perMonth", "target": 2 } | 1 to 62 a month |
{ "kind": "perQuarter", "target": 1 } | 1 to 92 a quarter |
{ "kind": "perYear", "target": 2 } | 1 to 366 a year: “twice a year” |
The target is soft: Xale never counts streaks.
Progress
xale_ gives each active Habit's progress in the current period: completed, target (1 for daily) and remaining.
Creating and changing
| To | Use |
|---|---|
| Create | xale_: title, cadence, optional durationMin (5 to 480), areaIds, description, people, projects, milestones, ordered steps titles, and a requestId |
Change title, description, cadence, duration (durationMinDefault, 5 to 1,440), surfaceKind, weekdays, or the Note or Mindmap behind it | xale_ |
| Add or edit Steps | xale_ with steps, merged by ID. A label-only edit keeps the existing duration. |
| Change linked Milestones | xale_ on the Habit with milestones |
| Archive | xale_ with archive_, then the person's yes |
Logs
| To | Use |
|---|---|
Complete a day's occurrence (today unless date is given) | xale_. Completing it twice changes nothing. If the day has several occurrences, the refusal lists them; send instanceId. |
| Complete it through its time block | xale_ |
| Keep a dated entry in the person's words | xale_ with kind: "habit": it goes on the Habit's log Note, made and linked the first time |
Nudges
If the person wants nudging about a Habit, offer a check-in at a time they choose. It reaches them when your own app runs it: see Check-ins.
Limits
Pro allows 500 Habits.
- Checked against main
d2feeb6e