@aitne-sh/aitne 0.1.7 → 0.1.8

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 (222) hide show
  1. package/README.md +195 -829
  2. package/agent-assets/agent-profiles/_safety.md +49 -17
  3. package/agent-assets/agent-profiles/profile-importer.md +1 -1
  4. package/agent-assets/agent-profiles/routine.md +4 -3
  5. package/agent-assets/docs/concepts/agent-day.md +6 -1
  6. package/agent-assets/docs/concepts/auth-health.md +10 -1
  7. package/agent-assets/docs/concepts/backends-and-tiers.md +74 -40
  8. package/agent-assets/docs/concepts/costs-and-quotas.md +25 -5
  9. package/agent-assets/docs/concepts/delegated-mode.md +147 -68
  10. package/agent-assets/docs/concepts/memory-model.md +9 -4
  11. package/agent-assets/docs/concepts/observations.md +13 -1
  12. package/agent-assets/docs/concepts/process-keys.md +20 -5
  13. package/agent-assets/docs/concepts/routines.md +38 -20
  14. package/agent-assets/docs/concepts/safety-model.md +30 -13
  15. package/agent-assets/docs/concepts/skills.md +12 -7
  16. package/agent-assets/docs/features/integrations/calendar.md +1 -1
  17. package/agent-assets/docs/features/integrations/git.md +2 -2
  18. package/agent-assets/docs/features/integrations/github.md +9 -2
  19. package/agent-assets/docs/features/integrations/mail.md +1 -1
  20. package/agent-assets/docs/features/integrations/notion.md +34 -6
  21. package/agent-assets/docs/features/integrations/obsidian.md +7 -2
  22. package/agent-assets/docs/features/lifestyle/git.md +4 -7
  23. package/agent-assets/docs/features/lifestyle/receipts.md +17 -2
  24. package/agent-assets/docs/features/lifestyle/travel-bookings.md +15 -0
  25. package/agent-assets/docs/features/lifestyle/travel-time.md +7 -1
  26. package/agent-assets/docs/features/memory-files/agent-journal.md +2 -2
  27. package/agent-assets/docs/features/memory-files/projects.md +6 -0
  28. package/agent-assets/docs/features/memory-files/roadmap.md +5 -0
  29. package/agent-assets/docs/features/memory-files/today.md +1 -0
  30. package/agent-assets/docs/features/memory-files/user-profile.md +6 -0
  31. package/agent-assets/docs/features/messaging/bang-commands.md +20 -10
  32. package/agent-assets/docs/features/messaging/discord.md +12 -1
  33. package/agent-assets/docs/features/messaging/overview.md +10 -7
  34. package/agent-assets/docs/features/messaging/slack.md +13 -1
  35. package/agent-assets/docs/features/messaging/telegram.md +7 -1
  36. package/agent-assets/docs/features/messaging/whatsapp.md +12 -1
  37. package/agent-assets/docs/features/operations/activity-and-conversations.md +2 -2
  38. package/agent-assets/docs/features/operations/approvals.md +6 -0
  39. package/agent-assets/docs/features/operations/backend-routing.md +7 -0
  40. package/agent-assets/docs/features/operations/cost-tracking.md +6 -0
  41. package/agent-assets/docs/features/operations/notifications.md +6 -0
  42. package/agent-assets/docs/features/operations/schedule-approaching.md +22 -9
  43. package/agent-assets/docs/features/routines/custom-routines.md +10 -4
  44. package/agent-assets/docs/features/routines/evening-review.md +1 -1
  45. package/agent-assets/docs/features/routines/hourly-check.md +1 -1
  46. package/agent-assets/docs/features/routines/morning-routine.md +24 -15
  47. package/agent-assets/docs/features/routines/weekly-review.md +38 -12
  48. package/agent-assets/docs/features/wiki/commands.md +11 -0
  49. package/agent-assets/docs/features/wiki/overview.md +13 -3
  50. package/agent-assets/docs/getting-started/01-what-is-this.md +32 -11
  51. package/agent-assets/docs/getting-started/02-first-steps.md +17 -4
  52. package/agent-assets/docs/getting-started/03-what-can-this-do.md +21 -11
  53. package/agent-assets/docs/getting-started/04-first-day.md +14 -0
  54. package/agent-assets/docs/glossary.md +65 -12
  55. package/agent-assets/docs/guides/add-a-custom-routine.md +12 -0
  56. package/agent-assets/docs/guides/backup-and-restore.md +16 -2
  57. package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +6 -0
  58. package/agent-assets/docs/guides/build-your-wiki.md +14 -0
  59. package/agent-assets/docs/guides/change-which-model-handles-x.md +7 -0
  60. package/agent-assets/docs/guides/connect-a-new-mail-account.md +16 -0
  61. package/agent-assets/docs/guides/explore-with-trace-and-connect.md +6 -0
  62. package/agent-assets/docs/guides/import-knowledge-file.md +11 -0
  63. package/agent-assets/docs/guides/install-and-run.md +20 -4
  64. package/agent-assets/docs/guides/maintain-wiki-health.md +6 -0
  65. package/agent-assets/docs/guides/migrate-machines.md +13 -1
  66. package/agent-assets/docs/guides/multiple-wikis-for-multiple-domains.md +9 -0
  67. package/agent-assets/docs/guides/pause-the-agent.md +12 -4
  68. package/agent-assets/docs/guides/reinstall-cleanly.md +19 -4
  69. package/agent-assets/docs/guides/setup-wizard.md +20 -9
  70. package/agent-assets/docs/guides/switch-default-backend.md +10 -1
  71. package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +5 -0
  72. package/agent-assets/docs/reference/api.md +29 -1
  73. package/agent-assets/docs/reference/cli-commands.md +22 -3
  74. package/agent-assets/docs/reference/config.md +37 -5
  75. package/agent-assets/docs/reference/disallowed-tools.md +13 -0
  76. package/agent-assets/docs/reference/keyboard-shortcuts.md +13 -0
  77. package/agent-assets/docs/reference/process-keys.md +70 -20
  78. package/agent-assets/docs/reference/skills.md +27 -9
  79. package/agent-assets/docs/troubleshooting/auth-failed.md +7 -2
  80. package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +13 -1
  81. package/agent-assets/docs/troubleshooting/fallback-keeps-firing.md +10 -0
  82. package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +11 -0
  83. package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +9 -4
  84. package/agent-assets/docs/troubleshooting/observation-not-detected.md +12 -0
  85. package/agent-assets/docs/troubleshooting/quota-exhausted.md +7 -1
  86. package/agent-assets/docs/troubleshooting/wiki-ingest-full-blocked.md +5 -0
  87. package/agent-assets/docs/troubleshooting/wiki-write-failed.md +5 -0
  88. package/agent-assets/optimizer-skills/drift-analysis/SKILL.md +1 -1
  89. package/agent-assets/optimizer-skills/skill-curation/SKILL.md +2 -2
  90. package/agent-assets/skills/agent-actions/SKILL.md +122 -0
  91. package/agent-assets/skills/attach/SKILL.md +1 -2
  92. package/agent-assets/skills/context/SKILL.md +36 -454
  93. package/agent-assets/skills/context/references/api.md +220 -0
  94. package/agent-assets/skills/context/references/required-frontmatter.md +73 -0
  95. package/agent-assets/skills/context/references/snapshot-files.md +103 -0
  96. package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +1 -1
  97. package/agent-assets/skills/docs-search/SKILL.md +13 -13
  98. package/agent-assets/skills/external-services/SKILL.delegated.claude.md +5 -7
  99. package/agent-assets/skills/external-services/SKILL.delegated.codex.md +5 -7
  100. package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +5 -7
  101. package/agent-assets/skills/external-services/SKILL.md +6 -259
  102. package/agent-assets/skills/external-services/SKILL.native.claude.md +1 -2
  103. package/agent-assets/skills/external-services/SKILL.native.codex.md +1 -2
  104. package/agent-assets/skills/external-services/SKILL.native.gemini.md +1 -2
  105. package/agent-assets/skills/external-services/references/calendar-apple.md +97 -0
  106. package/agent-assets/skills/external-services/references/calendar-google.md +72 -0
  107. package/agent-assets/skills/external-services/references/calendar-outlook.md +36 -0
  108. package/agent-assets/skills/external-services/references/github.md +17 -0
  109. package/agent-assets/skills/external-services/references/obsidian.md +49 -0
  110. package/agent-assets/skills/external-services/references/skills-crud.md +27 -0
  111. package/agent-assets/skills/gmail-lifestyle/SKILL.md +224 -0
  112. package/agent-assets/skills/gmail-lifestyle/references/receipts-api.md +93 -0
  113. package/agent-assets/skills/gmail-lifestyle/references/travel-bookings-api.md +75 -0
  114. package/agent-assets/skills/gmail-lifestyle/references/travel-time-api.md +59 -0
  115. package/agent-assets/skills/mail/SKILL.delegated.claude.md +1 -1
  116. package/agent-assets/skills/mail/SKILL.delegated.codex.md +1 -1
  117. package/agent-assets/skills/mail/SKILL.delegated.gemini.md +1 -1
  118. package/agent-assets/skills/mail/SKILL.md +9 -114
  119. package/agent-assets/skills/mail/SKILL.native.claude.md +1 -1
  120. package/agent-assets/skills/mail/SKILL.native.codex.md +1 -1
  121. package/agent-assets/skills/mail/SKILL.native.gemini.md +1 -1
  122. package/agent-assets/skills/mail/references/api.md +108 -0
  123. package/agent-assets/skills/mail/references/examples.md +70 -0
  124. package/agent-assets/skills/mail/references/providers.md +8 -8
  125. package/agent-assets/skills/managed-tasks/SKILL.md +472 -0
  126. package/agent-assets/skills/managed-tasks/references/errors.md +70 -0
  127. package/agent-assets/skills/managed-tasks/references/output-path.md +75 -0
  128. package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +86 -0
  129. package/agent-assets/skills/management-policy/SKILL.md +33 -105
  130. package/agent-assets/skills/management-policy/references/policy-workflow.md +101 -0
  131. package/agent-assets/skills/notify/SKILL.md +6 -78
  132. package/agent-assets/skills/notify/references/priority.md +60 -0
  133. package/agent-assets/skills/notion/SKILL.delegated.claude.md +1 -1
  134. package/agent-assets/skills/notion/SKILL.delegated.codex.md +1 -1
  135. package/agent-assets/skills/notion/SKILL.delegated.gemini.md +1 -1
  136. package/agent-assets/skills/notion/SKILL.md +6 -10
  137. package/agent-assets/skills/notion/SKILL.native.claude.md +1 -2
  138. package/agent-assets/skills/notion/SKILL.native.codex.md +1 -2
  139. package/agent-assets/skills/notion/SKILL.native.gemini.md +1 -2
  140. package/agent-assets/skills/observations/SKILL.md +1 -6
  141. package/agent-assets/skills/project-doc/SKILL.md +1 -5
  142. package/agent-assets/skills/reading/SKILL.md +2 -2
  143. package/agent-assets/skills/roadmap/SKILL.md +37 -135
  144. package/agent-assets/skills/roadmap/references/api.md +100 -0
  145. package/agent-assets/skills/roadmap/references/cross-check.md +73 -0
  146. package/agent-assets/skills/roadmap/references/migration.md +56 -0
  147. package/agent-assets/skills/roadmap/references/preparation-timeline.md +2 -2
  148. package/agent-assets/skills/schedule/SKILL.md +52 -88
  149. package/agent-assets/skills/schedule/references/batch.md +93 -0
  150. package/agent-assets/skills/schedule/references/errors.md +214 -0
  151. package/agent-assets/skills/schedule/references/model-selection.md +96 -0
  152. package/agent-assets/skills/schedule/references/recurrence-rule.md +86 -0
  153. package/agent-assets/skills/schedule/references/recurring.md +185 -0
  154. package/agent-assets/skills/scheduled-managed-task/SKILL.md +13 -15
  155. package/agent-assets/skills/today/SKILL.md +27 -57
  156. package/agent-assets/skills/today/references/agent-plan-lifecycle.md +113 -0
  157. package/agent-assets/skills/user-interview/SKILL.md +12 -59
  158. package/agent-assets/skills/user-interview/references/op-briefing.md +51 -0
  159. package/agent-assets/skills/user-interview/references/op-morning.md +59 -0
  160. package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +1 -1
  161. package/agent-assets/skills/user-profile/SKILL.md +43 -63
  162. package/agent-assets/skills/user-profile/references/character-preferences.md +83 -0
  163. package/agent-assets/skills/user-profile/seeds/topic-files.seed.json +28 -0
  164. package/agent-assets/skills/wiki/wiki-ask/SKILL.md +0 -1
  165. package/agent-assets/skills/wiki/wiki-compile/SKILL.md +0 -1
  166. package/agent-assets/skills/wiki/wiki-connect/SKILL.md +0 -1
  167. package/agent-assets/skills/wiki/wiki-graduate/SKILL.md +0 -1
  168. package/agent-assets/skills/wiki/wiki-ingest/SKILL.md +0 -1
  169. package/agent-assets/skills/wiki/wiki-lint/SKILL.md +0 -1
  170. package/agent-assets/skills/wiki/wiki-trace/SKILL.md +0 -1
  171. package/agent-assets/skills/wiki/wiki-vault-rules/SKILL.md +0 -1
  172. package/agent-assets/system-prompts/routine-fetch-window.md +68 -0
  173. package/agent-assets/system-prompts/skill-index-instruction.md +26 -0
  174. package/agent-assets/task-flows/_partials/calendar-acquire.google_calendar.md +18 -11
  175. package/agent-assets/task-flows/_partials/calendar-acquire.outlook_calendar.md +16 -9
  176. package/agent-assets/task-flows/_partials/capture-user-info.md +24 -0
  177. package/agent-assets/task-flows/_partials/confirm-subflow.md +68 -0
  178. package/agent-assets/task-flows/_partials/dm-intent.long-horizon.md +35 -0
  179. package/agent-assets/task-flows/_partials/dm-intent.project.md +391 -0
  180. package/agent-assets/task-flows/_partials/mail-acquire.gmail.md +20 -11
  181. package/agent-assets/task-flows/_partials/mail-acquire.outlook_mail.md +17 -9
  182. package/agent-assets/task-flows/_partials/notion-acquire.notion.md +18 -12
  183. package/agent-assets/task-flows/knowledge.import.md +1 -1
  184. package/agent-assets/task-flows/message.received.dm.md +13 -15
  185. package/agent-assets/task-flows/message.received.dm_first.md +10 -14
  186. package/agent-assets/task-flows/routine.custom.md +3 -1
  187. package/agent-assets/task-flows/routine.evening_review.md +39 -163
  188. package/agent-assets/task-flows/routine.fetch_window.md +17 -12
  189. package/agent-assets/task-flows/routine.hourly_check.md +16 -8
  190. package/agent-assets/task-flows/routine.hourly_check.triage.md +1 -1
  191. package/agent-assets/task-flows/routine.monthly_review.md +46 -4
  192. package/agent-assets/task-flows/routine.morning_routine_journal.md +113 -0
  193. package/agent-assets/task-flows/routine.morning_routine_today.md +673 -0
  194. package/agent-assets/task-flows/routine.roadmap_refresh.md +60 -15
  195. package/agent-assets/task-flows/routine.user_profile_sweep.md +9 -10
  196. package/agent-assets/task-flows/routine.weekly_review.md +285 -70
  197. package/agent-assets/task-flows/scheduled.dm.md +8 -8
  198. package/agent-assets/task-flows/scheduled.task.md +5 -5
  199. package/agent-assets/task-flows/setup.initial.md +165 -245
  200. package/agent-assets/task-flows/wiki.ingest_url.md +1 -1
  201. package/agent-assets/templates/_manifest.json +7 -7
  202. package/agent-assets/templates/dossiers/_index.md +1 -1
  203. package/agent-assets/templates/rules/journal-format.md +145 -38
  204. package/agent-assets/templates/user/expertise.md +4 -2
  205. package/agent-assets/templates/user/goals.md +4 -2
  206. package/agent-assets/templates/user/people.md +8 -2
  207. package/agent-assets/templates/user/personal.md +4 -2
  208. package/agent-assets/templates/user/work.md +4 -2
  209. package/bin/aitne.mjs +8 -1
  210. package/package.json +4 -4
  211. package/scripts/commands/doctor.mjs +52 -0
  212. package/scripts/commands/run-now.mjs +202 -0
  213. package/scripts/commands/verify.mjs +264 -0
  214. package/agent-assets/docs/features/routines/monthly-review.md +0 -65
  215. package/agent-assets/skills/management-task-modify/SKILL.md +0 -203
  216. package/agent-assets/skills/management-task-register/SKILL.md +0 -330
  217. package/agent-assets/skills/management-task-stop/SKILL.md +0 -166
  218. package/agent-assets/skills/receipts/SKILL.md +0 -134
  219. package/agent-assets/skills/travel/SKILL.md +0 -132
  220. package/agent-assets/skills/travel-time/SKILL.md +0 -158
  221. package/agent-assets/task-flows/routine.morning_routine.md +0 -322
  222. package/agent-assets/task-flows/routine.morning_routine_initial.md +0 -204
