@aitne-sh/aitne 0.1.8 → 0.1.10

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 (308) hide show
  1. package/README.md +251 -164
  2. package/agent-assets/agent-profiles/_safety.md +3 -3
  3. package/agent-assets/agent-profiles/browser-task.md +108 -0
  4. package/agent-assets/agent-profiles/conversational.md +3 -3
  5. package/agent-assets/agent-profiles/profile-importer.md +2 -2
  6. package/agent-assets/agent-profiles/routine-fetch-window.md +30 -19
  7. package/agent-assets/agents/context-index-reconcile/agent.md +52 -0
  8. package/agent-assets/agents/evening-review/agent.md +53 -0
  9. package/agent-assets/agents/hourly-check/agent.md +62 -0
  10. package/agent-assets/agents/monthly-review/agent.md +55 -0
  11. package/agent-assets/agents/morning-routine/agent.md +78 -0
  12. package/agent-assets/agents/roadmap-maintenance/agent.md +52 -0
  13. package/agent-assets/agents/skill-curation/agent.md +52 -0
  14. package/agent-assets/agents/user-profile-sweep-evening/agent.md +48 -0
  15. package/agent-assets/agents/user-profile-sweep-morning/agent.md +53 -0
  16. package/agent-assets/agents/weekly-review/agent.md +51 -0
  17. package/agent-assets/docs/concepts/agent-day.md +13 -11
  18. package/agent-assets/docs/concepts/auth-health.md +47 -10
  19. package/agent-assets/docs/concepts/backends-and-tiers.md +66 -31
  20. package/agent-assets/docs/concepts/costs-and-quotas.md +51 -15
  21. package/agent-assets/docs/concepts/delegated-mode.md +56 -17
  22. package/agent-assets/docs/concepts/memory-model.md +77 -34
  23. package/agent-assets/docs/concepts/observations.md +49 -11
  24. package/agent-assets/docs/concepts/process-keys.md +56 -22
  25. package/agent-assets/docs/concepts/routines.md +60 -33
  26. package/agent-assets/docs/concepts/safety-and-execution.md +50 -21
  27. package/agent-assets/docs/concepts/safety-model.md +61 -50
  28. package/agent-assets/docs/concepts/skills.md +34 -18
  29. package/agent-assets/docs/features/integrations/browser-history.md +196 -0
  30. package/agent-assets/docs/features/integrations/calendar.md +39 -29
  31. package/agent-assets/docs/features/integrations/git.md +18 -7
  32. package/agent-assets/docs/features/integrations/github.md +84 -33
  33. package/agent-assets/docs/features/integrations/mail.md +61 -17
  34. package/agent-assets/docs/features/integrations/notion.md +18 -6
  35. package/agent-assets/docs/features/integrations/obsidian.md +28 -5
  36. package/agent-assets/docs/features/lifestyle/git.md +44 -40
  37. package/agent-assets/docs/features/lifestyle/reading.md +57 -22
  38. package/agent-assets/docs/features/lifestyle/receipts.md +51 -21
  39. package/agent-assets/docs/features/lifestyle/travel-bookings.md +77 -14
  40. package/agent-assets/docs/features/memory-files/agent-journal.md +132 -53
  41. package/agent-assets/docs/features/memory-files/agent-lessons.md +177 -0
  42. package/agent-assets/docs/features/memory-files/projects.md +73 -17
  43. package/agent-assets/docs/features/memory-files/roadmap.md +54 -11
  44. package/agent-assets/docs/features/memory-files/schedule.md +113 -70
  45. package/agent-assets/docs/features/memory-files/today.md +46 -21
  46. package/agent-assets/docs/features/memory-files/user-profile.md +63 -33
  47. package/agent-assets/docs/features/messaging/bang-commands.md +113 -36
  48. package/agent-assets/docs/features/messaging/dashboard-chat.md +43 -21
  49. package/agent-assets/docs/features/messaging/discord.md +35 -4
  50. package/agent-assets/docs/features/messaging/overview.md +37 -19
  51. package/agent-assets/docs/features/messaging/pairing-and-magic-phrase.md +94 -27
  52. package/agent-assets/docs/features/messaging/slack.md +67 -14
  53. package/agent-assets/docs/features/messaging/telegram.md +22 -8
  54. package/agent-assets/docs/features/messaging/whatsapp.md +71 -17
  55. package/agent-assets/docs/features/operations/activity-and-conversations.md +45 -15
  56. package/agent-assets/docs/features/operations/approvals.md +49 -16
  57. package/agent-assets/docs/features/operations/backend-routing.md +68 -16
  58. package/agent-assets/docs/features/operations/cost-tracking.md +84 -17
  59. package/agent-assets/docs/features/operations/managed-chromium.md +222 -0
  60. package/agent-assets/docs/features/operations/notifications.md +52 -11
  61. package/agent-assets/docs/features/operations/quiet-hours.md +64 -40
  62. package/agent-assets/docs/features/operations/schedule-approaching.md +54 -24
  63. package/agent-assets/docs/features/routines/custom-routines.md +98 -26
  64. package/agent-assets/docs/features/routines/evening-review.md +82 -21
  65. package/agent-assets/docs/features/routines/hourly-check.md +149 -29
  66. package/agent-assets/docs/features/routines/morning-routine.md +54 -35
  67. package/agent-assets/docs/features/routines/weekly-review.md +46 -21
  68. package/agent-assets/docs/features/wiki/commands.md +26 -16
  69. package/agent-assets/docs/features/wiki/cost-and-approval.md +241 -0
  70. package/agent-assets/docs/features/wiki/dashboard.md +256 -0
  71. package/agent-assets/docs/features/wiki/overview.md +70 -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 +34 -23
  75. package/agent-assets/docs/getting-started/02-first-steps.md +17 -10
  76. package/agent-assets/docs/getting-started/03-what-can-this-do.md +25 -14
  77. package/agent-assets/docs/getting-started/04-first-day.md +39 -21
  78. package/agent-assets/docs/glossary.md +235 -24
  79. package/agent-assets/docs/guides/add-a-custom-routine.md +63 -23
  80. package/agent-assets/docs/guides/backup-and-restore.md +80 -16
  81. package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +57 -26
  82. package/agent-assets/docs/guides/build-your-wiki.md +22 -9
  83. package/agent-assets/docs/guides/change-which-model-handles-x.md +64 -10
  84. package/agent-assets/docs/guides/connect-a-new-mail-account.md +66 -15
  85. package/agent-assets/docs/guides/explore-with-trace-and-connect.md +32 -14
  86. package/agent-assets/docs/guides/import-knowledge-file.md +50 -40
  87. package/agent-assets/docs/guides/install-and-run.md +49 -20
  88. package/agent-assets/docs/guides/maintain-wiki-health.md +35 -10
  89. package/agent-assets/docs/guides/migrate-machines.md +74 -18
  90. package/agent-assets/docs/guides/multiple-wikis-for-multiple-domains.md +111 -60
  91. package/agent-assets/docs/guides/pause-the-agent.md +69 -24
  92. package/agent-assets/docs/guides/reinstall-cleanly.md +88 -18
  93. package/agent-assets/docs/guides/setup-wizard.md +116 -54
  94. package/agent-assets/docs/guides/switch-default-backend.md +62 -16
  95. package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +30 -14
  96. package/agent-assets/docs/reference/api.md +153 -32
  97. package/agent-assets/docs/reference/cli-commands.md +39 -18
  98. package/agent-assets/docs/reference/config.md +241 -49
  99. package/agent-assets/docs/reference/disallowed-tools.md +34 -13
  100. package/agent-assets/docs/reference/keyboard-shortcuts.md +34 -10
  101. package/agent-assets/docs/reference/knowledge-layout.md +629 -0
  102. package/agent-assets/docs/reference/process-keys.md +62 -6
  103. package/agent-assets/docs/reference/skills.md +41 -14
  104. package/agent-assets/docs/troubleshooting/auth-failed.md +51 -21
  105. package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +97 -28
  106. package/agent-assets/docs/troubleshooting/fallback-keeps-firing.md +86 -22
  107. package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +68 -24
  108. package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +80 -20
  109. package/agent-assets/docs/troubleshooting/observation-not-detected.md +73 -21
  110. package/agent-assets/docs/troubleshooting/quota-exhausted.md +33 -8
  111. package/agent-assets/docs/troubleshooting/wiki-ingest-full-blocked.md +126 -54
  112. package/agent-assets/docs/troubleshooting/wiki-write-failed.md +29 -12
  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 +1 -1
  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 +25 -41
  119. package/agent-assets/skills/agent-create/SKILL.md +158 -0
  120. package/agent-assets/skills/attach/SKILL.md +10 -29
  121. package/agent-assets/skills/browser-history/SKILL.md +211 -0
  122. package/agent-assets/skills/browser-history-respond/SKILL.md +111 -0
  123. package/agent-assets/skills/browser-task/SKILL.md +164 -0
  124. package/agent-assets/skills/context/SKILL.md +35 -44
  125. package/agent-assets/skills/context/curation.json +14 -14
  126. package/agent-assets/skills/context/references/api.md +52 -40
  127. package/agent-assets/skills/context/references/required-frontmatter.md +13 -12
  128. package/agent-assets/skills/context/references/snapshot-files.md +18 -17
  129. package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +8 -8
  130. package/agent-assets/skills/context/seeds/frontmatter-requirements.seed.json +3 -3
  131. package/agent-assets/skills/docs-search/SKILL.md +23 -34
  132. package/agent-assets/skills/external-services/SKILL.delegated.claude.md +17 -114
  133. package/agent-assets/skills/external-services/SKILL.delegated.codex.md +17 -113
  134. package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +17 -113
  135. package/agent-assets/skills/external-services/SKILL.md +3 -3
  136. package/agent-assets/skills/external-services/SKILL.native.claude.md +7 -7
  137. package/agent-assets/skills/external-services/SKILL.native.codex.md +7 -7
  138. package/agent-assets/skills/external-services/SKILL.native.gemini.md +4 -4
  139. package/agent-assets/skills/external-services/references/calendar-apple.md +2 -2
  140. package/agent-assets/skills/external-services/references/calendar-outlook.md +1 -1
  141. package/agent-assets/skills/external-services/references/exec-errors.md +32 -0
  142. package/agent-assets/skills/external-services/references/obsidian.md +2 -2
  143. package/agent-assets/skills/external-services/references/skills-crud.md +5 -5
  144. package/agent-assets/skills/gmail-lifestyle/SKILL.md +11 -83
  145. package/agent-assets/skills/gmail-lifestyle/references/receipts-api.md +4 -0
  146. package/agent-assets/skills/gmail-lifestyle/references/travel-bookings-api.md +9 -0
  147. package/agent-assets/skills/mail/SKILL.delegated.claude.md +15 -18
  148. package/agent-assets/skills/mail/SKILL.delegated.codex.md +11 -6
  149. package/agent-assets/skills/mail/SKILL.delegated.gemini.md +11 -6
  150. package/agent-assets/skills/mail/SKILL.md +10 -18
  151. package/agent-assets/skills/mail/SKILL.native.claude.md +8 -7
  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 +10 -3
  155. package/agent-assets/skills/mail/references/examples.md +2 -1
  156. package/agent-assets/skills/mail/references/providers.md +1 -1
  157. package/agent-assets/skills/managed-tasks/SKILL.md +48 -81
  158. package/agent-assets/skills/managed-tasks/references/errors.md +33 -19
  159. package/agent-assets/skills/managed-tasks/references/output-path.md +33 -17
  160. package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +7 -5
  161. package/agent-assets/skills/management-policy/SKILL.md +42 -42
  162. package/agent-assets/skills/management-policy/curation.json +1 -1
  163. package/agent-assets/skills/management-policy/references/policy-workflow.md +11 -12
  164. package/agent-assets/skills/management-policy/seeds/policy-file-shape.seed.json +1 -1
  165. package/agent-assets/skills/notify/SKILL.md +14 -16
  166. package/agent-assets/skills/notify/references/priority.md +28 -20
  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 +17 -17
  171. package/agent-assets/skills/notion/SKILL.native.claude.md +11 -7
  172. package/agent-assets/skills/notion/SKILL.native.codex.md +10 -5
  173. package/agent-assets/skills/notion/SKILL.native.gemini.md +10 -5
  174. package/agent-assets/skills/observations/SKILL.md +29 -28
  175. package/agent-assets/skills/observations/references/fetch-fallback.md +22 -0
  176. package/agent-assets/skills/project-doc/SKILL.md +10 -7
  177. package/agent-assets/skills/project-doc/curation.json +3 -3
  178. package/agent-assets/skills/project-doc/seeds/project-shape.seed.json +8 -5
  179. package/agent-assets/skills/project-doc/seeds/slug-grammar.seed.json +5 -5
  180. package/agent-assets/skills/reading/SKILL.md +18 -42
  181. package/agent-assets/skills/reading/references/reading-taste.md +7 -7
  182. package/agent-assets/skills/roadmap/SKILL.md +8 -24
  183. package/agent-assets/skills/roadmap/curation.json +1 -1
  184. package/agent-assets/skills/roadmap/references/api.md +21 -11
  185. package/agent-assets/skills/roadmap/references/cross-check.md +15 -8
  186. package/agent-assets/skills/roadmap/references/horizon-tags.md +11 -0
  187. package/agent-assets/skills/roadmap/references/migration.md +12 -10
  188. package/agent-assets/skills/roadmap/references/retention.md +18 -0
  189. package/agent-assets/skills/roadmap/seeds/entry-types.seed.json +1 -1
  190. package/agent-assets/skills/schedule/SKILL.md +41 -50
  191. package/agent-assets/skills/schedule/references/batch.md +2 -2
  192. package/agent-assets/skills/schedule/references/errors.md +7 -4
  193. package/agent-assets/skills/schedule/references/importance.md +23 -0
  194. package/agent-assets/skills/schedule/references/model-selection.md +3 -3
  195. package/agent-assets/skills/schedule/references/recurrence-rule.md +7 -5
  196. package/agent-assets/skills/scheduled-managed-task/SKILL.md +77 -70
  197. package/agent-assets/skills/today/SKILL.md +24 -83
  198. package/agent-assets/skills/today/curation.json +3 -3
  199. package/agent-assets/skills/today/references/agent-plan-lifecycle.md +6 -5
  200. package/agent-assets/skills/today/references/today-skeleton.md +66 -0
  201. package/agent-assets/skills/today/seeds/agent-notes-flavors.seed.json +1 -1
  202. package/agent-assets/skills/today/seeds/section-shape.seed.json +7 -7
  203. package/agent-assets/skills/user-interview/SKILL.md +21 -93
  204. package/agent-assets/skills/user-interview/references/op-briefing.md +3 -3
  205. package/agent-assets/skills/user-interview/references/op-dm-handler.md +88 -0
  206. package/agent-assets/skills/user-interview/references/op-morning.md +1 -1
  207. package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +9 -1
  208. package/agent-assets/skills/user-profile/SKILL.md +29 -39
  209. package/agent-assets/skills/user-profile/curation.json +4 -4
  210. package/agent-assets/skills/user-profile/references/character-preferences.md +3 -3
  211. package/agent-assets/skills/user-profile/seeds/routing-table.seed.json +8 -8
  212. package/agent-assets/skills/user-profile/seeds/topic-files.seed.json +6 -6
  213. package/agent-assets/skills/wiki/wiki-ask/SKILL.md +1 -1
  214. package/agent-assets/skills/wiki/wiki-compile/SKILL.md +9 -8
  215. package/agent-assets/skills/wiki/wiki-connect/SKILL.md +32 -5
  216. package/agent-assets/skills/wiki/wiki-ingest/SKILL.md +6 -50
  217. package/agent-assets/skills/wiki/wiki-ingest/references/curl-errors.md +58 -0
  218. package/agent-assets/skills/wiki/wiki-lint/SKILL.md +20 -14
  219. package/agent-assets/skills/wiki/wiki-trace/SKILL.md +10 -5
  220. package/agent-assets/skills/wiki/wiki-vault-rules/SKILL.md +2 -0
  221. package/agent-assets/system-prompts/routine-fetch-window.md +22 -12
  222. package/agent-assets/task-flows/_partials/calendar-acquire.google_calendar.md +4 -2
  223. package/agent-assets/task-flows/_partials/calendar-acquire.outlook_calendar.md +4 -2
  224. package/agent-assets/task-flows/_partials/capture-user-info.md +2 -2
  225. package/agent-assets/task-flows/_partials/dm-intent.long-horizon.md +1 -1
  226. package/agent-assets/task-flows/_partials/dm-intent.project.md +9 -9
  227. package/agent-assets/task-flows/_partials/feedback-capture.md +30 -0
  228. package/agent-assets/task-flows/_partials/mail-acquire.outlook_mail.md +3 -2
  229. package/agent-assets/task-flows/_partials/notion-acquire.notion.md +10 -5
  230. package/agent-assets/task-flows/browser_task.md +84 -0
  231. package/agent-assets/task-flows/github.assigned.md +1 -1
  232. package/agent-assets/task-flows/github.pull_request.review_requested.md +2 -2
  233. package/agent-assets/task-flows/github.workflow_run.failed.md +2 -2
  234. package/agent-assets/task-flows/knowledge.import.md +14 -14
  235. package/agent-assets/task-flows/message.received.dm.md +13 -4
  236. package/agent-assets/task-flows/message.received.dm_first.md +7 -3
  237. package/agent-assets/task-flows/routine.custom.md +3 -3
  238. package/agent-assets/task-flows/routine.evening_review.md +88 -8
  239. package/agent-assets/task-flows/routine.fetch_window.md +2 -2
  240. package/agent-assets/task-flows/routine.hourly_check.md +16 -12
  241. package/agent-assets/task-flows/routine.monthly_review.md +93 -21
  242. package/agent-assets/task-flows/routine.morning_routine_journal.md +119 -97
  243. package/agent-assets/task-flows/routine.morning_routine_today.md +43 -43
  244. package/agent-assets/task-flows/routine.research_cluster_update.md +35 -0
  245. package/agent-assets/task-flows/routine.research_dispatch.md +38 -0
  246. package/agent-assets/task-flows/routine.research_offer_dm.md +125 -0
  247. package/agent-assets/task-flows/routine.research_wiki_summary.md +53 -0
  248. package/agent-assets/task-flows/routine.roadmap_refresh.md +10 -10
  249. package/agent-assets/task-flows/routine.today_refresh.md +4 -4
  250. package/agent-assets/task-flows/routine.user_profile_sweep.md +10 -10
  251. package/agent-assets/task-flows/routine.weekly_review.md +114 -24
  252. package/agent-assets/task-flows/schedule.approaching.md +0 -1
  253. package/agent-assets/task-flows/scheduled.dm.md +5 -5
  254. package/agent-assets/task-flows/scheduled.task.md +4 -4
  255. package/agent-assets/task-flows/setup.initial.md +21 -21
  256. package/agent-assets/task-flows/setup.update.md +2 -2
  257. package/agent-assets/task-flows/wiki.trace.md +1 -1
  258. package/agent-assets/templates/README.md +27 -20
  259. package/agent-assets/templates/_index.md +42 -26
  260. package/agent-assets/templates/_manifest.json +34 -99
  261. package/agent-assets/templates/{user → identity}/_index.md +1 -1
  262. package/agent-assets/templates/{user → identity}/profile.md +2 -2
  263. package/agent-assets/templates/{dossiers → knowledge/dossiers}/_index.md +1 -1
  264. package/agent-assets/templates/{projects → plans/projects}/_active.base +1 -1
  265. package/agent-assets/templates/policies/_index.md +21 -0
  266. package/agent-assets/templates/{rules → policies}/journal-export.md +1 -1
  267. package/agent-assets/templates/{rules → policies}/journal-format.md +5 -5
  268. package/agent-assets/templates/{rules/policies → policies/management-captures}/_index.md +2 -2
  269. package/agent-assets/templates/{rules → policies}/management.md +3 -3
  270. package/agent-assets/templates/{rules → policies}/mcp.md +1 -1
  271. package/agent-assets/templates/{rules → policies}/redaction.md +1 -1
  272. package/agent-assets/templates/{routines → policies/routines}/_index.md +1 -1
  273. package/agent-assets/templates/{routines → policies/routines}/evening.md +2 -2
  274. package/agent-assets/templates/{routines → policies/routines}/hourly.md +1 -1
  275. package/agent-assets/templates/{routines → policies/routines}/monthly.md +2 -2
  276. package/bin/aitne.mjs +58 -15
  277. package/package.json +5 -4
  278. package/scripts/commands/doctor.mjs +25 -10
  279. package/scripts/commands/run-now.mjs +6 -21
  280. package/scripts/lib/ports.d.mts +27 -0
  281. package/scripts/lib/ports.mjs +36 -0
  282. package/scripts/lib/process-identity.d.mts +46 -0
  283. package/scripts/lib/process-identity.mjs +193 -0
  284. package/scripts/lib/read-api-token.mjs +176 -0
  285. package/scripts/start.mjs +16 -5
  286. package/agent-assets/docs/features/lifestyle/travel-time.md +0 -58
  287. package/agent-assets/skills/gmail-lifestyle/references/travel-time-api.md +0 -59
  288. package/agent-assets/skills/schedule/references/recurring.md +0 -185
  289. package/agent-assets/templates/context-index.md +0 -42
  290. package/agent-assets/templates/rules/_index.md +0 -19
  291. /package/agent-assets/templates/{user → identity}/expertise.md +0 -0
  292. /package/agent-assets/templates/{user → identity}/goals.md +0 -0
  293. /package/agent-assets/templates/{user → identity}/people.md +0 -0
  294. /package/agent-assets/templates/{user → identity}/personal.md +0 -0
  295. /package/agent-assets/templates/{user → identity}/work.md +0 -0
  296. /package/agent-assets/templates/{agent/journal.md → journal/agent.md} +0 -0
  297. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/evening.md +0 -0
  298. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/hourly.md +0 -0
  299. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/monthly.md +0 -0
  300. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/morning.md +0 -0
  301. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/roadmap.md +0 -0
  302. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/weekly.md +0 -0
  303. /package/agent-assets/templates/{projects → plans/projects}/_index.md +0 -0
  304. /package/agent-assets/templates/{roadmap.md → plans/roadmap.md} +0 -0
  305. /package/agent-assets/templates/{routines → policies/routines}/morning.md +0 -0
  306. /package/agent-assets/templates/{routines → policies/routines}/weekly.md +0 -0
  307. /package/agent-assets/templates/{agent → state}/profile-questions.md +0 -0
  308. /package/agent-assets/templates/{today.md → state/today.md} +0 -0
