@aitne-sh/aitne 0.1.8 → 0.1.9

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 (276) hide show
  1. package/README.md +218 -161
  2. package/agent-assets/agent-profiles/_safety.md +3 -3
  3. package/agent-assets/agent-profiles/browser-task.md +108 -0
  4. package/agent-assets/agent-profiles/conversational.md +3 -3
  5. package/agent-assets/agent-profiles/profile-importer.md +2 -2
  6. package/agent-assets/agent-profiles/routine-fetch-window.md +30 -19
  7. package/agent-assets/agents/context-index-reconcile/agent.md +52 -0
  8. package/agent-assets/agents/evening-review/agent.md +53 -0
  9. package/agent-assets/agents/hourly-check/agent.md +62 -0
  10. package/agent-assets/agents/monthly-review/agent.md +55 -0
  11. package/agent-assets/agents/morning-routine/agent.md +78 -0
  12. package/agent-assets/agents/roadmap-maintenance/agent.md +52 -0
  13. package/agent-assets/agents/skill-curation/agent.md +52 -0
  14. package/agent-assets/agents/user-profile-sweep-evening/agent.md +48 -0
  15. package/agent-assets/agents/user-profile-sweep-morning/agent.md +53 -0
  16. package/agent-assets/agents/weekly-review/agent.md +51 -0
  17. package/agent-assets/docs/concepts/agent-day.md +13 -11
  18. package/agent-assets/docs/concepts/auth-health.md +47 -10
  19. package/agent-assets/docs/concepts/backends-and-tiers.md +66 -31
  20. package/agent-assets/docs/concepts/costs-and-quotas.md +50 -15
  21. package/agent-assets/docs/concepts/delegated-mode.md +52 -13
  22. package/agent-assets/docs/concepts/memory-model.md +72 -32
  23. package/agent-assets/docs/concepts/observations.md +49 -11
  24. package/agent-assets/docs/concepts/process-keys.md +56 -22
  25. package/agent-assets/docs/concepts/routines.md +60 -33
  26. package/agent-assets/docs/concepts/safety-and-execution.md +50 -21
  27. package/agent-assets/docs/concepts/safety-model.md +42 -34
  28. package/agent-assets/docs/concepts/skills.md +33 -17
  29. package/agent-assets/docs/features/integrations/browser-history.md +195 -0
  30. package/agent-assets/docs/features/integrations/calendar.md +39 -29
  31. package/agent-assets/docs/features/integrations/git.md +18 -7
  32. package/agent-assets/docs/features/integrations/github.md +84 -33
  33. package/agent-assets/docs/features/integrations/mail.md +59 -16
  34. package/agent-assets/docs/features/integrations/notion.md +18 -6
  35. package/agent-assets/docs/features/integrations/obsidian.md +28 -5
  36. package/agent-assets/docs/features/lifestyle/git.md +42 -38
  37. package/agent-assets/docs/features/lifestyle/reading.md +50 -22
  38. package/agent-assets/docs/features/lifestyle/receipts.md +51 -21
  39. package/agent-assets/docs/features/lifestyle/travel-bookings.md +76 -14
  40. package/agent-assets/docs/features/memory-files/agent-journal.md +111 -50
  41. package/agent-assets/docs/features/memory-files/projects.md +71 -17
  42. package/agent-assets/docs/features/memory-files/roadmap.md +50 -10
  43. package/agent-assets/docs/features/memory-files/schedule.md +113 -70
  44. package/agent-assets/docs/features/memory-files/today.md +46 -21
  45. package/agent-assets/docs/features/memory-files/user-profile.md +63 -33
  46. package/agent-assets/docs/features/messaging/bang-commands.md +113 -36
  47. package/agent-assets/docs/features/messaging/dashboard-chat.md +43 -21
  48. package/agent-assets/docs/features/messaging/discord.md +35 -4
  49. package/agent-assets/docs/features/messaging/overview.md +37 -19
  50. package/agent-assets/docs/features/messaging/pairing-and-magic-phrase.md +94 -27
  51. package/agent-assets/docs/features/messaging/slack.md +67 -14
  52. package/agent-assets/docs/features/messaging/telegram.md +18 -5
  53. package/agent-assets/docs/features/messaging/whatsapp.md +71 -17
  54. package/agent-assets/docs/features/operations/activity-and-conversations.md +44 -15
  55. package/agent-assets/docs/features/operations/approvals.md +48 -16
  56. package/agent-assets/docs/features/operations/backend-routing.md +68 -16
  57. package/agent-assets/docs/features/operations/cost-tracking.md +84 -17
  58. package/agent-assets/docs/features/operations/managed-chromium.md +221 -0
  59. package/agent-assets/docs/features/operations/notifications.md +52 -11
  60. package/agent-assets/docs/features/operations/quiet-hours.md +63 -40
  61. package/agent-assets/docs/features/operations/schedule-approaching.md +54 -24
  62. package/agent-assets/docs/features/routines/custom-routines.md +88 -20
  63. package/agent-assets/docs/features/routines/evening-review.md +74 -21
  64. package/agent-assets/docs/features/routines/hourly-check.md +149 -29
  65. package/agent-assets/docs/features/routines/morning-routine.md +53 -35
  66. package/agent-assets/docs/features/routines/weekly-review.md +40 -21
  67. package/agent-assets/docs/features/wiki/commands.md +26 -16
  68. package/agent-assets/docs/features/wiki/cost-and-approval.md +240 -0
  69. package/agent-assets/docs/features/wiki/dashboard.md +255 -0
  70. package/agent-assets/docs/features/wiki/overview.md +68 -10
  71. package/agent-assets/docs/features/wiki/search.md +248 -0
  72. package/agent-assets/docs/features/wiki/workspaces.md +254 -0
  73. package/agent-assets/docs/getting-started/01-what-is-this.md +34 -23
  74. package/agent-assets/docs/getting-started/02-first-steps.md +13 -8
  75. package/agent-assets/docs/getting-started/03-what-can-this-do.md +25 -14
  76. package/agent-assets/docs/getting-started/04-first-day.md +38 -20
  77. package/agent-assets/docs/glossary.md +235 -24
  78. package/agent-assets/docs/guides/add-a-custom-routine.md +63 -23
  79. package/agent-assets/docs/guides/backup-and-restore.md +80 -16
  80. package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +56 -25
  81. package/agent-assets/docs/guides/build-your-wiki.md +22 -9
  82. package/agent-assets/docs/guides/change-which-model-handles-x.md +64 -10
  83. package/agent-assets/docs/guides/connect-a-new-mail-account.md +64 -15
  84. package/agent-assets/docs/guides/explore-with-trace-and-connect.md +28 -11
  85. package/agent-assets/docs/guides/import-knowledge-file.md +50 -40
  86. package/agent-assets/docs/guides/install-and-run.md +48 -19
  87. package/agent-assets/docs/guides/maintain-wiki-health.md +35 -10
  88. package/agent-assets/docs/guides/migrate-machines.md +74 -18
  89. package/agent-assets/docs/guides/multiple-wikis-for-multiple-domains.md +111 -60
  90. package/agent-assets/docs/guides/pause-the-agent.md +65 -24
  91. package/agent-assets/docs/guides/reinstall-cleanly.md +88 -18
  92. package/agent-assets/docs/guides/setup-wizard.md +113 -54
  93. package/agent-assets/docs/guides/switch-default-backend.md +62 -16
  94. package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +26 -10
  95. package/agent-assets/docs/reference/api.md +143 -32
  96. package/agent-assets/docs/reference/cli-commands.md +38 -17
  97. package/agent-assets/docs/reference/config.md +224 -49
  98. package/agent-assets/docs/reference/disallowed-tools.md +29 -10
  99. package/agent-assets/docs/reference/keyboard-shortcuts.md +34 -10
  100. package/agent-assets/docs/reference/knowledge-layout.md +620 -0
  101. package/agent-assets/docs/reference/process-keys.md +61 -5
  102. package/agent-assets/docs/reference/skills.md +38 -12
  103. package/agent-assets/docs/troubleshooting/auth-failed.md +48 -19
  104. package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +90 -28
  105. package/agent-assets/docs/troubleshooting/fallback-keeps-firing.md +86 -22
  106. package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +68 -24
  107. package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +80 -20
  108. package/agent-assets/docs/troubleshooting/observation-not-detected.md +73 -21
  109. package/agent-assets/docs/troubleshooting/quota-exhausted.md +29 -5
  110. package/agent-assets/docs/troubleshooting/wiki-ingest-full-blocked.md +126 -54
  111. package/agent-assets/docs/troubleshooting/wiki-write-failed.md +29 -12
  112. package/agent-assets/optimizer-skills/drift-analysis/SKILL.md +1 -1
  113. package/agent-assets/optimizer-skills/knowledge-map/SKILL.md +1 -1
  114. package/agent-assets/optimizer-skills/skill-curation/SKILL.md +1 -1
  115. package/agent-assets/sandbox/linux/aitne-chromium.apparmor +91 -0
  116. package/agent-assets/sandbox/macos/aitne-chromium.sb +156 -0
  117. package/agent-assets/skills/agent-actions/SKILL.md +2 -2
  118. package/agent-assets/skills/agent-create/SKILL.md +149 -0
  119. package/agent-assets/skills/attach/SKILL.md +2 -2
  120. package/agent-assets/skills/browser-history/SKILL.md +198 -0
  121. package/agent-assets/skills/browser-history-respond/SKILL.md +106 -0
  122. package/agent-assets/skills/browser-task/SKILL.md +169 -0
  123. package/agent-assets/skills/context/SKILL.md +12 -12
  124. package/agent-assets/skills/context/curation.json +2 -2
  125. package/agent-assets/skills/context/references/api.md +43 -31
  126. package/agent-assets/skills/context/references/required-frontmatter.md +3 -3
  127. package/agent-assets/skills/context/references/snapshot-files.md +6 -6
  128. package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +3 -3
  129. package/agent-assets/skills/docs-search/SKILL.md +4 -3
  130. package/agent-assets/skills/external-services/SKILL.delegated.claude.md +11 -21
  131. package/agent-assets/skills/external-services/SKILL.delegated.codex.md +11 -21
  132. package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +11 -21
  133. package/agent-assets/skills/external-services/SKILL.md +3 -3
  134. package/agent-assets/skills/external-services/SKILL.native.claude.md +5 -5
  135. package/agent-assets/skills/external-services/SKILL.native.codex.md +7 -7
  136. package/agent-assets/skills/external-services/SKILL.native.gemini.md +4 -4
  137. package/agent-assets/skills/external-services/references/calendar-apple.md +2 -2
  138. package/agent-assets/skills/external-services/references/calendar-outlook.md +1 -1
  139. package/agent-assets/skills/external-services/references/obsidian.md +2 -2
  140. package/agent-assets/skills/gmail-lifestyle/SKILL.md +9 -82
  141. package/agent-assets/skills/mail/SKILL.delegated.claude.md +14 -5
  142. package/agent-assets/skills/mail/SKILL.delegated.codex.md +8 -4
  143. package/agent-assets/skills/mail/SKILL.delegated.gemini.md +8 -4
  144. package/agent-assets/skills/mail/references/api.md +4 -2
  145. package/agent-assets/skills/mail/references/providers.md +1 -1
  146. package/agent-assets/skills/managed-tasks/SKILL.md +9 -9
  147. package/agent-assets/skills/managed-tasks/references/errors.md +9 -6
  148. package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +1 -1
  149. package/agent-assets/skills/management-policy/SKILL.md +32 -31
  150. package/agent-assets/skills/management-policy/curation.json +1 -1
  151. package/agent-assets/skills/management-policy/references/policy-workflow.md +9 -9
  152. package/agent-assets/skills/management-policy/seeds/policy-file-shape.seed.json +1 -1
  153. package/agent-assets/skills/notify/SKILL.md +4 -4
  154. package/agent-assets/skills/notify/references/priority.md +9 -4
  155. package/agent-assets/skills/notion/SKILL.delegated.claude.md +1 -1
  156. package/agent-assets/skills/notion/SKILL.delegated.codex.md +1 -1
  157. package/agent-assets/skills/notion/SKILL.delegated.gemini.md +1 -1
  158. package/agent-assets/skills/notion/SKILL.native.claude.md +10 -6
  159. package/agent-assets/skills/notion/SKILL.native.codex.md +9 -4
  160. package/agent-assets/skills/notion/SKILL.native.gemini.md +9 -4
  161. package/agent-assets/skills/observations/SKILL.md +24 -8
  162. package/agent-assets/skills/project-doc/SKILL.md +1 -1
  163. package/agent-assets/skills/project-doc/curation.json +3 -3
  164. package/agent-assets/skills/project-doc/seeds/project-shape.seed.json +7 -4
  165. package/agent-assets/skills/project-doc/seeds/slug-grammar.seed.json +3 -3
  166. package/agent-assets/skills/reading/SKILL.md +10 -0
  167. package/agent-assets/skills/reading/references/reading-taste.md +2 -2
  168. package/agent-assets/skills/roadmap/SKILL.md +5 -5
  169. package/agent-assets/skills/roadmap/curation.json +1 -1
  170. package/agent-assets/skills/roadmap/references/api.md +7 -7
  171. package/agent-assets/skills/roadmap/references/cross-check.md +15 -8
  172. package/agent-assets/skills/roadmap/references/migration.md +4 -4
  173. package/agent-assets/skills/roadmap/seeds/entry-types.seed.json +1 -1
  174. package/agent-assets/skills/schedule/SKILL.md +42 -34
  175. package/agent-assets/skills/schedule/references/batch.md +2 -2
  176. package/agent-assets/skills/schedule/references/errors.md +7 -4
  177. package/agent-assets/skills/schedule/references/model-selection.md +3 -3
  178. package/agent-assets/skills/schedule/references/recurrence-rule.md +1 -1
  179. package/agent-assets/skills/scheduled-managed-task/SKILL.md +46 -36
  180. package/agent-assets/skills/today/SKILL.md +9 -9
  181. package/agent-assets/skills/today/curation.json +3 -3
  182. package/agent-assets/skills/today/references/agent-plan-lifecycle.md +6 -5
  183. package/agent-assets/skills/today/seeds/section-shape.seed.json +1 -1
  184. package/agent-assets/skills/user-interview/SKILL.md +12 -9
  185. package/agent-assets/skills/user-interview/references/op-briefing.md +2 -2
  186. package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +8 -0
  187. package/agent-assets/skills/user-profile/SKILL.md +17 -17
  188. package/agent-assets/skills/user-profile/curation.json +2 -2
  189. package/agent-assets/skills/user-profile/references/character-preferences.md +2 -2
  190. package/agent-assets/skills/user-profile/seeds/routing-table.seed.json +8 -8
  191. package/agent-assets/skills/user-profile/seeds/topic-files.seed.json +6 -6
  192. package/agent-assets/skills/wiki/wiki-compile/SKILL.md +4 -4
  193. package/agent-assets/system-prompts/routine-fetch-window.md +22 -12
  194. package/agent-assets/task-flows/_partials/calendar-acquire.google_calendar.md +4 -2
  195. package/agent-assets/task-flows/_partials/calendar-acquire.outlook_calendar.md +4 -2
  196. package/agent-assets/task-flows/_partials/capture-user-info.md +2 -2
  197. package/agent-assets/task-flows/_partials/dm-intent.long-horizon.md +1 -1
  198. package/agent-assets/task-flows/_partials/dm-intent.project.md +9 -9
  199. package/agent-assets/task-flows/_partials/mail-acquire.outlook_mail.md +3 -2
  200. package/agent-assets/task-flows/_partials/notion-acquire.notion.md +10 -5
  201. package/agent-assets/task-flows/browser_task.md +84 -0
  202. package/agent-assets/task-flows/github.assigned.md +1 -1
  203. package/agent-assets/task-flows/github.pull_request.review_requested.md +2 -2
  204. package/agent-assets/task-flows/github.workflow_run.failed.md +2 -2
  205. package/agent-assets/task-flows/knowledge.import.md +14 -14
  206. package/agent-assets/task-flows/message.received.dm.md +9 -4
  207. package/agent-assets/task-flows/message.received.dm_first.md +3 -3
  208. package/agent-assets/task-flows/routine.custom.md +3 -3
  209. package/agent-assets/task-flows/routine.evening_review.md +8 -8
  210. package/agent-assets/task-flows/routine.fetch_window.md +2 -2
  211. package/agent-assets/task-flows/routine.hourly_check.md +16 -12
  212. package/agent-assets/task-flows/routine.monthly_review.md +21 -21
  213. package/agent-assets/task-flows/routine.morning_routine_journal.md +119 -97
  214. package/agent-assets/task-flows/routine.morning_routine_today.md +43 -43
  215. package/agent-assets/task-flows/routine.research_cluster_update.md +35 -0
  216. package/agent-assets/task-flows/routine.research_dispatch.md +38 -0
  217. package/agent-assets/task-flows/routine.research_offer_dm.md +125 -0
  218. package/agent-assets/task-flows/routine.research_wiki_summary.md +53 -0
  219. package/agent-assets/task-flows/routine.roadmap_refresh.md +10 -10
  220. package/agent-assets/task-flows/routine.today_refresh.md +4 -4
  221. package/agent-assets/task-flows/routine.user_profile_sweep.md +10 -10
  222. package/agent-assets/task-flows/routine.weekly_review.md +93 -24
  223. package/agent-assets/task-flows/schedule.approaching.md +0 -1
  224. package/agent-assets/task-flows/scheduled.dm.md +5 -5
  225. package/agent-assets/task-flows/scheduled.task.md +4 -4
  226. package/agent-assets/task-flows/setup.initial.md +21 -21
  227. package/agent-assets/task-flows/setup.update.md +2 -2
  228. package/agent-assets/templates/README.md +27 -20
  229. package/agent-assets/templates/_index.md +42 -26
  230. package/agent-assets/templates/_manifest.json +34 -99
  231. package/agent-assets/templates/{user → identity}/_index.md +1 -1
  232. package/agent-assets/templates/{user → identity}/profile.md +2 -2
  233. package/agent-assets/templates/{dossiers → knowledge/dossiers}/_index.md +1 -1
  234. package/agent-assets/templates/{projects → plans/projects}/_active.base +1 -1
  235. package/agent-assets/templates/policies/_index.md +21 -0
  236. package/agent-assets/templates/{rules → policies}/journal-export.md +1 -1
  237. package/agent-assets/templates/{rules → policies}/journal-format.md +5 -5
  238. package/agent-assets/templates/{rules/policies → policies/management-captures}/_index.md +2 -2
  239. package/agent-assets/templates/{rules → policies}/management.md +3 -3
  240. package/agent-assets/templates/{rules → policies}/mcp.md +1 -1
  241. package/agent-assets/templates/{rules → policies}/redaction.md +1 -1
  242. package/agent-assets/templates/{routines → policies/routines}/_index.md +1 -1
  243. package/agent-assets/templates/{routines → policies/routines}/evening.md +2 -2
  244. package/agent-assets/templates/{routines → policies/routines}/hourly.md +1 -1
  245. package/agent-assets/templates/{routines → policies/routines}/monthly.md +2 -2
  246. package/bin/aitne.mjs +13 -4
  247. package/package.json +5 -4
  248. package/scripts/commands/doctor.mjs +14 -8
  249. package/scripts/commands/run-now.mjs +6 -21
  250. package/scripts/lib/ports.d.mts +27 -0
  251. package/scripts/lib/ports.mjs +36 -0
  252. package/scripts/lib/read-api-token.mjs +176 -0
  253. package/scripts/start.mjs +2 -1
  254. package/agent-assets/docs/features/lifestyle/travel-time.md +0 -58
  255. package/agent-assets/skills/gmail-lifestyle/references/travel-time-api.md +0 -59
  256. package/agent-assets/skills/schedule/references/recurring.md +0 -185
  257. package/agent-assets/templates/context-index.md +0 -42
  258. package/agent-assets/templates/rules/_index.md +0 -19
  259. /package/agent-assets/templates/{user → identity}/expertise.md +0 -0
  260. /package/agent-assets/templates/{user → identity}/goals.md +0 -0
  261. /package/agent-assets/templates/{user → identity}/people.md +0 -0
  262. /package/agent-assets/templates/{user → identity}/personal.md +0 -0
  263. /package/agent-assets/templates/{user → identity}/work.md +0 -0
  264. /package/agent-assets/templates/{agent/journal.md → journal/agent.md} +0 -0
  265. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/evening.md +0 -0
  266. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/hourly.md +0 -0
  267. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/monthly.md +0 -0
  268. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/morning.md +0 -0
  269. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/roadmap.md +0 -0
  270. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/weekly.md +0 -0
  271. /package/agent-assets/templates/{projects → plans/projects}/_index.md +0 -0
  272. /package/agent-assets/templates/{roadmap.md → plans/roadmap.md} +0 -0
  273. /package/agent-assets/templates/{routines → policies/routines}/morning.md +0 -0
  274. /package/agent-assets/templates/{routines → policies/routines}/weekly.md +0 -0
  275. /package/agent-assets/templates/{agent → state}/profile-questions.md +0 -0
  276. /package/agent-assets/templates/{today.md → state/today.md} +0 -0
