@aitne-sh/aitne 0.1.12 → 0.1.13

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 (139) hide show
  1. package/agent-assets/agent-profiles/background-task.md +8 -1
  2. package/agent-assets/agent-profiles/routine-fetch-window.md +11 -0
  3. package/agent-assets/agents/evening-review/agent.md +6 -2
  4. package/agent-assets/agents/lesson-maintenance/agent.md +56 -0
  5. package/agent-assets/agents/morning-routine/agent.md +7 -2
  6. package/agent-assets/agents/source-librarian/agent.md +51 -0
  7. package/agent-assets/docs/concepts/agent-day.md +15 -15
  8. package/agent-assets/docs/concepts/auth-health.md +10 -7
  9. package/agent-assets/docs/concepts/backends-and-tiers.md +21 -13
  10. package/agent-assets/docs/concepts/costs-and-quotas.md +10 -10
  11. package/agent-assets/docs/concepts/delegated-mode.md +18 -18
  12. package/agent-assets/docs/concepts/memory-model.md +25 -24
  13. package/agent-assets/docs/concepts/observations.md +27 -19
  14. package/agent-assets/docs/concepts/process-keys.md +25 -26
  15. package/agent-assets/docs/concepts/routines.md +18 -17
  16. package/agent-assets/docs/concepts/safety-and-execution.md +20 -17
  17. package/agent-assets/docs/concepts/safety-model.md +16 -15
  18. package/agent-assets/docs/concepts/skills.md +7 -4
  19. package/agent-assets/docs/features/integrations/browser-history.md +52 -47
  20. package/agent-assets/docs/features/integrations/calendar.md +7 -7
  21. package/agent-assets/docs/features/integrations/git.md +15 -13
  22. package/agent-assets/docs/features/integrations/github.md +12 -10
  23. package/agent-assets/docs/features/integrations/mail.md +47 -45
  24. package/agent-assets/docs/features/integrations/notion.md +15 -11
  25. package/agent-assets/docs/features/integrations/obsidian.md +27 -23
  26. package/agent-assets/docs/features/lifestyle/git.md +7 -8
  27. package/agent-assets/docs/features/lifestyle/reading.md +11 -8
  28. package/agent-assets/docs/features/lifestyle/receipts.md +21 -22
  29. package/agent-assets/docs/features/lifestyle/travel-bookings.md +9 -9
  30. package/agent-assets/docs/features/memory-files/agent-journal.md +12 -10
  31. package/agent-assets/docs/features/memory-files/agent-lessons.md +46 -21
  32. package/agent-assets/docs/features/memory-files/projects.md +13 -14
  33. package/agent-assets/docs/features/memory-files/roadmap.md +16 -15
  34. package/agent-assets/docs/features/memory-files/schedule.md +10 -10
  35. package/agent-assets/docs/features/memory-files/today.md +18 -18
  36. package/agent-assets/docs/features/memory-files/user-profile.md +17 -17
  37. package/agent-assets/docs/features/messaging/bang-commands.md +15 -15
  38. package/agent-assets/docs/features/messaging/dashboard-chat.md +7 -6
  39. package/agent-assets/docs/features/messaging/discord.md +7 -5
  40. package/agent-assets/docs/features/messaging/overview.md +14 -14
  41. package/agent-assets/docs/features/messaging/pairing-and-magic-phrase.md +12 -12
  42. package/agent-assets/docs/features/messaging/slack.md +9 -8
  43. package/agent-assets/docs/features/messaging/telegram.md +7 -7
  44. package/agent-assets/docs/features/messaging/whatsapp.md +6 -6
  45. package/agent-assets/docs/features/operations/activity-and-conversations.md +9 -9
  46. package/agent-assets/docs/features/operations/approvals.md +13 -12
  47. package/agent-assets/docs/features/operations/backend-routing.md +38 -37
  48. package/agent-assets/docs/features/operations/browser-tasks.md +63 -57
  49. package/agent-assets/docs/features/operations/cost-tracking.md +5 -5
  50. package/agent-assets/docs/features/operations/managed-chromium.md +23 -22
  51. package/agent-assets/docs/features/operations/notifications.md +15 -15
  52. package/agent-assets/docs/features/operations/quiet-hours.md +14 -15
  53. package/agent-assets/docs/features/operations/schedule-approaching.md +16 -14
  54. package/agent-assets/docs/features/routines/activity-scan.md +14 -11
  55. package/agent-assets/docs/features/routines/custom-routines.md +9 -7
  56. package/agent-assets/docs/features/routines/evening-review.md +6 -7
  57. package/agent-assets/docs/features/routines/morning-routine.md +22 -21
  58. package/agent-assets/docs/features/routines/weekly-review.md +57 -51
  59. package/agent-assets/docs/features/wiki/commands.md +27 -21
  60. package/agent-assets/docs/features/wiki/cost-and-approval.md +28 -23
  61. package/agent-assets/docs/features/wiki/dashboard.md +21 -23
  62. package/agent-assets/docs/features/wiki/overview.md +17 -25
  63. package/agent-assets/docs/features/wiki/search.md +15 -17
  64. package/agent-assets/docs/features/wiki/workspaces.md +55 -56
  65. package/agent-assets/docs/getting-started/01-what-is-this.md +3 -4
  66. package/agent-assets/docs/getting-started/02-first-steps.md +12 -13
  67. package/agent-assets/docs/getting-started/03-what-can-this-do.md +7 -7
  68. package/agent-assets/docs/getting-started/04-first-day.md +4 -5
  69. package/agent-assets/docs/glossary.md +17 -16
  70. package/agent-assets/docs/guides/add-a-custom-routine.md +17 -12
  71. package/agent-assets/docs/guides/backup-and-restore.md +19 -16
  72. package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +55 -62
  73. package/agent-assets/docs/guides/build-your-wiki.md +11 -12
  74. package/agent-assets/docs/guides/change-which-model-handles-x.md +30 -28
  75. package/agent-assets/docs/guides/connect-a-new-mail-account.md +30 -29
  76. package/agent-assets/docs/guides/explore-with-trace-and-connect.md +30 -32
  77. package/agent-assets/docs/guides/import-knowledge-file.md +9 -10
  78. package/agent-assets/docs/guides/install-and-run.md +9 -10
  79. package/agent-assets/docs/guides/maintain-wiki-health.md +10 -10
  80. package/agent-assets/docs/guides/migrate-machines.md +16 -14
  81. package/agent-assets/docs/guides/multiple-wikis-for-multiple-domains.md +11 -12
  82. package/agent-assets/docs/guides/pause-the-agent.md +25 -25
  83. package/agent-assets/docs/guides/reinstall-cleanly.md +13 -12
  84. package/agent-assets/docs/guides/setup-wizard.md +9 -11
  85. package/agent-assets/docs/guides/switch-default-backend.md +9 -9
  86. package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +9 -11
  87. package/agent-assets/docs/pages/activity.md +76 -0
  88. package/agent-assets/docs/pages/agents.md +78 -0
  89. package/agent-assets/docs/pages/analytics.md +70 -0
  90. package/agent-assets/docs/pages/browser.md +73 -0
  91. package/agent-assets/docs/pages/chat.md +67 -0
  92. package/agent-assets/docs/pages/connections.md +78 -0
  93. package/agent-assets/docs/pages/git.md +73 -0
  94. package/agent-assets/docs/pages/knowledge.md +75 -0
  95. package/agent-assets/docs/pages/overview.md +90 -0
  96. package/agent-assets/docs/pages/reading.md +65 -0
  97. package/agent-assets/docs/pages/settings.md +77 -0
  98. package/agent-assets/docs/pages/tasks.md +74 -0
  99. package/agent-assets/docs/pages/wiki.md +73 -0
  100. package/agent-assets/docs/reference/api.md +18 -17
  101. package/agent-assets/docs/reference/cli-commands.md +13 -10
  102. package/agent-assets/docs/reference/config.md +40 -35
  103. package/agent-assets/docs/reference/disallowed-tools.md +18 -17
  104. package/agent-assets/docs/reference/keyboard-shortcuts.md +6 -8
  105. package/agent-assets/docs/reference/knowledge-layout.md +10 -10
  106. package/agent-assets/docs/reference/process-keys.md +20 -22
  107. package/agent-assets/docs/reference/skills.md +18 -16
  108. package/agent-assets/docs/troubleshooting/auth-failed.md +13 -11
  109. package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +10 -10
  110. package/agent-assets/docs/troubleshooting/fallback-keeps-firing.md +26 -24
  111. package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +8 -9
  112. package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +19 -18
  113. package/agent-assets/docs/troubleshooting/observation-not-detected.md +14 -15
  114. package/agent-assets/docs/troubleshooting/quota-exhausted.md +28 -26
  115. package/agent-assets/docs/troubleshooting/wiki-ingest-full-blocked.md +35 -34
  116. package/agent-assets/docs/troubleshooting/wiki-write-failed.md +21 -24
  117. package/agent-assets/skills/agent-create/SKILL.md +39 -5
  118. package/agent-assets/skills/background-task/SKILL.md +9 -4
  119. package/agent-assets/skills/board/SKILL.md +8 -9
  120. package/agent-assets/skills/browser-task/SKILL.md +2 -0
  121. package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +2 -1
  122. package/agent-assets/skills/schedule/SKILL.md +6 -5
  123. package/agent-assets/skills/sources/SKILL.md +68 -0
  124. package/agent-assets/skills/sources/curation.json +21 -0
  125. package/agent-assets/skills/sources/seeds/filing-rules.seed.json +25 -0
  126. package/agent-assets/skills/sources/seeds/source-collections.seed.json +20 -0
  127. package/agent-assets/skills/task/SKILL.md +5 -2
  128. package/agent-assets/task-flows/background_task.md +29 -3
  129. package/agent-assets/task-flows/message.received.dm.md +1 -1
  130. package/agent-assets/task-flows/routine.activity_scan.md +17 -2
  131. package/agent-assets/task-flows/routine.evening_review.md +72 -11
  132. package/agent-assets/task-flows/routine.fetch_window.md +21 -0
  133. package/agent-assets/task-flows/routine.monthly_review.md +3 -1
  134. package/agent-assets/task-flows/routine.morning_routine_today.md +26 -7
  135. package/agent-assets/task-flows/routine.source_maintenance.md +50 -0
  136. package/agent-assets/task-flows/scheduled.dm.md +8 -3
  137. package/agent-assets/templates/_manifest.json +1 -0
  138. package/agent-assets/templates/knowledge/sources/_index.md +19 -0
  139. package/package.json +4 -4
