@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,9 +1,8 @@
1
1
  ---
2
2
  name: external-services
3
- description: Load when the task involves Google Calendar, the user's external Obsidian vault, GitHub, or Skills management AND Google Calendar is in cross-backend delegated mode (DM session on Codex CLI, Calendar delegated to a different backend's connector). Calendar calls flow through `POST /api/integrations/google_calendar/exec`; the rest of the surface (Obsidian, GitHub, recurring schedules, one-shot scheduling, skills CRUD) is unchanged from the direct-mode body.
3
+ description: Load when the task touches Google Calendar, Obsidian, GitHub, or Skills CRUD AND Google Calendar is cross-backend delegated from a Codex CLI DM session. Calendar calls route through `POST /api/integrations/google_calendar/exec`; other surfaces keep their direct routes.
4
4
  allowed-tools:
5
5
  - Bash(curl *)
6
- - Bash(jq *)
7
6
  - Read
8
7
  ---
9
8
 
@@ -22,8 +21,7 @@ these calls (Calendar is not delegated to Codex here).
22
21
 
23
22
  The rest of this skill — Obsidian, GitHub, recurring schedules, one-shot
24
23
  scheduling, skills CRUD — works identically to the direct-mode body.
25
- Refer to that body for those services; **only the Calendar section
26
- below changes** under cross-backend delegation.
24
+ Refer to that body for those services; **only the Calendar section below changes** under cross-backend delegation.
27
25
 
28
26
  To check which backend currently owns the Calendar connector, read
29
27
  `~/.personal-agent/integrations.md`. The `/exec` body below is
@@ -194,7 +192,7 @@ Always preserve `body.message` verbatim when reporting to the user.
194
192
  **Scope**: this skill targets a **separate** Obsidian vault the user
195
193
  maintains alongside this app — e.g. a personal knowledge base. It is
196
194
  **not** the agent's own primary management store. The agent's primary
197
- files (`today.md`, `roadmap.md`, `projects/`, `rules/`, `routines/`,
195
+ files (`state/today.md`, `plans/roadmap.md`, `projects/`, `rules/`, `routines/`,
198
196
  `user/`, `agent/`, …) live in the primary vault and are reached via
199
197
  `/api/context/*` (see the `context` skill). **Never** use this skill to
200
198
  read or write the primary vault.
@@ -239,10 +237,10 @@ skill and the `/api/context/*` endpoints instead.
239
237
 
240
238
  ```bash
241
239
  curl -s http://localhost:8321/api/github/repos # list watched repos
242
- curl -s "http://localhost:8321/api/github/pulls?state=open" # list PRs
240
+ curl -s "http://localhost:8321/api/github/pulls?owner=user&repo=repo&state=open" # list PRs
243
241
  curl -s -X POST http://localhost:8321/api/github/pulls/comment \
244
242
  -H 'Content-Type: application/json' \
245
- -d '{"owner": "user", "repo": "repo", "pullNumber": 42, "body": "LGTM"}' # comment — Autonomous
243
+ -d '{"owner": "user", "repo": "repo", "pull_number": 42, "comment": "LGTM"}' # comment — Autonomous
246
244
  ```
247
245
  <!-- /service:github -->
248
246
 
@@ -258,23 +256,13 @@ update, archive).
258
256
 
259
257
  ---
260
258
 
261
- ## Recurring Schedules
259
+ ## Recurring tasks
262
260
 
263
- CRUD for repeating agent tasks. Timezone auto-filled from daemon config.
264
-
265
- ```bash
266
- curl -s -X POST http://localhost:8321/api/recurring-schedules \
267
- -H 'Content-Type: application/json' \
268
- -d '{"taskType": "wake", "description": "Morning inbox triage.", "recurrenceRule": {"frequency": "daily", "time": "09:00"}}'
269
- curl -s "http://localhost:8321/api/recurring-schedules?enabled=true" # list
270
- curl -s -X PATCH http://localhost:8321/api/recurring-schedules/1 \
271
- -H 'Content-Type: application/json' \
272
- -d '{"recurrenceRule": {"frequency": "weekly", "time": "10:00", "daysOfWeek": [1,3,5]}}'
273
- curl -s -X PATCH http://localhost:8321/api/recurring-schedules/1 \
274
- -H 'Content-Type: application/json' -d '{"enabled": false}' # disable
275
- curl -s -X DELETE http://localhost:8321/api/recurring-schedules/1 # delete
276
- ```
277
- `recurrenceRule`: `frequency` (daily/weekly/monthly), `time` (HH:MM), `daysOfWeek` (0=Sun..6=Sat, weekly), `daysOfMonth` (1-31, monthly). → Full guide: load `schedule` skill.
261
+ Recurring autonomous **work** (fetch / check / act on a cadence) is an **Agent** —
262
+ create one with the `agent-create` skill (`POST /api/agents`), managed on `/agents`.
263
+ Recurring scheduled **DMs / briefings** stay on `POST /api/recurring-schedules`
264
+ with `taskType: "dm_session"`. `GET /api/recurring-schedules?enabled=true` lists
265
+ existing rows (dedup). → Full guide: load the `agent-create` or `schedule` skill.
278
266
 
