@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
@@ -1,166 +0,0 @@
1
- ---
2
- name: management-task-stop
3
- description: Stop (hard-delete) an existing managed task (`mt_<n>`) from a DM — "stop the daily Zoom check", "cancel mt_42". Owns DELETE on §B rows. SKIP for cadence tweaks (modify), pause (no soft-pause), or one-off skip.
4
- when_to_use: User wants to end a recurring agent commitment. SKIP for cadence / intent / output-path tweaks (`management-task-modify`), pause-then-resume (no soft-pause exists; user must re-register), or removing a one-off scheduled task (`schedule` skill DELETE).
5
- allowed-tools:
6
- - Bash(curl *)
7
- - Bash(jq *)
8
- - Read
9
- ---
10
-
11
- # Stop a Managed Task
12
-
13
- Hard-deletes a managed-task row. The `recurring_schedules` row
14
- cascade-deletes via FK and any pending `agent_schedule` rows for the
15
- old cron are cancelled. History is preserved entirely in
16
- `agent_actions` (`action_type='management_task.deleted'`) and
17
- `md_file_snapshots` — there is no soft-stop placeholder in the
18
- file (ADR §8.5).
19
-
20
- ## When to use
21
-
22
- The user clearly asks to **end** a recurring commitment:
23
-
24
- - "Stop the daily Zoom check"
25
- - "Cancel `mt_42`"
26
- - "Remove the gmail invoice triage — I'm not reading those anymore"
27
- - "I don't need the Drive receipts pull anymore"
28
-
29
- ## When NOT to use
30
-
31
- | Shape | Use instead |
32
- |---|---|
33
- | User wants to keep it running but tweak it | `management-task-modify` |
34
- | User wants to pause for a few days then resume | No soft-pause exists. Stop now; user re-registers when they want it back. Spell this out in the confirmation. |
35
- | User wants to skip exactly one upcoming run | DELETE the pending `/api/schedule/:id` row (the row in `agent_schedule`); the next slot fires normally. Use the `schedule` skill. |
36
- | User wants to drop a one-off `/api/schedule` reminder | `schedule` skill DELETE |
37
- | User wants to clear `_activity/<source>.md` | The reconciler regenerates it within 90 days; nothing to delete here |
38
-
39
- ## Algorithm (mirror of design 21 §10.3)
40
-
41
- ### Step 1 — Locate the row
42
-
43
- Same lookup as `management-task-modify`. Either the user named the id
44
- directly, or you fuzzy-match by `(app, cadence, intent)`.
45
-
46
- ```bash
47
- curl -s "http://localhost:8321/api/managed-tasks/mt_42" | jq .item
48
- # or:
49
- curl -s "http://localhost:8321/api/managed-tasks" | jq '.items[] | select(.app_normalized == "zoom")'
50
- ```
51
-
52
- GET-by-id wraps the row in `{item:<row>}`; the list returns
53
- `{items:[…], count:N}`.
54
-
55
- If multiple rows could match, list them and ask which to stop. Stop
56
- until the user picks. **Never stop more than one row in a single
57
- turn.** A bulk stop ("stop all gmail tasks") requires explicit
58
- confirmation per row.
59
-
60
- If no row matches, DM:
61
-
62
- > No managed task for `<app>` is registered.
63
-
64
- ### Step 2 — Confirm with the user (Notify tier — destructive)
65
-
66
- DELETE on a managed task is **Notify tier** (§13.1) AND removes a
67
- recurring commitment that the user themselves set up. Both safety
68
- invariants ("destructive ops require user confirmation" from
69
- CLAUDE.md, plus the Notify-tier policy) demand a real DM confirmation.
70
- Output language: follow `<output_language_policy>`. Never auto-stop.
71
-
72
- > Stop `mt_42` Zoom check (daily 10:00 JST · last run ok 3 new)? It
73
- > won't auto-resume.
74
-
75
- If the user declines, stop the flow. If they amend ("actually just
76
- make it weekly"), route to `management-task-modify` instead — do not
77
- stop and re-register on their behalf.
78
-
79
- The "last run" line in the confirmation matters: a row that has been
80
- silently failing (`consecutive_failures ≥ 3`) is exactly the kind the
81
- user is most likely stopping by mistake (they may not realize the
82
- failures alone are the problem). Surface `last_result` so they can
83
- make an informed call.
84
-
85
- ### Step 3 — DELETE /api/managed-tasks/:id
86
-
87
- ```bash
88
- curl -sS -X DELETE http://localhost:8321/api/managed-tasks/mt_42
89
- ```
90
-
91
- The server-side transaction (atomic):
92
-
93
- a. snapshots the row's full state into `agent_actions.detail`,
94
- b. DELETEs `managed_tasks` (cascades to `recurring_schedules` via FK),
95
- c. cancels pending `agent_schedule` rows for the old cron,
96
- d. re-renders `rules/management.md` from DB (locked + snapshotted into
97
- `md_file_snapshots`),
98
- e. INSERTs `agent_actions` (`action_type='management_task.deleted'`,
99
- `detail={mt_id, original_row, deleted_at, by_user_message}`).
100
-
101
- The pre-delete file snapshot in `md_file_snapshots` plus the
102
- `detail.original_row` blob in `agent_actions` together let the user
103
- or the activity-view reconciler reconstruct the row at any later
104
- date — there is no further "soft-stop" archive needed.
105
-
106
- ### Step 4 — Confirm to user
107
-
108
- One DM:
109
-
110
- > Stopped `mt_42` Zoom check. The row is gone from the registry; ask
111
- > me to register a new one any time.
112
-
113
- Persona / language rules from `notify` apply. Don't list the internal
114
- mechanics ("snapshotted, cascade-deleted") — the audit log is for
115
- the agent, not the user.
116
-
117
- The `_activity/zoom.md` file's "Recently changed (90d)" section
118
- auto-updates within ~10 s as the activity-view reconciler picks up
119
- the new `agent_actions` row. You do NOT touch that file.
120
-
121
- ## Error envelope
122
-
123
- | HTTP | `error` | What to do |
124
- |---|---|---|
125
- | 400 | `invalid_id` | The `:id` segment didn't match `^mt_[1-9]\d*$`; ask the user to repeat |
126
- | 404 | `not_found` | DM "No managed task with that id"; if you used a fuzzy match, re-list candidates |
127
- | 5xx | `internal_error` | Surface `body.message` if present; advise `aitne logs` |
128
-
129
- The daemon's DELETE is unconditional — there is no `running_now` /
130
- `?force=true` in-flight guard today. If the cascade collides with a
131
- fire that is mid-execution the dispatcher's retry / orphan-detection
132
- path picks it up; do not try to "wait for it to finish" in the skill.
133
-
134
- The pre-delete row snapshot in `agent_actions` (`detail.original_row`)
135
- together with the file snapshot in `md_file_snapshots` is the
136
- recovery surface — surface it in audit/debug contexts only, never in
137
- the user-facing DM.
138
-
139
- ## What this skill does NOT do
140
-
141
- - Does NOT pause / disable. There is no soft-stop; the row is gone.
142
- If the user wants a temporary hiatus, tell them they'll need to
143
- re-register when ready.
144
- - Does NOT delete entity files (`<domain>/<type-plural>/<slug>.md`)
145
- produced by past runs. Those stay; the user's notes / receipts are
146
- not the agent's to discard.
147
- - Does NOT regenerate `_activity/<source>.md`. The reconciler does.
148
- - Does NOT manipulate `recurring_schedules` directly. DELETE
149
- `/api/managed-tasks/:id` is the chokepoint; cascade is automatic.
150
- - Does NOT touch §A (SoT bindings) or §C (Active Policies).
151
- - Does NOT PUT `rules/management.md` directly. The daemon owns the
152
- file write.
153
- - Does NOT bulk-stop without per-row confirmation. "Stop all gmail
154
- tasks" is a series of DM round-trips, one per row.
155
-
156
- ## API summary
157
-
158
- | Verb + path | Used in |
159
- |---|---|
160
- | `GET /api/managed-tasks` / `/api/managed-tasks/:id` | Step 1 (lookup) |
161
- | `DELETE /api/managed-tasks/:id` | Step 3 (Notify-tier; destructive) |
162
- | `POST /api/notify` | Step 4 (user-facing confirmation) |
163
-
164
- The DELETE writes one `agent_actions` row, snapshots the file, and
165
- cascades the schedule — do NOT call any separate audit / cleanup
166
- endpoint.
@@ -1,134 +0,0 @@
1
- ---
2
- name: receipts
3
- description: Load when the user asks about receipts/invoices, tax-prep needs an annual list, or an unsaved receipt should be filed.
4
- when_to_use: Downloads Gmail-observer-flagged attachments to the user's external Obsidian vault, separate from the agent's primary management store.
5
- allowed-tools:
6
- - Bash(curl *)
7
- - Read
8
- ---
9
-
10
- # Receipt & Document Manager
11
-
12
- The daemon's Gmail observer scans travel-booking emails for PDF/image
13
- attachments and can retain previously detected generic documents.
14
- Attachment metadata is stored in the `receipts` SQLite table. Actual files
15
- are downloaded on demand and can be saved to the user's **external**
16
- Obsidian vault (separate from the agent's primary management store).
17
-
18
- ## When to Use
19
-
20
- - **User asks about receipts**: list detected receipts, check save status.
21
- - **Tax preparation season**: generate annual receipt list, save unsaved receipts.
22
- - **Monthly/yearly review**: report on receipt collection completeness.
23
-
24
- ## Workflow
25
-
26
- 1. Fetch receipt list from `/api/receipts`.
27
- 2. To save a receipt to the external Obsidian vault, download via
28
- `/api/receipts/:id/download` then save to the vault via
29
- `POST /api/obsidian/notes` and update the receipt record with the
30
- vault-relative path via `PATCH /api/receipts/:id`. (`obsidianPath` is
31
- a path inside the external vault, not the primary management store.)
32
- 3. For tax preparation, filter by date range and category.
33
-
34
- ---
35
-
36
- ## API Reference
37
-
38
- Base URL: `http://localhost:8321`
39
-
40
- ### GET /api/receipts
41
-
42
- List detected receipt attachments.
43
-
44
- ```bash
45
- # All receipts
46
- curl -s "http://localhost:8321/api/receipts?limit=50"
47
-
48
- # Unsaved receipts only
49
- curl -s "http://localhost:8321/api/receipts?saved=false"
50
-
51
- # Filter by category
52
- curl -s "http://localhost:8321/api/receipts?category=document"
53
- ```
54
-
55
- | Param | Type | Default | Description |
56
- |-------|------|---------|-------------|
57
- | `category` | string | — | document, travel |
58
- | `saved` | boolean | — | true = saved to Obsidian, false = not yet saved |
59
- | `limit` | number | 50 | Max results (1–200) |
60
-
61
- Response:
62
- ```json
63
- {
64
- "receipts": [
65
- {
66
- "id": 1,
67
- "gmailMessageId": "18f...",
68
- "attachmentId": "ANGj...",
69
- "filename": "receipt.pdf",
70
- "mimeType": "application/pdf",
71
- "sizeBytes": 45000,
72
- "category": "document",
73
- "obsidianPath": null,
74
- "savedAt": null,
75
- "createdAt": "2026-04-12T10:00:00Z"
76
- }
77
- ],
78
- "total": 1
79
- }
80
- ```
81
-
82
- ### GET /api/receipts/summary
83
-
84
- Receipt statistics.
85
-
86
- ```bash
87
- curl -s "http://localhost:8321/api/receipts/summary"
88
- ```
89
-
90
- Response:
91
- ```json
92
- {
93
- "total": 25,
94
- "saved": 10,
95
- "unsaved": 15,
96
- "byCategory": [
97
- { "category": "document", "count": 23 },
98
- { "category": "travel", "count": 2 }
99
- ]
100
- }
101
- ```
102
-
103
- ### POST /api/receipts/:id/download
104
-
105
- Download the actual attachment file from Gmail.
106
-
107
- ```bash
108
- curl -s -X POST "http://localhost:8321/api/receipts/1/download" -o receipt.pdf
109
- ```
110
-
111
- ### PATCH /api/receipts/:id
112
-
113
- Update receipt metadata (change category or mark as saved).
114
-
115
- ```bash
116
- # Mark as saved to Obsidian
117
- curl -s -X PATCH "http://localhost:8321/api/receipts/1" \
118
- -H "Content-Type: application/json" \
119
- -d '{"obsidianPath": "receipts/2026/04/amazon-receipt.pdf"}'
120
-
121
- # Reclassify a receipt
122
- curl -s -X PATCH "http://localhost:8321/api/receipts/1" \
123
- -H "Content-Type: application/json" \
124
- -d '{"category": "travel"}'
125
- ```
126
-
127
- ---
128
-
129
- ## External Obsidian Vault Save Convention
130
-
131
- Save receipts to: `receipts/YYYY/MM/<merchant>-<date>.<ext>` inside the
132
- external Obsidian vault.
133
-
134
- Example: `receipts/2026/04/amazon-2026-04-12.pdf`
@@ -1,132 +0,0 @@
1
- ---
2
- name: travel
3
- description: Load when the user asks about an upcoming trip or reservation, morning routines need to surface travel within the next 7 days, or reviews need a travel overview — flight, hotel, restaurant, train, and bus bookings detected by the Gmail observer.
4
- allowed-tools:
5
- - Bash(curl *)
6
- - Read
7
- ---
8
-
9
- # Travel & Booking Tracker
10
-
11
- The daemon's Gmail observer detects booking confirmation emails from airlines,
12
- hotels, OTAs, restaurant reservation platforms, and rail services. Data is
13
- stored in the `travel_bookings` SQLite table.
14
-
15
- ## When to Use
16
-
17
- - **Morning routine**: include upcoming travel/bookings in today.md.
18
- - **Evening review**: report newly detected bookings.
19
- - **User asks about trips/reservations**: query bookings and summarize.
20
- - **Pre-trip reminders**: surface upcoming travel day before departure.
21
-
22
- ## Workflow
23
-
24
- 1. Fetch upcoming bookings from `/api/travel-bookings/upcoming`.
25
- 2. For morning routine, highlight bookings within the next 7 days.
26
- 3. For evening review, check for newly detected bookings (today's createdAt).
27
-
28
- ---
29
-
30
- ## API Reference
31
-
32
- Base URL: `http://localhost:8321`
33
-
34
- ### GET /api/travel-bookings
35
-
36
- List travel bookings with optional filters.
37
-
38
- ```bash
39
- # All bookings
40
- curl -s "http://localhost:8321/api/travel-bookings?limit=20"
41
-
42
- # Filter by type
43
- curl -s "http://localhost:8321/api/travel-bookings?type=flight"
44
-
45
- # Upcoming only
46
- curl -s "http://localhost:8321/api/travel-bookings?status=upcoming"
47
-
48
- # Date range
49
- curl -s "http://localhost:8321/api/travel-bookings?from=2026-04-01&to=2026-05-01"
50
- ```
51
-
52
- | Param | Type | Default | Description |
53
- |-------|------|---------|-------------|
54
- | `type` | string | — | flight, hotel, restaurant, train, bus, other |
55
- | `status` | string | all | upcoming, completed, cancelled, all |
56
- | `from` | ISO date | — | Bookings with start_date on or after |
57
- | `to` | ISO date | — | Bookings with start_date before |
58
- | `limit` | number | 50 | Max results (1–200) |
59
-
60
- Response:
61
- ```json
62
- {
63
- "bookings": [
64
- {
65
- "id": 1,
66
- "type": "flight",
67
- "provider": "United",
68
- "destination": null,
69
- "startDate": "2026-05-15T10:30:00Z",
70
- "endDate": null,
71
- "confirmationNumber": "ABC123",
72
- "amount": 350,
73
- "currency": "USD",
74
- "status": "upcoming",
75
- "gmailMessageId": "18f...",
76
- "createdAt": "2026-04-12T10:00:00Z"
77
- }
78
- ],
79
- "total": 1
80
- }
81
- ```
82
-
83
- ### GET /api/travel-bookings/upcoming
84
-
85
- Convenience endpoint for upcoming bookings sorted by start date.
86
-
87
- ```bash
88
- curl -s "http://localhost:8321/api/travel-bookings/upcoming?limit=10"
89
- ```
90
-
91
- ### PATCH /api/travel-bookings/:id
92
-
93
- Update booking status or destination.
94
-
95
- ```bash
96
- curl -s -X PATCH "http://localhost:8321/api/travel-bookings/1" \
97
- -H "Content-Type: application/json" \
98
- -d '{"status": "completed"}'
99
- ```
100
-
101
- ---
102
-
103
- ## Formatting Guide
104
-
105
- ### Morning routine — today.md
106
-
107
- ```
108
- ## Travel & Reservations
109
- Upcoming flight: United to SFO (May 15) — confirmation ABC123
110
- Hotel: Marriott SF (May 15-17) — confirmation XYZ789
111
- Restaurant: OpenTable reservation tonight 19:00
112
- ```
113
-
114
- Omit section if no upcoming bookings within 7 days.
115
-
116
- ### Evening review
117
-
118
- ```
119
- ## New Bookings Detected
120
- - United flight: May 15, confirmation ABC123, $350
121
- ```
122
-
123
- ### Booking type display names
124
-
125
- | type value | Display name |
126
- |------------|-------------|
127
- | flight | Flight |
128
- | hotel | Hotel |
129
- | restaurant | Restaurant |
130
- | train | Train |
131
- | bus | Bus |
132
- | other | Reservation |
@@ -1,158 +0,0 @@
1
- ---
2
- name: travel-time
3
- description: Load when a calendar event needs a departure time, the user asks about commute / transit duration, or a reminder includes "leave by HH:MM".
4
- when_to_use: Backed by Google Maps Directions — requires `googleMapsApiKey` in the daemon secret store; falls back gracefully when missing.
5
- allowed-tools:
6
- - Bash(curl *)
7
- - Read
8
- ---
9
-
10
- # Travel Time & Commute Optimizer
11
-
12
- Uses the Google Maps Directions API to estimate travel time between locations.
13
- Integrates with the calendar to compute departure times for events with
14
- location fields.
15
-
16
- **Prerequisite**: Google Maps API key must be configured in the daemon's
17
- secret store (`googleMapsApiKey`). The API key needs the Directions API
18
- enabled.
19
-
20
- ## When to Use
21
-
22
- - **Morning routine**: check today's calendar events with locations,
23
- compute departure times, add to today.md.
24
- - **User asks about commute/travel time**: query specific routes.
25
- - **Pre-event reminders**: DM departure time suggestions.
26
-
27
- ## Workflow
28
-
29
- 1. Fetch today's calendar events. The right call depends on the current
30
- Google Calendar mode (read `<integration_modes>` injected at session
31
- start):
32
- <!-- mode:direct:google_calendar -->
33
- Direct mode → `GET /api/calendar/events?date=today&days=1`
34
- (see the `external-services` skill).
35
- <!-- /mode:direct:google_calendar -->
36
- <!-- mode:delegated-same:google_calendar -->
37
- Same-backend delegated → use this session backend's native Calendar
38
- list-events MCP tool. `/api/calendar/events` returns 410.
39
- <!-- /mode:delegated-same:google_calendar -->
40
- <!-- mode:delegated-cross:google_calendar -->
41
- Cross-backend delegated → `POST /api/integrations/google_calendar/exec`
42
- with a natural-language `task` + `outputSchema` (see the
43
- `external-services` skill — cross-backend variant for worked
44
- examples).
45
- <!-- /mode:delegated-cross:google_calendar -->
46
- <!-- mode:native:google_calendar -->
47
- Native mode → use this session backend's native Calendar
48
- list-events MCP tool (same call shape as `delegated-same`). The
49
- materialized `external-services` skill body
50
- (`SKILL.native.<session-backend>.md`) lists the per-backend tool
51
- names. The daemon does not proxy in native mode;
52
- `/api/calendar/events` returns 410 and
53
- `/api/integrations/google_calendar/exec` returns 410 too.
54
- <!-- /mode:native:google_calendar -->
55
- <!-- mode:disabled:google_calendar -->
56
- Disabled → skip this skill; there is no calendar to source events from.
57
- <!-- /mode:disabled:google_calendar -->
58
- 2. For events with a `location` field, call `/api/travel-time` or
59
- `/api/travel-time/for-event/:eventId` to get travel duration.
60
- 3. Include departure time recommendations in today.md or DM.
61
-
62
- ---
63
-
64
- ## API Reference
65
-
66
- Base URL: `http://localhost:8321`
67
-
68
- ### GET /api/travel-time
69
-
70
- Estimate travel time between two locations.
71
-
72
- ```bash
73
- # Transit (default)
74
- curl -s "http://localhost:8321/api/travel-time?origin=Grand+Central&destination=Times+Square"
75
-
76
- # Driving with arrival time
77
- curl -s "http://localhost:8321/api/travel-time?origin=Brooklyn&destination=Newark&mode=driving&arrival=2026-04-12T14:00:00-04:00"
78
- ```
79
-
80
- | Param | Type | Default | Description |
81
- |-------|------|---------|-------------|
82
- | `origin` | string | (required) | Origin address or place name |
83
- | `destination` | string | (required) | Destination address or place name |
84
- | `mode` | string | transit | driving, transit, walking, bicycling |
85
- | `arrival` | ISO 8601 | — | Desired arrival time (computes departure time) |
86
-
87
- Response:
88
- ```json
89
- {
90
- "origin": "Grand Central Terminal, NY",
91
- "destination": "Times Square, NY",
92
- "mode": "transit",
93
- "durationSeconds": 1380,
94
- "durationText": "23 mins",
95
- "distanceMeters": 8500,
96
- "distanceText": "8.5 km",
97
- "departBy": "2026-04-12T13:34:00.000Z"
98
- }
99
- ```
100
-
101
- ### GET /api/travel-time/for-event/:eventId
102
-
103
- Estimate travel time for a specific calendar event.
104
-
105
- ```bash
106
- curl -s "http://localhost:8321/api/travel-time/for-event/abc123?origin=Home&mode=transit"
107
- ```
108
-
109
- | Param | Type | Default | Description |
110
- |-------|------|---------|-------------|
111
- | `origin` | string | (required) | Your starting location |
112
- | `mode` | string | transit | Travel mode |
113
-
114
- Response:
115
- ```json
116
- {
117
- "event": {
118
- "id": "abc123",
119
- "summary": "Team meeting",
120
- "location": "WeWork Times Square",
121
- "start": "2026-04-12T14:00:00-04:00"
122
- },
123
- "travelTime": {
124
- "origin": "Home, NY",
125
- "destination": "WeWork Times Square, NY",
126
- "mode": "transit",
127
- "durationSeconds": 2400,
128
- "durationText": "40 mins",
129
- "distanceMeters": 15000,
130
- "distanceText": "15 km",
131
- "departBy": "2026-04-12T13:16:00.000Z"
132
- }
133
- }
134
- ```
135
-
136
- ---
137
-
138
- ## Formatting Guide
139
-
140
- ### Morning routine — today.md
141
-
142
- ```
143
- ## Commute & Travel
144
- 14:00 Team meeting @ WeWork Times Square — depart by 13:15 (transit, 40 min)
145
- 18:30 Dinner @ Restaurant ABC — depart by 18:00 (transit, 25 min)
146
- ```
147
-
148
- Only include events that have a `location` field.
149
- Omit section if no events with locations today.
150
-
151
- ### Mode display names
152
-
153
- | mode | Display |
154
- |------|---------|
155
- | transit | Transit |
156
- | driving | Driving |
157
- | walking | Walking |
158
- | bicycling | Bicycle |