@aitne-sh/aitne 0.1.7 → 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 (317) hide show
  1. package/README.md +256 -833
  2. package/agent-assets/agent-profiles/_safety.md +52 -20
  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 +3 -3
  6. package/agent-assets/agent-profiles/routine-fetch-window.md +30 -19
  7. package/agent-assets/agent-profiles/routine.md +4 -3
  8. package/agent-assets/agents/context-index-reconcile/agent.md +52 -0
  9. package/agent-assets/agents/evening-review/agent.md +53 -0
  10. package/agent-assets/agents/hourly-check/agent.md +62 -0
  11. package/agent-assets/agents/monthly-review/agent.md +55 -0
  12. package/agent-assets/agents/morning-routine/agent.md +78 -0
  13. package/agent-assets/agents/roadmap-maintenance/agent.md +52 -0
  14. package/agent-assets/agents/skill-curation/agent.md +52 -0
  15. package/agent-assets/agents/user-profile-sweep-evening/agent.md +48 -0
  16. package/agent-assets/agents/user-profile-sweep-morning/agent.md +53 -0
  17. package/agent-assets/agents/weekly-review/agent.md +51 -0
  18. package/agent-assets/docs/concepts/agent-day.md +18 -11
  19. package/agent-assets/docs/concepts/auth-health.md +56 -10
  20. package/agent-assets/docs/concepts/backends-and-tiers.md +110 -41
  21. package/agent-assets/docs/concepts/costs-and-quotas.md +74 -19
  22. package/agent-assets/docs/concepts/delegated-mode.md +193 -75
  23. package/agent-assets/docs/concepts/memory-model.md +79 -34
  24. package/agent-assets/docs/concepts/observations.md +61 -11
  25. package/agent-assets/docs/concepts/process-keys.md +66 -17
  26. package/agent-assets/docs/concepts/routines.md +77 -32
  27. package/agent-assets/docs/concepts/safety-and-execution.md +50 -21
  28. package/agent-assets/docs/concepts/safety-model.md +62 -37
  29. package/agent-assets/docs/concepts/skills.md +38 -17
  30. package/agent-assets/docs/features/integrations/browser-history.md +195 -0
  31. package/agent-assets/docs/features/integrations/calendar.md +40 -30
  32. package/agent-assets/docs/features/integrations/git.md +20 -9
  33. package/agent-assets/docs/features/integrations/github.md +93 -35
  34. package/agent-assets/docs/features/integrations/mail.md +60 -17
  35. package/agent-assets/docs/features/integrations/notion.md +51 -11
  36. package/agent-assets/docs/features/integrations/obsidian.md +35 -7
  37. package/agent-assets/docs/features/lifestyle/git.md +45 -44
  38. package/agent-assets/docs/features/lifestyle/reading.md +50 -22
  39. package/agent-assets/docs/features/lifestyle/receipts.md +66 -21
  40. package/agent-assets/docs/features/lifestyle/travel-bookings.md +91 -14
  41. package/agent-assets/docs/features/memory-files/agent-journal.md +111 -50
  42. package/agent-assets/docs/features/memory-files/projects.md +75 -15
  43. package/agent-assets/docs/features/memory-files/roadmap.md +55 -10
  44. package/agent-assets/docs/features/memory-files/schedule.md +113 -70
  45. package/agent-assets/docs/features/memory-files/today.md +47 -21
  46. package/agent-assets/docs/features/memory-files/user-profile.md +67 -31
  47. package/agent-assets/docs/features/messaging/bang-commands.md +115 -28
  48. package/agent-assets/docs/features/messaging/dashboard-chat.md +43 -21
  49. package/agent-assets/docs/features/messaging/discord.md +46 -4
  50. package/agent-assets/docs/features/messaging/overview.md +40 -19
  51. package/agent-assets/docs/features/messaging/pairing-and-magic-phrase.md +94 -27
  52. package/agent-assets/docs/features/messaging/slack.md +79 -14
  53. package/agent-assets/docs/features/messaging/telegram.md +25 -6
  54. package/agent-assets/docs/features/messaging/whatsapp.md +79 -14
  55. package/agent-assets/docs/features/operations/activity-and-conversations.md +45 -16
  56. package/agent-assets/docs/features/operations/approvals.md +53 -15
  57. package/agent-assets/docs/features/operations/backend-routing.md +75 -16
  58. package/agent-assets/docs/features/operations/cost-tracking.md +90 -17
  59. package/agent-assets/docs/features/operations/managed-chromium.md +221 -0
  60. package/agent-assets/docs/features/operations/notifications.md +58 -11
  61. package/agent-assets/docs/features/operations/quiet-hours.md +63 -40
  62. package/agent-assets/docs/features/operations/schedule-approaching.md +59 -16
  63. package/agent-assets/docs/features/routines/custom-routines.md +97 -23
  64. package/agent-assets/docs/features/routines/evening-review.md +75 -22
  65. package/agent-assets/docs/features/routines/hourly-check.md +150 -30
  66. package/agent-assets/docs/features/routines/morning-routine.md +60 -33
  67. package/agent-assets/docs/features/routines/weekly-review.md +65 -20
  68. package/agent-assets/docs/features/wiki/commands.md +37 -16
  69. package/agent-assets/docs/features/wiki/cost-and-approval.md +240 -0
  70. package/agent-assets/docs/features/wiki/dashboard.md +255 -0
  71. package/agent-assets/docs/features/wiki/overview.md +80 -12
  72. package/agent-assets/docs/features/wiki/search.md +248 -0
  73. package/agent-assets/docs/features/wiki/workspaces.md +254 -0
  74. package/agent-assets/docs/getting-started/01-what-is-this.md +64 -32
  75. package/agent-assets/docs/getting-started/02-first-steps.md +28 -10
  76. package/agent-assets/docs/getting-started/03-what-can-this-do.md +42 -21
  77. package/agent-assets/docs/getting-started/04-first-day.md +52 -20
  78. package/agent-assets/docs/glossary.md +285 -21
  79. package/agent-assets/docs/guides/add-a-custom-routine.md +74 -22
  80. package/agent-assets/docs/guides/backup-and-restore.md +92 -14
  81. package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +62 -25
  82. package/agent-assets/docs/guides/build-your-wiki.md +33 -6
  83. package/agent-assets/docs/guides/change-which-model-handles-x.md +70 -9
  84. package/agent-assets/docs/guides/connect-a-new-mail-account.md +80 -15
  85. package/agent-assets/docs/guides/explore-with-trace-and-connect.md +32 -9
  86. package/agent-assets/docs/guides/import-knowledge-file.md +60 -39
  87. package/agent-assets/docs/guides/install-and-run.md +64 -19
  88. package/agent-assets/docs/guides/maintain-wiki-health.md +41 -10
  89. package/agent-assets/docs/guides/migrate-machines.md +86 -18
  90. package/agent-assets/docs/guides/multiple-wikis-for-multiple-domains.md +119 -59
  91. package/agent-assets/docs/guides/pause-the-agent.md +71 -22
  92. package/agent-assets/docs/guides/reinstall-cleanly.md +102 -17
  93. package/agent-assets/docs/guides/setup-wizard.md +126 -56
  94. package/agent-assets/docs/guides/switch-default-backend.md +72 -17
  95. package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +31 -10
  96. package/agent-assets/docs/reference/api.md +162 -23
  97. package/agent-assets/docs/reference/cli-commands.md +55 -15
  98. package/agent-assets/docs/reference/config.md +246 -39
  99. package/agent-assets/docs/reference/disallowed-tools.md +42 -10
  100. package/agent-assets/docs/reference/keyboard-shortcuts.md +47 -10
  101. package/agent-assets/docs/reference/knowledge-layout.md +620 -0
  102. package/agent-assets/docs/reference/process-keys.md +126 -20
  103. package/agent-assets/docs/reference/skills.md +62 -18
  104. package/agent-assets/docs/troubleshooting/auth-failed.md +53 -19
  105. package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +96 -22
  106. package/agent-assets/docs/troubleshooting/fallback-keeps-firing.md +94 -20
  107. package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +77 -22
  108. package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +87 -22
  109. package/agent-assets/docs/troubleshooting/observation-not-detected.md +85 -21
  110. package/agent-assets/docs/troubleshooting/quota-exhausted.md +36 -6
  111. package/agent-assets/docs/troubleshooting/wiki-ingest-full-blocked.md +128 -51
  112. package/agent-assets/docs/troubleshooting/wiki-write-failed.md +33 -11
  113. package/agent-assets/optimizer-skills/drift-analysis/SKILL.md +1 -1
  114. package/agent-assets/optimizer-skills/knowledge-map/SKILL.md +1 -1
  115. package/agent-assets/optimizer-skills/skill-curation/SKILL.md +2 -2
  116. package/agent-assets/sandbox/linux/aitne-chromium.apparmor +91 -0
  117. package/agent-assets/sandbox/macos/aitne-chromium.sb +156 -0
  118. package/agent-assets/skills/agent-actions/SKILL.md +122 -0
  119. package/agent-assets/skills/agent-create/SKILL.md +149 -0
  120. package/agent-assets/skills/attach/SKILL.md +3 -4
  121. package/agent-assets/skills/browser-history/SKILL.md +198 -0
  122. package/agent-assets/skills/browser-history-respond/SKILL.md +106 -0
  123. package/agent-assets/skills/browser-task/SKILL.md +169 -0
  124. package/agent-assets/skills/context/SKILL.md +45 -463
  125. package/agent-assets/skills/context/curation.json +2 -2
  126. package/agent-assets/skills/context/references/api.md +232 -0
  127. package/agent-assets/skills/context/references/required-frontmatter.md +73 -0
  128. package/agent-assets/skills/context/references/snapshot-files.md +103 -0
  129. package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +4 -4
  130. package/agent-assets/skills/docs-search/SKILL.md +17 -16
  131. package/agent-assets/skills/external-services/SKILL.delegated.claude.md +14 -26
  132. package/agent-assets/skills/external-services/SKILL.delegated.codex.md +14 -26
  133. package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +14 -26
  134. package/agent-assets/skills/external-services/SKILL.md +9 -262
  135. package/agent-assets/skills/external-services/SKILL.native.claude.md +6 -7
  136. package/agent-assets/skills/external-services/SKILL.native.codex.md +8 -9
  137. package/agent-assets/skills/external-services/SKILL.native.gemini.md +5 -6
  138. package/agent-assets/skills/external-services/references/calendar-apple.md +97 -0
  139. package/agent-assets/skills/external-services/references/calendar-google.md +72 -0
  140. package/agent-assets/skills/external-services/references/calendar-outlook.md +36 -0
  141. package/agent-assets/skills/external-services/references/github.md +17 -0
  142. package/agent-assets/skills/external-services/references/obsidian.md +49 -0
  143. package/agent-assets/skills/external-services/references/skills-crud.md +27 -0
  144. package/agent-assets/skills/gmail-lifestyle/SKILL.md +151 -0
  145. package/agent-assets/skills/gmail-lifestyle/references/receipts-api.md +93 -0
  146. package/agent-assets/skills/gmail-lifestyle/references/travel-bookings-api.md +75 -0
  147. package/agent-assets/skills/mail/SKILL.delegated.claude.md +15 -6
  148. package/agent-assets/skills/mail/SKILL.delegated.codex.md +9 -5
  149. package/agent-assets/skills/mail/SKILL.delegated.gemini.md +9 -5
  150. package/agent-assets/skills/mail/SKILL.md +9 -114
  151. package/agent-assets/skills/mail/SKILL.native.claude.md +1 -1
  152. package/agent-assets/skills/mail/SKILL.native.codex.md +1 -1
  153. package/agent-assets/skills/mail/SKILL.native.gemini.md +1 -1
  154. package/agent-assets/skills/mail/references/api.md +110 -0
  155. package/agent-assets/skills/mail/references/examples.md +70 -0
  156. package/agent-assets/skills/mail/references/providers.md +8 -8
  157. package/agent-assets/skills/managed-tasks/SKILL.md +472 -0
  158. package/agent-assets/skills/managed-tasks/references/errors.md +73 -0
  159. package/agent-assets/skills/managed-tasks/references/output-path.md +75 -0
  160. package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +86 -0
  161. package/agent-assets/skills/management-policy/SKILL.md +54 -125
  162. package/agent-assets/skills/management-policy/curation.json +1 -1
  163. package/agent-assets/skills/management-policy/references/policy-workflow.md +101 -0
  164. package/agent-assets/skills/management-policy/seeds/policy-file-shape.seed.json +1 -1
  165. package/agent-assets/skills/notify/SKILL.md +10 -82
  166. package/agent-assets/skills/notify/references/priority.md +65 -0
  167. package/agent-assets/skills/notion/SKILL.delegated.claude.md +2 -2
  168. package/agent-assets/skills/notion/SKILL.delegated.codex.md +2 -2
  169. package/agent-assets/skills/notion/SKILL.delegated.gemini.md +2 -2
  170. package/agent-assets/skills/notion/SKILL.md +6 -10
  171. package/agent-assets/skills/notion/SKILL.native.claude.md +11 -8
  172. package/agent-assets/skills/notion/SKILL.native.codex.md +10 -6
  173. package/agent-assets/skills/notion/SKILL.native.gemini.md +10 -6
  174. package/agent-assets/skills/observations/SKILL.md +25 -14
  175. package/agent-assets/skills/project-doc/SKILL.md +2 -6
  176. package/agent-assets/skills/project-doc/curation.json +3 -3
  177. package/agent-assets/skills/project-doc/seeds/project-shape.seed.json +7 -4
  178. package/agent-assets/skills/project-doc/seeds/slug-grammar.seed.json +3 -3
  179. package/agent-assets/skills/reading/SKILL.md +12 -2
  180. package/agent-assets/skills/reading/references/reading-taste.md +2 -2
  181. package/agent-assets/skills/roadmap/SKILL.md +43 -141
  182. package/agent-assets/skills/roadmap/curation.json +1 -1
  183. package/agent-assets/skills/roadmap/references/api.md +100 -0
  184. package/agent-assets/skills/roadmap/references/cross-check.md +80 -0
  185. package/agent-assets/skills/roadmap/references/migration.md +56 -0
  186. package/agent-assets/skills/roadmap/references/preparation-timeline.md +2 -2
  187. package/agent-assets/skills/roadmap/seeds/entry-types.seed.json +1 -1
  188. package/agent-assets/skills/schedule/SKILL.md +76 -104
  189. package/agent-assets/skills/schedule/references/batch.md +93 -0
  190. package/agent-assets/skills/schedule/references/errors.md +217 -0
  191. package/agent-assets/skills/schedule/references/model-selection.md +96 -0
  192. package/agent-assets/skills/schedule/references/recurrence-rule.md +86 -0
  193. package/agent-assets/skills/scheduled-managed-task/SKILL.md +59 -51
  194. package/agent-assets/skills/today/SKILL.md +32 -62
  195. package/agent-assets/skills/today/curation.json +3 -3
  196. package/agent-assets/skills/today/references/agent-plan-lifecycle.md +114 -0
  197. package/agent-assets/skills/today/seeds/section-shape.seed.json +1 -1
  198. package/agent-assets/skills/user-interview/SKILL.md +23 -67
  199. package/agent-assets/skills/user-interview/references/op-briefing.md +51 -0
  200. package/agent-assets/skills/user-interview/references/op-morning.md +59 -0
  201. package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +9 -1
  202. package/agent-assets/skills/user-profile/SKILL.md +54 -74
  203. package/agent-assets/skills/user-profile/curation.json +2 -2
  204. package/agent-assets/skills/user-profile/references/character-preferences.md +83 -0
  205. package/agent-assets/skills/user-profile/seeds/routing-table.seed.json +8 -8
  206. package/agent-assets/skills/user-profile/seeds/topic-files.seed.json +30 -2
  207. package/agent-assets/skills/wiki/wiki-ask/SKILL.md +0 -1
  208. package/agent-assets/skills/wiki/wiki-compile/SKILL.md +4 -5
  209. package/agent-assets/skills/wiki/wiki-connect/SKILL.md +0 -1
  210. package/agent-assets/skills/wiki/wiki-graduate/SKILL.md +0 -1
  211. package/agent-assets/skills/wiki/wiki-ingest/SKILL.md +0 -1
  212. package/agent-assets/skills/wiki/wiki-lint/SKILL.md +0 -1
  213. package/agent-assets/skills/wiki/wiki-trace/SKILL.md +0 -1
  214. package/agent-assets/skills/wiki/wiki-vault-rules/SKILL.md +0 -1
  215. package/agent-assets/system-prompts/routine-fetch-window.md +78 -0
  216. package/agent-assets/system-prompts/skill-index-instruction.md +26 -0
  217. package/agent-assets/task-flows/_partials/calendar-acquire.google_calendar.md +20 -11
  218. package/agent-assets/task-flows/_partials/calendar-acquire.outlook_calendar.md +18 -9
  219. package/agent-assets/task-flows/_partials/capture-user-info.md +24 -0
  220. package/agent-assets/task-flows/_partials/confirm-subflow.md +68 -0
  221. package/agent-assets/task-flows/_partials/dm-intent.long-horizon.md +35 -0
  222. package/agent-assets/task-flows/_partials/dm-intent.project.md +391 -0
  223. package/agent-assets/task-flows/_partials/mail-acquire.gmail.md +20 -11
  224. package/agent-assets/task-flows/_partials/mail-acquire.outlook_mail.md +18 -9
  225. package/agent-assets/task-flows/_partials/notion-acquire.notion.md +26 -15
  226. package/agent-assets/task-flows/browser_task.md +84 -0
  227. package/agent-assets/task-flows/github.assigned.md +1 -1
  228. package/agent-assets/task-flows/github.pull_request.review_requested.md +2 -2
  229. package/agent-assets/task-flows/github.workflow_run.failed.md +2 -2
  230. package/agent-assets/task-flows/knowledge.import.md +15 -15
  231. package/agent-assets/task-flows/message.received.dm.md +20 -17
  232. package/agent-assets/task-flows/message.received.dm_first.md +11 -15
  233. package/agent-assets/task-flows/routine.custom.md +6 -4
  234. package/agent-assets/task-flows/routine.evening_review.md +46 -170
  235. package/agent-assets/task-flows/routine.fetch_window.md +19 -14
  236. package/agent-assets/task-flows/routine.hourly_check.md +27 -15
  237. package/agent-assets/task-flows/routine.hourly_check.triage.md +1 -1
  238. package/agent-assets/task-flows/routine.monthly_review.md +67 -25
  239. package/agent-assets/task-flows/routine.morning_routine_journal.md +135 -0
  240. package/agent-assets/task-flows/routine.morning_routine_today.md +673 -0
  241. package/agent-assets/task-flows/routine.research_cluster_update.md +35 -0
  242. package/agent-assets/task-flows/routine.research_dispatch.md +38 -0
  243. package/agent-assets/task-flows/routine.research_offer_dm.md +125 -0
  244. package/agent-assets/task-flows/routine.research_wiki_summary.md +53 -0
  245. package/agent-assets/task-flows/routine.roadmap_refresh.md +68 -23
  246. package/agent-assets/task-flows/routine.today_refresh.md +4 -4
  247. package/agent-assets/task-flows/routine.user_profile_sweep.md +19 -20
  248. package/agent-assets/task-flows/routine.weekly_review.md +370 -86
  249. package/agent-assets/task-flows/schedule.approaching.md +0 -1
  250. package/agent-assets/task-flows/scheduled.dm.md +13 -13
  251. package/agent-assets/task-flows/scheduled.task.md +9 -9
  252. package/agent-assets/task-flows/setup.initial.md +171 -251
  253. package/agent-assets/task-flows/setup.update.md +2 -2
  254. package/agent-assets/task-flows/wiki.ingest_url.md +1 -1
  255. package/agent-assets/templates/README.md +27 -20
  256. package/agent-assets/templates/_index.md +42 -26
  257. package/agent-assets/templates/_manifest.json +34 -99
  258. package/agent-assets/templates/{user → identity}/_index.md +1 -1
  259. package/agent-assets/templates/identity/expertise.md +9 -0
  260. package/agent-assets/templates/identity/goals.md +9 -0
  261. package/agent-assets/templates/identity/people.md +13 -0
  262. package/agent-assets/templates/identity/personal.md +9 -0
  263. package/agent-assets/templates/{user → identity}/profile.md +2 -2
  264. package/agent-assets/templates/identity/work.md +9 -0
  265. package/agent-assets/templates/{dossiers → knowledge/dossiers}/_index.md +2 -2
  266. package/agent-assets/templates/{projects → plans/projects}/_active.base +1 -1
  267. package/agent-assets/templates/policies/_index.md +21 -0
  268. package/agent-assets/templates/{rules → policies}/journal-export.md +1 -1
  269. package/agent-assets/templates/policies/journal-format.md +168 -0
  270. package/agent-assets/templates/{rules/policies → policies/management-captures}/_index.md +2 -2
  271. package/agent-assets/templates/{rules → policies}/management.md +3 -3
  272. package/agent-assets/templates/{rules → policies}/mcp.md +1 -1
  273. package/agent-assets/templates/{rules → policies}/redaction.md +1 -1
  274. package/agent-assets/templates/{routines → policies/routines}/_index.md +1 -1
  275. package/agent-assets/templates/{routines → policies/routines}/evening.md +2 -2
  276. package/agent-assets/templates/{routines → policies/routines}/hourly.md +1 -1
  277. package/agent-assets/templates/{routines → policies/routines}/monthly.md +2 -2
  278. package/bin/aitne.mjs +21 -5
  279. package/package.json +5 -4
  280. package/scripts/commands/doctor.mjs +63 -5
  281. package/scripts/commands/run-now.mjs +187 -0
  282. package/scripts/commands/verify.mjs +264 -0
  283. package/scripts/lib/ports.d.mts +27 -0
  284. package/scripts/lib/ports.mjs +36 -0
  285. package/scripts/lib/read-api-token.mjs +176 -0
  286. package/scripts/start.mjs +2 -1
  287. package/agent-assets/docs/features/lifestyle/travel-time.md +0 -52
  288. package/agent-assets/docs/features/routines/monthly-review.md +0 -65
  289. package/agent-assets/skills/management-task-modify/SKILL.md +0 -203
  290. package/agent-assets/skills/management-task-register/SKILL.md +0 -330
  291. package/agent-assets/skills/management-task-stop/SKILL.md +0 -166
  292. package/agent-assets/skills/receipts/SKILL.md +0 -134
  293. package/agent-assets/skills/travel/SKILL.md +0 -132
  294. package/agent-assets/skills/travel-time/SKILL.md +0 -158
  295. package/agent-assets/task-flows/routine.morning_routine.md +0 -322
  296. package/agent-assets/task-flows/routine.morning_routine_initial.md +0 -204
  297. package/agent-assets/templates/context-index.md +0 -42
  298. package/agent-assets/templates/rules/_index.md +0 -19
  299. package/agent-assets/templates/rules/journal-format.md +0 -61
  300. package/agent-assets/templates/user/expertise.md +0 -7
  301. package/agent-assets/templates/user/goals.md +0 -7
  302. package/agent-assets/templates/user/people.md +0 -7
  303. package/agent-assets/templates/user/personal.md +0 -7
  304. package/agent-assets/templates/user/work.md +0 -7
  305. /package/agent-assets/templates/{agent/journal.md → journal/agent.md} +0 -0
  306. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/evening.md +0 -0
  307. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/hourly.md +0 -0
  308. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/monthly.md +0 -0
  309. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/morning.md +0 -0
  310. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/roadmap.md +0 -0
  311. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/weekly.md +0 -0
  312. /package/agent-assets/templates/{projects → plans/projects}/_index.md +0 -0
  313. /package/agent-assets/templates/{roadmap.md → plans/roadmap.md} +0 -0
  314. /package/agent-assets/templates/{routines → policies/routines}/morning.md +0 -0
  315. /package/agent-assets/templates/{routines → policies/routines}/weekly.md +0 -0
  316. /package/agent-assets/templates/{agent → state}/profile-questions.md +0 -0
  317. /package/agent-assets/templates/{today.md → state/today.md} +0 -0