@@ -9,73 +9,126 @@ aliases:
9
9
  - retro
10
10
  category: features
11
11
  summary: |
12
- The evening review fires once per day at 18:00 local time. It writes
13
- the day's retrospective into the agent journal and rolls up unfinished
14
- items for tomorrow's plan.
12
+ The evening review fires once per day at 18:00 local time. It closes out
13
+ the day by finalizing today.md's Handoff, doing light roadmap maintenance,
14
+ and folding the day's profile signals into your identity files. It rolls
15
+ up unfinished items so tomorrow's morning routine can re-pick them up.
15
16
  section: routines
16
17
  tags:
17
18
  - routines
18
19
  - autonomous
19
20
  - daily
20
- - light-tier
21
+ - core
21
22
  status: stable
22
23
  ask_examples:
23
24
  - When does the evening review run?
24
25
  - What does the evening review write?
25
- - How do I disable it?
26
+ - How do I add my own evening checks?
27
+ - How do I disable the evening review?
26
28
  locale: en-US
27
29
  created: 2026-04-25
28
- updated: 2026-04-25
30
+ updated: 2026-05-28
29
31
  keywords:
30
32
  - evening review
31
33
  - retro
32
34
  - end of day
35
+ - handoff
36
+ - carry-over
33
37
  related:
