@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
@@ -0,0 +1,65 @@
1
+ ---
2
+ kind: reference
3
+ name: priority
4
+ description: Notification priority levels — critical / high / normal / low — with quiet-hours behavior and per-level examples.
5
+ ---
6
+
7
+ # Notification priority levels
8
+
9
+ Pick the lowest priority that still preserves the user-visible
10
+ behavior the message needs. **Default to `normal`.**
11
+
12
+ | Priority | Quiet-hours | Use for |
13
+ |---|---|---|
14
+ | `critical` | Bypasses | Security alerts (credential leak, account lockout), data-loss risk (about to overwrite without backup, irreversible deletion in flight), system errors blocking the user from working. Wakes the user. |
15
+ | `high` | Bypasses | Hard deadlines firing in the next 8 hours, urgent inbound messages from people the user has flagged as priority, "meeting starting now". User wants to see this even during quiet hours but not at 3 am. |
16
+ | `normal` | Respects (dropped during quiet hours) | Regular reminders (`15 min until standup`), digest-style summaries, single-recipient FYIs the user opted into. **Default.** |
17
+ | `low` | Respects (dropped during quiet hours) | Background updates, observational FYIs the user did not explicitly ask for, optional context. Often better as an Agent Log entry instead of a notification at all. |
18
+
19
+ ## Examples by level
20
+
21
+ ### `critical` — "3 am matters"
22
+
23
+ - `AWS console session was used from an IP not on your allowlist 5 min ago — review and rotate keys if not you.`
24
+ - `Backup job failed on the database for 3 consecutive runs — primary now 6 hours out of sync.`
25
+
26
+ If the user would not want the message to wake them, it is not `critical`.
27
+
28
+ ### `high` — "8 hours delay matters"
29
+
30
+ - `Design review at 14:00 was just moved up to 11:00 — you have a conflicting meeting.`
31
+ - `Submission deadline for the grant is 5 pm today — draft still has 3 unresolved comments.`
32
+ - `Inbound DM from Sarah (priority contact): "Can you call before noon?"`
33
+
34
+ If the next morning would still be soon enough, it is not `high`.
35
+
36
+ ### `normal` — the default
37
+
38
+ - `Standup starts in 15 minutes.`
39
+ - `Daily digest: 3 emails from boss, 1 asks for Q2 plan by EOD.`
40
+ - `Reminder you set yesterday for "call vet": now.`
41
+
42
+ ### `low` — opt-in informational
43
+
44
+ - `Calendar found a 30-min slot at 16:00 today if you want to schedule the writeup.`
45
+ - `Build #4291 on develop turned green (you asked to be notified).`
46
+
47
+ If the user did not opt in to receiving this category of update, do not
48
+ send `low`. Drop it to an Agent Log entry instead.
49
+
50
+ ## Rate-limit defaults
51
+
52
+ 3/hour, 12/day across all priorities (`critical` bypasses both caps).
53
+ The agent CANNOT query `notification_log` directly (Approve-tier). Use
54
+ `<today>` `## Agent Log` as the authoritative dedup source (look for
55
+ `notify sent` / `DM sent` lines).
56
+
57
+ `/api/notify` does NOT report rate-limit or quiet-hours suppression
58
+ back to you — it returns `200 {status:"sent"}` even when the message is
59
+ silently dropped inside the delivery layer. A `"sent"` response is
60
+ therefore not proof the user saw it. Do NOT re-post the same item
61
+ hoping for delivery; self-throttle by scanning `<today>` `## Agent Log`
62
+ first and log `notify skipped (rate_limited)` when you choose to hold.
63
+ If the message is time-critical and the next opportunity arises,
64
+ upgrade to `high` (or `critical` if the situation has escalated)
65
+ rather than re-sending at the same level.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: notion
3
- description: Load when the task touches Notion and Notion is in cross-backend delegated mode (DM session is Claude Code; `delegatedBackend` is non-Claude). All Notion operations flow through `POST /api/integrations/notion/exec`; `/api/notion/*` write/read endpoints are not active in this configuration. The label-resolution endpoint `GET /api/notion/databases` remains available.
3
+ description: Load when the task touches Notion AND Notion is cross-backend delegated from a Claude DM session (`delegatedBackend` is non-Claude). All Notion operations flow through `POST /api/integrations/notion/exec`. `GET /api/notion/databases` remains available for label resolution.
4
4
  allowed-tools:
