@aitne-sh/aitne 0.1.9 → 0.1.10

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 (153) hide show
  1. package/README.md +36 -6
  2. package/agent-assets/docs/concepts/agent-day.md +2 -2
  3. package/agent-assets/docs/concepts/costs-and-quotas.md +4 -3
  4. package/agent-assets/docs/concepts/delegated-mode.md +5 -5
  5. package/agent-assets/docs/concepts/memory-model.md +6 -3
  6. package/agent-assets/docs/concepts/safety-model.md +19 -16
  7. package/agent-assets/docs/concepts/skills.md +2 -2
  8. package/agent-assets/docs/features/integrations/browser-history.md +9 -8
  9. package/agent-assets/docs/features/integrations/calendar.md +4 -4
  10. package/agent-assets/docs/features/integrations/mail.md +3 -2
  11. package/agent-assets/docs/features/lifestyle/git.md +3 -3
  12. package/agent-assets/docs/features/lifestyle/reading.md +15 -8
  13. package/agent-assets/docs/features/lifestyle/travel-bookings.md +4 -3
  14. package/agent-assets/docs/features/memory-files/agent-journal.md +30 -12
  15. package/agent-assets/docs/features/memory-files/agent-lessons.md +177 -0
  16. package/agent-assets/docs/features/memory-files/projects.md +6 -4
  17. package/agent-assets/docs/features/memory-files/roadmap.md +17 -14
  18. package/agent-assets/docs/features/messaging/overview.md +5 -5
  19. package/agent-assets/docs/features/messaging/telegram.md +10 -9
  20. package/agent-assets/docs/features/operations/activity-and-conversations.md +5 -4
  21. package/agent-assets/docs/features/operations/approvals.md +6 -5
  22. package/agent-assets/docs/features/operations/managed-chromium.md +3 -2
  23. package/agent-assets/docs/features/operations/quiet-hours.md +4 -3
  24. package/agent-assets/docs/features/routines/custom-routines.md +11 -7
  25. package/agent-assets/docs/features/routines/evening-review.md +10 -2
  26. package/agent-assets/docs/features/routines/morning-routine.md +4 -3
  27. package/agent-assets/docs/features/routines/weekly-review.md +6 -0
  28. package/agent-assets/docs/features/wiki/commands.md +4 -4
  29. package/agent-assets/docs/features/wiki/cost-and-approval.md +4 -3
  30. package/agent-assets/docs/features/wiki/dashboard.md +7 -6
  31. package/agent-assets/docs/features/wiki/overview.md +3 -3
  32. package/agent-assets/docs/features/wiki/search.md +5 -5
  33. package/agent-assets/docs/features/wiki/workspaces.md +2 -2
  34. package/agent-assets/docs/getting-started/02-first-steps.md +5 -3
  35. package/agent-assets/docs/getting-started/04-first-day.md +2 -2
  36. package/agent-assets/docs/glossary.md +4 -4
  37. package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +2 -2
  38. package/agent-assets/docs/guides/connect-a-new-mail-account.md +4 -2
  39. package/agent-assets/docs/guides/explore-with-trace-and-connect.md +5 -4
  40. package/agent-assets/docs/guides/install-and-run.md +2 -2
  41. package/agent-assets/docs/guides/maintain-wiki-health.md +2 -2
  42. package/agent-assets/docs/guides/pause-the-agent.md +9 -5
  43. package/agent-assets/docs/guides/setup-wizard.md +8 -5
  44. package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +6 -6
  45. package/agent-assets/docs/reference/api.md +15 -5
  46. package/agent-assets/docs/reference/cli-commands.md +3 -3
  47. package/agent-assets/docs/reference/config.md +21 -4
  48. package/agent-assets/docs/reference/disallowed-tools.md +6 -4
  49. package/agent-assets/docs/reference/knowledge-layout.md +11 -2
  50. package/agent-assets/docs/reference/process-keys.md +2 -2
  51. package/agent-assets/docs/reference/skills.md +5 -4
  52. package/agent-assets/docs/troubleshooting/auth-failed.md +9 -8
  53. package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +16 -9
  54. package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +2 -2
  55. package/agent-assets/docs/troubleshooting/quota-exhausted.md +7 -6
  56. package/agent-assets/skills/agent-actions/SKILL.md +23 -39
  57. package/agent-assets/skills/agent-create/SKILL.md +15 -6
  58. package/agent-assets/skills/attach/SKILL.md +8 -27
  59. package/agent-assets/skills/browser-history/SKILL.md +29 -16
  60. package/agent-assets/skills/browser-history-respond/SKILL.md +6 -1
  61. package/agent-assets/skills/browser-task/SKILL.md +22 -27
  62. package/agent-assets/skills/context/SKILL.md +23 -32
  63. package/agent-assets/skills/context/curation.json +12 -12
  64. package/agent-assets/skills/context/references/api.md +17 -17
  65. package/agent-assets/skills/context/references/required-frontmatter.md +10 -9
  66. package/agent-assets/skills/context/references/snapshot-files.md +12 -11
  67. package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +5 -5
  68. package/agent-assets/skills/context/seeds/frontmatter-requirements.seed.json +3 -3
  69. package/agent-assets/skills/docs-search/SKILL.md +19 -31
  70. package/agent-assets/skills/external-services/SKILL.delegated.claude.md +8 -95
  71. package/agent-assets/skills/external-services/SKILL.delegated.codex.md +8 -94
  72. package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +8 -94
  73. package/agent-assets/skills/external-services/SKILL.native.claude.md +2 -2
  74. package/agent-assets/skills/external-services/references/exec-errors.md +32 -0
  75. package/agent-assets/skills/external-services/references/skills-crud.md +5 -5
  76. package/agent-assets/skills/gmail-lifestyle/SKILL.md +3 -2
  77. package/agent-assets/skills/gmail-lifestyle/references/receipts-api.md +4 -0
  78. package/agent-assets/skills/gmail-lifestyle/references/travel-bookings-api.md +9 -0
  79. package/agent-assets/skills/mail/SKILL.delegated.claude.md +13 -25
  80. package/agent-assets/skills/mail/SKILL.delegated.codex.md +3 -2
  81. package/agent-assets/skills/mail/SKILL.delegated.gemini.md +3 -2
  82. package/agent-assets/skills/mail/SKILL.md +10 -18
  83. package/agent-assets/skills/mail/SKILL.native.claude.md +8 -7
  84. package/agent-assets/skills/mail/SKILL.native.codex.md +1 -1
  85. package/agent-assets/skills/mail/SKILL.native.gemini.md +1 -1
  86. package/agent-assets/skills/mail/references/api.md +6 -1
  87. package/agent-assets/skills/mail/references/examples.md +2 -1
  88. package/agent-assets/skills/managed-tasks/SKILL.md +44 -77
  89. package/agent-assets/skills/managed-tasks/references/errors.md +25 -14
  90. package/agent-assets/skills/managed-tasks/references/output-path.md +33 -17
  91. package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +6 -4
  92. package/agent-assets/skills/management-policy/SKILL.md +10 -11
  93. package/agent-assets/skills/management-policy/references/policy-workflow.md +4 -5
  94. package/agent-assets/skills/notify/SKILL.md +11 -13
  95. package/agent-assets/skills/notify/references/priority.md +28 -25
  96. package/agent-assets/skills/notion/SKILL.delegated.claude.md +1 -1
  97. package/agent-assets/skills/notion/SKILL.delegated.codex.md +1 -1
  98. package/agent-assets/skills/notion/SKILL.delegated.gemini.md +1 -1
  99. package/agent-assets/skills/notion/SKILL.md +17 -17
  100. package/agent-assets/skills/notion/SKILL.native.claude.md +1 -1
  101. package/agent-assets/skills/notion/SKILL.native.codex.md +1 -1
  102. package/agent-assets/skills/notion/SKILL.native.gemini.md +1 -1
  103. package/agent-assets/skills/observations/SKILL.md +5 -20
  104. package/agent-assets/skills/observations/references/fetch-fallback.md +22 -0
  105. package/agent-assets/skills/project-doc/SKILL.md +9 -6
  106. package/agent-assets/skills/project-doc/curation.json +3 -3
  107. package/agent-assets/skills/project-doc/seeds/project-shape.seed.json +2 -2
  108. package/agent-assets/skills/project-doc/seeds/slug-grammar.seed.json +3 -3
  109. package/agent-assets/skills/reading/SKILL.md +8 -42
  110. package/agent-assets/skills/reading/references/reading-taste.md +5 -5
  111. package/agent-assets/skills/roadmap/SKILL.md +3 -19
  112. package/agent-assets/skills/roadmap/references/api.md +16 -6
  113. package/agent-assets/skills/roadmap/references/horizon-tags.md +11 -0
  114. package/agent-assets/skills/roadmap/references/migration.md +8 -6
  115. package/agent-assets/skills/roadmap/references/retention.md +18 -0
  116. package/agent-assets/skills/schedule/SKILL.md +9 -26
  117. package/agent-assets/skills/schedule/references/importance.md +23 -0
  118. package/agent-assets/skills/schedule/references/recurrence-rule.md +6 -4
  119. package/agent-assets/skills/scheduled-managed-task/SKILL.md +34 -37
  120. package/agent-assets/skills/today/SKILL.md +20 -79
  121. package/agent-assets/skills/today/references/today-skeleton.md +66 -0
  122. package/agent-assets/skills/today/seeds/agent-notes-flavors.seed.json +1 -1
  123. package/agent-assets/skills/today/seeds/section-shape.seed.json +6 -6
  124. package/agent-assets/skills/user-interview/SKILL.md +15 -90
  125. package/agent-assets/skills/user-interview/references/op-briefing.md +1 -1
  126. package/agent-assets/skills/user-interview/references/op-dm-handler.md +88 -0
  127. package/agent-assets/skills/user-interview/references/op-morning.md +1 -1
  128. package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +1 -1
  129. package/agent-assets/skills/user-profile/SKILL.md +16 -26
  130. package/agent-assets/skills/user-profile/curation.json +3 -3
  131. package/agent-assets/skills/user-profile/references/character-preferences.md +3 -3
  132. package/agent-assets/skills/wiki/wiki-ask/SKILL.md +1 -1
  133. package/agent-assets/skills/wiki/wiki-compile/SKILL.md +5 -4
  134. package/agent-assets/skills/wiki/wiki-connect/SKILL.md +32 -5
  135. package/agent-assets/skills/wiki/wiki-ingest/SKILL.md +6 -50
  136. package/agent-assets/skills/wiki/wiki-ingest/references/curl-errors.md +58 -0
  137. package/agent-assets/skills/wiki/wiki-lint/SKILL.md +20 -14
  138. package/agent-assets/skills/wiki/wiki-trace/SKILL.md +10 -5
  139. package/agent-assets/skills/wiki/wiki-vault-rules/SKILL.md +2 -0
  140. package/agent-assets/task-flows/_partials/feedback-capture.md +30 -0
  141. package/agent-assets/task-flows/message.received.dm.md +4 -0
  142. package/agent-assets/task-flows/message.received.dm_first.md +4 -0
  143. package/agent-assets/task-flows/routine.evening_review.md +80 -0
  144. package/agent-assets/task-flows/routine.monthly_review.md +72 -0
  145. package/agent-assets/task-flows/routine.weekly_review.md +21 -0
  146. package/agent-assets/task-flows/wiki.trace.md +1 -1
  147. package/bin/aitne.mjs +45 -11
  148. package/package.json +4 -4
  149. package/scripts/commands/doctor.mjs +11 -2
  150. package/scripts/lib/process-identity.d.mts +46 -0
  151. package/scripts/lib/process-identity.mjs +193 -0
  152. package/scripts/lib/read-api-token.mjs +1 -1
  153. package/scripts/start.mjs +14 -4