34
38
  - concepts/routines
35
39
  - features/memory-files/agent-journal
40
+ - features/memory-files/today
36
41
  - features/routines/morning-routine
42
+ - features/routines/custom-routines
37
43
  process_keys:
38
44
  - routine.evening_review
45
+ context_files:
46
+ - state/today.md
47
+ - plans/roadmap.md
48
+ - journal/agent.md
49
+ - identity/profile.md
50
+ - policies/routines/evening.md
51
+ ui_anchors:
52
+ - /connections/journal
53
+ - /settings/routines
39
54
  ---
40
55
 
41
56
  # Evening Review
42
57
 
43
58
  ## In One Sentence
44
59
 
45
- A light-tier routine that fires daily at 18:00 local time and writes
46
- the day's retro into the journal.
60
+ A medium-tier autonomous routine that fires daily at 18:00 local time to
61
+ close out the day: it finalizes the carry-over plan in `state/today.md`,
62
+ does light roadmap maintenance, and folds the day's profile signals into
63
+ your identity files.
47
64
 
48
65
  ## What It Does
49
66
 
50
- - Reads the day's `today.md`, the journal entries, the activity feed.
51
- - Writes a short retrospective into `agent/journal.md`.
52
- - Surfaces uncompleted carry-over items the morning routine should
53
- re-pick-up tomorrow.
67
+ The routine runs three internal bookkeeping steps. These are quiet by
68
+ design they prepare state that **tomorrow's morning routine depends on**
69
+ rather than producing a chatty end-of-day report.
70
+
71
+ 1. **Finalize `state/today.md`.** Marks incomplete User Tasks, then fills
72
+ the `## Handoff` section: unfinished items roll into **Tomorrow** (with
73
+ a reason and suggested priority) so the morning routine re-picks them up;
74
+ longer-horizon items go to **Later**.
75
+ 2. **Light roadmap maintenance.** Promotes resolved Long-term Plans into the
76
+ Agent Action Plan and fires any plans whose review date has arrived,
77
+ editing only `## Long-term Plans` and `## Agent Action Plan` in
78
+ `plans/roadmap.md`. (The purely mechanical roadmap sweeps run 15 minutes
79
+ earlier as a separate daemon job, not here.)
80
+ 3. **Process profile signals.** Reads the day's Raw Signals from your
81
+ profile and routes each into `character`, Learned Context, or a
82
+ detailed identity file under `identity/`, then prunes stale entries.
54
83
 