5
5
  - Bash(curl *)
6
6
  - Read
@@ -53,7 +53,7 @@ The daemon:
53
53
  tool against the per-task allowed-tools envelope, validates the
54
54
  final JSON against your `outputSchema`, returns it.
55
55
 
56
- `outputSchema` is **required** (4 KB cap). Defaults: `maxToolCalls=7`,
56
+ `outputSchema` is **required** (4 KB cap). Defaults: `maxToolCalls=8`,
57
57
  `maxBudgetUsd=0.05`, `timeoutMs=60000`. Bump up to 15 / 0.50 / 300000
58
58
  for genuinely larger intents.
59
59
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: notion
3
- description: Load when the task touches Notion and Notion is in cross-backend delegated mode (DM session is Codex CLI; `delegatedBackend` is non-Codex). All Notion operations flow through `POST /api/integrations/notion/exec`; `/api/notion/*` write/read endpoints are not active in this configuration. The label-resolution endpoint `GET /api/notion/databases` remains available.
3
+ description: Load when the task touches Notion AND Notion is cross-backend delegated from a Codex CLI DM session (`delegatedBackend` is non-Codex). All Notion operations flow through `POST /api/integrations/notion/exec`. `GET /api/notion/databases` remains available for label resolution.
4
4
  ---
5
5
 
6
6
  # Notion (delegated, cross-backend)
@@ -48,7 +48,7 @@ The daemon:
48
48
  tool against the per-task allowed-tools envelope, validates the
49
49
  final JSON against your `outputSchema`, returns it.
50
50
 
51
- `outputSchema` is **required** (4 KB cap). Defaults: `maxToolCalls=7`,
51
+ `outputSchema` is **required** (4 KB cap). Defaults: `maxToolCalls=8`,
52
52
  `maxBudgetUsd=0.05`, `timeoutMs=60000`. Bump up to 15 / 0.50 / 300000
53
53
  for genuinely larger intents.
54
54
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: notion
3
- description: Load when the task touches Notion and Notion is in cross-backend delegated mode (DM session is Gemini CLI; `delegatedBackend` is non-Gemini). All Notion operations flow through `POST /api/integrations/notion/exec`; `/api/notion/*` write/read endpoints are not active in this configuration. The label-resolution endpoint `GET /api/notion/databases` remains available.
3
+ description: Load when the task touches Notion AND Notion is cross-backend delegated from a Gemini CLI DM session (`delegatedBackend` is non-Gemini). All Notion operations flow through `POST /api/integrations/notion/exec`. `GET /api/notion/databases` remains available for label resolution.
4
4
  ---
5
5
 
6
6
  # Notion (delegated, cross-backend)
@@ -48,7 +48,7 @@ The daemon:
48
48
  tool against the per-task allowed-tools envelope, validates the
49
49
  final JSON against your `outputSchema`, returns it.
50
50
 
51
- `outputSchema` is **required** (4 KB cap). Defaults: `maxToolCalls=7`,
51
+ `outputSchema` is **required** (4 KB cap). Defaults: `maxToolCalls=8`,
52
52
  `maxBudgetUsd=0.05`, `timeoutMs=60000`. Bump up to 15 / 0.50 / 300000
53
53
  for genuinely larger intents.
54
54
 
@@ -3,17 +3,12 @@ name: notion
3
3
  description: Load when the user mentions Notion or the agent needs to read, query, search, create, update, or archive Notion pages and databases. Mail is in `mail`; Calendar / external Obsidian / GitHub in `external-services`; scheduling in `schedule`.
4
4
  allowed-tools:
5
5
  - Bash(curl *)
6
- - Bash(jq *)
7
6
  - Read
8
7
  ---
9
8
 
10
9
  # Notion API Reference
11
10
 
12
- Output language: follow `<output_language_policy>`. **Property names**
13
- defined in the user's Notion database are Policy A (the API contract —
14
- never translate them; pass them through verbatim). **Property values**
15
- and page body content the agent fills are Policy C (write in
16
- `<settings primary_language>`).
11
+ Output language: Notion property **names** are Policy A — never translate them; pass them through verbatim as the database defines them. Property **values** and page body content are Policy C (`<settings primary_language>`). See `<output_language_policy>`.
17
12
 