@@ -63,11 +63,19 @@ coordinates the high-level gather → analyze → write loop.
63
63
  log one line to `## Agent Log`, drop that provider's events for this
64
64
  run, and proceed — do not retry inline.
65
65
 
66
+ **Cover the full 90-day window with equal priority.** The live
67
+ calendar poller only watches the next ~15 days, so any event the
68
+ user scheduled farther out reaches `roadmap.md` *exclusively*
69
+ through this routine — under-coverage of the day+15 → day+90
70
+ horizon is the primary failure mode this refresh is designed to
71
+ prevent. Read every day of the block (including empty days, which
72
+ render as `- (no events)`), not just this week.
73
+
66
74
  2. Fetch pending and running scheduled tasks:
67
75
  ```
68
76
  curl -s 'http://localhost:8321/api/schedule?status=pending,running&roadmapEligible=true'
69
77
  ```
70
- The response is `{ items: [{ id, scheduledFor, taskType, description, status, model, taskContext, createdAt }, ...] }`.
78
+ The response is `{ items: [{ id, scheduledFor, taskType, description, status, model, backendId, tier, taskContext, createdAt }, ...] }`. `model` is a registered id verbatim (`claude-opus-4-7`, `gpt-5.4`, …) paired with `backendId` when the row pins a specific model; otherwise the pin lives in `tier`.
71
79
  The daemon has already applied the roadmap visibility filter:
72
80
  `transient` / `low` are excluded, `normal` / unspecified rows are
73
81
  included only beyond the 7-day horizon, and `strategic` rows are
@@ -95,9 +103,10 @@ coordinates the high-level gather → analyze → write loop.
95
103
  ```
96
104
  Use these for the `roadmap` skill's `travel_bookings` cross-check
97
105
  when emitting or refining event entries — mark corresponding `[check]`
98
- prep lines with `✓` and record the confirmation number in **Agent
99
- Notes**. A booking whose `start_date` is ≥ 48h out without a matching
100
- calendar event is itself a trigger for a new event entry.
106
+ prep lines as `completed` Preparation Timeline rows and record the
107
+ confirmation number in **Agent Notes**. A booking whose `start_date`
108
+ is ≥ 48h out without a matching calendar event is itself a trigger
109
+ for a new event entry.
101
110
 
102
111
  5. Scan `<recent_dm_conversation_log days="7">` for long-horizon user
103
112
  intent that has not yet landed anywhere (e.g. *"going to LA next
@@ -127,8 +136,14 @@ coordinates the high-level gather → analyze → write loop.
127
136
 
128
137
  4. Build `## Agent Action Plan` by **merge-by-id**, not wholesale
129
138
  anonymous regeneration.
130
- 1. For each significant calendar event or booking in the next 90
131
- days, compute the intended roadmap ID. Prefer:
139
+ 1. For each dated calendar event or booking in the next 90 days
140
+ that the `roadmap` skill's decision tree routes to Agent Action
141
+ Plan (specific date >48h out), compute the intended roadmap ID.
142
+ Apply the noise filter (see `### Important` below) conservatively
143
+ — events more than 30 days out **default to include**: at that
144
+ horizon they are almost always deliberate user signals, and
145
+ absence from the existing roadmap means creation, not noise.
146
+ Prefer:
132
147
  explicit `roadmap_entry_id` / `payload.roadmap_entry_id` from a