55
84
  ## When It Runs / How It Is Triggered
56
85
 
57
86
  Every day at **18:00 local time**, exactly once. The cron expression
58
- is fixed in `packages/daemon/src/core/scheduler.ts` and is not
59
- operator-configurable.
87
+ (`0 18 * * *`) is fixed in `packages/daemon/src/core/scheduler.ts`; the
88
+ fire time is not operator-configurable. Like every autonomous cron, the
89
+ run is skipped while the agent is paused (`!stop`) or setup is incomplete.
60
90
 
61
91
  ## What It Outputs
62
92
 
63
- - An `agent/journal.md` entry.
64
- - A "today wraps up here" notification (subject to quiet hours).
93
+ - An updated `## Handoff` section in `state/today.md`.
94
+ - Roadmap edits in `plans/roadmap.md` when a plan was promoted or fired.
95
+ - A `journal/agent.md` line **only** when a roadmap review date fired or a
96
+ validation error needs recording.
97
+
98
+ The built-in steps emit **no user-facing DM by default** — there is no
99
+ "today wraps up here" message. (The one exception: any check you add to
100
+ `policies/routines/evening.md` is authoritative and runs as written,
101
+ including steps that call `POST /api/notify`.)
65
102
 
66
103
  ## Where in the Dashboard
67
104
 
68
- - **Connections → Journal** shows the appended entry.
105
+ - **Connections → Journal** (`/connections/journal`) shows `journal/agent.md`
106
+ entries when the roadmap step logged one.
107
+ - **Settings → Routines** (`/settings/routines`) is where you manage the
108
+ evening rulebook.
69
109
 
70
110
  ## Configuration
71
111
 
72
- This routine has no operator-tunable knobs. The fire time and tier
73
- are fixed in code.
112
+ The fire time and tier are fixed in code, but the routine is not a black box:
113
+ - **Add your own evening checks.** Append `### <label>` entries to
114
+ `policies/routines/evening.md` (via the dashboard, or the
115
+ [custom routines guide](../../guides/add-a-custom-routine.md)). They run
116
+ alongside the built-in steps using the same journaling conventions and
117
+ may notify you explicitly.
118
+ - **Verify it stays healthy.** `aitne verify evening-review-slimdown`
119
+ checks that recent `routine.evening_review` sessions ran inside their
120
+ seeded token envelope (read-only; `--days N` widens the window).
74
121
 
75
122
  ## When Something Goes Wrong
76
123
 