18
13
  Base URL: `http://localhost:8321`. All calls via `curl -s` with
19
14
  `Content-Type: application/json` on POST/PATCH/PUT. URL-encode spaces in paths.
@@ -85,8 +80,9 @@ Moves to trash (~30 days). Restore via `PATCH` with `{ "in_trash": false }`.
85
80
 
86
81
  - During `routine.hourly_check` this skill is **read-only** — no creates,
87
82
  property updates, content patches, or archives.
88
- - No bulk operations without user confirmation.
83
+ - No bulk operations without user confirmation. If you're about to update
84
+ 3+ pages at once, stop and ask the user first.
89
85
  - Writes are Autonomous; the daemon does not DM the owner. Single ops
90
- only — the agent's own judgment is the gate, not the daemon. If you're
91
- about to update 3+ pages at once, stop and ask the user. Call
92
- `POST /api/notify` when the user would want immediate awareness.
86
+ only — the agent's own judgment is the gate, not the daemon. The
87
+ message-discipline contract for any `POST /api/notify` call you issue
88
+ here is in the `notify` skill do not invent ad-hoc phrasing rules.
@@ -1,9 +1,8 @@
1
1
  ---
2
2
  name: notion
3
- description: Load when the task touches Notion and Notion is in native mode bound to Claude (`nativeBackend === "claude"`). Use the in-session Notion connector your harness exposes directly; the daemon does not proxy Notion. `/api/notion/databases` (label → UUID config dump) is the only daemon route still reachable.
3
+ description: Load when the task touches Notion AND Notion is in native mode bound to Claude (`nativeBackend === "claude"`). Use the in-session Notion connector directly; the daemon does not proxy Notion. `/api/notion/databases` (label → UUID dump) is the only daemon route still reachable.
4
4
  allowed-tools:
5
5
  - Bash(curl *)
6
- - Bash(jq *)
7
6
  - Read
8
7
  ---
9
8
 
@@ -12,12 +11,16 @@ allowed-tools:
12
11
  > **Refusal directive — read first.** Notion is in `native` mode bound
13
12
  > to Claude. Do **NOT** call any of:
14
13
  >
15
- > - `POST /api/integrations/notion/exec` (returns `410` with
16
- > `X-Integration-Mode: native`)
17
- > - `POST /api/integrations/notion/reconcile` (410)
18
- > - `/api/notion/query`, `/api/notion/search`, `/api/notion/pages`,
19
- > `/api/notion/pages/<id>/content` (each route-prefix 410 in native
14
+ > - `POST /api/integrations/notion/exec` (returns `409 mode_mismatch`
15
+ > in native mode — this route is NOT route-gated and carries no
16
+ > `X-Integration-Mode` header; `/exec` only succeeds in `delegated`
20
17
  > mode)
18
+ > - `POST /api/integrations/notion/reconcile` (not route-gated either;
19
+ > an LLM-issued notion reconcile returns `400 validation_error` on the
20
+ > window-key allowlist, which is calendar-only)
21
+ > - `/api/notion/query`, `/api/notion/search`, `/api/notion/pages`,
22
+ > `/api/notion/pages/<id>/content` (each route-prefix returns `410`
23
+ > with `X-Integration-Mode: native` — these ARE route-gated)
21
24
  >
22
25
  > Reach Notion through the in-session Notion connector your harness
23
26
  > exposes. Your tool menu lists every available tool at session start
@@ -151,7 +154,7 @@ instead).
151
154
  When `routine.hourly_check.native.claude.md`'s Step 0c fetches recent
152
155
  Notion edits, POST each materialised page to `/api/observations`. The
153
156
  daemon computes `contentHash` server-side via
154
- `@personal-agent/shared/observations-hash.ts`; pass `payload` verbatim.
157
+ `@aitne/shared/observations-hash.ts`; pass `payload` verbatim.
155
158
 
156
159
  **Batch when you have more than one page.** Use
157
160
  `POST /api/observations/batch` with up to 200 items in one
@@ -1,9 +1,8 @@
1
1
  ---
2
2
  name: notion