133
148
  queued observation; else an existing AAP entry with the same ID;
134
149
  else an existing Long-term Plan candidate matched conservatively
@@ -136,7 +151,7 @@ coordinates the high-level gather → analyze → write loop.
136
151
  matching only during migration; else mint a fresh ID via
137
152
  `POST /api/context/roadmap/id` using the Source/creation date.
138
153
  2. If an existing AAP entry has this ID, merge: keep every
139
- `✓ completed ...` Preparation Timeline row byte-for-byte; re-emit
154
+ `completed ...` Preparation Timeline row byte-for-byte; re-emit
140
155
  non-completed taxonomy rows only for gaps by lead-time offset.
141
156
  Never drop a completed row.
142
157
  3. If no existing entry has this ID, emit a fresh entry with the ID
@@ -160,7 +175,7 @@ coordinates the high-level gather → analyze → write loop.
160
175
  ```
161
176
  ### Scheduled: <description> (task #<id>) <!-- id: rm-YYYYMMDD-abcdef -->
162
177
  Source: scheduled.task — wake-up YYYY-MM-DD HH:MM
163
- Status: pending (or running / completed / failed)
178
+ Status: pending (or running / completed / failed)
164
179
  ```
165
180
 
166
181
  Keep `Scheduled:` entries and event entries interleaved in
@@ -197,7 +212,28 @@ coordinates the high-level gather → analyze → write loop.
197
212
  a day ago).
198
213
 
199
214
  ### Phase 3: Write
200
- 9. Always write the full roadmap via PUT, even when no substantive
215
+ 9. **Long-horizon coverage check (pre-PUT audit).** Before issuing the
216
+ PUT in step 10, walk every event in `<calendar_events_90d>` whose
217
+ start is between today+7d and today+90d and whose summary is
218
+ non-empty (skip `- (no events)` filler lines). Each such event must
219
+ end in exactly one of:
220
+ - represented in `## Agent Action Plan` (event entry or promotion
221
+ from `## Long-term Plans`), or
222
+ - represented in `## Long-term Plans` with a concrete horizon-tag
223
+ (when the calendar date is itself tentative and DM intent is the
224
+ stronger signal), or
225
+ - explicitly logged to `## Agent Log` with a one-line reason for
226
+ exclusion (e.g. `excluded: recurring weekly 1:1 — handled by
227
+ today.md`).
228
+
229
+ Silent drops are the failure mode this gate exists to surface. If
230
+ any event lacks one of the three resolutions, add the missing entry
231
+ or log line before proceeding to step 10. An audit with zero log
232
+ lines is fine when every event mapped cleanly into AAP / Long-term
233
+ Plans; a missed long-horizon trip / deadline / conference is the
234
+ specific regression this check is designed to prevent.
235
+
236
+ 10. Always write the full roadmap via PUT, even when no substantive
201
237
  changes were warranted. Update `> Last synced` to today's date on
202
238
  every run so the mtime advances deterministically. If
203
239
  `<roadmap_write_lock_id>` is in context, include it as the
@@ -235,7 +271,7 @@ coordinates the high-level gather → analyze → write loop.
235
271
 
236
272
  **Preparation Timeline:**
237
273
  - YYYY-MM-DD [tag]: Action description
238
- - completed YYYY-MM-DD: YYYY-MM-DD [tag]: Completed action
274
+ - completed YYYY-MM-DD: YYYY-MM-DD [tag]: Completed action
239
275
  - ...
240
276
 
241
277
  **Agent Notes:**
@@ -243,17 +279,17 @@ coordinates the high-level gather → analyze → write loop.
243
279
 
244
280
  ### Scheduled: <description> (task #<id>) <!-- id: rm-YYYYMMDD-abcdef -->
245
281
  Source: scheduled.task — wake-up YYYY-MM-DD HH:MM
246
- Status: pending
282
+ Status: pending
247
283
 
248
284
  ## Recurring
249
285
  (preserved verbatim from existing)
250
286
  ```
251
287
 
252
- 10. If the PUT returns 400 from the roadmap transition guard (for
288
+ 11. If the PUT returns 400 from the roadmap transition guard (for
253
289
  example, a completed row was dropped), recover once:
254
290
  1. Re-GET `/api/context/roadmap`.
255
291
  2. Re-run the merge using the current body as authoritative,
256
- preserving every `✓ completed ...` row byte-for-byte.
292
+ preserving every `completed ...` row byte-for-byte.
257
293
  3. retry the full PUT once with the same lock id.
258
294
  4. If the second write also returns 400, do not write the regenerated
259
295
  Agent Action Plan. Instead, PUT a minimal update that only bumps
@@ -267,5 +303,14 @@ coordinates the high-level gather → analyze → write loop.
267
303
  write a minimal roadmap preserving existing goals / Long-term Plans /
268
304
  Recurring with an empty `## Agent Action Plan`. Always bump
269
305
  `> Last synced`.
270
- - Keep roadmap.md concise — only include events that benefit from advance preparation.
271
- Skip routine daily meetings, standups, 1-on-1s, etc.
306
+ - Keep roadmap.md concise — but apply the inclusion bar **asymmetrically by
307
+ horizon**:
308
+ - **within today+14d**: only include events that benefit from advance
309
+ preparation; skip routine standups, 1:1s, daily meetings.
310
+ - **beyond today+14d**: default to **include** every dated, non-recurring
311
+ calendar event with a real summary. At that horizon entries are almost
312
+ always deliberate user signals, and a missed long-horizon trip /
313
+ deadline / conference is the failure mode this refresh exists to
314
+ prevent.
315
+ Recurring-series instances always belong in `## Recurring`, never in
316
+ `## Agent Action Plan`, regardless of horizon.
@@ -29,12 +29,12 @@ Do not guess at the bounds.
29
29
 
30
30
  ### Step 2 — Extract fact candidates
31
31
 
