@aitne-sh/aitne 0.1.10 → 0.1.11

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 (130) hide show
  1. package/README.md +8 -8
  2. package/agent-assets/agent-profiles/background-task.md +53 -0
  3. package/agent-assets/agent-profiles/conversational.md +1 -0
  4. package/agent-assets/agent-profiles/routine-fetch-window.md +14 -75
  5. package/agent-assets/agent-profiles/routine.md +1 -1
  6. package/agent-assets/agents/{hourly-check → activity-scan}/agent.md +22 -17
  7. package/agent-assets/agents/monthly-review/agent.md +6 -5
  8. package/agent-assets/docs/concepts/agent-day.md +4 -5
  9. package/agent-assets/docs/concepts/auth-health.md +23 -20
  10. package/agent-assets/docs/concepts/backends-and-tiers.md +13 -9
  11. package/agent-assets/docs/concepts/costs-and-quotas.md +11 -10
  12. package/agent-assets/docs/concepts/delegated-mode.md +13 -12
  13. package/agent-assets/docs/concepts/memory-model.md +13 -9
  14. package/agent-assets/docs/concepts/observations.md +24 -20
  15. package/agent-assets/docs/concepts/process-keys.md +10 -9
  16. package/agent-assets/docs/concepts/routines.md +34 -31
  17. package/agent-assets/docs/concepts/safety-and-execution.md +11 -7
  18. package/agent-assets/docs/concepts/safety-model.md +19 -8
  19. package/agent-assets/docs/concepts/skills.md +10 -8
  20. package/agent-assets/docs/features/integrations/browser-history.md +14 -10
  21. package/agent-assets/docs/features/integrations/calendar.md +24 -13
  22. package/agent-assets/docs/features/integrations/git.md +13 -11
  23. package/agent-assets/docs/features/integrations/github.md +22 -14
  24. package/agent-assets/docs/features/integrations/mail.md +22 -20
  25. package/agent-assets/docs/features/integrations/notion.md +35 -11
  26. package/agent-assets/docs/features/integrations/obsidian.md +8 -8
  27. package/agent-assets/docs/features/lifestyle/git.md +24 -20
  28. package/agent-assets/docs/features/lifestyle/reading.md +5 -3
  29. package/agent-assets/docs/features/lifestyle/receipts.md +11 -10
  30. package/agent-assets/docs/features/memory-files/agent-journal.md +25 -16
  31. package/agent-assets/docs/features/memory-files/agent-lessons.md +7 -6
  32. package/agent-assets/docs/features/memory-files/projects.md +5 -4
  33. package/agent-assets/docs/features/memory-files/schedule.md +6 -3
  34. package/agent-assets/docs/features/memory-files/today.md +10 -7
  35. package/agent-assets/docs/features/memory-files/user-profile.md +14 -9
  36. package/agent-assets/docs/features/messaging/bang-commands.md +21 -6
  37. package/agent-assets/docs/features/messaging/overview.md +12 -9
  38. package/agent-assets/docs/features/operations/activity-and-conversations.md +1 -1
  39. package/agent-assets/docs/features/operations/browser-tasks.md +184 -0
  40. package/agent-assets/docs/features/operations/cost-tracking.md +11 -1
  41. package/agent-assets/docs/features/operations/managed-chromium.md +1 -0
  42. package/agent-assets/docs/features/operations/notifications.md +11 -1
  43. package/agent-assets/docs/features/operations/quiet-hours.md +41 -12
  44. package/agent-assets/docs/features/operations/schedule-approaching.md +2 -2
  45. package/agent-assets/docs/features/routines/activity-scan.md +220 -0
  46. package/agent-assets/docs/features/routines/custom-routines.md +82 -138
  47. package/agent-assets/docs/features/routines/evening-review.md +14 -12
  48. package/agent-assets/docs/features/routines/morning-routine.md +4 -3
  49. package/agent-assets/docs/features/routines/weekly-review.md +18 -3
  50. package/agent-assets/docs/getting-started/01-what-is-this.md +3 -3
  51. package/agent-assets/docs/getting-started/04-first-day.md +27 -30
  52. package/agent-assets/docs/glossary.md +4 -4
  53. package/agent-assets/docs/guides/add-a-custom-routine.md +122 -68
  54. package/agent-assets/docs/guides/pause-the-agent.md +22 -20
  55. package/agent-assets/docs/guides/reinstall-cleanly.md +2 -0
  56. package/agent-assets/docs/guides/setup-wizard.md +12 -9
  57. package/agent-assets/docs/reference/api.md +11 -0
  58. package/agent-assets/docs/reference/config.md +30 -20
  59. package/agent-assets/docs/reference/keyboard-shortcuts.md +2 -2
  60. package/agent-assets/docs/reference/knowledge-layout.md +14 -10
  61. package/agent-assets/docs/reference/process-keys.md +7 -7
  62. package/agent-assets/docs/reference/skills.md +5 -2
  63. package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +32 -16
  64. package/agent-assets/docs/troubleshooting/observation-not-detected.md +26 -24
  65. package/agent-assets/docs/troubleshooting/wiki-write-failed.md +3 -3
  66. package/agent-assets/skills/agent-create/SKILL.md +11 -0
  67. package/agent-assets/skills/background-task/SKILL.md +184 -0
  68. package/agent-assets/skills/background-task-reply/SKILL.md +100 -0
  69. package/agent-assets/skills/browser-history/SKILL.md +31 -13
  70. package/agent-assets/skills/browser-task/SKILL.md +12 -5
  71. package/agent-assets/skills/context/SKILL.md +4 -3
  72. package/agent-assets/skills/context/references/api.md +5 -3
  73. package/agent-assets/skills/context/references/snapshot-files.md +4 -4
  74. package/agent-assets/skills/external-services/SKILL.native.claude.md +13 -7
  75. package/agent-assets/skills/external-services/SKILL.native.codex.md +11 -5
  76. package/agent-assets/skills/external-services/SKILL.native.gemini.md +11 -5
  77. package/agent-assets/skills/mail/SKILL.md +2 -2
  78. package/agent-assets/skills/mail/SKILL.native.claude.md +16 -9
  79. package/agent-assets/skills/mail/SKILL.native.codex.md +15 -8
  80. package/agent-assets/skills/mail/SKILL.native.gemini.md +11 -5
  81. package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +20 -12
  82. package/agent-assets/skills/management-policy/SKILL.md +26 -17
  83. package/agent-assets/skills/management-policy/curation.json +1 -1
  84. package/agent-assets/skills/management-policy/references/policy-workflow.md +26 -13
  85. package/agent-assets/skills/notify/SKILL.md +10 -5
  86. package/agent-assets/skills/notify/references/priority.md +30 -17
  87. package/agent-assets/skills/notion/SKILL.md +1 -1
  88. package/agent-assets/skills/notion/SKILL.native.claude.md +3 -3
  89. package/agent-assets/skills/notion/SKILL.native.codex.md +2 -2
  90. package/agent-assets/skills/notion/SKILL.native.gemini.md +2 -2
  91. package/agent-assets/skills/observations/SKILL.md +5 -5
  92. package/agent-assets/skills/roadmap/references/api.md +7 -2
  93. package/agent-assets/skills/schedule/SKILL.md +11 -2
  94. package/agent-assets/skills/schedule/references/recurrence-rule.md +20 -12
  95. package/agent-assets/skills/scheduled-managed-task/SKILL.md +12 -9
  96. package/agent-assets/skills/today/SKILL.md +19 -3
  97. package/agent-assets/skills/today/references/agent-plan-lifecycle.md +9 -4
  98. package/agent-assets/skills/today/references/agent-plan-revision.md +28 -0
  99. package/agent-assets/skills/today/references/today-skeleton.md +5 -5
  100. package/agent-assets/skills/user-interview/references/op-morning.md +1 -1
  101. package/agent-assets/system-prompts/routine-research-cluster-update.md +71 -0
  102. package/agent-assets/task-flows/_partials/notion-acquire.notion.md +47 -21
  103. package/agent-assets/task-flows/background_task.md +81 -0
  104. package/agent-assets/task-flows/git.local_ahead.stale.md +1 -1
  105. package/agent-assets/task-flows/git.push.detected.md +1 -1
  106. package/agent-assets/task-flows/git.tag.created.md +1 -1
  107. package/agent-assets/task-flows/github.assigned.md +1 -1
  108. package/agent-assets/task-flows/github.pull_request.review_requested.md +2 -2
  109. package/agent-assets/task-flows/github.security_alert.md +1 -1
  110. package/agent-assets/task-flows/message.received.dm.md +7 -3
  111. package/agent-assets/task-flows/message.received.dm_first.md +4 -2
  112. package/agent-assets/task-flows/{routine.hourly_check.md → routine.activity_scan.md} +31 -23
  113. package/agent-assets/task-flows/{routine.hourly_check.triage.md → routine.activity_scan.triage.md} +3 -3
  114. package/agent-assets/task-flows/routine.monthly_review.md +9 -8
  115. package/agent-assets/task-flows/routine.research_cluster_update.md +33 -19
  116. package/agent-assets/task-flows/routine.roadmap_refresh.md +2 -2
  117. package/agent-assets/task-flows/routine.today_refresh.md +1 -1
  118. package/agent-assets/task-flows/routine.weekly_review.md +103 -4
  119. package/agent-assets/task-flows/schedule.approaching.md +2 -2
  120. package/agent-assets/task-flows/scheduled.dm.md +77 -1
  121. package/agent-assets/task-flows/scheduled.task.md +7 -1
  122. package/agent-assets/templates/_manifest.json +2 -2
  123. package/agent-assets/templates/knowledge/dossiers/_index.md +1 -1
  124. package/agent-assets/templates/knowledge/dossiers/{hourly.md → activity-scan.md} +1 -1
  125. package/agent-assets/templates/policies/journal-format.md +1 -1
  126. package/agent-assets/templates/policies/mcp.md +1 -1
  127. package/agent-assets/templates/policies/routines/_index.md +1 -1
  128. package/agent-assets/templates/policies/routines/{hourly.md → activity-scan.md} +5 -5
  129. package/package.json +6 -5
  130. package/agent-assets/docs/features/routines/hourly-check.md +0 -205
