@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,170 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: features/integrations/github
4
+ title: GitHub
5
+ id: github
6
+ aliases:
7
+ - github integration
8
+ - github poller
9
+ - github notifications
10
+ category: features
11
+ summary: |
12
+ GitHub is the remote-side counterpart to the Git integration. The
13
+ daemon polls the user's notifications feed and watched-repo CI failures
14
+ via the local `gh` CLI, recording observations and DM-ing the user
15
+ about high-priority signals (review requests, default-branch CI failures,
16
+ Dependabot alerts, assignments). The agent never auto-comments,
17
+ auto-merges, or pushes.
18
+ section: integrations
19
+ tags:
20
+ - integration
21
+ - github
22
+ - observation
23
+ - polling
24
+ status: stable
25
+ ask_examples:
26
+ - How do I connect GitHub?
27
+ - Will the agent message me on every CI failure?
28
+ - Can the agent reply to GitHub issues?
29
+ - Why isn't the GitHub poller firing?
30
+ locale: en-US
31
+ created: 2026-04-25
32
+ updated: 2026-04-28
33
+ keywords:
34
+ - github
35
+ - notifications
36
+ - workflow_run
37
+ - review_requested
38
+ - gh cli
39
+ related:
40
+ - features/integrations/git
41
+ - features/routines/hourly-check
42
+ - concepts/observations
43
+ ui_anchors:
44
+ - /connections/repositories
45
+ config_keys:
46
+ - githubPollIntervalSeconds
47
+ - gitRepos
48
+ - githubRepos
49
+ ---
50
+
51
+ # GitHub
52
+
53
+ ## In One Sentence
54
+
55
+ The daemon polls GitHub Notifications + watched-repo CI failures via
56
+ the local `gh` CLI, surfacing high-priority signals as DMs and feeding
57
+ everything else into the hourly check.
58
+
59
+ ## How It Works
60
+
61
+ GitHub access is **delegated to the local `gh` CLI** rather than carried
62
+ by a daemon-side personal access token. Authentication happens once via
63
+ `gh auth login`; the daemon shells out to `gh api …` per poll. This
64
+ keeps secrets in the OS keychain that `gh` already manages, and lines
65
+ up with the future delegated-mode story (Claude / Codex / Gemini will
66
+ share the same auth path).
67
+
68
+ Two cadences run on a single timer:
69
+
70
+ 1. **Notifications** — `gh api notifications` with ETag caching.
71
+ 304 Not Modified responses cost zero rate quota.
72
+ 2. **Workflow runs** — per watched GitHub repo (any explicit
73
+ `owner/repo` entry in the GitHub card, plus any entry in the
74
+ Git Repositories card whose `origin` resolves to GitHub),
75
+ `gh api repos/<owner>/<name>/actions/runs?status=failure`.
76
+
77
+ When `githubRepos` is non-empty, notification processing is scoped to
78
+ those `owner/repo` entries. When it is empty, the poller preserves the
79
+ older behavior and processes the authenticated user's unread
80
+ notifications globally.
81
+
82
+ The classifier maps each event to either a `recordObservation` call
83
+ (for the hourly check to coalesce) or both an observation **and** an
84
+ EventBus emit (for high-priority signals that warrant a direct DM).
85
+
86
+ ## High-priority events
87
+
88
+ | Trigger | Event type | Task-flow |
89
+ |---|---|---|
90
+ | `notifications.reason === "review_requested"` | `github.pull_request.review_requested` | `github.pull_request.review_requested.md` |
91
+ | `notifications.reason === "assign"` | `github.assigned` | `github.assigned.md` |
92
+ | `notifications.reason === "security_alert"` | `github.security_alert` | `github.security_alert.md` |
93
+ | Workflow run failure on default branch | `github.workflow_run.failed` | `github.workflow_run.failed.md` |
94
+
95
+ Feature-branch CI failures stay observation-only (LOW priority) — they
96
+ are the developer's normal feedback loop, not interruption-worthy.
97
+
98
+ ## Cold-start safety
99
+
100
+ On first start with a fresh database, the workflow-runs path records
101
+ the latest failures without emitting direct events. This prevents the
102
+ user from waking up to 30 stale CI-failure DMs after enabling the
103
+ integration while still warming the idempotency table. Notifications are
104
+ inherently cold-start-safe because GitHub returns only currently-unread
105
+ notifications.
106
+
107
+ ## Idempotency
108
+
109
+ Every emission goes through a pre-check: `SELECT 1 FROM observations
110
+ WHERE source = ? AND ref = ?` covers both consumed and pending rows.
111
+ If a `review_requested` notification stays unread for an hour and you
112
+ poll every 10 minutes, the user is DM'd **once**, not six times.
113
+
114
+ ## Where in the Dashboard
115
+
116
+ - **Connections → GitHub** shows the integration status, the
117
+ `gh auth login` reminder, explicit `owner/repo` watched repos, and
118
+ event model routing cards.
119
+ - **Git Repositories** on the same page lists local clone paths whose
120
+ GitHub remotes are also watched for workflow failures.
121
+
122
+ ## Configuration
123
+
124
+ | Setting | Default | Notes |
125
+ |---|---|---|
126
+ | `githubPollIntervalSeconds` | 600 | Both notifications and workflow_runs poll on this cadence. Restart-required (the timer is captured at construction time). |
127
+ | `gitRepos` | `[]` | Local repo paths. The poller derives `owner/name` via `git remote get-url origin` for each entry whose remote is on GitHub. |
128
+ | `githubRepos` | `[]` | Direct remote repos in `owner/repo` form. Enables workflow polling without a local clone and scopes GitHub notification processing when non-empty. |
129
+
130
+ ## When Something Goes Wrong
131
+
132
+ - **`gh` CLI not found.** The daemon log shows `\`gh\` CLI is not on
133
+ PATH — install via \`brew install gh\` (or platform equivalent),
134
+ then \`gh auth login\``. Polls stay quiet (exponential backoff up
135
+ to 16 ticks ≈ 2.6 hours at default cadence) until `gh` is
136
+ reachable.
137
+ - **Authentication expired.** `gh auth status` non-zero produces
138
+ a `GitHub poll failed (auth)` warning per backoff cycle. Log in
139
+ again with `gh auth login`.
140
+ - **No DMs for a known PR review request.** Confirm the notification
141
+ is actually surfaced via `gh api notifications` from your shell —
142
+ if it's missing there too, GitHub's own notification routing has
143
+ filtered it (watch / mention settings on the source repo).
144
+ - **Wrong default branch detection.** The poller queries
145
+ `gh api repos/<o>/<r> --jq .default_branch` once at startup. If
146
+ this lookup fails (rate limit, transient network), the cached
147
+ default is `main`. Restart the daemon after the issue clears to
148
+ re-resolve.
149
+
150
+ ## Backend routing
151
+
152
+ High-priority GitHub events are first-class process keys:
153
+
154
+ - `github.pull_request.review_requested`
155
+ - `github.assigned`
156
+ - `github.security_alert`
157
+ - `github.workflow_run.failed`
158
+
159
+ Configure them under **Connections → Git & Code** or **Settings →
160
+ Models → Process Routing**. Each row can route to Claude Code, Codex,
161
+ or Gemini CLI, with the same fallback, auth-health, turn-limit, and
162
+ cost-audit behavior as other autonomous processes.
163
+
164
+ ## Related
165
+
166
+ - [Git](git.md) — local repo file watcher (separate observer).
167
+ - [Hourly Check](../routines/hourly-check.md) — consumer of
168
+ observation-only signals.
169
+ - [Observations](../../concepts/observations.md) — the storage
170
+ contract this poller writes against.
@@ -0,0 +1,106 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: features/integrations/mail
4
+ title: Mail
5
+ id: mail
6
+ aliases:
7
+ - email
8
+ - gmail
9
+ - outlook
10
+ - mail integration
11
+ category: features
12
+ summary: |
13
+ Mail integration lets the agent read, label, classify, and search
14
+ your inbox across Gmail, Outlook, Yahoo, and iCloud. Mail is
15
+ proxied through the daemon — no provider library lives in the
16
+ agent. (Yahoo / iCloud connect via IMAP under the hood; IMAP is the
17
+ transport, not a separately exposed provider kind.)
18
+ section: integrations
19
+ tags:
20
+ - integration
21
+ - mail
22
+ - core
23
+ status: stable
24
+ ask_examples:
25
+ - How do I connect my Gmail to the agent?
26
+ - Can the agent send mail on my behalf?
27
+ - How do I add a second mail account?
28
+ locale: en-US
29
+ created: 2026-04-25
30
+ updated: 2026-04-25
31
+ keywords:
32
+ - mail
33
+ - gmail
34
+ - outlook
35
+ - yahoo
36
+ - icloud
37
+ - inbox
38
+ - labels
39
+ related:
40
+ - guides/connect-a-new-mail-account
41
+ - features/routines/morning-routine
42
+ ui_anchors:
43
+ - /connections/mail
44
+ api_endpoints:
45
+ - /api/mail
46
+ ---
47
+
48
+ # Mail
49
+
50
+ ## In One Sentence
51
+
52
+ Connect one or more mailboxes; the daemon polls them, classifies
53
+ incoming threads, and lets the agent read / label / search via the
54
+ `mail` skill.
55
+
56
+ ## What It Does
57
+
58
+ - **Read & search** existing threads (FTS5-backed local index).
59
+ - **Classify** incoming messages — does this need owner attention,
60
+ is it a marketing list, is it a receipt.
61
+ - **Label** threads so the operator and the agent agree on triage state.
62
+ - **Surface** the small set of mail items in the morning routine that
63
+ actually need owner action.
64
+
65
+ The agent does **not** send mail on your behalf. Drafting is supported
66
+ (via the provider's draft API where available) but sending is an
67
+ operator action.
68
+
69
+ ## When It Runs / How It Is Triggered
70
+
71
+ - A poller pulls new messages every `gmailPollIntervalSeconds` (or the
72
+ per-provider equivalent) — see Settings → Advanced.
73
+ - The morning routine reads the labeled queue and decides which need
74
+ surfacing.
75
+ - Reactive turns (you DM "what's in my mail?") use the `mail` skill on
76
+ demand.
77
+
78
+ ## What It Outputs
79
+
80
+ - New threads land in the local `messages` table (FTS-indexed).
81
+ - Classification labels are written via the provider API.
82
+ - A short "mail" section in `today.md` when items qualified.
83
+
84
+ ## Where in the Dashboard
85
+
86
+ - **Connections → Mail** is the per-account configuration: providers,
87
+ credentials, polling, label setup.
88
+
89
+ ## Configuration
90
+
91
+ Per-account settings: provider kind (`gmail` / `outlook` / `yahoo` /
92
+ `icloud`), credential store, label conventions, polling interval.
93
+ Yahoo and iCloud use IMAP transport internally; the operator picks
94
+ the kind, not the transport.
95
+
96
+ ## When Something Goes Wrong
97
+
98
+ - An **auth failure** points at expired credentials. The dashboard's
99
+ auth-health card flips to a warning. See [Auth Failed](../../troubleshooting/auth-failed.md).
100
+ - A **classifier that misses** a sender consistently — add a manual
101
+ label rule on `/connections/mail`.
102
+
103
+ ## Related
104
+
105
+ - [Connect a new mail account](../../guides/connect-a-new-mail-account.md)
106
+ - [Morning Routine](../routines/morning-routine.md)
@@ -0,0 +1,69 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: features/integrations/notion
4
+ title: Notion
5
+ id: notion
6
+ aliases:
7
+ - notion database
8
+ - notion integration
9
+ category: features
10
+ summary: |
11
+ Watch a Notion database (or a curated set of pages) for changes.
12
+ Changes record observations consumed by the hourly check.
13
+ section: integrations
14
+ tags:
15
+ - integration
16
+ - knowledge
17
+ - observation
18
+ status: stable
19
+ ask_examples:
20
+ - How do I connect Notion?
21
+ - Will Notion notify me on every page change?
22
+ locale: en-US
23
+ created: 2026-04-25
24
+ updated: 2026-04-25
25
+ related:
26
+ - features/integrations/obsidian
27
+ - features/routines/hourly-check
28
+ ui_anchors:
29
+ - /connections/knowledge
30
+ config_keys:
31
+ - notionPollIntervalSeconds
32
+ ---
33
+
34
+ # Notion
35
+
36
+ ## In One Sentence
37
+
38
+ A Notion integration polls a configured database / page set and
39
+ records observations on change.
40
+
41
+ ## What It Does
42
+
43
+ - Polls Notion via the official API at `notionPollIntervalSeconds`.
44
+ - Records an observation per detected change.
45
+ - Lets the agent read pages on demand.
46
+
47
+ ## When It Runs / How It Is Triggered
48
+
49
+ Continuous polling.
50
+
51
+ ## Where in the Dashboard
52
+
53
+ - **Connections → Knowledge** holds the integration token and target
54
+ databases.
55
+
56
+ ## Configuration
57
+
58
+ | Setting | Default | Notes |
59
+ |---|---|---|
60
+ | `notionPollIntervalSeconds` | 300 | Polling interval. |
61
+
62
+ ## When Something Goes Wrong
63
+
64
+ - Notion's API rate-limits aggressively at high poll frequency. Stay
65
+ ≥ 300 seconds.
66
+
67
+ ## Related
68
+
69
+ - [Obsidian](obsidian.md)
@@ -0,0 +1,71 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: features/integrations/obsidian
4
+ title: Obsidian
5
+ id: obsidian
6
+ aliases:
7
+ - obsidian vault
8
+ - knowledge vault
9
+ category: features
10
+ summary: |
11
+ Watch an Obsidian vault for new and changed notes. Changes record
12
+ observations the hourly check consumes; the agent can also read
13
+ notes on demand.
14
+ section: integrations
15
+ tags:
16
+ - integration
17
+ - knowledge
18
+ - observation
19
+ status: stable
20
+ ask_examples:
21
+ - How do I connect my Obsidian vault?
22
+ - Will the agent edit my notes?
23
+ - Why didn't the agent see my new note?
24
+ locale: en-US
25
+ created: 2026-04-25
26
+ updated: 2026-04-25
27
+ related:
28
+ - features/integrations/notion
29
+ - features/routines/hourly-check
30
+ - concepts/observations
31
+ ui_anchors:
32
+ - /connections/knowledge
33
+ config_keys:
34
+ - obsidianDebounceSeconds
35
+ ---
36
+
37
+ # Obsidian
38
+
39
+ ## In One Sentence
40
+
41
+ Point Aitne at your Obsidian vault directory; new and changed
42
+ notes record observations the hourly check consumes.
43
+
44
+ ## What It Does
45
+
46
+ - Watches the vault for filesystem changes.
47
+ - Filters out agent-originated writes via `AgentWriteTracker`.
48
+ - Records observations for genuine operator edits.
49
+
50
+ ## When It Runs / How It Is Triggered
51
+
52
+ Continuously. The watcher is debounced by `obsidianDebounceSeconds`.
53
+
54
+ ## Where in the Dashboard
55
+
56
+ - **Connections → Knowledge** to point at the vault directory.
57
+
58
+ ## Configuration
59
+
60
+ | Setting | Default | Notes |
61
+ |---|---|---|
62
+ | `obsidianDebounceSeconds` | 5 | How long to wait after a save before recording. |
63
+
64
+ ## When Something Goes Wrong
65
+
66
+ - A change that did not record: the debounce may have folded multiple
67
+ saves; the next one will fire.
68
+
69
+ ## Related
70
+
71
+ - [Notion](notion.md)
@@ -0,0 +1,178 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: features/lifestyle/git
4
+ title: My Life — Git
5
+ id: my-life-git
6
+ aliases:
7
+ - my life git
8
+ - per-repo git
9
+ - git management page
10
+ - daily git management
11
+ - git triggers
12
+ - repo polling cadence
13
+ category: features
14
+ summary: |
15
+ The /git page (sidebar: My Life › Git) is the per-repository control
16
+ surface: override polling cadence, define event-driven triggers, and
17
+ enable daily git management (overview MD + per-day journal entry) for
18
+ each registered repository.
19
+ section: lifestyle
20
+ tags:
21
+ - lifestyle
22
+ - git
23
+ - github
24
+ - automation
25
+ - observation
26
+ status: stable
27
+ ask_examples:
28
+ - What is the My Life › Git page for?
29
+ - How do I tighten polling cadence for one repo?
30
+ - Does daily git management need a local clone?
31
+ - Can the agent poll a GitHub repo with no local checkout?
32
+ - What's the difference between Polling, Triggers, and Daily git management?
33
+ - Where does the daily journal get written?
34
+ - What happens if a scan fails repeatedly?
35
+ locale: en-US
36
+ created: 2026-05-05
37
+ updated: 2026-05-05
38
+ keywords:
39
+ - my life
40
+ - git
41
+ - repository
42
+ - polling
43
+ - trigger
44
+ - daily git management
45
+ - overview
46
+ - journal
47
+ related:
48
+ - features/integrations/git
49
+ - features/integrations/github
50
+ - features/routines/hourly-check
51
+ - concepts/observations
52
+ ui_anchors:
53
+ - /git
54
+ - /connections/repositories
55
+ config_keys:
56
+ - gitPollIntervalSeconds
57
+ ---
58
+
59
+ # My Life — Git
60
+
61
+ ## In One Sentence
62
+
63
+ A per-repository control panel for everything Git/GitHub: tighten the
64
+ polling cadence on a single repo, attach event-driven triggers, and
65
+ opt in to **daily git management** (a curated overview MD plus a
66
+ once-a-day journal entry).
67
+
68
+ ## What It Does
69
+
70
+ The page lists every repository registered on
71
+ **Connections → Repositories** and exposes three collapsible sections
72
+ per repo:
73
+
74
+ 1. **Polling** — overrides the global `gitPollIntervalSeconds` for
75
+ this repository alone. Useful when one repo is high-traffic and
76
+ you want it scanned more aggressively (or vice-versa). Also shows
77
+ the most recent observations gathered from that repo's polling
78
+ sources.
79
+ 2. **Triggers** — fire when matching Git or GitHub events arrive on
80
+ this repository. Triggers run **alongside** the project-wide
81
+ task-flow defaults, not in place of them. Each trigger has a
82
+ workdir mode (`local-clone` or `ephemeral`); local-clone triggers
83
+ require the repository to have a `localPath`.
84
+ 3. **Daily git management** — opt-in per repo. When enabled, the
85
+ `repository-management-cron` observer fires `git.project.update`
86
+ roughly once every 24 hours. The session writes/refreshes a
87
+ curated `git/<slug>/overview.md` and appends a per-day entry under
88
+ `git/<slug>/journal/YYYY-MM-DD.md` if there was activity.
89
+
90
+ The agent never pushes, amends, or force-resets. Read-only by design.
91
+
92
+ ## When It Runs / How It Is Triggered
93
+
94
+ - **Polling** runs continuously on the per-repo cadence (or the global
95
+ default). Observations land in the `observations` table; the hourly
96
+ check coalesces them.
97
+ - **Triggers** fire when the matching event arrives on the EventBus.
98
+ - **Daily git management** is dispatched by `RepositoryManagementCron`,
99
+ which iterates the `repository_management` table once an hour and
100
+ emits a `scheduled.task` (`git.project.update`) for any enabled row
101
+ whose `last_scan_at` is more than 24 hours old.
102
+
103
+ ## What It Outputs
104
+
105
+ - **Polling** → `observation` rows (one per detected change set) +
106
+ trigger fires when a trigger's match conditions are satisfied.
107
+ - **Triggers** → an autonomous session whose task-flow is selected
108
+ by the trigger's process key.
109
+ - **Daily git management** → `git/<slug>/overview.md` (refreshed each
110
+ scan) and `git/<slug>/journal/YYYY-MM-DD.md` (appended for the day,
111
+ only when activity warrants it).
112
+
113
+ ## Where in the Dashboard
114
+
115
+ - **My Life → Git** (`/git`) — this page.
116
+ - **Connections → Repositories** (`/connections/repositories`) —
117
+ register a repo (link a `localPath` and/or `owner/repo`),
118
+ rename, set `local-only`, delete.
119
+ - **Knowledge** (`/knowledge?path=git/<slug>/overview`) — quick links
120
+ on each repo card open the generated overview / today's journal.
121
+
122
+ ## Configuration
123
+
124
+ | Setting | Where | Notes |
125
+ |---|---|---|
126
+ | `gitPollIntervalSeconds` | global config | Default poll cadence applied when no per-repo override is set. |
127
+ | Per-repo polling override | `/git` → Polling | Stored on the repository row; null means "use global". |
128
+ | Triggers | `/git` → Triggers | Per-repo, multiple. Each has match conditions, workdir mode, process key. |
129
+ | Daily git management toggle | `/git` → Daily git management | Stored in `repository_management` table. Requires `localPath`. |
130
+
131
+ ## Local Clone Requirement
132
+
133
+ Two of the three sections behave differently depending on whether the
134
+ repository has a `localPath`:
135
+
136
+ - **Polling** does **not** require a local clone. A repository that
137
+ carries only `githubOwner` / `githubRepo` is polled remote-side via
138
+ `gh` (workflow runs, notifications). A repository that carries only
139
+ a `localPath` is polled locally for new commits. A repository that
140
+ has both is polled both ways.
141
+ - **Triggers** with `workdirMode: "local-clone"` require a `localPath`
142
+ on the parent repository (enforced when the trigger is created and
143
+ again if you try to clear `localPath` while such a trigger exists).
144
+ Triggers with `workdirMode: "ephemeral"` work without a local clone.
145
+ - **Daily git management** is **local-clone-bound for v1**. The
146
+ toggle is disabled and the dashboard surfaces "No local clone — link
147
+ one to enable this feature." Internally the
148
+ `listManagementDueForScan` query filters on `r.local_path IS NOT
149
+ NULL`, so even a stale `enabled = 1` row will not fire without a
150
+ local path.
151
+
152
+ ## When Something Goes Wrong
153
+
154
+ - **The toggle is greyed out with "No local clone".** Add a
155
+ `localPath` on **Connections → Repositories**, then return.
156
+ - **`Last status` shows `failed` and `Failure streak` keeps climbing.**
157
+ The cron still iterates but the dispatched session is failing —
158
+ open the latest conversation under that repo's tile, or check
159
+ **Activity** for the `git.project.update` run. A high streak does
160
+ not prevent further scans (the cron retries on the next interval).
161
+ - **`Last scan` is "never" but the row is enabled.** Either the cron
162
+ has not ticked yet (default tick is 1 hour) or the row has no local
163
+ path — confirm the local clone link.
164
+ - **A new commit does not show up under Polling → recent
165
+ observations.** Confirm the poll has fired since the commit
166
+ (check `Last scan`-style timestamps), and remember the agent's own
167
+ writes are filtered out (see `AgentWriteTracker`) — make sure the
168
+ commit was authored by you.
169
+
170
+ ## Related
171
+
172
+ - [Git integration](../integrations/git.md) — the underlying observer
173
+ contract and `gitPollIntervalSeconds` semantics.
174
+ - [GitHub integration](../integrations/github.md) — remote-side data
175
+ (notifications, workflow runs) reachable via `gh` even without a
176
+ local clone.
177
+ - [Hourly check](../routines/hourly-check.md) — the routine that
178
+ consumes the observations this page's polling generates.
@@ -0,0 +1,93 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: features/lifestyle/reading
4
+ title: Reading
5
+ id: reading
6
+ aliases:
7
+ - reading list
8
+ - books
9
+ - read later
10
+ category: features
11
+ summary: |
12
+ Track books and Kindle highlights in a SQLite-backed reading list
13
+ surfaced at /reading. The schema covers title/author/status plus a
14
+ separate reading_highlights table populated from Kindle clipping
15
+ imports.
16
+ section: lifestyle
17
+ tags:
18
+ - lifestyle
19
+ - reading
20
+ - memory
21
+ status: stable
22
+ ask_examples:
23
+ - How do I add a book to my reading list?
24
+ - Can the agent recommend something from my reading list?
25
+ - Where do reading-list items get stored?
26
+ locale: en-US
27
+ created: 2026-04-25
28
+ updated: 2026-04-25
29
+ keywords:
30
+ - reading
31
+ - books
32
+ - articles
33
+ - read later
34
+ related:
35
+ - features/memory-files/user-profile
36
+ - features/lifestyle/receipts
37
+ - features/lifestyle/travel-bookings
38
+ ui_anchors:
39
+ - /reading
40
+ ---
41
+
42
+ # Reading
43
+
44
+ ## In One Sentence
45
+
46
+ A reading list backed by the `books` and `reading_highlights` SQLite
47
+ tables: imports Kindle clippings, tracks status (`reading`/`finished`/etc.),
48
+ and surfaces the working set at `/reading`.
49
+
50
+ ## What It Does
51
+
52
+ - **Add** items by DM ("agent, add 'The Soul of a New Machine' to my
53
+ reading list") — the agent inserts into `books` via the daemon
54
+ `/api/books` route.
55
+ - **Import Kindle highlights** via `POST /api/books/import-clippings`,
56
+ which parses a `My Clippings.txt` paste and populates the
57
+ `reading_highlights` table linked back to `books.id`.
58
+ - **List** what's outstanding on `/reading`.
59
+ - **Mark complete** — the agent updates the row's `status` and
60
+ `completed_at` columns.
61
+ - **Recommend** from the list during reactive turns when context
62
+ invites it.
63
+
64
+ There is no Markdown context file for the reading list; the durable
65
+ record is the SQLite row. If you want a parallel copy in your external
66
+ Obsidian or Notion vault, ask the agent to write one — the list itself
67
+ stays canonical in the database.
68
+
69
+ ## When It Runs / How It Is Triggered
70
+
71
+ Reactive only. There is no autonomous reading-list routine in the
72
+ default install — the operator drives the list shape.
73
+
74
+ ## What It Outputs
75
+
76
+ - Rows in the `books` table (with status, dates, optional rating /
77
+ notes) and linked rows in `reading_highlights`.
78
+ - A clean operator-facing view on `/reading`.
79
+
80
+ ## Where in the Dashboard
81
+
82
+ - **Reading (`/reading`)** is the operator surface.
83
+
84
+ ## When Something Goes Wrong
85
+
86
+ - A **missing add**: check the Activity row's tool calls — the agent
87
+ hits `/api/books`, so a network or quota error there will surface in
88
+ the audit log even when the chat reply looked fine.
89
+
90
+ ## Related
91
+
92
+ - [Receipts](receipts.md)
93
+ - [Travel Bookings](travel-bookings.md)