3
- description: Load when the task touches Notion and Notion is in native mode bound to Codex (`nativeBackend === "codex"`). Use the in-session Notion connector your Codex harness exposes directly; the daemon does not proxy Notion. `/api/notion/databases` (label → UUID config dump) is the only daemon route still reachable.
3
+ description: Load when the task touches Notion AND Notion is in native mode bound to Codex (`nativeBackend === "codex"`). Use the Codex Notion connector directly; daemon does not proxy Notion. `/api/notion/databases` (label → UUID dump) is the only daemon route still reachable.
4
4
  allowed-tools:
5
5
  - Bash(curl *)
6
- - Bash(jq *)
7
6
  - Read
8
7
  ---
9
8
 
@@ -12,11 +11,16 @@ allowed-tools:
12
11
  > **Refusal directive — read first.** Notion is in `native` mode bound
13
12
  > to Codex. Do **NOT** call any of:
14
13
  >
15
- > - `POST /api/integrations/notion/exec` (returns `410` with
16
- > `X-Integration-Mode: native`)
17
- > - `POST /api/integrations/notion/reconcile` (410)
14
+ > - `POST /api/integrations/notion/exec` (returns `409 mode_mismatch`
15
+ > in native mode — this route is NOT route-gated and carries no
16
+ > `X-Integration-Mode` header; `/exec` only succeeds in `delegated`
17
+ > mode)
18
+ > - `POST /api/integrations/notion/reconcile` (not route-gated either;
19
+ > an LLM-issued notion reconcile returns `400 validation_error` on the
20
+ > window-key allowlist, which is calendar-only)
18
21
  > - `/api/notion/query`, `/api/notion/search`, `/api/notion/pages`,
19
- > `/api/notion/pages/<id>/content` (each route-prefix 410)
22
+ > `/api/notion/pages/<id>/content` (each route-prefix returns `410`
23
+ > with `X-Integration-Mode: native` — these ARE route-gated)
20
24
  >
21
25
  > Reach Notion through the in-session Notion connector your harness
22
26
  > exposes. Your tool menu lists every available tool at session start
@@ -1,9 +1,8 @@
1
1
  ---
2
2
  name: notion
3
- description: Load when the task touches Notion and Notion is in native mode bound to Gemini (`nativeBackend === "gemini"`). Use the in-session Notion connector your Gemini harness exposes directly; the daemon does not proxy Notion. `/api/notion/databases` (label → UUID config dump) is the only daemon route still reachable.
3
+ description: Load when the task touches Notion AND Notion is in native mode bound to Gemini (`nativeBackend === "gemini"`). Use the Gemini Notion connector directly; daemon does not proxy Notion. `/api/notion/databases` (label → UUID dump) is the only daemon route still reachable.
4
4
  allowed-tools:
5
5
  - Bash(curl *)
6
- - Bash(jq *)
7
6
  - Read
8
7
  ---
9
8
 
@@ -12,11 +11,16 @@ allowed-tools:
12
11
  > **Refusal directive — read first.** Notion is in `native` mode bound
13
12
  > to Gemini. Do **NOT** call any of:
14
13
  >
15
- > - `POST /api/integrations/notion/exec` (returns `410` with
16
- > `X-Integration-Mode: native`)
17
- > - `POST /api/integrations/notion/reconcile` (410)
14
+ > - `POST /api/integrations/notion/exec` (returns `409 mode_mismatch`
15
+ > in native mode — this route is NOT route-gated and carries no
16
+ > `X-Integration-Mode` header; `/exec` only succeeds in `delegated`
17
+ > mode)
18
+ > - `POST /api/integrations/notion/reconcile` (not route-gated either;
19
+ > an LLM-issued notion reconcile returns `400 validation_error` on the
20
+ > window-key allowlist, which is calendar-only)
18
21
  > - `/api/notion/query`, `/api/notion/search`, `/api/notion/pages`,
19
- > `/api/notion/pages/<id>/content` (each route-prefix 410)
22
+ > `/api/notion/pages/<id>/content` (each route-prefix returns `410`
23
+ > with `X-Integration-Mode: native` — these ARE route-gated)
20
24
  >
21
25
  > Reach Notion through the in-session Notion connector your harness