@@ -115,9 +115,9 @@ MCP); the difference is who polls (no one, for `native`).
115
115
 
116
116
  The setup tax for direct mode (OAuth client setup in a vendor console, then
117
117
  JSON download, then keychain seeding) is the single biggest blocker for
118
- non-technical operators. Every supported backend — Claude Code, Codex,
119
- Gemini CLI — already ships first-party connectors to Gmail, Calendar,
120
- Drive, and more. When the operator is signed into claude.ai or ChatGPT,
118
+ non-technical operators. Claude Code, Codex, and Gemini CLI all ship
119
+ first-party connectors to Gmail, Calendar, Drive, and more (OpenCode
120
+ ships none). When the operator is signed into claude.ai or ChatGPT,
121
121
  the agent can reach those services through the backend's own MCP tools,
122
122
  zero daemon credentials required.
123
123
 
@@ -139,9 +139,9 @@ that case the daemon spawns the other backend per call.
139
139
  `/exec` proxy (cross-backend).
140
140
  - **`native`** — daemon holds nothing AND runs no poller. The main
141
141
  backend's MCP connector reaches the integration on-demand within the
142
- agent's own turn (DM, hourly_check, routine pre-pass). The agent
142
+ agent's own turn (DM, activity_scan, routine pre-pass). The agent
143
143
  POSTs results to `/api/observations/batch` so the rest of the