@@ -128,7 +128,7 @@ curl -s -X POST http://localhost:8321/api/integrations/google_calendar/exec \
128
128
  `needsConfirmation` plan, or skip the dance for self-only events you
129
129
  already greenlit.)
130
130
 
131
- `outputSchema` is **required** (4 KB cap). Defaults: `maxToolCalls=7`,
131
+ `outputSchema` is **required** (4 KB cap). Defaults: `maxToolCalls=8`,
132
132
  `maxBudgetUsd=0.05`, `timeoutMs=60000`. Bump up to 15 / 0.50 / 300000
133
133
  for genuinely larger intents.
134
134
 
@@ -176,32 +176,7 @@ freshness matters, and never on a destructive-confirm second call.
176
176
  know about, call `POST /api/notify` with a one-line summary. The
177
177
  daemon does NOT auto-notify — it's an explicit choice.
178
178
 
179
- ### Error envelope
180
-
181
- `/exec` extends the direct-mode envelope with delegated-mode fields.
182
- Discriminator: `body.mode === "delegated"`.
183
-
184
- | HTTP | `error` | retry? | What to do |
185
- |---|---|---|---|
186
- | 400 | `validation_error` / `schema_too_large` | no | Fix the request body. |
187
- | 409 | `mode_mismatch` | no | Calendar isn't delegated, OR your DM backend matches `delegatedBackend`. Re-read `integrations.md` and stop. |
188
- | 409 | `precondition` | no | Mode/backend flipped during the queue wait. Re-check state and re-plan. |
189
- | 429 | `task_quota_exhausted` | no | Daily cap reached; wait or surface. |
190
- | 502 | `parse_error` / `schema_violation` | no (daemon already retried once) | Consider a simpler schema. |
191
- | 502 | `tool_unavailable` | no | No connector tool fits the intent. Surface the gap. |
192
- | 502 | `tool_failed` | maybe | Connector tool returned an error. Surface `body.message` verbatim; retry only if clearly transient. |
193
- | 502 | `auth_error` | no | Connector signed out. Tell the user to re-authenticate it. |
194
- | 502 | `policy_violation` | no | Subprocess attempted a tool outside the per-task allowlist (anti-injection). |
195
- | 502 | `loop_aborted` | no | `maxToolCalls` exceeded. Bump the cap or simplify. |
196
- | 502 | `budget_exhausted` | no | `maxBudgetUsd` exceeded. Caller can raise the cap. |
197
- | 502 | `post_write_format_failure` | no | Write succeeded; formatting failed. Side effect is real — surface with the partial trace. |
198
- | 503 | `delegated_proxy_busy` | yes | Daemon queue saturated. Backoff a few seconds, try once. |
199
- | 503 | `task_mode_disabled` | no | Operator turned the kill switch off. Stop. |
200
- | 504 | `timeout` | yes (1×) | Wall-clock fired. Retry once if intent was simple. |
201
- | 500 | `subprocess_crashed` | no | Unhandled exception inside the subprocess. Surface and stop. |
202
-
203
- Always preserve `body.message` verbatim when reporting to the user — it
204
- carries the connector's own language.
179
+ {{> ref:exec-errors }}
205
180
  <!-- /service:calendar -->