22
26
  > exposes (typically a user-installed Notion MCP server registered
@@ -8,12 +8,7 @@ allowed-tools:
8
8
 
9
9
  # Observations Review & Source Access
10
10
 
11
- Output language: follow `<output_language_policy>`. This skill routes
12
- observations into other Policy B destinations (`today.md`, `roadmap.md`,
13
- `projects/*.md`) — write-ups inherit the destination file's policy
14
- (English skeleton, body in `<settings primary_language>`) via the
15
- `today` / `roadmap` / `context` / `project-doc` skills you call to land
16
- the update.
11
+ Output language: write-ups inherit the destination file's policy via the `today` / `roadmap` / `context` / `project-doc` skills you call. See `<output_language_policy>`.
17
12
 
18
13
  ## Workflow
19
14
 
@@ -22,8 +17,8 @@ the update.
22
17
  2. Group related observations before acting.
23
18
  3. For each group, apply the **fetch decision** (below) — `summary_text` + `novelty_score` are pre-computed by the daemon's per-observation summarizer; only `novelty_score >= 2` warrants full content fetch.
24
19
  4. Decide actionability:
25
- - Update `today.md` for TODOs, blockers, decisions, or deadlines
26
- - Update `roadmap.md` or `projects/*.md` only for material project-state changes
20
+ - Update `state/today.md` for TODOs, blockers, decisions, or deadlines
21
+ - Update `plans/roadmap.md` or `projects/*.md` only for material project-state changes
27
22
  - Schedule a wake-up if the observation implies a future reminder
28
23
  5. Apply the smallest meaningful set of context updates.
29
24
  6. Mark processed observations consumed via the bulk endpoint
@@ -143,6 +138,16 @@ that caps each curl invocation at one HTTP request and strips heredoc
143
138
  bodies before URL validation. The batch endpoint resolves the
144
139
  cardinality mismatch without weakening either hook.
145
140
 
141
+ > **If `mcp__aitne-observations__submit_observations` is in your allowed
142
+ > tools (the `routine.fetch_window` pre-pass on Claude), submit the batch
143
+ > through that MCP tool instead of the curl below.** The structured
144
+ > transport never goes through the SDK bash preflight, so Unicode-bearing
145
+ > payloads (NBSP/ZWS in subjects, U+3000 in titles) can't trip its
146
+ > `too-complex` gate and cascade to a denied curl / wasted retry /
147
+ > `budget-cap`. The tool input is the same `{"observations":[…]}` envelope
148
+ > and the response is identical. The curl form below is the fallback for
149
+ > sessions without the MCP tool (the hourly check, Codex/Gemini).
150
+
146
151
  ```bash
147
152
  curl -s -X POST http://localhost:8321/api/observations/batch \
148
153
  -H 'Content-Type: application/json' \
@@ -195,8 +200,8 @@ Hard limits:
195
200
  ### POST /api/observations/consume
196
201
 
197
202
  Marks one or more observations consumed. **Bulk-only** — there is no
198
- per-id endpoint (`POST /api/observations/<id>/consume` returns 404).
199
- Always use this shape, even for a single id.
203
+ per-id endpoint (`POST /api/observations/<id>/consume` returns 405
204
+ `use_bulk_endpoint`). Always use this shape, even for a single id.
200
205
 
201
206
  Copy the `correlationId` value verbatim from the
202
207
  `<event_correlation_id>…</event_correlation_id>` tag in your turn
@@ -235,7 +240,9 @@ you to.**
235
240
 
236
241
  ### GET /api/observations/stats
237
242
 
238
- `curl -s http://localhost:8321/api/observations/stats` → `{ "total", "pending", "bySource": {...}, "byActor": {...} }`
243
+ `curl -s http://localhost:8321/api/observations/stats` → `{ "totalPending", "oldestPendingObservedAt", "bySource": [{ "source", "pendingCount", "oldestObservedAt" }], "summaryStatusCounts": {...}, "noveltyDistribution": [...] }`
244
+
245
+ `totalPending` is the single count of unconsumed observations (no separate `total` / `pending` keys). `bySource` is an **array** of per-source rows, not a map. There is no `byActor`. `summaryStatusCounts` / `noveltyDistribution` are summarizer-health telemetry.
239
246
 
240
247
  ---
241
248
 
@@ -272,7 +279,10 @@ current state.
272
279
 
273
280
  <!-- mode:direct:notion -->
274
281
  ```bash
275
- curl -s "http://localhost:8321/api/notion/query?databaseId=xxx"
282
+ # ?database= takes a database LABEL (default "tasks"), not a UUID.
283
+ # An unrecognized label returns 404 notion.database_not_found with the
284
+ # list of valid labels; an absent param silently uses "tasks".
285
+ curl -s "http://localhost:8321/api/notion/query?database=tasks"
276
286
  ```
277
287
  <!-- /mode:direct:notion -->
278
288
  <!-- mode:delegated-same:notion -->
@@ -336,8 +346,9 @@ names and the canonical search / fetch call shapes. Resolve
336
346
  `<databaseId>` first via the un-gated config dump
337
347
  (`curl -s http://localhost:8321/api/notion/databases`) and pass the
338
348
  UUID to the connector's data-source / search tool. Do NOT call
339
- `/api/notion/*` (410) or `/api/integrations/notion/exec` (also 410
340
- in native mode).
349
+ `/api/notion/*` (410) or `/api/integrations/notion/exec` (returns 409
350
+ `mode_mismatch` in native mode — the `/exec` path is not route-gated,
351
+ so it is the handler, not the 410 gate, that rejects it).
341
352
  <!-- /mode:native:notion -->
342
353
  <!-- mode:disabled:notion -->
343
354
  Notion is disabled — there is no live source. Treat the observation
@@ -8,11 +8,7 @@ allowed-tools:
8
8
 
9
9
  # Project Doc
10
10
 
11
- Output language: follow `<output_language_policy>`. Project docs are
12
- Policy B — H2/H3 headers from `agent-assets/templates/projects/` and
13
- `agent-assets/templates/git/` are skeleton (English); body prose,
14
- bullets, and summaries are written in `<settings primary_language>`.
15
- Preserve user-customized headers verbatim.
11
+ Output language: project docs are Policy B — see `<output_language_policy>`. Template H2/H3 headers stay English skeleton; body prose, bullets, and summaries are in `<settings primary_language>`. Preserve user-customized headers verbatim.
16
12
 
17
13
  Use this skill for Git-backed context documents under the unified
18
14
  repositories layout (see
@@ -32,7 +28,7 @@ carries (project keeps `## Lifecycle Phases`, repo-only stays light).
32
28
  ## Hard rules
33
29
 
34
30
  - Write only through `/api/context/*`. Never edit files directly on disk.
35
- - Do not modify `today.md`, `roadmap.md`, `user/*`, `rules/*`, or
31
+ - Do not modify `state/today.md`, `plans/roadmap.md`, `user/*`, `rules/*`, or
36
32
  unrelated context files.
37
33
  - Preserve valid frontmatter. The overview file uses `type: git-project`,
38
34
  the journal file uses `type: git-journal`. Both carry an ISO `updated`
@@ -6,8 +6,8 @@
6
6
  "kind": "knowledge_layout",
7
7
  "anchor": "<!-- CURATION:knowledge_layout id=\"project-shape\" -->",
8
8
  "human_label": "Project / git-repo file shape",
9
- "description": "Required sections in projects/*.md and git-repos/*.md, and what each section holds",
10
- "scope_paths": ["projects/*.md", "git-repos/*.md"]
9
+ "description": "Required sections in git/<slug>/overview.md (git-managed repos) and projects/*.md (non-git manual projects), and what each section holds",
10
+ "scope_paths": ["projects/*.md", "git/*/overview.md"]
11
11
  },
12
12
  {
13
13
  "id": "slug-grammar",
@@ -15,7 +15,7 @@
15
15
  "anchor": "<!-- CURATION:convention_notes id=\"slug-grammar\" -->",
16
16
  "human_label": "Project slug grammar",
17
17
  "description": "Slug format, length cap, reserved stems",
18
- "scope_paths": ["projects/*.md", "git-repos/*.md"]
18
+ "scope_paths": ["projects/*.md", "git/*/overview.md"]
19
19
  }
20
20
  ]