144
- observation pipeline (summarizer, hourly check) still operates. See
144
+ observation pipeline (summarizer, activity scan) still operates. See
145
145
  `docs/design/appendices/native-integration-mode.md` for the full
146
146
  spec, including the per-key `runtime_state.integration_flip_lock:<key>`
147
147
  drain protocol.
@@ -193,10 +193,10 @@ When you pick `delegated`, also pick `delegatedBackend`:
193
193
  is your preferred DM driver (e.g. Claude).
194
194
 
195
195
  When you pick `native`, `nativeBackend` is fixed to your main DM
196
- backend. Flipping the main backend re-targets every `native` row; rows
197
- whose new `nativeBackend` has no descriptor connector for the
198
- integration (e.g. `gmail` native on a backend that doesn't ship a Gmail
199
- connector) cascade to `disabled` and the operator gets a DM.
196
+ backend. Flipping the main backend never re-targets `native` rows:
197
+ every row whose `nativeBackend` no longer matches the new main backend
198
+ cascades to `disabled` and the operator gets a DM re-enabling
199
+ requires an explicit re-flip (with its live probe) on the new backend.
200
200
 
201
201
  ## Concrete Examples
202
202
 
@@ -226,7 +226,7 @@ curl -X POST http://localhost:8321/api/integrations/gmail/exec \
226
226
  ```
227
227
 
228
228
  The daemon spawns a Codex subprocess with the `proxy.md` profile, the
229
- task-mode planner picks `_search_emails` from the registered
229
+ task-mode planner picks `search_emails` from the registered
230
230
  `capabilityTools`, runs it, and returns a structured `{messages:[…]}`
231
231
  conforming to `outputSchema`.
232
232
 
@@ -283,8 +283,9 @@ the agent consults at session-init. It is rendered as a Markdown table:
283
283
  The "Backend" column surfaces whichever binding is active for the row —
284
284
  `delegatedBackend` for `delegated`, `nativeBackend` for `native`. For
285
285
  `direct` and `disabled` rows it is `—`. The "Sub-tier" column annotates
286
- delegated Gmail rows (`draft-only` for Claude, `full-auto` for Codex)
287
- and is `—` for everything else. The file also includes the per-backend
286
+ delegated Gmail rows (`draft-only` for Claude, `full-auto` for Codex);
287
+ other delegated rows show `full`, and non-delegated rows show `—`. The
288
+ file also includes the per-backend
288
289
  connector support matrix and the `deniedTools` block; both are rendered
289
290
  by `renderManagementMd` (`packages/daemon/src/core/management-md.ts`).
290
291
 
@@ -29,7 +29,7 @@ ask_examples:
29
29
  - How does the daemon prevent the agent from writing to disk directly?
30
30
  locale: en-US
31
31
  created: 2026-04-25
32
- updated: 2026-06-07
32
+ updated: 2026-06-11
33
33
  keywords:
34
34
  - context
35
35
  - markdown
@@ -53,7 +53,7 @@ related:
53
53
  - features/memory-files/projects
54
54
  ui_anchors:
55
55
  - /knowledge
56
- - /connections/knowledge
56
+ - /settings
57
57
  context_files:
58
58
  - state/today.md
59
59
  - identity/profile.md
@@ -129,7 +129,8 @@ curl -X PATCH http://localhost:8321/api/context/state/today.md \
129
129
 
130
130
  - `PUT /api/context/*` replaces a whole file; `PATCH` does a section op
131
131
  (`append`, `replace`, `clear`, `clear_before`, `append_to_file`);
132
- `DELETE` removes a file (permitted only for custom routines).
132
+ `DELETE` removes a file (permitted only on a few paths — user Agent
133
+ definitions, inbox/scratch notes, and legacy custom-routine files).
133
134
  - Legacy bare paths (`/api/context/today.md`) still resolve — the daemon
134
135
  rewrites them to the canonical class-prefixed form in process, so a
135
136
  plain `curl -X PATCH` without `-L` keeps working — but new writes
@@ -155,8 +156,8 @@ curl -X PATCH http://localhost:8321/api/context/state/today.md \
155
156
  - `policies/management.md` — the umbrella registry: Source-of-Truth
156
157
  bindings, Managed Tasks, an Active Policies summary. Injected as
157
158
  `<management_rules>` on the wide-path flows (DMs, mentions, the
158
- morning routine); a few narrow routines (the journal stage, hourly
159
- check, today refresh, observer events, scheduled tasks) opt out to
159
+ morning routine); a few narrow routines (the journal stage, activity
160
+ scan, today refresh, observer events, scheduled tasks) opt out to
160
161
  save budget.
161
162
  - `policies/management-captures/<slug>.md` — one file per durable management rule
162
163
  ("from now on, do X"). The daemon auto-maintains a slug index at
@@ -164,10 +165,13 @@ curl -X PATCH http://localhost:8321/api/context/state/today.md \
164
165
 
165
166
  ## Where You See It in the Dashboard
166
167
 
167
- - **Knowledge → Context Files** lists every file with its size, last
168
- modified time, and a preview.
169
- - **ConnectionsKnowledge** is where vault integrations (Obsidian,
170
- Notion) attach.
168
+ - **Knowledge → Context Files** lists every file with its last
169
+ modified time and a preview.
170
+ - **SettingsManagement Mode** shows where the vault lives (this app
171
+ or an Obsidian-style directory), relocates it, and surfaces vault
172
+ health.
173
+ - **Connections → Notes** is where personal note sources (your external
174
+ Obsidian vault, Notion) attach.
171
175
 
172
176
  ## Related
173
177
 
@@ -6,13 +6,13 @@ id: observations
6
6
  aliases:
7
7
  - observation
8
8
  - polling
9
- - hourly check
9
+ - activity scan
10
10
  - observation queue
11
11
  - phase 9
12
12
  category: concepts
13
13
  summary: |
14
14
  Observations are change records the polling integrations write into
15
- SQLite. The hourly check consumes them — there is no per-change
15
+ SQLite. The activity scan consumes them — there is no per-change
16
16
  notification. This pivot was the Phase 9 polling change.
17
17
  section: observations
18
18
  tags:
@@ -25,16 +25,16 @@ status: stable
25
25
  ask_examples:
26
26
  - What is an observation?
27
27
  - Why doesn't the agent message me on every git commit?
28
- - How does the hourly check use observations?
28
+ - How does the activity scan use observations?
29
29
  - Where does the routine pre-pass write observations?
30
30
  locale: en-US
31
31
  created: 2026-04-25
32
- updated: 2026-05-28
32
+ updated: 2026-06-07
33
33
  keywords:
34
34
  - observation
35
35
  - observations
36
36
  - polling
37
- - hourly check
37
+ - activity scan
38
38
  - phase 9
39
39
  - routine.fetch_window
40
40
  - pre-pass
@@ -44,7 +44,7 @@ keywords:
44
44
  - observation queue
45
45
  - dedupe
46
46
  related:
47
- - features/routines/hourly-check
47
+ - features/routines/activity-scan
48
48
  - features/routines/morning-routine
49
49
  - concepts/process-keys
50
50
  - concepts/routines
@@ -53,13 +53,14 @@ related:
53
53
  ui_anchors:
54
54
  - /activity
55
55
  process_keys:
56
- - routine.hourly_check
56
+ - routine.activity_scan
57
57
  - routine.fetch_window
58
58
  config_keys:
59
- - hourlyCheckIntervalMinutes
60
- - hourlyCheckPrePassFreshnessMinutes
59
+ - activityScanIntervalMinutes
60
+ - activityScanPrePassFreshnessMinutes
61
61
  api_endpoints:
62
62
  - POST /api/observations
63
+ - POST /api/observations/batch
63
64
  - GET /api/observations
64
65
  - POST /api/observations/consume
65
66
  context_files:
@@ -73,15 +74,15 @@ context_files:
73
74
 
74
75
  Polling integrations (Obsidian, Git, Notion, Calendar) **do not emit
75
76
  events** when they detect changes. They write observation rows to
76
- SQLite. A single `routine.hourly_check` consumes the queue and decides
77
+ SQLite. A single `routine.activity_scan` consumes the queue and decides
77
78
  what is worth surfacing.
78
79
 
79
80
  Since 2026-05, observations have a **second writer**: every main
80
81
  routine (`routine.morning_routine`, `routine.today_refresh`,
81
- `routine.hourly_check`, `routine.evening_review`,
82
+ `routine.activity_scan`, `routine.evening_review`,
82
83
  `routine.weekly_review`) is preceded by a lite-tier
83
84
  `routine.fetch_window` pre-pass that fetches mail / calendar / Notion
84
- windows and POSTs them to `/api/observations`.
85
+ windows and POSTs them to `/api/observations/batch`.
85
86
  (`routine.monthly_review` has no pre-pass window.) The main routine
86
87
  then reads them via the same `pending=true` queue that the polling
87
88
  path feeds. Observation rows look identical regardless of which writer
@@ -105,14 +106,17 @@ tell them apart:
105
106
  Mail) call `recordObservation` when they detect a change.
106
107
  2. **The pre-pass** — the lite-tier `routine.fetch_window` session
107
108
  spawned ahead of each main routine — POSTs mail / calendar / Notion
108
- windows to `/api/observations`.
109
+ windows to `/api/observations/batch`.
109
110
 
110
111
  Both write rows of the same shape; the consumer reads the merged queue.
111
112
 
112
113
  - **Observation**: one row in the `observations` table.
113
- - **Actor**: who caused the change. `actor='agent'` rows are filtered
114
- out by the consumer (anti-loop).
115
- - **Hourly check**: the consumer routine. Medium tier by default
114
+ - **Actor**: who caused the change (`user`, `agent`, or `system`). The
115
+ activity-scan gate filters pending rows by source, not actor —
116
+ pre-pass and delegated-sync rows arrive as `actor='agent'` and count
117
+ as real activity. The anti-loop guard lives at write time instead,
118
+ via `AgentWriteTracker` (below).
119
+ - **Activity scan**: the consumer routine. Medium tier by default
116
120
  (Sonnet); fed by both the background polling path and the pre-pass
117
121
  fetcher.
118
122
  - **`AgentWriteTracker`**: the daemon component that tags
@@ -123,9 +127,9 @@ Both write rows of the same shape; the consumer reads the merged queue.
123
127
  per-routine window (`ROUTINE_WINDOWS` in
124
128
  `packages/daemon/src/core/routine-windows.ts`) for each enabled
125
129
  mail / calendar / Notion integration and POSTs the results to
126
- `/api/observations`. The server computes `contentHash` from
130
+ `/api/observations/batch`. The server computes `contentHash` from
127
131
  `(source, payload)`, so an unchanged item written twice in the same
128
- cadence dedupes to a 409.
132
+ cadence dedupes as a `duplicate` instead of writing a second row.
129
133
 
130
134
  ## Concrete Examples
131
135
 
@@ -135,12 +139,12 @@ Both write rows of the same shape; the consumer reads the merged queue.
135
139
 
136
140
  ## Where You See It in the Dashboard
137
141
 
138
- - **Activity** logs hourly-check fires; the detail shows how many
142
+ - **Activity** logs activity-scan fires; the detail shows how many
139
143
  observations were consumed.
140
144
 
141
145
  ## Related
142
146
 
143
- - [Hourly Check](../features/routines/hourly-check.md)
147
+ - [Activity Scan](../features/routines/activity-scan.md)
144
148
  - [Morning Routine](../features/routines/morning-routine.md)
145
149
  - [Process Keys](./process-keys.md)
146
150
  - [Routines](./routines.md)
@@ -10,7 +10,7 @@ aliases:
10
10
  category: concepts
11
11
  summary: |
12
12
  A ProcessKey is the agent's dispatch identity for one kind of work
13
- ("morning routine", "DM", "hourly check"). The router resolves it
13
+ ("morning routine", "DM", "activity scan"). The router resolves it
14
14
  to a backend + tier binding; the manifest map resolves it to skills.
15
15
  section: process-keys
16
16
  tags:
@@ -51,9 +51,9 @@ process_keys:
51
51
  - routine.morning_routine_today
52
52
  - routine.morning_routine_journal
53
53
  - routine.evening_review
54
- - routine.hourly_check
54
+ - routine.activity_scan
55
55
  - routine.fetch_window
56
- - routine.hourly_check.triage
56
+ - routine.activity_scan.triage
57
57
  - message.dm
58
58
  - message.mention
59
59
  - dashboard.chat
@@ -95,7 +95,7 @@ those subsystems.
95
95
  autonomous.
96
96
  - **DEFAULT_PROCESS_TIERS**: the per-key default model size — `lite`
97
97
  (Haiku-class), `medium` (Sonnet-class), or `high` (Opus-class).
98
- Unknown keys (including `routine.custom.<slug>`) default to `medium`.
98
+ Unknown keys default to `medium`.
99
99
  - **TIER_LOCKED_PROCESS_KEYS**: keys whose tier is hard-locked and
100
100
  cannot be overridden by an operator pin. Today this is just
101
101
  `dashboard.docs_qa`, locked to `medium`.
@@ -109,17 +109,18 @@ those subsystems.
109
109
  — `routine.morning_routine_today` (Stage A, today.md, medium) and
110
110
  `routine.morning_routine_journal` (Stage B, daily journal, lite). Also
111
111
  `routine.evening_review`, `routine.weekly_review`,
112
- `routine.hourly_check`, `routine.roadmap_refresh`,
112
+ `routine.activity_scan`, `routine.roadmap_refresh`,
113
113
  `routine.today_refresh`, `routine.user_profile_sweep`.
114
114
  `routine.morning_routine_initial` was retired (2026-05-16) — the
115
115
  first-run branch now routes through `routine.morning_routine`.
116
116
  - **Routine sub-jobs** (lite tier, dispatcher-spawned, not user-facing):
117
117
  `routine.fetch_window` (pre-pass mail/calendar/Notion fetcher that
118
118
  runs before each main routine and POSTs observations) and
119
- `routine.hourly_check.triage` (Stage 2 escalate-vs-log-only gate
120
- inside the hourly check).
121
- - **Custom routines:** `routine.custom.<slug>` (kebab-case slug;
122
- defaults to medium tier).
119
+ `routine.activity_scan.triage` (Stage 2 escalate-vs-log-only gate
120
+ inside the activity scan).
121
+ - **Custom routines (retired):** `routine.custom.<slug>` appears only
122
+ in historical Activity rows — operator-defined recurring work now
123
+ runs as user Agents under `agent.task`.
123
124
  - **Messaging:** `message.dm`, `message.mention`
124
125
  - **Dashboard:** `dashboard.chat`, `dashboard.docs_qa`
125
126
  - **Scheduled / external:** `agent.task` (recurring schedules),
@@ -13,8 +13,8 @@ aliases:
13
13
  category: concepts
14
14
  summary: |
15
15
  Routines are the autonomous, scheduled tasks Aitne runs on
16
- its own — morning routine, evening review, hourly check, weekly
17
- retro, plus any custom routines you define.
16
+ its own — morning routine, evening review, activity scan, weekly
17
+ retro, plus any recurring user Agents you define.
18
18
  section: routines
19
19
  tags:
20
20
  - core
@@ -30,7 +30,7 @@ ask_examples:
30
30
  - Which routine uses the high tier by default?
31
31
  locale: en-US
32
32
  created: 2026-04-25
33
- updated: 2026-05-28
33
+ updated: 2026-06-07
34
34
  keywords:
35
35
  - routine
36
36
  - routines
@@ -40,18 +40,18 @@ keywords:
40
40
  - routine.fetch_window
41
41
  - pre-pass
42
42
  - dayBoundaryHour
43
- - hourly check
43
+ - activity scan
44
44
  related:
45
45
  - features/routines/morning-routine
46
46
  - features/routines/evening-review
47
47
  - features/routines/weekly-review
48
- - features/routines/hourly-check
49
- - features/routines/custom-routines
48
+ - features/routines/activity-scan
49
+ - guides/add-a-custom-routine
50
50
  - concepts/process-keys
51
51
  - concepts/observations
52
52
  ui_anchors:
53
- - /connections/routines
54
- - /settings/routines
53
+ - /agents
54
+ - /agents/activity-scan
55
55
  process_keys:
56
56
  - routine.morning_routine
57
57
  - routine.morning_routine_today
@@ -59,17 +59,18 @@ process_keys:
59
59
  - routine.evening_review
60
60
  - routine.weekly_review
61
61
  - routine.monthly_review
62
- - routine.hourly_check
62
+ - routine.activity_scan
63
63
  - routine.today_refresh
64
64
  - routine.fetch_window
65
- - routine.hourly_check.triage
65
+ - routine.activity_scan.triage
66
66
  config_keys:
67
67
  - dayBoundaryHour
68
- - hourlyCheckEnabled
69
- - hourlyCheckIntervalMinutes
70
- - hourlyCheckActiveStartHour
71
- - hourlyCheckActiveEndHour
72
- - hourlyCheckPrePassFreshnessMinutes
68
+ - activityScanEnabled
69
+ - activityScanIntervalMinutes
70
+ - activityScanActiveStartHour
71
+ - activityScanActiveEndHour
72
+ - activityScanPrePassFreshnessMinutes
73
+ - activityScanStage2Enabled
73
74
  - monthlyReviewEnabled
74
75
  ---
75
76
 
@@ -81,7 +82,7 @@ A routine is a unit of agent work that runs on a schedule, not in
81
82
  response to a message. The morning routine fires once per agent day at
82
83
  `dayBoundaryHour`; the evening review (18:00 daily), weekly review
83
84
  (Friday 19:00), and optional monthly review fire on fixed schedules in
84
- code; the hourly check coalesces accumulated observations on a
85
+ code; the activity scan coalesces accumulated observations on a
85
86
  configurable cadence.
86
87
 
87
88
  ## Why This Concept Exists
@@ -92,7 +93,7 @@ up without being asked: it builds today, it logs to the journal, it
92
93
  files a retro for the week. They are the proactive surface.
93
94
 
94
95
  Each routine is a single ProcessKey — `routine.morning_routine`,
95
- `routine.hourly_check`, `routine.weekly_review`, etc. The dispatcher
96
+ `routine.activity_scan`, `routine.weekly_review`, etc. The dispatcher
96
97
  treats them as just another event class; the only difference from a
97
98
  DM is who fired the event.
98
99
 
@@ -108,10 +109,10 @@ DM is who fired the event.
108
109
  review once it is past 18:00; weekly review across Fri–Sun). It never
109
110
  double-fires a routine that already succeeded.
110
111
  - **Tier policy**: **no routine runs the high tier by default.** Every
111
- recurring routine — morning, evening, weekly, hourly check
112
+ recurring routine — morning, evening, weekly, activity scan
112
113
  defaults to **medium** (Sonnet on Claude). The **lite** (Haiku) tier
113
114
  is reserved for the morning routine's Stage B and for mechanical
114
- sub-jobs (the hourly-check triage gate and the pre-pass fetcher). The
115
+ sub-jobs (the activity-scan triage gate and the pre-pass fetcher). The
115
116
  only high-tier ProcessKey in the whole system is `delegated_task_heavy`,
116
117
  which is opt-in and not a routine. See
117
118
  [Backends and Tiers](backends-and-tiers.md).
@@ -140,26 +141,28 @@ DM is who fired the event.
140
141
  | `routine.morning_routine_journal` | Stage B of every morning routine (`journal/daily/<yesterday>.md` authoring) | lite |
141
142
  | `routine.evening_review` | 18:00 daily (fixed) | medium |
142
143
  | `routine.weekly_review` | Friday 19:00 (fixed, one hour after evening review) | medium |
143
- | `routine.monthly_review` | Last day of month at 18:00, **default off** (`monthlyReviewEnabled`) | medium |
144
- | `routine.hourly_check` | Every `hourlyCheckIntervalMinutes` (default 60) inside the active window | medium |
144
+ | `routine.monthly_review` | Last day of month at 18:00, **default off** — opt in by enabling the monthly-review agent at `/agents/monthly-review` | medium |
145
+ | `routine.activity_scan` | Every N interval minutes (default 60) inside the active window — cadence set on `/agents/activity-scan` | medium |
145
146
  | `routine.today_refresh` | On calendar drift or a dashboard "refresh today" request (not a fixed cron) | medium |
146
147
  | `routine.fetch_window` | Spawned before each routine above that needs fresh upstream data | lite |
147
- | `routine.hourly_check.triage` | Stage 2 gate of every hourly check | lite |
148
- | `routine.custom.<slug>` | Operator-defined recurrence | medium (override per routine via `backend_tier`) |
148
+ | `routine.activity_scan.triage` | Stage 2 of the activity-scan gate on low-signal ticks — runs only when `activityScanStage2Enabled` is on (default off; disabled ticks escalate straight to the full check) | lite |
149
+ | `routine.custom.<slug>` | Legacy custom-routine recurrence custom routines are now user Agents created on `/agents`; existing specs were converted at upgrade | medium |
149
150
 
150
151
  ## Where You See It in the Dashboard
151
152
 
152
- - **Settings Routines** is where the hourly check active window
153
- (`hourlyCheckActiveStartHour` / `hourlyCheckActiveEndHour`), the
154
- hourly check cadence (`hourlyCheckIntervalMinutes`), and any custom
155
- routines live. Morning, evening, weekly, and monthly fire times are
156
- fixed in code and not surfaced here.
157
- - **Connections Routines** is the unified view of next-fire times.
153
+ - **Agents** (`/agents`) is the hub: every routine is an agent card
154
+ showing its schedule, status, and last run. The activity scan's
155
+ cadence and active window are edited on `/agents/activity-scan`
156
+ (Definition tab Cadence card); each routine's rulebook is edited
157
+ on its Rulebook tab; custom recurring work is a user agent created
158
+ from the same page's New Agent dialog. Morning, evening, weekly, and
159
+ monthly fire times are fixed in code and not editable there.
158
160
  - **Activity** logs each routine run with its outcome.
159
161
 
160
162
  ## Related
161
163
 
162
164
  - [Morning Routine](../features/routines/morning-routine.md)
163
165
  - [Evening Review](../features/routines/evening-review.md)
164
- - [Hourly Check](../features/routines/hourly-check.md)
165
- - [Custom Routines](../features/routines/custom-routines.md)
166
+ - [Activity Scan](../features/routines/activity-scan.md)
167
+ - [Create a Recurring Agent](../guides/add-a-custom-routine.md)
168
+ - [Custom Routines (Retired)](../features/routines/custom-routines.md)
@@ -28,7 +28,7 @@ ask_examples:
28
28
  - How do I see what tools the agent is allowed to use?
29
29
  locale: en-US
30
30
  created: 2026-04-25
31
- updated: 2026-05-28
31
+ updated: 2026-06-07
32
32
  keywords:
33
33
  - safety
34
34
  - safe mode
@@ -44,7 +44,7 @@ related:
44
44
  - features/operations/approvals
45
45
  - reference/disallowed-tools
46
46
  ui_anchors:
47
- - /settings/advanced
47
+ - /settings/safety
48
48
  - /settings/models
49
49
  config_keys:
50
50
  - disallowedTools
@@ -86,9 +86,12 @@ disallowed-tools floor.
86
86
  workspace-write sandbox, the Gemini whitelist TOML, and the OpenCode
87
87
  permission block.
88
88
  - **Allow mode**: the looser posture. SDK bypass, sandbox off, minimal
89
- TOML. The absolute-block layer still holds in Allow mode, so the
90
- destructive-ops floor never opens. Set independently per backend, so
91
- one backend can run Allow while the others stay Safe.
89
+ TOML. The absolute-block layer still holds in Allow mode on Claude,
90
+ Gemini, and OpenCode Codex is the documented exception: its Allow
91
+ mode is a binary sandbox-off switch with no hook layer the daemon can
92
+ attach the block list to, so the dashboard warns you before you flip
93
+ it. Set independently per backend, so one backend can run Allow while
94
+ the others stay Safe.
92
95
  - **Absolute block**: the unconditional layer. `ALWAYS_DISALLOWED_TOOLS`
93
96
  in `src/safety/always-disallowed.ts`. Cannot be widened by skills,
94
97
  by config, or by allow-mode.
@@ -120,13 +123,14 @@ absolute-block layer and Approve tier are where the agent is actually stopped.
120
123
 
121
124
  ## Where You See It in the Dashboard
122
125
 
123
- - **Settings → Advanced** holds the `disallowedTools` and
126
+ - **Settings → Safety** holds the `disallowedTools` and
124
127
  `allowedToolsOverride` tool-policy lists.
125
128
  - **Settings → Models & Cost** holds the per-backend Safe / Allow
126
129
  **Execution Mode** switch (you can also set it in the setup wizard).
127
130
  - **Activity** logs every absolute-blocked tool call as
128
131
  `action_type='blocked_absolute'`.
129
- - **Approvals** is where Approve-tier actions queue when they fire.
132
+ - The **Overview** page shows an approval card where Approve-tier
133
+ actions queue when they fire.
130
134
 
131
135
  ## Related
132
136
 
@@ -155,8 +155,9 @@ of "report to me" events. Information about what the agent did is
155
155
  ## Recommended Starter Denylists
156
156
 
157
157
  The setup wizard pre-populates these on first delegated setup. The
158
- operator can keep them, edit, or explicitly opt for an empty list (a
159
- confirmation modal explains the trade-off).
158
+ operator can keep them, edit, or explicitly opt for an empty list by
159
+ saving `deniedTools: []` (the safety-floor guidance rendered above the
160
+ deny-list editor explains the trade-off).
160
161
 
161
162
  **Gmail × Codex** (Codex's `mcp__codex_apps__gmail._*`):
162
163
 
@@ -172,10 +173,19 @@ delete / archive surface):
172
173
 
173
174
  | Tool | Why deny by default |
174
175
  |---|---|
175
- | `label_message` | The only mutating tool the connector exposes |
176
+ | `label_message` | Label mutations are the connector's only state-changing surface; the starter denies 2 of the 5 `label` tools, keeping the capability satisfiable |
176
177
  | `label_thread` | Same |
177
178
 
178
- **Google Calendar** (Codex + Claude):
179
+ **Gmail × Gemini** (the google-workspace connector; `sendDraft` and the
180
+ `modify` / `modifyThread` label tools stay available):
181
+
182
+ | Tool | Why deny by default |
183
+ |---|---|
184
+ | `send` | Compose-and-send in one call — strictly destructive |
185
+ | `batchModify` | The mass-mutation path; same rationale as Codex's `apply_labels_to_emails` |
186
+
187
+ **Google Calendar** (Codex + Claude; Gemini denies the same two
188
+ operations under its camelCase names `deleteEvent` / `updateEvent`):
179
189
 
180
190
  | Tool | Why deny by default |
181
191
  |---|---|
@@ -214,7 +224,7 @@ against the connector's `capabilityTools` set so typos fail fast.
214
224
  The starter floor re-fires not just on first-delegated setup but also
215
225
  on `delegatedBackend` swap (e.g. claude → codex) when the previous
216
226
  deny list is namespace-stale on the new backend and the operator
217
- hadn't already chosen an empty list. The audit row carries
227
+ hadn't already chosen an empty list. The daemon log entry carries
218
228
  `trigger="backend_swap_stale"` to distinguish from
219
229
  `trigger="first_delegated"`. Operators who explicitly set
220
230
  `deniedTools: []` before the swap are honored — the swap clause does
@@ -239,9 +249,10 @@ and answers in conversation. The endpoint:
239
249
  - Redacts the free-text `error` / `detail` fields via the standard
240
250
  secret-redaction utility before serializing.
241
251
  - Returns rows from `agent_actions` only. Same-backend / native MCP
242
- calls surface as their own `action_type` rows (e.g. `kind=mcp`);
243
- the per-call detail lives in `mcp_tool_calls`, which this endpoint
244
- does not join — query it separately if you need step-level fidelity.
252
+ calls do not get their own rows they roll up under the parent
253
+ session row, and the per-call detail lives in `mcp_tool_calls`,
254
+ which this endpoint does not join — query it separately if you need
255
+ step-level fidelity.
245
256
 
246
257
  Common `kind` values for the cross-backend proxy: `delegated_task.exec`
247
258
  (one header row per `/exec` call), `delegated_task.run` (one header row
@@ -100,7 +100,8 @@ visible to the model.
100
100
  ## Concrete Examples
101
101
 
102
102
  - `today` — read and rewrite `state/today.md`.
103
- - `schedule` — produce per-date schedule files from the calendar.
103
+ - `schedule` — register future wake-ups, reminders, and recurring
104
+ tasks via `/api/schedule`.
104
105
  - `mail` — search and label messages via the daemon's mail proxy.
105
106
  - `docs-search` — read-only fetch over the docs corpus, used only by
106
107
  `dashboard.docs_qa`.
@@ -124,11 +125,12 @@ seed payload immediately.
124
125
  The optimizer agent runs in an isolated workdir with a tightly
125
126
  scoped toolset (`Bash(curl http://localhost:8321/api/skill-curation/*)`,
126
127
  `Read`) and an auto-revert safety net: each cadence cycle the daemon
127
- re-checks recently-applied overlays, and any section that has
128
- accumulated *more* drift signal weight after the overlay was applied
129
- than before is rolled back automatically and frozen for two cycles to
130
- stop thrashing. This is the only roll-back path — there is no
131
- per-proposal approve/reject API, just the on/off toggle.
128
+ re-checks recently-applied overlays, and any section that keeps
129
+ accumulating drift signal weight after the overlay was applied
130
+ (crossing a fixed regression threshold) is rolled back automatically
131
+ and frozen for two cycles to stop thrashing. This is the only
132
+ roll-back path — there is no per-proposal approve/reject API, just
133
+ the on/off toggle.
132
134
 
133
135
  Skill curation is **off by default**. The master toggle, curation
134
136
  cadence, manual-run trigger, and the per-skill exclusion list are all
@@ -136,8 +138,8 @@ surfaced at **Settings → Self-learning** (`/settings/self-learning`).
136
138
 
137
139
  ## Where You See It in the Dashboard
138
140
 
139
- - **Knowledge → Skills** lists every skill, its description, and the
140
- events it loads for.
141
+ - **Knowledge → Skills** lists every skill, its description, and its
142
+ `allowed-tools`.
141
143
  - **Connections → MCP** is where MCP servers (which surface as tools
142
144
  inside skills) attach.
143
145
  - **Settings → Self-learning (`/settings/self-learning`)** is where
@@ -106,7 +106,7 @@ clicks leave the daemon.
106
106
  containing ≥3 distinct ASINs surface as comparison sessions the
107
107
  agent can summarise.
108
108
  - **Powers the pre-morning digest** — yesterday's reading and reload
109
- patterns feed the morning routine's pre-pass digest.
109
+ patterns feed the digest the morning routine reads.
110
110
 
111
111
  ## Privacy and Consent
112
112
 
@@ -120,8 +120,8 @@ clicks leave the daemon.
120
120
  history file is opened read-only; the daemon never reaches into
121
121
  cookies, login sessions, or profile dirs other than the history DB.
122
122
  - **Per-browser opt-in.** `browserHistoryBrowserOverrides` lets you
123
- enable / disable each detected browser independently and override
124
- the DB path for atypical installs.
123
+ force each detected browser on or off independently
124
+ (`auto` / `forced-on` / `forced-off`).
125
125
  - **Per-category gate.** `browserHistoryCategories` controls which
126
126
  visit categories (research / shopping / news / dev / entertainment / …) get
127
127
  ingested. Categories you exclude are dropped at ingest time, not
@@ -136,11 +136,13 @@ clicks leave the daemon.
136
136
 
137
137
  A research cluster qualifies when the combination of meaningful visits,
138
138
  foreground time, and distinct domains crosses the thresholds in
139
- `DEFAULT_OFFER_THRESHOLDS` (tunable via `browserHistoryLifecycle`).
139
+ `DEFAULT_OFFER_THRESHOLDS` (fixed defaults `browserHistoryLifecycle`
140
+ tunes the poller's check cadence, not these thresholds).
140
141
  On each tick the poller evaluates the offer triggers per active cluster
141
- (`evaluateOfferTriggers`); once the **per-cluster offer rate-limit gate**
142
- (`gateOfferRateLimit`) approvesthis is the 14-day, per-slug offer
143
- backoff, not the daemon-wide session gate that Phase 9 removed — a
142
+ (`evaluateOfferTriggers`) this is where the 14-day, per-slug offer
143
+ re-fire window lives and the **offer rate-limit gate**
144
+ (`gateOfferRateLimit`: daily offer cap, minimum gap between offers,
145
+ quiet hours, and a 30-day decline backoff) must also approve before a
144
146
  Two-Option Offer DM is composed by the `routine.research_offer_dm`
145
147
  process key.
146
148
 
@@ -171,7 +173,7 @@ later tick cannot re-offer the same cluster.
171
173
  | Shopping-comparison window scan | Same tick, 7-day lookback | `SHOPPING_COMPARISON_WINDOW_MS` constants |
172
174
  | Nightly journal append | Agent-day boundary | `routine.research_cluster_update` (lite tier, one row per active cluster per day) |
173
175
  | Weekly reload-memory block | Friday weekly review | `routine.weekly_review` reads `/api/browser-history/reloads/weekly` |
174
- | Pre-morning digest | Morning routine pre-pass | Yesterday's reading + reloads feed the digest block |
176
+ | Pre-morning digest | Daily, one hour before the agent-day boundary | Yesterday's reading + reloads feed the digest block |
175
177
 
176
178
  ## When Something Goes Wrong
177
179
 
@@ -180,8 +182,10 @@ later tick cannot re-offer the same cluster.
180
182
  platform detector might be failing to resolve the user's profile dir.
181
183
  The daemon log line will name the candidate paths it tried.
182
184
  - **A cluster keeps re-offering.** Check the `lastResearchOfferAt` /
183
- `lastWikiOfferAt` columns; the rate-limit gate uses those for the
184
- 14-day backoff. `!research decline <slug>` stamps both fields.
185
+ `lastWikiOfferAt` columns; the trigger evaluator uses those for the
186
+ 14-day re-fire window (the rate-limit gate also reads them for its
187
+ 30-day decline backoff). `!research decline <slug>` stamps both
188
+ fields.
185
189
  - **`!checks` is empty.** That's the common case for a quiet day —
186
190
  the reload signals are gated to the agent-day, not UTC.
187
191