@aitne-sh/aitne 0.1.9 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/README.md +41 -11
  2. package/agent-assets/agent-profiles/background-task.md +53 -0
  3. package/agent-assets/agent-profiles/conversational.md +1 -0
  4. package/agent-assets/agent-profiles/routine-fetch-window.md +14 -75
  5. package/agent-assets/agent-profiles/routine.md +1 -1
  6. package/agent-assets/agents/{hourly-check → activity-scan}/agent.md +22 -17
  7. package/agent-assets/agents/monthly-review/agent.md +6 -5
  8. package/agent-assets/docs/concepts/agent-day.md +6 -7
  9. package/agent-assets/docs/concepts/auth-health.md +23 -20
  10. package/agent-assets/docs/concepts/backends-and-tiers.md +13 -9
  11. package/agent-assets/docs/concepts/costs-and-quotas.md +14 -12
  12. package/agent-assets/docs/concepts/delegated-mode.md +18 -17
  13. package/agent-assets/docs/concepts/memory-model.md +16 -9
  14. package/agent-assets/docs/concepts/observations.md +24 -20
  15. package/agent-assets/docs/concepts/process-keys.md +10 -9
  16. package/agent-assets/docs/concepts/routines.md +34 -31
  17. package/agent-assets/docs/concepts/safety-and-execution.md +11 -7
  18. package/agent-assets/docs/concepts/safety-model.md +39 -25
  19. package/agent-assets/docs/concepts/skills.md +12 -10
  20. package/agent-assets/docs/features/integrations/browser-history.md +23 -18
  21. package/agent-assets/docs/features/integrations/calendar.md +28 -17
  22. package/agent-assets/docs/features/integrations/git.md +13 -11
  23. package/agent-assets/docs/features/integrations/github.md +22 -14
  24. package/agent-assets/docs/features/integrations/mail.md +25 -22
  25. package/agent-assets/docs/features/integrations/notion.md +35 -11
  26. package/agent-assets/docs/features/integrations/obsidian.md +8 -8
  27. package/agent-assets/docs/features/lifestyle/git.md +27 -23
  28. package/agent-assets/docs/features/lifestyle/reading.md +20 -11
  29. package/agent-assets/docs/features/lifestyle/receipts.md +11 -10
  30. package/agent-assets/docs/features/lifestyle/travel-bookings.md +4 -3
  31. package/agent-assets/docs/features/memory-files/agent-journal.md +53 -26
  32. package/agent-assets/docs/features/memory-files/agent-lessons.md +178 -0
  33. package/agent-assets/docs/features/memory-files/projects.md +11 -8
  34. package/agent-assets/docs/features/memory-files/roadmap.md +17 -14
  35. package/agent-assets/docs/features/memory-files/schedule.md +6 -3
  36. package/agent-assets/docs/features/memory-files/today.md +10 -7
  37. package/agent-assets/docs/features/memory-files/user-profile.md +14 -9
  38. package/agent-assets/docs/features/messaging/bang-commands.md +21 -6
  39. package/agent-assets/docs/features/messaging/overview.md +17 -14
  40. package/agent-assets/docs/features/messaging/telegram.md +10 -9
  41. package/agent-assets/docs/features/operations/activity-and-conversations.md +6 -5
  42. package/agent-assets/docs/features/operations/approvals.md +6 -5
  43. package/agent-assets/docs/features/operations/browser-tasks.md +184 -0
  44. package/agent-assets/docs/features/operations/cost-tracking.md +11 -1
  45. package/agent-assets/docs/features/operations/managed-chromium.md +4 -2
  46. package/agent-assets/docs/features/operations/notifications.md +11 -1
  47. package/agent-assets/docs/features/operations/quiet-hours.md +41 -11
  48. package/agent-assets/docs/features/operations/schedule-approaching.md +2 -2
  49. package/agent-assets/docs/features/routines/activity-scan.md +220 -0
  50. package/agent-assets/docs/features/routines/custom-routines.md +82 -134
  51. package/agent-assets/docs/features/routines/evening-review.md +23 -13
  52. package/agent-assets/docs/features/routines/morning-routine.md +7 -5
  53. package/agent-assets/docs/features/routines/weekly-review.md +24 -3
  54. package/agent-assets/docs/features/wiki/commands.md +4 -4
  55. package/agent-assets/docs/features/wiki/cost-and-approval.md +4 -3
  56. package/agent-assets/docs/features/wiki/dashboard.md +7 -6
  57. package/agent-assets/docs/features/wiki/overview.md +3 -3
  58. package/agent-assets/docs/features/wiki/search.md +5 -5
  59. package/agent-assets/docs/features/wiki/workspaces.md +2 -2
  60. package/agent-assets/docs/getting-started/01-what-is-this.md +3 -3
  61. package/agent-assets/docs/getting-started/02-first-steps.md +5 -3
  62. package/agent-assets/docs/getting-started/04-first-day.md +27 -30
  63. package/agent-assets/docs/glossary.md +8 -8
  64. package/agent-assets/docs/guides/add-a-custom-routine.md +122 -68
  65. package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +2 -2
  66. package/agent-assets/docs/guides/connect-a-new-mail-account.md +4 -2
  67. package/agent-assets/docs/guides/explore-with-trace-and-connect.md +5 -4
  68. package/agent-assets/docs/guides/install-and-run.md +2 -2
  69. package/agent-assets/docs/guides/maintain-wiki-health.md +2 -2
  70. package/agent-assets/docs/guides/pause-the-agent.md +27 -21
  71. package/agent-assets/docs/guides/reinstall-cleanly.md +2 -0
  72. package/agent-assets/docs/guides/setup-wizard.md +12 -6
  73. package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +6 -6
  74. package/agent-assets/docs/reference/api.md +26 -5
  75. package/agent-assets/docs/reference/cli-commands.md +3 -3
  76. package/agent-assets/docs/reference/config.md +51 -24
  77. package/agent-assets/docs/reference/disallowed-tools.md +6 -4
  78. package/agent-assets/docs/reference/keyboard-shortcuts.md +2 -2
  79. package/agent-assets/docs/reference/knowledge-layout.md +25 -12
  80. package/agent-assets/docs/reference/process-keys.md +9 -9
  81. package/agent-assets/docs/reference/skills.md +10 -6
  82. package/agent-assets/docs/troubleshooting/auth-failed.md +9 -8
  83. package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +16 -9
  84. package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +2 -2
  85. package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +32 -16
  86. package/agent-assets/docs/troubleshooting/observation-not-detected.md +26 -24
  87. package/agent-assets/docs/troubleshooting/quota-exhausted.md +7 -6
  88. package/agent-assets/docs/troubleshooting/wiki-write-failed.md +3 -3
  89. package/agent-assets/skills/agent-actions/SKILL.md +23 -39
  90. package/agent-assets/skills/agent-create/SKILL.md +26 -6
  91. package/agent-assets/skills/attach/SKILL.md +8 -27
  92. package/agent-assets/skills/background-task/SKILL.md +184 -0
  93. package/agent-assets/skills/background-task-reply/SKILL.md +100 -0
  94. package/agent-assets/skills/browser-history/SKILL.md +60 -29
  95. package/agent-assets/skills/browser-history-respond/SKILL.md +6 -1
  96. package/agent-assets/skills/browser-task/SKILL.md +33 -31
  97. package/agent-assets/skills/context/SKILL.md +26 -34
  98. package/agent-assets/skills/context/curation.json +12 -12
  99. package/agent-assets/skills/context/references/api.md +22 -20
  100. package/agent-assets/skills/context/references/required-frontmatter.md +10 -9
  101. package/agent-assets/skills/context/references/snapshot-files.md +16 -15
  102. package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +5 -5
  103. package/agent-assets/skills/context/seeds/frontmatter-requirements.seed.json +3 -3
  104. package/agent-assets/skills/docs-search/SKILL.md +19 -31
  105. package/agent-assets/skills/external-services/SKILL.delegated.claude.md +8 -95
  106. package/agent-assets/skills/external-services/SKILL.delegated.codex.md +8 -94
  107. package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +8 -94
  108. package/agent-assets/skills/external-services/SKILL.native.claude.md +15 -9
  109. package/agent-assets/skills/external-services/SKILL.native.codex.md +11 -5
  110. package/agent-assets/skills/external-services/SKILL.native.gemini.md +11 -5
  111. package/agent-assets/skills/external-services/references/exec-errors.md +32 -0
  112. package/agent-assets/skills/external-services/references/skills-crud.md +5 -5
  113. package/agent-assets/skills/gmail-lifestyle/SKILL.md +3 -2
  114. package/agent-assets/skills/gmail-lifestyle/references/receipts-api.md +4 -0
  115. package/agent-assets/skills/gmail-lifestyle/references/travel-bookings-api.md +9 -0
  116. package/agent-assets/skills/mail/SKILL.delegated.claude.md +13 -25
  117. package/agent-assets/skills/mail/SKILL.delegated.codex.md +3 -2
  118. package/agent-assets/skills/mail/SKILL.delegated.gemini.md +3 -2
  119. package/agent-assets/skills/mail/SKILL.md +12 -20
  120. package/agent-assets/skills/mail/SKILL.native.claude.md +24 -16
  121. package/agent-assets/skills/mail/SKILL.native.codex.md +16 -9
  122. package/agent-assets/skills/mail/SKILL.native.gemini.md +12 -6
  123. package/agent-assets/skills/mail/references/api.md +6 -1
  124. package/agent-assets/skills/mail/references/examples.md +2 -1
  125. package/agent-assets/skills/managed-tasks/SKILL.md +44 -77
  126. package/agent-assets/skills/managed-tasks/references/errors.md +25 -14
  127. package/agent-assets/skills/managed-tasks/references/output-path.md +33 -17
  128. package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +26 -16
  129. package/agent-assets/skills/management-policy/SKILL.md +36 -28
  130. package/agent-assets/skills/management-policy/curation.json +1 -1
  131. package/agent-assets/skills/management-policy/references/policy-workflow.md +30 -18
  132. package/agent-assets/skills/notify/SKILL.md +16 -13
  133. package/agent-assets/skills/notify/references/priority.md +42 -26
  134. package/agent-assets/skills/notion/SKILL.delegated.claude.md +1 -1
  135. package/agent-assets/skills/notion/SKILL.delegated.codex.md +1 -1
  136. package/agent-assets/skills/notion/SKILL.delegated.gemini.md +1 -1
  137. package/agent-assets/skills/notion/SKILL.md +18 -18
  138. package/agent-assets/skills/notion/SKILL.native.claude.md +4 -4
  139. package/agent-assets/skills/notion/SKILL.native.codex.md +3 -3
  140. package/agent-assets/skills/notion/SKILL.native.gemini.md +3 -3
  141. package/agent-assets/skills/observations/SKILL.md +9 -24
  142. package/agent-assets/skills/observations/references/fetch-fallback.md +22 -0
  143. package/agent-assets/skills/project-doc/SKILL.md +9 -6
  144. package/agent-assets/skills/project-doc/curation.json +3 -3
  145. package/agent-assets/skills/project-doc/seeds/project-shape.seed.json +2 -2
  146. package/agent-assets/skills/project-doc/seeds/slug-grammar.seed.json +3 -3
  147. package/agent-assets/skills/reading/SKILL.md +8 -42
  148. package/agent-assets/skills/reading/references/reading-taste.md +5 -5
  149. package/agent-assets/skills/roadmap/SKILL.md +3 -19
  150. package/agent-assets/skills/roadmap/references/api.md +23 -8
  151. package/agent-assets/skills/roadmap/references/horizon-tags.md +11 -0
  152. package/agent-assets/skills/roadmap/references/migration.md +8 -6
  153. package/agent-assets/skills/roadmap/references/retention.md +18 -0
  154. package/agent-assets/skills/schedule/SKILL.md +20 -28
  155. package/agent-assets/skills/schedule/references/importance.md +23 -0
  156. package/agent-assets/skills/schedule/references/recurrence-rule.md +26 -16
  157. package/agent-assets/skills/scheduled-managed-task/SKILL.md +46 -46
  158. package/agent-assets/skills/today/SKILL.md +38 -81
  159. package/agent-assets/skills/today/references/agent-plan-lifecycle.md +9 -4
  160. package/agent-assets/skills/today/references/agent-plan-revision.md +28 -0
  161. package/agent-assets/skills/today/references/today-skeleton.md +66 -0
  162. package/agent-assets/skills/today/seeds/agent-notes-flavors.seed.json +1 -1
  163. package/agent-assets/skills/today/seeds/section-shape.seed.json +6 -6
  164. package/agent-assets/skills/user-interview/SKILL.md +15 -90
  165. package/agent-assets/skills/user-interview/references/op-briefing.md +1 -1
  166. package/agent-assets/skills/user-interview/references/op-dm-handler.md +88 -0
  167. package/agent-assets/skills/user-interview/references/op-morning.md +2 -2
  168. package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +1 -1
  169. package/agent-assets/skills/user-profile/SKILL.md +16 -26
  170. package/agent-assets/skills/user-profile/curation.json +3 -3
  171. package/agent-assets/skills/user-profile/references/character-preferences.md +3 -3
  172. package/agent-assets/skills/wiki/wiki-ask/SKILL.md +1 -1
  173. package/agent-assets/skills/wiki/wiki-compile/SKILL.md +5 -4
  174. package/agent-assets/skills/wiki/wiki-connect/SKILL.md +32 -5
  175. package/agent-assets/skills/wiki/wiki-ingest/SKILL.md +6 -50
  176. package/agent-assets/skills/wiki/wiki-ingest/references/curl-errors.md +58 -0
  177. package/agent-assets/skills/wiki/wiki-lint/SKILL.md +20 -14
  178. package/agent-assets/skills/wiki/wiki-trace/SKILL.md +10 -5
  179. package/agent-assets/skills/wiki/wiki-vault-rules/SKILL.md +2 -0
  180. package/agent-assets/system-prompts/routine-research-cluster-update.md +71 -0
  181. package/agent-assets/task-flows/_partials/feedback-capture.md +30 -0
  182. package/agent-assets/task-flows/_partials/notion-acquire.notion.md +47 -21
  183. package/agent-assets/task-flows/background_task.md +81 -0
  184. package/agent-assets/task-flows/git.local_ahead.stale.md +1 -1
  185. package/agent-assets/task-flows/git.push.detected.md +1 -1
  186. package/agent-assets/task-flows/git.tag.created.md +1 -1
  187. package/agent-assets/task-flows/github.assigned.md +1 -1
  188. package/agent-assets/task-flows/github.pull_request.review_requested.md +2 -2
  189. package/agent-assets/task-flows/github.security_alert.md +1 -1
  190. package/agent-assets/task-flows/message.received.dm.md +11 -3
  191. package/agent-assets/task-flows/message.received.dm_first.md +8 -2
  192. package/agent-assets/task-flows/{routine.hourly_check.md → routine.activity_scan.md} +31 -23
  193. package/agent-assets/task-flows/{routine.hourly_check.triage.md → routine.activity_scan.triage.md} +3 -3
  194. package/agent-assets/task-flows/routine.evening_review.md +80 -0
  195. package/agent-assets/task-flows/routine.monthly_review.md +81 -8
  196. package/agent-assets/task-flows/routine.research_cluster_update.md +33 -19
  197. package/agent-assets/task-flows/routine.roadmap_refresh.md +2 -2
  198. package/agent-assets/task-flows/routine.today_refresh.md +1 -1
  199. package/agent-assets/task-flows/routine.weekly_review.md +124 -4
  200. package/agent-assets/task-flows/schedule.approaching.md +2 -2
  201. package/agent-assets/task-flows/scheduled.dm.md +77 -1
  202. package/agent-assets/task-flows/scheduled.task.md +7 -1
  203. package/agent-assets/task-flows/wiki.trace.md +1 -1
  204. package/agent-assets/templates/_manifest.json +2 -2
  205. package/agent-assets/templates/knowledge/dossiers/_index.md +1 -1
  206. package/agent-assets/templates/knowledge/dossiers/{hourly.md → activity-scan.md} +1 -1
  207. package/agent-assets/templates/policies/journal-format.md +1 -1
  208. package/agent-assets/templates/policies/mcp.md +1 -1
  209. package/agent-assets/templates/policies/routines/_index.md +1 -1
  210. package/agent-assets/templates/policies/routines/{hourly.md → activity-scan.md} +5 -5
  211. package/bin/aitne.mjs +45 -11
  212. package/package.json +6 -5
  213. package/scripts/commands/doctor.mjs +11 -2
  214. package/scripts/lib/process-identity.d.mts +46 -0
  215. package/scripts/lib/process-identity.mjs +193 -0
  216. package/scripts/lib/read-api-token.mjs +1 -1
  217. package/scripts/start.mjs +14 -4
  218. package/agent-assets/docs/features/routines/hourly-check.md +0 -205
