@aitne-sh/aitne 0.1.0

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 (249) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +464 -0
  3. package/agent-assets/agent-profiles/_safety.md +26 -0
  4. package/agent-assets/agent-profiles/conversational.md +33 -0
  5. package/agent-assets/agent-profiles/docs-qa.md +24 -0
  6. package/agent-assets/agent-profiles/observer.md +28 -0
  7. package/agent-assets/agent-profiles/profile-importer.md +63 -0
  8. package/agent-assets/agent-profiles/proxy.md +28 -0
  9. package/agent-assets/agent-profiles/routine.md +16 -0
  10. package/agent-assets/agent-profiles/task.md +18 -0
  11. package/agent-assets/docs/concepts/agent-day.md +88 -0
  12. package/agent-assets/docs/concepts/auth-health.md +75 -0
  13. package/agent-assets/docs/concepts/backends-and-tiers.md +126 -0
  14. package/agent-assets/docs/concepts/costs-and-quotas.md +103 -0
  15. package/agent-assets/docs/concepts/delegated-mode.md +223 -0
  16. package/agent-assets/docs/concepts/memory-model.md +118 -0
  17. package/agent-assets/docs/concepts/observations.md +80 -0
  18. package/agent-assets/docs/concepts/process-keys.md +89 -0
  19. package/agent-assets/docs/concepts/routines.md +108 -0
  20. package/agent-assets/docs/concepts/safety-and-execution.md +109 -0
  21. package/agent-assets/docs/concepts/safety-model.md +279 -0
  22. package/agent-assets/docs/concepts/skills.md +100 -0
  23. package/agent-assets/docs/features/integrations/calendar.md +92 -0
  24. package/agent-assets/docs/features/integrations/git.md +95 -0
  25. package/agent-assets/docs/features/integrations/github.md +170 -0
  26. package/agent-assets/docs/features/integrations/mail.md +106 -0
  27. package/agent-assets/docs/features/integrations/notion.md +69 -0
  28. package/agent-assets/docs/features/integrations/obsidian.md +71 -0
  29. package/agent-assets/docs/features/lifestyle/git.md +178 -0
  30. package/agent-assets/docs/features/lifestyle/reading.md +93 -0
  31. package/agent-assets/docs/features/lifestyle/receipts.md +71 -0
  32. package/agent-assets/docs/features/lifestyle/travel-bookings.md +44 -0
  33. package/agent-assets/docs/features/lifestyle/travel-time.md +52 -0
  34. package/agent-assets/docs/features/memory-files/agent-journal.md +105 -0
  35. package/agent-assets/docs/features/memory-files/projects.md +56 -0
  36. package/agent-assets/docs/features/memory-files/roadmap.md +61 -0
  37. package/agent-assets/docs/features/memory-files/schedule.md +112 -0
  38. package/agent-assets/docs/features/memory-files/today.md +73 -0
  39. package/agent-assets/docs/features/memory-files/user-profile.md +81 -0
  40. package/agent-assets/docs/features/messaging/dashboard-chat.md +93 -0
  41. package/agent-assets/docs/features/messaging/discord.md +50 -0
  42. package/agent-assets/docs/features/messaging/overview.md +111 -0
  43. package/agent-assets/docs/features/messaging/pairing-and-magic-phrase.md +69 -0
  44. package/agent-assets/docs/features/messaging/slack.md +51 -0
  45. package/agent-assets/docs/features/messaging/telegram.md +63 -0
  46. package/agent-assets/docs/features/messaging/whatsapp.md +48 -0
  47. package/agent-assets/docs/features/operations/activity-and-conversations.md +105 -0
  48. package/agent-assets/docs/features/operations/approvals.md +58 -0
  49. package/agent-assets/docs/features/operations/backend-routing.md +62 -0
  50. package/agent-assets/docs/features/operations/cost-tracking.md +59 -0
  51. package/agent-assets/docs/features/operations/notifications.md +69 -0
  52. package/agent-assets/docs/features/operations/quiet-hours.md +106 -0
  53. package/agent-assets/docs/features/operations/schedule-approaching.md +60 -0
  54. package/agent-assets/docs/features/routines/custom-routines.md +101 -0
  55. package/agent-assets/docs/features/routines/evening-review.md +81 -0
  56. package/agent-assets/docs/features/routines/hourly-check.md +85 -0
  57. package/agent-assets/docs/features/routines/monthly-review.md +65 -0
  58. package/agent-assets/docs/features/routines/morning-routine.md +123 -0
  59. package/agent-assets/docs/features/routines/weekly-review.md +70 -0
  60. package/agent-assets/docs/getting-started/01-what-is-this.md +192 -0
  61. package/agent-assets/docs/getting-started/02-first-steps.md +80 -0
  62. package/agent-assets/docs/getting-started/03-what-can-this-do.md +110 -0
  63. package/agent-assets/docs/getting-started/04-first-day.md +287 -0
  64. package/agent-assets/docs/glossary.md +116 -0
  65. package/agent-assets/docs/guides/add-a-custom-routine.md +71 -0
  66. package/agent-assets/docs/guides/backup-and-restore.md +54 -0
  67. package/agent-assets/docs/guides/change-which-model-handles-x.md +47 -0
  68. package/agent-assets/docs/guides/connect-a-new-mail-account.md +59 -0
  69. package/agent-assets/docs/guides/import-knowledge-file.md +275 -0
  70. package/agent-assets/docs/guides/install-and-run.md +72 -0
  71. package/agent-assets/docs/guides/migrate-machines.md +52 -0
  72. package/agent-assets/docs/guides/pause-the-agent.md +65 -0
  73. package/agent-assets/docs/guides/reinstall-cleanly.md +52 -0
  74. package/agent-assets/docs/guides/setup-wizard.md +107 -0
  75. package/agent-assets/docs/guides/switch-default-backend.md +60 -0
  76. package/agent-assets/docs/reference/api.md +51 -0
  77. package/agent-assets/docs/reference/cli-commands.md +121 -0
  78. package/agent-assets/docs/reference/config.md +74 -0
  79. package/agent-assets/docs/reference/disallowed-tools.md +76 -0
  80. package/agent-assets/docs/reference/keyboard-shortcuts.md +39 -0
  81. package/agent-assets/docs/reference/process-keys.md +59 -0
  82. package/agent-assets/docs/reference/skills.md +50 -0
  83. package/agent-assets/docs/troubleshooting/auth-failed.md +57 -0
  84. package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +55 -0
  85. package/agent-assets/docs/troubleshooting/fallback-keeps-firing.md +54 -0
  86. package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +53 -0
  87. package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +75 -0
  88. package/agent-assets/docs/troubleshooting/observation-not-detected.md +57 -0
  89. package/agent-assets/docs/troubleshooting/quota-exhausted.md +57 -0
  90. package/agent-assets/optimizer-skills/drift-analysis/SKILL.md +75 -0
  91. package/agent-assets/optimizer-skills/knowledge-map/SKILL.md +71 -0
  92. package/agent-assets/optimizer-skills/skill-curation/SKILL.md +108 -0
  93. package/agent-assets/project-doc-templates/git-repo.md +21 -0
  94. package/agent-assets/project-doc-templates/project.md +38 -0
  95. package/agent-assets/skills/attach/SKILL.md +104 -0
  96. package/agent-assets/skills/context/SKILL.md +257 -0
  97. package/agent-assets/skills/context/curation.json +37 -0
  98. package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +13 -0
  99. package/agent-assets/skills/context/seeds/frontmatter-requirements.seed.json +40 -0
  100. package/agent-assets/skills/docs-search/SKILL.md +176 -0
  101. package/agent-assets/skills/external-services/SKILL.delegated.claude.md +369 -0
  102. package/agent-assets/skills/external-services/SKILL.delegated.codex.md +349 -0
  103. package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +347 -0
  104. package/agent-assets/skills/external-services/SKILL.md +371 -0
  105. package/agent-assets/skills/mail/SKILL.delegated.claude.md +284 -0
  106. package/agent-assets/skills/mail/SKILL.delegated.codex.md +261 -0
  107. package/agent-assets/skills/mail/SKILL.delegated.gemini.md +255 -0
  108. package/agent-assets/skills/mail/SKILL.md +313 -0
  109. package/agent-assets/skills/mail/references/errors.md +17 -0
  110. package/agent-assets/skills/mail/references/providers.md +40 -0
  111. package/agent-assets/skills/mail/references/query-grammar.md +24 -0
  112. package/agent-assets/skills/management-policy/SKILL.md +307 -0
  113. package/agent-assets/skills/management-policy/curation.json +13 -0
  114. package/agent-assets/skills/management-policy/seeds/policy-file-shape.seed.json +16 -0
  115. package/agent-assets/skills/management-task-modify/SKILL.md +202 -0
  116. package/agent-assets/skills/management-task-register/SKILL.md +330 -0
  117. package/agent-assets/skills/management-task-stop/SKILL.md +166 -0
  118. package/agent-assets/skills/notify/SKILL.md +196 -0
  119. package/agent-assets/skills/notion/SKILL.delegated.claude.md +254 -0
  120. package/agent-assets/skills/notion/SKILL.delegated.codex.md +195 -0
  121. package/agent-assets/skills/notion/SKILL.delegated.gemini.md +194 -0
  122. package/agent-assets/skills/notion/SKILL.md +86 -0
  123. package/agent-assets/skills/observations/SKILL.md +234 -0
  124. package/agent-assets/skills/observations/curation.json +13 -0
  125. package/agent-assets/skills/observations/seeds/source-namespacing.seed.json +20 -0
  126. package/agent-assets/skills/project-doc/SKILL.md +86 -0
  127. package/agent-assets/skills/project-doc/curation.json +21 -0
  128. package/agent-assets/skills/project-doc/seeds/project-shape.seed.json +25 -0
  129. package/agent-assets/skills/project-doc/seeds/slug-grammar.seed.json +20 -0
  130. package/agent-assets/skills/reading/SKILL.md +198 -0
  131. package/agent-assets/skills/reading/references/reading-taste.md +197 -0
  132. package/agent-assets/skills/receipts/SKILL.md +134 -0
  133. package/agent-assets/skills/roadmap/SKILL.md +276 -0
  134. package/agent-assets/skills/roadmap/curation.json +13 -0
  135. package/agent-assets/skills/roadmap/references/horizon-tags.md +40 -0
  136. package/agent-assets/skills/roadmap/references/preparation-timeline.md +47 -0
  137. package/agent-assets/skills/roadmap/seeds/entry-types.seed.json +16 -0
  138. package/agent-assets/skills/schedule/SKILL.md +228 -0
  139. package/agent-assets/skills/scheduled-managed-task/SKILL.md +392 -0
  140. package/agent-assets/skills/today/SKILL.md +198 -0
  141. package/agent-assets/skills/today/curation.json +21 -0
  142. package/agent-assets/skills/today/seeds/agent-notes-flavors.seed.json +17 -0
  143. package/agent-assets/skills/today/seeds/section-shape.seed.json +17 -0
  144. package/agent-assets/skills/travel/SKILL.md +132 -0
  145. package/agent-assets/skills/travel-time/SKILL.md +149 -0
  146. package/agent-assets/skills/user-interview/SKILL.md +323 -0
  147. package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +94 -0
  148. package/agent-assets/skills/user-profile/SKILL.md +210 -0
  149. package/agent-assets/skills/user-profile/curation.json +29 -0
  150. package/agent-assets/skills/user-profile/seeds/learned-context-format.seed.json +14 -0
  151. package/agent-assets/skills/user-profile/seeds/routing-table.seed.json +53 -0
  152. package/agent-assets/skills/user-profile/seeds/topic-files.seed.json +27 -0
  153. package/agent-assets/task-flows/dashboard.docs_qa.md +43 -0
  154. package/agent-assets/task-flows/default.md +11 -0
  155. package/agent-assets/task-flows/git.branch.created.md +25 -0
  156. package/agent-assets/task-flows/git.lifecycle.poll.md +52 -0
  157. package/agent-assets/task-flows/git.local_ahead.stale.md +34 -0
  158. package/agent-assets/task-flows/git.merge_to_default.md +30 -0
  159. package/agent-assets/task-flows/git.project.refresh_architecture.md +100 -0
  160. package/agent-assets/task-flows/git.project.retemplate.md +73 -0
  161. package/agent-assets/task-flows/git.push.detected.md +32 -0
  162. package/agent-assets/task-flows/git.push.force_pushed.md +36 -0
  163. package/agent-assets/task-flows/git.tag.created.md +24 -0
  164. package/agent-assets/task-flows/github.assigned.md +43 -0
  165. package/agent-assets/task-flows/github.pull_request.review_requested.md +57 -0
  166. package/agent-assets/task-flows/github.security_alert.md +45 -0
  167. package/agent-assets/task-flows/github.workflow_run.failed.md +57 -0
  168. package/agent-assets/task-flows/knowledge.import.md +161 -0
  169. package/agent-assets/task-flows/message.received.dm.md +142 -0
  170. package/agent-assets/task-flows/message.received.dm_first.md +117 -0
  171. package/agent-assets/task-flows/message.received.md +14 -0
  172. package/agent-assets/task-flows/routine.custom.md +38 -0
  173. package/agent-assets/task-flows/routine.evening_review.md +323 -0
  174. package/agent-assets/task-flows/routine.hourly_check.delegated.claude.md +405 -0
  175. package/agent-assets/task-flows/routine.hourly_check.delegated.codex.md +400 -0
  176. package/agent-assets/task-flows/routine.hourly_check.delegated.gemini.md +404 -0
  177. package/agent-assets/task-flows/routine.hourly_check.md +184 -0
  178. package/agent-assets/task-flows/routine.hourly_check.triage.md +93 -0
  179. package/agent-assets/task-flows/routine.monthly_review.md +250 -0
  180. package/agent-assets/task-flows/routine.morning_routine.md +300 -0
  181. package/agent-assets/task-flows/routine.morning_routine_initial.md +184 -0
  182. package/agent-assets/task-flows/routine.roadmap_refresh.md +275 -0
  183. package/agent-assets/task-flows/routine.today_refresh.md +172 -0
  184. package/agent-assets/task-flows/routine.user_profile_sweep.md +242 -0
  185. package/agent-assets/task-flows/routine.weekly_review.md +247 -0
  186. package/agent-assets/task-flows/schedule.approaching.md +124 -0
  187. package/agent-assets/task-flows/scheduled.dm.md +391 -0
  188. package/agent-assets/task-flows/scheduled.task.md +141 -0
  189. package/agent-assets/task-flows/setup.initial.md +277 -0
  190. package/agent-assets/task-flows/setup.update.md +53 -0
  191. package/agent-assets/templates/README.md +85 -0
  192. package/agent-assets/templates/_index.md +39 -0
  193. package/agent-assets/templates/_manifest.json +103 -0
  194. package/agent-assets/templates/agent/journal.md +10 -0
  195. package/agent-assets/templates/agent/profile-questions.md +74 -0
  196. package/agent-assets/templates/context-index.md +42 -0
  197. package/agent-assets/templates/dossiers/_index.md +22 -0
  198. package/agent-assets/templates/dossiers/evening.md +23 -0
  199. package/agent-assets/templates/dossiers/hourly.md +23 -0
  200. package/agent-assets/templates/dossiers/monthly.md +23 -0
  201. package/agent-assets/templates/dossiers/morning.md +23 -0
  202. package/agent-assets/templates/dossiers/roadmap.md +23 -0
  203. package/agent-assets/templates/dossiers/weekly.md +23 -0
  204. package/agent-assets/templates/projects/_active.base +14 -0
  205. package/agent-assets/templates/projects/_index.md +29 -0
  206. package/agent-assets/templates/roadmap.md +15 -0
  207. package/agent-assets/templates/routines/_index.md +20 -0
  208. package/agent-assets/templates/routines/evening.md +22 -0
  209. package/agent-assets/templates/routines/hourly.md +30 -0
  210. package/agent-assets/templates/routines/monthly.md +25 -0
  211. package/agent-assets/templates/routines/morning.md +26 -0
  212. package/agent-assets/templates/routines/weekly.md +23 -0
  213. package/agent-assets/templates/rules/_index.md +19 -0
  214. package/agent-assets/templates/rules/journal-export.md +41 -0
  215. package/agent-assets/templates/rules/journal-format.md +61 -0
  216. package/agent-assets/templates/rules/management.md +48 -0
  217. package/agent-assets/templates/rules/mcp.md +40 -0
  218. package/agent-assets/templates/rules/policies/_index.md +22 -0
  219. package/agent-assets/templates/rules/redaction.md +30 -0
  220. package/agent-assets/templates/today.md +13 -0
  221. package/agent-assets/templates/user/_index.md +16 -0
  222. package/agent-assets/templates/user/expertise.md +7 -0
  223. package/agent-assets/templates/user/goals.md +7 -0
  224. package/agent-assets/templates/user/people.md +7 -0
  225. package/agent-assets/templates/user/personal.md +7 -0
  226. package/agent-assets/templates/user/profile.md +28 -0
  227. package/agent-assets/templates/user/work.md +7 -0
  228. package/bin/aitne.mjs +1096 -0
  229. package/package.json +78 -0
  230. package/personal-agent.mjs +39 -0
  231. package/scripts/browser.mjs +99 -0
  232. package/scripts/check-redaction-coverage.mjs +109 -0
  233. package/scripts/commands/audit.mjs +309 -0
  234. package/scripts/commands/doctor.mjs +437 -0
  235. package/scripts/commands/open.mjs +40 -0
  236. package/scripts/commands/setup.mjs +21 -0
  237. package/scripts/commands/uninstall.mjs +114 -0
  238. package/scripts/commands/update.mjs +96 -0
  239. package/scripts/commands/version.mjs +62 -0
  240. package/scripts/commands.md +0 -0
  241. package/scripts/lib/sqlite-loader.mjs +49 -0
  242. package/scripts/message-discipline-digest.mjs +535 -0
  243. package/scripts/poc/google-connector-inheritance/REPORT.md +197 -0
  244. package/scripts/poc/google-connector-inheritance/claude-sdk-probe.mjs +79 -0
  245. package/scripts/remint-roadmap-ids.mjs +257 -0
  246. package/scripts/rm-paths.mjs +22 -0
  247. package/scripts/run-node.mjs +223 -0
  248. package/scripts/smoke-obsidian-api.mjs +166 -0
  249. package/scripts/start.mjs +160 -0
