@aitne-sh/aitne 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/README.md +251 -164
  2. package/agent-assets/agent-profiles/_safety.md +3 -3
  3. package/agent-assets/agent-profiles/browser-task.md +108 -0
  4. package/agent-assets/agent-profiles/conversational.md +3 -3
  5. package/agent-assets/agent-profiles/profile-importer.md +2 -2
  6. package/agent-assets/agent-profiles/routine-fetch-window.md +30 -19
  7. package/agent-assets/agents/context-index-reconcile/agent.md +52 -0
  8. package/agent-assets/agents/evening-review/agent.md +53 -0
  9. package/agent-assets/agents/hourly-check/agent.md +62 -0
  10. package/agent-assets/agents/monthly-review/agent.md +55 -0
  11. package/agent-assets/agents/morning-routine/agent.md +78 -0
  12. package/agent-assets/agents/roadmap-maintenance/agent.md +52 -0
  13. package/agent-assets/agents/skill-curation/agent.md +52 -0
  14. package/agent-assets/agents/user-profile-sweep-evening/agent.md +48 -0
  15. package/agent-assets/agents/user-profile-sweep-morning/agent.md +53 -0
  16. package/agent-assets/agents/weekly-review/agent.md +51 -0
  17. package/agent-assets/docs/concepts/agent-day.md +13 -11
  18. package/agent-assets/docs/concepts/auth-health.md +47 -10
  19. package/agent-assets/docs/concepts/backends-and-tiers.md +66 -31
  20. package/agent-assets/docs/concepts/costs-and-quotas.md +51 -15
  21. package/agent-assets/docs/concepts/delegated-mode.md +56 -17
  22. package/agent-assets/docs/concepts/memory-model.md +77 -34
  23. package/agent-assets/docs/concepts/observations.md +49 -11
  24. package/agent-assets/docs/concepts/process-keys.md +56 -22
  25. package/agent-assets/docs/concepts/routines.md +60 -33
  26. package/agent-assets/docs/concepts/safety-and-execution.md +50 -21
  27. package/agent-assets/docs/concepts/safety-model.md +61 -50
  28. package/agent-assets/docs/concepts/skills.md +34 -18
  29. package/agent-assets/docs/features/integrations/browser-history.md +196 -0
  30. package/agent-assets/docs/features/integrations/calendar.md +39 -29
  31. package/agent-assets/docs/features/integrations/git.md +18 -7
  32. package/agent-assets/docs/features/integrations/github.md +84 -33
  33. package/agent-assets/docs/features/integrations/mail.md +61 -17
  34. package/agent-assets/docs/features/integrations/notion.md +18 -6
  35. package/agent-assets/docs/features/integrations/obsidian.md +28 -5
  36. package/agent-assets/docs/features/lifestyle/git.md +44 -40
  37. package/agent-assets/docs/features/lifestyle/reading.md +57 -22
  38. package/agent-assets/docs/features/lifestyle/receipts.md +51 -21
  39. package/agent-assets/docs/features/lifestyle/travel-bookings.md +77 -14
  40. package/agent-assets/docs/features/memory-files/agent-journal.md +132 -53
  41. package/agent-assets/docs/features/memory-files/agent-lessons.md +177 -0
  42. package/agent-assets/docs/features/memory-files/projects.md +73 -17
  43. package/agent-assets/docs/features/memory-files/roadmap.md +54 -11
  44. package/agent-assets/docs/features/memory-files/schedule.md +113 -70
  45. package/agent-assets/docs/features/memory-files/today.md +46 -21
  46. package/agent-assets/docs/features/memory-files/user-profile.md +63 -33
  47. package/agent-assets/docs/features/messaging/bang-commands.md +113 -36
  48. package/agent-assets/docs/features/messaging/dashboard-chat.md +43 -21
  49. package/agent-assets/docs/features/messaging/discord.md +35 -4
  50. package/agent-assets/docs/features/messaging/overview.md +37 -19
  51. package/agent-assets/docs/features/messaging/pairing-and-magic-phrase.md +94 -27
  52. package/agent-assets/docs/features/messaging/slack.md +67 -14
  53. package/agent-assets/docs/features/messaging/telegram.md +22 -8
  54. package/agent-assets/docs/features/messaging/whatsapp.md +71 -17
  55. package/agent-assets/docs/features/operations/activity-and-conversations.md +45 -15
  56. package/agent-assets/docs/features/operations/approvals.md +49 -16
  57. package/agent-assets/docs/features/operations/backend-routing.md +68 -16
  58. package/agent-assets/docs/features/operations/cost-tracking.md +84 -17
  59. package/agent-assets/docs/features/operations/managed-chromium.md +222 -0
  60. package/agent-assets/docs/features/operations/notifications.md +52 -11
  61. package/agent-assets/docs/features/operations/quiet-hours.md +64 -40
  62. package/agent-assets/docs/features/operations/schedule-approaching.md +54 -24
  63. package/agent-assets/docs/features/routines/custom-routines.md +98 -26
  64. package/agent-assets/docs/features/routines/evening-review.md +82 -21
  65. package/agent-assets/docs/features/routines/hourly-check.md +149 -29
  66. package/agent-assets/docs/features/routines/morning-routine.md +54 -35
  67. package/agent-assets/docs/features/routines/weekly-review.md +46 -21
  68. package/agent-assets/docs/features/wiki/commands.md +26 -16
  69. package/agent-assets/docs/features/wiki/cost-and-approval.md +241 -0
  70. package/agent-assets/docs/features/wiki/dashboard.md +256 -0
  71. package/agent-assets/docs/features/wiki/overview.md +70 -12
  72. package/agent-assets/docs/features/wiki/search.md +248 -0
  73. package/agent-assets/docs/features/wiki/workspaces.md +254 -0
  74. package/agent-assets/docs/getting-started/01-what-is-this.md +34 -23
  75. package/agent-assets/docs/getting-started/02-first-steps.md +17 -10
  76. package/agent-assets/docs/getting-started/03-what-can-this-do.md +25 -14
  77. package/agent-assets/docs/getting-started/04-first-day.md +39 -21
  78. package/agent-assets/docs/glossary.md +235 -24
  79. package/agent-assets/docs/guides/add-a-custom-routine.md +63 -23
  80. package/agent-assets/docs/guides/backup-and-restore.md +80 -16
  81. package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +57 -26
  82. package/agent-assets/docs/guides/build-your-wiki.md +22 -9
  83. package/agent-assets/docs/guides/change-which-model-handles-x.md +64 -10
  84. package/agent-assets/docs/guides/connect-a-new-mail-account.md +66 -15
  85. package/agent-assets/docs/guides/explore-with-trace-and-connect.md +32 -14
  86. package/agent-assets/docs/guides/import-knowledge-file.md +50 -40
  87. package/agent-assets/docs/guides/install-and-run.md +49 -20
  88. package/agent-assets/docs/guides/maintain-wiki-health.md +35 -10
  89. package/agent-assets/docs/guides/migrate-machines.md +74 -18
  90. package/agent-assets/docs/guides/multiple-wikis-for-multiple-domains.md +111 -60
  91. package/agent-assets/docs/guides/pause-the-agent.md +69 -24
  92. package/agent-assets/docs/guides/reinstall-cleanly.md +88 -18
  93. package/agent-assets/docs/guides/setup-wizard.md +116 -54
  94. package/agent-assets/docs/guides/switch-default-backend.md +62 -16
  95. package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +30 -14
  96. package/agent-assets/docs/reference/api.md +153 -32
  97. package/agent-assets/docs/reference/cli-commands.md +39 -18
  98. package/agent-assets/docs/reference/config.md +241 -49
  99. package/agent-assets/docs/reference/disallowed-tools.md +34 -13
  100. package/agent-assets/docs/reference/keyboard-shortcuts.md +34 -10
  101. package/agent-assets/docs/reference/knowledge-layout.md +629 -0
  102. package/agent-assets/docs/reference/process-keys.md +62 -6
  103. package/agent-assets/docs/reference/skills.md +41 -14
  104. package/agent-assets/docs/troubleshooting/auth-failed.md +51 -21
  105. package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +97 -28
  106. package/agent-assets/docs/troubleshooting/fallback-keeps-firing.md +86 -22
  107. package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +68 -24
  108. package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +80 -20
  109. package/agent-assets/docs/troubleshooting/observation-not-detected.md +73 -21
  110. package/agent-assets/docs/troubleshooting/quota-exhausted.md +33 -8
  111. package/agent-assets/docs/troubleshooting/wiki-ingest-full-blocked.md +126 -54
  112. package/agent-assets/docs/troubleshooting/wiki-write-failed.md +29 -12
  113. package/agent-assets/optimizer-skills/drift-analysis/SKILL.md +1 -1
  114. package/agent-assets/optimizer-skills/knowledge-map/SKILL.md +1 -1
  115. package/agent-assets/optimizer-skills/skill-curation/SKILL.md +1 -1
  116. package/agent-assets/sandbox/linux/aitne-chromium.apparmor +91 -0
  117. package/agent-assets/sandbox/macos/aitne-chromium.sb +156 -0
  118. package/agent-assets/skills/agent-actions/SKILL.md +25 -41
  119. package/agent-assets/skills/agent-create/SKILL.md +158 -0
  120. package/agent-assets/skills/attach/SKILL.md +10 -29
  121. package/agent-assets/skills/browser-history/SKILL.md +211 -0
  122. package/agent-assets/skills/browser-history-respond/SKILL.md +111 -0
  123. package/agent-assets/skills/browser-task/SKILL.md +164 -0
  124. package/agent-assets/skills/context/SKILL.md +35 -44
  125. package/agent-assets/skills/context/curation.json +14 -14
  126. package/agent-assets/skills/context/references/api.md +52 -40
  127. package/agent-assets/skills/context/references/required-frontmatter.md +13 -12
  128. package/agent-assets/skills/context/references/snapshot-files.md +18 -17
  129. package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +8 -8
  130. package/agent-assets/skills/context/seeds/frontmatter-requirements.seed.json +3 -3
  131. package/agent-assets/skills/docs-search/SKILL.md +23 -34
  132. package/agent-assets/skills/external-services/SKILL.delegated.claude.md +17 -114
  133. package/agent-assets/skills/external-services/SKILL.delegated.codex.md +17 -113
  134. package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +17 -113
  135. package/agent-assets/skills/external-services/SKILL.md +3 -3
  136. package/agent-assets/skills/external-services/SKILL.native.claude.md +7 -7
  137. package/agent-assets/skills/external-services/SKILL.native.codex.md +7 -7
  138. package/agent-assets/skills/external-services/SKILL.native.gemini.md +4 -4
  139. package/agent-assets/skills/external-services/references/calendar-apple.md +2 -2
  140. package/agent-assets/skills/external-services/references/calendar-outlook.md +1 -1
  141. package/agent-assets/skills/external-services/references/exec-errors.md +32 -0
  142. package/agent-assets/skills/external-services/references/obsidian.md +2 -2
  143. package/agent-assets/skills/external-services/references/skills-crud.md +5 -5
  144. package/agent-assets/skills/gmail-lifestyle/SKILL.md +11 -83
  145. package/agent-assets/skills/gmail-lifestyle/references/receipts-api.md +4 -0
  146. package/agent-assets/skills/gmail-lifestyle/references/travel-bookings-api.md +9 -0
  147. package/agent-assets/skills/mail/SKILL.delegated.claude.md +15 -18
  148. package/agent-assets/skills/mail/SKILL.delegated.codex.md +11 -6
  149. package/agent-assets/skills/mail/SKILL.delegated.gemini.md +11 -6
  150. package/agent-assets/skills/mail/SKILL.md +10 -18
  151. package/agent-assets/skills/mail/SKILL.native.claude.md +8 -7
  152. package/agent-assets/skills/mail/SKILL.native.codex.md +1 -1
  153. package/agent-assets/skills/mail/SKILL.native.gemini.md +1 -1
  154. package/agent-assets/skills/mail/references/api.md +10 -3
  155. package/agent-assets/skills/mail/references/examples.md +2 -1
  156. package/agent-assets/skills/mail/references/providers.md +1 -1
  157. package/agent-assets/skills/managed-tasks/SKILL.md +48 -81
  158. package/agent-assets/skills/managed-tasks/references/errors.md +33 -19
  159. package/agent-assets/skills/managed-tasks/references/output-path.md +33 -17
  160. package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +7 -5
  161. package/agent-assets/skills/management-policy/SKILL.md +42 -42
  162. package/agent-assets/skills/management-policy/curation.json +1 -1
  163. package/agent-assets/skills/management-policy/references/policy-workflow.md +11 -12
  164. package/agent-assets/skills/management-policy/seeds/policy-file-shape.seed.json +1 -1
  165. package/agent-assets/skills/notify/SKILL.md +14 -16
  166. package/agent-assets/skills/notify/references/priority.md +28 -20
  167. package/agent-assets/skills/notion/SKILL.delegated.claude.md +2 -2
  168. package/agent-assets/skills/notion/SKILL.delegated.codex.md +2 -2
  169. package/agent-assets/skills/notion/SKILL.delegated.gemini.md +2 -2
  170. package/agent-assets/skills/notion/SKILL.md +17 -17
  171. package/agent-assets/skills/notion/SKILL.native.claude.md +11 -7
  172. package/agent-assets/skills/notion/SKILL.native.codex.md +10 -5
  173. package/agent-assets/skills/notion/SKILL.native.gemini.md +10 -5
  174. package/agent-assets/skills/observations/SKILL.md +29 -28
  175. package/agent-assets/skills/observations/references/fetch-fallback.md +22 -0
  176. package/agent-assets/skills/project-doc/SKILL.md +10 -7
  177. package/agent-assets/skills/project-doc/curation.json +3 -3
  178. package/agent-assets/skills/project-doc/seeds/project-shape.seed.json +8 -5
  179. package/agent-assets/skills/project-doc/seeds/slug-grammar.seed.json +5 -5
  180. package/agent-assets/skills/reading/SKILL.md +18 -42
  181. package/agent-assets/skills/reading/references/reading-taste.md +7 -7
  182. package/agent-assets/skills/roadmap/SKILL.md +8 -24
  183. package/agent-assets/skills/roadmap/curation.json +1 -1
  184. package/agent-assets/skills/roadmap/references/api.md +21 -11
  185. package/agent-assets/skills/roadmap/references/cross-check.md +15 -8
  186. package/agent-assets/skills/roadmap/references/horizon-tags.md +11 -0
  187. package/agent-assets/skills/roadmap/references/migration.md +12 -10
  188. package/agent-assets/skills/roadmap/references/retention.md +18 -0
  189. package/agent-assets/skills/roadmap/seeds/entry-types.seed.json +1 -1
  190. package/agent-assets/skills/schedule/SKILL.md +41 -50
  191. package/agent-assets/skills/schedule/references/batch.md +2 -2
  192. package/agent-assets/skills/schedule/references/errors.md +7 -4
  193. package/agent-assets/skills/schedule/references/importance.md +23 -0
  194. package/agent-assets/skills/schedule/references/model-selection.md +3 -3
  195. package/agent-assets/skills/schedule/references/recurrence-rule.md +7 -5
  196. package/agent-assets/skills/scheduled-managed-task/SKILL.md +77 -70
  197. package/agent-assets/skills/today/SKILL.md +24 -83
  198. package/agent-assets/skills/today/curation.json +3 -3
  199. package/agent-assets/skills/today/references/agent-plan-lifecycle.md +6 -5
  200. package/agent-assets/skills/today/references/today-skeleton.md +66 -0
  201. package/agent-assets/skills/today/seeds/agent-notes-flavors.seed.json +1 -1
  202. package/agent-assets/skills/today/seeds/section-shape.seed.json +7 -7
  203. package/agent-assets/skills/user-interview/SKILL.md +21 -93
  204. package/agent-assets/skills/user-interview/references/op-briefing.md +3 -3
  205. package/agent-assets/skills/user-interview/references/op-dm-handler.md +88 -0
  206. package/agent-assets/skills/user-interview/references/op-morning.md +1 -1
  207. package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +9 -1
  208. package/agent-assets/skills/user-profile/SKILL.md +29 -39
  209. package/agent-assets/skills/user-profile/curation.json +4 -4
  210. package/agent-assets/skills/user-profile/references/character-preferences.md +3 -3
  211. package/agent-assets/skills/user-profile/seeds/routing-table.seed.json +8 -8
  212. package/agent-assets/skills/user-profile/seeds/topic-files.seed.json +6 -6
  213. package/agent-assets/skills/wiki/wiki-ask/SKILL.md +1 -1
  214. package/agent-assets/skills/wiki/wiki-compile/SKILL.md +9 -8
  215. package/agent-assets/skills/wiki/wiki-connect/SKILL.md +32 -5
  216. package/agent-assets/skills/wiki/wiki-ingest/SKILL.md +6 -50
  217. package/agent-assets/skills/wiki/wiki-ingest/references/curl-errors.md +58 -0
  218. package/agent-assets/skills/wiki/wiki-lint/SKILL.md +20 -14
  219. package/agent-assets/skills/wiki/wiki-trace/SKILL.md +10 -5
  220. package/agent-assets/skills/wiki/wiki-vault-rules/SKILL.md +2 -0
  221. package/agent-assets/system-prompts/routine-fetch-window.md +22 -12
  222. package/agent-assets/task-flows/_partials/calendar-acquire.google_calendar.md +4 -2
  223. package/agent-assets/task-flows/_partials/calendar-acquire.outlook_calendar.md +4 -2
  224. package/agent-assets/task-flows/_partials/capture-user-info.md +2 -2
  225. package/agent-assets/task-flows/_partials/dm-intent.long-horizon.md +1 -1
  226. package/agent-assets/task-flows/_partials/dm-intent.project.md +9 -9
  227. package/agent-assets/task-flows/_partials/feedback-capture.md +30 -0
  228. package/agent-assets/task-flows/_partials/mail-acquire.outlook_mail.md +3 -2
  229. package/agent-assets/task-flows/_partials/notion-acquire.notion.md +10 -5
  230. package/agent-assets/task-flows/browser_task.md +84 -0
  231. package/agent-assets/task-flows/github.assigned.md +1 -1
  232. package/agent-assets/task-flows/github.pull_request.review_requested.md +2 -2
  233. package/agent-assets/task-flows/github.workflow_run.failed.md +2 -2
  234. package/agent-assets/task-flows/knowledge.import.md +14 -14
  235. package/agent-assets/task-flows/message.received.dm.md +13 -4
  236. package/agent-assets/task-flows/message.received.dm_first.md +7 -3
  237. package/agent-assets/task-flows/routine.custom.md +3 -3
  238. package/agent-assets/task-flows/routine.evening_review.md +88 -8
  239. package/agent-assets/task-flows/routine.fetch_window.md +2 -2
  240. package/agent-assets/task-flows/routine.hourly_check.md +16 -12
  241. package/agent-assets/task-flows/routine.monthly_review.md +93 -21
  242. package/agent-assets/task-flows/routine.morning_routine_journal.md +119 -97
  243. package/agent-assets/task-flows/routine.morning_routine_today.md +43 -43
  244. package/agent-assets/task-flows/routine.research_cluster_update.md +35 -0
  245. package/agent-assets/task-flows/routine.research_dispatch.md +38 -0
  246. package/agent-assets/task-flows/routine.research_offer_dm.md +125 -0
  247. package/agent-assets/task-flows/routine.research_wiki_summary.md +53 -0
  248. package/agent-assets/task-flows/routine.roadmap_refresh.md +10 -10
  249. package/agent-assets/task-flows/routine.today_refresh.md +4 -4
  250. package/agent-assets/task-flows/routine.user_profile_sweep.md +10 -10
  251. package/agent-assets/task-flows/routine.weekly_review.md +114 -24
  252. package/agent-assets/task-flows/schedule.approaching.md +0 -1
  253. package/agent-assets/task-flows/scheduled.dm.md +5 -5
  254. package/agent-assets/task-flows/scheduled.task.md +4 -4
  255. package/agent-assets/task-flows/setup.initial.md +21 -21
  256. package/agent-assets/task-flows/setup.update.md +2 -2
  257. package/agent-assets/task-flows/wiki.trace.md +1 -1
  258. package/agent-assets/templates/README.md +27 -20
  259. package/agent-assets/templates/_index.md +42 -26
  260. package/agent-assets/templates/_manifest.json +34 -99
  261. package/agent-assets/templates/{user → identity}/_index.md +1 -1
  262. package/agent-assets/templates/{user → identity}/profile.md +2 -2
  263. package/agent-assets/templates/{dossiers → knowledge/dossiers}/_index.md +1 -1
  264. package/agent-assets/templates/{projects → plans/projects}/_active.base +1 -1
  265. package/agent-assets/templates/policies/_index.md +21 -0
  266. package/agent-assets/templates/{rules → policies}/journal-export.md +1 -1
  267. package/agent-assets/templates/{rules → policies}/journal-format.md +5 -5
  268. package/agent-assets/templates/{rules/policies → policies/management-captures}/_index.md +2 -2
  269. package/agent-assets/templates/{rules → policies}/management.md +3 -3
  270. package/agent-assets/templates/{rules → policies}/mcp.md +1 -1
  271. package/agent-assets/templates/{rules → policies}/redaction.md +1 -1
  272. package/agent-assets/templates/{routines → policies/routines}/_index.md +1 -1
  273. package/agent-assets/templates/{routines → policies/routines}/evening.md +2 -2
  274. package/agent-assets/templates/{routines → policies/routines}/hourly.md +1 -1
  275. package/agent-assets/templates/{routines → policies/routines}/monthly.md +2 -2
  276. package/bin/aitne.mjs +58 -15
  277. package/package.json +5 -4
  278. package/scripts/commands/doctor.mjs +25 -10
  279. package/scripts/commands/run-now.mjs +6 -21
  280. package/scripts/lib/ports.d.mts +27 -0
  281. package/scripts/lib/ports.mjs +36 -0
  282. package/scripts/lib/process-identity.d.mts +46 -0
  283. package/scripts/lib/process-identity.mjs +193 -0
  284. package/scripts/lib/read-api-token.mjs +176 -0
  285. package/scripts/start.mjs +16 -5
  286. package/agent-assets/docs/features/lifestyle/travel-time.md +0 -58
  287. package/agent-assets/skills/gmail-lifestyle/references/travel-time-api.md +0 -59
  288. package/agent-assets/skills/schedule/references/recurring.md +0 -185
  289. package/agent-assets/templates/context-index.md +0 -42
  290. package/agent-assets/templates/rules/_index.md +0 -19
  291. /package/agent-assets/templates/{user → identity}/expertise.md +0 -0
  292. /package/agent-assets/templates/{user → identity}/goals.md +0 -0
  293. /package/agent-assets/templates/{user → identity}/people.md +0 -0
  294. /package/agent-assets/templates/{user → identity}/personal.md +0 -0
  295. /package/agent-assets/templates/{user → identity}/work.md +0 -0
  296. /package/agent-assets/templates/{agent/journal.md → journal/agent.md} +0 -0
  297. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/evening.md +0 -0
  298. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/hourly.md +0 -0
  299. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/monthly.md +0 -0
  300. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/morning.md +0 -0
  301. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/roadmap.md +0 -0
  302. /package/agent-assets/templates/{dossiers → knowledge/dossiers}/weekly.md +0 -0
  303. /package/agent-assets/templates/{projects → plans/projects}/_index.md +0 -0
  304. /package/agent-assets/templates/{roadmap.md → plans/roadmap.md} +0 -0
  305. /package/agent-assets/templates/{routines → policies/routines}/morning.md +0 -0
  306. /package/agent-assets/templates/{routines → policies/routines}/weekly.md +0 -0
  307. /package/agent-assets/templates/{agent → state}/profile-questions.md +0 -0
  308. /package/agent-assets/templates/{today.md → state/today.md} +0 -0