206
181
 
207
182
  ---
@@ -212,7 +187,7 @@ carries the connector's own language.
212
187
  **Scope**: this skill targets a **separate** Obsidian vault the user
213
188
  maintains alongside this app — e.g. a personal knowledge base. It is
214
189
  **not** the agent's own primary management store. The agent's primary
215
- files (`today.md`, `roadmap.md`, `projects/`, `rules/`, `routines/`,
190
+ files (`state/today.md`, `plans/roadmap.md`, `projects/`, `rules/`, `routines/`,
216
191
  `user/`, `agent/`, …) live in the primary vault and are reached via
217
192
  `/api/context/*` (see the `context` skill). **Never** use this skill to
218
193
  read or write the primary vault.
@@ -257,10 +232,10 @@ skill and the `/api/context/*` endpoints instead.
257
232
 
258
233
  ```bash
259
234
  curl -s http://localhost:8321/api/github/repos # list watched repos
260
- curl -s "http://localhost:8321/api/github/pulls?state=open" # list PRs
235
+ curl -s "http://localhost:8321/api/github/pulls?owner=user&repo=repo&state=open" # list PRs
261
236
  curl -s -X POST http://localhost:8321/api/github/pulls/comment \
262
237
  -H 'Content-Type: application/json' \
263
- -d '{"owner": "user", "repo": "repo", "pullNumber": 42, "body": "LGTM"}' # comment — Autonomous
238
+ -d '{"owner": "user", "repo": "repo", "pull_number": 42, "comment": "LGTM"}' # comment — Autonomous
264
239
  ```
265
240
  <!-- /service:github -->
266
241
 
@@ -276,92 +251,20 @@ update, archive).
276
251
 