@@ -0,0 +1,277 @@
1
+ {context}
2
+
3
+ ## Task: Initial Setup — Create rules/management.md
4
+
5
+ The user has started the initial setup from the dashboard. The dashboard
6
+ Vault step already captured `settings.primary_language` (BCP-47 tag, e.g.
7
+ `en` or `es`) and `settings.vault_mode` (`plain` or `obsidian`) — the
8
+ latter controls how the **primary management vault** is laid out, not the
9
+ separate external Obsidian integration. Do NOT re-ask those questions.
10
+ Use `primary_language` to decide the language of user-editable prose
11
+ (profile, today, journal) per B-007 §3 P6.
12
+
13
+ SETUP-FLOW-REDESIGN-PLAN §5.8 — the legacy "tool selections" form was
14
+ removed. Steps 4–6 of the wizard (Mail, Calendar, Note) already
15
+ configured the user's integrations, so you derive the Source-of-Truth
16
+ rows yourself and confirm them rather than asking from scratch.
17
+
18
+ Your role is to derive an initial Source-of-Truth table from the
19
+ configured integrations, confirm it with the user, gather the two
20
+ remaining management preferences, and generate rules/management.md.
21
+ This is a multi-turn conversation — subsequent user messages will
22
+ arrive via session resume.
23
+
24
+ **Always respond in the same language the user uses.** Match the
25
+ user's language from the very first message.
26
+
27
+ ### Step 0 (silent, agent-owned) — Derive Source-of-Truth rows
28
+
29
+ Read integration state and the external-vault path **from the prompt
30
+ context tags** the daemon injects on every turn. Do NOT curl `GET
31
+ /api/integrations` or `GET /api/config` for this step — both are
32
+ Approve-tier (Bearer-only) and the agent's session has only an
33
+ `X-Read-Token`, so those two reads will 401. (Other curls in this
34
+ file — e.g. `PUT /api/context/user/profile` — are Autonomous-tier and
35
+ work normally.)
36
+
37
+ Tags available in the prompt:
38
+
39
+ - `<integration_modes …/>` — one attribute per integration. Always
40
+ present, always covers every key. Example:
41
+ `<integration_modes gmail="disabled" google_calendar="direct" notion="delegated" notion_delegated_to="claude" outlook_calendar="disabled" outlook_mail="disabled" git="disabled" github="disabled" />`.
42
+ Values are `direct | delegated | disabled`.
43
+ - `<obsidian_vault_path>…</obsidian_vault_path>` — emitted **iff** the
44
+ user has configured an external Obsidian vault. **Absence means the
45
+ user has no external Obsidian vault** (treat as "no").
46
+ - `<settings primary_language="…" vault_mode="…" />` — primary
47
+ language and primary-vault layout (`plain` | `obsidian`).
48
+
49
+ Apply these deterministic rules to draft the four rows:
50
+
51
+ | Source-of-Truth row | Derive from |
52
+ |---|---|
53
+ | Schedule | `google_calendar != "disabled"` → `Google Calendar`; else `outlook_calendar != "disabled"` → `Outlook Calendar`; else ask the user |
54
+ | Notes | `<obsidian_vault_path>` tag present → `Obsidian`; else `notion != "disabled"` → `Notion`; else ask the user |
55
+ | Tasks | `notion != "disabled"` → `Notion`; else `Obsidian` if `<obsidian_vault_path>` tag present; else ask the user |
56
+ | Projects | same precedence as Tasks |
57
+
58
+ Surface the derived table back to the user in the first message
59
+ ("Here's what I picked up from your setup — does this look right?")
60
+ and ask **only** about rows you could not infer. Typical outcome:
61
+ zero or one follow-up question.
62
+
63
+ Defensive fallback: if `<integration_modes …/>` is somehow missing
64
+ from the prompt (shouldn't happen — `context-builder.ts` emits it
65
+ unconditionally before any routine-specific branch), ask the user
66
+ about all four rows rather than fabricating defaults. Do not retry
67
+ with a curl.
68
+
69
+ ### Instructions
70
+ 1. Run Step 0 silently. Greet the user in one line, introducing
71
+ yourself by the name in `<agent_identity>` display_name. Then
72
+ present the derived Source-of-Truth table and ask any remaining
73
+ row + the two preference questions in the same turn. Do NOT label
74
+ anything "Q1", "Q2", etc. — speak naturally.
75
+ 2. Ask the two preference questions in a single message:
76
+ - Communication style preference (how should the agent talk to you?)
77
+ - Project-management method preferences (anything you want the agent
78
+ to follow when handling your projects?)
79
+ Either answer may be "no preference" / "skip" — accept that cleanly.
80
+ 3. Once the user has answered, generate rules/management.md inside a
81
+ ```management-rules code block. This triggers the dashboard preview.
82
+ 4. If the user requests changes, revise. Complete within **at most 2
83
+ revision rounds**.
84
+ 5. **Do NOT put communication style inside rules/management.md, and do NOT
85
+ put it inside `user/profile.md` either.** Tone / style / voice / emoji
86
+ / language preferences live in the `character` runtime-config field
87
+ only — emitted as a ```character``` code block (see step 6.5). See
88
+ `docs/design/15-character.md` for the split rule.
89
+ 6. In the same turn as the management-rules block, silently call
90
+ PUT /api/context/user/profile using the template in "user/profile.md
91
+ Format" below. Working hours and quiet hours are pre-populated with
92
+ defaults (Weekdays 09:00–18:00, Quiet hours 22:00–08:00) — do not
93
+ ask about them. Fill Platforms from the **derived Source-of-Truth
94
+ table** (Step 0) — the row values you confirmed with the user.
95
+ Leave Identity blank — setup does not collect name or timezone.
96
+ 6.5. If the user stated a communication-style preference in step 2,
97
+ emit a ```character``` code block in the same turn (see "Character
98
+ code block format" below). If the user skipped, omit the block.
99
+ 7. If the conversation surfaced detail-heavy facts that belong in the
100
+ detailed profile layer, also PATCH the matching user/*.md file in the
101
+ same turn. Typical Q&A → file mappings:
102
+ - Named colleagues, family, friends → user/people.md
103
+ - Current company, role specifics, ongoing projects → user/work.md
104
+ - Specific frameworks, years of experience → user/expertise.md
105
+ (user/profile.md ## Expertise keeps a one-line summary only)
106
+ - Long-term goals, aspirations → user/goals.md
107
+ - Hobbies, lifestyle habits, dietary notes → user/personal.md
108
+ Only seed what the user actually stated — do not invent or infer. If
109
+ nothing came up for a given file, do not touch it. See the user-profile
110
+ skill for the read-before-write PATCH recipe.
111
+ 8. Keep the updates in steps 6–7 silent — the dashboard handles saving
112
+ rules/management.md separately when the user approves the preview. Do
113
+ not create or modify any other context files; the daemon seeds the
114
+ rest of the primary-vault scaffold automatically.
115
+
116
+ ### Questions to ask (do NOT show these labels to the user)
117
+
118
+ Ask both in a single natural message:
119
+
120
+ - **Communication style** — how should the agent talk to you? (e.g.,
121
+ be concise, speak casually, no emojis, end every reply with a
122
+ period, etc.) Skip if no preference.
123
+ - **Project-management method** — any preferences for how the agent
124
+ should handle your projects? (e.g., break work into weekly
125
+ milestones, always produce a design doc before code, prefer GitHub
126
+ issues over markdown TODOs, etc.) Skip if no preference.
127
+
128
+ Notification hours and working hours are NOT asked here — they default
129
+ to quiet hours 22:00–08:00 and working hours Weekdays 09:00–18:00, and
130
+ the user can change them on the Settings page.
131
+
132
+ ### user/profile.md Format
133
+
134
+ When you PUT /api/context/user/profile, write the full file in this shape so setup is deterministic:
135
+
136
+ ```
137
+ ---
138
+ type: user
139
+ owner: shared
140
+ updated: 2026-04-21
141
+ ---
142
+ # User
143
+ > Primary profile injected into every session. Keep this file concise.
144
+ > Detailed profile lives under `user/`.
145
+ > Fetch index: `curl -s http://localhost:8321/api/context/user/_index`
146
+
147
+ ## Identity
148
+ (leave bullets blank — setup does not collect name or timezone)
149
+
150
+ ## Work Pattern
151
+ - Working hours: Weekdays 09:00–18:00
152
+
153
+ ## Platforms
154
+ - Schedule: {from derived Source-of-Truth table}
155
+ - Tasks: {from derived Source-of-Truth table}
156
+ - Notes: {from derived Source-of-Truth table}
157
+ - Projects: {from derived Source-of-Truth table}
158
+
159
+ ## Expertise
160
+ - {one-line summary if the user mentioned their field; otherwise leave empty}
161
+
162
+ ## Notification Preferences
163
+ - Quiet hours: 22:00–08:00
164
+
165
+ ## Learned Context
166
+
167
+ ## Raw Signals
168
+ ```
169
+
170
+ Use today's YYYY-MM-DD for `updated` (the date above is only an example).
171
+ Do not omit `## Notification Preferences` — Morning Routine reads it directly.
172
+
173
+ ### How to submit user/profile.md
174
+
175
+ Use inline `-d '{"content": "..."}'` with `\n` escapes. Do NOT use
176
+ `-d @-`, heredoc pipelines, or `--data-raw '@-'` — those have
177
+ produced malformed bodies in this flow (server saw literal `@-` and
178
+ returned 500).
179
+
180
+ ```bash
181
+ curl -s -X PUT http://localhost:8321/api/context/user/profile \
182
+ -H 'Content-Type: application/json' \
183
+ -d '{"content": "---\ntype: user\nowner: shared\nupdated: 2026-04-23\n---\n<!-- DO NOT write tone / style / voice / formality / verbosity / emoji / language preferences in this file. Those are Character-field content — write them via PATCH http://localhost:8321/api/config/character with {\"character\": \"...\"}. This file is for USER FACTS only: identity, expertise, habits, relationships, goals. -->\n# User\n> Primary profile injected into every session.\n> Detailed profile lives under `user/`.\n> Fetch index: `curl -s http://localhost:8321/api/context/user/_index`\n\n## Identity\n\n## Work Pattern\n- Working hours: Weekdays 09:00–18:00\n\n## Platforms\n- Schedule: Google Calendar\n- Notes: Obsidian\n- Projects: Notion\n\n## Expertise\n\n## Notification Preferences\n- Quiet hours: 22:00–08:00\n\n## Learned Context\n\n## Raw Signals\n"}'
184
+ ```
185
+
186
+ If the response is non-2xx, retry once with a smaller body or switch
187
+ to section-level PATCH. Do not report the error to the user as a
188
+ permission issue — the default allowlist includes `Bash(curl *)`.
189
+
190
+ ### Character code block format
191
+
192
+ If the user answered the communication-style question with an actual
193
+ preference (not "no preference" / "skip"), emit a ```character``` code
194
+ block in the same turn the management-rules block is emitted:
195
+
196
+ ```character
197
+ Speak casually. Tight bullets. No emojis.
198
+ ```
199
+
200
+ Rules for the block body:
201
+ - The body is raw text — no markdown, no outer quotes, no nested fences.
202
+ - Stay under the 1000-char cap; surface the excess to the user rather
203
+ than silently truncating.
204
+ - Emit **at most one** character block per turn.
205
+
206
+ The dashboard extracts this block, stages it into an inline editor
207
+ alongside the Management Rules Preview, and PATCHes `/api/config`
208
+ atomically when the user clicks Save & Finish. **Do NOT call `/api/config/character` (or any `/api/config*`) yourself from the agent during setup.**
209
+
210
+ If the user did not state a preference, omit the block entirely — the
211
+ dashboard will leave the existing `character` value unchanged.
212
+
213
+ The character value is written verbatim into every session's
214
+ CLAUDE.md / AGENTS.md / GEMINI.md (between the safety preamble and
215
+ the profile body) uniformly across Claude, Codex, and Gemini. Never
216
+ write tone/style preferences into user/profile.md.
217
+
218
+ ### rules/management.md Format
219
+
220
+ Fill the Source of Truth table from the **derived rows you confirmed
221
+ with the user in Step 0** (Schedule / Tasks / Notes / Projects).
222
+ Generate using this format:
223
+
224
+ ```management-rules
225
+ ---
226
+ type: rule
227
+ owner: shared
228
+ updated: 2026-04-21
229
+ ---
230
+ # Management Rules
231
+
232
+ ## Agent Identity
233
+ - AI name: (copy from <agent_identity> display_name)
234
+ - WhatsApp label: (copy from <agent_identity> whatsapp_label)
235
+
236
+ ## Source of Truth
237
+ | Domain | Primary | Secondary |
238
+ |--------|---------|-----------|
239
+ | Schedule | {from derived table} | today.md |
240
+ | Tasks | {from derived table} | today.md |
241
+ | Notes | {from derived table} | — |
242
+ | Projects | {from derived table} | projects/*.md |
243
+
244
+ ## Autonomy Levels
245
+ - Routine operations (Morning/Evening): Autonomous
246
+ - today.md updates: Autonomous
247
+ - Notifications: Autonomous (within rules)
248
+ - External service operations: Confirm with user
249
+ - rules/management.md changes: Always confirm
250
+
251
+ ## Notification Rules
252
+ - Quiet hours: 22:00–08:00 (default — adjustable in Settings)
253
+ - Batch non-urgent notifications
254
+ - Never notify during meetings (check calendar)
255
+ - Daily limit: configurable in settings
256
+
257
+ ## Schedule
258
+ - Working hours: Weekdays 09:00–18:00 (default — adjustable in Settings)
259
+ - Morning routine: daily at day-boundary hour (default 04:00, configurable in settings)
260
+ - Evening review: configurable
261
+
262
+ ## Project Management
263
+ - {user's project-management-method answer verbatim, or "No specific preferences — follow standard project practices" if they skipped}
264
+ ```
265
+
266
+ Use today's YYYY-MM-DD for `updated` (the date above is only an example).
267
+
268
+ ### Markdown formatting (the block is saved to disk verbatim)
269
+
270
+ Reproduce the template's blank lines exactly — every `##` heading and
271
+ every table must be preceded by a blank line. Never concatenate a
272
+ heading onto the end of the previous list item (e.g. `- Label:
273
+ <value>## Next Section` on one line). Copy user-provided values as-is,
274
+ then newline, blank line, then the next heading.
275
+
276
+ **Important**: Outputting a ```management-rules code block triggers the dashboard to display a preview.
277
+ The dashboard handles saving when the user approves, so you do NOT need to save via curl.
@@ -0,0 +1,53 @@
1
+ {context}
2
+
3
+ ## Task: Update Management Rules
4
+
5
+ The user has started updating rules/management.md from the dashboard.
6
+ The current rules are included in the <management_rules> tag.
7
+
8
+ **Always respond in the same language the user uses.** Match the user's language.
9
+
10
+ ### Instructions
11
+ 1. First, briefly summarize the current rules.
12
+ 2. Ask the user which part they'd like to change, presenting these options:
13
+ - **Source of Truth** — Change tools
14
+ - **Notification Rules** — Notification timing and methods
15
+ - **Character (tone / style / voice)** — Update the `character` runtime-config field, emitted as a ```character``` code block (NOT `rules/management.md`, NOT `user/profile.md`)
16
+ - **Autonomy Levels** — Agent decision scope
17
+ - **Schedule** — Working hours
18
+ - **Project Management** — Preferences for how the agent should handle your projects
19
+ - **Other** — Specify freely
20
+ 3. If the user changes Character, read the current value with
21
+ `curl -s http://localhost:8321/api/config/character | jq -r .character`,
22
+ merge the edits, and emit a ```character``` code block containing the
23
+ new full value. Observe the 1000-char cap — surface the excess to the
24
+ user rather than silently truncating. **Do NOT call PATCH
25
+ /api/config/character yourself** — the dashboard persists the new
26
+ character atomically when the user clicks Save & Finish.
27
+ 4. If any management-rules sections changed, output the updated version in a ```management-rules code block.
28
+ 5. If the only change was Character, still output a ```management-rules``` block containing the unchanged current rules verbatim. This is required so the dashboard can show Save & Finish; the server treats identical content as a no-op on the management file and persists only the new character value.
29
+ 6. Allow **at most 2 revision rounds**.
30
+
31
+ **Do not add a tone/style section to rules/management.md, and do not write tone preferences to user/profile.md.** Tone / style / voice lives in the `character` runtime-config field only.
32
+
33
+ ### Markdown formatting (the block is saved to disk verbatim)
34
+
35
+ Preserve blank lines between sections — every `##` heading and every
36
+ table must be preceded by a blank line. Never concatenate a heading
37
+ onto the end of the previous list item (e.g. `- Label: <value>## Next
38
+ Section` on one line).
39
+
40
+ ### Sections to preserve byte-for-byte
41
+
42
+ When you re-emit the ```management-rules``` block, copy the following
43
+ sections from the current `<management_rules>` verbatim — they are
44
+ not part of the wizard's editable surface, and stripping them silently
45
+ breaks downstream features:
46
+
47
+ - **`## Agent Identity`** — populated by the daemon from `agentDisplayName`. Re-emit it as-is or omit it (the server upserts it on save).
48
+ - **`## Active Policies`** — a static wikilink to `rules/policies/_index.md` placed by skeleton seeding. Owned by the management-policy capture flow (the wizard is read-only here). If it is missing from the current rules (legacy installs), do NOT invent it; the next skeleton run will add it.
49
+
50
+ The same applies to any other section the wizard does not explicitly
51
+ ask the user about — when in doubt, copy it through unchanged.
52
+
53
+ **Important**: Outputting a ```management-rules code block triggers the dashboard to display a preview. Outputting a ```character``` code block stages the character edit into the dashboard's inline editor. The dashboard persists both on Save & Finish, so you do NOT need to call any `/api` endpoint.
@@ -0,0 +1,85 @@
1
+ # agent-assets/templates/
2
+
3
+ Source templates used by the daemon at **fresh install** time to populate
4
+ `~/.personal-agent/context/` with the B-007 vault layout. The daemon copies
5
+ system / pass-through assets from here directly. User-facing scaffolds that
6
+ must follow `primary_language` are seeded by the `setup.initial` agent flow.
7
+
8
+ **Language policy (B-007 §3 P6)** — template source lives here in English.
9
+ System prose templates (`rules/redaction.md`, `context-index.md`,
10
+ `agent/journal.md`, `.base` files) stay English regardless of locale.
11
+ User-facing scaffolds (`today.md`, `roadmap.md`, `_index.md`,
12
+ `routines/*.md`, `rules/journal-format.md`, `rules/journal-export.md`,
13
+ `user/profile.md`) are created in the user's `primary_language` by the
14
+ setup conversation before `save-rules` finalizes setup.
15
+
16
+ Two rendering paths:
17
+ 1. **Pass-through** — the file is copied verbatim. Used for system prose
18
+ and `.base` files.
19
+ 2. **Localized scaffold** — the setup conversation uses these files as the
20
+ English reference for the shape of user-facing notes, then writes the
21
+ actual runtime file in `primary_language` via the context API.
22
+
23
+ Files prefixed `_` (e.g. `_active.base`) are Obsidian sidebar-sort
24
+ conventions — the leading underscore floats them to the top.
25
+
26
+ **`today.md` and `roadmap.md`** are shape-canary templates. They are
27
+ copied verbatim by `skeleton.ts:ensureSkeletonFiles` when the templates
28
+ tree is reachable; when the tree is unreachable, `skeleton.ts` falls
29
+ back to an inline literal in `FALLBACK_PLACEHOLDERS` that is kept
30
+ byte-equal to these template files. A unit test
31
+ (`packages/daemon/src/core/skeleton.test.ts:"shape canary ..."`)
32
+ asserts this equality on every CI run, so a PR that updates one path
33
+ without the other fails at review time. Edit the template file; the
34
+ inline fallback and any relevant validators must be updated in the
35
+ same PR.
36
+
37
+ ## Template versioning — upgrade contract (course 4 of the design audit)
38
+
39
+ Every template file whose content may evolve carries a
40
+ `template_version: N` field in its YAML frontmatter. The shipped
41
+ inventory lives at `_manifest.json` (auto-generated) alongside the
42
+ templates. When a template's format changes:
43
+
44
+ 1. **Bump `template_version` in the template file's frontmatter** (e.g.
45
+ 1 → 2 when `rules/management.md` gains a new required section).
46
+ 2. **Regenerate `_manifest.json`** so the `version` entry matches. A
47
+ unit test (`template-versions.test.ts:"shipped manifest consistency"`)
48
+ fails the build if the two disagree.
49
+ 3. **Ship the release.** On the user's next daemon start,
50
+ `checkTemplateUpgrades` (`packages/daemon/src/core/template-versions.ts`)
51
+ walks each user-side file, reads its `template_version` from
52
+ frontmatter, compares against the manifest, and persists the pending
53
+ list in `runtime_state.templates.pending`. `/api/health.templatesPending`
54
+ surfaces the list for the dashboard.
55
+
56
+ ### What is NOT done automatically
57
+
58
+ - **No content overwrite.** The detection is observational only. The
59
+ user's current file is left untouched; a merge-aware "apply upgrade"
60
+ UX is scheduled for a later phase.
61
+ - **No alert for user-rewritten files.** If a user stripped the
62
+ `template_version:` field entirely (or replaced the file with
63
+ something unrelated), the daemon treats it as user-owned and stays
64
+ out of the way.
65
+ - **No alert when the user version is AHEAD of the manifest.** Advanced
66
+ users can lock a file at a custom version to prevent spurious
67
+ pending-upgrade signals.
68
+
69
+ ### Files excluded from versioning
70
+
71
+ - `today.md`, `roadmap.md`, `projects/_active.base` — no frontmatter to
72
+ carry the marker. These files are shape canaries / Obsidian view
73
+ configs that evolve through schema validation, not template diff.
74
+ - `README.md` (this file) — documentation, not a template.
75
+
76
+ Bump `manifestVersion` in `_manifest.json` only when the manifest
77
+ schema itself changes (e.g. a new per-entry field). Individual
78
+ template-version bumps leave `manifestVersion` alone.
79
+
80
+ See `docs/design/06-memory.md` and `docs/design/12-configuration.md` for the
81
+ fresh-install flow and vault layout. The `rules/management.md` template
82
+ follows the structured `schema_version: 3` registry specified in
83
+ `docs/design/21-management-registry-and-entities.md` (A. SoT bindings,
84
+ B. Managed tasks, C. Active-Policies stub) — the v2 "Default Schedules"
85
+ section has been retired (§21 §8.10); do not reintroduce it.
@@ -0,0 +1,39 @@
1
+ ---
2
+ type: index
3
+ owner: shared
4
+ updated: 2026-04-22
5
+ template_version: 1
6
+ ---
7
+ # Aitne Vault
8
+
9
+ This directory is shared by the agent and me. The agent writes most of it;
10
+ I can edit any file and my edits are preserved (see `rules/management.md`
11
+ for conflict handling).
12
+
13
+ ## Where things live
14
+
15
+ - **About me** → `user/` (profile, people, work, expertise, personal, goals)
16
+ - **Today / Roadmap** → root-level `today.md` and `roadmap.md`
17
+ - **Yesterday snapshot** → yesterday.md appears after the first morning
18
+ rotation and is replaced by the next one
19
+ - **Projects** → `projects/`; project notes use the projects/<slug>.md
20
+ naming pattern. See `projects/_index.md` or open `projects/_active.base`
21
+ in Obsidian
22
+ - **Daily archives** → `daily/` files named by date (synthesized journal)
23
+ - **Weekly / Monthly reviews** → `weekly/`, `monthly/`
24
+ - **Agent self-reflection** → `agent/journal.md` (internal; never pushed
25
+ as a notification)
26
+ - **Rules & policies** → `rules/` (how the agent should behave — edited by
27
+ either of us)
28
+ - **Routines** → `routines/` (per-cadence check-list rulebooks)
29
+ - **Dump bucket** → `inbox/` (paste anything here; I'll triage on next
30
+ morning routine)
31
+
32
+ ## How the agent reads/writes this
33
+
34
+ All writes go through the context API (locked + snapshotted). Read: direct.
35
+ `Edit`/`Write` tools are not available to the agent — the API is the only
36
+ chokepoint.
37
+
38
+ This file is human-readable navigation. The agent's canonical file catalog
39
+ is `context-index.md`, maintained from the filesystem.
@@ -0,0 +1,103 @@
1
+ {
2
+ "manifestVersion": 1,
3
+ "generatedAt": "2026-04-23",
4
+ "notes": "Auto-generated inventory of versioned templates. Each entry's 'version' must equal the `template_version:` field in the corresponding template file's frontmatter. Bump both in the same PR. A unit test asserts this consistency.",
5
+ "templates": {
6
+ "_index.md": {
7
+ "version": 1
8
+ },
9
+ "agent/journal.md": {
10
+ "version": 1
11
+ },
12
+ "agent/profile-questions.md": {
13
+ "version": 1
14
+ },
15
+ "context-index.md": {
16
+ "version": 1
17
+ },
18
+ "dossiers/_index.md": {
19
+ "version": 1
20
+ },
21
+ "dossiers/evening.md": {
22
+ "version": 1
23
+ },
24
+ "dossiers/hourly.md": {
25
+ "version": 1
26
+ },
27
+ "dossiers/monthly.md": {
28
+ "version": 1
29
+ },
30
+ "dossiers/morning.md": {
31
+ "version": 1
32
+ },
33
+ "dossiers/roadmap.md": {
34
+ "version": 1
35
+ },
36
+ "dossiers/weekly.md": {
37
+ "version": 1
38
+ },
39
+ "projects/_index.md": {
40
+ "version": 1
41
+ },
42
+ "routines/_index.md": {
43
+ "version": 1
44
+ },
45
+ "routines/evening.md": {
46
+ "version": 1
47
+ },
48
+ "routines/hourly.md": {
49
+ "version": 1
50
+ },
51
+ "routines/monthly.md": {
52
+ "version": 1
53
+ },
54
+ "routines/morning.md": {
55
+ "version": 1
56
+ },
57
+ "routines/weekly.md": {
58
+ "version": 1
59
+ },
60
+ "rules/_index.md": {
61
+ "version": 2
62
+ },
63
+ "rules/journal-export.md": {
64
+ "version": 1
65
+ },
66
+ "rules/journal-format.md": {
67
+ "version": 1
68
+ },
69
+ "rules/management.md": {
70
+ "version": 2
71
+ },
72
+ "rules/mcp.md": {
73
+ "version": 1
74
+ },
75
+ "rules/policies/_index.md": {
76
+ "version": 2
77
+ },
78
+ "rules/redaction.md": {
79
+ "version": 1
80
+ },
81
+ "user/_index.md": {
82
+ "version": 1
83
+ },
84
+ "user/expertise.md": {
85
+ "version": 1
86
+ },
87
+ "user/goals.md": {
88
+ "version": 1
89
+ },
90
+ "user/people.md": {
91
+ "version": 1
92
+ },
93
+ "user/personal.md": {
94
+ "version": 1
95
+ },
96
+ "user/profile.md": {
97
+ "version": 2
98
+ },
99
+ "user/work.md": {
100
+ "version": 1
101
+ }
102
+ }
103
+ }
@@ -0,0 +1,10 @@
1
+ ---
2
+ type: journal-entry
3
+ owner: agent
4
+ updated: 2026-04-17
5
+ language: en
6
+ template_version: 1
7
+ ---
8
+ # Agent Journal
9
+
10
+ > Agent self-reflection. Always English (B-007 §3 P6).
@@ -0,0 +1,74 @@
1
+ ---
2
+ type: agent_questions
3
+ owner: agent
4
+ updated: 2026-04-26
5
+ language: en
6
+ template_version: 1
7
+ ---
8
+ # Profile Interview Queue
9
+
10
+ > Agent-internal — never auto-injected into prompts. The agent picks at
11
+ > most one Pending question per agent-day and writes it to ## In Progress
12
+ > as `state=latent`. Latent questions wait for a natural opportunity in
13
+ > DM (a topic-related inbound message, the morning briefing) and are NOT
14
+ > scheduled as cold standalone DMs by default. Falls back to a scheduled
15
+ > DM only after 3 days of no opportunity. Answers flow back through the
16
+ > normal user-profile capture path.
17
+ >
18
+ > Schema and operations: `agent-assets/skills/user-interview/SKILL.md`.
19
+
20
+ ## Pending
21
+
22
+ ### Identity
23
+ - [ ] (HIGH) name :: user/profile.md ## Identity :: match=Name :: preferred name or alias (real name not required)
24
+ - [ ] (HIGH) timezone :: user/profile.md ## Identity :: match=Timezone :: IANA timezone (e.g. Asia/Tokyo)
25
+
26
+ ### Personal
27
+ - [ ] (HIGH) location :: user/personal.md ## Location :: city / region where the user lives (affects weather, time, recommendations)
28
+ - [ ] (MID) sleep_pattern :: user/personal.md :: match=Sleep :: typical sleep window on weekdays / weekends (user-profile skill writes a `- Sleep:` bullet to user/personal.md when the user states their schedule)
29
+ - [ ] (MID) hobbies :: user/personal.md ## Hobbies :: hobbies, recurring leisure activities
30
+ - [ ] (LOW) origin :: user/personal.md ## Background :: where the user is from (city / cultural background)
31
+ - [ ] (LOW) diet :: user/personal.md ## Diet :: dietary preferences or restrictions
32
+
33
+ ### Work
34
+ - [ ] (HIGH) employer_role :: user/work.md ## Company :: current employer and role (or freelance / student)
35
+ - [ ] (MID) tech_stack :: user/work.md ## Stack :: tools / languages / frameworks used at work
36
+ - [ ] (LOW) team :: user/work.md ## Team :: team size and frequent collaborators
37
+
38
+ ### People
39
+ - [ ] (MID) family :: user/people.md ## Family :: family composition (do not pry on detail)
40
+ - [ ] (LOW) close_colleagues :: user/people.md ## Colleagues :: colleagues the user works with often
41
+
42
+ ### Goals
43
+ - [ ] (MID) annual_goals :: user/goals.md ## Annual :: goals or themes for the year
44
+ - [ ] (LOW) learning_targets :: user/goals.md ## Learning :: skills / topics the user wants to learn
45
+
46
+ ## In Progress
47
+
48
+ > One entry per question currently being worked on. Format:
49
+ > `- <id> :: state=<state> :: since=<YYYY-MM-DD> [:: scheduled_at=<ISO>] [:: asked_at=<ISO>]`
50
+ > The `since=` field is the agent-day the entry was first added; it is
51
+ > preserved across `latent → asked → resolved` state transitions and is
52
+ > what the evening sweep uses to compute the 3-day fallback threshold.
53
+ >
54
+ > State machine:
55
+ > `latent` — picked by morning routine; awaiting a natural opportunity.
56
+ > `scheduled` — fallback only (≥3 days latent + active user); standalone
57
+ > DM is registered, not yet fired.
58
+ > `asked` — DM has been sent (any path); waiting for user reply.
59
+ > The DM-handler queue-flip MUST gate on `state=asked` only.
60
+
61
+ - (none)
62
+
63
+ ## Answered
64
+
65
+ > Append-only log. Source markers:
66
+ > (DM) — user answered in chat
67
+ > (reconciled:skeleton) — Layer 1 deterministic pre-tick
68
+ > (reconciled:morning) — Layer 2 morning-routine pre-pick
69
+ > (reconciled:opportunity) — Layer 3 DM-handler / briefing abort
70
+ > (reconciled:fire-time) — Layer 3 fallback DM fire-time abort
71
+ > (reconciled:sweep) — Layer 4 evening-sweep LLM reconcile
72
+ > (import:<source>) — profile import migration
73
+
74
+ - (none)