@aitne-sh/aitne 0.1.0

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 (249) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +464 -0
  3. package/agent-assets/agent-profiles/_safety.md +26 -0
  4. package/agent-assets/agent-profiles/conversational.md +33 -0
  5. package/agent-assets/agent-profiles/docs-qa.md +24 -0
  6. package/agent-assets/agent-profiles/observer.md +28 -0
  7. package/agent-assets/agent-profiles/profile-importer.md +63 -0
  8. package/agent-assets/agent-profiles/proxy.md +28 -0
  9. package/agent-assets/agent-profiles/routine.md +16 -0
  10. package/agent-assets/agent-profiles/task.md +18 -0
  11. package/agent-assets/docs/concepts/agent-day.md +88 -0
  12. package/agent-assets/docs/concepts/auth-health.md +75 -0
  13. package/agent-assets/docs/concepts/backends-and-tiers.md +126 -0
  14. package/agent-assets/docs/concepts/costs-and-quotas.md +103 -0
  15. package/agent-assets/docs/concepts/delegated-mode.md +223 -0
  16. package/agent-assets/docs/concepts/memory-model.md +118 -0
  17. package/agent-assets/docs/concepts/observations.md +80 -0
  18. package/agent-assets/docs/concepts/process-keys.md +89 -0
  19. package/agent-assets/docs/concepts/routines.md +108 -0
  20. package/agent-assets/docs/concepts/safety-and-execution.md +109 -0
  21. package/agent-assets/docs/concepts/safety-model.md +279 -0
  22. package/agent-assets/docs/concepts/skills.md +100 -0
  23. package/agent-assets/docs/features/integrations/calendar.md +92 -0
  24. package/agent-assets/docs/features/integrations/git.md +95 -0
  25. package/agent-assets/docs/features/integrations/github.md +170 -0
  26. package/agent-assets/docs/features/integrations/mail.md +106 -0
  27. package/agent-assets/docs/features/integrations/notion.md +69 -0
  28. package/agent-assets/docs/features/integrations/obsidian.md +71 -0
  29. package/agent-assets/docs/features/lifestyle/git.md +178 -0
  30. package/agent-assets/docs/features/lifestyle/reading.md +93 -0
  31. package/agent-assets/docs/features/lifestyle/receipts.md +71 -0
  32. package/agent-assets/docs/features/lifestyle/travel-bookings.md +44 -0
  33. package/agent-assets/docs/features/lifestyle/travel-time.md +52 -0
  34. package/agent-assets/docs/features/memory-files/agent-journal.md +105 -0
  35. package/agent-assets/docs/features/memory-files/projects.md +56 -0
  36. package/agent-assets/docs/features/memory-files/roadmap.md +61 -0
  37. package/agent-assets/docs/features/memory-files/schedule.md +112 -0
  38. package/agent-assets/docs/features/memory-files/today.md +73 -0
  39. package/agent-assets/docs/features/memory-files/user-profile.md +81 -0
  40. package/agent-assets/docs/features/messaging/dashboard-chat.md +93 -0
  41. package/agent-assets/docs/features/messaging/discord.md +50 -0
  42. package/agent-assets/docs/features/messaging/overview.md +111 -0
  43. package/agent-assets/docs/features/messaging/pairing-and-magic-phrase.md +69 -0
  44. package/agent-assets/docs/features/messaging/slack.md +51 -0
  45. package/agent-assets/docs/features/messaging/telegram.md +63 -0
  46. package/agent-assets/docs/features/messaging/whatsapp.md +48 -0
  47. package/agent-assets/docs/features/operations/activity-and-conversations.md +105 -0
  48. package/agent-assets/docs/features/operations/approvals.md +58 -0
  49. package/agent-assets/docs/features/operations/backend-routing.md +62 -0
  50. package/agent-assets/docs/features/operations/cost-tracking.md +59 -0
  51. package/agent-assets/docs/features/operations/notifications.md +69 -0
  52. package/agent-assets/docs/features/operations/quiet-hours.md +106 -0
  53. package/agent-assets/docs/features/operations/schedule-approaching.md +60 -0
  54. package/agent-assets/docs/features/routines/custom-routines.md +101 -0
  55. package/agent-assets/docs/features/routines/evening-review.md +81 -0
  56. package/agent-assets/docs/features/routines/hourly-check.md +85 -0
  57. package/agent-assets/docs/features/routines/monthly-review.md +65 -0
  58. package/agent-assets/docs/features/routines/morning-routine.md +123 -0
  59. package/agent-assets/docs/features/routines/weekly-review.md +70 -0
  60. package/agent-assets/docs/getting-started/01-what-is-this.md +192 -0
  61. package/agent-assets/docs/getting-started/02-first-steps.md +80 -0
  62. package/agent-assets/docs/getting-started/03-what-can-this-do.md +110 -0
  63. package/agent-assets/docs/getting-started/04-first-day.md +287 -0
  64. package/agent-assets/docs/glossary.md +116 -0
  65. package/agent-assets/docs/guides/add-a-custom-routine.md +71 -0
  66. package/agent-assets/docs/guides/backup-and-restore.md +54 -0
  67. package/agent-assets/docs/guides/change-which-model-handles-x.md +47 -0
  68. package/agent-assets/docs/guides/connect-a-new-mail-account.md +59 -0
  69. package/agent-assets/docs/guides/import-knowledge-file.md +275 -0
  70. package/agent-assets/docs/guides/install-and-run.md +72 -0
  71. package/agent-assets/docs/guides/migrate-machines.md +52 -0
  72. package/agent-assets/docs/guides/pause-the-agent.md +65 -0
  73. package/agent-assets/docs/guides/reinstall-cleanly.md +52 -0
  74. package/agent-assets/docs/guides/setup-wizard.md +107 -0
  75. package/agent-assets/docs/guides/switch-default-backend.md +60 -0
  76. package/agent-assets/docs/reference/api.md +51 -0
  77. package/agent-assets/docs/reference/cli-commands.md +121 -0
  78. package/agent-assets/docs/reference/config.md +74 -0
  79. package/agent-assets/docs/reference/disallowed-tools.md +76 -0
  80. package/agent-assets/docs/reference/keyboard-shortcuts.md +39 -0
  81. package/agent-assets/docs/reference/process-keys.md +59 -0
  82. package/agent-assets/docs/reference/skills.md +50 -0
  83. package/agent-assets/docs/troubleshooting/auth-failed.md +57 -0
  84. package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +55 -0
  85. package/agent-assets/docs/troubleshooting/fallback-keeps-firing.md +54 -0
  86. package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +53 -0
  87. package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +75 -0
  88. package/agent-assets/docs/troubleshooting/observation-not-detected.md +57 -0
  89. package/agent-assets/docs/troubleshooting/quota-exhausted.md +57 -0
  90. package/agent-assets/optimizer-skills/drift-analysis/SKILL.md +75 -0
  91. package/agent-assets/optimizer-skills/knowledge-map/SKILL.md +71 -0
  92. package/agent-assets/optimizer-skills/skill-curation/SKILL.md +108 -0
  93. package/agent-assets/project-doc-templates/git-repo.md +21 -0
  94. package/agent-assets/project-doc-templates/project.md +38 -0
  95. package/agent-assets/skills/attach/SKILL.md +104 -0
  96. package/agent-assets/skills/context/SKILL.md +257 -0
  97. package/agent-assets/skills/context/curation.json +37 -0
  98. package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +13 -0
  99. package/agent-assets/skills/context/seeds/frontmatter-requirements.seed.json +40 -0
  100. package/agent-assets/skills/docs-search/SKILL.md +176 -0
  101. package/agent-assets/skills/external-services/SKILL.delegated.claude.md +369 -0
  102. package/agent-assets/skills/external-services/SKILL.delegated.codex.md +349 -0
  103. package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +347 -0
  104. package/agent-assets/skills/external-services/SKILL.md +371 -0
  105. package/agent-assets/skills/mail/SKILL.delegated.claude.md +284 -0
  106. package/agent-assets/skills/mail/SKILL.delegated.codex.md +261 -0
  107. package/agent-assets/skills/mail/SKILL.delegated.gemini.md +255 -0
  108. package/agent-assets/skills/mail/SKILL.md +313 -0
  109. package/agent-assets/skills/mail/references/errors.md +17 -0
  110. package/agent-assets/skills/mail/references/providers.md +40 -0
  111. package/agent-assets/skills/mail/references/query-grammar.md +24 -0
  112. package/agent-assets/skills/management-policy/SKILL.md +307 -0
  113. package/agent-assets/skills/management-policy/curation.json +13 -0
  114. package/agent-assets/skills/management-policy/seeds/policy-file-shape.seed.json +16 -0
  115. package/agent-assets/skills/management-task-modify/SKILL.md +202 -0
  116. package/agent-assets/skills/management-task-register/SKILL.md +330 -0
  117. package/agent-assets/skills/management-task-stop/SKILL.md +166 -0
  118. package/agent-assets/skills/notify/SKILL.md +196 -0
  119. package/agent-assets/skills/notion/SKILL.delegated.claude.md +254 -0
  120. package/agent-assets/skills/notion/SKILL.delegated.codex.md +195 -0
  121. package/agent-assets/skills/notion/SKILL.delegated.gemini.md +194 -0
  122. package/agent-assets/skills/notion/SKILL.md +86 -0
  123. package/agent-assets/skills/observations/SKILL.md +234 -0
  124. package/agent-assets/skills/observations/curation.json +13 -0
  125. package/agent-assets/skills/observations/seeds/source-namespacing.seed.json +20 -0
  126. package/agent-assets/skills/project-doc/SKILL.md +86 -0
  127. package/agent-assets/skills/project-doc/curation.json +21 -0
  128. package/agent-assets/skills/project-doc/seeds/project-shape.seed.json +25 -0
  129. package/agent-assets/skills/project-doc/seeds/slug-grammar.seed.json +20 -0
  130. package/agent-assets/skills/reading/SKILL.md +198 -0
  131. package/agent-assets/skills/reading/references/reading-taste.md +197 -0
  132. package/agent-assets/skills/receipts/SKILL.md +134 -0
  133. package/agent-assets/skills/roadmap/SKILL.md +276 -0
  134. package/agent-assets/skills/roadmap/curation.json +13 -0
  135. package/agent-assets/skills/roadmap/references/horizon-tags.md +40 -0
  136. package/agent-assets/skills/roadmap/references/preparation-timeline.md +47 -0
  137. package/agent-assets/skills/roadmap/seeds/entry-types.seed.json +16 -0
  138. package/agent-assets/skills/schedule/SKILL.md +228 -0
  139. package/agent-assets/skills/scheduled-managed-task/SKILL.md +392 -0
  140. package/agent-assets/skills/today/SKILL.md +198 -0
  141. package/agent-assets/skills/today/curation.json +21 -0
  142. package/agent-assets/skills/today/seeds/agent-notes-flavors.seed.json +17 -0
  143. package/agent-assets/skills/today/seeds/section-shape.seed.json +17 -0
  144. package/agent-assets/skills/travel/SKILL.md +132 -0
  145. package/agent-assets/skills/travel-time/SKILL.md +149 -0
  146. package/agent-assets/skills/user-interview/SKILL.md +323 -0
  147. package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +94 -0
  148. package/agent-assets/skills/user-profile/SKILL.md +210 -0
  149. package/agent-assets/skills/user-profile/curation.json +29 -0
  150. package/agent-assets/skills/user-profile/seeds/learned-context-format.seed.json +14 -0
  151. package/agent-assets/skills/user-profile/seeds/routing-table.seed.json +53 -0
  152. package/agent-assets/skills/user-profile/seeds/topic-files.seed.json +27 -0
  153. package/agent-assets/task-flows/dashboard.docs_qa.md +43 -0
  154. package/agent-assets/task-flows/default.md +11 -0
  155. package/agent-assets/task-flows/git.branch.created.md +25 -0
  156. package/agent-assets/task-flows/git.lifecycle.poll.md +52 -0
  157. package/agent-assets/task-flows/git.local_ahead.stale.md +34 -0
  158. package/agent-assets/task-flows/git.merge_to_default.md +30 -0
  159. package/agent-assets/task-flows/git.project.refresh_architecture.md +100 -0
  160. package/agent-assets/task-flows/git.project.retemplate.md +73 -0
  161. package/agent-assets/task-flows/git.push.detected.md +32 -0
  162. package/agent-assets/task-flows/git.push.force_pushed.md +36 -0
  163. package/agent-assets/task-flows/git.tag.created.md +24 -0
  164. package/agent-assets/task-flows/github.assigned.md +43 -0
  165. package/agent-assets/task-flows/github.pull_request.review_requested.md +57 -0
  166. package/agent-assets/task-flows/github.security_alert.md +45 -0
  167. package/agent-assets/task-flows/github.workflow_run.failed.md +57 -0
  168. package/agent-assets/task-flows/knowledge.import.md +161 -0
  169. package/agent-assets/task-flows/message.received.dm.md +142 -0
  170. package/agent-assets/task-flows/message.received.dm_first.md +117 -0
  171. package/agent-assets/task-flows/message.received.md +14 -0
  172. package/agent-assets/task-flows/routine.custom.md +38 -0
  173. package/agent-assets/task-flows/routine.evening_review.md +323 -0
  174. package/agent-assets/task-flows/routine.hourly_check.delegated.claude.md +405 -0
  175. package/agent-assets/task-flows/routine.hourly_check.delegated.codex.md +400 -0
  176. package/agent-assets/task-flows/routine.hourly_check.delegated.gemini.md +404 -0
  177. package/agent-assets/task-flows/routine.hourly_check.md +184 -0
  178. package/agent-assets/task-flows/routine.hourly_check.triage.md +93 -0
  179. package/agent-assets/task-flows/routine.monthly_review.md +250 -0
  180. package/agent-assets/task-flows/routine.morning_routine.md +300 -0
  181. package/agent-assets/task-flows/routine.morning_routine_initial.md +184 -0
  182. package/agent-assets/task-flows/routine.roadmap_refresh.md +275 -0
  183. package/agent-assets/task-flows/routine.today_refresh.md +172 -0
  184. package/agent-assets/task-flows/routine.user_profile_sweep.md +242 -0
  185. package/agent-assets/task-flows/routine.weekly_review.md +247 -0
  186. package/agent-assets/task-flows/schedule.approaching.md +124 -0
  187. package/agent-assets/task-flows/scheduled.dm.md +391 -0
  188. package/agent-assets/task-flows/scheduled.task.md +141 -0
  189. package/agent-assets/task-flows/setup.initial.md +277 -0
  190. package/agent-assets/task-flows/setup.update.md +53 -0
  191. package/agent-assets/templates/README.md +85 -0
  192. package/agent-assets/templates/_index.md +39 -0
  193. package/agent-assets/templates/_manifest.json +103 -0
  194. package/agent-assets/templates/agent/journal.md +10 -0
  195. package/agent-assets/templates/agent/profile-questions.md +74 -0
  196. package/agent-assets/templates/context-index.md +42 -0
  197. package/agent-assets/templates/dossiers/_index.md +22 -0
  198. package/agent-assets/templates/dossiers/evening.md +23 -0
  199. package/agent-assets/templates/dossiers/hourly.md +23 -0
  200. package/agent-assets/templates/dossiers/monthly.md +23 -0
  201. package/agent-assets/templates/dossiers/morning.md +23 -0
  202. package/agent-assets/templates/dossiers/roadmap.md +23 -0
  203. package/agent-assets/templates/dossiers/weekly.md +23 -0
  204. package/agent-assets/templates/projects/_active.base +14 -0
  205. package/agent-assets/templates/projects/_index.md +29 -0
  206. package/agent-assets/templates/roadmap.md +15 -0
  207. package/agent-assets/templates/routines/_index.md +20 -0
  208. package/agent-assets/templates/routines/evening.md +22 -0
  209. package/agent-assets/templates/routines/hourly.md +30 -0
  210. package/agent-assets/templates/routines/monthly.md +25 -0
  211. package/agent-assets/templates/routines/morning.md +26 -0
  212. package/agent-assets/templates/routines/weekly.md +23 -0
  213. package/agent-assets/templates/rules/_index.md +19 -0
  214. package/agent-assets/templates/rules/journal-export.md +41 -0
  215. package/agent-assets/templates/rules/journal-format.md +61 -0
  216. package/agent-assets/templates/rules/management.md +48 -0
  217. package/agent-assets/templates/rules/mcp.md +40 -0
  218. package/agent-assets/templates/rules/policies/_index.md +22 -0
  219. package/agent-assets/templates/rules/redaction.md +30 -0
  220. package/agent-assets/templates/today.md +13 -0
  221. package/agent-assets/templates/user/_index.md +16 -0
  222. package/agent-assets/templates/user/expertise.md +7 -0
  223. package/agent-assets/templates/user/goals.md +7 -0
  224. package/agent-assets/templates/user/people.md +7 -0
  225. package/agent-assets/templates/user/personal.md +7 -0
  226. package/agent-assets/templates/user/profile.md +28 -0
  227. package/agent-assets/templates/user/work.md +7 -0
  228. package/bin/aitne.mjs +1096 -0
  229. package/package.json +78 -0
  230. package/personal-agent.mjs +39 -0
  231. package/scripts/browser.mjs +99 -0
  232. package/scripts/check-redaction-coverage.mjs +109 -0
  233. package/scripts/commands/audit.mjs +309 -0
  234. package/scripts/commands/doctor.mjs +437 -0
  235. package/scripts/commands/open.mjs +40 -0
  236. package/scripts/commands/setup.mjs +21 -0
  237. package/scripts/commands/uninstall.mjs +114 -0
  238. package/scripts/commands/update.mjs +96 -0
  239. package/scripts/commands/version.mjs +62 -0
  240. package/scripts/commands.md +0 -0
  241. package/scripts/lib/sqlite-loader.mjs +49 -0
  242. package/scripts/message-discipline-digest.mjs +535 -0
  243. package/scripts/poc/google-connector-inheritance/REPORT.md +197 -0
  244. package/scripts/poc/google-connector-inheritance/claude-sdk-probe.mjs +79 -0
  245. package/scripts/remint-roadmap-ids.mjs +257 -0
  246. package/scripts/rm-paths.mjs +22 -0
  247. package/scripts/run-node.mjs +223 -0
  248. package/scripts/smoke-obsidian-api.mjs +166 -0
  249. package/scripts/start.mjs +160 -0