277
252
  ---
278
253
 
279
- ## Recurring Schedules
254
+ ## Recurring tasks
280
255
 
281
- CRUD for repeating agent tasks. Timezone auto-filled from daemon config.
282
-
283
- ```bash
284
- curl -s -X POST http://localhost:8321/api/recurring-schedules \
285
- -H 'Content-Type: application/json' \
286
- -d '{"taskType": "wake", "description": "Morning inbox triage.", "recurrenceRule": {"frequency": "daily", "time": "09:00"}}'
287
- curl -s "http://localhost:8321/api/recurring-schedules?enabled=true" # list
288
- curl -s -X PATCH http://localhost:8321/api/recurring-schedules/1 \
289
- -H 'Content-Type: application/json' \
290
- -d '{"recurrenceRule": {"frequency": "weekly", "time": "10:00", "daysOfWeek": [1,3,5]}}'
291
- curl -s -X PATCH http://localhost:8321/api/recurring-schedules/1 \
292
- -H 'Content-Type: application/json' -d '{"enabled": false}' # disable
293
- curl -s -X DELETE http://localhost:8321/api/recurring-schedules/1 # delete
294
- ```
295
- `recurrenceRule`: `frequency` (daily/weekly/monthly), `time` (HH:MM), `daysOfWeek` (0=Sun..6=Sat, weekly), `daysOfMonth` (1-31, monthly). → Full guide: load `schedule` skill.
296
-
297
- ---
298
-
299
- ## One-Shot Scheduling
300
-
301
- Schedule a future DM or agent task. Use `<current_time>` to resolve relative times into absolute ISO 8601 with offset.
302
-
303
- ### DM vs Agent Task
304
-
305
- | Criterion | `/api/schedule/dm` (free) | `/api/schedule` (~$0.03) |
306
- |---|---|---|
307
- | Message text knowable now? | Yes | No — needs lookup/decision at execution |
308
- | Needs API data at execution? | No | Yes |
309
- | Multi-step action? | No | Yes |
310
- | Conditional on state that may change? | No | Yes |
311
-
312
- **Default to DM** — every agent wake-up costs money and context.
313
-
314
- ### Context-loss warning
315
-
316
- > The wake-up agent has NO memory of why it was scheduled — the `description` field is its only context.
317
-
318
- Include: **What** (verb + object), **Why** (trigger/reason), **Who/What** (names, IDs, URLs), **Expected output** (what success looks like).
319
-
320
- Bad: `"Meeting prep"` — which meeting? when? what to prepare? The wake-up agent will skip ambiguous descriptions.
321
-
322
- ### POST /api/schedule/dm — Pre-composed DM
323
- ```bash
324
- curl -s -X POST http://localhost:8321/api/schedule/dm \
325
- -H 'Content-Type: application/json' \
326
- -d '{"time": "2026-04-06T16:00:00-04:00", "message": "Reminder: Design review in 30 min.", "platform": "slack"}'
327
- ```
328
-
329
- ### POST /api/schedule — Agent task
330
- ```bash
331
- curl -s -X POST http://localhost:8321/api/schedule \
332
- -H 'Content-Type: application/json' \
333
- -d '{"time": "2026-04-06T16:00:00-04:00", "taskType": "wake", "description": "Check PR #42 status and notify user.", "tier": "medium", "taskContext": {"scheduledBy": "dm_conversation"}}'
334
- ```
335
- Fields: `time` (required), `taskType` (`wake`), `description` (required, min 20 chars), `tier` (`lite`/`medium`/`high`) **or** `model` (registered id like `claude-opus-4-7`, legacy alias `sonnet`/`opus`, or composite `<backendId>/<modelId>`) — mutually exclusive, `taskContext` (optional metadata). See the `schedule` skill body for the full surface and `/api/schedule/options` for the live model list.
336
-
337
- ### Manage pending items
338
- ```bash
339
- curl -s "http://localhost:8321/api/schedule?status=pending" # list
340
- curl -s -X PATCH http://localhost:8321/api/schedule/42 \
341
- -H 'Content-Type: application/json' -d '{"time": "2026-04-06T17:00:00-04:00"}' # edit
342
- curl -s -X DELETE http://localhost:8321/api/schedule/42 # cancel
343
- ```
344
- Editable: `time`, `description`, `message` (dm only), `tier` (or `model`, mutually exclusive — pass `null` to clear), `taskContext`. Only `pending` items.
345
-
346
- ### Time discipline
347
- - Absolute ISO 8601 with offset required — no relative times.
348
- - Do not schedule during quiet hours (default 22:00–08:00, configurable) unless critical.
349
- - Maximum 5 wake-ups per execution.
256
+ Recurring autonomous **work** (fetch / check / act on a cadence) is an **Agent** —
257
+ create one with the `agent-create` skill (`POST /api/agents`), managed on `/agents`.
258
+ Recurring scheduled **DMs / briefings** stay on `POST /api/recurring-schedules`
259
+ with `taskType: "dm_session"`. `GET /api/recurring-schedules?enabled=true` lists
260
+ existing rows (dedup). → Full guide: load the `agent-create` or `schedule` skill.
350
261
 