@@ -0,0 +1,23 @@
1
+ ---
2
+ kind: reference
3
+ name: importance
4
+ description: The `importance` tier convention for `agent_schedule` rows — which tiers surface in `plans/roadmap.md` `Scheduled:` entries, defaults per endpoint, and when to use `strategic`.
5
+ ---
6
+
7
+ # `importance` convention
8
+
9
+ This controls whether `agent_schedule` rows become `plans/roadmap.md`
10
+ `Scheduled:` entries:
11
+
12
+ | Tier | Roadmap behavior | Use |
13
+ |---|---|---|
14
+ | `transient` | Never in roadmap; surfaces in today.md only on the day it fires | Default for `/api/schedule/dm`; short pings like "call mom next Tuesday" |
15
+ | `normal` | In roadmap only when scheduled more than 7 days out | Default for `/api/schedule`; ordinary user-facing follow-ups |
16
+ | `strategic` | In roadmap regardless of horizon | Long-prep commitments such as ESTA / travel / deadline reminders |
17
+ | `low` | Never in roadmap | Internal ticks already visible elsewhere, e.g. Agent Plan rows, recurring-schedule instances, morning retries |
18
+
19
+ For direct DMs, omit `importance` for ordinary one-off pings. If the
20
+ reminder is clearly tied to a long-prep commitment ("remind me in a
21
+ month about ESTA for the LA trip"), either write/promote the roadmap
22
+ item via the roadmap skill and let AAP schedule the reminder, or call
23
+ `/api/schedule/dm` with `"importance":"strategic"`.
@@ -8,10 +8,12 @@ description: recurrenceRule grammar — hourly / daily / weekly / monthly. Engin
8
8
 
9
9
  The daemon's recurrence engine accepts four frequencies: `hourly`,
10
10
  `daily`, `weekly`, `monthly`. Each frequency requires its own set of
11
- fields and rejects fields that don't apply — the daemon's Zod
12
- refinements return a `schedule.frequency_field_mismatch` issue (with
13
- the offending field path) when the shape disagrees with the chosen
14
- frequency. Pre-validate to save a round-trip.
11
+ fields and rejects fields that don't apply — the daemon rejects a
12
+ mismatched shape with an HTTP 400 validation error naming the
13
+ frequency/field conflict. The recurring-schedules endpoint (the
14
+ `schedule` skill) surfaces it as a `schedule.frequency_field_mismatch`
15
+ issue with a field path; the managed-tasks endpoint surfaces it as a
16
+ `managed_tasks.validation_error`. Pre-validate to save a round-trip.
15
17
 
16
18
  Times are `HH:MM` 24-hour local; `timezone` is IANA (auto-fills from
17
19
  daemon config when omitted, but explicit is safer so a roaming laptop
@@ -67,20 +69,28 @@ of the four frequencies the engine accepts.
67
69
  > Managed tasks only support daily, weekly, or monthly cadences.
68
70
  > "every hour" / "every 5 minutes" is too tight for a recurring app
69
71
  > fetch — pick `daily` or coarser. (If you want a daemon-internal
70
- > hourly check, use `/api/recurring-schedules` via the `schedule`
72
+ > activity scan, use `/api/recurring-schedules` via the `schedule`
71
73
  > skill.)
72
74
 
73
75
  Same template applies to "every 5 minutes", "every 30 minutes",
74
76
  "every 2 hours", etc. when the registering surface is managed-tasks.
75
77
 
76
- ## Cadence string vs structured rule
77
-
78
- Always send both `cadence` (human-readable, rendered in
79
- `policies/management.md` §B) and `recurrenceRule` (structured, what the
80
- scheduler executes). They must agree — if they drift, the rendered
81
- file misleads the user about what the scheduler will actually do.
82
-
83
- When the user modifies just the time (`"9am instead of 10am"`),
84
- send the new `cadence` and new `recurrenceRule` together in the same
85
- PATCH so the §B label matches the executable schedule in one
86
- transition.
78
+ ## Cadence string vs structured rule — consumer-specific
79
+
80
+ `cadence` and `recurrenceRule` are two views of the same schedule, but
81
+ which one a given endpoint persists depends on the consumer:
82
+
83
+ - **managed-tasks** (`mt_<n>` rows, rendered in `policies/management.md`
84
+ §B): send both `cadence` (human-readable, the §B label) and
85
+ `recurrenceRule` (structured, what the scheduler executes). They must
86
+ agree if they drift, the rendered file misleads the user about what
87
+ the scheduler will actually do. When the user modifies just the time
88
+ (`"9am instead of 10am"`), send the new `cadence` and new
89
+ `recurrenceRule` together so the §B label matches the executable
90
+ schedule in one transition.
91
+ - **recurring-schedules** (`/api/recurring-schedules`, the `schedule`
92
+ skill): persists ONLY `recurrenceRule`. The body schema has no
93
+ `cadence` field and the `recurring_schedules` table has no `cadence`
94
+ column — any `cadence` you send is silently dropped. Send just
95
+ `recurrenceRule` (plus `taskType`/`description`/`prompt`/`model`/
96
+ `tier`/`taskContext`); there is no §B label to keep in sync.
@@ -109,12 +109,13 @@ in order:
109
109
  #### 4.1 Exact `(source_key, external_id)` match
110
110
 
111
111
  ```bash
112
- curl -s "http://localhost:8321/api/entities?source=zoom&external_id=zm_xyz789" | jq .
112
+ curl -s "http://localhost:8321/api/entities?source=zoom&external_id=zm_xyz789" | jq '.items | length'
113
113
  ```
114
114
 
115
- If 1 result, that's the entity. Reuse its `path`. This is the
116
- strongest signal and guarantees no duplicates when the upstream app
117
- exposes a stable id.
115
+ The route returns an object `{tier, mode, items:[…]}` results live
116
+ under `items`. If 1 result, that's the entity; reuse its `path`
117
+ (`jq -r '.items[0].path'`). This is the strongest signal and
118
+ guarantees no duplicates when the upstream app exposes a stable id.
118
119
 
119
120
  If >1 result the mirror is corrupted — record
120
121
  `last_result='failed: entity-mirror conflict'` and stop. The boot
@@ -123,14 +124,16 @@ reconciler converges from the L2 files.
123
124
  #### 4.2 Fallback: `(domain, type, date, fuzzy title)` within ±48 h
124
125
 
125
126
  ```bash
126
- curl -s "http://localhost:8321/api/entities?domain=work&type=meeting&date=2026-12-04&q=foo+1on1" | jq .
127
+ curl -s "http://localhost:8321/api/entities?domain=work&type=meeting&date=2026-12-04&q=foo+1on1" | jq '.items | length'
127
128
  ```
128
129
 
129
130
  The daemon does the fuzzy match server-side (token-overlap on
130
- `title`). If 1 confident result, reuse. If >1 confident result, pick
131
- the one whose `sources.<other_app>.*` already overlaps with this
132
- datum's metadata (e.g. a Calendar entity already bound to the same
133
- attendees that's the right meeting).
131
+ `title`) and returns the matches under `items` (object response
132
+ `{tier, q, items:[…]}`). If 1 confident result, reuse it
133
+ (`jq -r '.items[0].path'`). If >1 confident result, iterate
134
+ `jq -r '.items[].path'` and pick the one whose `sources.<other_app>.*`
135
+ already overlaps with this datum's metadata (e.g. a Calendar entity
136
+ already bound to the same attendees → that's the right meeting).
134
137
 
135
138
  #### 4.3 Otherwise: allocate a new entity
136
139
 
@@ -215,9 +218,12 @@ If the entity file does not previously exist, PATCH returns
215
218
  `404 context.path_not_found` — today's API requires a PUT with full
216
219
  content to create it first (the `<domain>/<type-plural>/*` write path
217
220
  is whitelisted for both PUT and PATCH; only the file-existence rule
218
- forces the PUT-first ordering). The creating PUT must include a
219
- complete frontmatter block `type`, `domain`, `slug`, `title`,
220
- `created`, `sources` or the daemon returns 422 against `EntitySchema`.
221
+ forces the PUT-first ordering). There is **no API-side entity
222
+ validation**: the creating PUT succeeds even with incomplete
223
+ frontmatter, but always write a complete block `type`, `domain`,
224
+ `slug`, `title`, `created`, `sources` — because the entity-mirror
225
+ watcher parses loosely and silently skips rows it can't read, leaving
226
+ the §7.6 dedup lookup blind.
221
227
 