279
267
  ---
280
268
 
@@ -312,9 +300,9 @@ curl -s -X POST http://localhost:8321/api/schedule/dm \
312
300
  ```bash
313
301
  curl -s -X POST http://localhost:8321/api/schedule \
314
302
  -H 'Content-Type: application/json' \
315
- -d '{"time": "2026-04-06T16:00:00-04:00", "taskType": "wake", "description": "Check PR #42 status and notify user.", "model": "sonnet", "taskContext": {"scheduledBy": "dm_conversation"}}'
303
+ -d '{"time": "2026-04-06T16:00:00-04:00", "taskType": "wake", "prompt": "Check PR #42 status and notify user.", "description": "PR #42 status check", "tier": "medium", "taskContext": {"scheduledBy": "dm_conversation"}}'
316
304
  ```
317
- Fields: `time` (required), `taskType` (`wake`), `description` (required, min 20 chars), `model` (optional), `taskContext` (optional metadata).
305
+ Fields: `time` (required), `taskType` (`wake`), `prompt` (required — the agent instruction, ≤8000 chars), `description` (optional label, ≤200 chars), `tier` (`lite`/`medium`/`high`) **or** `model` (registered id like `claude-opus-4-8`, 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.
318
306
 
319
307
  ### Manage pending items
320
308
  ```bash
@@ -323,7 +311,7 @@ curl -s -X PATCH http://localhost:8321/api/schedule/42 \
323
311
  -H 'Content-Type: application/json' -d '{"time": "2026-04-06T17:00:00-04:00"}' # edit
324
312
  curl -s -X DELETE http://localhost:8321/api/schedule/42 # cancel
325
313
  ```
326
- Editable: `time`, `description`, `message` (dm only), `model`, `taskContext`. Only `pending` items.
314
+ Editable: `time`, `description`, `message` (dm only), `tier` (or `model`, mutually exclusive — pass `null` to clear), `taskContext`. Only `pending` items.
327
315
 
328
316
  ### Time discipline
329
317
  - Absolute ISO 8601 with offset required — no relative times.
@@ -1,9 +1,8 @@
1
1
  ---
2
2
  name: external-services
3
- description: Load when the task involves Google Calendar, the user's external Obsidian vault, GitHub, or Skills management AND Google Calendar is in cross-backend delegated mode (DM session on Gemini CLI, Calendar delegated to a different backend's connector). Calendar calls flow through `POST /api/integrations/google_calendar/exec`; the rest of the surface (Obsidian, GitHub, recurring schedules, one-shot scheduling, skills CRUD) is unchanged from the direct-mode body.
3
+ description: Load when the task touches Google Calendar, Obsidian, GitHub, or Skills CRUD AND Google Calendar is cross-backend delegated from a Gemini CLI DM session. Calendar calls route through `POST /api/integrations/google_calendar/exec`; other surfaces keep their direct routes.
4
4
  allowed-tools:
5
5
  - Bash(curl *)
6
- - Bash(jq *)
7
6
  - Read
8
7
  ---
9
8
 
@@ -24,8 +23,7 @@ a different backend than the one running the DM.
24
23
 
25
24
  The rest of this skill — Obsidian, GitHub, recurring schedules, one-shot
26
25
  scheduling, skills CRUD — works identically to the direct-mode body.
27
- Refer to that body for those services; **only the Calendar section
28
- below changes** under cross-backend delegation.
26
+ Refer to that body for those services; **only the Calendar section below changes** under cross-backend delegation.
29
27
 
30
28
  To check which backend currently owns the Calendar connector, read
31
29
  `~/.personal-agent/integrations.md`. The skill body assumes Codex
@@ -192,7 +190,7 @@ Always preserve `body.message` verbatim when reporting to the user.
192
190
  **Scope**: this skill targets a **separate** Obsidian vault the user
193
191
  maintains alongside this app — e.g. a personal knowledge base. It is
194
192
  **not** the agent's own primary management store. The agent's primary
195
- files (`today.md`, `roadmap.md`, `projects/`, `rules/`, `routines/`,
193
+ files (`state/today.md`, `plans/roadmap.md`, `projects/`, `rules/`, `routines/`,
196
194
  `user/`, `agent/`, …) live in the primary vault and are reached via
197
195
  `/api/context/*` (see the `context` skill). **Never** use this skill to
198
196
  read or write the primary vault.
@@ -237,10 +235,10 @@ skill and the `/api/context/*` endpoints instead.
237
235
 
238
236
  ```bash
239
237
  curl -s http://localhost:8321/api/github/repos # list watched repos
240
- curl -s "http://localhost:8321/api/github/pulls?state=open" # list PRs
238
+ curl -s "http://localhost:8321/api/github/pulls?owner=user&repo=repo&state=open" # list PRs
241
239
  curl -s -X POST http://localhost:8321/api/github/pulls/comment \
242
240
  -H 'Content-Type: application/json' \
243
- -d '{"owner": "user", "repo": "repo", "pullNumber": 42, "body": "LGTM"}' # comment — Autonomous
241
+ -d '{"owner": "user", "repo": "repo", "pull_number": 42, "comment": "LGTM"}' # comment — Autonomous
244
242
  ```
245
243
  <!-- /service:github -->
246
244
 
@@ -256,23 +254,13 @@ update, archive).
256
254
 