@@ -3,12 +3,12 @@
3
3
  ## Task: Weekly Review
4
4
 
5
5
  The "Vault policy files" block appended to this prompt includes
6
- `routines/weekly.md` — run any `### <label>` entries there alongside the
6
+ `policies/routines/weekly.md` — run any `### <label>` entries there alongside the
7
7
  built-in review phases below, using the same journaling conventions.
8
8
  The "Vault review context" block includes `context-index.md` and
9
- `dossiers/weekly.md`; consult it during Phase 1 and update the
9
+ `knowledge/dossiers/weekly.md`; consult it during Phase 1 and update the
10
10
  dossier's Open items / Last run before finishing. Writes to
11
- `dossiers/<flow>.md` MUST preserve the existing YAML frontmatter block
11
+ `knowledge/dossiers/<flow>.md` MUST preserve the existing YAML frontmatter block
12
12
  (`---\ntype: dossier\nowner: agent\nupdated: <date>\n---`); prefer
13
13
  `PATCH` with a section target to mutate a single block, and when doing
14
14
  a `PUT` full rewrite keep the frontmatter and only refresh `updated:`
@@ -16,60 +16,135 @@ a `PUT` full rewrite keep the frontmatter and only refresh `updated:`
16
16
 
17
17
  Generate the weekly review snapshot for the current ISO week and prepare next-week priorities.