@@ -0,0 +1,118 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: concepts/memory-model
4
+ title: Memory Model
5
+ id: memory-model
6
+ aliases:
7
+ - context files
8
+ - memory files
9
+ - long-term memory
10
+ category: concepts
11
+ summary: |
12
+ Aitne stores durable memory as plain Markdown files under
13
+ ~/.personal-agent/context/. SQLite holds sessions, actions, and
14
+ observations; the MD files are the authoritative store for everything
15
+ the agent reads and rewrites about you.
16
+ section: memory
17
+ tags:
18
+ - core
19
+ - memory
20
+ - storage
21
+ status: stable
22
+ ask_examples:
23
+ - Where are my context files stored?
24
+ - How does the agent edit context files?
25
+ - What is the difference between context MD and SQLite?
26
+ locale: en-US
27
+ created: 2026-04-25
28
+ updated: 2026-04-25
29
+ keywords:
30
+ - context
31
+ - markdown
32
+ - SQLite
33
+ - today.md
34
+ - user/profile.md
35
+ - roadmap.md
36
+ related:
37
+ - features/memory-files/today
38
+ - features/memory-files/user-profile
39
+ - features/memory-files/roadmap
40
+ - features/memory-files/agent-journal
41
+ - features/memory-files/schedule
42
+ - features/memory-files/projects
43
+ ui_anchors:
44
+ - /knowledge
45
+ - /connections/knowledge
46
+ context_files:
47
+ - today.md
48
+ - user/profile.md
49
+ - roadmap.md
50
+ - agent/journal.md
51
+ - daily/<date>.md
52
+ - projects/<slug>.md
53
+ ---
54
+
55
+ # Memory Model
56
+
57
+ ## TL;DR
58
+
59
+ Aitne treats Markdown files in `~/.personal-agent/context/`
60
+ as its long-term memory and SQLite
61
+ (`~/.personal-agent/data/personal_agent.db`) as session-scoped state.
62
+ Anything you want the agent to remember between runs lives in an MD
63
+ file you can read, diff, and edit by hand.
64
+
65
+ ## Why This Concept Exists
66
+
67
+ A long-running agent that stores meaning inside an opaque database
68
+ gives you no recourse when something goes wrong. Aitne's design
69
+ is the opposite: every fact the agent recalls about you, your projects,
70
+ your day, or its own past behavior sits in a `.md` file you can open in
71
+ any editor. Auditing, backups, and recovery are all "use git or rsync".
72
+
73
+ SQLite is reserved for the things you do not want the agent rewriting
74
+ on every turn — session logs, action audit trails, observations, FTS
75
+ indexes, and configuration.
76
+
77
+ ## Definitions
78
+
79
+ - **Context file**: any `.md` file under `~/.personal-agent/context/`.
80
+ - **Authoritative memory**: the union of context files; SQLite never
81
+ stores facts the agent treats as canonical truth about the operator.
82
+ - **`AgentWriteTracker`**: the daemon component that distinguishes an
83
+ agent-originated context-file write from a human edit so the
84
+ Obsidian/Git observers do not loop on the agent's own output.
85
+ - **Context API**: the daemon's `/api/context/*` endpoint, the **only**
86
+ legal write path. The agent does not have direct `Edit` / `Write`
87
+ permissions on the filesystem; it must go through the daemon.
88
+
89
+ ## Concrete Examples
90
+
91
+ - `today.md` — rewritten by the morning routine.
92
+ - `user/profile.md` — your profile, hand-edited or appended by the
93
+ agent on request. Topic-shaped slices live alongside it
94
+ (`user/people.md`, `user/work.md`, `user/expertise.md`,
95
+ `user/personal.md`, `user/goals.md`). See
96
+ [User Profile](../features/memory-files/user-profile.md).
97
+ - `roadmap.md` — long-running goals + Preparation Timeline rows that
98
+ fire daily during the morning routine.
99
+ - `agent/journal.md` — the agent's own running log of decisions,
100
+ retros, and judgement calls.
101
+ - `daily/2026-04-25.md` — per-date archive of that day's plan,
102
+ synthesized by the morning routine.
103
+ - `projects/<slug>.md` — one file per active project.
104
+
105
+ ## Where You See It in the Dashboard
106
+
107
+ - **Knowledge → Context Files** lists every file with its size, last
108
+ modified time, and a preview.
109
+ - **Connections → Knowledge** is where vault integrations (Obsidian,
110
+ Notion) attach.
111
+
112
+ ## Related
113
+
114
+ - [today.md](../features/memory-files/today.md)
115
+ - [user/profile.md](../features/memory-files/user-profile.md)
116
+ - [roadmap.md](../features/memory-files/roadmap.md)
117
+ - [Skills](skills.md) — the per-skill SKILL.md files that tell the
118
+ agent how to read and write each context file.
@@ -0,0 +1,80 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: concepts/observations
4
+ title: Observations
5
+ id: observations
6
+ aliases:
7
+ - observation
8
+ - polling
9
+ - hourly check
10
+ category: concepts
11
+ summary: |
12
+ Observations are change records the polling integrations write into
13
+ SQLite. The hourly check consumes them — there is no per-change
14
+ notification. This pivot was the Phase 9 polling change.
15
+ section: observations
16
+ tags:
17
+ - core
18
+ - observations
19
+ - polling
20
+ status: stable
21
+ ask_examples:
22
+ - What is an observation?
23
+ - Why doesn't the agent message me on every git commit?
24
+ - How does the hourly check use observations?
25
+ locale: en-US
26
+ created: 2026-04-25
27
+ updated: 2026-04-25
28
+ keywords:
29
+ - observation
30
+ - polling
31
+ - hourly check
32
+ - phase 9
33
+ related:
34
+ - features/routines/hourly-check
35
+ - concepts/process-keys
36
+ ---
37
+
38
+ # Observations
39
+
40
+ ## TL;DR
41
+
42
+ Polling integrations (Obsidian, Git, Notion, Calendar) **do not emit
43
+ events** when they detect changes. They write observation rows to
44
+ SQLite. A single `routine.hourly_check` consumes the queue and decides
45
+ what is worth surfacing.
46
+
47
+ ## Why This Concept Exists
48
+
49
+ Per-change notifications turned every routine commit, every saved
50
+ note, every tiny calendar tweak into a paging event. The Phase 9
51
+ pivot moved the agent away from that: changes accumulate, and once an
52
+ hour the agent looks at the bag and decides whether the pattern adds
53
+ up to something the operator should hear about.
54
+
55
+ ## Definitions
56
+
57
+ - **Observation**: one row in the `observations` table.
58
+ - **Actor**: who caused the change. `actor='agent'` rows are filtered
59
+ out by the consumer (anti-loop).
60
+ - **Hourly check**: the consumer routine. Light tier by default.
61
+ - **`AgentWriteTracker`**: the daemon component that tags
62
+ agent-originated writes so observers don't observe the agent's own
63
+ output.
64
+
65
+ ## Concrete Examples
66
+
67
+ - A new commit in a watched repo → 1 observation.
68
+ - A saved note in Obsidian → 1 observation.
69
+ - A calendar event move → 1 observation.
70
+
71
+ ## Where You See It in the Dashboard
72
+
73
+ - **Activity** logs hourly-check fires; the detail shows how many
74
+ observations were consumed.
75
+
76
+ ## Related
77
+
78
+ - [Hourly Check](../features/routines/hourly-check.md)
79
+ - [Git](../features/integrations/git.md)
80
+ - [Obsidian](../features/integrations/obsidian.md)
@@ -0,0 +1,89 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: concepts/process-keys
4
+ title: ProcessKeys
5
+ id: process-keys
6
+ aliases:
7
+ - process key
8
+ - dispatch key
9
+ - event key
10
+ category: concepts
11
+ summary: |
12
+ A ProcessKey is the agent's dispatch identity for one kind of work
13
+ ("morning routine", "DM", "hourly check"). The router resolves it
14
+ to a backend + tier binding; the manifest map resolves it to skills.
15
+ section: process-keys
16
+ tags:
17
+ - core
18
+ - dispatch
19
+ status: stable
20
+ ask_examples:
21
+ - What is a ProcessKey?
22
+ - Where can I see all the ProcessKeys?
23
+ - How do I change which model handles a ProcessKey?
24
+ locale: en-US
25
+ created: 2026-04-25
26
+ updated: 2026-04-25
27
+ keywords:
28
+ - process key
29
+ - dispatch
30
+ - routing
31
+ related:
32
+ - concepts/backends-and-tiers
33
+ - concepts/skills
34
+ - reference/process-keys
35
+ ---
36
+
37
+ # ProcessKeys
38
+
39
+ ## TL;DR
40
+
41
+ A ProcessKey is a string like `routine.morning_routine` or `message.dm`
42
+ that identifies one class of agent work. Every routine, every reactive
43
+ event, every dashboard action is tagged with one. The router uses it
44
+ to pick the backend; the skills compiler uses it to pick the tools.
45
+
46
+ ## Why This Concept Exists
47
+
48
+ Without a stable identifier per task class, "the morning routine" and
49
+ "a DM" would have to be hand-distinguished everywhere they were
50
+ treated differently — pricing, retention, tool scope, auditability.
51
+ The ProcessKey is the single coupling that ties dispatch to all of
52
+ those subsystems.
53
+
54
+ ## Definitions
55
+
56
+ - **CONFIGURABLE_PROCESS_KEYS**: the set the operator can override per
57
+ backend on `/settings/models`.
58
+ - **REACTIVE_PROCESS_KEYS**: those tied to in-the-loop events (DMs,
59
+ dashboard chat, docs QA).
60
+ - **DEFAULT_PROCESS_TIERS**: the per-key default (heavy or light).
61
+ - **PROCESS_TO_EVENT_TYPE**: maps a ProcessKey to the skill manifest
62
+ key.
63
+
64
+ ## Concrete Examples
65
+
66
+ - Routines: `routine.morning_routine`, `routine.morning_routine_initial`,
67
+ `routine.evening_review`, `routine.weekly_review`,
68
+ `routine.monthly_review`, `routine.hourly_check`,
69
+ `routine.roadmap_refresh`, `routine.today_refresh`,
70
+ `routine.user_profile_sweep`
71
+ - Custom routines: `routine.custom.<slug>` (kebab-case slug)
72
+ - Messaging: `message.dm`, `message.mention`
73
+ - Dashboard: `dashboard.chat`, `dashboard.docs_qa`
74
+ - Scheduled / external: `agent.task` (recurring schedules),
75
+ `agent.dm_task` (DM-tone scheduled briefings),
76
+ `schedule.approaching`, `calendar.change`, `gmail_classify`,
77
+ `setup`
78
+
79
+ ## Where You See It in the Dashboard
80
+
81
+ - **Settings → Models** lists every configurable ProcessKey with its
82
+ current binding.
83
+ - **Activity** rows include the ProcessKey for every fire.
84
+
85
+ ## Related
86
+
87
+ - [Backends and Tiers](backends-and-tiers.md)
88
+ - [Skills](skills.md)
89
+ - [Reference: ProcessKeys](../reference/process-keys.md)
@@ -0,0 +1,108 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: concepts/routines
4
+ title: Routines
5
+ id: routines
6
+ aliases:
7
+ - autonomous routines
8
+ - cron
9
+ - scheduled work
10
+ category: concepts
11
+ summary: |
12
+ Routines are the autonomous, scheduled tasks Aitne runs on
13
+ its own — morning routine, evening review, hourly check, weekly and
14
+ monthly retros, plus any custom routines you define.
15
+ section: routines
16
+ tags:
17
+ - core
18
+ - routine
19
+ - autonomous
20
+ status: stable
21
+ ask_examples:
22
+ - What routines does the agent run automatically?
23
+ - How do I disable a routine?
24
+ - Can I add my own routine?
25
+ locale: en-US
26
+ created: 2026-04-25
27
+ updated: 2026-04-25
28
+ keywords:
29
+ - routine
30
+ - cron
31
+ - autonomous
32
+ - scheduler
33
+ related:
34
+ - features/routines/morning-routine
35
+ - features/routines/evening-review
36
+ - features/routines/weekly-review
37
+ - features/routines/hourly-check
38
+ - features/routines/custom-routines
39
+ - concepts/process-keys
40
+ ui_anchors:
41
+ - /connections/routines
42
+ - /settings/routines
43
+ ---
44
+
45
+ # Routines
46
+
47
+ ## TL;DR
48
+
49
+ A routine is a unit of agent work that runs on a schedule, not in
50
+ response to a message. The morning routine fires once per agent day at
51
+ `dayBoundaryHour`; evening / weekly / monthly retros fire on fixed
52
+ schedules in code; the hourly check coalesces accumulated observations
53
+ on a configurable cadence.
54
+
55
+ ## Why This Concept Exists
56
+
57
+ The premise of Aitne is that the operator does not want to
58
+ "prompt" their assistant every time. Routines are how the agent shows
59
+ up without being asked: it builds today, it logs to the journal, it
60
+ files a retro for the week. They are the proactive surface.
61
+
62
+ Each routine is a single ProcessKey — `routine.morning_routine`,
63
+ `routine.hourly_check`, `routine.weekly_review`, etc. The dispatcher
64
+ treats them as just another event class; the only difference from a
65
+ DM is who fired the event.
66
+
67
+ ## Definitions
68
+
69
+ - **Routine**: one autonomous job firing at a schedule. Identified by
70
+ a ProcessKey starting with `routine.`.
71
+ - **Agent day**: the 24-hour window starting at `dayBoundaryHour`
72
+ (default 04:00) — see [Agent Day](agent-day.md).
73
+ - **Catch-up**: if the daemon was offline at the trigger time, the
74
+ scheduler re-fires the routine on next launch when it is still in
75
+ the same agent day.
76
+ - **Heavy / light tier**: only `routine.morning_routine` (and the
77
+ one-shot `routine.morning_routine_initial`) run heavy by default
78
+ (Opus on Claude, GPT-5.5 on Codex, Gemini 3 Pro on Gemini). Evening,
79
+ weekly, and monthly reviews plus the hourly check default to light —
80
+ see [Backends and Tiers](backends-and-tiers.md).
81
+
82
+ ## Concrete Examples
83
+
84
+ | ProcessKey | When | Tier |
85
+ |---|---|---|
86
+ | `routine.morning_routine_initial` | First setup day, one-shot | heavy |
87
+ | `routine.morning_routine` | `dayBoundaryHour` daily | heavy |
88
+ | `routine.evening_review` | 18:00 daily (fixed) | light |
89
+ | `routine.hourly_check` | Every `hourlyCheckIntervalMinutes` (default 60) inside the active window | light |
90
+ | `routine.weekly_review` | Friday 18:00 (fixed) | light |
91
+ | `routine.monthly_review` | Last day of month, 18:00 (fixed) | light |
92
+ | `routine.custom.<slug>` | Operator-defined recurrence | configurable |
93
+
94
+ ## Where You See It in the Dashboard
95
+
96
+ - **Settings → Routines** is where the hourly check active window, the
97
+ hourly check cadence, and any custom routines live. Morning, evening,
98
+ weekly, and monthly fire times are fixed in code and not surfaced
99
+ here.
100
+ - **Connections → Routines** is the unified view of next-fire times.
101
+ - **Activity** logs each routine run with its outcome.
102
+
103
+ ## Related
104
+
105
+ - [Morning Routine](../features/routines/morning-routine.md)
106
+ - [Evening Review](../features/routines/evening-review.md)
107
+ - [Hourly Check](../features/routines/hourly-check.md)
108
+ - [Custom Routines](../features/routines/custom-routines.md)
@@ -0,0 +1,109 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: concepts/safety-and-execution
4
+ title: Safety and Execution Modes
5
+ id: safety-and-execution
6
+ aliases:
7
+ - execution mode
8
+ - safe mode
9
+ - allow mode
10
+ - absolute block
11
+ - disallowed tools
12
+ category: concepts
13
+ summary: |
14
+ Aitne has two execution-mode postures (Safe / Allow) plus an
15
+ always-disallowed layer that holds in both. Together they decide
16
+ what tools the agent can run, when it must ask for approval, and
17
+ which actions are categorically refused.
18
+ section: safety
19
+ tags:
20
+ - core
21
+ - safety
22
+ - cost
23
+ status: stable
24
+ ask_examples:
25
+ - What is the difference between Safe and Allow mode?
26
+ - Can the agent ever delete files on its own?
27
+ - How do I see what tools the agent is allowed to use?
28
+ locale: en-US
29
+ created: 2026-04-25
30
+ updated: 2026-04-25
31
+ keywords:
32
+ - safety
33
+ - safe mode
34
+ - allow mode
35
+ - absolute block
36
+ - disallowed tools
37
+ - approval
38
+ related:
39
+ - concepts/skills
40
+ - features/operations/approvals
41
+ - reference/disallowed-tools
42
+ ui_anchors:
43
+ - /settings/advanced
44
+ config_keys:
45
+ - disallowedTools
46
+ - allowedToolsOverride
47
+ - claudeExecutionPermissionMode
48
+ - codexExecutionPermissionMode
49
+ - geminiExecutionPermissionMode
50
+ ---
51
+
52
+ # Safety and Execution Modes
53
+
54
+ ## TL;DR
55
+
56
+ Three layers gate what the agent can do:
57
+
58
+ 1. **Skill `allowed-tools`** — the visible toolset for that session.
59
+ 2. **Execution mode** — Safe (strict permission checks, sandboxes)
60
+ or Allow (SDK bypass, sandbox off). Per-backend.
61
+ 3. **Always-disallowed** — a hard floor. Recursive deletes, sudo,
62
+ secret-file reads / writes are denied unconditionally regardless
63
+ of mode.
64
+
65
+ ## Why This Concept Exists
66
+
67
+ A long-running agent that can write files, send messages, and call
68
+ external APIs is one bad prompt away from a destructive turn. Layering
69
+ the safety controls means a misconfigured allow-list can't unlock the
70
+ absolute-block layer; a too-broad skill can't widen past the
71
+ disallowed-tools floor.
72
+
73
+ ## Definitions
74
+
75
+ - **Safe mode**: the default. Strict permission checks, Claude curl/jq
76
+ hooks, Codex workspace-write sandbox, Gemini whitelist TOML.
77
+ - **Allow mode**: the looser posture. SDK bypass, sandbox off, minimal
78
+ TOML. The absolute-block layer still holds.
79
+ - **Absolute block**: the unconditional layer. `ALWAYS_DISALLOWED_TOOLS`
80
+ in `src/safety/always-disallowed.ts`. Cannot be widened by skills,
81
+ by config, or by allow-mode.
82
+ - **Risk tier**: `read`, `notify`, `approve`. Read = autonomous. Notify
83
+ = the agent proceeds after DMing the operator. Approve = blocked
84
+ until the operator clicks approve in the dashboard.
85
+
86
+ ## Concrete Examples
87
+
88
+ | Action | Risk tier |
89
+ |---|---|
90
+ | Read `today.md` | read |
91
+ | Append to `agent/journal.md` | notify |
92
+ | Send a DM | notify |
93
+ | Update `roadmap.md` | approve |
94
+ | Recursive delete | absolute-block (refused) |
95
+ | `chmod` on a daemon-owned file | absolute-block |
96
+
97
+ ## Where You See It in the Dashboard
98
+
99
+ - **Settings → Advanced** holds `disallowedTools`, `allowedToolsOverride`,
100
+ and the per-backend execution mode switch.
101
+ - **Activity** logs every blocked tool call as `action_type='blocked_absolute'`.
102
+ - **Approvals** is where Approve-tier actions queue when they fire.
103
+
104
+ ## Related
105
+
106
+ - [Skills](skills.md) — where each session's per-task `allowed-tools` lives.
107
+ - [Approvals](../features/operations/approvals.md) — the operator-side
108
+ surface for Approve-tier actions.
109
+ - [Disallowed Tools (reference)](../reference/disallowed-tools.md)