@@ -0,0 +1,177 @@
1
+ ---
2
+ schema_version: 1
3
+ slug: features/memory-files/agent-lessons
4
+ title: agent lessons
5
+ id: agent-lessons
6
+ aliases:
7
+ - lessons
8
+ - agent lessons
9
+ - feedback learning loop
10
+ - policies/agent-lessons.md
11
+ category: features
12
+ summary: |
13
+ The agent's learned-behavior stores — a global policies/agent-lessons.md
14
+ plus a per-agent policies/agents/<slug>/lessons.md. Your corrections and
15
+ preferences, the agent's own self-critiques, and your reactions are
16
+ captured as feedback signals, consolidated nightly into dated lessons,
17
+ re-generalized monthly, and injected back into the right executions.
18
+ section: memory-files
19
+ tags:
20
+ - memory
21
+ - feedback
22
+ - learning
23
+ - routines
24
+ status: beta
25
+ ask_examples:
26
+ - What are the agent lessons?
27
+ - Where does the agent remember my corrections?
28
+ - How does the feedback learning loop work?
29
+ - What is a provisional lesson?
30
+ - How do I tune the lesson caps?
31
+ locale: en-US
32
+ created: 2026-06-08
33
+ updated: 2026-06-08
34
+ keywords:
35
+ - lessons
36
+ - feedback
37
+ - learning loop
38
+ - corrections
39
+ - preferences
40
+ - self-critique
41
+ - provisional
42
+ related:
43
+ - features/routines/evening-review
44
+ - features/routines/weekly-review
45
+ - features/memory-files/agent-journal
46
+ - reference/knowledge-layout
47
+ process_keys:
48
+ - routine.evening_review
49
+ - routine.weekly_review
50
+ - routine.monthly_review
51
+ context_files:
52
+ - policies/agent-lessons.md
53
+ - policies/agents/<slug>/lessons.md
54
+ ui_anchors:
55
+ - /settings/lessons
56
+ ---
57
+
58
+ # agent lessons
59
+
60
+ ## In one sentence
61
+
62
+ The lesson stores are where the agent remembers how you want it to
63
+ behave: a short, dated list of learned directives that grows from your
64
+ corrections and the agent's own retros, and is fed back into the agent's
65
+ work so it stops repeating the same mistakes.
66
+
67
+ ## What they are
68
+
69
+ There are two kinds of store:
70
+
71
+ - **Global agent behavior** — `policies/agent-lessons.md`. Lessons that
72
+ apply to the agent as a whole. These are injected into your DM
73
+ conversations and into the routines that decide whether to notify you.
74
+ - **Per-agent** — `policies/agents/<slug>/lessons.md`, one per Agent
75
+ Definition. These are injected **only** into that agent's own
76
+ executions, so a lesson learned for your "weekly-report" agent never
77
+ leaks into an unrelated one.
78
+
79
+ Both live under `~/.personal-agent/context/policies/`, alongside your
80
+ other rule files, and are plain Markdown you can read or hand-edit.
81
+
82
+ Each store is a `## Lessons` section of dated bullets. A lesson looks
83
+ like:
84
+
85
+ ```
86
+ - [2026-06-07] Keep the budget section in the weekly report. <!-- ev=2 kind=correction src=explicit conf=high last=2026-06-07 -->
87
+ ```
88
+
89
+ The trailing HTML comment is bookkeeping the daemon manages: how much
90
+ evidence backs the lesson (`ev`), what kind it is (a `correction`, a
91
+ `do-more`/`do-less`, a hard `constraint`, …), how it was sourced, and
92
+ when it was last reinforced. You can ignore the comment when reading —
93
+ the prose before it is the directive.
94
+
95
+ ## How a lesson is born
96
+
97
+ You never write these files to teach the agent a lesson; the loop does
98
+ it for you. There are three ways signals enter:
99
+
100
+ - **You correct it or state a preference.** When, in a DM, you correct
101
+ the agent, tell it how you want something done, or say
102
+ stop / do-more / do-less, it records that once as a feedback signal.
103
+ This does **not** change the current reply — your correction already
104
+ lives in that conversation — but it is remembered for later.
105
+ - **The agent critiques itself.** The [weekly](../routines/weekly-review.md)
106
+ and monthly reviews post each concrete, actionable improvement idea as
107
+ a `self_critique` signal.
108
+ - **Your reactions.** Whether you replied to or ignored a proactive
109
+ message is recorded as a weaker signal.
110
+
111
+ Those raw signals don't become lessons immediately. Each night the
112
+ [evening review](../routines/evening-review.md) folds the day's
113
+ unconsumed signals into the right store as dated lessons, then marks them
114
+ consumed (it skips the step entirely when nothing pends). Once a month
115
+ the monthly review runs a re-generalize pass that collapses several
116
+ same-theme lessons into one higher-level principle, keeping each store
117
+ small.
118
+
119
+ ## Provisional vs. active
120
+
121
+ A new lesson is stored but is not necessarily *injected* right away. A
122
+ lesson carries a `<!-- provisional -->` marker until it has enough
123
+ corroborating evidence; provisional lessons sit in the file but are not
124
+ fed into the agent's prompts. This avoids over-fitting to a single
125
+ offhand comment.
126
+
127
+ How a lesson crosses from provisional to active:
128
+
129
+ - A behavioral or self-critique lesson must reach weighted evidence at or
130
+ above the **promotion threshold** (`feedbackPromotionThreshold`,
131
+ default 2). Evidence is weighted by source — an explicit or corrected
132
+ signal counts 1.0, a reply or self-critique 0.5, an ignore 0.25.
133
+ - An **explicit owner directive** ("always do X", "stop doing Y")
134
+ promotes on the first occurrence — it is taken at your word.
135
+ - An **ignore on its own never promotes** a lesson, and is never read as
136
+ disapproval.
137
+
138
+ ## Bounded by design
139
+
140
+ The stores can't grow without limit. Each is capped in bytes and entry
141
+ count — the global store at `feedbackLessonMaxBytesGlobal` bytes
142
+ (default 8192) / 40 entries, the per-agent stores at
143
+ `feedbackLessonMaxBytesPerAgent` (default 4096) / 20 entries. When a
144
+ store is full, the lowest-signal lessons are dropped first. Lessons that
145
+ go untouched for `feedbackLessonStaleDays` (default 60) are pruned — with
146
+ one exception: a `kind=constraint` lesson is durable and is never
147
+ stale-pruned or collapsed away. The underlying feedback signals
148
+ themselves are retained for `feedbackSignalRetentionDays` (default 180).
149
+
150
+ ## Where in the dashboard
151
+
152
+ **Settings → Lessons** (`/settings/lessons`, labelled "Lessons" with a
153
+ **Preview** badge) is the read/tune surface. From there you can view and
154
+ edit the lessons themselves and adjust every knob above:
155
+ `feedbackLearningEnabled` (the master kill-switch, on by default),
156
+ `feedbackPromotionThreshold`, the byte caps, the stale-days horizon, and
157
+ the signal retention window. Turning `feedbackLearningEnabled` off stops
158
+ both capture and consolidation.
159
+
160
+ ## Configuration
161
+
162
+ All of the loop's knobs are listed above and live on the Lessons page;
163
+ there is nothing to configure in the files themselves. Because the stores
164
+ are plain Markdown, **you** can hand-edit, prune, or remove a lesson at
165
+ any time — the loop will pick up from whatever it finds the next night.
166
+
167
+ ## Related
168
+
169
+ - [Evening Review](../routines/evening-review.md) — folds the day's
170
+ feedback signals into these stores each night.
171
+ - [Weekly Review](../routines/weekly-review.md) — posts self-critique
172
+ signals that feed the loop. The monthly review re-generalizes the
173
+ stores once a month.
174
+ - [agent journal](agent-journal.md) — the reflection-shaped diary, a
175
+ separate file from these directive stores.
176
+ - [Knowledge layout](../../reference/knowledge-layout.md) — where the
177
+ `policies/` stores sit in the wider context vault.
@@ -25,7 +25,7 @@ ask_examples:
25
25
  - How does the agent write to a project file?
