@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.
- package/README.md +8 -8
- package/agent-assets/agent-profiles/background-task.md +53 -0
- package/agent-assets/agent-profiles/conversational.md +1 -0
- package/agent-assets/agent-profiles/routine-fetch-window.md +14 -75
- package/agent-assets/agent-profiles/routine.md +1 -1
- package/agent-assets/agents/{hourly-check → activity-scan}/agent.md +22 -17
- package/agent-assets/agents/monthly-review/agent.md +6 -5
- package/agent-assets/docs/concepts/agent-day.md +4 -5
- package/agent-assets/docs/concepts/auth-health.md +23 -20
- package/agent-assets/docs/concepts/backends-and-tiers.md +13 -9
- package/agent-assets/docs/concepts/costs-and-quotas.md +11 -10
- package/agent-assets/docs/concepts/delegated-mode.md +13 -12
- package/agent-assets/docs/concepts/memory-model.md +13 -9
- package/agent-assets/docs/concepts/observations.md +24 -20
- package/agent-assets/docs/concepts/process-keys.md +10 -9
- package/agent-assets/docs/concepts/routines.md +34 -31
- package/agent-assets/docs/concepts/safety-and-execution.md +11 -7
- package/agent-assets/docs/concepts/safety-model.md +19 -8
- package/agent-assets/docs/concepts/skills.md +10 -8
- package/agent-assets/docs/features/integrations/browser-history.md +14 -10
- package/agent-assets/docs/features/integrations/calendar.md +24 -13
- package/agent-assets/docs/features/integrations/git.md +13 -11
- package/agent-assets/docs/features/integrations/github.md +22 -14
- package/agent-assets/docs/features/integrations/mail.md +22 -20
- package/agent-assets/docs/features/integrations/notion.md +35 -11
- package/agent-assets/docs/features/integrations/obsidian.md +8 -8
- package/agent-assets/docs/features/lifestyle/git.md +24 -20
- package/agent-assets/docs/features/lifestyle/reading.md +5 -3
- package/agent-assets/docs/features/lifestyle/receipts.md +11 -10
- package/agent-assets/docs/features/memory-files/agent-journal.md +25 -16
- package/agent-assets/docs/features/memory-files/agent-lessons.md +7 -6
- package/agent-assets/docs/features/memory-files/projects.md +5 -4
- package/agent-assets/docs/features/memory-files/schedule.md +6 -3
- package/agent-assets/docs/features/memory-files/today.md +10 -7
- package/agent-assets/docs/features/memory-files/user-profile.md +14 -9
- package/agent-assets/docs/features/messaging/bang-commands.md +21 -6
- package/agent-assets/docs/features/messaging/overview.md +12 -9
- package/agent-assets/docs/features/operations/activity-and-conversations.md +1 -1
- package/agent-assets/docs/features/operations/browser-tasks.md +184 -0
- package/agent-assets/docs/features/operations/cost-tracking.md +11 -1
- package/agent-assets/docs/features/operations/managed-chromium.md +1 -0
- package/agent-assets/docs/features/operations/notifications.md +11 -1
- package/agent-assets/docs/features/operations/quiet-hours.md +41 -12
- package/agent-assets/docs/features/operations/schedule-approaching.md +2 -2
- package/agent-assets/docs/features/routines/activity-scan.md +220 -0
- package/agent-assets/docs/features/routines/custom-routines.md +82 -138
- package/agent-assets/docs/features/routines/evening-review.md +14 -12
- package/agent-assets/docs/features/routines/morning-routine.md +4 -3
- package/agent-assets/docs/features/routines/weekly-review.md +18 -3
- package/agent-assets/docs/getting-started/01-what-is-this.md +3 -3
- package/agent-assets/docs/getting-started/04-first-day.md +27 -30
- package/agent-assets/docs/glossary.md +4 -4
- package/agent-assets/docs/guides/add-a-custom-routine.md +122 -68
- package/agent-assets/docs/guides/pause-the-agent.md +22 -20
- package/agent-assets/docs/guides/reinstall-cleanly.md +2 -0
- package/agent-assets/docs/guides/setup-wizard.md +12 -9
- package/agent-assets/docs/reference/api.md +11 -0
- package/agent-assets/docs/reference/config.md +30 -20
- package/agent-assets/docs/reference/keyboard-shortcuts.md +2 -2
- package/agent-assets/docs/reference/knowledge-layout.md +14 -10
- package/agent-assets/docs/reference/process-keys.md +7 -7
- package/agent-assets/docs/reference/skills.md +5 -2
- package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +32 -16
- package/agent-assets/docs/troubleshooting/observation-not-detected.md +26 -24
- package/agent-assets/docs/troubleshooting/wiki-write-failed.md +3 -3
- package/agent-assets/skills/agent-create/SKILL.md +11 -0
- package/agent-assets/skills/background-task/SKILL.md +184 -0
- package/agent-assets/skills/background-task-reply/SKILL.md +100 -0
- package/agent-assets/skills/browser-history/SKILL.md +31 -13
- package/agent-assets/skills/browser-task/SKILL.md +12 -5
- package/agent-assets/skills/context/SKILL.md +4 -3
- package/agent-assets/skills/context/references/api.md +5 -3
- package/agent-assets/skills/context/references/snapshot-files.md +4 -4
- package/agent-assets/skills/external-services/SKILL.native.claude.md +13 -7
- package/agent-assets/skills/external-services/SKILL.native.codex.md +11 -5
- package/agent-assets/skills/external-services/SKILL.native.gemini.md +11 -5
- package/agent-assets/skills/mail/SKILL.md +2 -2
- package/agent-assets/skills/mail/SKILL.native.claude.md +16 -9
- package/agent-assets/skills/mail/SKILL.native.codex.md +15 -8
- package/agent-assets/skills/mail/SKILL.native.gemini.md +11 -5
- package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +20 -12
- package/agent-assets/skills/management-policy/SKILL.md +26 -17
- package/agent-assets/skills/management-policy/curation.json +1 -1
- package/agent-assets/skills/management-policy/references/policy-workflow.md +26 -13
- package/agent-assets/skills/notify/SKILL.md +10 -5
- package/agent-assets/skills/notify/references/priority.md +30 -17
- package/agent-assets/skills/notion/SKILL.md +1 -1
- package/agent-assets/skills/notion/SKILL.native.claude.md +3 -3
- package/agent-assets/skills/notion/SKILL.native.codex.md +2 -2
- package/agent-assets/skills/notion/SKILL.native.gemini.md +2 -2
- package/agent-assets/skills/observations/SKILL.md +5 -5
- package/agent-assets/skills/roadmap/references/api.md +7 -2
- package/agent-assets/skills/schedule/SKILL.md +11 -2
- package/agent-assets/skills/schedule/references/recurrence-rule.md +20 -12
- package/agent-assets/skills/scheduled-managed-task/SKILL.md +12 -9
- package/agent-assets/skills/today/SKILL.md +19 -3
- package/agent-assets/skills/today/references/agent-plan-lifecycle.md +9 -4
- package/agent-assets/skills/today/references/agent-plan-revision.md +28 -0
- package/agent-assets/skills/today/references/today-skeleton.md +5 -5
- package/agent-assets/skills/user-interview/references/op-morning.md +1 -1
- package/agent-assets/system-prompts/routine-research-cluster-update.md +71 -0
- package/agent-assets/task-flows/_partials/notion-acquire.notion.md +47 -21
- package/agent-assets/task-flows/background_task.md +81 -0
- package/agent-assets/task-flows/git.local_ahead.stale.md +1 -1
- package/agent-assets/task-flows/git.push.detected.md +1 -1
- package/agent-assets/task-flows/git.tag.created.md +1 -1
- package/agent-assets/task-flows/github.assigned.md +1 -1
- package/agent-assets/task-flows/github.pull_request.review_requested.md +2 -2
- package/agent-assets/task-flows/github.security_alert.md +1 -1
- package/agent-assets/task-flows/message.received.dm.md +7 -3
- package/agent-assets/task-flows/message.received.dm_first.md +4 -2
- package/agent-assets/task-flows/{routine.hourly_check.md → routine.activity_scan.md} +31 -23
- package/agent-assets/task-flows/{routine.hourly_check.triage.md → routine.activity_scan.triage.md} +3 -3
- package/agent-assets/task-flows/routine.monthly_review.md +9 -8
- package/agent-assets/task-flows/routine.research_cluster_update.md +33 -19
- package/agent-assets/task-flows/routine.roadmap_refresh.md +2 -2
- package/agent-assets/task-flows/routine.today_refresh.md +1 -1
- package/agent-assets/task-flows/routine.weekly_review.md +103 -4
- package/agent-assets/task-flows/schedule.approaching.md +2 -2
- package/agent-assets/task-flows/scheduled.dm.md +77 -1
- package/agent-assets/task-flows/scheduled.task.md +7 -1
- package/agent-assets/templates/_manifest.json +2 -2
- package/agent-assets/templates/knowledge/dossiers/_index.md +1 -1
- package/agent-assets/templates/knowledge/dossiers/{hourly.md → activity-scan.md} +1 -1
- package/agent-assets/templates/policies/journal-format.md +1 -1
- package/agent-assets/templates/policies/mcp.md +1 -1
- package/agent-assets/templates/policies/routines/_index.md +1 -1
- package/agent-assets/templates/policies/routines/{hourly.md → activity-scan.md} +5 -5
- package/package.json +6 -5
- package/agent-assets/docs/features/routines/hourly-check.md +0 -205
|
@@ -22,7 +22,7 @@ tags:
|
|
|
22
22
|
status: stable
|
|
23
23
|
ask_examples:
|
|
24
24
|
- List all the ProcessKeys
|
|
25
|
-
- What is the default tier for
|
|
25
|
+
- What is the default tier for activity scan?
|
|
26
26
|
- Which ProcessKeys are configurable from the dashboard?
|
|
27
27
|
- What is routine.fetch_window used for?
|
|
28
28
|
locale: en-US
|
|
@@ -45,7 +45,7 @@ updated: 2026-06-07
|
|
|
45
45
|
config_keys:
|
|
46
46
|
- monthlyReviewEnabled
|
|
47
47
|
- delegatedTaskHeavyEnabled
|
|
48
|
-
-
|
|
48
|
+
- activityScanIntervalMinutes
|
|
49
49
|
- dayBoundaryHour
|
|
50
50
|
api_endpoints:
|
|
51
51
|
- POST /api/browser-task
|
|
@@ -62,7 +62,7 @@ related:
|
|
|
62
62
|
# ProcessKeys
|
|
63
63
|
|
|
64
64
|
A **ProcessKey** identifies the kind of work being dispatched (an owner DM,
|
|
65
|
-
the morning routine, an
|
|
65
|
+
the morning routine, an activity scan, …). The dispatcher passes a ProcessKey
|
|
66
66
|
to the `BackendRouter`, which resolves it to a `{ main, fallback }` backend
|
|
67
67
|
plus an execution tier — the dispatcher never picks a model directly.
|
|
68
68
|
|
|
@@ -81,14 +81,14 @@ The **default tier** column maps to a model size, not a specific id:
|
|
|
81
81
|
| `routine.today_refresh` | Calendar-drift-triggered (calendar change touching today's items; 5-min dedup, fires ~30s later) — drift-refresh of `state/today.md` | medium | yes |
|
|
82
82
|
| `routine.evening_review` | Daily at 18:00 local (fixed) | medium | yes |
|
|
83
83
|
| `routine.weekly_review` | Friday 19:00 local (fixed) | medium | yes |
|
|
84
|
-
| `routine.monthly_review` | Monthly cadence (gated OFF by default —
|
|
85
|
-
| `routine.
|
|
86
|
-
| `routine.
|
|
84
|
+
| `routine.monthly_review` | Monthly cadence (gated OFF by default — opt in by enabling the monthly-review agent at `/agents/monthly-review`; the legacy `monthlyReviewEnabled` config key is a deprecated fallback). The routine itself is off by default, but its backend/tier binding is still configurable. | medium | yes |
|
|
85
|
+
| `routine.activity_scan` | Every N interval minutes (default 60) inside the active window — cadence set on `/agents/activity-scan`; legacy key `activityScanIntervalMinutes` is a deprecated fallback | medium | yes |
|
|
86
|
+
| `routine.activity_scan.triage` | Stage 2 triage gate of every activity scan | lite | yes |
|
|
87
87
|
| `routine.fetch_window` | Pre-pass fetcher spawned before each main routine | lite | yes |
|
|
88
88
|
| `routine.user_profile_sweep` | Periodic agent-day profile summarization pass | medium | no |
|
|
89
89
|
| `routine.roadmap_refresh` | Periodic roadmap re-derivation (NOT in `ROUTINE_WINDOWS` — no `routine.fetch_window` pre-pass; the synthesis session itself drives the native-mode MCP fan-out) | medium | yes |
|
|
90
90
|
| `routine.skill_curation` | Background skill-curation / overlay refinement loop (cron cadence picked at `/settings/self-learning`) | medium | yes |
|
|
91
|
-
| `routine.custom.<slug>` |
|
|
91
|
+
| `routine.custom.<slug>` | Retired — legacy custom routines no longer fire; they were converted to user Agents running under `agent.task` (see [Custom Routines (Retired)](../features/routines/custom-routines.md)). Seen only in historical Activity rows. | — | no |
|
|
92
92
|
| `message.dm` | Owner DM | medium | yes |
|
|
93
93
|
| `message.mention` | @-mention in a paired Slack channel where the agent is invited (DMs are `message.dm`; Telegram/WhatsApp groups are filtered out) | medium | yes |
|
|
94
94
|
| `dashboard.chat` | `/chat` send | medium | yes |
|
|
@@ -59,13 +59,16 @@ related:
|
|
|
59
59
|
Aitne ships a fixed set of built-in skills the agent loads per session. Most
|
|
60
60
|
are always available; a few are **conditional** — loaded only when a gating
|
|
61
61
|
flag is set (`gmail-lifestyle`, `managed-tasks`) or only for a specific event
|
|
62
|
-
type (`browser-task
|
|
62
|
+
type (`browser-task` / `background-task` / `background-task-reply`, on owner
|
|
63
|
+
DMs). The table below is the canonical roster.
|
|
63
64
|
|
|
64
65
|
| Slug | Purpose |
|
|
65
66
|
|---|---|
|
|
66
67
|
| `agent-actions` | Self-report structured metadata (dayType, anomalies, inbox stats, files-touched) into the session's own `agent_actions` row so daemon-side consumers read structured data instead of parsing prose. Loaded near the end of morning-routine / dispatcher sessions. |
|
|
67
68
|
| `agent-create` | Register a durable, named recurring Agent that fires on a cron cadence via `POST /api/agents`. For ongoing autonomous work (not one-time reminders → `schedule`, not background app-data fetches → `managed-tasks`). Conditional skill loaded on owner DMs / mentions when the message looks like a recurring-work request (gated by `agentCreateActiveForDm`). |
|
|
68
69
|
| `attach` | Attach a generated or downloaded file to the agent's reply when the user expects a file artifact. |
|
|
70
|
+
| `background-task` | Hand a long-running / open-ended task (deep research, a multi-repo CI audit, "monitor X over time", a bulk compile) to the detached background runner via `POST /api/background-task`. Composes a self-contained brief, sets the notification policy (`always` / `if_significant` / `silent`), POSTs, acks, and ends the turn; reads `GET /api/background-task/:id` for follow-up detail. Loaded on `message.received.dm` + `message.received.dm_first`. |
|
|
71
|
+
| `background-task-reply` | Relay the owner's natural-language answer to a background task that parked on a clarifying question (`awaiting_user`) into a structured `POST /api/background-task/:id/clarify` call. No-op unless a task is parked and the conversation shows the question was asked. Loaded on `message.received.dm`. |
|
|
69
72
|
| `browser-history` | Read normalised browser activity through `/api/browser-history/*`. Used by research-cluster journal updates, accept-path dispatches, owner pulls of shopping / reload traces, and the morning research summary. Never reads browser SQLite or profile dirs directly. |
|
|
70
73
|
| `browser-history-respond` | Bridge the owner's natural-language reply to a research-offer DM ("dig deeper" / "summarise") into a structured `/api/browser-history/offers/<slug>/{accept,decline}` call. |
|
|
71
74
|
| `browser-task` | Drive managed Chromium for open-ended browser tasks the user describes in DM. POSTs to `/api/browser-task` with a natural-language description; relays sub-agent clarifications back through DM. Loaded only on `message.received.dm`. |
|
|
@@ -84,7 +87,7 @@ type (`browser-task`, on owner DMs). The table below is the canonical roster.
|
|
|
84
87
|
| `roadmap` | Read / write `plans/roadmap.md` (cross-request write lock). |
|
|
85
88
|
| `schedule` | Schedule future agent wake-ups and DMs via the daemon (writes `agent_schedule` and `recurring_schedules` rows). |
|
|
86
89
|
| `scheduled-managed-task` | Surface and act on Managed Tasks that are due now. |
|
|
87
|
-
| `today` | Read or write `state/today.md` — morning routines,
|
|
90
|
+
| `today` | Read or write `state/today.md` — morning routines, activity scans, DMs that need a today snapshot. |
|
|
88
91
|
| `user-interview` | Manage the profile-interview queue at `state/profile-questions.md`; ask one question at a time. |
|
|
89
92
|
| `user-profile` | Record user facts — identity, people, work, expertise, habits, goals — into the `identity/*` slices (`profile.md`, `people.md`, `work.md`, …). |
|
|
90
93
|
| `wiki-*` | Build and maintain the personal wiki workspace — `!ingest` / `!compile` / `!ask` / `!lint` / `!trace` / `!connect`. Split into per-process sub-skills under `agent-assets/skills/wiki/` (`wiki-vault-rules`, `wiki-ingest`, `wiki-compile`, `wiki-ask`, `wiki-lint`, `wiki-trace`, `wiki-connect`, `wiki-graduate`), each loaded for its matching `wiki.*` ProcessKey. |
|
|
@@ -13,7 +13,7 @@ summary: |
|
|
|
13
13
|
Causes are ordered by frequency: daemon was stopped at the trigger
|
|
14
14
|
time, both backends failed, quota exhausted, the routine threw and is
|
|
15
15
|
mid-retry, or it is a day-boundary subtlety. Most cases self-heal via
|
|
16
|
-
boot
|
|
16
|
+
boot/wake catch-up, the missed-fire self-heal, or the retry chain.
|
|
17
17
|
section: morning-routine-didnt-run
|
|
18
18
|
tags:
|
|
19
19
|
- troubleshooting
|
|
@@ -28,7 +28,7 @@ ask_examples:
|
|
|
28
28
|
- How do I regenerate today.md by hand?
|
|
29
29
|
locale: en-US
|
|
30
30
|
created: 2026-04-25
|
|
31
|
-
updated: 2026-
|
|
31
|
+
updated: 2026-06-10
|
|
32
32
|
keywords:
|
|
33
33
|
- morning routine didn't run
|
|
34
34
|
- morning routine skipped
|
|
@@ -37,7 +37,7 @@ keywords:
|
|
|
37
37
|
- regenerate today
|
|
38
38
|
related:
|
|
39
39
|
- features/routines/morning-routine
|
|
40
|
-
- features/routines/
|
|
40
|
+
- features/routines/activity-scan
|
|
41
41
|
- concepts/agent-day
|
|
42
42
|
- troubleshooting/auth-failed
|
|
43
43
|
- troubleshooting/quota-exhausted
|
|
@@ -52,7 +52,7 @@ config_keys:
|
|
|
52
52
|
context_files:
|
|
53
53
|
- state/today.md
|
|
54
54
|
ui_anchors:
|
|
55
|
-
- /
|
|
55
|
+
- /agents/morning-routine
|
|
56
56
|
- /activity
|
|
57
57
|
---
|
|
58
58
|
|
|
@@ -66,26 +66,42 @@ ui_anchors:
|
|
|
66
66
|
|
|
67
67
|
## Before You Worry: It Often Self-Heals
|
|
68
68
|
|
|
69
|
-
The morning routine has
|
|
69
|
+
The morning routine has several recovery paths that usually fix this
|
|
70
70
|
without any action from you:
|
|
71
71
|
|
|
72
72
|
- **Boot-time catch-up.** If the daemon was stopped during the trigger
|
|
73
73
|
window, it fires the unrun morning routine the next time it starts.
|
|
74
74
|
So a missed routine often resolves itself on the next `aitne start`
|
|
75
75
|
or `aitne restart`.
|
|
76
|
+
- **Sleep wake catch-up.** If the machine was asleep at the trigger
|
|
77
|
+
minute (laptop lid closed at 04:00), the cron fire is silently lost —
|
|
78
|
+
cron never replays missed ticks. The daemon detects the wall-clock
|
|
79
|
+
gap when the machine wakes and queues the morning routine itself,
|
|
80
|
+
along with any missed evening/weekly reviews.
|
|
81
|
+
- **Missed-fire self-heal.** A periodic check (every 10 minutes)
|
|
82
|
+
notices when the day is more than ~15 minutes old with no morning
|
|
83
|
+
attempt and nothing queued, and queues the routine. This covers
|
|
84
|
+
sleeps too short for the wake detector and any other lost trigger.
|
|
76
85
|
- **Retry on failure.** If the routine runs but fails to produce a
|
|
77
86
|
fresh `state/today.md`, the daemon retries up to 3 times with an
|
|
78
87
|
exponential back-off (5, then 10, then 15 minutes). After 3 failed
|
|
79
|
-
attempts it sends you a DM asking you to regenerate manually.
|
|
80
|
-
|
|
81
|
-
|
|
88
|
+
attempts it sends you a DM asking you to regenerate manually.
|
|
89
|
+
- **Hung-run recovery.** If a run starts and then wedges (typically a
|
|
90
|
+
sleep mid-run that kills the backend connection), the self-heal
|
|
91
|
+
check re-queues it once the run has been silent past the stall
|
|
92
|
+
threshold (~2 hours by default) — at most twice per day, after which
|
|
93
|
+
it alerts instead of re-running. Either way you get an owner DM so
|
|
94
|
+
the silence never goes unnoticed.
|
|
82
95
|
|
|
83
96
|
Give it a few minutes, or restart the daemon, before digging deeper.
|
|
84
97
|
|
|
85
98
|
## Most Likely Causes (in probability order)
|
|
86
99
|
|
|
87
|
-
1. **Daemon was stopped
|
|
88
|
-
Boot-time catch-up
|
|
100
|
+
1. **Daemon was stopped — or the machine was asleep — at the trigger
|
|
101
|
+
time.** Check `aitne status`. Boot-time catch-up covers the stopped
|
|
102
|
+
case once the daemon is back up; sleep wake catch-up and the
|
|
103
|
+
missed-fire self-heal cover the asleep case within minutes of the
|
|
104
|
+
machine waking.
|
|
89
105
|
2. **Both backends failed.** The routine tried the main backend, fell
|
|
90
106
|
back, and the fallback failed too. Check `/activity` for an error
|
|
91
107
|
outcome and `aitne logs` for the failure.
|
|
@@ -99,9 +115,9 @@ Give it a few minutes, or restart the daemon, before digging deeper.
|
|
|
99
115
|
the routine still "belongs to" yesterday — see
|
|
100
116
|
[Agent Day](../concepts/agent-day.md).
|
|
101
117
|
|
|
102
|
-
Note: the morning routine takes priority over the
|
|
103
|
-
other way around. The
|
|
104
|
-
routine is active, so a running
|
|
118
|
+
Note: the morning routine takes priority over the activity scan, not the
|
|
119
|
+
other way around. The activity scan skips itself while the morning
|
|
120
|
+
routine is active, so a running activity scan never blocks the morning
|
|
105
121
|
routine.
|
|
106
122
|
|
|
107
123
|
## Diagnostic Steps
|
|
@@ -109,8 +125,8 @@ routine.
|
|
|
109
125
|
1. `aitne status` — is the daemon up?
|
|
110
126
|
2. `/activity` — is there a row for `routine.morning_routine`? An error
|
|
111
127
|
outcome points to a backend failure (cause 2 or 3).
|
|
112
|
-
3. `/
|
|
113
|
-
|
|
128
|
+
3. `/agents` — the morning-routine card shows its schedule, status,
|
|
129
|
+
and last run; open `/agents/morning-routine` for recent executions.
|
|
114
130
|
4. `aitne logs` — search for `morning_routine` to see the trigger,
|
|
115
131
|
any fallback, and retry scheduling.
|
|
116
132
|
|
|
@@ -136,5 +152,5 @@ synthesis immediately.
|
|
|
136
152
|
## Related
|
|
137
153
|
|
|
138
154
|
- [Morning Routine](../features/routines/morning-routine.md)
|
|
139
|
-
- [
|
|
155
|
+
- [Activity Scan](../features/routines/activity-scan.md)
|
|
140
156
|
- [Agent Day](../concepts/agent-day.md)
|
|
@@ -7,47 +7,47 @@ aliases:
|
|
|
7
7
|
- observation missing
|
|
8
8
|
- no observations
|
|
9
9
|
- polling broken
|
|
10
|
-
-
|
|
10
|
+
- activity scan empty
|
|
11
11
|
category: troubleshooting
|
|
12
12
|
summary: |
|
|
13
13
|
An expected change (commit, note, calendar move) didn't surface in
|
|
14
|
-
the
|
|
14
|
+
the activity scan. Most often a polling delay, a vault/repo not
|
|
15
15
|
watched, or a change the agent authored itself (filtered out).
|
|
16
16
|
section: troubleshooting
|
|
17
17
|
tags:
|
|
18
18
|
- troubleshooting
|
|
19
19
|
- observations
|
|
20
20
|
- polling
|
|
21
|
-
-
|
|
21
|
+
- activity-scan
|
|
22
22
|
status: stable
|
|
23
23
|
ask_examples:
|
|
24
24
|
- Why didn't the agent notice my new commit?
|
|
25
25
|
- Why didn't a calendar change show up?
|
|
26
|
-
- Why is the
|
|
26
|
+
- Why is the activity scan empty?
|
|
27
27
|
locale: en-US
|
|
28
28
|
created: 2026-04-25
|
|
29
|
-
updated: 2026-
|
|
29
|
+
updated: 2026-06-10
|
|
30
30
|
keywords:
|
|
31
31
|
- observation
|
|
32
32
|
- polling
|
|
33
33
|
- observer
|
|
34
34
|
- AgentWriteTracker
|
|
35
|
-
-
|
|
35
|
+
- activity scan
|
|
36
36
|
related:
|
|
37
37
|
- concepts/observations
|
|
38
|
-
- features/routines/
|
|
38
|
+
- features/routines/activity-scan
|
|
39
39
|
- features/integrations/git
|
|
40
40
|
- features/integrations/obsidian
|
|
41
41
|
config_keys:
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
42
|
+
- activityScanMinObservations
|
|
43
|
+
- activityScanEnabled
|
|
44
|
+
- activityScanIntervalMinutes
|
|
45
45
|
process_keys:
|
|
46
|
-
- routine.
|
|
46
|
+
- routine.activity_scan
|
|
47
47
|
ui_anchors:
|
|
48
48
|
- /connections/repositories
|
|
49
49
|
- /connections/calendar
|
|
50
|
-
- /
|
|
50
|
+
- /agents/activity-scan
|
|
51
51
|
context_files:
|
|
52
52
|
- state/today.md
|
|
53
53
|
---
|
|
@@ -55,24 +55,24 @@ context_files:
|
|
|
55
55
|
# Observation Not Detected
|
|
56
56
|
|
|
57
57
|
You made a change by hand — a commit, an Obsidian note, a calendar move — and
|
|
58
|
-
expected the agent to notice it on the next
|
|
58
|
+
expected the agent to notice it on the next activity scan. It didn't.
|
|
59
59
|
|
|
60
60
|
This is almost always one of four things: the poller hasn't run yet, the
|
|
61
61
|
source isn't being watched, the agent itself made the change (so it was
|
|
62
|
-
filtered out), or there weren't enough observations to clear the
|
|
62
|
+
filtered out), or there weren't enough observations to clear the activity-scan
|
|
63
63
|
gate. Work through them in that order.
|
|
64
64
|
|
|
65
65
|
## How detection actually works
|
|
66
66
|
|
|
67
67
|
Observers (Obsidian, Git, Notion, Calendar) do **not** fire an event per
|
|
68
68
|
change. They poll on a cadence and call `recordObservation(...)`, which
|
|
69
|
-
appends a row to the `observations` table. The
|
|
69
|
+
appends a row to the `observations` table. The activity scan later reads those
|
|
70
70
|
rows in a single batch. So a "missing" observation is usually a row that was
|
|
71
71
|
never written, or one that was written but filtered.
|
|
72
72
|
|
|
73
73
|
`AgentWriteTracker` tags every change as `actor='agent'` or `actor='user'`.
|
|
74
74
|
Changes the agent itself wrote are tagged `actor='agent'` and skipped by the
|
|
75
|
-
|
|
75
|
+
activity scan — this is the deliberate anti-loop filter that stops the agent
|
|
76
76
|
from observing its own output.
|
|
77
77
|
|
|
78
78
|
## Most likely causes
|
|
@@ -84,9 +84,10 @@ from observing its own output.
|
|
|
84
84
|
was never connected, nothing polls it.
|
|
85
85
|
3. **The change was tagged `actor='agent'`.** If the agent (not you) authored
|
|
86
86
|
the commit or note, the anti-loop filter drops it.
|
|
87
|
-
4. **It was below the gate threshold.** The
|
|
88
|
-
pass when at least
|
|
89
|
-
|
|
87
|
+
4. **It was below the gate threshold.** The activity scan only runs its full
|
|
88
|
+
pass when at least the activity-scan agent's **min observations**
|
|
89
|
+
threshold (default `1`; legacy key `activityScanMinObservations`) of
|
|
90
|
+
pending observations exists. A single low-signal change can be held back.
|
|
90
91
|
|
|
91
92
|
## Diagnostic steps
|
|
92
93
|
|
|
@@ -101,21 +102,22 @@ from observing its own output.
|
|
|
101
102
|
3. **Rule out the agent-authored filter.** If the commit or note was written
|
|
102
103
|
by the agent, that's expected — it's filtered by design. Look for a change
|
|
103
104
|
*you* made by hand to test detection.
|
|
104
|
-
4. **Lower the gate threshold to test.** Temporarily set
|
|
105
|
-
|
|
105
|
+
4. **Lower the gate threshold to test.** Temporarily set **Min
|
|
106
|
+
observations** to `1` (its default) on the activity-scan agent's page
|
|
107
|
+
(`/agents/activity-scan`, Definition tab → Cadence card)
|
|
106
108
|
so even a single observation triggers the check, then make a manual change
|
|
107
|
-
and wait for the next
|
|
109
|
+
and wait for the next activity-scan run.
|
|
108
110
|
|
|
109
111
|
## Confirming the fix
|
|
110
112
|
|
|
111
113
|
After the next poll runs, a manual change you made should record an
|
|
112
|
-
observation and surface in the next
|
|
114
|
+
observation and surface in the next activity scan. You can cross-check recent
|
|
113
115
|
agent activity from the CLI with `aitne audit`, which reads the `agent_actions`
|
|
114
116
|
log read-only.
|
|
115
117
|
|
|
116
118
|
## Related
|
|
117
119
|
|
|
118
120
|
- [Observations](../concepts/observations.md) — what gets recorded and why
|
|
119
|
-
- [
|
|
121
|
+
- [Activity Scan](../features/routines/activity-scan.md) — the gate and its thresholds
|
|
120
122
|
- [Git integration](../features/integrations/git.md)
|
|
121
123
|
- [Obsidian integration](../features/integrations/obsidian.md)
|
|
@@ -25,7 +25,7 @@ ask_examples:
|
|
|
25
25
|
- How do I retry the write-strategy probe?
|
|
26
26
|
locale: en-US
|
|
27
27
|
created: 2026-05-12
|
|
28
|
-
updated: 2026-
|
|
28
|
+
updated: 2026-06-11
|
|
29
29
|
keywords:
|
|
30
30
|
- wiki write failed
|
|
31
31
|
- wiki API failure
|
|
@@ -36,7 +36,7 @@ api_endpoints:
|
|
|
36
36
|
- /api/wiki/:workspace/health
|
|
37
37
|
ui_anchors:
|
|
38
38
|
- /settings/wiki
|
|
39
|
-
- /connections/
|
|
39
|
+
- /connections/notes
|
|
40
40
|
related:
|
|
41
41
|
- features/wiki/overview
|
|
42
42
|
- guides/use-an-existing-obsidian-vault
|
|
@@ -84,7 +84,7 @@ If any of these is missing, the daemon surfaces a structured error:
|
|
|
84
84
|
|
|
85
85
|
| Error code | Meaning | Fix |
|
|
86
86
|
|---|---|---|
|
|
87
|
-
| `EWIKI_CLI_UNAVAILABLE` | Aitne's `ObsidianService` is not configured (the `obsidian` binary is not resolvable on `PATH`). | Open **Connections →
|
|
87
|
+
| `EWIKI_CLI_UNAVAILABLE` | Aitne's `ObsidianService` is not configured (the `obsidian` binary is not resolvable on `PATH`). | Open **Connections → Notes** and connect Obsidian via the Obsidian card, then confirm Obsidian 1.12+ is installed with the CLI enabled. |
|
|
88
88
|
| `EWIKI_CLI_NOT_RUNNING` | The CLI is configured but the Obsidian app is not running, so it cannot reach the sandboxed vault. | Launch the Obsidian app and retry. |
|
|
89
89
|
|
|
90
90
|
## Force a Re-Probe
|
|
@@ -90,6 +90,12 @@ Fields:
|
|
|
90
90
|
fires. Only shapes that map are actually run: minute a single value; hour a
|
|
91
91
|
single value or `*` / `*/N`. Pick one explicit, mappable cadence.
|
|
92
92
|
- **`schedule.timezone`** — IANA zone; omit to inherit the daemon default.
|
|
93
|
+
- **`schedule.defer_in_quiet_hours`** — boolean, default `false`. When `true`, a
|
|
94
|
+
firing that lands inside the user's quiet hours is pushed to the window's end
|
|
95
|
+
instead of running — the whole run moves, so the data is fresh at delivery
|
|
96
|
+
time. Mechanical rule: **set `true` whenever the Expected output includes
|
|
97
|
+
DMing the user**; leave it `false` for silent file-writing work deliberately
|
|
98
|
+
scheduled overnight.
|
|
93
99
|
- **`backend`** — optional. `tier` is `lite`/`medium`/`high` (cost/capability knob;
|
|
94
100
|
the standalone control that works). `process_key` defaults to `agent.task`;
|
|
95
101
|
omit unless you know you need another. (Pinning a backend *engine* without a
|
|
@@ -137,6 +143,11 @@ Each morning, surface inbox items that need the user's decision today.
|
|
|
137
143
|
**Bad prompt:** `"Triage my inbox."` — no requirements, no steps, no output
|
|
138
144
|
contract; the Agent will improvise differently every day.
|
|
139
145
|
|
|
146
|
+
The Expected-output decision feeds one schedule field: if the output contract
|
|
147
|
+
includes DMing the user, also set `schedule.defer_in_quiet_hours: true` so a
|
|
148
|
+
firing inside quiet hours waits for the window's end instead of producing a
|
|
149
|
+
message that would be held anyway.
|
|
150
|
+
|
|
140
151
|
## Responses & errors
|
|
141
152
|
|
|
142
153
|
- `201 { "status": "created", "slug": "…" }` — the Agent is live; its recurring
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: background-task
|
|
3
|
+
description: Hand a long-running or open-ended task (deep research, multi-repo CI audit, monitor X over time, bulk compile) to /api/background-task. Compose a self-contained brief, set the notification policy, POST, ack, end the turn. Read GET /:id for follow-up detail.
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Bash(curl *)
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Background Task — long-running work from DM
|
|
9
|
+
|
|
10
|
+
A detached worker runs the task in its own session with its own budget.
|
|
11
|
+
**The daemon delivers the result to the user directly — in your own voice —
|
|
12
|
+
when it finishes or needs input. You are NOT in that delivery path.** Your
|
|
13
|
+
job is the front bookend only: scope the task *now*, compose a
|
|
14
|
+
self-contained **brief**, choose a notification policy, POST it,
|
|
15
|
+
acknowledge in one line, and **end your turn**. The worker's run is
|
|
16
|
+
invisible to you.
|
|
17
|
+
|
|
18
|
+
This is the surface for *generic* long tasks. For an open-ended **browser**
|
|
19
|
+
job (post a tweet, fill a form) use the `browser-task` skill. For a
|
|
20
|
+
*recurring* cadence ("every morning…", "each hour check my PRs") use
|
|
21
|
+
`agent-create` / `schedule` — a background task is a single detached run.
|
|
22
|
+
|
|
23
|
+
## When to background it (triage)
|
|
24
|
+
|
|
25
|
+
Background work that is **long-running or open-ended** so the user can keep
|
|
26
|
+
chatting. No duration guess — decide on the signals:
|
|
27
|
+
|
|
28
|
+
1. **Category** — deep research, a multi-repo / multi-file audit,
|
|
29
|
+
"monitor / watch X", a multi-step web dig, a bulk compile. Strongest
|
|
30
|
+
signal.
|
|
31
|
+
2. **Owner signal** — explicit ("take your time", "report back later") or a
|
|
32
|
+
research-style bang command.
|
|
33
|
+
3. **Scoping reveals size** — if resolving the request shows large or
|
|
34
|
+
genuinely open-ended work, delegate it.
|
|
35
|
+
|
|
36
|
+
**Bias toward backgrounding category-1 work; keep plausibly-quick lookups
|
|
37
|
+
inline** (delivery costs a turn's latency). One task per request: "research
|
|
38
|
+
X AND audit Y" → two POSTs.
|
|
39
|
+
|
|
40
|
+
## Compose the brief — this is the real work
|
|
41
|
+
|
|
42
|
+
The worker sees ONLY your `brief` (it does not inherit the conversation,
|
|
43
|
+
the user profile, or the management rules). An under-specified brief forces
|
|
44
|
+
a clarification round-trip you can avoid by writing it well *this turn*.
|
|
45
|
+
Resolve ambiguity with the user now, then encode all of:
|
|
46
|
+
|
|
47
|
+
- **Objective** — the end state as an outcome ("find which repos have a red
|
|
48
|
+
main build", not "go look at repos").
|
|
49
|
+
- **Scope & inputs** — the concrete inputs the worker can't infer: the repo
|
|
50
|
+
list, what "failing" means, which sites, the date range.
|
|
51
|
+
- **Output language** — the user's language for `result`, `draft`, and any
|
|
52
|
+
clarification.
|
|
53
|
+
- **Persona hints** — a line on the user's voice so the `draft` summary
|
|
54
|
+
reads right if it's sent directly.
|
|
55
|
+
- **Notification policy + criteria** — see below; for `if_significant` the
|
|
56
|
+
criteria MUST be written into the brief in concrete terms.
|
|
57
|
+
- **Expected output** — what a good `result` contains (a per-repo table, a
|
|
58
|
+
ranked list, a one-paragraph verdict).
|
|
59
|
+
|
|
60
|
+
The worker can read owner memory itself to fill in preferences, so you need
|
|
61
|
+
only supply the *task-specific* inputs above. **Promoting an inline task?**
|
|
62
|
+
Also fold in the work you already did (findings, partial results) so the
|
|
63
|
+
worker continues rather than restarting cold.
|
|
64
|
+
|
|
65
|
+
## Notification policy — you author it
|
|
66
|
+
|
|
67
|
+
`notificationPolicy` decides whether the worker's result reaches the user.
|
|
68
|
+
The worker doesn't free-judge; it evaluates the policy you set:
|
|
69
|
+
|
|
70
|
+
- **`always`** (default) — the user asked and wants the answer, even
|
|
71
|
+
"nothing found / 0 issues". The common case; always delivered.
|
|
72
|
+
- **`if_significant`** — delivered **only if** the concrete criteria are
|
|
73
|
+
met. Prefer the structured **`significanceCriteria`** array (below) over
|
|
74
|
+
prose; vague criteria defeat the policy.
|
|
75
|
+
- **`silent`** — never delivered; filed only.
|
|
76
|
+
|
|
77
|
+
A filed (`silent` / unmet-`if_significant`) result is not lost — it surfaces
|
|
78
|
+
in the daily digest and the user can pull it (see "Filed results" below).
|
|
79
|
+
|
|
80
|
+
## Endpoints (localhost only)
|
|
81
|
+
|
|
82
|
+
| Method | Path | Purpose |
|
|
83
|
+
|---|---|---|
|
|
84
|
+
| POST | `/api/background-task` | Create + dispatch, or schedule (`scheduleAt`). |
|
|
85
|
+
| GET | `/api/background-task?state=...` | List (also `notify`, `sinceHours` for the filed pull). |
|
|
86
|
+
| GET | `/api/background-task/:id` | The artifact — verbatim `report`, `draft`, `notify`, clarifications. |
|
|
87
|
+
| POST | `/api/background-task/:id/cancel` | Force-stop. |
|
|
88
|
+
|
|
89
|
+
Clarifications are answered with the **`background-task-reply`** skill.
|
|
90
|
+
|
|
91
|
+
## Hard rules
|
|
92
|
+
|
|
93
|
+
1. **Localhost only.** `http://127.0.0.1:8321/api/background-task/*`.
|
|
94
|
+
2. **POST, ack, end the turn. NEVER poll for completion.** After a
|
|
95
|
+
successful POST, reply once and stop. Do NOT GET `/:id` in a loop or
|
|
96
|
+
"wait and check". Ending your turn has zero effect on the detached
|
|
97
|
+
worker — it keeps running and the daemon delivers the result as a DM in
|
|
98
|
+
your voice. The only allowed GET is a single on-demand read answering an
|
|
99
|
+
explicit user question (see "Follow-up detail").
|
|
100
|
+
3. **Never invent `taskId` / `clarificationId`** — uuid v4 minted by the
|
|
101
|
+
daemon; read them from responses.
|
|
102
|
+
4. **The worker has no messaging tool** — it cannot DM the user; it writes
|
|
103
|
+
its artifact and *you* (the daemon, in your voice) deliver.
|
|
104
|
+
5. **One task per request.**
|
|
105
|
+
|
|
106
|
+
## POST — composing a request
|
|
107
|
+
|
|
108
|
+
`POST /api/background-task` with the self-contained brief:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
curl --silent --fail -X POST -H 'Content-Type: application/json' \
|
|
112
|
+
-d '{"brief":"Audit these repos for a red main-branch CI build: aitne/daemon, aitne/web. \"Failing\" = the latest default-branch run concluded failure. Summary in English. Only notify if at least one repo is red. Output: one line per failing repo with the job.","title":"CI audit","notificationPolicy":"if_significant"}' \
|
|
113
|
+
http://127.0.0.1:8321/api/background-task
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Body:
|
|
117
|
+
|
|
118
|
+
- `brief` (1..16384) — the self-contained worker prompt above.
|
|
119
|
+
- `title` (1..200, optional) — short human label for status + the DM.
|
|
120
|
+
- `notificationPolicy` — `always` (default) / `if_significant` / `silent`.
|
|
121
|
+
- `significanceCriteria` (optional, `if_significant` only) — up to 12
|
|
122
|
+
atomic conditions (each ≤500 chars), e.g. `["any repo's main build is
|
|
123
|
+
red","spend > $100"]`. Worker notifies iff one is met. Omit otherwise.
|
|
124
|
+
- `tier` (optional) — `lite` / `medium` / `high` budget envelope. Default
|
|
125
|
+
is fine; use `high` only for genuinely heavy research.
|
|
126
|
+
- `maxBudgetUsd` (optional) — override the dollar cap (hard ceiling `15`;
|
|
127
|
+
a larger value is rejected `400`). Prefer `tier` over a raw dollar value.
|
|
128
|
+
- `scheduleAt` (ISO 8601, optional) — defer the *run* to a fire time (the
|
|
129
|
+
worker starts then; it is compute, so it runs even during quiet hours).
|
|
130
|
+
The eventual *result delivery* is what respects quiet hours, not the run.
|
|
131
|
+
`202` with `{ taskId, status:"scheduled", scheduledFor, scheduleRowId }`.
|
|
132
|
+
A time more than 60s in the past is rejected `400`.
|
|
133
|
+
|
|
134
|
+
Immediate response carries `taskId` and `status`. Then ack once and stop
|
|
135
|
+
(Hard rule 2).
|
|
136
|
+
|
|
137
|
+
## Acknowledgement
|
|
138
|
+
|
|
139
|
+
One line, no ceremony, no internal mechanism names (`taskId`, "worker",
|
|
140
|
+
"artifact"); your output language is already governed by your policy.
|
|
141
|
+
Structural examples (English): *"Started the audit in the background — I'll
|
|
142
|
+
report when it's done."* / *"On it. I'll dig into that and come back with
|
|
143
|
+
what I find."* Do NOT promise a specific time; say "when it's done".
|
|
144
|
+
|
|
145
|
+
## Follow-up detail — answer from the artifact, don't guess
|
|
146
|
+
|
|
147
|
+
The delivered DM carries a *summary*. When the user later asks for precise
|
|
148
|
+
detail it didn't include ("what exactly did it find on repo X?", "show me
|
|
149
|
+
the numbers"), do a **single** read and answer from the verbatim `report`:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
curl --silent --fail http://127.0.0.1:8321/api/background-task/<taskId>
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
`report` is the full, unparaphrased result. Quote from it; don't invent
|
|
156
|
+
detail. If you lack the `taskId`, list `state=completed` and match by
|
|
157
|
+
`title`.
|
|
158
|
+
|
|
159
|
+
## Filed results — the "did that monitor ever run?" pull
|
|
160
|
+
|
|
161
|
+
A `silent` / unmet-`if_significant` result is filed (`notify=false`), not
|
|
162
|
+
pushed. When the user asks whether a backgrounded task ran:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
curl --silent --fail "http://127.0.0.1:8321/api/background-task?state=completed¬ify=false&sinceHours=168"
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Each row carries `title`, `significance`, and `report`. Summarize
|
|
169
|
+
naturally; offer to pull any in full.
|
|
170
|
+
|
|
171
|
+
## Force-stop — "stop" / "cancel" / "abort"
|
|
172
|
+
|
|
173
|
+
On a clear stop signal, find the task (by `taskId`, or list
|
|
174
|
+
`state=running,awaiting_user,pending` and match the topic), then
|
|
175
|
+
`POST /api/background-task/<taskId>/cancel` with optional
|
|
176
|
+
`{"reason":"user_cancel"}`. `200` = accepted; `404 not_found` = stale id,
|
|
177
|
+
re-read; `409 already_terminal` = too late, report `currentState`
|
|
178
|
+
verbatim. "wait" is NOT a cancel.
|
|
179
|
+
|
|
180
|
+
## Scheduling — `scheduleAt` ≠ the `schedule` skill
|
|
181
|
+
|
|
182
|
+
For "do this research at <time>" use `scheduleAt` in this POST. The
|
|
183
|
+
`schedule` skill is for listing / modifying / cancelling pending schedules;
|
|
184
|
+
a recurring cadence is `agent-create`.
|