18
18
 
19
+ The `## Carry Over to Next Week`, `## Next Week Focus`, and `## Lessons
20
+ for Next Week` sections you write here are not just a snapshot — they
21
+ are lifted into **every** morning_routine of the next ISO week (Mon–Sun)
22
+ via the `<previous_week>` context block. Treat them as load-bearing
23
+ input to next week's daily planning, not as an artifact the user reads
24
+ once. Full design: `docs/design/appendices/weekly-next-week-leverage.md`.
25
+
19
26
  This routine produces **two separate artifacts** with strict audience boundaries:
20
- - **User-facing**: `weekly/YYYY-Www.md` + (optionally) a short notification.
21
- Only real user outcomes and next-week focus. No agent mechanics.
22
- - **Agent-internal**: `agent/journal.md` (append). Self-reflection, filter
27
+ - **User-facing**: `journal/weekly/YYYY-Www.md` + a short Friday-evening
28
+ notification (default send; narrow silence gate in Phase 4a).
29
+ Only real user outcomes — no agent mechanics, no fabricated
30
+ positivity. Tone: brief, warm, weekend-close.
31
+ - **Agent-internal**: `journal/agent.md` (append). Self-reflection, filter
23
32
  quality, system improvement ideas, failed scheduled actions, pipeline
24
33
  observations. **Never** surfaced to the user via notify.