257
255
  ---
258
256
 
259
- ## Recurring Schedules
257
+ ## Recurring tasks
260
258
 
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.
259
+ Recurring autonomous **work** (fetch / check / act on a cadence) is an **Agent** —
260
+ create one with the `agent-create` skill (`POST /api/agents`), managed on `/agents`.
261
+ Recurring scheduled **DMs / briefings** stay on `POST /api/recurring-schedules`
262
+ with `taskType: "dm_session"`. `GET /api/recurring-schedules?enabled=true` lists
263
+ existing rows (dedup). → Full guide: load the `agent-create` or `schedule` skill.
276
264
 
277
265
  ---
278
266
 
@@ -310,9 +298,9 @@ curl -s -X POST http://localhost:8321/api/schedule/dm \
310
298
  ```bash
311
299
  curl -s -X POST http://localhost:8321/api/schedule \
312
300
  -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.", "model": "sonnet", "taskContext": {"scheduledBy": "dm_conversation"}}'
301
+ -d '{"time": "2026-04-06T16:00:00-04:00", "taskType": "wake", "prompt": "Check PR #42 status and notify user.", "description": "PR #42 status check", "tier": "medium", "taskContext": {"scheduledBy": "dm_conversation"}}'
314
302
  ```
315
- Fields: `time` (required), `taskType` (`wake`), `description` (required, min 20 chars), `model` (optional), `taskContext` (optional metadata).
303
+ Fields: `time` (required), `taskType` (`wake`), `prompt` (required — the agent instruction, ≤8000 chars), `description` (optional label, ≤200 chars), `tier` (`lite`/`medium`/`high`) **or** `model` (registered id like `claude-opus-4-8`, 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
304
 
317
305
  ### Manage pending items
318
306
  ```bash
@@ -321,7 +309,7 @@ curl -s -X PATCH http://localhost:8321/api/schedule/42 \
321
309
  -H 'Content-Type: application/json' -d '{"time": "2026-04-06T17:00:00-04:00"}' # edit
322
310
  curl -s -X DELETE http://localhost:8321/api/schedule/42 # cancel
323
311
  ```
324
- Editable: `time`, `description`, `message` (dm only), `model`, `taskContext`. Only `pending` items.
312
+ Editable: `time`, `description`, `message` (dm only), `tier` (or `model`, mutually exclusive — pass `null` to clear), `taskContext`. Only `pending` items.
325
313
 
326
314
  ### Time discipline
327
315
  - Absolute ISO 8601 with offset required — no relative times.
@@ -3,7 +3,6 @@ name: external-services
3
3
  description: Load for calendar work (Google Calendar, Outlook Calendar, OR Apple Calendar / iCloud), the user's external Obsidian vault, GitHub, or user-authored Skills management. Mail lives in `mail`; Notion in `notion`; one-shot and recurring scheduling in `schedule`.
4
4
  allowed-tools:
5
5
  - Bash(curl *)
6
- - Bash(jq *)
7
6
  - Read
8
7
  ---
9
8
 
@@ -16,7 +15,7 @@ Base URL: `http://localhost:8321`. All calls via `curl -s` with `Content-Type: a
16
15
  Two adjacent files declare where the user's data lives — read both before
17
16
  routing any external-service call.
18
17
 
19
- 1. **`rules/management.md` → `## Source of Truth`** carries durable
18
+ 1. **`policies/management.md` → `## Source of Truth`** carries durable
20
19
  user-authored answers ("Schedule = Google Calendar", "Tasks = Notion",
21
20
  etc.). This is the authoritative routing table.
22
21
  2. **`~/.personal-agent/integrations.md` → `## Note Sources`** is the
@@ -34,7 +33,7 @@ integrations DB. Treat it as a routing hint, not a knob.
34
33
 
35
34
  ### Calendar provider routing
36
35
 
37
- 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.
38
37
 
39
38
  | Schedule value in management rules | Use this base path | Backed by |
40
39
  |---|---|---|
@@ -44,7 +43,7 @@ The user's calendar provider lives in `rules/management.md` → `## Source of Tr
44
43
 
45
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.
46
45
 
47
- 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.
48
47
 
49
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]**.
50
49
 
@@ -81,261 +80,23 @@ direct route when not.
81
80
 
82
81
  ---
83
82
 