351
262
  ---
352
263
 
353
- ## Skills Management
264
+ ## Scheduling & Skills CRUD
354
265
 
355
- User-authored skills: `~/.personal-agent/skills/{slug}/SKILL.md`. Built-in skills are read-only (403). Slug: lowercase kebab-case `[a-z0-9][a-z0-9-]*`, 1–64 chars.
356
-
357
- ```bash
358
- curl -s http://localhost:8321/api/skills # list all
359
- curl -s http://localhost:8321/api/skills/todo-digest # read one
360
- curl -s -X POST http://localhost:8321/api/skills \
361
- -H 'Content-Type: application/json' \
362
- -d '{"name": "todo-digest", "description": "Summarize today.md", "content": "# TODO Digest\n...", "allowedTools": ["Bash(curl *)", "Read"]}'
363
- curl -s -X PUT http://localhost:8321/api/skills/todo-digest \
364
- -H 'Content-Type: application/json' -d '{"description": "New description"}' # update
365
- curl -s -X DELETE http://localhost:8321/api/skills/todo-digest # delete
366
- ```
367
- Always `GET /api/skills` before creating (check name collisions). **Omit frontmatter** from `content` — the API injects it.
266
+ One-shot DMs / agent wake-ups (`/api/schedule`, `/api/schedule/dm`) and
267
+ user-authored Skills CRUD (`/api/skills`) work identically to direct
268
+ mode — they are never proxied. Load the `schedule` skill for scheduling
269
+ and the `agent-create` skill for recurring work; this variant does not
270
+ mirror those surfaces.
@@ -122,7 +122,7 @@ curl -sS -X POST http://localhost:8321/api/integrations/google_calendar/exec \
122
122
  }'