25
34
 
26
35
  Follow the context skill for file ownership rules. This routine owns the
27
36
  workflow; the skill owns the file contract.
28
37
 
38
+ > Note: the `## Current research themes (auto)` block in `<user>` is
39
+ > daemon-refreshed by a deterministic pre-hook just before this task-flow
40
+ > fires (`WEEKLY_INTERESTS_REFLECTION_PLAN.md` §10.4 / §7.1). You only
41
+ > *read* it — never edit, append, or duplicate that block. The companion
42
+ > `user/research-themes.md` file is wholly daemon-owned (frontmatter
43
+ > `owner: aitne-browser-history`); leave it alone too. If new themes
44
+ > appeared this week, you may briefly mention it in the Phase 4 notification
45
+ > ("Refreshed your research themes — N new this week") — optional context,
46
+ > not a task to do, and still subject to Phase 4's silence gate, 2–3 line
47
+ > cap, and forbidden-vocabulary rules.
48
+
29
49
  ### Phase 1: Gather the week
30
50
  1. Determine the target file name from <current_time>:
31
- `weekly/YYYY-Www.md` (ISO week in the daemon timezone).
32
- 2. Read the past-7-day calendar retrospective. The pre-pass fetcher
33
- session (`routine.fetch_window`) ran ahead of you and posted
34
- observations for the `cal_past_7d` window for every active calendar
35
- integration (Google + Outlook). The `<fetch_report>` block in your
36
- prompt tells you the pre-pass status `success` / `partial` means
37
- the table is fresh; `failed` / `skipped` means trust nothing newer
38
- than the prior tick and treat the retrospective as best-effort. The
39
- ContextBuilder block `<calendar_events_7d>` already covers the
40
- forward-looking next-7-days view; this step adds the retrospective
41
- complement so the review surfaces what actually happened, not just
42
- what's coming next.
43
-
44
- Drain pending past-week observations:
51
+ `journal/weekly/YYYY-Www.md` (ISO week in the daemon timezone).
52
+ 2. Read the current-ISO-week calendar retrospective. The pre-pass
53
+ fetcher session (`routine.fetch_window`) ran ahead of you and posted
54
+ observations for the `cal_iso_week_to_now` window for every active
55
+ calendar integration (Google + Outlook). That window spans from
56
+ **Monday 00:00 local** of the current ISO week through **now**, so
57
+ the retrospective covers exactly the days the archived
58
+ `journal/daily/YYYY-MM-DD.md` files are keyed on no rolling drift into
59
+ last week's tail, and no missing today's events. The
60
+ `<fetch_report>` block in your prompt tells you the pre-pass
61
+ status `success` / `partial` means the table is fresh;
62
+ `failed` / `skipped` means trust nothing newer than the prior tick
63
+ and treat the retrospective as best-effort. The ContextBuilder
64
+ block `<calendar_events_7d>` already covers the forward-looking
65
+ next-7-days view; this step adds the retrospective complement so the
66
+ review surfaces what actually happened this week, not just what's
67
+ coming next.
68
+
69
+ Drain pending current-ISO-week observations. The pre-pass posted
70
+ them just now under `pending=true`, so a single bounded fetch is
71
+ sufficient — no `observed_at_after` filter needed:
45
72
 