21
21
  }
@@ -14,11 +14,14 @@
14
14
  ]
15
15
  },
16
16
  {
17
- "path": "git-repos/*.md",
18
- "purpose": "Per-repository context for non-project watched repositories",
17
+ "path": "git/*/overview.md",
18
+ "purpose": "Per-repository overview for every git-managed repo (replaces the retired git-repos/*.md layout)",
19
19
  "sections": [
20
- { "heading": "## Activity", "contains": "summarised recent activity for the watched repo" },
21
- { "heading": "## Recent Pushes", "contains": "list of push events with dates and short summaries" }
20
+ { "heading": "## Summary", "contains": "one-paragraph description of the repo and its current state" },
21
+ { "heading": "## Architecture", "contains": "structural notes on the repo's layout and components" },
22
+ { "heading": "## Notable Changes", "contains": "human-readable notes on important commits or decisions" },
23
+ { "heading": "## Open Threads", "contains": "manual prose; follow-ups and pending questions, preserved verbatim" },
24
+ { "heading": "## Daily Activity Log", "contains": "rolling 30-day window of summarised activity" }
22
25
  ]
23
26
  }
24
27
  ]
@@ -4,17 +4,17 @@
4
4
  {
5
5
  "topic": "Slug format",
6
6
  "rule": "Project and repo slugs are kebab-case, lowercase letters with hyphens between words.",
7
- "example": "projects/cost-explorer.md, git-repos/personal-agent.md"
7
+ "example": "plans/projects/cost-explorer.md, git/personal-agent/overview.md"
8
8
  },