77
- - A journal that **stops growing**: see [Auth Failed](../../troubleshooting/auth-failed.md) the routine may be hitting a quota wall.
124
+ - **The Handoff or journal stops updating:** the routine may be hitting a
125
+ quota wall — see [Quota Exhausted](../../troubleshooting/quota-exhausted.md)
126
+ or [Auth Failed](../../troubleshooting/auth-failed.md).
127
+ - **It never fires at all:** confirm the agent is not paused (`!start`) and
128
+ that setup is complete.
78
129
 
79
130
  ## Related
80
131
 
81
- - [agent/journal.md](../memory-files/agent-journal.md)
132
+ - [today.md](../memory-files/today.md) — where the Handoff lives.
133
+ - [agent journal](../memory-files/agent-journal.md) — `journal/agent.md`.
134
+ - [morning routine](morning-routine.md) — consumes the Handoff next day.
@@ -6,80 +6,200 @@ id: hourly-check
6
6
  aliases:
7
7
  - hourly
8
8
  - observation consumer
9
+ - hourly check gate
9
10
  category: features
10
11
  summary: |
11
- A light-tier routine that fires every hour during active hours and
12
- consumes accumulated observations from the polling integrations.
12
+ A medium-tier routine that fires every hour during active hours,
13
+ drains the pending observations queue, and decides whether the
14
+ accumulated change pattern warrants surfacing. Runs through a
15
+ four-layer gate that keeps quiet days quiet.
13
16
  section: routines
14
17
  tags:
15
18
  - routines
16
19
  - autonomous
17
- - light-tier
20
+ - observations
21
+ - polling
22
+ - hourly-check
18
23
  status: stable
24
+ ui_anchors:
25
+ - /settings/routines
26
+ - /settings/schedule
27
+ - /activity?tab=system
19
28
  ask_examples:
20
29
  - What does the hourly check do?
21
30
  - When does it run?
22
- - How do I tune the threshold?
31
+ - How does the hourly check decide whether to escalate?
32
+ - What is the harvest pre-pass?
33
+ - How do I tune the gate's freshness window?
23
34
  locale: en-US
24
35
  created: 2026-04-25
25
- updated: 2026-04-25
36
+ updated: 2026-05-28
26
37
  keywords:
27
38
  - hourly
28
39
  - observations
29
40
  - polling
41
+ - hourly check
42
+ - gate
43
+ - layer 1
44
+ - layer 2
45
+ - layer 3
46
+ - harvestForGate
47
+ - decideStage
48
+ - pre-pass
30
49
  related:
31
50
  - concepts/observations
32
51
  - concepts/routines
52
+ - concepts/delegated-mode
53
+ - features/integrations/browser-history
33
54
  process_keys:
34
55
  - routine.hourly_check
56
+ - routine.hourly_check.triage
57
+ - routine.fetch_window
35
58
  config_keys:
36
59
  - hourlyCheckEnabled
37
60
  - hourlyCheckIntervalMinutes
38
61
  - hourlyCheckActiveStartHour
39
62
  - hourlyCheckActiveEndHour
40
63
  - hourlyCheckMinObservations
64
+ - hourlyCheckStage2Enabled
65
+ - hourlyCheckHeartbeatHours
66
+ - hourlyCheckLowSignalPendingCeiling
67
+ - hourlyCheckPrePassFreshnessMinutes
41
68
  ---
42
69
 
43
70
  # Hourly Check
44
71
 
45
- ## In One Sentence
72
+ A medium-tier routine that drains the observations queue every hour
73
+ during active hours and decides whether the accumulated change
74
+ pattern warrants notifying you or appending to `state/today.md`. The
75
+ "decide" step is a four-layer gate designed to keep quiet days quiet
76
+ without missing the moment when something piles up.
46
77
 
47
- A light-tier routine that empties the observations queue and decides
48
- whether the accumulated changes warrant a notification.
78
+ ## When It Runs
49
79
 
50
- ## What It Does
80
+ Every `hourlyCheckIntervalMinutes` (default 60), inside the active
81
+ window `[hourlyCheckActiveStartHour, hourlyCheckActiveEndHour)`. The
82
+ trigger:
51
83
 
52
- - Reads pending `observations` rows.
53
- - Decides whether the pattern adds up to something worth surfacing.
54
- - Either appends to `today.md` or sends a notification (or both).
84
+ - **Skips** when the morning routine has not yet run today
85
+ (recoverable the dispatcher enqueues a `queueMorningRoutineWake`
86
+ self-recovery and the hourly check resumes after the morning
87
+ routine succeeds).
88
+ - **Skips** when another hourly check is in flight (atomic flag).
89
+ - **Skips** when accumulated signal is below
90
+ `hourlyCheckMinObservations` and the heartbeat window
91
+ (`hourlyCheckHeartbeatHours`) hasn't elapsed.
55
92
 
56
- ## When It Runs / How It Is Triggered
93
+ Every tick writes one `agent_actions` row with
94
+ `action_type = 'hourly_check.gate'` so the gate's decisions are
95
+ auditable from `aitne audit` and the dashboard activity feed.
57
96
 
58
- Every `hourlyCheckIntervalMinutes` (default 60), inside the active
59
- window (`hourlyCheckActiveStartHour` to `hourlyCheckActiveEndHour`).
60
- Skips when the morning routine is in progress; an atomic flag
61
- prevents two hourly checks from running at once.
97
+ ## The Four-Layer Gate
98
+
99
+ The gate replaced the pre-Phase-9 "30-minute rate-limit" gate. It
100
+ runs on every cron tick; only Layer 4 actually spawns a medium-tier
101
+ agent session.
102
+
103
+ ### Layer 1 — Harvest pre-pass
104
+
105
+ `HourlyCheckCoordinator.harvestForGate` spawns a lite-tier
106
+ `routine.fetch_window` session for each delegated / native
107
+ integration whose `runtime_state.pre_pass_last_run:<key>` is older
108
+ than `hourlyCheckPrePassFreshnessMinutes`. The pre-pass fetches the
109
+ integration's hourly window (mail / calendar / Notion) and POSTs the
110
+ results to `/api/observations`, so the rest of the gate sees a
111
+ populated queue instead of stale data.
112
+
113
+ Telemetry: `agent_actions.detail.harvest_ran` /
114
+ `harvest_integrations` / `harvest_failed_integrations`.
115
+
116
+ ### Layer 2 — Signal compute
117
+
118
+ `computeHourlyCheckSignals` reads the observation table mode-blind —
119
+ it filters by source-prefix sets derived from
120
+ `INTEGRATION_DESCRIPTORS`, never by `actor`. Signal categories
121
+ include unread-mail / event-change / repo-change / browser-history
122
+ clusters; each category produces a (count, last-seen, summary)
123
+ tuple. The pre-pass freshness gate from Layer 1 is what guarantees
124
+ those counts reflect "now", not "an hour ago".
125
+
126
+ ### Layer 3 — Decide stage
127
+
128
+ `decideStage` is a pure function over the signal snapshot plus the
129
+ per-tick config (heartbeat status, `hourlyCheckStage2Enabled`,
130
+ `hourlyCheckLowSignalPendingCeiling`). It returns one of three stages
131
+ — `stage0_silent`, `stage2`, or `stage3`:
132
+
133
+ | Stage | What happens |
134
+ |---|---|
135
+ | `stage0_silent` | No agent session. Consume the pending observations and append a single best-effort line to `state/today.md`'s `## Agent Log`. This is the verdict for both "no signals" and "low signal under the ceiling". |
136
+ | `stage2` | Only reachable when `hourlyCheckStage2Enabled = true` (default `false`, so low-signal ticks fall through to `stage3`). Runs a lite-tier `routine.hourly_check.triage` call whose strict JSON output decides `log_only` (→ silent path) vs. `escalate` (→ `stage3`). |
137
+ | `stage3` | Spawn the full medium-tier `routine.hourly_check` session — the visible agent run. Reached directly on high-novelty signals (VIP mail, calendar conflict, overdue agent plan, approaching schedule) or as the cautious default when Stage 2 is off. |
138
+
139
+ When a Layer 1 pre-pass fails (`harvest.failed`), the gate
140
+ short-circuits to a cautious `stage3` with reason
141
+ `cautious_escalate_prepass_failure` and tags the audit row
142
+ `agent_actions.detail.cautious_escalate = true` — a failed fetch
143
+ should never silently swallow a tick's worth of signals.
144
+
145
+ ### Layer 4 — Dispatch
146
+
147
+ When Layer 3 returns `stage0_silent` (or Stage 2 returns
148
+ `log_only`), the daemon runs `runSilentHourlyCheckPath` — a
149
+ daemon-direct write, no agent. When it returns `stage3` (or Stage 2
150
+ returns `escalate`), `enqueueStage3HourlyCheck` puts a
151
+ `routine.hourly_check` event on the bus, which becomes the visible
152
+ agent session.
62
153
 