84
- <!-- service:calendar -->
85
- ## Calendar
86
-
87
- Google Calendar proxy. Operates on the user's primary calendar (configurable via `calendarId` param).
88
-
89
- **Timezone rule**: Always include a TZ offset in `start`/`end` dateTime values (e.g. `-04:00`). All-day events use `YYYY-MM-DD` (no TZ needed).
90
-
91
- **Event status**: GET returns deleted events with `status: "cancelled"` (200, not 404). Always check `status` before acting. The list endpoint automatically excludes cancelled events.
92
-
93
- ### List events
94
- ```bash
95
- curl -s "http://localhost:8321/api/calendar/events?date=today&days=3"
96
- ```
97
-
98
- ### Get event detail
99
- ```bash
100
- curl -s "http://localhost:8321/api/calendar/events/abc123eventid"
101
- ```
102
- **Always GET before PATCH** to see current state and attendees.
103
-
104
- ### Create event (write — Autonomous)
105
- ```bash
106
- curl -s -X POST "http://localhost:8321/api/calendar/events" \
107
- -H 'Content-Type: application/json' \
108
- -d '{"summary": "Team meeting", "start": "2026-04-02T14:00:00-04:00", "end": "2026-04-02T15:00:00-04:00"}'
109
- ```
110
- Optional: `description`, `location`, `reminders`, `recurrence`, `attendees`, `visibility`. All-day: `YYYY-MM-DD`. Attendees: add `?sendUpdates=all` to notify. RRULE: `RRULE:FREQ=WEEKLY;BYDAY=MO,WE,FR`.
111
-
112
- ### Update event (write — Autonomous; commonly on the starter denylist)
113
- ```bash
114
- curl -s -X PATCH "http://localhost:8321/api/calendar/events/abc123" \
115
- -H 'Content-Type: application/json' \
116
- -d '{"start": "2026-04-02T15:00:00-04:00", "end": "2026-04-02T16:00:00-04:00"}'
117
- ```
118
- For recurring events, use the instance ID to update a single occurrence — never PATCH the master.
119
-
120
- **ATTENDEES WARNING**: PATCH with `attendees` **replaces the entire list** — it does NOT append. To add one attendee: (1) GET, (2) copy existing, (3) add new, (4) PATCH full list.
121
-
122
- ### Delete event (write — Autonomous; default starter denylist denies it)
123
- ```bash
124
- curl -s -X DELETE "http://localhost:8321/api/calendar/events/abc123"
125
- ```
126
- Add `?sendUpdates=all` to notify attendees. Do NOT PATCH a cancelled event.
127
-
128
- ### List calendars
129
- ```bash
130
- curl -s http://localhost:8321/api/calendar/calendars
131
- ```
132
-
133
- ### Free/busy query
134
- ```bash
135
- curl -s -X POST http://localhost:8321/api/calendar/freebusy \
136
- -H 'Content-Type: application/json' \
137
- -d '{"timeMin": "2026-04-11T09:00:00-04:00", "timeMax": "2026-04-11T18:00:00-04:00"}'
138
- ```
139
-
140
- ### Calendar error envelope (direct mode)
141
-
142
- | HTTP | `error` | What it means / what to do |
143
- |---|---|---|
144
- | 400 | `validation_error` | Bad request shape (e.g. missing `start`/`end`, malformed RRULE). Fix and retry. |
145
- | 404 | `not_found` | Event id unknown or already deleted. Re-list before retrying. |
146
- | 410 | `integration_delegated` | Calendar flipped to delegated mode mid-session. This skill body is direct-only — re-read `integrations.md` and use `POST /api/integrations/google_calendar/exec` (cross-backend task mode) or your session backend's native Calendar MCP (the same-backend variant) instead. |
147
- | 502 | `calendar_error` | Upstream Google API error — `message` carries the API's text. Surface verbatim; do not retry unless clearly transient. |
148
- | 503 | `calendar_not_configured` | Direct OAuth credentials are missing or the user has disabled Calendar in settings. Tell the user and stop. |
149
- <!-- /service:calendar -->
83
+ {{> ref:calendar-google }}
150
84
 
151
85
  ---
152
86
 