@@ -11,7 +11,7 @@ hand back a faithful artifact; the main DM agent delivers it.
11
11
 
12
12
  - **You produce raw material, not a message.** You have no messaging
13
13
  tool. Your only owner-facing output is `finish(result, draft, notify,
14
- significance?)`. The verbatim `result` is the fidelity anchor; the
14
+ verification, significance?)`. The verbatim `result` is the fidelity anchor; the
15
15
  `draft` is a plain summary the DM agent weaves into the conversation in
16
16
  its own voice. Never try to phrase a "✅ done!" message yourself.
17
17
 
@@ -41,6 +41,13 @@ hand back a faithful artifact; the main DM agent delivers it.
41
41
  reasonable, explicitly-stated assumption. If you must, `ask_user` ONCE
42
42
  with a sharp question and then stop the turn.
43
43
 
44
+ - **Verify before you finish.** `finish` requires a
45
+ requirement-by-requirement `verification` checklist derived from the
46
+ brief's expected output, each item judged against your actual result
47
+ with concrete evidence. Never claim completion your evidence doesn't
48
+ support — an unmet requirement is disclosed automatically; a false
49
+ "met" is a lie the owner will act on.
50
+
44
51
  - **Finish cleanly, exactly once.** `finish` ends your session. Make the
45
52
  `result` complete (every number, URL, id) and the `draft` short and
46
53
  lead-with-the-answer.
@@ -79,6 +79,17 @@ return the same result shape:
79
79
  `routine.fetch_window`. If you hit the cap, record what's left as
80
80
  `{"type":"budget-exhausted","remaining":[…]}` in `errors`.
81
81
 
82
+ ## Turn efficiency
83
+
84
+ This run is turn-capped; a run that overruns the cap is killed mid-fetch.
85
+ Minimise round-trips — every model turn is one:
86
+ - Load every deferred connector schema in ONE `ToolSearch` call (a
87
+ comma-separated `select:` list) — never one `ToolSearch` per tool.
88
+ - Emit independent `<fetch>` rows' read calls in the SAME turn; they don't
89
+ depend on each other.
90
+ - Never call per-item detail tools (`get_thread`, `get_event`, …) — the
91
+ list response already carries the compact subset you submit.
92
+
82
93
  ## Output format
83
94
 
84
95
  Print exactly one JSON line on stdout, then terminate:
@@ -20,9 +20,13 @@ backend:
20
20
  model: null
21
21
 
22
22
  # ── Limits (per execution) ───────────────────────────────────────────────────
23
+ # Mirrors the runtime envelope (plan-presets / process_backend_config seed:
24
+ # routine.evening_review is 50 / $2.00). These values prefill the dashboard
25
+ # Definition form; a stale lower number saved there would clamp the real runs
26
+ # via override_snapshot, so keep them in step with the seed authority.
23
27
  limits:
24
- max_turns: 25
25
- max_budget_usd: 0.50
28
+ max_turns: 50
29
+ max_budget_usd: 2.00
26
30
  timeout_minutes: 12
27
31
 
28
32
  # ── Expected outputs ─────────────────────────────────────────────────────────
@@ -0,0 +1,56 @@
1
+ ---
2
+ # ── Identity ─────────────────────────────────────────────────────────────────
3
+ slug: lesson-maintenance
4
+ name: Lesson Maintenance
5
+ description: "Mechanical (no-LLM) lesson-store upkeep — confidence (cf) re-stamping and the graduated demote/archive/re-promote lifecycle — before the evening review."
6
+ kind: builtin
7
+ version: 1
8
+ enabled: true
9
+ tags: [routine, daily, lessons, feedback, no-llm]
10
+
11
+ # ── Schedule (17:40 — before the 17:45 roadmap pass and 18:00 Evening Review) ─
12
+ schedule:
13
+ kind: cron
14
+ expression: "40 17 * * *"
15
+
16
+ # ── Backend / routing ────────────────────────────────────────────────────────
17
+ # `process_key: null` — this is a no-LLM in-process pass with no backend-routing
18
+ # key (§5.5.1). Reserved for built-ins; the schema rejects a null key for user
19
+ # Agents.
20
+ backend:
21
+ process_key: null
22
+ tier: null
23
+ model: null
24
+
25
+ # ── Limits (no LLM turn — zero budget; `max_turns` must be ≥ 1 per schema) ──
26
+ limits:
27
+ max_turns: 1
28
+ max_budget_usd: 0
29
+ timeout_minutes: 5
30
+
31
+ # ── Expected outputs ─────────────────────────────────────────────────────────
32
+ outputs:
33
+ - policies/agent-lessons.md
34
+
35
+ success_criteria: []
36
+
37
+ # ── Stop warning (byte-identical to BUILTIN_AGENT_REGISTRY, §12.1) ──────────
38
+ stop_warning:
39
+ level: normal
40
+ services_lost:
41
+ - "Mechanical lesson-store maintenance (confidence re-stamping, graduated demote/archive/re-promote lifecycle)"
42
+ dependent_agents:
43
+ - evening-review
44
+ reactivation_hint: "Re-enable from /agents/lesson-maintenance. Runs daily at 17:40, before Evening Review."
45
+ ---
46
+
47
+ # Lesson Maintenance
48
+
49
+ No-LLM in-process pass — there is no task-flow. Implemented by the daemon
50
+ callback `onLessonMaintenance` registered in `scheduler.ts`
51
+ (SELF_IMPROVEMENT_PHASE2 §2.1/§2.3): re-stamps each lesson's numeric
52
+ confidence (`cf=`) and enacts the graduated demote → archive → re-promote
53
+ lifecycle over `policies/agent-lessons.md` and every
54
+ `policies/agents/<slug>/lessons.md`, so expiration fires even on nights with
55
+ zero feedback signals and hand-edited files re-normalize. It runs at 17:40 so
56
+ the 18:00 Evening Review consolidation reads freshly-normalized stores.
@@ -28,9 +28,14 @@ backend:
28
28
  model: null
29
29
 
30
30
  # ── Limits (per execution) ───────────────────────────────────────────────────
31
+ # Mirrors the runtime envelope (plan-presets / process_backend_config seed:
32
+ # parent routine.morning_routine and Stage A routine.morning_routine_today are
33
+ # both 50 / $2.00). These values prefill the dashboard Definition form; a
34
+ # stale lower number saved there would clamp the real runs via
35
+ # override_snapshot, so keep them in step with the seed authority.
31
36
  limits:
32
- max_turns: 30
33
- max_budget_usd: 0.50
37
+ max_turns: 50
38
+ max_budget_usd: 2.00
34
39
  timeout_minutes: 15
35
40
 
36
41
  # ── Expected outputs (informational; drive the dashboard + criteria intent) ──
@@ -0,0 +1,51 @@
1
+ ---
2
+ # ── Identity ─────────────────────────────────────────────────────────────────
3
+ slug: source-librarian
4
+ name: Source Librarian
5
+ description: "Weekly triage of unfiled source documents into knowledge/sources/ cards, taxonomy upkeep, and library-vault consistency checks."
6
+ kind: builtin
7
+ version: 1
8
+ enabled: true
9
+ tags: [routine, weekly, sources, maintenance]
10
+
11
+ # ── Schedule (Saturday 09:00; scheduler adds a no-LLM nothing-to-do prefilter) ─
12
+ schedule:
13
+ kind: cron
14
+ expression: "0 9 * * 6"
15
+
16
+ # ── Backend / routing (tier/model deferred to process_backend_config) ───────
17
+ backend:
18
+ process_key: routine.source_maintenance
19
+ tier: null
20
+ model: null
21
+
22
+ # ── Limits (per execution) ───────────────────────────────────────────────────
23
+ limits:
24
+ max_turns: 50
25
+ max_budget_usd: 1.00
26
+ timeout_minutes: 20
27
+
28
+ # ── Expected outputs ─────────────────────────────────────────────────────────
29
+ # Cards are keyed on agent-chosen collection/slug paths, which the
30
+ # `{date}`-only success-criteria evaluator cannot target in v1, so they are
31
+ # documented here rather than asserted as criteria.
32
+ outputs:
33
+ - "knowledge/sources/<collection>/<slug>.md"
34
+ - knowledge/sources/_index.md
35
+
36
+ success_criteria: []
37
+
38
+ # ── Stop warning (byte-identical to BUILTIN_AGENT_REGISTRY, §12.1) ──────────
39
+ stop_warning:
40
+ level: normal
41
+ services_lost:
42
+ - "Weekly filing of unfiled source documents into knowledge/sources/"
43
+ - "Source library and vault consistency checks"
44
+ dependent_agents: []
45
+ reactivation_hint: "Re-enable from /agents/source-librarian. Resumes on the next Saturday 09:00 firing."
46
+ ---
47
+
48
+ # Source Librarian
49
+
50
+ Built-in routine — the execution prompt lives in the task-flow, not here.
51
+ See `agent-assets/task-flows/routine.source_maintenance.md`.
@@ -14,7 +14,6 @@ summary: |
14
14
  drives every routine schedule and date-stamped memory file.
15
15
  section: agent-day
16
16
  tags:
17
- - core
18
17
  - memory
19
18
  - routines
20
19
  - scheduler
@@ -26,7 +25,7 @@ ask_examples:
26
25
  - What is dayBoundaryHour?
27
26
  locale: en-US
28
27
  created: 2026-04-25
29
- updated: 2026-06-07
28
+ updated: 2026-07-01
30
29
  keywords:
31
30
  - day boundary
32
31
  - 04:00
@@ -49,23 +48,24 @@ config_keys:
49
48
 
50
49
  ## TL;DR
51
50
 
52
- Aitne treats the "day" as starting at **04:00 local time**, not
53
- 00:00. Anything you log between midnight and 4am is filed under the day
54
- that just ended, so a late commit at 02:30 lands in the same `state/today.md`
55
- that opened the previous morning.
51
+ Aitne starts each "day" at **04:00 local time**, not at 00:00. In other
52
+ words, the agent-day boundary (the moment "today" rolls over) sits at 4am
53
+ by default. Anything you do between midnight and 4am counts toward the day
54
+ that is just ending, so a late commit at 02:30 lands in the same
55
+ `state/today.md` that opened the previous morning.
56
56
 
57
57
  ## Why This Concept Exists
58
58
 
59
- Owner-as-user installations almost always have late-night work sessions
60
- that, mentally, belong to "today" even though the wall-clock has already
61
- ticked over. A day boundary at midnight would split a single coherent
62
- working session across two `state/today.md` files, and the morning routine
63
- would open against an empty schedule because no agent activity had been
64
- logged for the new calendar day yet.
59
+ Most people who run Aitne for themselves work late into the night. Those
60
+ sessions still feel like "today" to you, even after the clock has ticked
61
+ past midnight. A boundary at midnight would cut one continuous work session
62
+ in half, spreading it across two `state/today.md` files. It would also leave
63
+ the morning routine with nothing to open against: no agent activity has been
64
+ logged yet for the fresh calendar day.
65
65
 
66
- Picking 04:00 is a defensive default: late enough to capture even very
67
- late nights, early enough that an early-rising operator (5–6am) sees a
68
- clean boundary before they start.
66
+ 04:00 is a safe default. It is late enough to capture even very late nights,
67
+ yet early enough that an early riser (someone up at 5–6am) still starts the
68
+ day on the far side of a clean boundary.
69
69
 
70
70
  ## Definitions
71
71
 
@@ -16,7 +16,6 @@ summary: |
16
16
  recovery flows when the right signal is available.
17
17
  section: auth-health
18
18
  tags:
19
- - core
20
19
  - safety
21
20
  - backends
22
21
  - operations
@@ -29,7 +28,7 @@ ask_examples:
29
28
  - What is the SubscriptionAuthWarning banner?
30
29
  locale: en-US
31
30
  created: 2026-04-25
32
- updated: 2026-06-07
31
+ updated: 2026-07-01
33
32
  keywords:
34
33
  - auth
35
34
  - authentication
@@ -44,6 +43,7 @@ related:
44
43
  - concepts/backends-and-tiers
45
44
  - concepts/costs-and-quotas
46
45
  - troubleshooting/auth-failed
46
+ - troubleshooting/dashboard-shows-degraded
47
47
  ui_anchors:
48
48
  - /settings/models
49
49
  - /
@@ -68,14 +68,15 @@ red and surfaces a recovery hint.
68
68
 
69
69
  ## Why This Concept Exists
70
70
 
71
- Routines silently failing because of an expired token is the most
72
- common operator pain. The auth-health monitor is the proactive surface
73
- that surfaces "your credentials expired" before the next morning
74
- routine fails.
71
+ A routine that quietly fails because a token expired is the most
72
+ common operator headache. The auth-health monitor catches that early:
73
+ it tells you "your credentials expired" before the next morning
74
+ routine trips over the same problem.
75
75
 
76
76
  ## Definitions
77
77
 
78
- - **Probe**: a no-op call against each backend's auth surface. With
78
+ - **Probe**: a lightweight test call that checks each backend's login
79
+ without doing any real work. With
79
80
  a registered API key the probe hits the provider's lightweight
80
81
  `models` endpoint (Anthropic, OpenAI, Google) and verifies the key
81
82
  is live. Without an API key, the probe checks whatever local CLI
@@ -138,3 +139,5 @@ register a paid key and leave the gray area.
138
139
  quota signals interact.
139
140
  - [Troubleshooting: Auth Failed](../troubleshooting/auth-failed.md) —
140
141
  step-by-step recovery when a card goes red.
142
+ - [Dashboard Shows Degraded](../troubleshooting/dashboard-shows-degraded.md) —
143
+ what to do when the dashboard flags a backend as degraded.
@@ -13,13 +13,11 @@ aliases:
13
13
  category: concepts
14
14
  summary: |
15
15
  Aitne runs on four backends — Claude Code, Codex, Gemini CLI, OpenCode.
16
- Each backend exposes light, medium, and high model tiers; the dispatcher
16
+ Each backend exposes lite, medium, and high model tiers; the dispatcher
17
17
  picks the binding for every ProcessKey based on operator configuration.
18
18
  section: backends
19
19
  tags:
20
- - core
21
20
  - backends
22
- - models
23
21
  - cost
24
22
  - routing
25
23
  status: stable
@@ -31,7 +29,7 @@ ask_examples:
31
29
  - How does Aitne fail over when a backend hits its quota?
32
30
  locale: en-US
33
31
  created: 2026-04-25
34
- updated: 2026-06-07
32
+ updated: 2026-07-01
35
33
  keywords:
36
34
  - claude
37
35
  - codex
@@ -53,6 +51,9 @@ related:
53
51
  - concepts/process-keys
54
52
  - concepts/costs-and-quotas
55
53
  - features/operations/backend-routing
54
+ - concepts/auth-health
55
+ - troubleshooting/fallback-keeps-firing
56
+ - troubleshooting/quota-exhausted
56
57
  ui_anchors:
57
58
  - /settings/models
58
59
  - /analytics
@@ -114,9 +115,10 @@ What each tier is for:
114
115
  daemon-prepared `<roadmap_skeleton>` block instead of the retired
115
116
  heavy `routine.morning_routine_initial`.
116
117
 
117
- Every ProcessKey resolves to a backend + model binding via
118
- `BackendRouter`. Aitne **does not store or read subscription-plan
119
- state** there is no "Claude Pro / Max / Team" or "ChatGPT Plus /
118
+ Every [ProcessKey](process-keys.md) Aitne's internal name for one
119
+ kind of work, such as a morning routine or a Gmail classification —
120
+ resolves to a backend + model binding via `BackendRouter`. Aitne
121
+ **does not store or read subscription-plan state** — there is no "Claude Pro / Max / Team" or "ChatGPT Plus /
120
122
  Pro" picker in the wizard or settings, and the DB has no plan
121
123
  column. Bindings come from `process_backend_config` rows seeded at
122
124
  install time and edited from `/settings/models`.
@@ -132,11 +134,11 @@ Each backend authenticates via a provider API key registered on
132
134
  | `opencode` | `opencode-server` (server URL + HTTP Basic-Auth username / optional password). Model-provider keys (Anthropic / OpenAI / OpenRouter / …) live on the OpenCode server itself — configure them there with `opencode auth login`; Aitne does not store or forward them | "Managed" mode runs a local `opencode` HTTP server on loopback; a "Remote" mode pointing at a baseUrl you operate is designed but not wired up yet |
133
135
 
134
136
  API keys are the recommended and provider-supported auth method for
135
- headless agent use; if you skip the key the daemon falls back to the
137
+ headless agent use. If you skip the key, the daemon falls back to the
136
138
  CLI's local subscription login, which most providers do not
137
139
  officially support — Anthropic in particular currently prohibits the
138
140
  Claude Agent SDK on a Claude Pro / Max subscription. The dashboard
139
- surfaces a warning whenever a backend is on subscription auth.
141
+ shows a warning whenever a backend is on subscription auth.
140
142
 
141
143
  Cloud / aggregator providers (Bedrock / Vertex / Foundry / Azure
142
144
  OpenAI / Gemini-Vertex / OpenRouter via OpenCode) let teams reuse
@@ -179,9 +181,9 @@ through the daemon's polling path or another backend's MCP). See
179
181
  Different work has different cost / quality tradeoffs. Owner-facing
180
182
  surfaces (DMs, daily review) need real instruction-following.
181
183
  Background polling (mail / calendar / git events) just needs a
182
- classifier-shaped output. Splitting Sonnet vs Haiku at the seed layer
183
- keeps the cost of an autonomous loop bounded without compromising the
184
- quality of work the operator actually reads.
184
+ classifier-shaped output. Splitting Sonnet vs Haiku in the
185
+ install-time defaults keeps the cost of an autonomous loop bounded
186
+ without hurting the quality of the work the operator actually reads.
185
187
 
186
188
  Multiple backends exist so Aitne isn't single-vendor. The same
187
189
  operator can keep Claude as the primary brain, fall back to Codex when
@@ -235,4 +237,10 @@ Claude's quota is exhausted, or use Gemini for cheap polling tasks.
235
237
 
236
238
  - [Costs and Quotas](costs-and-quotas.md) — how to read the rollup.
237
239
  - [Backend Routing](../features/operations/backend-routing.md) — the
238
- fallover machinery.
240
+ failover machinery.
241
+ - [Auth Health](auth-health.md) — check whether each backend's
242
+ credentials are still valid.
243
+ - [Fallback Keeps Firing](../troubleshooting/fallback-keeps-firing.md) —
244
+ when the router keeps switching to the fallback backend.
245
+ - [Quota Exhausted](../troubleshooting/quota-exhausted.md) — what to do
246
+ when a backend runs out of quota.
@@ -17,7 +17,6 @@ summary: |
17
17
  dashboard reports, it does not bill.
18
18
  section: cost
19
19
  tags:
20
- - core
21
20
  - cost
22
21
  - quotas
23
22
  - backends
@@ -31,7 +30,7 @@ ask_examples:
31
30
  - How does Gemini's per-day quota work?
32
31
  locale: en-US
33
32
  created: 2026-04-25
34
- updated: 2026-06-07
33
+ updated: 2026-07-01
35
34
  keywords:
36
35
  - cost
37
36
  - budget
@@ -88,7 +87,10 @@ is not provider-supported for automated agent use — see
88
87
  shape becomes whatever the underlying subscription enforces (e.g.
89
88
  Claude's rolling 5-hour Opus window when running on a Max plan login).
90
89
 
91
- The dashboard rolls cost up by ProcessKey, by backend, and by agent day.
90
+ The dashboard rolls cost up three ways: by ProcessKey (the routine or
91
+ event type that triggered the run), by backend, and by agent day (the
92
+ window Aitne treats as "today", which rolls over at 04:00 local by
93
+ default).
92
94
 
93
95
  ## Why This Concept Exists
94
96
 
@@ -194,14 +196,12 @@ register an API key on `/settings/models`.
194
196
 
195
197
  ## Where You See It
196
198
 
197
- In the dashboard:
199
+ In the dashboard, the **Analytics** page (`/analytics`) is the full
200
+ cost rollup — by backend, by ProcessKey, by model, over daily / weekly
201
+ / monthly windows, with the day's running total in the sidebar. See
202
+ [Cost Tracking](../features/operations/cost-tracking.md) for the guided
203
+ tour. One surface is specific to this page's topic:
198
204
 
199
- - **Analytics** (`/analytics`) rolls cost by backend, by ProcessKey
200
- (event type), by model, and over daily / weekly / monthly periods,
201
- plus a today total.
202
- - **Sidebar** shows the day's running total next to the Analytics
203
- entry.
204
- - **Activity** event details include the per-execute cost.
205
205
  - **Settings → Models** (`/settings/models`) exposes the per-backend
206
206
  API-key panel and a warning banner whenever a backend is running on
207
207
  subscription auth.
@@ -24,7 +24,6 @@ summary: |
24
24
  (`/api/integrations/:key/exec` task-mode proxy).
25
25
  section: integrations
26
26
  tags:
27
- - core
28
27
  - integrations
29
28
  - safety
30
29
  - skills
@@ -36,7 +35,7 @@ ask_examples:
36
35
  - Why don't I see a SKILL.md for Gmail in my Codex session?
37
36
  locale: en-US
38
37
  created: 2026-04-26
39
- updated: 2026-06-07
38
+ updated: 2026-07-01
40
39
  keywords:
41
40
  - delegated mode
42
41
  - direct mode
@@ -101,9 +100,10 @@ backend is the same as the integration's `delegatedBackend`:
101
100
 
102
101
  `native` has no sub-cases. The integration's `nativeBackend` must equal
103
102
  the main DM backend — `cascadeNativeBindingsOnMainSwitch` cascades
104
- unmatched `native` rows to `disabled`. From the agent's call-site view, `native`
105
- is indistinguishable from `delegated` same-backend (both are in-session
106
- MCP); the difference is who polls (no one, for `native`).
103
+ unmatched `native` rows to `disabled`. From where the agent actually makes
104
+ the call, `native` looks identical to `delegated` same-backend (both use
105
+ in-session MCP tools); the only difference is who polls in the background
106
+ for `native`, no one does.
107
107
 
108
108
  > The four modes are `direct | delegated | native | disabled`
109
109
  > (`INTEGRATION_MODES` in `packages/shared/src/integrations.ts`).
@@ -113,19 +113,19 @@ MCP); the difference is who polls (no one, for `native`).
113
113
 
114
114
  ## Why This Concept Exists
115
115
 
116
- The setup tax for direct mode (OAuth client setup in a vendor console, then
117
- JSON download, then keychain seeding) is the single biggest blocker for
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
- the agent can reach those services through the backend's own MCP tools,
122
- zero daemon credentials required.
123
-
124
- Delegated mode lets the operator skip the vendor console entirely. The
125
- two sub-cases (same- vs cross-backend) exist because the agent's DM
126
- session may run on a different backend than the one whose connector is
127
- signed in — e.g. a Claude DM session whose Gmail comes from Codex. In
128
- that case the daemon spawns the other backend per call.
116
+ Direct mode has a real setup cost: you create an OAuth client in a vendor
117
+ console, download a JSON key, then load it into the macOS Keychain. For
118
+ non-technical operators, that is the single biggest blocker. Claude Code,
119
+ Codex, and Gemini CLI all ship first-party connectors to Gmail, Calendar,
120
+ Drive, and more (OpenCode ships none). When you're signed into claude.ai
121
+ or ChatGPT, the agent can reach those services through the backend's own
122
+ MCP tools, with no daemon credentials at all.
123
+
124
+ Delegated mode lets you skip the vendor console entirely. The two
125
+ sub-cases (same- vs cross-backend) exist because your DM session may run
126
+ on a different backend than the one whose connector is signed in — for
127
+ example, a Claude DM session whose Gmail comes from Codex. In that case
128
+ the daemon spawns the other backend once per call.
129
129
 
130
130
  ## Definitions
131
131
 
@@ -15,10 +15,8 @@ summary: |
15
15
  the agent reads and rewrites about you.
16
16
  section: memory
17
17
  tags:
18
- - core
19
18
  - memory
20
19
  - knowledge
21
- - context
22
20
  - safety
23
21
  status: stable
24
22
  ask_examples:
@@ -29,7 +27,7 @@ ask_examples:
29
27
  - How does the daemon prevent the agent from writing to disk directly?
30
28
  locale: en-US
31
29
  created: 2026-04-25
32
- updated: 2026-06-11
30
+ updated: 2026-07-01
33
31
  keywords:
34
32
  - context
35
33
  - markdown
@@ -78,36 +76,39 @@ api_endpoints:
78
76
 
79
77
  ## TL;DR
80
78
 
81
- Aitne treats Markdown files in `~/.personal-agent/context/`
79
+ Aitne uses Markdown files in `~/.personal-agent/context/`
82
80
  as its long-term memory and SQLite
83
- (`~/.personal-agent/data/personal_agent.db`) as session-scoped state.
84
- Anything you want the agent to remember between runs lives in an MD
85
- file you can read, diff, and edit by hand. The vault is partitioned
86
- into six authority classes `identity/`, `state/`, `plans/`, `journal/`,
87
- `knowledge/`, and `policies/` each carrying its own authority and
88
- lifecycle contract. See [Knowledge Layout](../reference/knowledge-layout.md)
89
- for the canonical map.
81
+ (`~/.personal-agent/data/personal_agent.db`) for short-lived state that
82
+ only matters within a single run. Anything you want the agent to
83
+ remember between runs lives in an MD file you can open, diff, and edit
84
+ by hand. The vault (the folder that holds these files) is split into six
85
+ top-level folders`identity/`, `state/`, `plans/`, `journal/`,
86
+ `knowledge/`, and `policies/` and each one has its own rules about who
87
+ may change it and how long its contents last. See
88
+ [Knowledge Layout](../reference/knowledge-layout.md) for the full map.
90
89
 
91
90
  ## Why This Concept Exists
92
91
 
93
- A long-running agent that stores meaning inside an opaque database
94
- gives you no recourse when something goes wrong. Aitne's design
95
- is the opposite: every fact the agent recalls about you, your projects,
96
- your day, or its own past behavior sits in a `.md` file you can open in
97
- any editor. Auditing, backups, and recovery are all "use git or rsync".
92
+ If a long-running agent hides everything it knows inside an opaque
93
+ database, you have no way to check or fix it when something goes wrong.
94
+ Aitne does the opposite: every fact the agent recalls about you, your
95
+ projects, your day, or its own past behavior sits in a `.md` file you
96
+ can open in any editor. Auditing, backing up, and restoring all come
97
+ down to ordinary tools — git or rsync.
98
98
 
99
99
  SQLite is reserved for the things you do not want the agent rewriting
100
- on every turn — session logs, action audit trails, observations, FTS
101
- indexes, and configuration.
100
+ on every turn — session logs, action audit trails, observations,
101
+ full-text search (FTS) indexes, and configuration.
102
102
 
103
103
  ## Definitions
104
104
 
105
105
  - **Context file**: any `.md` file under `~/.personal-agent/context/`.
106
106
  - **Authoritative memory**: the union of context files; SQLite never
107
107
  stores facts the agent treats as canonical truth about the operator.
108
- - **`AgentWriteTracker`**: the daemon component that distinguishes an
109
- agent-originated context-file write from a human edit so the
110
- Obsidian/Git observers do not loop on the agent's own output.
108
+ - **`AgentWriteTracker`**: the daemon component that tells an
109
+ agent-made context-file write apart from a human edit, so the
110
+ Obsidian/Git observers (the watchers that notice file changes) do not
111
+ loop on the agent's own output.
111
112
  - **Context API**: the daemon's `/api/context/*` endpoint, the **only**
112
113
  legal write path. The agent does not have direct `Edit` / `Write`
113
114
  permissions on the filesystem; it must go through the daemon.
@@ -115,9 +116,9 @@ indexes, and configuration.
115
116
  ## How the Agent Writes
116
117
 
117
118
  The agent has no `Edit` or `Write` tool. To change a context file it
118
- calls the daemon over HTTP, and every write funnels through one
119
- endpoint family so the daemon can validate, hold locks, and snapshot a
120
- backup before touching disk. Paths are class-prefixed
119
+ calls the daemon over HTTP, and every write goes through one small set
120
+ of endpoints so the daemon can validate the request, hold locks, and
121
+ save a backup snapshot before it touches disk. Paths are class-prefixed
121
122
  (`/api/context/<class>/<path>`):
122
123
 
123
124
  ```bash