32
- Scan the window using the trigger shapes in the **user-profile**
33
- skill's "When to Update" section (identity, explicit preference,
34
- correction, etc.). For detail-heavy facts the DM-time capture block
35
- already routes people, work, expertise, personal, goals see the
36
- trigger-shape list in `message.received.dm.md` §"Capture user info"
37
- for the canonical enumeration. Apply the same routing here.
32
+ Apply the canonical capture-user-info routing below to the agent-day
33
+ DM window (`<agent_day_messages>` + `<agent_day_dm_conversation_log>`).
34
+ This is the same trigger/routing surface the DM handler uses — the
35
+ sweep is the safety net for facts the DM-time capture missed.
36
+
37
+ {include:_partials/capture-user-info.md}
38
38
 
39
39
  Focus on persistent facts the user **stated about themselves**. Ignore
40
40
  one-off references, speculative inferences, and facts already
@@ -83,9 +83,8 @@ Notification Preferences, Learned Context — plus the five
83
83
  Do **not** touch `## Raw Signals` — that section belongs to
84
84
  `SignalDetector` only. Tone / style / voice / formality / emoji /
85
85
  language preferences do **not** belong in profile.md either — route
86
- those to the `character` runtime-config field via PATCH
87
- /api/config/character (see user-profile skill §"Tone / character
88
- preferences"). Learned
86
+ those per the **user-profile** skill §"Tone / character
87
+ preferences". Learned
89
88
  Context has multiple writers (DM handler, this sweep, Evening Review
90
89
  Step 3a's Raw Signals graduation); read-before-write and merge, never
91
90
  rewrite the whole section to add a single bullet.
@@ -169,7 +168,7 @@ curl -s -X POST http://localhost:8321/api/schedule \
169
168
  "time": "<tomorrow ISO8601 with offset>",
170
169
  "taskType": "dm_session",
171
170
  "description": "profile_interview:<id> — <ask-hint from Pending row>",
172
- "model": "sonnet",
171
+ "tier": "medium",
173
172
  "taskContext": {
174
173
  "scheduledBy": "user_profile_sweep_fallback",
175
174
  "queueId": "<id>",
@@ -16,9 +16,18 @@ a `PUT` full rewrite keep the frontmatter and only refresh `updated:`
16
16
 
17
17
  Generate the weekly review snapshot for the current ISO week and prepare next-week priorities.
18
18
 
19
+ The `## Carry Over to Next Week`, `## Next Week Focus`, and `## Lessons
20
+ for Next Week` sections you write here are not just a snapshot — they
21
+ are lifted into **every** morning_routine of the next ISO week (Mon–Sun)
22
+ via the `<previous_week>` context block. Treat them as load-bearing
23
+ input to next week's daily planning, not as an artifact the user reads
24
+ once. Full design: `docs/design/appendices/weekly-next-week-leverage.md`.
25
+
19
26
  This routine produces **two separate artifacts** with strict audience boundaries:
20
- - **User-facing**: `weekly/YYYY-Www.md` + (optionally) a short notification.
21
- Only real user outcomes and next-week focus. No agent mechanics.
27
+ - **User-facing**: `weekly/YYYY-Www.md` + a short Friday-evening
28
+ notification (default send; narrow silence gate in Phase 4a).
29
+ Only real user outcomes — no agent mechanics, no fabricated
30
+ positivity. Tone: brief, warm, weekend-close.
22
31
  - **Agent-internal**: `agent/journal.md` (append). Self-reflection, filter
23
32
  quality, system improvement ideas, failed scheduled actions, pipeline
24
33
  observations. **Never** surfaced to the user via notify.
@@ -29,32 +38,49 @@ workflow; the skill owns the file contract.
29
38
  ### Phase 1: Gather the week
30
39
  1. Determine the target file name from <current_time>:
31
40
  `weekly/YYYY-Www.md` (ISO week in the daemon timezone).
32
- 2. Read the past-7-day calendar retrospective. The pre-pass fetcher
33
- session (`routine.fetch_window`) ran ahead of you and posted
34
- observations for the `cal_past_7d` window for every active calendar
35
- integration (Google + Outlook). The `<fetch_report>` block in your
36
- prompt tells you the pre-pass status `success` / `partial` means
37
- the table is fresh; `failed` / `skipped` means trust nothing newer
38
- than the prior tick and treat the retrospective as best-effort. The
39
- ContextBuilder block `<calendar_events_7d>` already covers the
40
- forward-looking next-7-days view; this step adds the retrospective
41
- complement so the review surfaces what actually happened, not just
42
- what's coming next.
43
-
44
- Drain pending past-week observations:
41
+ 2. Read the current-ISO-week calendar retrospective. The pre-pass
42
+ fetcher session (`routine.fetch_window`) ran ahead of you and posted
43
+ observations for the `cal_iso_week_to_now` window for every active
44
+ calendar integration (Google + Outlook). That window spans from
45
+ **Monday 00:00 local** of the current ISO week through **now**, so
46
+ the retrospective covers exactly the days the archived
47
+ `daily/YYYY-MM-DD.md` files are keyed on no rolling drift into
48
+ last week's tail, and no missing today's events. The
49
+ `<fetch_report>` block in your prompt tells you the pre-pass
50
+ status `success` / `partial` means the table is fresh;
51
+ `failed` / `skipped` means trust nothing newer than the prior tick
52
+ and treat the retrospective as best-effort. The ContextBuilder
53
+ block `<calendar_events_7d>` already covers the forward-looking
54
+ next-7-days view; this step adds the retrospective complement so the
55
+ review surfaces what actually happened this week, not just what's
56
+ coming next.
57
+
58
+ Drain pending current-ISO-week observations. The pre-pass posted
59
+ them just now under `pending=true`, so a single bounded fetch is
60
+ sufficient — no `observed_at_after` filter needed:
45
61
 
46
62
  ```
47
- GET /api/observations?pending=true&source_prefix=google_calendar:,outlook_calendar:&observed_at_after=<week_start_iso>&limit=200
63
+ GET /api/observations?pending=true&source_prefix=google_calendar:,outlook_calendar:&limit=200
48
64
  ```
49
65
 
50
66
  Treat each row's `payload.raw` (`title` / `start` / `end` /
51
67
  `attendees` / `status`) as authoritative; cross-reference against the
52
68
  daily files in step 3 below to disambiguate attended vs cancelled
53
- meetings.
54
- 3. Fetch the source days for the current week:
69
+ meetings. If a row's `payload.raw.start` falls outside the current
70
+ ISO week (e.g. a stale pending row from an earlier weekly_review
71
+ that never reached the consume step), ignore it for this synthesis
72
+ but still let the consume call sweep it so it doesn't bias next
73
+ week's run.
74
+ 3. Fetch the source days for the current ISO week:
55
75
  - Use GET /api/context/list/daily to discover archived daily files.
56
76
  - Read each `daily/YYYY-MM-DD.md` whose date falls in the current ISO week.
57
- - Include <today> as the in-progress final day if it belongs to the same week.
77
+ - Include <today> as the in-progress final day. On the Friday-evening
78
+ cron run, the daily archive carries Mon–Thu and `<today>` carries
79
+ Friday-in-progress; Saturday and Sunday have not happened yet, and
80
+ the next morning's `morning_routine` will not have archived
81
+ Friday's daily file yet either. That is the working dataset — do
82
+ not invent Sat/Sun content; the `## Metrics` and `## Period`
83
+ fields below describe this honestly.
58
84
  4. Use <roadmap>, <active_projects>, and <calendar_events_7d> to understand:
59
85
  - which milestones moved this week (cross-reference with Step 2's
60
86
  retrospective observations),
@@ -63,12 +89,32 @@ workflow; the skill owns the file contract.
63
89
 
64
90
  ### Phase 2: Synthesize — split into two buckets
65
91
  5. Build TWO separate mental lists before writing anything:
66
- a. **User-facing bucket** (goes to `weekly/YYYY-Www.md` and possibly notify):
67
- - What meaningful user work moved forward this week?
68
- - Which user tasks or commitments slipped or stalled (with the reason
69
- the USER cares about "blocked on Sarah's reply", not "agent skipped
70
- reminder")?
71
- - What should the user focus on next week?
92
+ a. **User-facing bucket** (goes to `weekly/YYYY-Www.md` and possibly notify).
93
+ Synthesize along **three axes**:
94
+ i. **Outcomes** what meaningful user work moved forward this week,
95
+ and which user tasks / commitments slipped or stalled (with the
96
+ reason the USER cares about — "blocked on Sarah's reply", not
97
+ "agent skipped reminder").
98
+ ii. **Forward items** — what should the user focus on next week, and
99
+ which open loops carry forward. Each carry-over needs the
100
+ one-line reason / blocker that lets the upcoming morning_routine
101
+ judge whether it is still hot.
102
+ iii. **Behavioral lessons** — patterns in *how* the user worked this
103
+ week, distilled into **a concrete forward adjustment** for next
104
+ week. The format is **observation → next-week action**, not
105
+ free-floating commentary. Each line must:
106
+ - Cite evidence from this week's `daily/*.md`,
107
+ `<yesterday_messages>`, or `<calendar_events_7d>` (not
108
+ speculation). If the data does not show a pattern, write no
109
+ lesson — fabrication is forbidden.
110
+ - End in a **testable, specific action** the user could take
111
+ next week. "Focus better" is not testable; "Block Tue/Wed
112
+ 9-11 on calendar" is.
113
+ - Stay user-actionable. Agent-side filter-quality observations
114
+ belong in the agent-internal bucket (see (b) below), not
115
+ here.
116
+ Hard cap: 3 lessons. Two is fine; zero is fine. Padding to three
117
+ dilutes the signal that downstream morning_routines act on.
72
118
  b. **Agent-internal bucket** (goes to `agent/journal.md` only):
73
119
  - Scheduled tasks / reminders that did-not-fire or failed, and any
74
120
  pattern behind the failures
@@ -95,7 +141,8 @@ workflow; the skill owns the file contract.
95
141
  updated: YYYY-MM-DD
96
142
  ---
97
143
  # Weekly Review YYYY-Www
98
- > Period: YYYY-MM-DD to YYYY-MM-DD
144
+ > ISO week: YYYY-MM-DD (Mon) YYYY-MM-DD (Sun)
145
+ > Evaluated through: YYYY-MM-DD HH:MM (Sat/Sun not yet observed)
99
146
  > Generated at: YYYY-MM-DD HH:MM
100
147
 
101
148
  ## Highlights
@@ -112,12 +159,68 @@ workflow; the skill owns the file contract.
112
159
  - User tasks carried over: N
113
160
  - Key meetings / commitments kept: N
114
161
 
115
- ## Next Week Priorities
116
- - ...
162
+ ## Carry Over to Next Week
163
+ - <Open loop A> — <one-line user-meaningful reason / blocker>
164
+ - <Open loop B> — <one-line user-meaningful reason / blocker>
165
+
166
+ ## Next Week Focus
167
+ - <Top priority 1>
168
+ - <Top priority 2>
169
+
170
+ ## Lessons for Next Week
171
+ - <observation from this week's data> → <specific next-week action>
172
+ - <observation> → <specific next-week action>
117
173
  ```
118
174
  The `## Metrics` section tracks **user** activity only. Do not add rows
119
175
  like "agent plan rows completed", "scheduled tasks fired", "observations
120
176
  processed" — those are agent mechanics and belong in agent/journal.md.
177
+
178
+ **`## Carry Over to Next Week`, `## Next Week Focus`, and `## Lessons
179
+ for Next Week` are import-targeted sections** — every morning of the
180
+ next ISO week, `morning_routine` lifts these three sections
181
+ mechanically from this file via the `<previous_week>` context block
182
+ (see `routine.morning_routine.md` "Previous-week leverage" step).
183
+ Treat the contract as load-bearing:
184
+ - **Carry Over** — max **5** bullets. Each must point at a real
185
+ `## Open Loops` entry from this same file (not aspirational items),
186
+ and include a short reason / blocker so next week's morning_routines
187
+ can decide whether the loop is still hot or has been overtaken by
188
+ the week's events. If there are no genuine carry-overs, leave the
189
+ section body empty — the `<previous_week>` renderer surfaces an
190
+ explicit `(none recorded)` placeholder so next week's morning_routine
191
+ sees the same "deliberately none" signal it sees for an empty
192
+ Focus or Lessons section. Do not write `- (none)` (it would be
193
+ extracted verbatim and clash with the placeholder for the other
194
+ two sections).
195
+ - **Next Week Focus** — max **3** bullets, ordered. The "if you only
196
+ did three things next week" list. Each item should be specific
197
+ enough that next week's `today.md` priority selection can use it
198
+ verbatim as a candidate. If next week's focus is unclear from this
199
+ week's data, write fewer items rather than padding to three.
200
+ - **Lessons for Next Week** — max **3** bullets, format
201
+ `<observation> → <specific next-week action>`. Source the
202
+ observations from Phase 2 (a) (iii) "Behavioral lessons" axis.
203
+ Examples that conform:
204
+ - `Tue/Wed deep-work mornings were eaten by ad-hoc meetings → block Tue/Wed 9–11 on calendar`
205
+ - `Email replies started after 14:00 mostly slid to the next day → handle first wave by 11:00`
206
+ Examples that violate (do NOT write these):
207
+ - `Focus more next week` — no observation, no testable action.
208
+ - `Be more disciplined about email` — no concrete adjustment.
209
+ - `Agent over-notified on Tuesday` — agent mechanics; belongs in
210
+ agent/journal.md, never here.
211
+ Zero lessons is acceptable. Padding is worse than silence — the
212
+ morning_routine's only job with a fabricated lesson is to ignore it,
213
+ which trains the loop to ignore real ones too.
214
+ - All three lists are caps, not quotas. Exceeding any signals
215
+ over-promising; the morning_routine cannot productively act on a
216
+ Carry Over longer than 5, a Focus longer than 3, or Lessons longer
217
+ than 3.
218
+ - Section headings must match exactly — the digest extractor is
219
+ header-regex bound. Do not rename, translate, or pluralize.
220
+ - Body bullets are surfaced to the agent in
221
+ `<output_language_policy>`'s body language; the H2 headers
222
+ themselves stay in English per Policy B (skeleton headers fixed,
223
+ prose follows `<settings primary_language>`).
121
224
  8. If the review reveals roadmap drift or stale project status, update
122
225
  roadmap.md and the relevant projects/*.md in the same session.
123
226
 
@@ -167,62 +270,174 @@ workflow; the skill owns the file contract.
167
270
  overwrite the old section in place.
168
271
 
169
272
  ### Phase 4: Notify (user-facing only)
170
- 10. The notification is for the USER, not a report of Phases 1–3. Never
171
- mention weekly/YYYY-Www.md, agent/journal.md, "Weekly Review complete",
172
- agent plan rows, did-not-fire, filter quality, observation processing,
173
- or any other internal mechanism.
174
-
175
- #### 4a. Silence gate — decide whether to notify at all
176
- Prefer silence over noise. Send **no notification** if ALL of the following
177
- hold:
178
- - Fewer than 2 Highlights worth naming (a quiet week)
179
- - No Open Loops the user is not already aware of
180
- - No Next Week priority that needs a heads-up tonight (the user will see
181
- it in Monday's morning briefing anyway)
182
- - No hard deadline within the next 7 days
183
- When the gate triggers: skip POST /api/notify entirely. The weekly/YYYY-Www.md
184
- file is still written (user can open it on demand); just no push. Also log
185
- one line into agent/journal.md's "What worked" subsection:
186
- `silent weekly wrap-up — nothing actionable`.
273
+ 10. The notification is a brief, warm end-of-week touchpoint for the USER
274
+ — not a report of Phases 1–3. Never mention weekly/YYYY-Www.md,
275
+ agent/journal.md, "Weekly Review complete", agent plan rows,
276
+ did-not-fire, filter quality, observation processing, or any other
277
+ internal mechanism.
278
+
279
+ The default posture for this notification is **send**. Friday evening
280
+ is a natural touchpoint and the user opted into receiving one. Skip
281
+ only under the narrow silence gate in 4a.
282
+
283
+ #### 4a. Silence gate skip only when the week was essentially blank
284
+ Send **no notification** only if ALL of these hold:
285
+ - Zero daily files in `daily/` were updated this week, AND
286
+ - No completed user work surfaced in Phase 1 (highlights and completed
287
+ lists in the weekly file would both be empty)
288
+ In a normal week even a low-activity one — notify.
289
+
290
+ When the gate triggers: skip POST /api/notify entirely. The weekly file
291
+ is still written (user can open it on demand). Append one bullet under
292
+ agent/journal.md "What worked": `silent weekly wrap-up — quiet week`.
293
+
294
+ **Silence-path × leverage loop.** A silent-path week still PUTs the
295
+ full Phase 3a structure. Carry Over / Next Week Focus / Lessons may be
296
+ legitimately empty when the week was blank — leave their bodies empty
297
+ (do **not** write `- (none)` placeholders). Next week's morning_routine
298
+ will see `<carry_over>` / `<focus>` / `<lessons>` rendered as
299
+ `(none recorded)` and skip them silently, which is the correct signal
300
+ that the prior week had nothing to lift.
187
301
 
188
302
  #### 4b. When you DO notify — content rules
189
- Output language: follow `<output_language_policy>`. Answer:
190
- 1. **One concrete win** from this week (1 line).
191
- 2. **At most one open loop** that carries into next week, with a brief
192
- user-meaningful reason. Omit if Open Loops is empty.
193
- 3. **The single most important focus for next week** (1 line).
194
-
195
- Optional 4th line: a hard deadline heads-up if one falls within the next 7
196
- days and the user has not yet acted on it.
303
+ Output language: follow `<output_language_policy>`. Compose in this order:
304
+
305
+ 1. **One concrete win from this week** (1 line). Must name an
306
+ artifact AND either the day it shipped or its concrete current
307
+ state.
308
+ ✓ "the design doc shipped Thursday" (artifact + day)
309
+ "auth refactor is in review, queued for Monday landing"
310
+ (artifact + state)
311
+ ✗ "solid progress on the auth refactor" (no artifact / day /
312
+ state — would read plausibly in any week)
313
+ If Phases 1–3 supply no concrete artifact + day/state, the
314
+ silence gate in 4a should fire — do not pad with generic praise.
315
+
316
+ 2. **Optional insight line — default is OMIT.** The canonical correct
317
+ output is **2 lines** (win + weekend close). Include line 2 only
318
+ when ONE of bar (a) or (b) clears unambiguously.
319
+
320
+ a. **Personalized pattern** — a real pattern in **this week's**
321
+ data. Must (i) cite specific instances (named tasks, calendar
322
+ entries, daily-file rows), (ii) rest on **≥3 concrete
323
+ instances** within the week (N=1 anecdotes do not qualify),
324
+ (iii) be about the user's behavior or outcomes, not external
325
+ factors.
326
+ ✓ "Worth noticing — every task you started before 10:00 closed
327
+ the same day; the four after-lunch starts mostly slid to
328
+ tomorrow." (two buckets + a count)
329
+ ✗ "Your mornings seemed more productive than afternoons this
330
+ week." (vague, no count — true of any week)
331
+
332
+ b. **Academic finding** — a well-known finding from psychology,
333
+ behavioral economics, cognitive science, or productivity
334
+ research that maps **specifically** to a concrete thing the
335
+ user did this week. **If you reach for hedge phrasing —
336
+ "studies suggest…", "research often shows…", "it is said
337
+ that…" — you are not confident the finding is real; omit.**
338
+ Match a specific week activity, not a generic proverb.
339
+ Register: "Worth knowing…" not "You should…" (advice
340
+ forbidden).
341
+ ✓ "Worth knowing: deep-work researchers find three consecutive
342
+ focused days tend to outperform five scattered ones for
343
+ shipping work like this."
344
+ ✗ "Worth noticing — small, consistent efforts compound over
345
+ time." (proverb, no named research area, generic)
346
+
347
+ **No-fabrication rule** (both bars):
348
+ - Numbers, percentages, deltas, week-over-week comparisons must
349
+ appear **literally in the data**. "30% harder", "doubled
350
+ throughput", "twice the rate" — forbidden unless real counts
351
+ you can point at.
352
+ - Vague intensifiers are padding, not insight: "crushed it",
353
+ "big momentum", "small efforts compound", etc. **Paste-test**:
354
+ if line 2 could fit any user's review and still read as
355
+ plausible, delete it.
356
+ - **First 2–3 weeks of operation** (few prior `weekly/*.md`):
357
+ skip line 2 unconditionally — insufficient data for patterns,
358
+ premature citations erode trust.
359
+
360
+ 3. **Weekend close** (1 line) — calendar-aware via
361
+ <calendar_events_7d>:
362
+ - Non-trivial commitment this weekend (work event, deadline,
363
+ exam, interview): brief specific encouragement tied to it
364
+ — e.g. "Good luck with the API review on Saturday."
365
+ - Something the user looks forward to (trip, celebration, hobby
366
+ block, social event): brief "enjoy" tied to it — e.g.
367
+ "Enjoy the trip to Portland."
368
+ - **Sensitive event categories** — medical / therapy / clinic /
369
+ legal / financial review / family-conflict titles (mediation,
370
+ custody, etc.): do NOT name the event. Use the neutral default
371
+ ("Have a good weekend.") — surfacing a sensitive event
372
+ unprompted in a Friday recap is intrusive even when the
373
+ category is right.
374
+ - Otherwise: a simple weekend close (e.g. "Have a good weekend.").
197
375
 
198
376
  #### 4c. Format rules (hard limits)
199
- - Maximum 4 short lines total. No markdown headers. No bullet list.
377
+ - 2 or 3 lines for the Phase 4 message (3 only if line 2 genuinely
378
+ earns its place). Phase 5 may add at most one additional reading
379
+ line via a separate POST under its own contract — that is the only
380
+ way the total reaches 4 lines. No markdown headers. No bullet
381
+ list. Plain prose.
200
382
  - Lead with the win, not with "Weekly Review" or any ceremony.
201
383
  - Forbidden vocabulary in the user-facing message: "Weekly Review",
202
- "weekly/", "agent-journal", "did-not-fire", "Agent Plan", "observations",
203
- "processed", "summary", "completed the review". These describe agent
204
- mechanics, not user outcomes. The same rule applies in whatever
205
- language the user prefers do not paste an equivalent meta-phrase.
384
+ "weekly/", "agent-journal", "did-not-fire", "Agent Plan",
385
+ "observations", "processed", "summary", "completed the review".
386
+ These describe agent mechanics, not user outcomes. The same rule
387
+ applies in whatever language `<output_language_policy>` resolves
388
+ to — do not paste an equivalent meta-phrase.
206
389
  - Priority `normal`. Respects quiet hours via the notify skill contract.
207
390
  - Exactly ONE notification via POST /api/notify. Do not split.
208
391
 
209
- #### 4d. Shape example (illustrative — render in the language `<output_language_policy>` resolves to)
210
- Good (something worth saying):
211
- Big win this week: the design doc shipped Thursday.
212
- Still open: the API spec review — Sarah back Monday.
213
- Next week's focus: auth refactor landing before the Q2 deadline.
392
+ #### 4d. Shape examples (illustrative — render in the language `<output_language_policy>` resolves to)
214
393
 
215
- Good (silent pathnothing is sent):
394
+ Good (3 linesthe insight is grounded in the week's data):
395
+ Big win this week: the design doc shipped Thursday.
396
+ Worth noticing — every task you started before 10:00 closed the
397
+ same day; the after-lunch starts mostly slid to tomorrow.
398
+ Good luck with the API review on Saturday.
399
+
400
+ Good (3 lines — the insight is a genuinely relevant academic tip):
401
+ You wrapped the auth refactor before the Q2 deadline — solid week.
402
+ Worth knowing: deep-work researchers find three consecutive focused
403
+ days tend to outperform five scattered ones for shipping work like
404
+ this.
405
+ Have a great weekend.
406
+
407
+ Good (2 lines — nothing earned the insight slot, so it's correctly
408
+ omitted):
409
+ The migration to the new schema landed Wednesday.
410
+ Enjoy the trip to Portland.
411
+
412
+ Good (silent path — quiet week, nothing sent):
216
413
  (no POST /api/notify call; one-line note appended to agent/journal.md)
217
414
 
218
- Bad (this is the failure mode this prompt exists to prevent):
415
+ Bad (fabricated positivity the failure mode the strict rule prevents):
416
+ Big win: design doc shipped Thursday.
417
+ You worked 30% harder than last week — keep it up!
418
+ Have a great weekend!
419
+
420
+ Bad (agent mechanics leaking):
219
421
  Weekly Review YYYY-Www complete. Wrote weekly/2026-W14.md with
220
422
  5 highlights, 3 open loops. Metrics: user tasks 7/10, agent plan
221
- rows 24, did-not-fire 2. Observations processed: 18. Next week
222
- priorities updated in roadmap.md.
223
-
224
- The bad example reports the agent's bookkeeping. Everything in it either
225
- belongs in agent/journal.md or was never worth telling the user.
423
+ rows 24, did-not-fire 2. ...
424
+
425
+ Bad (subtle padding — proverb-shaped insight that fails the line-2 bar):
426
+ Solid progress on the auth refactor this week.
427
+ Worth noticing small, consistent efforts often compound into
428
+ real momentum over time.
429
+ Have a good weekend.
430
+
431
+ The first bad example invented "30% harder" — there is no such measurement
432
+ in Phase 1. If you did not derive it from real data, do not write it.
433
+ The second bad example reports the agent's bookkeeping; everything in it
434
+ either belongs in agent/journal.md or was never worth telling the user.
435
+ The third bad example is the most common failure mode the 4b bars
436
+ prevent: a generic line 1 (no artifact, would read in any week) paired
437
+ with a proverb-shaped line 2 (no named research area). Correct output
438
+ for this scenario is a 2-line message with concrete artifact + state —
439
+ e.g. "Auth refactor PR is open and queued for Monday review." — or, if
440
+ even that does not exist, the silence gate in 4a should fire.
226
441
 
227
442
  ### Phase 5: Reading sweep (silent context update)
228
443