@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
@@ -8,14 +8,18 @@ aliases:
8
8
  - sunday review
9
9
  category: features
10
10
  summary: |
11
- Once a week, the agent reads the past seven days of journal
12
- entries, completed tasks, and roadmap progress, then writes a
13
- weekly retro into the weekly/ directory.
11
+ Once a week (Friday evening), the agent reads the current ISO
12
+ week's daily journal entries, the week's calendar retrospective,
13
+ and roadmap progress, then writes a weekly retro into
14
+ journal/weekly/YYYY-Www.md. Its Carry Over / Next Week Focus /
15
+ Lessons sections are lifted into every morning routine of the
16
+ following ISO week.
14
17
  section: routines
15
18
  tags:
16
- - routine
19
+ - routines
17
20
  - autonomous
18
- - light-tier
21
+ - journal
22
+ - reflection
19
23
  status: stable
20
24
  ask_examples:
21
25
  - When does the weekly review run?
@@ -23,48 +27,89 @@ ask_examples:
23
27
  - Where do weekly retros get stored?
24
28
  locale: en-US
25
29
  created: 2026-04-25
26
- updated: 2026-04-25
30
+ updated: 2026-05-28
31
+ keywords:
32
+ - weekly review
33
+ - Friday review
34
+ - week roll-up
35
+ - agent week
36
+ - ISO week
37
+ - next week focus
27
38
  related:
28
39
  - concepts/routines
40
+ - features/routines/evening-review
29
41
  - features/memory-files/agent-journal
30
42
  process_keys:
31
43
  - routine.weekly_review
44
+ config_keys:
45
+ - timezone
46
+ - dayBoundaryHour
47
+ ui_anchors:
48
+ - /settings/models
49
+ - /settings/routines
50
+ context_files:
51
+ - journal/weekly/YYYY-Www.md
52
+ - journal/agent.md
32
53
  ---
33
54
 
34
55
  # Weekly Review
35
56
 
36
57
  ## In One Sentence
37
58
 
38
- A light-tier weekly retro fires once per week and writes a synthesis
39
- into `weekly/<YYYY-MM-DD>.md`.
59
+ A medium-tier weekly retro fires every Friday evening and writes a
60
+ synthesis into `journal/weekly/YYYY-Www.md` (ISO week), whose
61
+ **Carry Over / Next Week Focus / Lessons** sections are then lifted
62
+ into every morning routine of the following ISO week.
40
63
 
41
64
  ## What It Does
42
65
 
43
- - Reads journal entries since the last weekly retro.
44
- - Reads completed tasks and roadmap movement.
45
- - Writes a synthesis: what shipped, what slipped, what surprised.
66
+ - Reads each `journal/daily/YYYY-MM-DD.md` for the current ISO week,
67
+ the week's calendar retrospective, the roadmap, and active projects.
68
+ - Synthesizes three axes Outcomes, Forward items, Behavioral
69
+ Lessons — and writes the user-facing snapshot.
70
+ - Appends an agent-internal block to `journal/agent.md` for
71
+ self-critique, filter quality, and improvement ideas.
72
+ - Sends a brief Friday-evening notification by default (the silence
73
+ gate triggers only on an essentially blank week).
74
+ - Refreshes `identity/reading-taste.md` and Book Candidates when
75
+ enough new highlights have accumulated.
46
76
 
47
77
  ## When It Runs / How It Is Triggered
48
78
 
49
- Every **Friday at 18:00 local time**. The schedule is fixed in
50
- `packages/daemon/src/core/scheduler.ts` and is not operator-configurable.
79
+ Every **Friday at 19:00 local time** (one hour after `evening_review`).
80
+ The schedule is fixed in `packages/daemon/src/core/scheduler.ts` and is
81
+ not operator-configurable. If the Friday fire misses (daemon outage),
82
+ the **Fri / Sat / Sun catch-up window** in `schedule-helpers.ts` fires
83
+ the retro when the daemon recovers, before the new ISO week begins —
84
+ a Mon–Thu catch-up is intentionally out of scope so the next week's
85
+ `<previous_week>` injection stays stable Mon–Sun.
51
86
 
52
87
  ## What It Outputs
53
88
 
54
- - One file per week under `~/.personal-agent/context/weekly/`.
89
+ - One file per week under `~/.personal-agent/context/journal/weekly/YYYY-Www.md`
90
+ (zero-padded ISO week, e.g. `2026-W19.md`).
91
+ - A `## Weekly YYYY-Www` block appended to
92
+ `~/.personal-agent/context/journal/agent.md`.
55
93
 