26
26
  locale: en-US
27
27
  created: 2026-04-25
28
- updated: 2026-05-28
28
+ updated: 2026-06-07
29
29
  keywords:
30
30
  - projects
31
31
  - project file
@@ -67,9 +67,11 @@ only the minimum — `type: project`, `owner: shared`, an `updated`
67
67
  date, and an H1 title. By convention the agent also writes `slug`,
68
68
  `state`, `start`, `due`, `stakeholders`, `next_milestone`, and `tags`.
69
69
 
70
- `state` is what marks a project **active**: the dashboard's project
71
- view filters on it, and the morning routine only surfaces projects
72
- whose `state` is active.
70
+ `state` is what marks a project **active**: the Obsidian `_active.base`
71
+ Bases view filters on it (`state != "archived"`), and the morning
72
+ routine surfaces every project whose `state` is not `archived` — a
73
+ file with no `state` (or any state other than `archived`) is treated
74
+ as active and surfaced.
73
75
 
74
76
  ```markdown
75
77
  ---
@@ -24,7 +24,7 @@ ask_examples:
24
24
  - How do I add a roadmap entry?
25
25
  locale: en-US
26
26
  created: 2026-04-25
27
- updated: 2026-05-28
27
+ updated: 2026-06-07
28
28
  keywords:
29
29
  - roadmap.md
30
30
  - roadmap
@@ -56,9 +56,10 @@ rows that the morning routine fires on the day they come due.
56
56
  - Captures long-running goals that span more than a single day, so
57
57
  they don't fall out of `state/today.md` (which is replaced fresh
58
58
  each morning).
59
- - Preparation Timeline rows like "T-7 days: book hotel" surface in
60
- the morning routine on the day each offset lands turning a far-off
61
- milestone into concrete actions at the right moment.
59
+ - Preparation Timeline rows like "2026-06-13 [notify]: book hotel"
60
+ surface in the morning routine on the day each row is dated (or once
61
+ it is overdue) — turning a far-off milestone into concrete actions at
62
+ the right moment.
62
63
  - Cross-links to project files for deeper context.
63
64
 
64
65
  ## What It Looks Like
@@ -67,25 +68,27 @@ A goal with a Preparation Timeline is just Markdown the agent reads
67
68
  each morning. For example:
68
69
 
69
70
  ```markdown