222
228
  ### Step 5b — Update the row
223
229
 
@@ -269,19 +275,16 @@ an em-dash; the user can also set the path explicitly via the
269
275
 
270
276
  ### Step 6 — Three-strikes notify
271
277
 
272
- The design (§10.4 step 6) places the 3-strikes notify on the daemon
273
- side: the `/run-result` route should auto-enqueue a `POST /api/notify`
274
- when the post-update `consecutive_failures` crosses the threshold,
275
- keeping the agent out of the user-paging loop and centralizing the
276
- threshold (`managementFailureNotifyThreshold`, default 3).
278
+ The daemon emits **no** 3-strikes notify: `updateManagedTaskRunResult`
279
+ is a bare UPDATE and the `/run-result` route only records the run and
280
+ re-renders it never calls `sendNotification`. (The similarly-named
281
+ `failureNotifyThreshold` param is metrics-only a dashboard
282
+ "failing_now" gauge not a daemon-side notify mechanism.)
277
283
 
278
- **Implementation status:** the daemon does NOT currently emit this
279
- notify `/api/managed-tasks/:id/run-result` records the run and
280
- re-renders the file but stops there. Until the daemon closes the
281
- gap, **this skill is the safety net**: after Step 5b's failure-path
282
- PATCH, if the post-update `consecutive_failures` you computed is ≥ 3
283
- AND was < 3 before this run (i.e. the *crossing*, not every
284
- subsequent failure), call:
284
+ **This skill is the sole notifier** the safety net for failing
285
+ managed tasks. After Step 5b's failure-path PATCH, if the post-update
286
+ `consecutive_failures` you computed is 3 AND was < 3 before this run
287
+ (i.e. the *crossing*, not every subsequent failure), call:
285
288
 