63
154
  ## What It Outputs
64
155
 
65
- - Updates to `today.md`.
66
- - Notifications when warranted.
156
+ - A best-effort line in `state/today.md`'s `## Agent Log` — even the
157
+ silent path appends one (skipped only if `today.md` is missing or
158
+ the write lock is held; the observations are still consumed either
159
+ way).
160
+ - Notifications when warranted (only on a `stage3` agent session).
161
+ - An audit row on every tick:
162
+ `agent_actions.action_type = 'hourly_check.gate'`, carrying the
163
+ harvest + signal + stage detail.
67
164
 
68
165
  ## Configuration
69
166
 
70
- | Setting | Default |
71
- |---|---|
72
- | `hourlyCheckEnabled` | true |
73
- | `hourlyCheckIntervalMinutes` | 60 |
74
- | `hourlyCheckActiveStartHour` | 4 |
75
- | `hourlyCheckActiveEndHour` | 24 (end-exclusive, ≡ midnight) |
76
- | `hourlyCheckMinObservations` | 1 |
167
+ | Setting | Default | Layer | Notes |
168
+ |---|---|---|---|
169
+ | `hourlyCheckEnabled` | `true` | trigger | Master kill switch. |
170
+ | `hourlyCheckIntervalMinutes` | `60` | trigger | Cron cadence. |
171
+ | `hourlyCheckActiveStartHour` | `4` | trigger | Active window start. |
172
+ | `hourlyCheckActiveEndHour` | `24` | trigger | End-exclusive; `24` ≡ midnight. |
173
+ | `hourlyCheckMinObservations` | `1` | trigger | Minimum pending observations before a non-silent stage dispatches; below this the tick records a `below_threshold` skip. |
174
+ | `hourlyCheckPrePassFreshnessMinutes` | `30` | Layer 1 | Range `0`–`240`. Skip a per-integration fetch if its pre-pass ran more recently; `0` fetches every tick, `240` is cost-minimal. |
175
+ | `hourlyCheckStage2Enabled` | `false` | Layer 3 | Adds the lite-tier triage call; while `false`, low-signal ticks route straight to `stage3`. |
176
+ | `hourlyCheckHeartbeatHours` | `4` | Layer 3 | Range `1`–`48`. Force a non-silent stage at least this often, even on a quiet day. |
177
+ | `hourlyCheckLowSignalPendingCeiling` | `0` | Layer 3 | Range `0`–`20`. At or below this pending count, a low-signal tick stays silent. `0` keeps the cautious default (any pending observation escalates). |
178
+
179
+ (`hourlyCheckGateMode` was removed in HOURLY_CHECK_GATE_REDESIGN_PLAN
180
+ Phase 4 — the gate has a single execution path now.)
77
181
 
78
182
  ## When Something Goes Wrong
79
183
 