70
- ## Conference talk — 2026-06-20
71
+ ### 2026-06-20: Conference talk
71
72
 
72
73
  Goal: deliver the keynote in Tokyo.
73
74
 
74
- Preparation Timeline:
75
- - T-14 days: finalize slide deck
76
- - T-7 days: book hotel
77
- - T-2 days: dry run with the team
78
- - T-0: travel day
75
+ **Preparation Timeline:**
76
+ - 2026-06-06 [today]: finalize slide deck
77
+ - 2026-06-13 [notify]: book hotel
78
+ - 2026-06-18 [today]: dry run with the team
79
+ - 2026-06-20 [today]: travel day
79
80
  ```
80
81
 
81
- On 2026-06-06 the morning routine sees the `T-14` offset come due and
82
- pulls "finalize slide deck" into that day's plan; on 2026-06-13 it
83
- surfaces "book hotel", and so on.
82
+ Each Preparation Timeline row carries an absolute date and a tag
83
+ (`[notify]`, `[today]`, `[check]`, or `[schedule]`). On 2026-06-06 the
84
+ morning routine sees the `2026-06-06` row come due and pulls "finalize
85
+ slide deck" into that day's plan; on 2026-06-13 it surfaces "book
86
+ hotel", and so on.
84
87
 
85
88
  ## When It Runs / How It Is Triggered
86
89
 
87
90
  Read by the morning routine each day, which walks the roadmap and
88
- surfaces any Preparation Timeline rows whose offset fires that day.
91
+ surfaces any Preparation Timeline rows dated for that day (or overdue).
89
92
  The file is updated by the operator, or by the agent on request (for
90
93
  example via the roadmap skill or `aitne run-now roadmap_maintenance`).
91
94
 
@@ -29,7 +29,7 @@ ask_examples:
29
29
  - Can I send the agent a voice note?
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
  - messaging
35
35
  - dm
@@ -75,10 +75,10 @@ so you can talk to the agent the same way you'd type.
75
75
  ## What It Does
76
76
 
77
77
  - **Reactive DMs**: the agent answers every direct message you send.
78
- - **@-mentions (Slack only)**: @-mentioning the agent inside a shared
79
- channel routes to the `message.mention` ProcessKey and is answered
80
- the same way as a DM. Telegram, Discord, and WhatsApp drop all
81
- non-DM traffic (no group support).
78
+ - **@-mentions (Slack and Discord)**: @-mentioning the agent inside a
79
+ shared channel routes to the `message.mention` ProcessKey and is
80
+ answered the same way as a DM. Telegram and WhatsApp drop all non-DM
81
+ traffic (no group support).
82
82
  - **Outbound notifications**: routines and observations fire alerts
83
83
  back through the same channel.
84
84
  - **Voice attachments**: when the platform attaches audio (Telegram
@@ -8,7 +8,7 @@ aliases:
8
8
  category: features
9
9
  summary: |
10
10
  Pair Telegram by creating a bot via @BotFather, pasting the token
11
- into Aitne, and DMing the magic phrase.
11
+ into Aitne, and scanning the pairing QR code.
12
12
  section: messaging
13
13
  tags:
14
14
  - messaging
@@ -24,7 +24,7 @@ ask_examples:
24
24
  - Where do I get a Telegram bot token?
25
25
  locale: en-US
26
26
  created: 2026-04-25
27
- updated: 2026-05-28
27
+ updated: 2026-06-07
28
28
  keywords:
29
29
  - telegram
30
30
  - telegram bot
@@ -41,7 +41,7 @@ related:
41
41
  ## In One Sentence
42
42
 
43
43
  The fastest messaging app to pair: create a Telegram bot, paste the
44
- token, type the magic phrase.
44
+ token, scan the pairing QR code.
45
45
 
46
46
  ## What It Does
47
47
 
@@ -51,7 +51,7 @@ token, type the magic phrase.
51
51
  ## When It Runs / How It Is Triggered
52
52
 
53
53
  Before pairing, nothing listens. Once you paste the bot token and complete
54
- magic-phrase pairing, Aitne long-polls Telegram's Bot API continuously for new
54
+ QR / deep-link pairing, Aitne long-polls Telegram's Bot API continuously for new
55
55
  direct messages.
56
56
 
57
57
  ## Where in the Dashboard
@@ -63,17 +63,18 @@ direct messages.
63
63
  | Field | Notes |
64
64
  |---|---|
65
65
  | Bot Token | From @BotFather. |
66
- | Owner Channel | Auto-set on successful magic-phrase pairing. |
66
+ | Owner Channel | Auto-set on successful QR / deep-link pairing. |
67
67
 
68
68
  ## When Something Goes Wrong
69
69
 
70
70
  - Bot replied to in a group instead of a DM: group chats are filtered
71
71
  out by design; the agent only listens to direct messages.
72
- - No reply at all after DMing the magic phrase: confirm the bot has a username
73
- set via @BotFather (/setname) — the daemon refuses to build the pairing deep
74
- link otherwise.
72
+ - No reply at all after scanning the QR: confirm the bot has a username
73
+ set via @BotFather (/setname or /newbot) — the daemon refuses to build the
74
+ pairing deep link otherwise.
75
75
  - Pairing never completes: re-check the token in Connections → Messaging →
76
- Telegram, then DM the magic phrase from your own account. See
76
+ Telegram, generate a fresh QR, then scan it (or tap the deep link) and press
77
+ START in Telegram from your own account. See
77
78
  [Pairing & Magic Phrase](pairing-and-magic-phrase.md).
78
79
 
79
80
  ## Related
@@ -26,7 +26,7 @@ ask_examples:
26
26
  - How do I find why a routine failed?
27
27
  locale: en-US
28
28
  created: 2026-04-25
29
- updated: 2026-05-28
29
+ updated: 2026-06-07
30
30
  keywords:
31
31
  - activity
32
32
  - conversations
@@ -104,9 +104,10 @@ Retention is unlimited locally — the SQLite database keeps every row
104
104
  forever. To prune history without losing your configuration, use
105
105
  `POST /api/system/purge-history` (it clears `agent_actions`,
106
106
  `conversation_sessions`, and `messages` but leaves settings and the
107
- context vault intact). To wipe everything, `aitne uninstall --wipe-data`
108
- removes the whole `~/.personal-agent` data directory after a `WIPE`
109
- confirmation.
107
+ context vault intact). To wipe everything, `aitne uninstall` removes the
108
+ whole `~/.personal-agent` data directory after a literal `WIPE`
109
+ confirmation (pass `--wipe-data` to skip the prompt and wipe
110
+ non-interactively, or `--keep-data` to leave the directory intact).
110
111
 
111
112
  ## When Something Goes Wrong
112
113
 
@@ -24,7 +24,7 @@ ask_examples:
24
24
  - Where do I approve a pending action?
25
25
  locale: en-US
26
26
  created: 2026-04-25
27
- updated: 2026-05-28
27
+ updated: 2026-06-07
28
28
  keywords:
29
29
  - approval
30
30
  - approve tier
@@ -83,10 +83,11 @@ Deny asks for confirmation before discarding the item.
83
83
 
84
84
  ## When Something Goes Wrong
85
85
 
86
- - **An approval that never clears:** the agent session that produced
87
- it may have timed out. The action expires with the session redo
88
- the request that triggered it (for example, re-send the DM or
89
- re-run the routine).
86
+ - **A stale approval you never answered:** a pending approval is
87
+ discarded once the agent day rolls over (the next 04:00 local
88
+ boundary) it's marked skipped rather than replayed after the
89
+ day turns. If that happens, redo the request that triggered it
90
+ (for example, re-send the DM or re-run the routine).
90
91
 
91
92
  ## Related
92
93
 
@@ -31,7 +31,7 @@ ask_examples:
31
31
  - How do I block a site from managed Chromium?
32
32
  locale: en-US
33
33
  created: 2026-05-22
34
- updated: 2026-05-28
34
+ updated: 2026-06-07
35
35
  keywords:
36
36
  - managed chromium
37
37
  - browser automation
@@ -136,7 +136,8 @@ ships empty.
136
136
  1. The agent prepares the checkout in a managed Chromium tab and
137
137
  pauses at the final confirm step.
138
138
  2. The daemon mints a single-use token with the prefix `!~` followed
139
- by 8 random hex characters (e.g. `!~3a1f9c7b`), inserts a
139
+ by 8 random base32 characters (alphabet `A-Z2-7`, e.g.
140
+ `!~K7QM3ZAB`), inserts a
140
141
  `browser_automation_purchase_tokens` row keyed on a server-side
141
142
  `jti`, and DMs the token to a primary channel together with a
142
143
  screenshot of the exact cart state.
@@ -25,7 +25,7 @@ ask_examples:
25
25
  - Will routines still run during quiet hours?
26
26
  locale: en-US
27
27
  created: 2026-04-25
28
- updated: 2026-05-28
28
+ updated: 2026-06-07
29
29
  keywords:
30
30
  - quiet hours
31
31
  - dnd
@@ -94,8 +94,9 @@ timezone) before sending. The window may wrap midnight — the default
94
94
  ## Where in the Dashboard
95
95
 
96
96
  **Settings → Schedule** holds `quietHoursStart` and `quietHoursEnd`,
97
- shown as a red band on the same 24-hour slider as the hourly-check
98
- active window. There is **no overlap validation** quiet hours and the
97
+ shown as a red arc on the same 24-hour ring (dial) as the hourly-check
98
+ active window drag the handles to adjust either band. There is **no
99
+ overlap validation** — quiet hours and the
99
100
  active window are allowed to overlap, and the morning routine fires
100
101
  regardless of where the bands sit.
101
102
 
@@ -29,7 +29,7 @@ ask_examples:
29
29
  - Which tier does a custom routine run under?
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
  - custom routine
35
35
  - routine.custom.<slug>
@@ -159,16 +159,20 @@ under the `medium` tier (Sonnet on the Claude backend), and stops
159
159
  spending once the run reaches $0.10.
160
160
 
161
161
  > **Distinct from `recurring_schedules`.** The `recurring_schedules`
162
- > table powers DM-style scheduled tasks (`agent.task` /
163
- > `agent.dm_task`) — e.g. "remind me at 9am every weekday". Those
164
- > use a structured `RecurrenceRule` (frequency + time + dayOf*) and
165
- > are managed via `POST /api/recurring-schedules`. They are not the
166
- > same surface as `routine.custom.<slug>`.
162
+ > table now powers recurring scheduled DMs only (`task_type =
163
+ > 'dm_session'`) — e.g. the morning briefing. They use a structured
164
+ > `RecurrenceRule` (frequency + time + dayOf*) and are managed via
165
+ > `POST /api/recurring-schedules`. Recurring agent *work* moved to the
166
+ > `/agents` layer `POST /api/recurring-schedules` with any
167
+ > non-`dm_session` task type returns 410 Gone with a pointer to
168
+ > `POST /api/agents`. Neither is the same surface as
169
+ > `routine.custom.<slug>`.
167
170
 
168
171
  ## When Something Goes Wrong
169
172
 
170
173
  - A cron expression that resolves to "never": the routine appears in
171
- the list but never fires. The dashboard shows next-fire as N/A.
174
+ the list but never fires. The dashboard's "Next runs" preview shows
175
+ "No upcoming runs found within the next year for this timezone."
172
176
 
173
177
  ## Related
174
178
 
@@ -27,7 +27,7 @@ ask_examples:
27
27
  - How do I disable the evening review?
28
28
  locale: en-US
29
29
  created: 2026-04-25
30
- updated: 2026-05-28
30
+ updated: 2026-06-07
31
31
  keywords:
32
32
  - evening review
33
33
  - retro
@@ -48,6 +48,7 @@ context_files:
48
48
  - journal/agent.md
49
49
  - identity/profile.md
50
50
  - policies/routines/evening.md
51
+ - policies/agent-lessons.md
51
52
  ui_anchors:
52
53
  - /connections/journal
53
54
  - /settings/routines
@@ -64,7 +65,7 @@ your identity files.
64
65
 
65
66
  ## What It Does
66
67
 
67
- The routine runs three internal bookkeeping steps. These are quiet by
68
+ The routine runs several internal bookkeeping steps. These are quiet by
68
69
  design — they prepare state that **tomorrow's morning routine depends on**
69
70
  rather than producing a chatty end-of-day report.
70
71
 
@@ -80,6 +81,11 @@ rather than producing a chatty end-of-day report.
80
81
  3. **Process profile signals.** Reads the day's Raw Signals from your
81
82
  profile and routes each into `character`, Learned Context, or a
82
83
  detailed identity file under `identity/`, then prunes stale entries.
84
+ 4. **Consolidate feedback signals into lessons.** When feedback learning is
85
+ on (default) and signals are pending, folds the day's unconsumed feedback
86
+ into the scoped lesson stores (`policies/agent-lessons.md` for agent-scope
87
+ lessons; identity files for owner directives), then marks them consumed.
88
+ Skipped entirely when no signals pend.
83
89
 
84
90
  ## When It Runs / How It Is Triggered
85
91
 
@@ -94,6 +100,8 @@ run is skipped while the agent is paused (`!stop`) or setup is incomplete.
94
100
  - Roadmap edits in `plans/roadmap.md` when a plan was promoted or fired.
95
101
  - A `journal/agent.md` line **only** when a roadmap review date fired or a
96
102
  validation error needs recording.
103
+ - Lesson edits in `policies/agent-lessons.md` when feedback signals were
104
+ pending and consolidated.
97
105
 
98
106
  The built-in steps emit **no user-facing DM by default** — there is no
99
107
  "today wraps up here" message. (The one exception: any check you add to
@@ -26,7 +26,7 @@ ask_examples:
26
26
  - What model does morning routine use?
27
27
  locale: en-US
28
28
  created: 2026-04-25
29
- updated: 2026-05-28
29
+ updated: 2026-06-07
30
30
  keywords:
31
31
  - morning
32
32
  - day plan
@@ -109,8 +109,9 @@ the daemon injects a `<roadmap_skeleton>` block carrying the pre-aggregated
109
109
  Annual Goals / Quarterly Focus / Preparation Timeline facts so Stage A
110
110
  can populate the wizard's placeholder roadmap on medium tier instead of
111
111
  paying for a one-shot high-tier session. (The dedicated
112
- `routine.morning_routine_initial` process key was retired in Phase 4, and
113
- Phase 7 2026-05-16 removed its high-tier seed entirely.)
112
+ `routine.morning_routine_initial` process key along with its high-tier
113
+ seed — was retired in Phase 7, 2026-05-16; the first-run branch now flows
114
+ through the parent `routine.morning_routine` envelope.)
114
115
 
115
116
  ## What It Outputs
116
117
 
@@ -39,6 +39,7 @@ related:
39
39
  - concepts/routines
40
40
  - features/routines/evening-review
41
41
  - features/memory-files/agent-journal
42
+ - features/memory-files/agent-lessons
42
43
  process_keys:
43
44
  - routine.weekly_review
44
45
  config_keys:
@@ -69,6 +70,11 @@ into every morning routine of the following ISO week.
69
70
  Lessons — and writes the user-facing snapshot.
70
71
  - Appends an agent-internal block to `journal/agent.md` for
71
72
  self-critique, filter quality, and improvement ideas.
73
+ - Feeds the learning loop: for each concrete, actionable system
74
+ improvement idea it identifies, it also posts a `source=self_critique`
75
+ feedback signal (in addition to the `journal/agent.md` prose), so the
76
+ idea is consolidated into the [agent lessons](../memory-files/agent-lessons.md)
77
+ rather than only living in the journal.
72
78
  - Sends a brief Friday-evening notification by default (the silence
73
79
  gate triggers only on an essentially blank week).
74
80
  - Refreshes `identity/reading-taste.md` and Book Candidates when
@@ -34,7 +34,7 @@ ask_examples:
34
34
  - How do I bridge two domains with `!connect`?
35
35
  locale: en-US
36
36
  created: 2026-05-12
37
- updated: 2026-05-28
37
+ updated: 2026-06-07
38
38
  keywords:
39
39
  - !ingest
40
40
  - !compile
@@ -145,9 +145,9 @@ The acknowledgement DM names the mode that ran (`in parallel` /
145
145
  Full rebuilds touch every wiki note and are the most expensive
146
146
  command in the wiki surface. The flow:
147
147
 
148
- 1. The bang handler estimates the cost (raw note count × assumed
149
- input tokens × Sonnet 4.6 input price, bracketed optimistic 0.5× /
150
- expected 1× / pessimistic 2×).
148
+ 1. The bang handler estimates the cost (per raw note, an on-disk
149
+ char→token approximation × Sonnet 4.6 input price, bracketed
150
+ optimistic 0.5× / expected 1× / pessimistic 2×).
151
151
  2. On an external git-tracked vault with **Auto-commit before
152
152
  `!compile full`** enabled and a clean working tree, Aitne runs
153
153
  `git add -A && git commit -m "aitne wiki: pre-compile snapshot <ts>"`
@@ -39,7 +39,7 @@ ask_examples:
39
39
  - Can I see the cost before running !compile full?
40
40
  locale: en-US
41
41
  created: 2026-05-21
42
- updated: 2026-05-28
42
+ updated: 2026-06-07
43
43
  keywords:
44
44
  - cost estimate
45
45
  - cost bracket
@@ -178,8 +178,9 @@ its budget envelope is bounded by the per-process `maxBudgetUsd`
178
178
 
179
179
  Per workspace, in `/settings/wiki` — the **Approval threshold (USD)**
180
180
  input. The value lives on `wiki_workspaces.full_compile_approval_threshold_usd`
181
- with a CHECK constraint `> 0`. Setting it lower escalates more runs
182
- to manual approval; setting it higher trusts the estimator more.
181
+ and the PATCH endpoint validates it to the `$0`–`$100` range. Setting it
182
+ lower escalates more runs to manual approval; setting it higher trusts
183
+ the estimator more.
183
184
 
184
185
  A common pattern: start at $2.00, watch the spend on the next
185
186
  `!compile full`, then dial up or down based on how close the
@@ -37,7 +37,7 @@ ask_examples:
37
37
  - What does the Enable Wiki button do?
38
38
  locale: en-US
39
39
  created: 2026-05-21
40
- updated: 2026-05-28
40
+ updated: 2026-06-07
41
41
  keywords:
42
42
  - /wiki
43
43
  - /wiki/timeline
@@ -128,7 +128,7 @@ States:
128
128
  The last 8 entries from `log.md`, the wiki's append-only operational
129
129
  log. Each entry shows the wiki process key (`wiki.ingest_url`,
130
130
  `wiki.compile`, `wiki.ask`, `wiki.lint`, `wiki.trace`, `wiki.connect`),
131
- the operation (`write`, `delete`, …), the affected path, and the
131
+ the operation (`post`, `patch`), the affected path, and the
132
132
  timestamp. A **View full timeline** button at the top of the card
133
133
  opens `/wiki/timeline`.
134
134
 
@@ -184,10 +184,11 @@ The configuration surface. Two-state:
184
184
 
185
185
  A two-card chooser:
186
186
 
187
- - **Internal** (recommended) — managed by Aitne in its data directory
188
- (default `~/.personal-agent/wiki`), schema seeded automatically.
189
- The **Enable internal wiki** button turns it on with nothing else
190
- to configure.
187
+ - **Internal** (recommended) — managed by Aitne inside the context
188
+ vault (default `<contextDir>/knowledge/wiki`, i.e.
189
+ `~/.personal-agent/context/knowledge/wiki`), schema seeded
190
+ automatically. The **Enable internal wiki** button turns it on with
191
+ nothing else to configure.
191
192
  - **Existing Obsidian vault** (external) — point Aitne at a folder you
192
193
  already own via the path picker, then confirm with **Use this
193
194
  folder**.
@@ -26,7 +26,7 @@ ask_examples:
26
26
  - Can I point the wiki at my Obsidian vault?
27
27
  locale: en-US
28
28
  created: 2026-05-12
29
- updated: 2026-05-28
29
+ updated: 2026-06-07
30
30
  keywords:
31
31
  - wiki
32
32
  - wiki workspace
@@ -110,8 +110,8 @@ competes for budget with daily reactive memory.
110
110
  Aitne offers two modes:
111
111
 
112
112
  - **Internal** (recommended starting point) — the daemon owns the
113
- vault at `$PA_DATA_DIR/wiki`. No sandbox issues, daemon-managed
114
- snapshots, isolated from iCloud sync conflicts.
113
+ vault at `$PA_DATA_DIR/context/knowledge/wiki`. No sandbox issues,
114
+ daemon-managed snapshots, isolated from iCloud sync conflicts.
115
115
  - **External** — you point the wiki at an existing Obsidian vault on
116
116
  disk. The daemon writes directly when the filesystem allows, and
117
117
  falls back to the official Obsidian CLI when the vault sits in a