@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,20 +3,25 @@
3
3
  ## Task: Evening Review
4
4
 
5
5
  The "Vault policy files" block appended to this prompt includes
6
- `routines/evening.md` — run any `### <label>` entries there alongside the
6
+ `policies/routines/evening.md` — run any `### <label>` entries there alongside the
7
7
  built-in review steps below, using the same journaling conventions.
8
8
  The "Vault review context" block includes `context-index.md` and
9
- `dossiers/evening.md`; consult it before Step 1 and update the
9
+ `knowledge/dossiers/evening.md`; consult it before Step 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:`
15
15
  — writes that drop the frontmatter are rejected with 422.
16
16
 
17
17
  Close out today and prepare tomorrow. Steps 1–3 are internal bookkeeping
18
- (Morning Routine depends on them). Step 4 is the ONLY user-visible output,
19
- and it must be written for the user — not as a report of what you just did.
18
+ (Morning Routine depends on them) and emit no user-facing output by default.
19
+ User-defined entries in `policies/routines/evening.md` run alongside the built-in
20
+ steps and are authoritative: execute them as written, including any that
21
+ call `POST /api/notify` — the built-in steps' silence does not override the
22
+ user's explicit rulebook intent. For ad-hoc deadline or surprise nudges,
23
+ the surfacing event handler that discovered the item — not this routine —
24
+ is the right vehicle.
20
25
 
21
26
  ### Step 0 — Read today's mail outcomes
22
27
 
@@ -39,22 +44,11 @@ GET /api/observations?pending=true&source_prefix=gmail:,outlook_mail:&observed_a
39
44
 
40
45
  Fold meaningful items into the in-memory state you carry into Step 1
41
46
  (Finalize today.md — Agent Log entries when an outbound reply closed a
42
- loop) and Step 4 (Wrap-up an unanswered inbound that surfaced today
43
- might satisfy trigger (b)). Do NOT push back into the mail provider —
44
- this step is read-only; outbound replies belong to the user / morning
45
- routine / DM-reply paths.
47
+ loop). Do NOT push back into the mail provider this step is read-only;
48
+ outbound replies belong to the user / morning routine / DM-reply paths.
46
49
 
47
50
  ### Step 1 — Finalize today.md
48
51
  - Check incomplete ## User Tasks status and mark accordingly.
49
- - Reconcile ## Agent Plan: every row whose HH:MM has already passed should be
50
- either `- [x]` (executed) or `- [x] ... ⚠ failed: <reason>` (attempted).
51
- Any row still `- [ ]` with a past HH:MM is a bug — the scheduled task did
52
- not close its loop. Flip it to `- [x] ... ⚠ did-not-fire` and log a line to
53
- ## Agent Log so the user can see the gap.
54
- - **Do not retroactively execute did-not-fire rows.** The window is
55
- gone — a 10:00 briefing fired at 21:00 is noise, not value. Only
56
- flip the row and log the gap; do not send a stand-alone catch-up
57
- notify here.
58
52
  - Update the ## Handoff section per the context skill:
59
53
  ### Tomorrow — carry-over User Tasks with reason, key context, suggested priorities
60
54
  ### Later — keep existing future items, add new ones discovered today
@@ -62,27 +56,33 @@ routine / DM-reply paths.
62
56
  setup completion, or placeholder cleanup unless the user explicitly asked
63
57
  to track them.
64
58
  - Do **not** carry Agent Plan rows into Handoff — Agent Plan is regenerated
65
- fresh by Morning Routine the next day.
59
+ fresh by Morning Routine the next day. Past-HH:MM `[ ]` rows are flipped
60
+ to `did-not-fire` by Morning Routine reading yesterday.md the next day;
61
+ this routine no longer reconciles Agent Plan row state.
66
62
 
67
- ### Step 2 — Roadmap maintenance (sweep, reconcile, promote)
63
+ ### Step 2 — Roadmap maintenance (promote, fire)
68
64
 
69
65
  Consult the **roadmap** skill for section shapes, entry schema, and the
70
66
  write lock. This step only touches `## Long-term Plans` and