package/README.md CHANGED
@@ -2,15 +2,17 @@
2
2
 
3
3
  # Aitne
4
4
 
5
- **A local-first, proactive personal AI agent.**
6
- A long-running TypeScript daemon watches your calendar, mail, repos, and notes — and acts on its own. Your AI of choice (Claude / Codex / Gemini; OpenCode coming soon) is the brain; Aitne is the nervous system.
7
-
8
5
  [![npm version](https://img.shields.io/npm/v/@aitne-sh/aitne.svg)](https://www.npmjs.com/package/@aitne-sh/aitne)
9
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](./LICENSE)
10
7
  [![Node](https://img.shields.io/badge/node-%E2%89%A522-brightgreen)](https://nodejs.org)
11
- [![Status](https://img.shields.io/badge/status-pre--1.0-orange)](#status)
12
8
  [![Platforms](https://img.shields.io/badge/platforms-macOS%20%7C%20Linux%20%7C%20Windows-blue)](#platform-support)
13
9
 
10
+ **Wake up to a brief that was written for you, by you.**
11
+
12
+ At 04:00, Aitne reads your calendar, mail, GitHub, and notes — then drafts a one-page plan for the day ahead: today's meetings, the email thread you missed, the PR your teammate is waiting on. Before you've finished coffee, the summary is in your DMs. By evening it journals what actually happened.
13
+
14
+ All on your laptop. All Markdown you own. Bring your own AI (Claude Code / Codex / Gemini CLI) — Aitne is the part that watches, schedules, and remembers.
15
+
14
16
  ```bash
15
17
  npm install -g @aitne-sh/aitne@latest
16
18
  aitne start
@@ -22,83 +24,102 @@ aitne start
22
24
 
23
25
  ---
24
26
 
25
- ## Why Aitne
26
-
27
- - **Proactive, not reactive.** Drafts your morning plan at 04:00. Surfaces the email you forgot. Nudges you about the PR your teammate is waiting on. You don't have to open an app.
28
- - **Local-first.** Daemon binds to `127.0.0.1` only. Secrets in the OS keychain. Memory in plain Markdown under `~/.personal-agent/`. No telemetry, no cloud state.
29
- - **Multi-backend.** Bring Claude Code, Codex CLI, or Gemini CLI — or all three. Per-task tier routing decides which one runs for each kind of work. (OpenCode is wired internally and ships as preview-only in this release.)
30
- - **Compounds.** Every DM, every correction shapes how Aitne thinks about you. The model doesn't change — the context does.
31
-
32
- ---
33
-
34
- ## Highlights
27
+ ## A day with Aitne
35
28
 
36
- <details>
37
- <summary><b>Time, calendar, travel</b></summary>
29
+ Aitne is a daemon on your laptop, connected to your calendar, mail (Gmail / Outlook / iCloud / Yahoo), GitHub, Obsidian, and Notion. You talk to it through DMs in Slack / Telegram / Discord / WhatsApp — or through a local dashboard at `:8322`.
38
30
 
39
- - Auto-generate `today.md` every morning with your real schedule
40
- - 15-min approach reminders for every event, with travel time pre-computed via Google Maps
41
- - Find a 30-min slot across multiple calendars Aitne checks freebusy and replies with options
42
- - Auto-extract flight, hotel, train confirmations from email into a structured travel timeline
43
- </details>
31
+ - **04:00 — Morning routine.** Aitne reads everything that landed overnight (mail, GitHub activity, calendar changes, vault updates) and writes `today.md` sample below.
32
+ - **Morning Brief.** The plan lands in your DMs as a short summary.
33
+ - **Through the day Nudges.** Meeting reminders, hourly background checks for the things you care about (eval results, PR review requests, new mail). DMs only when there's something worth your attention.
34
+ - **Evening Review.** Aitne writes a daily journal: what got done, what slipped, one observation about the week.
44
35
 
45
- <details>
46
- <summary><b>Mail across every account</b></summary>
36
+ You steer it through natural-language DMs ("skip morning routine on Sundays", "ping me when the overnight job finishes") and bang commands (`!cost`, `!ask`, `!ingest`).
47
37
 
48
- - Unified inbox across Gmail, Outlook, Yahoo, and iCloud (OAuth or app-password / IMAP)
49
- - Local FTS5 full-text search across every account
50
- - Auto-classify, label, archive, and draft replies in your style
51
- - Forwarded receipts auto-extract into a structured receipts table
52
- - IMAP IDLE for near-real-time delivery; PDF/image attachments are extracted and indexed
53
- </details>
38
+ ---
54
39
 
55
- <details>
56
- <summary><b>Knowledge: Obsidian, Notion, your own wiki</b></summary>
40
+ ## Aitne's plan for today
41
+
42
+ `today.md` — written each morning into `~/.personal-agent/context/state/`. Plain Markdown you can `cat`, `vim`, or sync to Obsidian. Sample:
43
+
44
+ ```text
45
+ 2026-05-20 (Wednesday)
46
+ Day type: Weekday | Work focus: on | Study focus: on | Personal focus: on
47
+
48
+ User Schedule
49
+ 10:00 — Team standup (#ml-platform)
50
+ 13:30 — RAG eval review with research team
51
+ 16:00 — 1:1 with manager (quarterly check-in)
52
+ 21:00 — Overnight training window opens (8xH100 reserved)
53
+
54
+ User Tasks
55
+ Land the embedding-index refactor PR — address review feedback [URGENT] [work]
56
+ Cancel unused GPU reservation before 18:00 — billing cutoff [work]
57
+ Skim 3 papers from yesterday's arxiv digest — pick one for Friday's reading group [study]
58
+ Renew gym membership before Friday [personal]
59
+ Reply to dentist about reschedule [personal]
60
+
61
+ Agent Plan
62
+ 09:45 Notify: standup in 15 min [work] →notify
63
+ 17:30 Notify: cancel GPU reservation by 18:00 to avoid overnight charges [work] →notify
64
+ 20:45 Notify: training window opens in 15 min — confirm dataset hash [work] →notify
65
+
66
+ Agent Notes
67
+ (HIGH) 2026-05-22 (Fri): Reading group at 16:00 — pick paper by Thu evening
68
+ (HIGH) 2026-05-23 (Sat): Friend's birthday dinner — gift not bought yet
69
+ (MED) 2026-05-25 (Mon): Quarterly OKR review — draft self-assessment by EOD Sun
70
+ Two coworkers pushed to feat/embedding-index since you last pulled [work]
71
+ Overnight eval run finished — accuracy +1.2pp, p95 latency +18ms [work]
72
+ Bank statement available — review when convenient [personal]
73
+ Weather: rain 06:00–10:00 — leave 10 min earlier [personal]
74
+
75
+ Agent Log
76
+ 04:12 Morning Routine completed — today.md drafted from 23 raw signals
77
+ 07:02 Sent morning brief to Slack DM (4 priorities, 2 timing alerts)
78
+ 12:38 Hourly check: 1 new GitHub review request, 0 calendar changes
79
+ 18:00 Evening Review completed — 3 of 5 tasks closed; 2 carried to tomorrow
80
+
81
+ Handoff
82
+ Tomorrow
83
+ Reply to dentist about reschedule [personal]
84
+ Pick reading-group paper [study]
85
+ Triage overnight training-run metrics [work]
86
+ Later
87
+ 2026-05-22 (Fri): Reading group at 16:00
88
+ 2026-05-23 (Sat): Friend's birthday dinner
89
+ 2026-05-25 (Mon): Quarterly OKR review
90
+ ```
57
91
 
58
- - Use your existing Obsidian vault as Aitne's primary memory store — wiki-links keep working
59
- - Append to your daily note via the official Obsidian CLI
60
- - Full Notion page and database CRUD
61
- - DM `!ingest <url>` to capture a source, `!compile` to synthesize raw notes into linked wiki articles
62
- - `!ask <question>` answers from your own wiki and writes the cited reply to `30_outputs/`
63
- - `!lint`, `!trace`, `!connect` for vault health, idea evolution, cross-domain bridges
64
- - Multiple workspaces (`!ingest @research ...`) — internal or any number of external Obsidian vaults
65
- </details>
92
+ ---
66
93
 
67
- <details>
68
- <summary><b>Code, Git, GitHub</b></summary>
94
+ ## Why Aitne
69
95
 
70
- - Local Git: `git log`, `git diff`, `git show` exposed via daemon proxy
71
- - GitHub: PR lists, comments, issues, webhook receivers (HMAC-SHA256 verified)
72
- - Per-repo cron triggers — "every Monday at 09:00, summarize merged PRs into `projects/<repo>.md`"
73
- - Auto-detect when a coworker modified a file you're about to ship
74
- - Unified Repositories: one row pairs a local clone with a GitHub remote; the doctor flags drift
75
- </details>
96
+ **You don't open it. It opens to you.**
97
+ Most AI tools wait for you to type. Aitne goes first — it watches all day and reaches out only when there's something worth acting on.
76
98
 
77
- <details>
78
- <summary><b>Self-management via natural language</b></summary>
99
+ **Nothing leaves your laptop.**
100
+ The daemon binds to `127.0.0.1` only. Secrets sit in your OS keychain. Memory is plain Markdown under `~/.personal-agent/`. No vendor account, no remote sync, no telemetry — your AI provider's API is the only thing that talks to the network, on your own key.
79
101
 
80
- - "Don't run hourly checks on weekends" — patches the cron window
81
- - "Remember my partner's birthday is March 14" appends to `user/profile.md`
82
- - "I prefer concise replies — no preamble" — updates the agent's `character` field
83
- - "Email me a summary every Friday at 5pm" — creates a recurring schedule
84
- - "Switch to Codex for code reviews" — flips the per-process backend mapping
85
- - Every change is journaled to `agent_actions` — audit anything via `aitne audit`
86
- </details>
102
+ **Bring your own model.**
103
+ Per-task routing assigns the right tier to the right backend, and the router fails over automatically on quota or auth issues. Run one backend or all of them — your choice.
87
104
 
88
- <details>
89
- <summary><b>Bring your own toolkit</b></summary>
105
+ **Memory compounds, the model doesn't have to.**
106
+ Every DM, every correction, every observation goes into your Markdown context. The model stays stateless — your story grows.
90
107
 
91
- - Your `~/.claude/skills`, `~/.codex/config.toml`, and `~/.gemini/` settings are loaded on session init (`~/.opencode/` is recognised but its executor is coming soon)
92
- - Custom MCP servers materialize into every per-session workdir
93
- - Aitne layers its persona on top of your existing config — nothing gets overwritten
94
- - Voice attachments — opt-in local Whisper transcription via `ffmpeg-static` + `@huggingface/transformers`
95
- </details>
108
+ Already running Claude Code in a terminal? Aitne is the part that wakes itself up before you do, watches your mail and calendar between your sessions, remembers what you told it last week, and reaches you in your DMs without a terminal open.
96
109
 
97
110
  ---
98
111
 
99
- ## Status
112
+ ## Is this for you?
113
+
114
+ **Aitne fits if you...**
115
+ - already use Claude Code, Codex CLI, or Gemini CLI daily
116
+ - want context that survives sessions, without uploading your life to someone's server
117
+ - are comfortable running a daemon on your laptop and pasting an API key
100
118
 
101
- Pre-1.0. APIs, schema, and dashboard surfaces may still change. SQLite migrations are deliberately destructive ("clean reinstall, no data migration"); Markdown memory in `context/` is forward-compatible and safe to keep across upgrades.
119
+ **You'll bounce off if you...**
120
+ - want a polished hosted chat UI — this isn't that
121
+ - don't have an API key for at least one provider (Aitne spawns sessions on your behalf; the cost lands on your account)
122
+ - expect zero setup — there's a 9-step wizard for integrations and channels
102
123
 
103
124
  ---
104
125
 
@@ -109,28 +130,28 @@ npm install -g @aitne-sh/aitne@latest
109
130
  aitne start
110
131
  ```
111
132
 
112
- Then bring at least one AI backend. The documented operating mode is **provider API keys** paste them into the setup wizard (they land in the OS keychain, never `.env`):
133
+ The daemon listens on `:8321`, the dashboard on `:8322`. After `aitne start`, your browser opens to the setup wizard.
134
+
135
+ You also need at least one AI backend installed and one API key. The documented operating mode is **provider API keys** — paste them into the wizard (they land in the OS keychain, never `.env`):
113
136
 
114
137
  | Backend | Install | Auth |
115
138
  |---|---|---|
116
- | **Claude Code** | `npm install -g @anthropic-ai/claude-code` | `ANTHROPIC_API_KEY` in the wizard (Anthropic's headless-agent policy disallows Pro/Max subscriptions for SDK-driven sessions) |
117
- | **OpenAI Codex CLI** | `npm install -g @openai/codex` | `OPENAI_API_KEY` in the wizard, or `codex login --device-auth` as fallback |
139
+ | **Claude Code** | `npm install -g @anthropic-ai/claude-code` | `ANTHROPIC_API_KEY` in the wizard (Anthropic's headless-agent policy disallows Pro/Max subscriptions for SDK sessions) |
140
+ | **OpenAI Codex CLI** | `npm install -g @openai/codex` | `OPENAI_API_KEY` in the wizard, or `codex login --device-auth` |
118
141
  | **Google Gemini CLI** | `npm install -g @google/gemini-cli` | `GEMINI_API_KEY` / `GOOGLE_API_KEY`, or OAuth on first use |
119
- | **OpenCode** (sst/opencode) | _coming soon_ registered for preview; setup will open when the runtime executor lands | _coming soon_ |
142
+ | **OpenCode** (sst/opencode) | `npm install -g opencode-ai` | provider via `opencode auth login`, set in the wizard |
120
143
 
121
- The daemon listens on `:8321`, the dashboard on `:3000`. After `aitne start`, the browser opens to a 9-step setup wizard.
122
-
123
- ### Verify the install
144
+ ### Verify
124
145
 
125
146
  ```bash
126
147
  aitne status # PIDs, uptime, connected platforms, today's spend
127
- aitne doctor # 10-check install diagnostic
148
+ aitne doctor # install-health diagnostic (Node, ports, keychain, CLIs, native bindings)
128
149
  aitne logs -f # tail the daemon log
129
150
  ```
130
151
 
131
152
  ### From source
132
153
 
133
- For contributors, or to hack on the daemon directly. Requires Node ≥ 22 and pnpm 10.x.
154
+ Contributors and anyone hacking on the daemon directly. Requires Node ≥ 22 and pnpm 10.x.
134
155
 
135
156
  ```bash
136
157
  git clone https://github.com/Aitne-sh/Aitne.git aitne
@@ -140,7 +161,7 @@ pnpm install
140
161
  pnpm dev # foreground mode with full stdio
141
162
  ```
142
163
 
143
- See [docs/setup-guide.md](docs/setup-guide.md) for the full installation walkthrough.
164
+ Full walkthrough: [docs/setup-guide.md](docs/setup-guide.md).
144
165
 
145
166
  ---
146
167
 
@@ -162,7 +183,7 @@ flowchart LR
162
183
  subgraph LOCAL["Your laptop"]
163
184
  direction TB
164
185
  DAEMON["Aitne daemon<br/>(always on, 127.0.0.1)"]
165
- BRAIN["AI session<br/>Claude / Codex / Gemini<br/>(OpenCode coming soon)"]
186
+ BRAIN["AI session<br/>Claude / Codex / Gemini / OpenCode"]
166
187
  MEMORY["Markdown memory<br/>plain files you own"]
167
188
  DAEMON --- BRAIN
168
189
  BRAIN --- MEMORY
@@ -178,55 +199,24 @@ flowchart LR
178
199
  Two execution paths run in parallel:
179
200
 
180
201
  - **Reactive path** — owner DMs/mentions, cron routines (morning / evening / weekly), calendar approach events. Event → priority heap → dispatcher → backend session.
181
- - **Polling path** — observers for Git, GitHub, Obsidian, Notion, Calendar, Mail write to an `observations` table without spawning sessions. An hourly cron triages those observations through a lite-tier session, then escalates to a full Sonnet-class session only if something worth surfacing was found.
202
+ - **Polling path** — observers for Git, GitHub, Obsidian, Notion, Calendar, Mail write to an `observations` table without spawning sessions. An hourly cron triages those observations through a lite-tier session, then escalates to a full Sonnet-class session only if something is worth surfacing.
182
203
 
183
204
  A pre-pass `routine.fetch_window` session runs before each routine, fanning out per-account fetches (mail, calendar, Notion) into the `observations` table so the main session reads from a single source.
184
205
 
185
206
  ---
186
207
 
187
- ## CLI
188
-
189
- ### Lifecycle
190
-
191
- | Command | What it does |
192
- |---|---|
193
- | `aitne start [--no-open]` | Build if stale, launch daemon + dashboard in background |
194
- | `aitne stop` | Graceful shutdown (SIGTERM → SIGKILL after 10 s) |
195
- | `aitne restart [--clean-context]` | Stop then start. `--clean-context` wipes `context/` after a tarball backup |
196
- | `aitne status` | PIDs, uptime, platforms, backends, today's spend |
197
- | `aitne logs [-f] [-n N] [-d]` | Tail daemon log (`-d` = dashboard log, `-f` = follow) |
198
- | `aitne dev` | Foreground mode (full stdio) |
199
-
200
- ### Operations
201
-
202
- | Command | What it does |
203
- |---|---|
204
- | `aitne doctor [--json]` | 10 install-health checks + repo-drift expansion |
205
- | `aitne audit [flags]` | Read the agent action log from SQLite — `--since`, `--type`, `--result`, `--backend`, `--detail`, `--json` |
206
- | `aitne setup` | Re-open the dashboard `/setup` wizard |
207
- | `aitne open` | Open the dashboard in your browser |
208
- | `aitne run-now <job>` | Fire a maintenance job on demand (currently `roadmap_maintenance`) |
209
- | `aitne verify <target>` | Read-only post-launch verification of a shipped design surface |
210
- | `aitne version` / `update` / `uninstall` | Self-explanatory |
211
-
212
- `aitne help [cmd]` for per-command details.
213
-
214
- ---
215
-
216
208
  ## Backends
217
209
 
218
- Aitne abstracts four AI runtimes behind a single `IAgentCore` interface. Every kind of work has a `ProcessKey` mapped to a tier (`lite` / `medium` / `high`) and a backend; for Claude those tiers map to **Haiku 4.5 / Sonnet 4.6 / Opus 4.7**.
210
+ Aitne abstracts four AI runtimes behind one `IAgentCore` interface. Every kind of work has a `ProcessKey` mapped to a tier (`lite` / `medium` / `high`) and a backend; for Claude those tiers map to **Haiku 4.5 / Sonnet 4.6 / Opus 4.8**. The high tier is opt-in — no install-time surface defaults to it; pin it per row from `:8322/settings/models`.
219
211
 
220
212
  | Backend | Implementation | Resume | Strengths |
221
213
  |---|---|---|---|
222
- | **Claude Code** | `@anthropic-ai/claude-agent-sdk` | ✓ | Best for routines, deep context, server-side advisor |
214
+ | **Claude Code** | `@anthropic-ai/claude-agent-sdk` | ✓ | Routines, deep context, server-side advisor |
223
215
  | **Codex CLI** | OpenAI Codex CLI subprocess + JSONL stream | ✓ | Code-heavy tasks, fast iteration |
224
216
  | **Gemini CLI** | Google Gemini CLI subprocess + JSONL stream | ✓ | Free-tier headroom, large-context summarization |
225
- | **OpenCode** _(coming soon)_ | `opencode-ai` HTTP server + SDK client | ✓ | Multi-provider — routes to any `opencode auth login` provider. Preview-only in this release; the dashboard selectors are disabled until the runtime executor ships. |
226
-
227
- The router fails over to a configured fallback backend automatically on `BackendQuotaError` or decisive failure, re-materializing the fallback's instruction file and skill directories into the session workdir.
217
+ | **OpenCode** | `opencode-ai` HTTP server + SDK client | ✓ | Multi-provider — routes to any `opencode auth login` provider |
228
218
 
229
- Per-process tier defaults and the routing table are editable from the dashboard at `:3000/settings/models`.
219
+ The router fails over to a configured fallback automatically on `BackendQuotaError` or decisive failure, re-materializing the fallback's instruction file and skill directories into the session workdir. Per-process tier defaults and routing are editable at `:8322/settings/models`.
230
220
 
231
221
  ---
232
222
 
@@ -236,12 +226,10 @@ Per-process tier defaults and the routing table are editable from the dashboard
236
226
  |---|---|
237
227
  | **Messaging** | Slack (Socket Mode), Telegram, Discord, WhatsApp (Baileys), Web dashboard |
238
228
  | **Mail** | Gmail, Outlook, Yahoo, iCloud — unified API, classifier, local FTS5 search, IMAP IDLE |
239
- | **Calendar** | Google Calendar, Outlook Calendar, iCloud (CalDAV), Google Maps for travel time |
229
+ | **Calendar** | Google Calendar, Outlook Calendar, iCloud (CalDAV) free/busy slot-finding across accounts |
240
230
  | **Knowledge** | Obsidian (CLI + vault watch), Notion (REST), custom MCP servers |
241
231
  | **Code** | Local Git, GitHub (Octokit + webhooks) |
242
- | **Lifestyle** | Auto-extracted receipts · travel bookings · Kindle highlights · voice transcription (Whisper, opt-in) |
243
-
244
- ### Integration modes
232
+ | **Lifestyle** | Auto-extracted receipts · travel bookings · Kindle highlights · browser-history research clusters · voice transcription (Whisper, opt-in) |
245
233
 
246
234
  Each integration runs in one of four modes:
247
235
 
@@ -256,30 +244,122 @@ Every mode change goes through a live capability probe and a per-key flip lock.
256
244
 
257
245
  ---
258
246
 
247
+ ## What you can do
248
+
249
+ <details open>
250
+ <summary><b>Time, calendar, travel</b></summary>
251
+
252
+ - Auto-generate `today.md` every morning with your real schedule
253
+ - 15-min approach reminders for every event
254
+ - Find a 30-min slot across multiple calendars — Aitne checks freebusy and replies with options
255
+ - Auto-extract flight, hotel, train confirmations from email into a structured travel timeline
256
+ </details>
257
+
258
+ <details open>
259
+ <summary><b>Mail across every account</b></summary>
260
+
261
+ - Unified inbox across Gmail, Outlook, Yahoo, and iCloud (OAuth or app-password / IMAP)
262
+ - Local FTS5 full-text search across every account
263
+ - Auto-classify, label, archive, and draft replies in your style
264
+ - Forwarded receipts auto-extract into a structured receipts table
265
+ - IMAP IDLE for near-real-time delivery; PDF/image attachments are extracted and indexed
266
+ </details>
267
+
268
+ <details open>
269
+ <summary><b>Agents you can define and schedule</b></summary>
270
+
271
+ - Every routine is a first-class **Agent** — an identity with a YAML config + Markdown brief, editable at `:8322/agents`
272
+ - The built-in routines (morning routine, evening review, hourly check, …) ship as **System** agents — can't be deleted, but can be stopped with a warning
273
+ - Define your own recurring **work** agents (daily / weekly / monthly) — from the dashboard form or just by DMing the agent ("summarize my open PRs every Monday at 9")
274
+ - Pin a backend, model, and tier per agent; see per-agent cost, success rate, and run history; fire any agent on demand
275
+ - One-shot wake-ups ("remind me at 3pm"), pre-composed scheduled DMs, and recurring briefings — all quiet-hours-aware
276
+ </details>
277
+
278
+ <details>
279
+ <summary><b>Browser automation (managed Chromium)</b></summary>
280
+
281
+ - DM an open-ended browser task ("check my order status", "fill out this form") — a scoped sub-agent drives a managed Chromium session turn-by-turn, asking you to clarify mid-task and DMing back results + screenshots
282
+ - Egress guards stay on: RFC1918 / loopback / cloud-metadata IP blocking, a form-submit payment-path blocker, and single-owner scoping
283
+ - Purchase confirmation (the B-4 flow — DM-delivered single-use token + screenshot-first consent) is **experimental and default-off**; it requires explicit per-site dashboard opt-in
284
+ </details>
285
+
286
+ <details>
287
+ <summary><b>Knowledge: Obsidian, Notion, your own wiki</b></summary>
288
+
289
+ - Use your existing Obsidian vault as Aitne's primary memory store — wiki-links keep working
290
+ - Append to your daily note via the official Obsidian CLI
291
+ - Full Notion page and database CRUD
292
+ - DM `!ingest <url>` to capture a source, `!compile` to synthesize raw notes into linked wiki articles
293
+ - `!ask <question>` answers from your own wiki and writes the cited reply to `30_outputs/`
294
+ - `!lint`, `!trace`, `!connect` for vault health, idea evolution, cross-domain bridges
295
+ - Multiple workspaces (`!ingest @research ...`) — internal or any number of external Obsidian vaults
296
+ </details>
297
+
298
+ <details>
299
+ <summary><b>Code, Git, GitHub</b></summary>
300
+
301
+ - Local Git: `git log`, `git diff`, `git show` exposed via daemon proxy
302
+ - GitHub: PR lists, comments, issues, webhook receivers (HMAC-SHA256 verified)
303
+ - Per-repo cron triggers — "every Monday at 09:00, summarize merged PRs into the repo's daily journal"
304
+ - Auto-detect when a coworker modified a file you're about to ship
305
+ - Unified Repositories: one row pairs a local clone with a GitHub remote; the doctor flags drift
306
+ </details>
307
+
308
+ <details>
309
+ <summary><b>Self-management via natural language</b></summary>
310
+
311
+ - "Don't run hourly checks on weekends" — patches the cron window
312
+ - "Remember my partner's birthday is March 14" — appends to `identity/profile.md`
313
+ - "I prefer concise replies — no preamble" — updates the agent's `character` field
314
+ - "Email me a summary every Friday at 5pm" — creates a recurring schedule
315
+ - "Switch to Codex for code reviews" — flips the per-process backend mapping
316
+ - Bang commands for instant control: `!stop` / `!start` (pause/resume autonomous work), `!close` (reset the DM session), `!cost`, `!report`, `!help` — and define your own `!commands` at `:8322/settings/commands`
317
+ - Every change is journaled to `agent_actions` — audit anything via `aitne audit`
318
+ </details>
319
+
320
+ <details>
321
+ <summary><b>Bring your own toolkit</b></summary>
322
+
323
+ - Your `~/.claude/skills`, `~/.codex/config.toml`, and `~/.gemini/` settings are loaded on session init
324
+ - Custom MCP servers materialize into every per-session workdir
325
+ - Aitne layers its persona on top of your existing config — nothing gets overwritten
326
+ - Voice attachments — opt-in local Whisper transcription via `ffmpeg-static` + `@huggingface/transformers`
327
+ </details>
328
+
329
+ ---
330
+
259
331
  ## Memory
260
332
 
261
- Everything Aitne writes lives in `~/.personal-agent/context/*.md` — plain Markdown you can `cat`, `vim`, `obsidian`, or `cp`:
333
+ Everything Aitne writes lives in `~/.personal-agent/context/`:
262
334
 
263
335
  ```
264
336
  context/
265
- ├── today.md # Working view, always injected
266
- ├── yesterday.md # Daemon-rotated archive
267
- ├── roadmap.md # Long-term goals
268
- ├── user/ # profile.md, people.md, work.md, …
269
- ├── rules/ # Policy files (management, redaction)
270
- ├── projects/ # One file per active project
271
- ├── daily/YYYY-MM-DD.md # Synthesized daily journal
272
- ├── weekly/ # Weekly retrospectives
273
- └── agent/journal.md # Private agent self-reflection
337
+ ├── state/
338
+ ├── today.md # Working view, always injected
339
+ ├── yesterday.md # Daemon-rotated archive
340
+ ├── inbox/ # Captured snippets
341
+ │ └── scratch/ # Short-lived agent notes (48h TTL)
342
+ ├── plans/
343
+ ├── roadmap.md # Long-term goals
344
+ │ └── projects/ # One file per active project
345
+ ├── identity/ # profile.md, people.md, work.md,
346
+ ├── policies/ # Management rules, MCP config, redaction, routines
347
+ ├── journal/
348
+ │ ├── daily/YYYY-MM-DD.md # Synthesized daily journal
349
+ │ ├── weekly/ # Weekly retrospectives
350
+ │ └── agent.md # Private agent self-reflection
351
+ └── knowledge/ # wiki, per-repo overviews, entities, dossiers
274
352
  ```
275
353
 
276
- Context writes flow through `curl http://localhost:8321/api/context/<path>`, not the SDK's `Edit`/`Write` tools this gives the daemon a single chokepoint for write locks, frontmatter validation, and 30-day snapshots. SQLite (`better-sqlite3` with FTS5) backs sessions, observations, agent actions, and history.
354
+ Context writes flow through `curl http://localhost:8321/api/context/<class>/<path>` — where `<class>` is one of `identity`, `state`, `plans`, `journal`, `knowledge`, `policies` — not the SDK's `Edit`/`Write` tools. This gives the daemon a single chokepoint for write locks, frontmatter validation, and 30-day snapshots. SQLite (`better-sqlite3` with FTS5) backs sessions, observations, agent actions, and history.
355
+
356
+ Schema upgrades are forward-only and idempotent — the migration runner preserves your SQLite history and Markdown context across releases. (`aitne update` prints the `npm install -g @aitne-sh/aitne@latest` command; there is no self-updater.)
277
357
 
278
358
  ---
279
359
 
280
360
  ## Safety
281
361
 
282
- Four independent layers, designed so that the bottom layer holds even when upper layers are widened:
362
+ Four independent layers, designed so the bottom layer holds even when upper layers are widened:
283
363
 
284
364
  1. **SDK permission model** — strict `allowedTools` whitelist in Safe mode; `bypassPermissions` in Allow mode
285
365
  2. **PreToolUse hooks** (Claude, Safe mode) — `curl` parsed for hostname + port; daemon-API is the only legal write path
@@ -297,19 +377,55 @@ Plus: localhost-only API, webhook HMAC verification, no automated financial tran
297
377
  | `maxConcurrentSessions` (autonomous) | 3 | Hard semaphore |
298
378
  | `maxReactiveSessions` (DMs) | 2 | Hard semaphore |
299
379
  | `executeTimeoutMinutes` | 60 | Per-execute watchdog |
300
- | `autonomousDailyCostCapUsd` | `null` | Priority-based skipping: `hourly_check` at 100%, `evening_review` at 150%, `morning_routine` at 200%. Reactive DMs are not gated. |
380
+ | `autonomousDailyCostCapUsd` | `null` | Priority-based skipping: `hourly_check` at 100%, `roadmap_refresh` at 120%, `evening_review` at 150%, `morning_routine` at 200%. Reactive DMs are not gated. |
301
381
  | `autonomousMonthlyCostCapUsd` | `null` | Alert + warn surface |
302
382
  | Per-ProcessKey `maxBudgetUsd` | per-row | Hard cap per execute |
303
383
 
304
- Typical day for an active user: **~$0.50** (Morning routine + briefing + 2× hourly check + 1 DM + Evening review, all on Sonnet 4.6). Quota exhaustion is detected, dedupe-notified once per 2-hour window, and retried on the next tick.
384
+ Typical day for an active user: **~$0.50** (morning routine + briefing + 2× hourly check + 1 DM + evening review, all on Sonnet 4.6). Quota exhaustion is detected, dedupe-notified once per 2-hour window, and retried on the next tick.
305
385
 
306
386
  ---
307
387
 
308
- ## Configuration
388
+ ## Operating Aitne
389
+
390
+ ### Dashboard
391
+
392
+ The dashboard at `:8322` is a full local app, not just a settings panel:
393
+
394
+ - **`/chat`** — talk to any backend/model right in the browser, with per-session overrides
395
+ - **`/agents`** — define, schedule, and inspect your agents (above)
396
+ - **`/schedule`** + **`/activity`** — upcoming runs and the full conversation/action history
397
+ - **`/analytics`** + **`/health`** — cost/usage trends and integration-mode health
398
+ - **`/connections/*`** — wire up calendar, mail, repositories, messaging, MCP, routines
399
+ - **`/settings/*`** — `models`, `backends`, `schedule`, `routines`, `processes`, `messaging`, `commands` (custom bang commands), `management`, and the experimental browser-history surfaces
400
+
401
+ ### Lifecycle
402
+
403
+ | Command | What it does |
404
+ |---|---|
405
+ | `aitne start [--no-open]` | Build if stale, launch daemon + dashboard in background |
406
+ | `aitne stop` | Graceful shutdown (SIGTERM → SIGKILL after 10 s) |
407
+ | `aitne restart [--clean-context]` | Stop then start. `--clean-context` wipes `context/` after a tarball backup |
408
+ | `aitne status` | PIDs, uptime, platforms, backends, today's spend |
409
+ | `aitne logs [-f] [-n N] [-d]` | Tail daemon log (`-d` = dashboard, `-f` = follow) |
410
+ | `aitne dev` | Foreground mode (full stdio) |
411
+
412
+ ### Operations
413
+
414
+ | Command | What it does |
415
+ |---|---|
416
+ | `aitne doctor [--json]` | Eight install-health checks + per-repo GitHub-link drift expansion |
417
+ | `aitne audit [flags]` | Read the agent action log — `--since`, `--type`, `--result`, `--backend`, `--detail`, `--json` |
418
+ | `aitne setup` | Re-open the `/setup` wizard |
419
+ | `aitne open` | Open the dashboard in your browser |
420
+ | `aitne run-now <job>` | Fire a maintenance job on demand (currently `roadmap_maintenance`) |
421
+ | `aitne verify <target>` | Read-only post-launch verification of a shipped design surface |
422
+ | `aitne version` / `update` / `uninstall` | Self-explanatory |
423
+
424
+ `aitne help [cmd]` for per-command details.
309
425
 
310
- `.env` is **bootstrap-only** (`PA_DATA_DIR`, `PA_API_PORT`, `PA_DASHBOARD_PORT`, `PA_LOG_LEVEL`). Everything else — ~100 runtime keys covering schedule, notifications, models, character, mail, voice, delegated mode — is editable from the dashboard at `:3000`, or via natural-language DMs to the agent.
426
+ ### Configuration
311
427
 
312
- Bot tokens and OAuth credentials always live in the OS keychain, never in environment variables.
428
+ `.env` is **bootstrap-only** (`PA_DATA_DIR`, `PA_API_PORT`, `PA_DASHBOARD_PORT`, `PA_LOG_LEVEL`). Everything else ~130 runtime keys covering schedule, notifications, models, character, mail, voice, delegated mode — is editable from the dashboard at `:8322`, or via natural-language DMs to the agent.
313
429
 
314
430
  ---
315
431
 
@@ -321,9 +437,9 @@ Bot tokens and OAuth credentials always live in the OS keychain, never in enviro
321
437
  | **Folder picker** | `osascript` | `zenity` / `kdialog` / `yad` | `FolderBrowserDialog` |
322
438
  | **Process tree kill** | POSIX process group | POSIX process group | `taskkill /T /F` |
323
439
 
324
- WSL falls back to the encrypted file store — set `PA_MASTER_PASSWORD` to a long random string. Windows users hitting `ENAMETOOLONG` on install should enable long paths via `LongPathsEnabled=1` registry key.
440
+ WSL falls back to the encrypted file store — set `PA_MASTER_PASSWORD` to a long random string. Windows users hitting `ENAMETOOLONG` on install should enable long paths via the `LongPathsEnabled=1` registry key.
325
441
 
326
- Common gotchas: [docs/troubleshooting.md](docs/troubleshooting.md)
442
+ Common gotchas: [docs/troubleshooting.md](docs/troubleshooting.md).
327
443
 
328
444
  ---
329
445
 
@@ -349,35 +465,6 @@ Monorepo: pnpm 10 workspaces · Turborepo · TypeScript 5.8 · Vitest 3 (100% co
349
465
 
350
466
  ---
351
467
 
352
- ## Contributing
353
-
354
- Issues and PRs welcome. Conventions:
355
-
356
- - All code, comments, tests, and user-facing text are in **English**
357
- - TypeScript throughout, camelCase, ESM with `.js` import extensions
358
- - Tests colocated with source as `foo.ts` + `foo.test.ts`
359
- - `packages/daemon/src/` is the source of truth
360
-
361
- ---
362
-
363
- ## FAQ
364
-
365
- **Is Aitne a chatbot?** No — it's a daemon. It also responds to chat, but the more interesting half is what it does while you're not looking at it.
366
-
367
- **Does it phone home?** No. The daemon binds to `127.0.0.1` only. No telemetry. Verify with `lsof` and `nettop`.
368
-
369
- **Can I edit memory directly?** Yes. Open `~/.personal-agent/context/today.md`, change anything, save. The agent picks up your edits on the next routine.
370
-
371
- **Do my existing Claude Code / Codex / Gemini settings work?** Yes. Aitne reads `~/.claude/`, `~/.codex/`, and `~/.gemini/` on session init and layers its persona on top. (`~/.opencode/` is recognised but the OpenCode runtime is coming soon.)
372
-
373
- **Is this for my team?** No — single-owner by design. Group chats and multi-user channels are filtered at the adapter layer.
374
-
375
- **Does it work without internet?** Backends and reactive messaging need internet. The daemon, dashboard, observers, and Markdown memory are entirely offline.
376
-
377
- **How do I uninstall?** `aitne uninstall` — offers to wipe `~/.personal-agent` or keep it for re-installation.
378
-
379
- ---
380
-
381
468
  ## License
382
469
 
383
470
  MIT — see [LICENSE](./LICENSE).
@@ -3,17 +3,17 @@
3
3
  - Store no passwords or secrets in any file.
4
4
  - Execute no financial transactions.
5
5
  - Auto-post to no social media platforms.
6
- - Do NOT modify `rules/management.md` directly except via the dashboard
6
+ - Do NOT modify `policies/management.md` directly except via the dashboard
7
7
  setup wizard. The `## Active Policies` section is auto-maintained by
8
8
  the daemon's policy-index reconciler — never edit it by hand; any
9
9
  manual change is overwritten on the next reconcile pass.
10
10
  - Durable management rules captured from conversation belong in
11
- `rules/policies/<slug>.md`. Use the `management-policy` skill — it
11
+ `policies/management-captures/<slug>.md`. Use the `management-policy` skill — it
12
12
  enforces the read-before-write, similarity-detection, and
13
13
  confirmation steps. The skill creates / pauses / resumes the policy
14
14
  file and (when applicable) the linked routine; the daemon's
15
15
  policy-index reconciler picks the change up and re-renders both
16
- `rules/policies/_index.md` and `rules/management.md ## Active Policies`
16
+ `policies/management-captures/_index.md` and `policies/management.md ## Active Policies`
17
17
  within ~10 s. Do NOT manually PATCH `_index.md` or the management
18
18
  section.
19
19
  - Day boundary: 04:00 — manage schedules from 04:00 to next 03:59.