286
289
  ```bash
287
290
  curl -sS -X POST http://localhost:8321/api/notify \
@@ -309,16 +312,15 @@ is **empty final text**: bookkeeping is invisible by design. The user
309
312
  sees the change reflected in `state/activity/<source>.md` (auto-built) and
310
313
  `<domain>/_index.md`, not in a chat ping per fire.
311
314
 
312
- Exceptions:
315
+ Exceptions (final text stays empty in all cases — these only govern
316
+ whether a `/api/notify` fires):
313
317
 
314
318
  - The `notify` skill's awareness gate fired *during* this run — e.g.
315
319
  the new datum is a meeting starting in 15 min. Then call
316
- `/api/notify` and keep the final text empty (a follow-up "Sent"
317
- line is duplicate noise per `scheduled.task.md`).
318
- - `last_result='failed: ...'` with `consecutive_failures < 3` final
319
- text empty; the activity view records it; the user is not paged.
320
- - `last_result='failed: ...'` at the threshold crossing — Step 6 fired
321
- the `/api/notify`; final text empty.
320
+ `/api/notify` (a follow-up "Sent" line is duplicate noise per
321
+ `scheduled.task.md`).
322
+ - A failure: notify only on the Step 6 threshold crossing; below it,
323
+ the activity view records the failure and the user is not paged.
322
324
 
323
325
  NEVER write a `## Agent Plan` row for a managed-task run — managed