56
94
  ## Configuration
57
95
 
58
- This routine has no operator-tunable knobs. The fire time, day-of-week,
59
- and tier are fixed in code.
96
+ The fire time (Friday 19:00 local) and day-of-week are fixed in code
97
+ and are not operator-tunable. The backend and model that handle this
98
+ routine, however, are configurable: `routine.weekly_review` is a
99
+ configurable process key (default **medium** tier — Sonnet on Claude)
100
+ that you can repoint from **Settings → Models**.
60
101
 
61
102
  ## When Something Goes Wrong
62
103
 
63
- - The retro **doesn't fire**: catch-up does not span more than one
64
- week if the daemon was offline for several days the retro is
65
- skipped.
104
+ - The retro **doesn't fire on Friday**: the Fri–Sun catch-up window
105
+ retries on Saturday and Sunday agent-days. A full Fri–Sun outage
106
+ results in a missing weekly file; the next week's morning routines
107
+ proceed without the `<previous_week>` block.
108
+ - The retro **runs but the file is empty** (silence gate): legitimate
109
+ for a blank week — the file is still written with empty sections,
110
+ and the next week's morning routine sees `(none recorded)` sub-
111
+ blocks, which is the deliberate downstream signal.
66
112
 
67
113
  ## Related
68
114
 
69
115
  - [Evening Review](evening-review.md)
70
- - [Monthly Review](monthly-review.md)
@@ -22,6 +22,7 @@ section: wiki
22
22
  tags:
23
23
  - wiki
24
24
  - bang-commands
25
+ - core
25
26
  status: stable
26
27
  ask_examples:
27
28
  - How do I send a URL to the wiki?
@@ -33,7 +34,17 @@ ask_examples:
33
34
  - How do I bridge two domains with `!connect`?
34
35
  locale: en-US
35
36
  created: 2026-05-12
36
- updated: 2026-05-12
37
+ updated: 2026-05-28
38
+ keywords:
39
+ - !ingest
40
+ - !compile
41
+ - !ask
42
+ - !lint
43
+ - !trace
44
+ - !connect
45
+ - !wiki
46
+ - bang commands
47
+ - wiki commands
37
48
  related:
38
49
  - features/wiki/overview
39
50
  - features/messaging/bang-commands
@@ -41,18 +52,24 @@ related:
41
52
  - guides/maintain-wiki-health
42
53
  - guides/explore-with-trace-and-connect
43
54
  - troubleshooting/wiki-ingest-full-blocked
55
+ process_keys:
56
+ - wiki.ingest_url
57
+ - wiki.compile
58
+ - wiki.ask
59
+ - wiki.lint
60
+ - wiki.trace
61
+ - wiki.connect
44
62
  ui_anchors:
45
63
  - /wiki
46
64
  - /wiki/timeline
47
65
  - /settings/wiki
48
- - /approvals
49
66
  ---
50
67
 
51
68
  # Wiki Commands
52
69
 
53
- Use these from a paired DM channel after enabling the wiki — open
54
- **Setup → Settings → Wiki** to enable, then browse from **My Life →
55
- Wiki**.
70
+ Use these from a paired DM channel after enabling the wiki. Open
71
+ **Settings → Wiki** (`/settings/wiki`) to enable a workspace, then
72
+ browse the result from **My Life → Wiki** (`/wiki`).
56
73
 
57
74
  | Command | Effect |
58
75
  |---|---|
@@ -114,29 +131,32 @@ Settings → Wiki:
114
131
 
115
132
  - **Parallel** (default): all URLs fan out simultaneously up to the
116
133
  per-URL concurrency cap. Fastest; small risk of bursting rate
117
- limits at the URL host.
134
+ limits at the URL host. Each URL replies on its own completion.
118
135
  - **Serial**: URLs are enqueued in submitted order; each agent
119
136
  session starts only after the previous one completes. Slower but
120
- predictable budget and rate.
137
+ predictable budget and rate. You get a single consolidated reply
138
+ when the whole batch finishes.
121
139
 
122
- The acknowledgement DM tells you which mode ran
123
- (`in parallel` / `serially`).
140
+ The acknowledgement DM names the mode that ran (`in parallel` /
141
+ `serially`).
124
142
 
125
143
  ## `!compile full` — the Cost Gate
126
144
 