80
- - Skipped hourly checks below the min-observations threshold are
81
- expected. The daemon log shows the skip reason.
184
+ - **Skipped because the morning routine hasn't run.** The
185
+ dispatcher's `morningRoutineRanToday` gate keys on
186
+ `agent_actions.result = 'success'`. The skip reason is
187
+ `morning_routine_pending_for_today` and triggers a
188
+ `queueMorningRoutineWake` self-recovery. See
189
+ [Morning Routine Didn't Run](../../troubleshooting/morning-routine-didnt-run.md).
190
+ - **Stage 3 never fires on a quiet day.** Expected.
191
+ `hourlyCheckHeartbeatHours` forces a tick occasionally so silence
192
+ doesn't last indefinitely.
193
+ - **Pre-pass keeps failing for one integration.** Read
194
+ `agent_actions.detail.harvest_failed_integrations`; the failing
195
+ integration name is recorded. Usually an auth issue — check
196
+ `/health.integrationModes` and the integration's settings page.
82
197
 
83
198
  ## Related
84
199
 
85
- - [Observations](../../concepts/observations.md)
200
+ - [Observations](../../concepts/observations.md) — what populates the
201
+ queue Layer 2 reads.
202
+ - [Delegated Mode](../../concepts/delegated-mode.md) — the
203
+ delegated / native integrations that participate in Layer 1's
204
+ harvest.
205
+ - [Routines](../../concepts/routines.md)
@@ -26,12 +26,16 @@ ask_examples:
26
26
  - What model does morning routine use?
27
27
  locale: en-US
28
28
  created: 2026-04-25
29
- updated: 2026-05-17
29
+ updated: 2026-05-28
30
30
  keywords:
31
31
  - morning
32
32
  - day plan
33
33
  - 04:00
34
34
  - day boundary
35
+ - two-stage pipeline
36
+ - stage A
37
+ - stage B
38
+ - daily journal
35
39
  related:
36
40
  - concepts/agent-day
37
41
  - features/memory-files/today
@@ -39,6 +43,9 @@ prerequisites:
39
43
  - concepts/agent-day
40
44
  ui_anchors:
41
45
  - /settings/routines
46
+ - /settings/models
47
+ - /schedule
48
+ - /activity
42
49
  - /
43
50
  process_keys:
44
51
  - routine.morning_routine
@@ -47,8 +54,9 @@ process_keys:
47
54
  config_keys:
48
55
  - dayBoundaryHour
49
56
  context_files:
50
- - today.md
51
- - daily/<date>.md
57
+ - state/today.md
58
+ - journal/daily/<date>.md
59
+ - journal/agent.md
52
60
  ---
53
61
 
54
62
  # Morning Routine
@@ -56,30 +64,36 @@ context_files:
56
64
  ## In One Sentence
57
65
 
58
66
  Once per agent day, at `dayBoundaryHour` local time, Aitne
59
- rebuilds `today.md` and the day's schedule from your calendar, mail,
67
+ rebuilds `state/today.md` and the day's schedule from your calendar, mail,
60
68
  roadmap, and recent observations.
61
69
 
62
70
  ## What It Does
63
71
 
64
72
  The morning routine is the single highest-value process in Aitne.
65
- It runs as a **two-stage pipeline** Stage A (`routine.morning_routine_today`)
66
- on the medium tier rebuilds `today.md`, walks the roadmap, fans out
67
- the day's schedule, and self-reports structured metadata; Stage B
68
- (`routine.morning_routine_journal`) on the lite tier authors
69
- `daily/<yesterday>.md` in parallel from a daemon-prepared skeleton.
70
- Every downstream routine for the next 24 hours reads Stage A's
71
- output, so a bad morning briefing still degrades the entire day —
72
- hence the medium-tier ceiling on Stage A even after the split.
73
-
74
- In sequence, the routine:
75
-
76
- 1. Reads the previous day's `today.md` and rolls forward unfinished items.
77
- 2. Pulls today's calendar events from any connected calendar integration.
78
- 3. Scans recent unread mail and surfaces the few that need owner attention.
79
- 4. Walks the roadmap looking for items whose **Preparation Timeline** rows fire today.
80
- 5. Consumes any pending observations the hourly check has already dropped into the queue.
81
- 6. Writes the rebuilt `today.md` and the per-date snapshot at `daily/YYYY-MM-DD.md`.
82
- 7. Logs a single status line to the dashboard activity feed.
73
+ It runs as a **two-stage pipeline**, with both stages dispatched in
74
+ parallel:
75
+
76
+ - **Stage A** (`routine.morning_routine_today`, medium tier) rebuilds
77
+ `state/today.md`, walks the roadmap, fans out the day's schedule, and
78
+ self-reports structured metadata.
79
+ - **Stage B** (`routine.morning_routine_journal`, lite tier) authors
80
+ yesterday's daily journal at `journal/daily/<yesterday>.md` from a
81
+ daemon-prepared skeleton, then drops the run's audit-trail paragraph
82
+ into `journal/agent.md`.
83
+
84
+ Every downstream routine for the next 24 hours reads Stage A's output,
85
+ so a bad morning briefing degrades the entire day — hence the
86
+ medium-tier ceiling on Stage A even after the split.
87
+
88
+ Within Stage A, the work proceeds in this order:
89
+
90
+ 1. Read the previous day's `state/today.md` and roll forward unfinished items.
91
+ 2. Pull today's calendar events from any connected calendar integration.
92
+ 3. Scan recent unread mail and surface the few that need owner attention.
93
+ 4. Walk the roadmap for items whose **Preparation Timeline** rows fire today.
94
+ 5. Consume any pending observations the hourly check has already queued.
95
+ 6. Write the rebuilt `state/today.md`.
96
+ 7. Log a single status line to the dashboard activity feed.
83
97
 
84
98
  ## When It Runs / How It Is Triggered
85
99
 
@@ -90,18 +104,20 @@ There is no separate `morningRoutineHour` — the morning routine and the
90
104
  agent-day rollover are the same instant.
91
105
 
92
106
  There is no separate "initial" process key. The first morning after
93
- setup is detected inline by Stage A from the absence of `yesterday.md`;
107
+ setup is detected inline by Stage A from the absence of `state/yesterday.md`;
94
108
  the daemon injects a `<roadmap_skeleton>` block carrying the pre-aggregated
95
109
  Annual Goals / Quarterly Focus / Preparation Timeline facts so Stage A
96
110
  can populate the wizard's placeholder roadmap on medium tier instead of
97
- paying for a one-shot heavy session. (Pre-Phase 7, this branch dispatched
98
- under `routine.morning_routine_initial` on the heavy tier.)
111
+ paying for a one-shot high-tier session. (The dedicated
112
+ `routine.morning_routine_initial` process key was retired in Phase 4, and
113
+ Phase 7 — 2026-05-16 — removed its high-tier seed entirely.)
99
114
 
100
115
  ## What It Outputs
101
116
 
102
- - A rebuilt `today.md` with sections for User Schedule, Tasks, Agent Plan, Agent Log, and Handoff.
103
- - A per-date `daily/YYYY-MM-DD.md` capturing the day's calendar snapshot.
104
- - A short notification ("Good morning, here's today...") when notifications are enabled and quiet hours have ended.
117
+ - A rebuilt `state/today.md` with sections for User Schedule, User Tasks, Agent Plan, Agent Log, and Handoff (Stage A).
118
+ - Yesterday's daily journal at `journal/daily/<date>.md` (Stage B).
119
+ - A run audit paragraph appended to `journal/agent.md` (Stage B).
120
+ - A short morning notification when notifications are enabled and quiet hours have ended.
105
121
  - An entry in the Activity feed.
106
122
 
107
123
  ## Where in the Dashboard
@@ -115,16 +131,18 @@ under `routine.morning_routine_initial` on the heavy tier.)
115
131
  | Setting | Default | Notes |
116
132
  |---|---|---|
117
133
  | `dayBoundaryHour` | `4` | Both the agent-day boundary and the morning-routine fire time. See [Agent Day](../../concepts/agent-day.md). |
118
- | Stage A tier (`routine.morning_routine_today`) | medium (Sonnet 4.6) | Synthesises `today.md` + the day's roadmap fan-out. Adjustable per-row in Settings → Models. |
119
- | Stage B tier (`routine.morning_routine_journal`) | lite (Haiku 4.5) | Appends yesterday's entry to `agent-journal.md`. |
120
- | Max turns | 50 | Stage A default. Adjustable per-process in Settings → Models. |
121
- | Max budget USD | 2.00 (Stage A: 0.50, Stage B: 0.10) | Per-execute envelope cap. The router enforces this before token costs accumulate. |
134
+ | Stage A tier (`routine.morning_routine_today`) | medium (Sonnet 4.6) | Synthesises `state/today.md` + the day's roadmap fan-out. Adjustable per-row in Settings → Models. |
135
+ | Stage B tier (`routine.morning_routine_journal`) | lite (Haiku 4.5) | Authors `journal/daily/<date>.md` and the `journal/agent.md` audit paragraph. |
136
+ | Stage A max turns / budget | 50 turns / $1.50 | Per-execute envelope for `routine.morning_routine_today`. Adjustable in Settings → Models. |
137
+ | Stage B max turns / budget | 20 turns / $0.30 | Per-execute envelope for `routine.morning_routine_journal`. |
138
+
139
+ The parent `routine.morning_routine` key keeps its own envelope (50 turns / $2.00) for the pipeline entry point. Codex and Gemini backends scale the dollar caps by a per-tier factor (lite ×2.5, medium ×1.5); the router enforces the cap before token costs accumulate.
122
140
 