153
- <!-- service:outlook-calendar -->
154
- ## Outlook Calendar (Microsoft Graph)
155
-
156
- Use this section **only when `rules/management.md` Schedule = Outlook Calendar**. The provider-routing table at the top of this skill is non-negotiable.
157
-
158
- v1 is **read-only and on-demand** — there is no Outlook calendar poller, so `schedule.approaching` events do not fire for Outlook calendars (the user's own Outlook clients fill that gap). Write surfaces (create / update / delete) are deferred. If the user asks the agent to schedule or change an Outlook event, tell them you can read the calendar but must defer the write to them.
159
-
160
- OAuth is **shared with Outlook Mail** via the same MSAL cache row (`mail:outlook:<accountId>`) — if Outlook Mail is configured `direct` and authenticated, calendar reads succeed with no second consent.
161
-
162
- ### List events
163
- ```bash
164
- curl -s "http://localhost:8321/api/calendar/outlook/events?date=today&days=3"
165
- ```
166
- Same query params as Google (`date`: `YYYY-MM-DD` or `today`; `days`: 1–90; optional `calendarId`). Returns `{ events: [...], accountId }`.
167
-
168
- ### List calendars
169
- ```bash
170
- curl -s http://localhost:8321/api/calendar/outlook/calendars
171
- ```
172
- Returns `{ calendars: [...], accountId }`. The user's primary calendar is marked `primary: true`.
173
-
174
- ### Outlook Calendar error envelope
175
-
176
- | HTTP | `error` | What it means / what to do |
177
- |---|---|---|
178
- | 400 | bad query | Malformed `date` or `days` value. |
179
- | 502 | `calendar_error` | Upstream Microsoft Graph error — `message` carries wire text. |
180
- | 503 | `outlook_not_configured` | No authenticated Outlook account. Direct OAuth credentials missing. |
181
- | 503 | `outlook_calendar_disabled` | The user toggled Outlook Calendar off in Settings → Calendar. Tell the user and stop. |
182
- <!-- /service:outlook-calendar -->
87
+ {{> ref:calendar-outlook }}
183
88
 
184
89
  ---
185
90
 
186
- <!-- service:apple-calendar -->
187
- ## Apple Calendar (iCloud CalDAV)
188
-
189
- Use this section **only when `rules/management.md` Schedule = Apple Calendar**. The provider-routing table at the top of this skill is non-negotiable.
190
-
191
- The route shape mirrors `/api/calendar/*` so prose patterns transfer: list → get → patch / create / delete. Differences are flagged below.
192
-
193
- ### Probe configuration before first use
194
- ```bash
195
- curl -s http://localhost:8321/api/apple-calendar/status
196
- # → { "configured": bool, "available": bool }
197
- ```
198
- - `configured: false` → user has not entered Apple ID + app-specific password yet. Tell the user to open the dashboard's Apple Calendar card (Connections page) and paste a password from `appleid.apple.com` → Sign-In and Security → App-Specific Passwords. **Do not try to read or write events** until `available: true`.
199
- - `configured: true, available: false` → credentials are stored but iCloud rejected the last connection. Surface verbatim; common cause is the user revoked the app-specific password.
200
-
201
- ### List events
202
- ```bash
203
- curl -s "http://localhost:8321/api/apple-calendar/events?date=today&days=3"
204
- ```
205
- Same query params as Google: `date` (`YYYY-MM-DD` or `today`), `days` (max 90). Returns `{ events: [...] }` with the same JSON shape used by the Google route — `id`, `summary`, `start`, `end`, `location`, `description`, `allDay`, `status`, plus two Apple-specific fields:
206
- - `recurring` (bool) — true for any event in a recurring series.
207
- - `recurrenceId` (string|null) — populated for an expanded instance of a series.
208
-
209
- For a recurring instance the `id` is `<UID>__<RECURRENCE-ID>` so you can address a specific occurrence.
210
-
211
- **Timezones**: dateTime values are emitted in UTC (`Z` suffix). Convert to the user's local timezone before showing them.
212
-
213
- ### Get event detail
214
- ```bash
215
- curl -s "http://localhost:8321/api/apple-calendar/events/<id>"
216
- ```
217
- Always GET before PATCH so you see the current summary/start/end.
218
-
219
- ### Create event (write — Autonomous)
220
- ```bash
221
- curl -s -X POST http://localhost:8321/api/apple-calendar/events \
222
- -H 'Content-Type: application/json' \
223
- -d '{"summary": "Team meeting", "start": "2026-04-26T14:00:00+09:00", "end": "2026-04-26T15:00:00+09:00"}'
224
- ```
225
- Optional: `description`, `location`. **[Apple only]** `attendees`, `reminders`, `recurrence`, `visibility` from the Google shape are accepted by the Zod schema but are silently dropped — iCloud invitations and reminder defaults belong to the user's Apple ID and the agent should not author them. If a user asks for those, tell them and stop.
226
-
227
- ### Update event (write — Autonomous)
228
- ```bash
229
- curl -s -X PATCH http://localhost:8321/api/apple-calendar/events/<id> \
230
- -H 'Content-Type: application/json' \
231
- -d '{"start": "2026-04-26T15:00:00+09:00", "end": "2026-04-26T16:00:00+09:00"}'
232
- ```
233
-
234
- **[Apple only] Recurring-event editing semantics — read before writing**
235
- - A composite id (one whose suffix matches `__YYYY-MM-DD…`) addresses **one occurrence** of a series. PATCH/DELETE on it returns `501 recurring_instance_unsupported`. To move a single occurrence the user must edit it from Calendar.app.
236
- - A bare id whose GET returned `recurring: true` is the **series master**. PATCH on the master shifts the **entire series** (every future occurrence moves), and DELETE removes the entire series. Confirm with the user that they intend a series-level edit before issuing the call — agents have historically read "PATCH this event's start" as a single-instance reschedule, which is wrong here.
237
- - A bare id with `recurring: false` is a normal one-off event — PATCH/DELETE behave as usual.
238
- - `summary`, `start`, and `end` may be updated independently. Toggling all-day-ness (`YYYY-MM-DD` ↔ `…T…Z`) requires providing **both** `start` and `end` in the same PATCH; the codec rejects partial all-day toggles with `400 validation_error`.
239
- - Time strings must include a TZ offset (`Z` or `±HH:MM`); naked ISO without offset returns `400 validation_error` — do not interpret a user-stated time as local without an explicit offset.
240
-
241
- ### Delete event (write — Autonomous)
242
- ```bash
243
- curl -s -X DELETE http://localhost:8321/api/apple-calendar/events/<id>
244
- ```
245
- Same recurring semantics as PATCH (see the rules block above).
246
-
247
- ### List calendars
248
- ```bash
249
- curl -s http://localhost:8321/api/apple-calendar/calendars
250
- # → { "calendars": [{ id, summary, description, primary }, ...] }
251
- ```
252
- The `id` is an opaque CalDAV URL. The user's primary calendar is marked `primary: true`. To change which calendar create/list reads, see the dashboard Apple Calendar card.
253
-
254
- ### Free/busy query
255
- ```bash
256
- curl -s -X POST http://localhost:8321/api/apple-calendar/freebusy \
257
- -H 'Content-Type: application/json' \
258
- -d '{"timeMin": "2026-04-26T09:00:00Z", "timeMax": "2026-04-26T18:00:00Z"}'
259
- ```
260
- **[Apple only]** Free-busy is derived from `listEvents` — events with `status: "cancelled"` are excluded. `calendarIds` is ignored (the primary calendar is the only target).
261
-
262
- ### Apple Calendar error envelope
263
-
264
- | HTTP | `error` | What it means / what to do |
265
- |---|---|---|
266
- | 400 | `validation_error` | Bad request shape. Fix and retry. |
267
- | 401 | `auth_failed` | iCloud rejected the credentials. Tell the user to refresh the app-specific password in the dashboard. |
268
- | 404 | `not_found` | Event id unknown or already deleted. Re-list before retrying. |
269
- | 501 | `recurring_instance_unsupported` | The id targets a single occurrence of a recurring series — see the PATCH/DELETE notes above. |
270
- | 502 | `apple_calendar_error` | Upstream iCloud / CalDAV error. `message` carries the wire text. |
271
- | 503 | `apple_calendar_not_configured` | Credentials missing or last connection failed. Run the status probe above. |
272
-
273
- ### Known gap: no proactive notifications
274
-
275
- The hourly polling pivot (`schedule.approaching` events, observation deltas) only fires for Google Calendar today. With Apple Calendar selected, on-demand DM queries work but the agent will not proactively warn about an imminent event — the user's own iOS / macOS Calendar.app notifications fill that gap.
276
- <!-- /service:apple-calendar -->
91
+ {{> ref:calendar-apple }}
277
92
 
278
93
  ---
279
94
 
280
- <!-- service:obsidian -->
281
- ## Obsidian (external vault)
282
-
283
- **Scope**: this skill targets a **separate** Obsidian vault the user maintains
284
- alongside this app — e.g. a personal knowledge base. It is **not** the agent's
285
- own primary management store. The agent's primary files (`today.md`,
286
- `roadmap.md`, `projects/`, `rules/`, `routines/`, `user/`, `agent/`, …) live
287
- in the primary vault and are reached via `/api/context/*` (see the `context`
288
- skill). **Never** use this skill to read or write the primary vault.
289
-
290
- Use this skill when the user asks the agent to look up, append to, or create
291
- notes inside their external knowledge vault — never for the agent's own
292
- working state.
293
-
294
- Output language: follow `<output_language_policy>` (Policy C — body
295
- and any new headings the agent creates are in `<settings primary_language>`).
296
- Preserve verbatim any path / file-name patterns the user has established.
297
-
298
- Full CRUD over the external vault. Requires the Obsidian app running (the
299
- CLI proxies through it). Omit `.md` extension from paths. All writes are
300
- Autonomous; the daemon does not DM the owner before/after the call. Call
301
- `POST /api/notify` yourself when the user would want to know.
302
-
303
- ```bash
304
- curl -s http://localhost:8321/api/obsidian/status # external vault availability
305
- curl -s "http://localhost:8321/api/obsidian/search?q=meeting+notes&limit=10" # search external vault
306
- curl -s http://localhost:8321/api/obsidian/notes/Daily%20Notes/2026-04-06 # read external note
307
- curl -s -X POST http://localhost:8321/api/obsidian/notes \
308
- -H 'Content-Type: application/json' \
309
- -d '{"name": "Meeting Notes 2026-04-02", "content": "# Meeting\n..."}' # create external note (fails if exists)
310
- curl -s -X PUT http://localhost:8321/api/obsidian/notes/Projects/ProjectA \
311
- -H 'Content-Type: application/json' -d '{"content": "# Full body"}' # create-or-overwrite external note
312
- curl -s -X PATCH http://localhost:8321/api/obsidian/notes \
313
- -H 'Content-Type: application/json' \
314
- -d '{"file": "Meeting Notes 2026-04-02", "content": "\n- Action item"}' # append to external note
315
- curl -s -X PATCH http://localhost:8321/api/obsidian/daily \
316
- -H 'Content-Type: application/json' -d '{"content": "- [ ] Follow up"}' # append to external daily note
317
- curl -s -X DELETE http://localhost:8321/api/obsidian/notes/Projects/Old # delete from external vault (moves to trash)
318
- ```
319
- **Endpoint choice**: Read → GET, Create-only → POST, Edit → PUT, Append → PATCH.
320
-
321
- If the user's request is really about the agent's own state (today, roadmap,
322
- projects, journal, rules, routines, user profile), switch to the `context`
323
- skill and the `/api/context/*` endpoints instead.
324
- <!-- /service:obsidian -->
95
+ {{> ref:obsidian }}
325
96
 