46
73
  ```
47
- GET /api/observations?pending=true&source_prefix=google_calendar:,outlook_calendar:&observed_at_after=<week_start_iso>&limit=200
74
+ GET /api/observations?pending=true&source_prefix=google_calendar:,outlook_calendar:&limit=200
48
75
  ```
49
76
 
50
77
  Treat each row's `payload.raw` (`title` / `start` / `end` /
51
78
  `attendees` / `status`) as authoritative; cross-reference against the
52
79
  daily files in step 3 below to disambiguate attended vs cancelled
53
- meetings.
54
- 3. Fetch the source days for the current week:
80
+ meetings. If a row's `payload.raw.start` falls outside the current
81
+ ISO week (e.g. a stale pending row from an earlier weekly_review
82
+ that never reached the consume step), ignore it for this synthesis
83
+ but still let the consume call sweep it so it doesn't bias next
84
+ week's run.
85
+ 3. Fetch the source days for the current ISO week:
55
86
  - Use GET /api/context/list/daily to discover archived daily files.
56
- - Read each `daily/YYYY-MM-DD.md` whose date falls in the current ISO week.
57
- - Include <today> as the in-progress final day if it belongs to the same week.
87
+ - Read each `journal/daily/YYYY-MM-DD.md` whose date falls in the current ISO week.
88
+ - Include <today> as the in-progress final day. On the Friday-evening
89
+ cron run, the daily archive carries Mon–Thu and `<today>` carries
90
+ Friday-in-progress; Saturday and Sunday have not happened yet, and
91
+ the next morning's `morning_routine` will not have archived
92
+ Friday's daily file yet either. That is the working dataset — do
93
+ not invent Sat/Sun content; the `## Metrics` and `## Period`
94
+ fields below describe this honestly.
58
95
  4. Use <roadmap>, <active_projects>, and <calendar_events_7d> to understand:
59
96
  - which milestones moved this week (cross-reference with Step 2's
60
97
  retrospective observations),
61
98
  - what remains incomplete,
62
99
  - what needs attention next week.
100
+ 4a. Pull this week's browser-reload tally — drives the optional
101
+ `## This Week You Checked` section in Phase 3a
102
+ (BROWSER_HISTORY_INTEGRATION_PLAN §5.F4 "Surfacing"):
103
+
104
+ ```
105
+ GET /api/browser-history/reloads/weekly
106
+ ```
107
+
108
+ The endpoint defaults `end` to today and `start` to `end-6d` — which
109
+ is the trailing-7-day window. Reads from `browser_reload_signals`;
110
+ returns an empty `entries` array on a fresh install or if the
111
+ browser-history integration is `disabled`. Treat any 404 / network
112
+ failure as "no entries" and skip the §3a section accordingly — never
113
+ abort the review on a browser-history hiccup.
114
+
115
+ Use only the top **5** entries by `reloadCount` for the section
116
+ body. The endpoint already sorts by count DESC then pattern ASC; do
117
+ not re-rank.
63
118
 
64
119
  ### Phase 2: Synthesize — split into two buckets
65
120
  5. Build TWO separate mental lists before writing anything:
66
- a. **User-facing bucket** (goes to `weekly/YYYY-Www.md` and possibly notify):
67
- - What meaningful user work moved forward this week?
68
- - Which user tasks or commitments slipped or stalled (with the reason
69
- the USER cares about "blocked on Sarah's reply", not "agent skipped
70
- reminder")?
71
- - What should the user focus on next week?
72
- b. **Agent-internal bucket** (goes to `agent/journal.md` only):
121
+ a. **User-facing bucket** (goes to `journal/weekly/YYYY-Www.md` and possibly notify).
122
+ Synthesize along **three axes**:
123
+ i. **Outcomes** what meaningful user work moved forward this week,
124
+ and which user tasks / commitments slipped or stalled (with the
125
+ reason the USER cares about — "blocked on Sarah's reply", not
126
+ "agent skipped reminder").
127
+ ii. **Forward items** what should the user focus on next week, and
128
+ which open loops carry forward. Each carry-over needs the
129
+ one-line reason / blocker that lets the upcoming morning_routine
130
+ judge whether it is still hot.
131
+ iii. **Behavioral lessons** — patterns in *how* the user worked this
132
+ week, distilled into **a concrete forward adjustment** for next
133
+ week. The format is **observation → next-week action**, not
134
+ free-floating commentary. Each line must:
135
+ - Cite evidence from this week's `daily/*.md`,
136
+ `<yesterday_messages>`, or `<calendar_events_7d>` (not
137
+ speculation). If the data does not show a pattern, write no
138
+ lesson — fabrication is forbidden.
139
+ - End in a **testable, specific action** the user could take
140
+ next week. "Focus better" is not testable; "Block Tue/Wed
141
+ 9-11 on calendar" is.
142
+ - Stay user-actionable. Agent-side filter-quality observations
143
+ belong in the agent-internal bucket (see (b) below), not
144
+ here.
145
+ Hard cap: 3 lessons. Two is fine; zero is fine. Padding to three
146
+ dilutes the signal that downstream morning_routines act on.
147
+ b. **Agent-internal bucket** (goes to `journal/agent.md` only):
73
148
  - Scheduled tasks / reminders that did-not-fire or failed, and any
74
149
  pattern behind the failures
75
150
  - Quality of the day-type / focus-dimension filter (false positives,
@@ -86,7 +161,7 @@ workflow; the skill owns the file contract.
86
161
  agent-internal if the latter.
87
162
 
88
163
  ### Phase 3a: Write the user-facing review
89
- 7. PUT the review to `weekly/YYYY-Www.md`.
164
+ 7. PUT the review to `journal/weekly/YYYY-Www.md`.
90
165
  Required structure (user outcomes only — no agent mechanics in any section):
91
166
  ```
92
167
  ---
@@ -95,7 +170,8 @@ workflow; the skill owns the file contract.
95
170
  updated: YYYY-MM-DD
96
171
  ---
97
172
  # Weekly Review YYYY-Www
98
- > Period: YYYY-MM-DD to YYYY-MM-DD
173
+ > ISO week: YYYY-MM-DD (Mon) YYYY-MM-DD (Sun)
174
+ > Evaluated through: YYYY-MM-DD HH:MM (Sat/Sun not yet observed)
99
175
  > Generated at: YYYY-MM-DD HH:MM
100
176
 
101
177
  ## Highlights
@@ -112,17 +188,106 @@ workflow; the skill owns the file contract.
112
188
  - User tasks carried over: N
113
189
  - Key meetings / commitments kept: N
114
190
 
115
- ## Next Week Priorities
116
- - ...
191
+ ## Carry Over to Next Week
192
+ - <Open loop A> — <one-line user-meaningful reason / blocker>
193
+ - <Open loop B> — <one-line user-meaningful reason / blocker>
194
+
195
+ ## Next Week Focus
196
+ - <Top priority 1>
197
+ - <Top priority 2>
198
+
199
+ ## Lessons for Next Week
200
+ - <observation from this week's data> → <specific next-week action>
201
+ - <observation> → <specific next-week action>
202
+
203
+ ## This Week You Checked
204
+ - <url-pattern>: <reloadCount> reloads across <days> days
205
+ - <url-pattern>: <reloadCount> reloads across <days> days
117
206
  ```
118
207
  The `## Metrics` section tracks **user** activity only. Do not add rows
119
208
  like "agent plan rows completed", "scheduled tasks fired", "observations
120
- processed" — those are agent mechanics and belong in agent/journal.md.
209
+ processed" — those are agent mechanics and belong in journal/agent.md.
210
+
211
+ **`## Carry Over to Next Week`, `## Next Week Focus`, and `## Lessons
212
+ for Next Week` are import-targeted sections** — every morning of the
213
+ next ISO week, `morning_routine` lifts these three sections
214
+ mechanically from this file via the `<previous_week>` context block
215
+ (see `routine.morning_routine.md` "Previous-week leverage" step).
216
+ Treat the contract as load-bearing:
217
+ - **Carry Over** — max **5** bullets. Each must point at a real
218
+ `## Open Loops` entry from this same file (not aspirational items),
219
+ and include a short reason / blocker so next week's morning_routines
220
+ can decide whether the loop is still hot or has been overtaken by
221
+ the week's events. If there are no genuine carry-overs, leave the
222
+ section body empty — the `<previous_week>` renderer surfaces an
223
+ explicit `(none recorded)` placeholder so next week's morning_routine
224
+ sees the same "deliberately none" signal it sees for an empty
225
+ Focus or Lessons section. Do not write `- (none)` (it would be
226
+ extracted verbatim and clash with the placeholder for the other
227
+ two sections).
228
+ - **Next Week Focus** — max **3** bullets, ordered. The "if you only
229
+ did three things next week" list. Each item should be specific
230
+ enough that next week's `state/today.md` priority selection can use it
231
+ verbatim as a candidate. If next week's focus is unclear from this
232
+ week's data, write fewer items rather than padding to three.
233
+ - **Lessons for Next Week** — max **3** bullets, format
234
+ `<observation> → <specific next-week action>`. Source the
235
+ observations from Phase 2 (a) (iii) "Behavioral lessons" axis.
236
+ Examples that conform:
237
+ - `Tue/Wed deep-work mornings were eaten by ad-hoc meetings → block Tue/Wed 9–11 on calendar`
238
+ - `Email replies started after 14:00 mostly slid to the next day → handle first wave by 11:00`
239
+ Examples that violate (do NOT write these):
240
+ - `Focus more next week` — no observation, no testable action.
241
+ - `Be more disciplined about email` — no concrete adjustment.
242
+ - `Agent over-notified on Tuesday` — agent mechanics; belongs in
243
+ journal/agent.md, never here.
244
+ Zero lessons is acceptable. Padding is worse than silence — the
245
+ morning_routine's only job with a fabricated lesson is to ignore it,
246
+ which trains the loop to ignore real ones too.
247
+ - All three lists are caps, not quotas. Exceeding any signals
248
+ over-promising; the morning_routine cannot productively act on a
249
+ Carry Over longer than 5, a Focus longer than 3, or Lessons longer
250
+ than 3.
251
+ - Section headings must match exactly — the digest extractor is
252
+ header-regex bound. Do not rename, translate, or pluralize.
253
+ - Body bullets are surfaced to the agent in
254
+ `<output_language_policy>`'s body language; the H2 headers
255
+ themselves stay in English per Policy B (skeleton headers fixed,
256
+ prose follows `<settings primary_language>`).
257
+ - **This Week You Checked** — passive observability section
258
+ (BROWSER_HISTORY_INTEGRATION_PLAN §5.F4 "Surfacing"). Sourced
259
+ from Step 4a's `/api/browser-history/reloads/weekly`. **Optional**:
260
+ if the endpoint returned an empty `entries` array, **omit the
261
+ entire H2 section** — do not emit a heading with a "(none)"
262
+ placeholder, do not invent dummy entries. The section is **not**
263
+ lifted by the morning_routine's `<previous_week>` extractor
264
+ (which scans only Carry Over / Next Week Focus / Lessons), so
265
+ omission has no downstream contract impact. Hard rules when the
266
+ section IS rendered:
267
+ - Max **5** bullets, ordered by `reloadCount` DESC as returned
268
+ by the API. Cap stays low: the goal is "name the patterns",
269
+ not "enumerate the entire browsing surface".
270
+ - **Neutral observation only**. No recommendations
271
+ ("consider...", "you should...", "maybe stop..."), no rate
272
+ framing ("that's a lot"), no judgement ("perhaps habit X").
273
+ The user reads their own meaning into it; the agent does not
274
+ moralise. The plan calls this out explicitly: F4's surface
275
+ is "self-awareness of unconscious habits, with zero agent
276
+ interference".
277
+ - Bullet shape exactly:
278
+ `- <url-pattern>: <reloadCount> reloads across <days> days`.
279
+ `<url-pattern>` is the API's `urlPattern` verbatim (it has
280
+ already been stripped of query strings by Layer 1's reload
281
+ detector and is bounded to `<domain>/<first-path-segment>`);
282
+ never expand to a full URL, never wrap in markdown links.
283
+ - When `days == 1`, render `1 day` not `1 days` (the only
284
+ pluralization the renderer is responsible for — pattern is
285
+ already a noun the user understands).
121
286
  8. If the review reveals roadmap drift or stale project status, update
122
287
  roadmap.md and the relevant projects/*.md in the same session.
123
288
 
124
- ### Phase 3b: Append to agent/journal.md (internal)
125
- 9. PATCH-append a new section to `agent/journal.md` with the agent-internal
289
+ ### Phase 3b: Append to journal/agent.md (internal)
290
+ 9. PATCH-append a new section to `journal/agent.md` with the agent-internal
126
291
  bucket from Phase 2. Use `mode: "append_to_file"` (no `section` param
127
292
  needed — content is appended to the end of the file).
128
293
  Required shape for the appended block — **these bullet caps are hard
@@ -155,7 +320,7 @@ workflow; the skill owns the file contract.
155
320
  everything — the monthly review synthesizes across weeks and surfaces
156
321
  recurring items anyway.
157
322
 
158
- If `agent/journal.md` does not yet exist (GET returns 404), PUT a minimal
323
+ If `journal/agent.md` does not yet exist (GET returns 404), PUT a minimal
159
324
  file with just `# Agent Journal\n\n` as header and your new section below
160
325
  it, in a single call. Do not abort the review.
161
326
 
@@ -167,62 +332,181 @@ workflow; the skill owns the file contract.
167
332
  overwrite the old section in place.
168
333
 
169
334
  ### Phase 4: Notify (user-facing only)
170
- 10. The notification is for the USER, not a report of Phases 1–3. Never
171
- mention weekly/YYYY-Www.md, agent/journal.md, "Weekly Review complete",
172
- agent plan rows, did-not-fire, filter quality, observation processing,
173
- or any other internal mechanism.
174
-
175
- #### 4a. Silence gate — decide whether to notify at all
176
- Prefer silence over noise. Send **no notification** if ALL of the following
177
- hold:
178
- - Fewer than 2 Highlights worth naming (a quiet week)
179
- - No Open Loops the user is not already aware of
180
- - No Next Week priority that needs a heads-up tonight (the user will see
181
- it in Monday's morning briefing anyway)
182
- - No hard deadline within the next 7 days
183
- When the gate triggers: skip POST /api/notify entirely. The weekly/YYYY-Www.md
184
- file is still written (user can open it on demand); just no push. Also log
185
- one line into agent/journal.md's "What worked" subsection:
186
- `silent weekly wrap-up — nothing actionable`.
335
+ 10. The notification is a brief, warm end-of-week touchpoint for the USER
336
+ — not a report of Phases 1–3. Never mention journal/weekly/YYYY-Www.md,
337
+ journal/agent.md, "Weekly Review complete", agent plan rows,
338
+ did-not-fire, filter quality, observation processing, or any other
339
+ internal mechanism.
340
+
341
+ The default posture for this notification is **send**. Friday evening
342
+ is a natural touchpoint and the user opted into receiving one. Skip
343
+ only under the narrow silence gate in 4a.
344
+
345
+ #### 4a. Silence gate skip only when the week was essentially blank
346
+ Send **no notification** only if ALL of these hold:
347
+ - Zero daily files in `daily/` were updated this week, AND
348
+ - No completed user work surfaced in Phase 1 (highlights and completed
349
+ lists in the weekly file would both be empty)
350
+ In a normal week even a low-activity one — notify.
351
+
352
+ When the gate triggers: skip POST /api/notify entirely. The weekly file
353
+ is still written (user can open it on demand). Append one bullet under
354
+ journal/agent.md "What worked": `silent weekly wrap-up — quiet week`.
355
+
356
+ **Silence-path × leverage loop.** A silent-path week still PUTs the
357
+ full Phase 3a structure. Carry Over / Next Week Focus / Lessons may be
358
+ legitimately empty when the week was blank — leave their bodies empty
359
+ (do **not** write `- (none)` placeholders). Next week's morning_routine
360
+ will see `<carry_over>` / `<focus>` / `<lessons>` rendered as
361
+ `(none recorded)` and skip them silently, which is the correct signal
362
+ that the prior week had nothing to lift.
187
363
 
188
364
  #### 4b. When you DO notify — content rules
189
- Output language: follow `<output_language_policy>`. Answer:
190
- 1. **One concrete win** from this week (1 line).
191
- 2. **At most one open loop** that carries into next week, with a brief
192
- user-meaningful reason. Omit if Open Loops is empty.
193
- 3. **The single most important focus for next week** (1 line).
194
-
195
- Optional 4th line: a hard deadline heads-up if one falls within the next 7
196
- days and the user has not yet acted on it.
365
+ Output language: follow `<output_language_policy>`. Compose in this order:
366
+
367
+ 1. **One concrete win from this week** (1 line). Must name an
368
+ artifact AND either the day it shipped or its concrete current
369
+ state.
370
+ ✓ "the design doc shipped Thursday" (artifact + day)
371
+ "auth refactor is in review, queued for Monday landing"
372
+ (artifact + state)
373
+ ✗ "solid progress on the auth refactor" (no artifact / day /
374
+ state — would read plausibly in any week)
375
+ If Phases 1–3 supply no concrete artifact + day/state, the
376
+ silence gate in 4a should fire — do not pad with generic praise.
377
+
378
+ 2. **Optional insight line — default is OMIT.** The canonical correct
379
+ output is **2 lines** (win + weekend close). Include line 2 only
380
+ when ONE of bar (a) or (b) clears unambiguously.
381
+
382
+ a. **Personalized pattern** — a real pattern in **this week's**
383
+ data. Must (i) cite specific instances (named tasks, calendar
384
+ entries, daily-file rows), (ii) rest on **≥3 concrete
385
+ instances** within the week (N=1 anecdotes do not qualify),
386
+ (iii) be about the user's behavior or outcomes, not external
387
+ factors.
388
+ ✓ "Worth noticing — every task you started before 10:00 closed
389
+ the same day; the four after-lunch starts mostly slid to
390
+ tomorrow." (two buckets + a count)
391
+ ✗ "Your mornings seemed more productive than afternoons this
392
+ week." (vague, no count — true of any week)
393
+
394
+ b. **Academic finding** — a well-known finding from psychology,
395
+ behavioral economics, cognitive science, or productivity
396
+ research that maps **specifically** to a concrete thing the
397
+ user did this week. **If you reach for hedge phrasing —
398
+ "studies suggest…", "research often shows…", "it is said
399
+ that…" — you are not confident the finding is real; omit.**
400
+ Match a specific week activity, not a generic proverb.
401
+ Register: "Worth knowing…" not "You should…" (advice
402
+ forbidden).
403
+ ✓ "Worth knowing: deep-work researchers find three consecutive
404
+ focused days tend to outperform five scattered ones for
405
+ shipping work like this."
406
+ ✗ "Worth noticing — small, consistent efforts compound over
407
+ time." (proverb, no named research area, generic)
408
+
409
+ **No-fabrication rule** (both bars):
410
+ - Numbers, percentages, deltas, week-over-week comparisons must
411
+ appear **literally in the data**. "30% harder", "doubled
412
+ throughput", "twice the rate" — forbidden unless real counts
413
+ you can point at.
414
+ - Vague intensifiers are padding, not insight: "crushed it",
415
+ "big momentum", "small efforts compound", etc. **Paste-test**:
416
+ if line 2 could fit any user's review and still read as
417
+ plausible, delete it.
418
+ - **First 2–3 weeks of operation** (few prior `weekly/*.md`):
419
+ skip line 2 unconditionally — insufficient data for patterns,
420
+ premature citations erode trust.
421
+
422
+ 3. **Weekend close** (1 line) — calendar-aware via
423
+ <calendar_events_7d>:
424
+ - Non-trivial commitment this weekend (work event, deadline,
425
+ exam, interview): brief specific encouragement tied to it
426
+ — e.g. "Good luck with the API review on Saturday."
427
+ - Something the user looks forward to (trip, celebration, hobby
428
+ block, social event): brief "enjoy" tied to it — e.g.
429
+ "Enjoy the trip to Portland."
430
+ - **Sensitive event categories** — medical / therapy / clinic /
431
+ legal / financial review / family-conflict titles (mediation,
432
+ custody, etc.): do NOT name the event. Use the neutral default
433
+ ("Have a good weekend.") — surfacing a sensitive event
434
+ unprompted in a Friday recap is intrusive even when the
435
+ category is right.
436
+ - Otherwise: a simple weekend close (e.g. "Have a good weekend.").
197
437
 
198
438
  #### 4c. Format rules (hard limits)
199
- - Maximum 4 short lines total. No markdown headers. No bullet list.
439
+ - 2 or 3 lines for the Phase 4 message (3 only if line 2 genuinely
440
+ earns its place). Phase 5 may add at most one additional reading
441
+ line via a separate POST under its own contract — that is the only
442
+ way the total reaches 4 lines. No markdown headers. No bullet
443
+ list. Plain prose.
200
444
  - Lead with the win, not with "Weekly Review" or any ceremony.
201
445
  - Forbidden vocabulary in the user-facing message: "Weekly Review",
202
- "weekly/", "agent-journal", "did-not-fire", "Agent Plan", "observations",
203
- "processed", "summary", "completed the review". These describe agent
204
- mechanics, not user outcomes. The same rule applies in whatever
205
- language the user prefers do not paste an equivalent meta-phrase.
446
+ "weekly/", "agent-journal", "did-not-fire", "Agent Plan",
447
+ "observations", "processed", "summary", "completed the review".
448
+ These describe agent mechanics, not user outcomes. The same rule
449
+ applies in whatever language `<output_language_policy>` resolves
450
+ to — do not paste an equivalent meta-phrase.
451
+ - **Reload tally never enters the notification.** BROWSER_HISTORY_INTEGRATION_PLAN
452
+ §5.F4 ("Explicit non-action") is unambiguous: "No real-time
453
+ intervention. No DM on threshold cross. No autonomous push." The
454
+ `## This Week You Checked` section lives in the weekly file only;
455
+ do not summarise it in the message body, do not paraphrase it, do
456
+ not joke about it. The user pulls it via `!checks` or by opening
457
+ the weekly file directly.
206
458
  - Priority `normal`. Respects quiet hours via the notify skill contract.
207
459
  - Exactly ONE notification via POST /api/notify. Do not split.
208
460
 
209
- #### 4d. Shape example (illustrative — render in the language `<output_language_policy>` resolves to)
210
- Good (something worth saying):
211
- Big win this week: the design doc shipped Thursday.
212
- Still open: the API spec review — Sarah back Monday.
213
- Next week's focus: auth refactor landing before the Q2 deadline.
461
+ #### 4d. Shape examples (illustrative — render in the language `<output_language_policy>` resolves to)
214
462
 
215
- Good (silent pathnothing is sent):
216
- (no POST /api/notify call; one-line note appended to agent/journal.md)
217
-
218
- Bad (this is the failure mode this prompt exists to prevent):
463
+ Good (3 linesthe insight is grounded in the week's data):
464
+ Big win this week: the design doc shipped Thursday.
465
+ Worth noticing — every task you started before 10:00 closed the
466
+ same day; the after-lunch starts mostly slid to tomorrow.
467
+ Good luck with the API review on Saturday.
468
+
469
+ Good (3 lines — the insight is a genuinely relevant academic tip):
470
+ You wrapped the auth refactor before the Q2 deadline — solid week.
471
+ Worth knowing: deep-work researchers find three consecutive focused
472
+ days tend to outperform five scattered ones for shipping work like
473
+ this.
474
+ Have a great weekend.
475
+
476
+ Good (2 lines — nothing earned the insight slot, so it's correctly
477
+ omitted):
478
+ The migration to the new schema landed Wednesday.
479
+ Enjoy the trip to Portland.
480
+
481
+ Good (silent path — quiet week, nothing sent):
482
+ (no POST /api/notify call; one-line note appended to journal/agent.md)
483
+
484
+ Bad (fabricated positivity — the failure mode the strict rule prevents):
485
+ Big win: design doc shipped Thursday.
486
+ You worked 30% harder than last week — keep it up!
487
+ Have a great weekend!
488
+
489
+ Bad (agent mechanics leaking):
219
490
  Weekly Review YYYY-Www complete. Wrote weekly/2026-W14.md with
220
491
  5 highlights, 3 open loops. Metrics: user tasks 7/10, agent plan
221
- rows 24, did-not-fire 2. Observations processed: 18. Next week
222
- priorities updated in roadmap.md.
223
-
224
- The bad example reports the agent's bookkeeping. Everything in it either
225
- belongs in agent/journal.md or was never worth telling the user.
492
+ rows 24, did-not-fire 2. ...
493
+
494
+ Bad (subtle padding — proverb-shaped insight that fails the line-2 bar):
495
+ Solid progress on the auth refactor this week.
496
+ Worth noticing small, consistent efforts often compound into
497
+ real momentum over time.
498
+ Have a good weekend.
499
+
500
+ The first bad example invented "30% harder" — there is no such measurement
501
+ in Phase 1. If you did not derive it from real data, do not write it.
502
+ The second bad example reports the agent's bookkeeping; everything in it
503
+ either belongs in journal/agent.md or was never worth telling the user.
504
+ The third bad example is the most common failure mode the 4b bars
505
+ prevent: a generic line 1 (no artifact, would read in any week) paired
506
+ with a proverb-shaped line 2 (no named research area). Correct output
507
+ for this scenario is a 2-line message with concrete artifact + state —
508
+ e.g. "Auth refactor PR is open and queued for Monday review." — or, if
509
+ even that does not exist, the silence gate in 4a should fire.
226
510
 
227
511
  ### Phase 5: Reading sweep (silent context update)
228
512
 
@@ -244,7 +528,7 @@ Book Candidates list.
244
528
  frontmatter line. If that line is missing (older file schema),
245
529
  treat `N = 0` to force a one-time re-baseline.
246
530
  - If `M - N < 10`, **skip Phase 5** and append one bullet under
247
- agent/journal.md "What worked":
531
+ journal/agent.md "What worked":
248
532
  `reading sweep skipped — only (M-N) new highlights since last refresh`.
249
533
  - Do NOT use the `Sampled: X` line for this check — `X` is the
250
534
  sample size, not a DB count.
@@ -266,5 +550,5 @@ Book Candidates list.
266
550
  **When to abort Phase 5 loudly**: if you detect the `reading-taste.md`
267
551
  file is corrupted, contains non-English sections, or its "Last updated"
268
552
  timestamp is in the future, leave it alone and append one bullet under
269
- agent/journal.md "What slipped on my side" with a one-line description.
553
+ journal/agent.md "What slipped on my side" with a one-line description.
270
554
  Never self-heal corrupted profile files without user awareness.
@@ -31,7 +31,6 @@ the user could not see by glancing at their calendar app.
31
31
  | Trigger | Priority | Detection mechanism |
32
32
  |---|---|---|
33
33
  | (a) reschedule arrived in the past 24 hours | `high` | See **Detection mechanism — trigger (a)** section below the table. |
34
- | (d) travel-time concern | `critical` | `POST /api/travel-time` with the user's last-known location + the event venue. |
35
34
 
36
35
  #### Detection mechanism — trigger (a) calendar reschedule
37
36