123
141
  ## When Something Goes Wrong
124
142
 
125
- - The most common failure is **morning routine did not run** because the daemon was offline at the trigger window. The next launch picks the run up via the catch-up scheduler if it is still the same agent day.
126
- - A failed morning routine emits a fallback-success notification when the secondary backend caught the run, or a fallback-failed notification (high priority) when both failed.
127
- - Backend quota exhaustion is the second most common cause: a provider rate limit on your `ANTHROPIC_API_KEY`, or — when running on the subscription fallback — the rolling window of the underlying Claude plan. Switch the routine's model in Settings → Models (or wait for the provider window to refresh); if a fallback backend is configured, the router will automatically retry there first.
143
+ - The most common failure is **morning routine did not run** because the daemon was offline at the trigger window. The next launch picks the run up via the boot-time catch-up scheduler if it is still the same agent day (a stale or missing `state/today.md` triggers an inline catch-up run).
144
+ - If Stage A runs but fails to produce a valid `state/today.md`, the daemon schedules retries with exponential back-off (5 10 15 minutes, max 3 attempts) via the `agent_schedule` path, so the retry survives daemon restarts. After the third failure it sends a single **critical** notification asking you to regenerate from the dashboard, and stops retrying. (Stage B is not re-fired on retry — only Stage A regen fixes `state/today.md`.)
145
+ - Backend quota exhaustion is the second most common cause: a provider rate limit, or — when running on the subscription fallback — the rolling window of the underlying Claude plan. The router surfaces this as a `BackendQuotaError` and automatically retries on the configured fallback backend first; switch the routine's model in Settings → Models or wait for the provider window to refresh.
128
146
 
129
147
  ## Related
130
148
 
@@ -8,14 +8,18 @@ aliases:
8
8
  - sunday review
9
9
  category: features
10
10
  summary: |
11
- Once a week, the agent reads the past seven days of journal
12
- entries, completed tasks, and roadmap progress, then writes a
13
- weekly retro into the weekly/ directory.
11
+ Once a week (Friday evening), the agent reads the current ISO
12
+ week's daily journal entries, the week's calendar retrospective,
13
+ and roadmap progress, then writes a weekly retro into
14
+ journal/weekly/YYYY-Www.md. Its Carry Over / Next Week Focus /
15
+ Lessons sections are lifted into every morning routine of the
16
+ following ISO week.
14
17
  section: routines
15
18
  tags:
16
19
  - routines
17
20
  - autonomous
18
- - light-tier
21
+ - journal
22
+ - reflection
19
23
  status: stable
20
24
  ask_examples:
21
25
  - When does the weekly review run?
@@ -23,40 +27,52 @@ ask_examples:
23
27
  - Where do weekly retros get stored?
24
28
  locale: en-US
25
29
  created: 2026-04-25
26
- updated: 2026-04-25
30
+ updated: 2026-05-28
27
31
  keywords:
28
32
  - weekly review
29
33
  - Friday review
30
34
  - week roll-up
31
35
  - agent week
36
+ - ISO week
37
+ - next week focus
32
38
  related:
33
39
  - concepts/routines
40
+ - features/routines/evening-review
34
41
  - features/memory-files/agent-journal
35
42
  process_keys:
36
43
  - routine.weekly_review
44
+ config_keys:
45
+ - timezone
46
+ - dayBoundaryHour
47
+ ui_anchors:
48
+ - /settings/models
49
+ - /settings/routines
50
+ context_files:
51
+ - journal/weekly/YYYY-Www.md
52
+ - journal/agent.md
37
53
  ---
38
54
 
39
55
  # Weekly Review
40
56
 
41
57
  ## In One Sentence
42
58
 
43
- A light-tier weekly retro fires once per week and writes a synthesis
44
- into `weekly/YYYY-Www.md` (ISO week), whose **Carry Over / Next Week
45
- Focus / Lessons** sections are then lifted into every morning routine
46
- of the following ISO week.
59
+ A medium-tier weekly retro fires every Friday evening and writes a
60
+ synthesis into `journal/weekly/YYYY-Www.md` (ISO week), whose
61
+ **Carry Over / Next Week Focus / Lessons** sections are then lifted
62
+ into every morning routine of the following ISO week.
47
63
 
48
64
  ## What It Does
49
65
 
50
- - Reads daily files for the current ISO week, the past-7-day calendar
51
- retrospective, roadmap, and active projects.
66
+ - Reads each `journal/daily/YYYY-MM-DD.md` for the current ISO week,
67
+ the week's calendar retrospective, the roadmap, and active projects.
52
68
  - Synthesizes three axes — Outcomes, Forward items, Behavioral
53
69
  Lessons — and writes the user-facing snapshot.
54
- - Appends an agent-internal block to `agent/journal.md` for self-
55
- critique, filter quality, and improvement ideas.
56
- - Sends a brief Friday-evening notification by default (silence gate
57
- triggers only on an essentially blank week).
58
- - Refreshes `user/reading-taste.md` and Book Candidates when enough
59
- new highlights have accumulated.
70
+ - Appends an agent-internal block to `journal/agent.md` for
71
+ self-critique, filter quality, and improvement ideas.
72
+ - Sends a brief Friday-evening notification by default (the silence
73
+ gate triggers only on an essentially blank week).
74
+ - Refreshes `identity/reading-taste.md` and Book Candidates when
75
+ enough new highlights have accumulated.
60
76
 
61
77
  ## When It Runs / How It Is Triggered
62
78
 
@@ -70,15 +86,18 @@ a Mon–Thu catch-up is intentionally out of scope so the next week's
70
86
 
71
87
  ## What It Outputs
72
88
 
73
- - One file per week under `~/.personal-agent/context/weekly/YYYY-Www.md`
89
+ - One file per week under `~/.personal-agent/context/journal/weekly/YYYY-Www.md`
74
90
  (zero-padded ISO week, e.g. `2026-W19.md`).
75
91
  - A `## Weekly YYYY-Www` block appended to
76
- `~/.personal-agent/context/agent/journal.md`.
92
+ `~/.personal-agent/context/journal/agent.md`.
77
93
 
78
94
  ## Configuration
79
95
 
80
- This routine has no operator-tunable knobs. The fire time, day-of-week,
81
- and tier are fixed in code.
96
+ The fire time (Friday 19:00 local) and day-of-week are fixed in code
97
+ and are not operator-tunable. The backend and model that handle this
98
+ routine, however, are configurable: `routine.weekly_review` is a
99
+ configurable process key (default **medium** tier — Sonnet on Claude)
100
+ that you can repoint from **Settings → Models**.
82
101
 
83
102
  ## When Something Goes Wrong
84
103