71
67
  `## Agent Action Plan`; `## Annual Goals`, `## Quarterly Focus`, and
72
68
  `## Recurring` are preserved verbatim.
73
69
 
70
+ The mechanical sweeps (Scheduled-status sync, 180d Agent Action Plan
71
+ sweep, Long-term Plans stale/awaiting-reply marking) ran 15 minutes
72
+ ago as the daemon-driven `roadmap_mechanical_maintenance` job — they
73
+ are NOT this routine's job anymore. This step only carries the two
74
+ substeps that genuinely need an LLM in the loop: promote-on-resolution
75
+ and Review-date fire.
76
+
74
77
  **Write-lock handling.** `<roadmap_write_lock_id>` is NOT injected for
75
78
  evening_review, so acquire the lock explicitly before the first PATCH:
76
79
  `POST /api/context/lock/roadmap` → read back `lockId`. On 409 (a
77
80
  refresh is mid-write), back off 30 s and retry up to 3 times; if still
78
- held, skip Step 2 entirely — substeps 2a / 2b will be picked up by the
79
- next `routine.roadmap_refresh` (Phase 2 does `Scheduled:` status
80
- reconciliation and Agent Action Plan pruning). 2c / 2d (Long-term
81
- Plans promotion + stale-mark) are evening-only and will just wait
82
- until the next Evening Review a 24-hour delay is acceptable. Release
83
- with `DELETE /api/context/lock/roadmap` with `{"lockId": "<lockId>"}`
84
- at the end, and on every early-exit path. Every PATCH / PUT must
85
- carry `X-Lock-Id: <lockId>`.
81
+ held, skip Step 2 entirely — 2a / 2b are evening-only and will just
82
+ wait until the next Evening Review (a 24-hour delay is acceptable).
83
+ Release with `DELETE /api/context/lock/roadmap` with
84
+ `{"lockId": "<lockId>"}` at the end, and on every early-exit path.
85
+ Every PATCH / PUT must carry `X-Lock-Id: <lockId>`.
86
86
 
87
87
  **Section-body-rebuild discipline** (applies to every `mode=replace`
88
88
  below). LLM rebuilds silently drop lines far too easily. Before each
@@ -94,24 +94,7 @@ PATCH:
94
94
  - The new body equals `keep-list + new/mutated line(s)`, byte-for-byte
95
95
  for kept lines. Do NOT paraphrase or reformat sibling lines.
96
96
 
97
- 2a. **Reconcile `Scheduled:` entry statuses.** For each `### Scheduled:
98
- <desc> (task #<id>)` entry under `## Agent Action Plan`, compare
99
- its Status line against the latest `/api/schedule` row for that id.
100
- Flip `⏳ pending` → `▶ running` → `✓ completed` / `✗ failed` as
101
- needed. Completed entries persist one extra day for the journal,
102
- then the next refresh removes them. PATCH
103
- `section=agent_action_plan` `mode=replace` so sibling entries
104
- survive — apply the rebuild discipline above.
105
-
106
- 2b. **Sweep `## Agent Action Plan` event entries.** Remove entries
107
- whose header date is more than 180 days in the future, and entries
108
- whose latest `✓`'d Preparation Timeline row is older than 7 days
109
- (past events whose prep is wrapped up). Preserve every entry in
110
- the `[today - 7d, today + 180d]` window even if no prep rows
111
- fired — the next refresh prunes them when the header date rolls
112
- off.
113
-
114
- 2c. **Promote Long-term Plans → Agent Action Plan.** Scan
97
+ 2a. **Promote Long-term Plans Agent Action Plan.** Scan
115
98
  `## Long-term Plans` lines. If an entry has resolved to a concrete