324
326
  tasks are not the same as Agent Plan rows. The Agent Plan loop close
@@ -332,13 +334,15 @@ A scheduled fire that crashes mid-run leaves the row's
332
334
  `last_run_at` un-updated. The next slot picks up the same `since`
333
335
  window and re-fetches the same data — the entity-mirror's
334
336
  `(source_key, external_id)` lookup makes this a **merge**, not a
335
- duplicate. The PATCH body is content-additive: a section appended
336
- twice with the same content is harmless because Step 5a's
337
- `frontmatterMerge` is deep, and the section-append mode is
338
- "add this block as-is" (the daemon de-duplicates exact-string-match
339
- sections with the same heading on append). For sources without a
340
- stable `external_id`, use Step 4.2's date+title window at the cost
341
- of occasional dedup misses, never duplicates by construction.
337
+ duplicate at the file level, and Step 5a's `frontmatterMerge` is deep,
338
+ so re-writing the same frontmatter is idempotent. **Body
339
+ section-appends are NOT de-duplicated** `mode:"append"` concatenates
340
+ unconditionally, so re-appending the same block on a replay WILL
341
+ duplicate it. Guard against that: on a re-run, `GET` the section first
342
+ and skip any block already present (or carry the structured fields in
343
+ frontmatter, which merges). For sources without a stable `external_id`,
344
+ use Step 4.2's date+title window — at the cost of occasional dedup
345
+ misses, never duplicates by construction.
342
346
 
343
347
  ## Caps
344
348
 
@@ -352,20 +356,16 @@ appended `## <App> Notes` body, not as a separate DM.
352
356
 
353
357
  | HTTP | `error` | What to do |
354
358
  |---|---|---|
355
- | 400 (`/api/managed-tasks/:id/run-result`) | `invalid_id` / `validation_error` | Body shape drift re-check field names exactly match `last_run_at` / `last_result` / `consecutive_failures` |
359
+ | 400 (`/api/managed-tasks/:id` or `:id/run-result`) | `invalid_id` / `validation_error` | All managed-task body validation is 400 (never 422). Re-check field names exactly match `last_run_at` / `last_result` / `consecutive_failures`; for the user-facing PATCH, drop the offending field (typically `output_path`) and retry once with the rest |
356
360
  | 404 (`/api/context/<domain>/<type-plural>/...`) | `context.path_not_found` | The entity file does not exist yet — PATCH cannot create it. Create it first with a PUT carrying full content + complete frontmatter (§Step 5a), then the merge succeeds. (Entity-domain write paths ARE whitelisted for PUT/PATCH; the prior 403 claim is obsolete.) |
357
361
  | 404 (`/api/managed-tasks/:id`) | `not_found` | Row was stopped mid-run. End the session quietly. |
358
- | 422 (`/api/context/...`) | `validation_error` | Frontmatter incomplete or malformed; populate all required fields and retry once |
359
- | 422 (`/api/managed-tasks/:id`) | `validation_error` | Path / body shape rejected; drop the offending field (typically `output_path`) and retry once with the rest |
360
362
  | 5xx | `internal_error` | Record `last_result='failed: <body.message>'` via Step 5b's failure form and end the session |
361
363
 
362
364
  ## What this skill does NOT do
363
365
 
364
- - Does NOT post `/api/notify` for routine successes (silent by design).
365
- - Does NOT post `/api/notify` for routine failures (final text empty).
366
- The exception is the 3-strikes crossing — see Step 6: until the
367
- daemon owns the threshold notify, the agent emits one DM at the
368
- 3rd consecutive failure, then stays silent until success or stop.
366
+ - Does NOT post `/api/notify` for routine successes or failures
367
+ (silent by design). The sole exception is the 3-strikes crossing
368
+ see Step 6.
369
369
  - Does NOT touch the §B row's `app` or `cadence` — those are
370
370
  user-mutable only via the `managed-tasks` skill `## Modify` flow.
371
371
  - Does NOT INSERT `agent_schedule` rows. The cron scheduler does.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: today
3
- description: Load for any event that reads or writes today.md — morning routines, hourly checks, DMs, scheduled tasks. Owns the day-type filter, Agent Plan contract, Agent Log/Notes schema, schedule.approaching format, and Morning Routine lock.
3
+ description: Load for any event that reads or writes today.md — morning routines, activity scans, DMs, scheduled tasks. Owns the day-type filter, Agent Plan contract, Agent Log/Notes schema, schedule.approaching format, and Morning Routine lock.
4
4
  allowed-tools:
5
5
  - Bash(curl *)
6
6
  - Read
@@ -8,29 +8,7 @@ allowed-tools:
8
8
 