127
145
  Full rebuilds touch every wiki note and are the most expensive
128
146
  command in the wiki surface. The flow:
129
147
 
130
- 1. The bang handler estimates the cost (raw count × assumed input
131
- tokens × Sonnet unit cost, bracketed at 0.5× / 1× / 2×).
148
+ 1. The bang handler estimates the cost (raw note count × assumed
149
+ input tokens × Sonnet 4.6 input price, bracketed optimistic 0.5× /
150
+ expected 1× / pessimistic 2×).
132
151
  2. On an external git-tracked vault with **Auto-commit before
133
152
  `!compile full`** enabled and a clean working tree, Aitne runs
134
153
  `git add -A && git commit -m "aitne wiki: pre-compile snapshot <ts>"`
135
154
  before continuing. A dirty tree refuses the operation — commit or
136
155
  stash first.
137
- 3. If the pessimistic estimate exceeds your per-workspace approval
138
- threshold (default $2.00), the run is queued under **Approvals**
139
- in the dashboard. Approve from `/approvals` to start the compile.
156
+ 3. If the pessimistic estimate (expected spend × 2) exceeds your
157
+ per-workspace approval threshold (default $2.00), the run is queued
158
+ for approval. Open **Settings → Wiki** (`/settings/wiki`) and
159
+ confirm it in the Approvals queue there to start the compile.
140
160
  4. Otherwise, the run starts autonomously and you receive a
141
161
  completion DM with actual spend.
142
162
 
@@ -214,9 +234,10 @@ finding is itself useful.
214
234
 
215
235
  When no active wiki workspace exists, every `wiki.*`-routed bang
216
236
  command (`!ingest`, `!compile`, `!ask`, `!lint`, `!trace`, `!connect`)
217
- replies with:
237
+ replies with a message like:
218
238
 
219
- > Wiki is not enabled. Open `/settings/wiki` to enable.
239
+ > Wiki is not enabled. Open `/settings/wiki` to enable the internal
240
+ > workspace.
220
241
 
221
242
  `!wiki help` is exempt — it returns the command list regardless of
222
243
  enablement so you can discover the surface before opting in.