326
97
  ---
327
98
 
328
- <!-- service:github -->
329
- ## GitHub
330
-
331
- ```bash
332
- curl -s http://localhost:8321/api/github/repos # list watched repos
333
- curl -s "http://localhost:8321/api/github/pulls?owner=user&repo=repo&state=open" # list PRs
334
- curl -s -X POST http://localhost:8321/api/github/pulls/comment \
335
- -H 'Content-Type: application/json' \
336
- -d '{"owner": "user", "repo": "repo", "pull_number": 42, "comment": "LGTM"}' # comment — Autonomous
337
- ```
338
- <!-- /service:github -->
99
+ {{> ref:github }}
339
100
 
340
101
  ---
341
102
 
@@ -360,18 +121,4 @@ flows.
360
121
 
361
122
  ---
362
123
 
363
- ## Skills Management
364
-
365
- 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.
366
-
367
- ```bash
368
- curl -s http://localhost:8321/api/skills # list all
369
- curl -s http://localhost:8321/api/skills/todo-digest # read one
370
- curl -s -X POST http://localhost:8321/api/skills \
371
- -H 'Content-Type: application/json' \
372
- -d '{"name": "todo-digest", "description": "Summarize today.md", "content": "# TODO Digest\n...", "allowedTools": ["Bash(curl *)", "Read"]}'
373
- curl -s -X PUT http://localhost:8321/api/skills/todo-digest \
374
- -H 'Content-Type: application/json' -d '{"description": "New description"}' # update
375
- curl -s -X DELETE http://localhost:8321/api/skills/todo-digest # delete
376
- ```
377
- Always `GET /api/skills` before creating (check name collisions). **Omit frontmatter** from `content` — the API injects it.
124
+ {{> ref:skills-crud }}
@@ -1,9 +1,8 @@
1
1
  ---