9
9
  # today.md Guide
10
10
 
11
- Output language: today.md is Policy B — see `<output_language_policy>`. The skeleton lines listed below stay English verbatim; bullets and narrative under each H2 are in `<settings primary_language>`.
12
-
13
- **Skeleton (do NOT translate — exact-regex-validated on PUT):**
14
-
15
- 1. **Line 1** — `# YYYY-MM-DD (day-of-week)` H1 date line. The weekday
16
- inside `(...)` is free-form and may be localized; the rest is fixed.
17
- 2. **Line 2** — `> Day type: …` blockquote (full pattern below). Field
18
- labels (`Day type`, `Work focus`, `Study focus`, `Personal focus`),
19
- values (`Weekday`/`Weekend`, `on`/`off`), pipe separators (` | `),
20
- and the leading `> ` are **all English ASCII, fixed casing, fixed
21
- spacing**. This is parsed by every downstream event handler.
22
- 3. **The six H2 headers** — `## User Schedule`, `## User Tasks`,
23
- `## Agent Plan`, `## Agent Notes`, `## Agent Log`, `## Handoff` —
24
- in this order.
25
-
26
- A `PUT /api/context/state/today` whose line 1 or line 2 fails the exact regex
27
- is rejected with 400 and the daemon does NOT write the file. Translating
28
- any keyword on line 2 (the field labels, the `Weekday`/`Weekend` value,
29
- or `on`/`off`) into the user's primary language is the most common
30
- failure mode — keep it English even when the rest of today.md is being
31
- written in another language. The `<output_language_policy>` skeleton
32
- precedence rule already covers this; this paragraph just makes the
33
- consequence explicit.
11
+ Output language: today.md is Policy B — see `<output_language_policy>`. The skeleton (line 1, line 2, the six H2 headers) stays English verbatim — line 1 and line 2 are exact-regex-validated on PUT; bullets and narrative under each H2 are in `<settings primary_language>`. §Line 1 and §Header line carry the exact patterns and the consequence of translating a line-2 keyword.
34
12
 
35
13
  today.md has a **day-type header line** (second line) and **six required sections**.
36
14
 
@@ -78,52 +56,35 @@ Line 2 encodes today's filter policy (field order is fixed — downstream parser
78
56
  > Day type: {Weekday|Weekend} | Work focus: {on|off} | Study focus: {on|off} | Personal focus: {on|off}