@@ -0,0 +1,240 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: features/wiki/cost-and-approval
4
+ title: Wiki Cost Estimation and Approval Flow
5
+ id: wiki-cost-and-approval
6
+ aliases:
7
+ - wiki cost
8
+ - wiki approval
9
+ - !compile full approval
10
+ - wiki cost gate
11
+ - wiki cost estimate
12
+ - wiki budget
13
+ - wiki precompile snapshot
14
+ - git pre-compile
15
+ category: features
16
+ summary: |
17
+ How Aitne predicts the cost of a `!compile full` run, when the cost
18
+ gate escalates to the dashboard approval queue, and how the
19
+ pre-compile git snapshot interacts with both. Also covers the
20
+ `--preview` dry-run and how the same estimator powers the
21
+ per-workspace cost banner in `/settings/wiki`.
22
+ section: wiki
23
+ tags:
24
+ - wiki
25
+ - cost
26
+ - approval
27
+ - safety
28
+ - core
29
+ status: stable
30
+ ask_examples:
31
+ - How does !compile full estimate cost?
32
+ - When does !compile full need approval?
33
+ - How do I change the wiki approval threshold?
34
+ - What happens if my Obsidian vault is dirty before !compile full?
35
+ - Does !compile or !ingest need approval?
36
+ - How accurate is the wiki cost estimate?
37
+ - What is the pre-compile git snapshot?
38
+ - Why is my !compile full sitting in /approvals?
39
+ - Can I see the cost before running !compile full?
40
+ locale: en-US
41
+ created: 2026-05-21
42
+ updated: 2026-05-28
43
+ keywords:
44
+ - cost estimate
45
+ - cost bracket
46
+ - 0.5x
47
+ - 2x
48
+ - bracketed cost
49
+ - approval threshold
50
+ - !compile full
51
+ - approval queue
52
+ - /approvals
53
+ - dashboard approval
54
+ - git pre-compile
55
+ - pre-compile snapshot
56
+ - dirty working tree
57
+ - cost banner
58
+ - compile preview
59
+ - --preview
60
+ - --dry-run
61
+ - char to token
62
+ - token approximation
63
+ - CJK token ratio
64
+ related:
65
+ - features/wiki/overview
66
+ - features/wiki/commands
67
+ - features/wiki/workspaces
68
+ - features/operations/approvals
69
+ - concepts/costs-and-quotas
70
+ - guides/budget-and-cost-for-wiki
71
+ - troubleshooting/wiki-ingest-full-blocked
72
+ ui_anchors:
73
+ - /settings/wiki
74
+ - /
75
+ api_endpoints:
76
+ - /api/wiki/:workspace/estimate
77
+ - /api/wiki/:workspace/compile/preview
78
+ - /api/wiki/:workspace/git/status
79
+ - /api/approvals
80
+ process_keys:
81
+ - wiki.compile
82
+ config_keys:
83
+ - full_compile_approval_threshold_usd
84
+ ---
85
+
86
+ # Wiki Cost Estimation and Approval Flow
87
+
88
+ `!compile full` is the most expensive command in the wiki surface
89
+ because it touches every raw note in the workspace and rewrites the
90
+ canonical wiki pages from scratch. Aitne predicts the cost before
91
+ the run starts and gates the actual execution behind an approval
92
+ threshold you control per workspace.
93
+
94
+ The same estimator backs four surfaces so the numbers cannot drift:
95
+
96
+ - `GET /api/wiki/:workspace/estimate` — the dashboard banner in
97
+ `/settings/wiki` reads from here so you can see what the next
98
+ `!compile full` will cost before running it.
99
+ - `GET /api/wiki/:workspace/compile/preview` — the `--preview`
100
+ dry-run.
101
+ - The `!compile` / `!compile full` bang handler — uses the same
102
+ estimate to decide whether the run starts autonomously or
103
+ escalates to approvals.
104
+ - The DM acknowledgement message — quotes the bracketed estimate
105
+ back to the user.
106
+
107
+ ## How the estimator works
108
+
109
+ Pure JS, no agent session, no SDK call. The estimator
110
+ (`packages/daemon/src/core/wiki/cost-estimate.ts`) opens each raw
111
+ note under `10_raw/`, approximates its token count from on-disk
112
+ content, then multiplies the total by the tier unit cost and
113
+ brackets with 0.5×/2× multipliers.
114
+
115
+ ### Character → token approximation
116
+
117
+ - **Latin / English content** — ~4 chars per token. The well-known
118
+ OpenAI rule-of-thumb; matches Anthropic's tokenizer within ±15%
119
+ for prose; confirmed against the gpt-tokenizer dist.
120
+ - **CJK content** — ~1.5 chars per token. BPE merges short CJK runs
121
+ but not as aggressively as Latin word fragments.
122
+
123
+ The classifier counts Unicode code points whose script is one of
124
+ Han, Hiragana, Katakana, Hangul, Bopomofo. If the document is
125
+ majority-CJK we apply the CJK divisor to the entire file; otherwise
126
+ Latin. A per-script split per file would be marginally more accurate
127
+ but adds 30% code for a sub-percent gain on typical mixed-script
128
+ files.
129
+
130
+ ### The 0.5×/2× bracket
131
+
132
+ The estimator never returns a single number. It always returns three:
133
+
134
+ | Field | Meaning |
135
+ |---|---|
136
+ | `expectedUsd` | The point estimate: total approximated tokens × tier input cost. |
137
+ | `optimisticUsd` | 0.5× `expectedUsd` — the "everything compresses well, the LLM exits early" scenario. |
138
+ | `pessimisticUsd` | 2× `expectedUsd` — the "the LLM rewrites every page from scratch" scenario. **The approval gate compares this against your threshold.** |
139
+
140
+ The bracket is wide on purpose. `!compile` is an LLM and may merge
141
+ or skip pages inside the agent loop in ways the estimator cannot
142
+ predict from on-disk content alone — but the pessimistic bound will
143
+ not undercount the actual touch set.
144
+
145
+ (History: P2 originally shipped a flat `rawCount × 1500` heuristic.
146
+ P4.C upgraded to the per-file char→token approximation above because
147
+ the flat heuristic under-counted on long ingested articles and
148
+ over-counted on one-line stubs.)
149
+
150
+ ## The cost gate
151
+
152
+ The `!compile full` flow:
153
+
154
+ 1. **Estimate** — bang handler calls the estimator.
155
+ 2. **Pre-compile snapshot** — on an external git-tracked vault with
156
+ `git_pre_compile_enabled = 1` (the default) and a clean working
157
+ tree, Aitne runs `git add -A && git commit -m "aitne wiki:
158
+ pre-compile snapshot <ts>"` before continuing. A dirty tree
159
+ refuses the operation — commit or stash first, then re-run.
160
+ 3. **Threshold check** — if `pessimisticUsd` ≤ the workspace's
161
+ `full_compile_approval_threshold_usd` (default $2.00), the run
162
+ starts autonomously.
163
+ 4. **Approval** — if `pessimisticUsd` > the threshold, the run is
164
+ queued under the **Approvals** panel on the dashboard home (`/`).
165
+ The acknowledgement DM links there; approve from the dashboard to
166
+ start the compile.
167
+ 5. **Completion** — a completion DM lands with the actual spend (not
168
+ the estimate). Significant overshoots are flagged in the audit
169
+ row.
170
+
171
+ `!compile` (incremental) does not go through the cost gate — it's
172
+ only invoked when raw notes have changed since the last compile, and
173
+ its budget envelope is bounded by the per-process `maxBudgetUsd`
174
+ (default $5.00). The same applies to `!ingest`, `!ask`, `!lint`,
175
+ `!trace`, `!connect`.
176
+
177
+ ## Changing the threshold
178
+
179
+ Per workspace, in `/settings/wiki` — the **Approval threshold (USD)**
180
+ input. The value lives on `wiki_workspaces.full_compile_approval_threshold_usd`
181
+ with a CHECK constraint `> 0`. Setting it lower escalates more runs
182
+ to manual approval; setting it higher trusts the estimator more.
183
+
184
+ A common pattern: start at $2.00, watch the spend on the next
185
+ `!compile full`, then dial up or down based on how close the
186
+ estimate landed to the actual cost.
187
+
188
+ ## The pre-compile git snapshot
189
+
190
+ Only meaningful on an **external + git-tracked** vault. The gate
191
+ decides:
192
+
193
+ | Workspace state | Outcome |
194
+ |---|---|
195
+ | Internal mode | Skip (`NotApplicable`). The `md_file_snapshots` mechanism is the recovery surface. |
196
+ | External, not a git repo | Skip (`NoBackup`). The approval-gate DM tells you no git backup was taken. |
197
+ | External + git, `git_pre_compile_enabled = 0` | Skip (`Disabled`). |
198
+ | External + git, **dirty** working tree | **Refused.** The bang handler aborts with a DM telling you to commit or stash first; no agent session is spawned. |
199
+ | External + git, clean working tree | Run `git add -A` + `git commit -m "aitne wiki: pre-compile snapshot <ts>"`. Operator git hooks fire as normal (no `--no-verify`). |
200
+
201
+ The snapshot is your rollback target if `!compile full` produces a
202
+ surprise — `git reset --hard <snapshot-commit>` puts the vault back.
203
+
204
+ The pre-compile commit uses no special author identity; it lands
205
+ under whatever git is configured to use. If you co-author with
206
+ Aitne, you'll want to set that up at the git config level.
207
+
208
+ ## The `--preview` dry-run
209
+
210
+ `!compile --preview` (alias: `--dry-run`) calls
211
+ `GET /api/wiki/:workspace/compile/preview` to show what `!compile`
212
+ would do without spending tokens:
213
+
214
+ - **added** — wiki pages that would be created (raws with no
215
+ existing wiki match).
216
+ - **modified** — wiki pages that would be rewritten (raws whose
217
+ slug matches an existing wiki page).
218
+ - **unchanged** — wiki pages the compile is expected to skip.
219
+ - **est. cost** — Optimistic / pessimistic bracket plus expected
220
+ spend.
221
+ - **est. duration** — Rough wall-clock estimate (intentionally
222
+ pessimistic).
223
+
224
+ The preview is an upper bound for the same reason the cost bracket is
225
+ (the compile is an LLM and may merge or skip pages mid-loop), but it
226
+ will not undercount the touch set. Reply `!compile` (or `!compile
227
+ full`) to actually run.
228
+
229
+ The preview is free — no agent session runs, no tokens spent.
230
+
231
+ ## See also
232
+
233
+ - [features/wiki/commands](commands.md) for the user-facing reference
234
+ of every wiki bang command.
235
+ - [features/wiki/workspaces](workspaces.md) for where the per-workspace
236
+ threshold and git toggle live in `/settings/wiki`.
237
+ - [features/operations/approvals](../operations/approvals.md) for the
238
+ general dashboard approval flow.
239
+ - [guides/budget-and-cost-for-wiki](../../guides/budget-and-cost-for-wiki.md)
240
+ for the operator-level "tune the budget" walkthrough.