2
2
  name: external-services
3
- description: Load when an external-services surface is in scope (Google Calendar / Obsidian / GitHub / Skills CRUD / scheduling) and Google Calendar is in native mode bound to Claude (`nativeBackend === "claude"`). Calendar runs through Claude's hosted Calendar connector directly; the daemon does not proxy Calendar. Other surfaces (Apple/Outlook Calendar, Obsidian, GitHub, scheduling, Skills CRUD) keep their direct routes.
3
+ description: Load when an external-services surface is in scope and Google Calendar is in native mode bound to Claude (`nativeBackend === "claude"`). Calendar runs via Claude's hosted Calendar connector; daemon does not proxy. Obsidian, GitHub, scheduling, Skills CRUD keep direct routes.
4
4
  allowed-tools:
5
5
  - Bash(curl *)
6
- - Bash(jq *)
7
6
  - Read
8
7
  ---
9
8
 
@@ -38,14 +37,14 @@ in the session preamble.
38
37
  The same two files documented in the direct-mode body are still
39
38
  authoritative for non-Calendar routing:
40
39
 
41
- 1. **`rules/management.md` → `## Source of Truth`** — durable
40
+ 1. **`policies/management.md` → `## Source of Truth`** — durable
42
41
  user-authored answers ("Schedule = Google Calendar", "Tasks =
43
42
  Notion", etc.).
44
43
  2. **`~/.personal-agent/integrations.md` → `## Note Sources`** — the
45
44
  daemon-rendered snapshot for the user's external Obsidian vault path
46
45
  plus Notion's mode.
47
46
 
48
- If `rules/management.md` Schedule = Apple Calendar or Outlook Calendar,
47
+ If `policies/management.md` Schedule = Apple Calendar or Outlook Calendar,
49
48
  the user's chosen provider is **not** Google Calendar and the
50
49
  native-Claude binding is irrelevant — route to `/api/apple-calendar/*`
51
50
  or `/api/calendar/outlook/*` exactly as the direct-mode body documents.
@@ -150,7 +149,7 @@ the window and intersect.
150
149
  <!-- service:apple-calendar -->
151
150
  ## Apple Calendar (iCloud CalDAV) — direct, unchanged
152
151
 
153
- If `rules/management.md` Schedule = Apple Calendar, use the
152
+ If `policies/management.md` Schedule = Apple Calendar, use the
154
153
  `/api/apple-calendar/*` routes documented in the base body. Apple
155
154
  Calendar has no MCP connector; native-mode gating does not apply.
156
155
 
@@ -166,7 +165,7 @@ native binding above is Google-only.
166
165
  <!-- service:outlook-calendar -->
167
166
  ## Outlook Calendar (Microsoft Graph) — direct, unchanged
168
167
 
169
- If `rules/management.md` Schedule = Outlook Calendar, use
168
+ If `policies/management.md` Schedule = Outlook Calendar, use
170
169
  `/api/calendar/outlook/*` per the direct-mode body. Microsoft does not
171
170
  ship a hosted Outlook Calendar connector for Claude / Codex / Gemini
172
171
  today; native-mode gating does not apply.
@@ -179,7 +178,7 @@ today; native-mode gating does not apply.
179
178
 
180
179
  **Scope**: this skill targets the **separate** Obsidian vault the user
181
180
  maintains alongside this app — never the agent's primary management
182
- store (`today.md`, `roadmap.md`, `projects/`, `rules/`, `routines/`,
181
+ store (`state/today.md`, `plans/roadmap.md`, `projects/`, `rules/`, `routines/`,
183
182
  `user/`, `agent/`). Those are reached via `/api/context/*` (see the
184
183
  `context` skill).
185
184
 
@@ -1,9 +1,8 @@
1
1
  ---
2
2
  name: external-services
3
- description: Load when an external-services surface is in scope (Google Calendar / Obsidian / GitHub / Skills CRUD / scheduling) and Google Calendar is in native mode bound to Codex (`nativeBackend === "codex"`). Calendar runs through the in-session Calendar connector your Codex harness exposes directly; the daemon does not proxy Calendar. Other surfaces (Apple/Outlook Calendar, Obsidian, GitHub, scheduling, Skills CRUD) keep their direct routes.
3
+ description: Load when an external-services surface is in scope and Google Calendar is in native mode bound to Codex (`nativeBackend === "codex"`). Calendar runs via the Codex Calendar connector; daemon does not proxy. Obsidian, GitHub, scheduling, Skills CRUD keep direct routes.
4
4
  allowed-tools:
5
5
  - Bash(curl *)
6
- - Bash(jq *)
7
6
  - Read
8
7
  ---
9
8
 
@@ -33,9 +32,9 @@ and the `<integration-routing-table>` block in the session preamble.
33
32
 
34
33
  ## Source of Truth (READ FIRST)
35
34
 
36
- Same as the direct-mode body — `rules/management.md` →
35
+ Same as the direct-mode body — `policies/management.md` →
37
36
  `## Source of Truth` and `~/.personal-agent/integrations.md` →
38
- `## Note Sources`. If `rules/management.md` Schedule != Google
37
+ `## Note Sources`. If `policies/management.md` Schedule != Google
39
38
  Calendar, the native binding is irrelevant; route through the
40
39
  provider-specific direct route (`/api/apple-calendar/*` or
41
40
  `/api/calendar/outlook/*`).
@@ -121,7 +120,7 @@ this file.
121
120
  <!-- service:apple-calendar -->
122
121
  ## Apple Calendar (iCloud CalDAV) — direct, unchanged
123
122
 
124
- If `rules/management.md` Schedule = Apple Calendar, use the
123
+ If `policies/management.md` Schedule = Apple Calendar, use the
125
124
  `/api/apple-calendar/*` routes documented in the base body. Apple
126
125
  Calendar has no MCP connector; native-mode gating does not apply.
127
126
  <!-- /service:apple-calendar -->
@@ -131,7 +130,7 @@ Calendar has no MCP connector; native-mode gating does not apply.
131
130
  <!-- service:outlook-calendar -->
132
131
  ## Outlook Calendar (Microsoft Graph) — direct, unchanged
133
132
 
134
- If `rules/management.md` Schedule = Outlook Calendar, use
133
+ If `policies/management.md` Schedule = Outlook Calendar, use
135
134
  `/api/calendar/outlook/*` per the direct-mode body. No Outlook
136
135
  connector ships for Codex today; native-mode gating does not apply.
137
136
  <!-- /service:outlook-calendar -->
@@ -144,7 +143,7 @@ connector ships for Codex today; native-mode gating does not apply.
144
143
  Same surface as the direct-mode body. Full CRUD via
145
144
  `/api/obsidian/*`; requires the Obsidian app running. Omit `.md`
146
145
  extensions from paths. Never use this skill to read or write the
147
- agent's primary management vault (`today.md`, `roadmap.md`,
146
+ agent's primary management vault (`state/today.md`, `plans/roadmap.md`,
148
147
  `projects/`, `rules/`, …) — that lives behind `/api/context/*`.
149
148
 
150
149
  ```bash
@@ -172,10 +171,10 @@ curl -s -X DELETE http://localhost:8321/api/obsidian/notes/Projects/Old
172
171
 
173
172
  ```bash
174
173
  curl -s http://localhost:8321/api/github/repos
175
- curl -s "http://localhost:8321/api/github/pulls?state=open"
174
+ curl -s "http://localhost:8321/api/github/pulls?owner=user&repo=repo&state=open"
176
175
  curl -s -X POST http://localhost:8321/api/github/pulls/comment \
177
176
  -H 'Content-Type: application/json' \
178
- -d '{"owner": "user", "repo": "repo", "pullNumber": 42, "body": "LGTM"}'
177
+ -d '{"owner": "user", "repo": "repo", "pull_number": 42, "comment": "LGTM"}'
179
178
  ```
180
179
  <!-- /service:github -->
181
180