116
99
  date today (user DM confirmed, mail booking landed, calendar event
117
100
  created), move it into `## Agent Action Plan` as an event entry
@@ -125,25 +108,7 @@ PATCH:
125
108
  doubly carefully; dropping an unrelated sibling here is silent user
126
109
  data loss.
127
110
 
128
- 2d. **Stale-mark Long-term Plans (silent, marker-only).** For each
129
- Long-term Plans line, compare the `Source: ... YYYY-MM-DD` date
130
- against today:
131
- - 90 days without date movement → append ` [stale since
132
- YYYY-MM-DD]` (today's date) if the marker is not already
133
- present. Mechanical marker only — do not DM.
134
- - 180 days with `[stale since ...]` still present → append `
135
- [awaiting-reply YYYY-MM-DD]` (today's date). **Do NOT call
136
- `POST /api/notify` from this step.** Evening Review's user-
137
- visible messaging is owned entirely by Step 4 (silence-by-
138
- default contract). Surfacing the awaiting-reply state to the
139
- user is deferred to a follow-up RFC-D.2; for now the marker
140
- persists in roadmap.md for the user to discover via the
141
- dashboard or a future digest.
142
- - `[awaiting-reply YYYY-MM-DD]` older than 7 days with no reply
143
- surfaced in <yesterday> / <today> Handoff → remove the line via
144
- PATCH replace.
145
-
146
- 2e. **Fire due Long-term Plans.** For each Long-term Plans line whose
111
+ 2b. **Fire due Long-term Plans.** For each Long-term Plans line whose
147
112
  `Review:` date is on or before today, ignoring `Review: [noreview]`:
148
113
  1. Resolve the horizon anchor using the roadmap skill's horizon
149
114
  table.
@@ -161,7 +126,7 @@ PATCH:
161
126
  `section=long_term_plans` `mode=replace`.
162
127
  3. Otherwise, bump `Review:` forward by the class review interval:
163
128
  previous Review +30 days by default, or +90 days for `undated`;
164
- increment `ReviewCount:` and log one line to `agent/journal.md`.
129
+ increment `ReviewCount:` and log one line to `journal/agent.md`.
165
130
  4. For `undated` lines reaching `ReviewCount: 3` with no
166
131
  promotion, silently rewrite `Review:` to `[noreview]`. Do NOT
167
132
  DM.
@@ -173,9 +138,9 @@ PATCH:
173
138
 
174
139
  If a roadmap PATCH/PUT returns 400 from the transition guard, re-GET
175
140
  roadmap.md, rebuild from that current body, and retry once while
176
- preserving every existing `✓ completed ...` row byte-for-byte. If
141
+ preserving every existing `completed ...` row byte-for-byte. If
177
142
  the retry still fails, stop Step 2, append the validation error and
178
- affected IDs to `agent/journal.md`, and stay silent.
143
+ affected IDs to `journal/agent.md`, and stay silent.
179
144
 
180
145
  ### Step 3 — Process user/profile.md and user/ per the user-profile skill
181
146
  Read <user> ## Raw Signals and classify each entry into one of four buckets.
@@ -185,23 +150,22 @@ PATCH:
185
150
  whether a reasonable rewrite is imperative ("do X") or declarative
186
151
  ("user does Y"). When ambiguous, default to **character**.
187
152
 
153
+ The routing surface below is the same one the DM handler / sweep
154
+ apply to live input. Raw Signals are already-detected facts, so the
155
+ "scan / persist same turn" framing is moot here, but the
156
+ imperative-vs-declarative bucket assignment and the `profile.md` vs
157
+ `user/<topic>.md` vs Learned Context split are identical:
158
+
159
+ {include:_partials/capture-user-info.md}
160
+
188
161
  a₁. **Tone-class signals (imperative rewrite)** — "replies short when
189
162
  tired", "prefers English for technical terms", "dislikes long
190
163
  paragraphs", "often asks for bullet points" → graduate to the
191
- `character` runtime-config field via `PATCH /api/config/character`.
164
+ `character` runtime-config field per the **user-profile** skill
165
+ §"Tone / character preferences" (read-before-write, cap-aware).
192
166
  These are agent directives disguised as observations — writing them
193
167
  to `Learned Context` would repeat the profile-vs-character
194
- conflation the split rule is designed to prevent. Read-before-write:
195
- ```bash
196
- curl -s http://localhost:8321/api/config/character | jq -r .character
197
- curl -s -X PATCH http://localhost:8321/api/config/character \
198
- -H 'Content-Type: application/json' \
199
- -d '{"character": "<merged value>"}'
200
- ```
201
- Observe the 1000-char cap — if the merged value would exceed the
202
- cap, trim the oldest / least specific directives rather than
203
- failing the review silently. The updated `character` is injected
204
- into every session's CLAUDE.md / AGENTS.md / GEMINI.md uniformly.
168
+ conflation the split rule is designed to prevent.
205
169
  a₂. **Attribute-class signals (declarative rewrite)** — "seems to
206
170
  work late", "tends to skim long messages", "is not a morning
207
171
  person", "usually catches up on weekends" → integrate into
@@ -215,7 +179,7 @@ PATCH:
215
179
  referenced, a lifestyle habit stated, a long-term goal declared, a
216
180
  specific framework with years of experience — → graduate into the
217
181
  matching user/*.md file via PATCH. The routing table lives in
218
- the user-profile skill "user/profile.md vs user/" section; the curl
182
+ the user-profile skill "identity/profile.md vs user/" section; the curl
219
183
  recipe for read-before-write is under "How to navigate user/".
220
184
  Always read the target file first, check for duplicates, then PATCH
221
185
  (prefer `mode: "append"` for new bullets — it preserves siblings).
@@ -240,7 +204,7 @@ PATCH:
240
204
  mode to remove only those entries, preserving any signals that
241
205
  SignalDetector appended after your read:
242
206
  ```bash
243
- curl -s -X PATCH http://localhost:8321/api/context/user/profile \
207
+ curl -s -X PATCH http://localhost:8321/api/context/identity/profile \
244
208
  -H 'Content-Type: application/json' \
245
209
  -d '{"section": "raw_signals", "mode": "clear_before", "cutoff": "<latest_processed_timestamp>"}'
246
210
  ```
@@ -260,91 +224,3 @@ PATCH:
260
224
  Learned Context entries out to the matching user/*.md file and
261
225
  remove them from user/profile.md so the primary profile stays compact.
262
226
 
263
- ### Step 4 — User-facing wrap-up (the only externally visible output)
264
-
265
- The user lived through today. They do not need a bookkeeping recap of
266
- what you wrote to disk in Steps 1–3 — that belongs in ## Agent Log only.
267
- Step 4 is the single notification (if any) that the user actually sees,
268
- and it must be written FOR the user, not as an agent status report.
269
-
270
- #### 4a. Silence is the default — notify only on a positive trigger
271
-
272
- The evening is silent by default.
273
-
274
- **Awareness gate.** See notify skill § Universal user-facing message
275
- discipline § Awareness gate.
276
-
277
- Only after the awareness gate passes, send a notification ONLY if at
278
- least one of the following positive triggers holds:
279
- (a) A ## User Tasks row ended the day incomplete AND is NOT safely
280
- carried to ## Handoff Tomorrow with a clear reason — something is
281
- dangling, not merely deferred.
282
- (b) A hard deadline within the next 48h that the agent surfaced
283
- *today* from new input (mail, DM, observation) and the user has
284
- not yet acted on it. **Self-set deadlines, course assignments,
285
- class times, and items already on the user's calendar do NOT
286
- qualify** — they failed the awareness gate.
287
- (c) A `did-not-fire` / `failed` Agent Plan row affected the user's
288
- real plans (a meeting pre-brief that was supposed to fire, not a
289
- routine nudge the user already handled on their own).
290
- (d) A new ## Handoff Tomorrow item the agent *discovered today* that
291
- the user has not seen yet and would be surprised by in the
292
- morning. Items the user themselves added or already know about
293
- do NOT qualify.
294
- (e) Today carried unusual weight — a milestone shipped, a hard day
295
- survived, an illness — and a brief human acknowledgement is
296
- warranted.
297
-
298
- If NONE of (a)–(e) holds after the awareness gate, do not send
299
- anything. Write one line to ## Agent Log (e.g. `- HH:MM Evening Review
300
- completed (silent — nothing actionable)`) and stop. Do NOT send an
301
- empty or filler notification, and do NOT invent a reason to break the
302
- silence. **The vast majority of days should land in the silent path** —
303
- this is the routine working as intended, not a skipped task.
304
-
305
- **Anti-example — do NOT send messages like this.** This is the exact
306
- shape of message the user has flagged as unwanted noise; every line
307
- fails either the awareness gate or the no-ceremony rule:
308
-
309
- ```
310
- Evening check-in — [408019] Week 3 deadline tonight at 11:59pm PT:
311
- Procurement Plan, RACI Chart, Resource Plan. Still about 6 hours to go.
312
- Tomorrow: Agile class 6–9pm @ UCLA Extension Gayley.
313
- ```
314
-
315
- Why this is bad: (1) "Evening check-in —" is forbidden ceremony.
316
- (2) The course assignment deadline is the user's own syllabus —
317
- they're already aware. (3) Tomorrow's class is on the user's own
318
- calendar — also already aware. (4) "Still about 6 hours to go" is
319
- filler timing commentary. The correct action for this content is to
320
- write to ## Agent Log and stay silent.
321
-
322
- #### 4b. Late-run handling (quiet hours)
323
-
324
- If the current time is inside quiet hours (default 22:00–08:00, configurable) when the routine
325
- actually executes — e.g., a daemon restart delayed the cron past
326
- midnight — go silent regardless of (a)–(e). The Handoff section has
327
- already been written in Step 1, and the next Morning Routine will
328
- surface anything the user needs to know. Do NOT schedule a deferred
329
- wrap-up for quiet_hours_end; that would fire right next to the Morning
330
- Routine briefing and produce a duplicate.
331
-
332
- #### 4c. Content and format — delegated to the notify skill
333
-
334
- When one of (a)–(e) triggers a notification, follow the **Evening
335
- wrap-up contract** in the notify skill. That contract owns:
336
- - the content structure (lead with the agent-discovered item that
337
- cleared the awareness gate),
338
- - the 4-line cap and markdown rules,
339
- - the no-ceremony / no-filler-timing-commentary rule,
340
- - the no-internal-mechanism-names vocabulary rule,
341
- - output language per `<output_language_policy>` and tone from the
342
- Character block (always present when set),
343
- - the good / bad worked examples (including the exact anti-pattern
344
- the user has flagged).
345
-
346
- This prompt owns only the go/no-go decision above. Send exactly ONE
347
- notification via POST /api/notify with priority `high` — the
348
- awareness gate plus triggers (a)–(e) raise the bar high enough that
349
- anything reaching this point genuinely needs the user's attention
350
- tonight. Do not split the wrap-up across multiple messages.
@@ -8,11 +8,16 @@ sub-session is scoped to a single integration** — every `<fetch>` row
8
8
  in the `<acquisition-plan>` block below shares the same `integration`
9
9
  attribute, and the sole partial inlined below owns the only
10
10
  `(integration, mode)` cell you can hit. Your job is to materialise
11
- those `<fetch>` rows into fresh `/api/observations` rows via
12
- `POST /api/observations/batch` one batched array per acquired window,
13
- not one curl per item. The coordinator merges your single JSON-line
14
- output with the other integrations' sub-sessions; you do not write to
15
- context files, do not synthesize, and do not notify the owner.
11
+ those `<fetch>` rows into fresh `/api/observations` rows via the
12
+ `mcp__aitne-observations__submit_observations` MCP tool (preferred
13
+ structured-JSON transport that bypasses the SDK bash preflight, so mail
14
+ subjects/snippets carrying Unicode whitespace land cleanly) one batched
15
+ array per acquired window, not one call per item. If the MCP tool is not
16
+ in your allowed tools (non-Claude session backend), fall back to
17
+ `POST /api/observations/batch` with the same envelope. The coordinator
18
+ merges your single JSON-line output with the other integrations'
19
+ sub-sessions; you do not write to context files, do not synthesize, and
20
+ do not notify the owner.
16
21
 
17
22
  Read the `<acquisition-plan>` block carefully — every row carries the
18
23
  exact `(integration, mode, window, account?, query)` tuple the daemon
@@ -55,11 +60,11 @@ error), emit exactly one JSON line on stdout with the shape:
55
60
  ```
56
61
 
57
62
  - `fetched` — total items returned by upstream APIs across every row.
58
- - `posted` — sum of the batch endpoint's envelope-level `posted`
59
- counter across every `POST /api/observations/batch` call you make
60
- (i.e. `results[*].status ∈ {"created","modified"}`).
61
- - `duplicates` — sum of the batch endpoint's envelope-level `duplicates`
62
- counter (i.e. `results[*].status == "duplicate"`).
63
+ - `posted` — sum of the submit envelope's `posted` counter across
64
+ every `submit_observations` (or `POST /api/observations/batch`) call
65
+ you make (i.e. `results[*].status ∈ {"created","modified"}`).
66
+ - `duplicates` — sum of the submit envelope's `duplicates` counter
67
+ (i.e. `results[*].status == "duplicate"`).
63
68
  - `errors` — list of `{type, ...}` records. Common types:
64
69
  - `no-surface` — the row points at an in-session connector that
65
70
  isn't bound on this backend.
@@ -67,11 +72,11 @@ error), emit exactly one JSON line on stdout with the shape:
67
72
  filter (defensive).
68
73
  - `fetch-failed` — upstream API returned a non-2xx; include
69
74
  `{type, integration, account?, status, message}`.
70
- - `flip-locked` — `POST /api/observations/batch` returned
75
+ - `flip-locked` — the submit envelope returned
71
76
  `results[*].status="flip_locked"` for an integration mid-flip.
72
77
  Include `{type, integration, account?}`. Do NOT retry inline —
73
78
  the next routine tick reaps it.
74
- - `validation-error` — `POST /api/observations/batch` returned
79
+ - `validation-error` — the submit envelope returned
75
80
  `results[*].status="validation_error"` for a malformed item.
76
81
  Include `{type, integration, ref, detail}` (copy `detail` from
77
82
  `results[*].error`).
@@ -103,6 +108,6 @@ of the plan produced.
103
108
  loop over items in a shell `for`. Do NOT chain multiple curl
104
109
  invocations. Those shapes are blocked by the daemon's Bash hooks
105
110
  (one curl per Bash call, heredoc bodies are stripped from URL
106
- validation). One window → one curl → one JSON body whose
111
+ validation). One window → one submit → one JSON body whose
107
112
  `observations[]` array carries every fetched item (up to 200; split
108
- larger windows into multiple POSTs).
113
+ larger windows into multiple `submit_observations` / POST calls).
@@ -2,11 +2,18 @@
2
2
 
3
3
  ## Hourly Observation Review
4
4
 
5
+ This task-flow is the **daemon-internal** hourly cron — a built-in
6
+ observation review the dispatcher fires every hour. It is NOT the
7
+ user-facing recurring path. An operator who wants a custom recurring
8
+ task creates a recurring **Agent** (`POST /api/agents`, e.g. an hourly
9
+ cron `0 * * * *`); those fire `scheduled.task` / `scheduled.dm` events
10
+ instead.
11
+
5
12
  The "Vault policy files" block appended to this prompt includes
6
- `routines/hourly.md` — your canonical check list for this cadence.
13
+ `policies/routines/hourly.md` — your canonical check list for this cadence.
7
14
  The "Vault review context" block includes `context-index.md` and
8
- `dossiers/hourly.md`; consult it before Step 1 and update the dossier's
9
- Open items / Last run before finishing. Writes to `dossiers/<flow>.md`
15
+ `knowledge/dossiers/hourly.md`; consult it before Step 1 and update the dossier's
16
+ Open items / Last run before finishing. Writes to `knowledge/dossiers/<flow>.md`
10
17
  MUST preserve the existing YAML frontmatter block (`---\ntype: dossier\nowner: agent\nupdated: <date>\n---`); prefer `PATCH` with a
11
18
  section target to mutate a single block, and when doing a `PUT` full
12
19
  rewrite keep the frontmatter and only refresh `updated:` — writes that
@@ -19,7 +26,7 @@ routing rules.
19
26
 
20
27
  Output language: follow `<output_language_policy>` (Policy B for any
21
28
  context-MD write-up; Policy C for the optional `POST /api/notify` DM).
22
- Agent log appends to `agent/journal.md` stay English (Policy A).
29
+ Agent log appends to `journal/agent.md` stay English (Policy A).
23
30
 
24
31
  Use the observations skill to fetch pending items. The pre-pass
25
32
  fetcher session (`routine.fetch_window`) ran ahead of you and posted
@@ -69,11 +76,9 @@ observation warrants project-state context (e.g. references a project,
69
76
  milestone, or deliverable — not merely a file edit in a watched repo).
70
77
 
71
78
  ### Stage gate decision (cost-reduction-structural §B)
72
- When `<gate_decision>` is present, this run was escalated through the
73
- three-stage funnel (Stage 0 deterministic gate or Stage 2 lite-tier
74
- triage; Stage 3 is the current session). The block tells you *why*
75
- you were spawned — pull the `reason` and `signals_snapshot` into
76
- your prioritisation. Examples:
79
+ The `<gate_decision>` block is always present every Stage 3 enqueue
80
+ emits it. The block tells you *why* you were spawned — pull the
81
+ `reason` and `signals_snapshot` into your prioritisation. Examples:
77
82
 
78
83
  - `reason: vip_mail_unread` → start with the mail observation, do not
79
84
  scan obsidian noise first.
@@ -84,9 +89,11 @@ your prioritisation. Examples:
84
89
  own dispatcher.
85
90
  - `reason: heartbeat_due` → low-signal heartbeat. Stay maximally
86
91
  silent unless something actually warrants action.
87
-
88
- If `<gate_decision>` is absent, this is a legacy direct invocation
89
- (Phase-9 path before the gate was wired) — proceed as before.
92
+ - `reason: cautious_escalate_prepass_failure` → the pre-pass fetcher
93
+ failed for at least one non-direct integration this tick. The
94
+ `<fetch_report status="failed">` block in your prompt tells you
95
+ which integration is lossy; treat its observations as potentially
96
+ stale and lean on whatever rows the previous tick left.
90
97
 
91
98
  ### Pre-summarized observations (cost-reduction-structural §A)
92
99
  Every observation arrives with `summary_text` (≤120 chars) and
@@ -127,7 +134,7 @@ This routine reads external state for context — it does not push back. While r
127
134
  - Create / update / delete calendar events.
128
135
  - Open / merge / comment on GitHub PRs or issues.
129
136
 
130
- External-source signals (`mail:*`, `notion:*`, `calendar:*`, `git:*`) reach you through `<observations>`. Consume them, route to `today.md` / `projects/*.md` / the `roadmap_candidate` queue per the Decision Framework below, but do **not** act back on the source system. Outbound writes against external services belong in the morning routine, evening review, or DM-reply paths — `routine.hourly_check` is a silent bookkeeping pass.
137
+ External-source signals (`mail:*`, `notion:*`, `calendar:*`, `git:*`) reach you through `<observations>`. Consume them, route to `state/today.md` / `projects/*.md` / the `roadmap_candidate` queue per the Decision Framework below, but do **not** act back on the source system. Outbound writes against external services belong in the morning routine, evening review, or DM-reply paths — `routine.hourly_check` is a silent bookkeeping pass.
131
138
 
132
139
  This rule applies regardless of integration mode (direct, same-backend delegated, cross-backend delegated). It is owned by the routine, so a session whose `notion` / `mail` / `external-services` skill body was dropped under same-backend delegation (because the connector covers the surface) still inherits the constraint.
133
140
 
@@ -182,6 +189,11 @@ This rule applies regardless of integration mode (direct, same-backend delegated
182
189
  6. Skip noise: journal-only edits, trivial formatting, auto-generated churn,
183
190
  already-processed agent writes, deletion of auto-generated artifacts.
184
191
  7. Mark processed observations consumed via POST /api/observations/consume.
192
+ Shape: `{"ids":[<int>...],"correlationId":"<verbatim from <event_correlation_id>>"}`.
193
+ Both fields are required and camelCase — `correlation_id` snake_case is
194
+ rejected. `ids` must be integers (not strings). Copy `correlationId`
195
+ verbatim from the `<event_correlation_id>…</event_correlation_id>` tag
196
+ in this prompt; do not paste the angle-bracket placeholder.
185
197
  8. Urgency gate for POST /api/notify — the default is SILENCE. At most
186
198
  ONE call per run, and only after the dedup pre-check passes AND one
187
199
  of (a)(b)(c) holds with its concrete threshold:
@@ -192,7 +204,7 @@ This rule applies regardless of integration mode (direct, same-backend delegated
192
204
  last 4 hours.
193
205
  - The truncation marker `[...N earlier entries omitted ...]` appears
194
206
  in `<today>` and you cannot rule out a same-day prior notification
195
- from the truncated view. In that case `GET /api/context/today`
207
+ from the truncated view. In that case `GET /api/context/state/today`
196
208
  once for the full log before deciding.
197
209
  - A matching pending `POST /api/schedule/dm` or Agent Plan row is
198
210
  already going to fire for this item within the next 2 hours
@@ -202,7 +214,7 @@ This rule applies regardless of integration mode (direct, same-backend delegated
202
214
  (a) Hard deadline ≤ 2 hours away that the agent surfaced **this
203
215
  hour** from new input (mail, DM, observation) AND the user has
204
216
  not yet acted on it. **Self-set deadlines, course assignments,
205
- class times, and items already in `today.md` ## User Tasks do
217
+ class times, and items already in `state/today.md` ## User Tasks do
206
218
  NOT qualify** — they fail the awareness gate (see notify skill
207
219
  § Universal user-facing message discipline § Awareness gate).
208
220
  A 6-hour deadline is NOT urgent regardless.
@@ -71,7 +71,7 @@ Stay log-only when **all** these hold:
71
71
 
72
72
  Default to `escalate`. Stage 3 has the full skills, MCP surface, and
73
73
  context to reach the right answer; a wrongly-escalated tick costs ~$0.01
74
- in Sonnet tokens, while a wrongly-suppressed tick costs the user a
74
+ in medium-tier tokens, while a wrongly-suppressed tick costs the user a
75
75
  missed reminder. The shadow-mode validation phase explicitly rewards
76
76
  high recall over high precision: ship the bias toward escalate, the
77
77
  operator-tunable thresholds will trim it later.