9
9
  {
10
10
  "topic": "Slug length",
11
11
  "rule": "Slugs are 32 characters or fewer, including the hyphens but excluding the .md suffix.",
12
- "example": "projects/personal-agent-skills.md is at the upper bound"
12
+ "example": "plans/projects/personal-agent-skills.md is at the upper bound"
13
13
  },
14
14
  {
15
15
  "topic": "Reserved stems",
16
16
  "rule": "Stems _index and _archive are reserved for daemon-maintained files and not in use as project slugs.",
17
- "example": "projects/_index.md is a directory listing, not a project file"
17
+ "example": "plans/projects/_index.md is a directory listing, not a project file"
18
18
  }
19
19
  ]
20
20
  }
@@ -156,9 +156,19 @@ Response:
156
156
 
157
157
  Update book status, rating, or notes.
158
158
 
159
+ **Approve tier (Bearer required).** This is an operator/dashboard-gated
160
+ write — an autonomous agent curl from a session workdir carries no
161
+ `Authorization: Bearer` header and will be rejected with **401** before
162
+ the handler runs. Do NOT call this autonomously and do NOT assume the
163
+ update landed; book status/rating/notes corrections are made by the user
164
+ via the dashboard. (Body shape, for reference: `status` enum
165
+ `reading|completed|abandoned`, `rating` 1-5, `notes`.)
166
+
159
167
  ```bash
168
+ # Operator/dashboard-only — requires Authorization: Bearer (Approve tier).
160
169
  curl -s -X PATCH "http://localhost:8321/api/books/1" \
161
170
  -H "Content-Type: application/json" \
171
+ -H "Authorization: Bearer <operator-token>" \
162
172
  -d '{"status": "completed", "rating": 4}'
163
173
  ```
164
174
 
@@ -185,8 +195,8 @@ Currently reading: 3
185
195
  New highlights: 34
186
196
 
187
197
  ### Completed This Month
188
- 1. "Deep Work" by Cal Newport — ★★★★★
189
- 2. "Atomic Habits" by James Clear — ★★★★
198
+ 1. "Deep Work" by Cal Newport — rating: 5/5
199
+ 2. "Atomic Habits" by James Clear — rating: 4/5
190
200
 
191
201
  ### Currently Reading
192
202
  - "Thinking, Fast and Slow" by Daniel Kahneman (47 highlights)
@@ -146,12 +146,12 @@ the sweep to write the refreshed metadata and YAML `updated` date.
146
146
 
147
147
  ### First-write registration (_index.md)
148
148
 
149
- The `user/_index.md` file indexes available topic files. When
149
+ The `identity/_index.md` file indexes available topic files. When
150
150
  creating `reading-taste.md` for the first time (GET returned 404),
151
151
  append a one-line entry to the index so other flows can discover it:
152
152
 
153
153
  ```bash
154
- curl -s -X PATCH http://localhost:8321/api/context/user/_index \
154
+ curl -s -X PATCH http://localhost:8321/api/context/identity/_index \
155
155
  -H 'Content-Type: application/json' \
156
156
  -d '{"section": "topics", "mode": "append", "content": "- reading-taste — derived taste profile + rolling book candidates (updated weekly)"}'
157
157
  ```