123
123
  ```
124
124
 
125
- `outputSchema` is **required** (4 KB cap). Defaults: `maxToolCalls=7`,
125
+ `outputSchema` is **required** (4 KB cap). Defaults: `maxToolCalls=8`,
126
126
  `maxBudgetUsd=0.05`, `timeoutMs=60000`. Bump up to 15 / 0.50 / 300000
127
127
  for genuinely larger intents.
128
128
 
@@ -157,31 +157,7 @@ destructive-confirm second call.
157
157
  know about, call `POST /api/notify` with a one-line summary. The
158
158
  daemon does NOT auto-notify — it's an explicit choice.
159
159
 
160
- ### Error envelope
161
-
162
- `/exec` extends the direct-mode envelope with delegated-mode fields.
163
- Discriminator: `body.mode === "delegated"`.
164
-
165
- | HTTP | `error` | retry? | What to do |
166
- |---|---|---|---|
167
- | 400 | `validation_error` / `schema_too_large` | no | Fix the request body. |
168
- | 409 | `mode_mismatch` | no | Calendar isn't delegated, OR your DM backend matches `delegatedBackend`. Re-read `integrations.md`. |
169
- | 409 | `precondition` | no | Mode/backend flipped during queue wait. Re-check state. |
170
- | 429 | `task_quota_exhausted` | no | Daily cap reached. Wait or surface. |
171
- | 502 | `parse_error` / `schema_violation` | no (daemon already retried once) | Simplify schema. |
172
- | 502 | `tool_unavailable` | no | No connector tool fits. Surface the gap. |
173
- | 502 | `tool_failed` | maybe | Connector tool returned an error. Surface verbatim. |
174
- | 502 | `auth_error` | no | Connector signed out. Re-authenticate. |
175
- | 502 | `policy_violation` | no | Subprocess attempted an out-of-allowlist tool (anti-injection). |
176
- | 502 | `loop_aborted` | no | `maxToolCalls` exceeded. Bump or simplify. |
177
- | 502 | `budget_exhausted` | no | `maxBudgetUsd` exceeded. Caller can raise the cap. |
178
- | 502 | `post_write_format_failure` | no | Write succeeded; formatting failed. Surface with partial trace. |
179
- | 503 | `delegated_proxy_busy` | yes | Queue saturated. Backoff and retry once. |
180
- | 503 | `task_mode_disabled` | no | Operator killed it. Stop. |
181
- | 504 | `timeout` | yes (1×) | Wall-clock fired. Retry once. |
182
- | 500 | `subprocess_crashed` | no | Daemon-side defect. Surface and stop. |
183
-
184
- Always preserve `body.message` verbatim when reporting to the user.
160
+ {{> ref:exec-errors }}
185
161
  <!-- /service:calendar -->
186
162
 
187
163
  ---
@@ -192,7 +168,7 @@ Always preserve `body.message` verbatim when reporting to the user.
192
168
  **Scope**: this skill targets a **separate** Obsidian vault the user
193
169
  maintains alongside this app — e.g. a personal knowledge base. It is
194
170
  **not** the agent's own primary management store. The agent's primary
195
- files (`today.md`, `roadmap.md`, `projects/`, `rules/`, `routines/`,
171
+ files (`state/today.md`, `plans/roadmap.md`, `projects/`, `rules/`, `routines/`,
196
172
  `user/`, `agent/`, …) live in the primary vault and are reached via
197
173
  `/api/context/*` (see the `context` skill). **Never** use this skill to
198
174
  read or write the primary vault.
@@ -237,10 +213,10 @@ skill and the `/api/context/*` endpoints instead.
237
213
 
238
214
  ```bash
239
215
  curl -s http://localhost:8321/api/github/repos # list watched repos
240
- curl -s "http://localhost:8321/api/github/pulls?state=open" # list PRs
216
+ curl -s "http://localhost:8321/api/github/pulls?owner=user&repo=repo&state=open" # list PRs
241
217
  curl -s -X POST http://localhost:8321/api/github/pulls/comment \
242
218
  -H 'Content-Type: application/json' \
243
- -d '{"owner": "user", "repo": "repo", "pullNumber": 42, "body": "LGTM"}' # comment — Autonomous
219
+ -d '{"owner": "user", "repo": "repo", "pull_number": 42, "comment": "LGTM"}' # comment — Autonomous
244
220
  ```
245
221
  <!-- /service:github -->
246
222
 
@@ -256,92 +232,20 @@ update, archive).
256
232
 
257
233
  ---
258
234
 
259
- ## Recurring Schedules
235
+ ## Recurring tasks
260
236
 
261
- CRUD for repeating agent tasks. Timezone auto-filled from daemon config.
262
-
263
- ```bash
264
- curl -s -X POST http://localhost:8321/api/recurring-schedules \
265
- -H 'Content-Type: application/json' \
266
- -d '{"taskType": "wake", "description": "Morning inbox triage.", "recurrenceRule": {"frequency": "daily", "time": "09:00"}}'
267
- curl -s "http://localhost:8321/api/recurring-schedules?enabled=true" # list
268
- curl -s -X PATCH http://localhost:8321/api/recurring-schedules/1 \
269
- -H 'Content-Type: application/json' \
270
- -d '{"recurrenceRule": {"frequency": "weekly", "time": "10:00", "daysOfWeek": [1,3,5]}}'
271
- curl -s -X PATCH http://localhost:8321/api/recurring-schedules/1 \
272
- -H 'Content-Type: application/json' -d '{"enabled": false}' # disable
273
- curl -s -X DELETE http://localhost:8321/api/recurring-schedules/1 # delete
274
- ```
275
- `recurrenceRule`: `frequency` (daily/weekly/monthly), `time` (HH:MM), `daysOfWeek` (0=Sun..6=Sat, weekly), `daysOfMonth` (1-31, monthly). → Full guide: load `schedule` skill.
276
-
277
- ---
278
-
279
- ## One-Shot Scheduling
280
-
281
- Schedule a future DM or agent task. Use `<current_time>` to resolve relative times into absolute ISO 8601 with offset.
282
-
283
- ### DM vs Agent Task
284
-
285
- | Criterion | `/api/schedule/dm` (free) | `/api/schedule` (~$0.03) |
286
- |---|---|---|
287
- | Message text knowable now? | Yes | No — needs lookup/decision at execution |
288
- | Needs API data at execution? | No | Yes |
289
- | Multi-step action? | No | Yes |
290
- | Conditional on state that may change? | No | Yes |
291
-
292
- **Default to DM** — every agent wake-up costs money and context.
293
-
294
- ### Context-loss warning
295
-
296
- > The wake-up agent has NO memory of why it was scheduled — the `description` field is its only context.
297
-
298
- Include: **What** (verb + object), **Why** (trigger/reason), **Who/What** (names, IDs, URLs), **Expected output** (what success looks like).
299
-
300
- Bad: `"Meeting prep"` — which meeting? when? what to prepare? The wake-up agent will skip ambiguous descriptions.
301
-
302
- ### POST /api/schedule/dm — Pre-composed DM
303
- ```bash
304
- curl -s -X POST http://localhost:8321/api/schedule/dm \
305
- -H 'Content-Type: application/json' \
306
- -d '{"time": "2026-04-06T16:00:00-04:00", "message": "Reminder: Design review in 30 min.", "platform": "slack"}'
307
- ```
308
-
309
- ### POST /api/schedule — Agent task
310
- ```bash
311
- curl -s -X POST http://localhost:8321/api/schedule \
312
- -H 'Content-Type: application/json' \
313
- -d '{"time": "2026-04-06T16:00:00-04:00", "taskType": "wake", "description": "Check PR #42 status and notify user.", "tier": "medium", "taskContext": {"scheduledBy": "dm_conversation"}}'
314
- ```
315
- Fields: `time` (required), `taskType` (`wake`), `description` (required, min 20 chars), `tier` (`lite`/`medium`/`high`) **or** `model` (registered id like `claude-opus-4-7`, legacy alias `sonnet`/`opus`, or composite `<backendId>/<modelId>`) — mutually exclusive, `taskContext` (optional metadata). See the `schedule` skill body for the full surface and `/api/schedule/options` for the live model list.
316
-
317
- ### Manage pending items
318
- ```bash
319
- curl -s "http://localhost:8321/api/schedule?status=pending" # list
320
- curl -s -X PATCH http://localhost:8321/api/schedule/42 \
321
- -H 'Content-Type: application/json' -d '{"time": "2026-04-06T17:00:00-04:00"}' # edit
322
- curl -s -X DELETE http://localhost:8321/api/schedule/42 # cancel
323
- ```
324
- Editable: `time`, `description`, `message` (dm only), `tier` (or `model`, mutually exclusive — pass `null` to clear), `taskContext`. Only `pending` items.
325
-
326
- ### Time discipline
327
- - Absolute ISO 8601 with offset required — no relative times.
328
- - Do not schedule during quiet hours (default 22:00–08:00, configurable) unless critical.
329
- - Maximum 5 wake-ups per execution.
237
+ Recurring autonomous **work** (fetch / check / act on a cadence) is an **Agent** —
238
+ create one with the `agent-create` skill (`POST /api/agents`), managed on `/agents`.
239
+ Recurring scheduled **DMs / briefings** stay on `POST /api/recurring-schedules`
240
+ with `taskType: "dm_session"`. `GET /api/recurring-schedules?enabled=true` lists
241
+ existing rows (dedup). → Full guide: load the `agent-create` or `schedule` skill.
330
242
 
331
243
  ---
332
244
 
333
- ## Skills Management
245
+ ## Scheduling & Skills CRUD
334
246
 
335
- User-authored skills: `~/.personal-agent/skills/{slug}/SKILL.md`. Built-in skills are read-only (403). Slug: lowercase kebab-case `[a-z0-9][a-z0-9-]*`, 1–64 chars.
336
-
337
- ```bash
338
- curl -s http://localhost:8321/api/skills # list all
339
- curl -s http://localhost:8321/api/skills/todo-digest # read one
340
- curl -s -X POST http://localhost:8321/api/skills \
341
- -H 'Content-Type: application/json' \
342
- -d '{"name": "todo-digest", "description": "Summarize today.md", "content": "# TODO Digest\n...", "allowedTools": ["Bash(curl *)", "Read"]}'
343
- curl -s -X PUT http://localhost:8321/api/skills/todo-digest \
344
- -H 'Content-Type: application/json' -d '{"description": "New description"}' # update
345
- curl -s -X DELETE http://localhost:8321/api/skills/todo-digest # delete
346
- ```
347
- Always `GET /api/skills` before creating (check name collisions). **Omit frontmatter** from `content` — the API injects it.
247
+ One-shot DMs / agent wake-ups (`/api/schedule`, `/api/schedule/dm`) and
248
+ user-authored Skills CRUD (`/api/skills`) work identically to direct
249
+ mode — they are never proxied. Load the `schedule` skill for scheduling
250
+ and the `agent-create` skill for recurring work; this variant does not
251
+ mirror those surfaces.
@@ -121,7 +121,7 @@ curl -sS -X POST http://localhost:8321/api/integrations/google_calendar/exec \
121
121
  }'
122
122
  ```
123
123
 
124
- `outputSchema` is **required** (4 KB cap). Defaults: `maxToolCalls=7`,
124
+ `outputSchema` is **required** (4 KB cap). Defaults: `maxToolCalls=8`,
125
125
  `maxBudgetUsd=0.05`, `timeoutMs=60000`.
126
126
 
127
127
  ### Destructive-confirm two-step (`allowDestructive`)
@@ -155,31 +155,7 @@ destructive-confirm second call.
155
155
  know about, call `POST /api/notify` with a one-line summary. The
156
156
  daemon does NOT auto-notify — it's an explicit choice.
157
157
 
158
- ### Error envelope
159
-
160
- `/exec` extends the direct-mode envelope with delegated-mode fields.
161
- Discriminator: `body.mode === "delegated"`.
162
-
163
- | HTTP | `error` | retry? | What to do |
164
- |---|---|---|---|
165
- | 400 | `validation_error` / `schema_too_large` | no | Fix the request body. |
166
- | 409 | `mode_mismatch` | no | Calendar isn't delegated. Re-read `integrations.md`. |
167
- | 409 | `precondition` | no | Mode/backend flipped during queue wait. Re-check state. |
168
- | 429 | `task_quota_exhausted` | no | Daily cap reached. Wait or surface. |
169
- | 502 | `parse_error` / `schema_violation` | no (daemon already retried once) | Simplify schema. |
170
- | 502 | `tool_unavailable` | no | No connector tool fits. Surface the gap. |
171
- | 502 | `tool_failed` | maybe | Connector tool returned an error. Surface verbatim. |
172
- | 502 | `auth_error` | no | Connector signed out. Re-authenticate. |
173
- | 502 | `policy_violation` | no | Subprocess attempted an out-of-allowlist tool (anti-injection). |
174
- | 502 | `loop_aborted` | no | `maxToolCalls` exceeded. Bump or simplify. |
175
- | 502 | `budget_exhausted` | no | `maxBudgetUsd` exceeded. Caller can raise the cap. |
176
- | 502 | `post_write_format_failure` | no | Write succeeded; formatting failed. Surface with partial trace. |
177
- | 503 | `delegated_proxy_busy` | yes | Queue saturated. Backoff and retry once. |
178
- | 503 | `task_mode_disabled` | no | Operator killed it. Stop. |
179
- | 504 | `timeout` | yes (1×) | Wall-clock fired. Retry once. |
180
- | 500 | `subprocess_crashed` | no | Daemon-side defect. Surface and stop. |
181
-
182
- Always preserve `body.message` verbatim when reporting to the user.
158
+ {{> ref:exec-errors }}
183
159
  <!-- /service:calendar -->
184
160
 
185
161
  ---
@@ -190,7 +166,7 @@ Always preserve `body.message` verbatim when reporting to the user.
190
166
  **Scope**: this skill targets a **separate** Obsidian vault the user
191
167
  maintains alongside this app — e.g. a personal knowledge base. It is
192
168
  **not** the agent's own primary management store. The agent's primary
193
- files (`today.md`, `roadmap.md`, `projects/`, `rules/`, `routines/`,
169
+ files (`state/today.md`, `plans/roadmap.md`, `projects/`, `rules/`, `routines/`,
194
170
  `user/`, `agent/`, …) live in the primary vault and are reached via
195
171
  `/api/context/*` (see the `context` skill). **Never** use this skill to
196
172
  read or write the primary vault.
@@ -235,10 +211,10 @@ skill and the `/api/context/*` endpoints instead.
235
211
 
236
212
  ```bash
237
213
  curl -s http://localhost:8321/api/github/repos # list watched repos
238
- curl -s "http://localhost:8321/api/github/pulls?state=open" # list PRs
214
+ curl -s "http://localhost:8321/api/github/pulls?owner=user&repo=repo&state=open" # list PRs
239
215
  curl -s -X POST http://localhost:8321/api/github/pulls/comment \
240
216
  -H 'Content-Type: application/json' \
241
- -d '{"owner": "user", "repo": "repo", "pullNumber": 42, "body": "LGTM"}' # comment — Autonomous
217
+ -d '{"owner": "user", "repo": "repo", "pull_number": 42, "comment": "LGTM"}' # comment — Autonomous
242
218
  ```
243
219
  <!-- /service:github -->
244
220
 
@@ -254,92 +230,20 @@ update, archive).
254
230
 
255
231
  ---
256
232
 
257
- ## Recurring Schedules
233
+ ## Recurring tasks
258
234
 
259
- CRUD for repeating agent tasks. Timezone auto-filled from daemon config.
260
-
261
- ```bash
262
- curl -s -X POST http://localhost:8321/api/recurring-schedules \
263
- -H 'Content-Type: application/json' \
264
- -d '{"taskType": "wake", "description": "Morning inbox triage.", "recurrenceRule": {"frequency": "daily", "time": "09:00"}}'
265
- curl -s "http://localhost:8321/api/recurring-schedules?enabled=true" # list
266
- curl -s -X PATCH http://localhost:8321/api/recurring-schedules/1 \
267
- -H 'Content-Type: application/json' \
268
- -d '{"recurrenceRule": {"frequency": "weekly", "time": "10:00", "daysOfWeek": [1,3,5]}}'
269
- curl -s -X PATCH http://localhost:8321/api/recurring-schedules/1 \
270
- -H 'Content-Type: application/json' -d '{"enabled": false}' # disable
271
- curl -s -X DELETE http://localhost:8321/api/recurring-schedules/1 # delete
272
- ```
273
- `recurrenceRule`: `frequency` (daily/weekly/monthly), `time` (HH:MM), `daysOfWeek` (0=Sun..6=Sat, weekly), `daysOfMonth` (1-31, monthly). → Full guide: load `schedule` skill.
274
-
275
- ---
276
-
277
- ## One-Shot Scheduling
278
-
279
- Schedule a future DM or agent task. Use `<current_time>` to resolve relative times into absolute ISO 8601 with offset.
280
-
281
- ### DM vs Agent Task
282
-
283
- | Criterion | `/api/schedule/dm` (free) | `/api/schedule` (~$0.03) |
284
- |---|---|---|
285
- | Message text knowable now? | Yes | No — needs lookup/decision at execution |
286
- | Needs API data at execution? | No | Yes |
287
- | Multi-step action? | No | Yes |
288
- | Conditional on state that may change? | No | Yes |
289
-
290
- **Default to DM** — every agent wake-up costs money and context.
291
-
292
- ### Context-loss warning
293
-
294
- > The wake-up agent has NO memory of why it was scheduled — the `description` field is its only context.
295
-
296
- Include: **What** (verb + object), **Why** (trigger/reason), **Who/What** (names, IDs, URLs), **Expected output** (what success looks like).
297
-
298
- Bad: `"Meeting prep"` — which meeting? when? what to prepare? The wake-up agent will skip ambiguous descriptions.
299
-
300
- ### POST /api/schedule/dm — Pre-composed DM
301
- ```bash
302
- curl -s -X POST http://localhost:8321/api/schedule/dm \
303
- -H 'Content-Type: application/json' \
304
- -d '{"time": "2026-04-06T16:00:00-04:00", "message": "Reminder: Design review in 30 min.", "platform": "slack"}'
305
- ```
306
-
307
- ### POST /api/schedule — Agent task
308
- ```bash
309
- curl -s -X POST http://localhost:8321/api/schedule \
310
- -H 'Content-Type: application/json' \
311
- -d '{"time": "2026-04-06T16:00:00-04:00", "taskType": "wake", "description": "Check PR #42 status and notify user.", "tier": "medium", "taskContext": {"scheduledBy": "dm_conversation"}}'
312
- ```
313
- Fields: `time` (required), `taskType` (`wake`), `description` (required, min 20 chars), `tier` (`lite`/`medium`/`high`) **or** `model` (registered id like `claude-opus-4-7`, legacy alias `sonnet`/`opus`, or composite `<backendId>/<modelId>`) — mutually exclusive, `taskContext` (optional metadata). See the `schedule` skill body for the full surface and `/api/schedule/options` for the live model list.
314
-
315
- ### Manage pending items
316
- ```bash
317
- curl -s "http://localhost:8321/api/schedule?status=pending" # list
318
- curl -s -X PATCH http://localhost:8321/api/schedule/42 \
319
- -H 'Content-Type: application/json' -d '{"time": "2026-04-06T17:00:00-04:00"}' # edit
320
- curl -s -X DELETE http://localhost:8321/api/schedule/42 # cancel
321
- ```
322
- Editable: `time`, `description`, `message` (dm only), `tier` (or `model`, mutually exclusive — pass `null` to clear), `taskContext`. Only `pending` items.
323
-
324
- ### Time discipline
325
- - Absolute ISO 8601 with offset required — no relative times.
326
- - Do not schedule during quiet hours (default 22:00–08:00, configurable) unless critical.
327
- - Maximum 5 wake-ups per execution.
235
+ Recurring autonomous **work** (fetch / check / act on a cadence) is an **Agent** —
236
+ create one with the `agent-create` skill (`POST /api/agents`), managed on `/agents`.
237
+ Recurring scheduled **DMs / briefings** stay on `POST /api/recurring-schedules`
238
+ with `taskType: "dm_session"`. `GET /api/recurring-schedules?enabled=true` lists
239
+ existing rows (dedup). → Full guide: load the `agent-create` or `schedule` skill.
328
240
 
329
241
  ---
330
242
 
331
- ## Skills Management
243
+ ## Scheduling & Skills CRUD
332
244
 
333
- User-authored skills: `~/.personal-agent/skills/{slug}/SKILL.md`. Built-in skills are read-only (403). Slug: lowercase kebab-case `[a-z0-9][a-z0-9-]*`, 1–64 chars.
334
-
335
- ```bash
336
- curl -s http://localhost:8321/api/skills # list all
337
- curl -s http://localhost:8321/api/skills/todo-digest # read one
338
- curl -s -X POST http://localhost:8321/api/skills \
339
- -H 'Content-Type: application/json' \
340
- -d '{"name": "todo-digest", "description": "Summarize today.md", "content": "# TODO Digest\n...", "allowedTools": ["Bash(curl *)", "Read"]}'
341
- curl -s -X PUT http://localhost:8321/api/skills/todo-digest \
342
- -H 'Content-Type: application/json' -d '{"description": "New description"}' # update
343
- curl -s -X DELETE http://localhost:8321/api/skills/todo-digest # delete
344
- ```
345
- Always `GET /api/skills` before creating (check name collisions). **Omit frontmatter** from `content` — the API injects it.
245
+ One-shot DMs / agent wake-ups (`/api/schedule`, `/api/schedule/dm`) and
246
+ user-authored Skills CRUD (`/api/skills`) work identically to direct
247
+ mode — they are never proxied. Load the `schedule` skill for scheduling
248
+ and the `agent-create` skill for recurring work; this variant does not
249
+ mirror those surfaces.
@@ -15,7 +15,7 @@ Base URL: `http://localhost:8321`. All calls via `curl -s` with `Content-Type: a
15
15
  Two adjacent files declare where the user's data lives — read both before
16
16
  routing any external-service call.
17
17
 
18
- 1. **`rules/management.md` → `## Source of Truth`** carries durable
18
+ 1. **`policies/management.md` → `## Source of Truth`** carries durable
19
19
  user-authored answers ("Schedule = Google Calendar", "Tasks = Notion",
20
20
  etc.). This is the authoritative routing table.
21
21
  2. **`~/.personal-agent/integrations.md` → `## Note Sources`** is the
@@ -33,7 +33,7 @@ integrations DB. Treat it as a routing hint, not a knob.
33
33
 
34
34
  ### Calendar provider routing
35
35
 
36
- The user's calendar provider lives in `rules/management.md` → `## Source of Truth` → Schedule row. Read it before every calendar call.
36
+ The user's calendar provider lives in `policies/management.md` → `## Source of Truth` → Schedule row. Read it before every calendar call.
37
37
 
38
38
  | Schedule value in management rules | Use this base path | Backed by |
39
39
  |---|---|---|
@@ -43,7 +43,7 @@ The user's calendar provider lives in `rules/management.md` → `## Source of Tr
43
43
 
44
44
  **Hard rule**: NEVER cross-call. Calling `/api/calendar/*` while Schedule = Apple Calendar does NOT return empty — it queries the user's separate Google account if one exists, returning the wrong day. Calling `/api/apple-calendar/*` while Schedule = Google Calendar returns 503. Both failure modes are silent at the agent level — only the user notices, in the form of wrong answers.
45
45
 
46
- If `rules/management.md` is missing, ambiguous, or names a provider not listed here, **stop and ask the user** rather than guessing. Do not default to Google.
46
+ If `policies/management.md` is missing, ambiguous, or names a provider not listed here, **stop and ask the user** rather than guessing. Do not default to Google.
47
47
 
48
48
  The endpoint sets are intentionally near-identical in shape (same JSON for events, same query parameters for listing) so the rest of this skill body documents both at once. Provider-specific differences are flagged inline with **[Apple only]** or **[Google only]**.
49
49
 
@@ -37,14 +37,14 @@ in the session preamble.
37
37
  The same two files documented in the direct-mode body are still
38
38
  authoritative for non-Calendar routing:
39
39
 
40
- 1. **`rules/management.md` → `## Source of Truth`** — durable
40
+ 1. **`policies/management.md` → `## Source of Truth`** — durable
41
41
  user-authored answers ("Schedule = Google Calendar", "Tasks =
42
42
  Notion", etc.).
43
43
  2. **`~/.personal-agent/integrations.md` → `## Note Sources`** — the
44
44
  daemon-rendered snapshot for the user's external Obsidian vault path
45
45
  plus Notion's mode.
46
46
 
47
- If `rules/management.md` Schedule = Apple Calendar or Outlook Calendar,
47
+ If `policies/management.md` Schedule = Apple Calendar or Outlook Calendar,
48
48
  the user's chosen provider is **not** Google Calendar and the
49
49
  native-Claude binding is irrelevant — route to `/api/apple-calendar/*`
50
50
  or `/api/calendar/outlook/*` exactly as the direct-mode body documents.
@@ -149,7 +149,7 @@ the window and intersect.
149
149
  <!-- service:apple-calendar -->
150
150
  ## Apple Calendar (iCloud CalDAV) — direct, unchanged
151
151
 
152
- If `rules/management.md` Schedule = Apple Calendar, use the
152
+ If `policies/management.md` Schedule = Apple Calendar, use the
153
153
  `/api/apple-calendar/*` routes documented in the base body. Apple
154
154
  Calendar has no MCP connector; native-mode gating does not apply.
155
155
 
@@ -165,7 +165,7 @@ native binding above is Google-only.
165
165
  <!-- service:outlook-calendar -->
166
166
  ## Outlook Calendar (Microsoft Graph) — direct, unchanged
167
167
 
168
- If `rules/management.md` Schedule = Outlook Calendar, use
168
+ If `policies/management.md` Schedule = Outlook Calendar, use
169
169
  `/api/calendar/outlook/*` per the direct-mode body. Microsoft does not
170
170
  ship a hosted Outlook Calendar connector for Claude / Codex / Gemini
171
171
  today; native-mode gating does not apply.
@@ -178,7 +178,7 @@ today; native-mode gating does not apply.
178
178
 
179
179
  **Scope**: this skill targets the **separate** Obsidian vault the user
180
180
  maintains alongside this app — never the agent's primary management
181
- store (`today.md`, `roadmap.md`, `projects/`, `rules/`, `routines/`,
181
+ store (`state/today.md`, `plans/roadmap.md`, `projects/`, `rules/`, `routines/`,
182
182
  `user/`, `agent/`). Those are reached via `/api/context/*` (see the
183
183
  `context` skill).
184
184
 
@@ -241,7 +241,7 @@ session's integration state.
241
241
  When the hourly_check native flow's Step 0b fetches imminent-window
242
242
  events, POST each materialised event to `/api/observations` so
243
243
  subsequent runs can dedup. The daemon computes `contentHash`
244
- server-side via `@personal-agent/shared/observations-hash.ts` — pass
244
+ server-side via `@aitne/shared/observations-hash` — pass
245
245
  the raw `payload`.
246
246
 
247
247
  **Batch when you have more than one event.** Use
@@ -284,7 +284,7 @@ schedule surface (scheduling is daemon-internal, not an integration).
284
284
 
285
285
  ## Skills Management — direct, unchanged
286
286
 
287
- User-authored skills: `~/.personal-agent/skills/{slug}/SKILL.md`.
287
+ User-authored skills: `<contextDir>/policies/skills/{slug}/SKILL.md`.
288
288
  Built-in skills are read-only (403). Native-mode gating does not apply.
289
289
 
290
290
  ```bash