79
57
  ```
80
58
 
81
- Derivation (Morning Routine at 04:00):
82
- 1. Day-of-week from `<current_time>`. Weekday = Mon–Fri, Weekend = Sat–Sun (unless user/profile.md overrides).
83
- 2. Read `identity/profile.md` ## Notification Preferences. Apply matching policy.
84
- 3. No explicit policy default: weekday = all on, weekend = work off, study on, personal on.
59
+ The field labels (`Day type`, `Work focus`, `Study focus`, `Personal
60
+ focus`), the values (`Weekday`/`Weekend`, `on`/`off`), the ` | `
61
+ separators, and the leading `> ` are all English ASCII, fixed casing,
62
+ fixed spacing exact-regex-validated. **Translating any line-2 keyword
63
+ into the primary language is the most common write failure: PUT is
64
+ rejected 400 and the file is not written.** Keep line 2 English even
65
+ when the rest of today.md is in another language.
85
66
 
86
- Category focus-dimension mapping:
67
+ Derivation, focus-dimension mapping, and downstream focus-filter usage —
68
+ needed only when the Morning Routine writes line 2 — are in the
69
+ **today-skeleton** reference.
87
70
 
88
- | Category tag | Controlled by |
89
- |---|---|
90
- | `[work]` | Work focus |
91
- | `[study]` | Study focus |
92
- | `[personal]`, `[home]` | Personal focus |
71
+ Line 2 is not frozen for the day: when the user declares a day-shape
72
+ change ("taking the afternoon off", "sick today"), the DM handler
73
+ updates the matching focus value(s) in place — exact format above,
74
+ English keywords. PATCH targets sections only and cannot reach line 2:
75
+ GET `/api/context/state/today`, edit line 2 alone, PUT the full
76
+ document straight back. Fire-time filters then suppress or re-admit
77
+ whole categories; never hand-edit individual rows for a focus change.
93
78
 
94
- How downstream events use it:
95
- - Morning Routine suppresses items with focus `off` at generation time
96
- - scheduled.task re-checks at fire time: if focus is off, skip + close as `skipped (focus off)`
97
- - DM handler skips follow-ups on rows whose focus is off
98
- - Hourly check drops observations whose focus is off
99
- - schedule.approaching suppresses notifications for off categories
79
+ ## Sections and entry formats
100
80
 
101
- ## Sections and when to update
81
+ The per-section update matrix (when/mode/who-writes) and the
82
+ per-section entry-format table (User Schedule / User Tasks / Agent Plan
83
+ / Agent Log row shapes, category tags, trigger tags, mandatory-HH:MM
84
+ fallback rules) are reference-grade detail the Morning Routine needs to
85
+ write the full skeleton. They live in the **today-skeleton** reference.
102
86
 
103
- | Section | When to update | Mode | Who writes |
104
- |---|---|---|---|
105
- | `user_schedule` | Morning from calendar; refresh after sync | PUT (Morning) / PATCH replace | Morning primary |
106
- | `user_tasks` | Status changes, new tasks, hourly observations | PATCH append (new) / replace (flip) | Morning + event-driven |
107
- | `agent_plan` | Morning lays out actions; hourly adds new; scheduled.task flips `[x]` | PATCH append / replace (flip) | Morning + hourly + scheduled.task |
108
- | `agent_notes` | Look-ahead + day-time events | PATCH append | Morning (look-ahead) + event-driven |
109
- | `agent_log` | Every non-trivial agent action | PATCH append | All events |
110
- | `handoff` | Evening Review finalizes carry-overs | PATCH replace | Evening Review only |
111
-
112
- ## Entry formats
113
-
114
- | Section | Format | Example |
115
- |---|---|---|
116
- | `user_schedule` | `- HH:MM[–HH:MM] <title> [category]` | `- 14:00–15:00 Design review [work]` |
117
- | `user_tasks` | `- [ ] HH:MM <description> [category]` | `- [ ] 11:00 Finalize Q2 draft [work]` |
118
- | `agent_plan` | `- [ ] HH:MM <action> [category] →<trigger>` | `- [ ] 08:55 DM reminder: standup [work] →DM` |
119
- | `agent_notes` | see flavors below | |
120
- | `agent_log` | `- HH:MM <action description>` | `- 13:50 [cal] Design review — reminder sent` |
121
-
122
- **Category tags**: `[work]`, `[study]`, `[personal]`, `[home]` — mandatory on Agent Plan rows (not decorative).
123
-
124
- **Trigger tags** (Agent Plan only): `→DM`, `→notify`, `→check-in`, `→wake`
125
-
126
- **HH:MM is mandatory** on User Tasks and Agent Plan rows. If no natural time: (1) deadline → 2h before, (2) calendar-adjacent → 15 min before, (3) otherwise → working-hours midpoint.
87
+ {{> ref:today-skeleton }}
127
88
 
128
89
  ## User Tasks vs Agent Plan
129
90
 
@@ -146,11 +107,19 @@ below: execute, append Agent Log entry, read-then-flip the row to
146
107
  `[x]` with annotation, retry on `state/today.md` lock, surface missing-row
147
108
  state.
148
109
 
149
- DM handlers and hourly checks do not flip Agent Plan rows read the
150
- reference only if your event type is in its applicability list.
110
+ DM handlers and activity scans never flip rows for execution outcomes
111
+ their only row write is the cancel / amend revision below.
151
112
 
152
113
  {{> ref:agent-plan-lifecycle }}
153
114
 
115
+ ## Agent Plan revision — cancel / amend before fire time
116
+
117
+ When a pending row's premise dies or its time must change before it
118
+ fires, the session that detects it — DM handlers and activity scans
119
+ included — revises schedule + row + Agent Log in the same turn:
120
+
121
+ {{> ref:agent-plan-revision }}
122
+
154
123
  ## Agent Log format
155
124
 
156
125
  `- HH:MM Action description`. Log every user-visible action, context file write, or outbound API call. Skip purely internal no-ops.
@@ -173,7 +142,7 @@ reference only if your event type is in its applicability list.
173
142
  ## schedule.approaching → Agent Notes + Agent Log
174
143
 
175
144
  The firing flow gates timing — `schedule.approaching` only fires at
176
- `minutesUntil <= 15` (`packages/daemon/src/observers/calendar-poller.ts:125`),
145
+ `minutesUntil <= 15` (`packages/daemon/src/observers/imminent-event-scheduler.ts:281`),
177
146
  so the LLM never sees this format-using event with a wider lookahead.
178
147
  No additional gate is restated here.
179
148
 
@@ -191,19 +160,7 @@ PUT today.md must contain the H1 date line, day-type header quote, and all six s
191
160
 
192
161
  ## today.md API
193
162
 
194
- The generic GET / PUT / PATCH / DELETE surface modes, fields, error
195
- envelopes, body-submission shape — is documented in the **context**
196
- skill `references/api.md`. today.md-specific rules layered on top:
197
-
198
- - **Lock.** `state/today.md` is locked by the Morning Routine. Include
199
- `X-Lock-Id: <today_write_lock_id>` on every PUT / PATCH when the
200
- tag is in your context; other sessions get `409
201
- morning_routine_lock_held` while the lock is held.
202
- - **Skeleton validators.** PUT is rejected (400) if line 1 fails the
203
- H1 date regex or line 2 fails the day-type quote regex (see §"Line 1
204
- — which date?" and §"Header line — day-type filter" above). PUT is
205
- also rejected (400) if line 1's date disagrees with the daemon's current
206
- agent-day — the error echoes both values.
163
+ The generic GET / PUT / PATCH / DELETE shape lives in the **context** skill `references/api.md`. today.md adds only the Morning Routine lock (§Morning Routine lock) and the line-1/line-2 skeleton validators (§Line 1, §Header line) detailed above.
207
164
 
208
165
  ## Knowledge map — section shape (auto-curated)
209
166
 
@@ -8,9 +8,10 @@ description: Agent Plan close-the-loop lifecycle for scheduled.task / scheduled.
8
8
 
9
9
  This reference is consumed by `scheduled.task`, `scheduled.dm`,
10
10
  `routine.morning_routine`, and `routine.evening_review` — every event
11
- that may flip an Agent Plan row. DM handlers and hourly checks never
12
- flip Agent Plan rows; if you are not one of the listed events, the
13
- lifecycle below does not apply to your turn.
11
+ that flips an Agent Plan row at fire time. DM handlers and hourly
12
+ checks never flip rows for execution outcomes; their one write path is
13
+ the pre-fire cancel / amend revision in the `today` skill body, not
14
+ this lifecycle.
14
15
 
15
16
  ## Why flip inside the scheduled task, not later?
16
17
 
@@ -84,6 +85,10 @@ Leaving rows as `[ ]` is a bug: Morning Routine's reconciliation
84
85
  treats unflipped past rows as "scheduler dropped the wake", which
85
86
  triggers self-recovery and inflates the agent-actions audit.
86
87
 
88
+ A fourth terminal state — `(cancelled: <reason>)` — is written before
89
+ fire time by the cancel / amend revision path (today skill body),
90
+ never by this lifecycle.
91
+
87
92
  ## Lock retry rules
88
93
 
89
94
  The Morning Routine holds the `state/today.md` write lock. Other sessions
@@ -94,7 +99,7 @@ get `409 morning_routine_lock_held` on PUT / PATCH while the lock is held.
94
99
  status code 409 alone.
95
100
  - Retry policy: 30 s back-off, max 3 attempts. If the third attempt
96
101
  also returns 409, log `loop-closeout deferred (lock_held)` to Agent
97
- Log and exit. The next Evening Review reconciliation will catch the
102
+ Log and exit. The next Morning Routine reconciliation will catch the
98
103
  un-flipped row.
99
104
  - Do NOT retry without the `X-Lock-Id` header when the tag is in
100
105
  context. Sending a PATCH without the header during a held-lock
@@ -0,0 +1,28 @@
1
+ ---
2
+ kind: reference
3
+ name: agent-plan-revision
4
+ description: Pre-fire cancel / amend recipe for Agent Plan rows — schedule + row + Agent Log revised in one turn, with the confidence gate.
5
+ ---
6
+
7
+ # Agent Plan revision — cancel / amend recipe
8
+
9
+ Triggers: the referenced calendar event was cancelled or moved; the
10
+ user already handled the item or says it is no longer needed; a
11
+ schedule PATCH/DELETE would otherwise orphan the row.
12
+
13
+ All three in the same turn — lock-step holds in both directions:
14
+
15
+ 1. **Schedule** — `DELETE /api/schedule/:id` to cancel, or
16
+ `PATCH /api/schedule/:id` to re-time. Find the id via
17
+ `GET /api/schedule?status=pending` (match subject + HH:MM).
18
+ 2. **Row** — read-before-write PATCH of `agent_plan` (lifecycle
19
+ recipe): cancel → flip to
20
+ `- [x] HH:MM <action> [category] →<trigger> (cancelled: <reason>)`;
21
+ amend → update the row's HH:MM / action text, keep `[ ]`.
22
+ 3. **Agent Log** — `- HH:MM [agent_plan] cancelled <action> — <reason>`
23
+ (or `rescheduled <action> to HH:MM — <reason>`).
24
+
25
+ Confidence gate: revise only when subject AND time both unambiguously
26
+ match the invalidating fact. A wrong cancellation silently never fires
27
+ — worse than a stale wake, which fire-time guards can still skip.
28
+ Uncertain → leave the pair alone.
@@ -0,0 +1,66 @@
1
+ ---
2
+ kind: reference
3
+ name: today-skeleton
4
+ description: today.md full-skeleton detail for Morning Routine — day-type derivation, focus-dimension mapping, downstream focus-filter usage, per-section update matrix, and entry-format table. Only Morning Routine writes the full skeleton; DM/activity-scan events do not need this.
5
+ ---
6
+
7
+ # today.md skeleton — derivation, sections, entry formats
8
+
9
+ Only the Morning Routine writes the full skeleton from scratch. DM
10
+ handlers, activity scans, and scheduled.task sessions patch individual
11
+ sections and do not need this detail — load it only when populating
12
+ line 2 or laying out the section bodies.
13
+
14
+ ## Day-type derivation (Morning Routine at 04:00)
15
+
16
+ Line 2 is:
17
+
18
+ ```
19
+ > Day type: {Weekday|Weekend} | Work focus: {on|off} | Study focus: {on|off} | Personal focus: {on|off}
20
+ ```
21
+
22
+ 1. Day-of-week from `<current_time>`. Weekday = Mon–Fri, Weekend = Sat–Sun (unless user/profile.md overrides).
23
+ 2. Read `identity/profile.md` → ## Notification Preferences. Apply matching policy.
24
+ 3. No explicit policy → default: weekday = all on, weekend = work off, study on, personal on.
25
+
26
+ Category → focus-dimension mapping:
27
+
28
+ | Category tag | Controlled by |
29
+ |---|---|
30
+ | `[work]` | Work focus |
31
+ | `[study]` | Study focus |
32
+ | `[personal]`, `[home]` | Personal focus |
33
+
34
+ How downstream events use the filter:
35
+ - Morning Routine suppresses items with focus `off` at generation time
36
+ - scheduled.task re-checks at fire time: if focus is off, skip + close as `skipped (focus off)`
37
+ - DM handler skips follow-ups on rows whose focus is off
38
+ - Activity scan drops observations whose focus is off
39
+ - schedule.approaching suppresses notifications for off categories
40
+
41
+ ## Sections and when to update
42
+
43
+ | Section | When to update | Mode | Who writes |
44
+ |---|---|---|---|
45
+ | `user_schedule` | Morning from calendar; refresh after sync | PUT (Morning) / PATCH replace | Morning primary |
46
+ | `user_tasks` | Status changes, new tasks, activity-scan observations | PATCH append (new) / replace (flip) | Morning + event-driven |
47
+ | `agent_plan` | Morning lays out actions; activity scan adds new; scheduled.task flips `[x]` | PATCH append / replace (flip) | Morning + activity scan + scheduled.task |
48
+ | `agent_notes` | Look-ahead + day-time events | PATCH append | Morning (look-ahead) + event-driven |
49
+ | `agent_log` | Every non-trivial agent action | PATCH append | All events |
50
+ | `handoff` | Evening Review finalizes carry-overs | PATCH replace | Evening Review only |
51
+
52
+ ## Entry formats
53
+
54
+ | Section | Format | Example |
55
+ |---|---|---|
56
+ | `user_schedule` | `- HH:MM[–HH:MM] <title> [category]` | `- 14:00–15:00 Design review [work]` |
57
+ | `user_tasks` | `- [ ] HH:MM <description> [category]` | `- [ ] 11:00 Finalize Q2 draft [work]` |
58
+ | `agent_plan` | `- [ ] HH:MM <action> [category] →<trigger>` | `- [ ] 08:55 DM reminder: standup [work] →DM` |
59
+ | `agent_notes` | see flavors in the `today` skill body | |
60
+ | `agent_log` | `- HH:MM <action description>` | `- 13:50 [cal] Design review — reminder sent` |
61
+
62
+ **Category tags**: `[work]`, `[study]`, `[personal]`, `[home]` — mandatory on Agent Plan rows (not decorative).
63
+
64
+ **Trigger tags** (Agent Plan only): `→DM`, `→notify`, `→check-in`, `→wake`
65
+
66
+ **HH:MM is mandatory** on User Tasks and Agent Plan rows. If no natural time: (1) deadline → 2h before, (2) calendar-adjacent → 15 min before, (3) otherwise → working-hours midpoint.
@@ -11,7 +11,7 @@
11
11
  },
12
12
  {
13
13
  "topic": "Latent profile question",
14
- "rule": "Latent profile questions are open questions the agent wants to ask the user when context allows, marked with the suffix `(asked HH:MM)` once asked."
14
+ "rule": "Latent profile questions are open questions to ask the user when context allows. The parenthetical is the state: `(latent)` while waiting, `(asked HH:MM)` once woven into a reply."
15
15
  }
16
16
  ]
17
17
  }
@@ -3,14 +3,14 @@
3
3
  "files": [
4
4
  {
5
5
  "path": "state/today.md",
6
- "purpose": "today's plan, schedule, agent log, and handoff to tomorrow",
6
+ "purpose": "today's schedule, tasks, agent plan, log, and handoff to tomorrow",
7
7
  "sections": [
8
- { "heading": "## Plan", "contains": "the day's intent in plain prose" },
9
- { "heading": "## Schedule", "contains": "time-blocked events for today" },
10
- { "heading": "## Tasks", "contains": "open task entries with status checkbox" },
8
+ { "heading": "## User Schedule", "contains": "time-blocked events for today" },
9
+ { "heading": "## User Tasks", "contains": "open task entries the user will do, with status checkbox" },
10
+ { "heading": "## Agent Plan", "contains": "scheduled actions Claude Code will take to help, each backed by a schedule entry" },
11
11
  { "heading": "## Agent Notes", "contains": "look-aheads, day-time observations, latent profile questions" },
12
- { "heading": "## Handoff", "contains": "context for tomorrow's morning routine" },
13
- { "heading": "## Done", "contains": "tasks the user marked complete" }
12
+ { "heading": "## Agent Log", "contains": "running log of every non-trivial agent action" },
13
+ { "heading": "## Handoff", "contains": "context carried over to tomorrow's morning routine" }
14
14
  ]
15
15
  }
16
16
  ]