@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.
- package/README.md +195 -829
- package/agent-assets/agent-profiles/_safety.md +49 -17
- package/agent-assets/agent-profiles/profile-importer.md +1 -1
- package/agent-assets/agent-profiles/routine.md +4 -3
- package/agent-assets/docs/concepts/agent-day.md +6 -1
- package/agent-assets/docs/concepts/auth-health.md +10 -1
- package/agent-assets/docs/concepts/backends-and-tiers.md +74 -40
- package/agent-assets/docs/concepts/costs-and-quotas.md +25 -5
- package/agent-assets/docs/concepts/delegated-mode.md +147 -68
- package/agent-assets/docs/concepts/memory-model.md +9 -4
- package/agent-assets/docs/concepts/observations.md +13 -1
- package/agent-assets/docs/concepts/process-keys.md +20 -5
- package/agent-assets/docs/concepts/routines.md +38 -20
- package/agent-assets/docs/concepts/safety-model.md +30 -13
- package/agent-assets/docs/concepts/skills.md +12 -7
- package/agent-assets/docs/features/integrations/calendar.md +1 -1
- package/agent-assets/docs/features/integrations/git.md +2 -2
- package/agent-assets/docs/features/integrations/github.md +9 -2
- package/agent-assets/docs/features/integrations/mail.md +1 -1
- package/agent-assets/docs/features/integrations/notion.md +34 -6
- package/agent-assets/docs/features/integrations/obsidian.md +7 -2
- package/agent-assets/docs/features/lifestyle/git.md +4 -7
- package/agent-assets/docs/features/lifestyle/receipts.md +17 -2
- package/agent-assets/docs/features/lifestyle/travel-bookings.md +15 -0
- package/agent-assets/docs/features/lifestyle/travel-time.md +7 -1
- package/agent-assets/docs/features/memory-files/agent-journal.md +2 -2
- package/agent-assets/docs/features/memory-files/projects.md +6 -0
- package/agent-assets/docs/features/memory-files/roadmap.md +5 -0
- package/agent-assets/docs/features/memory-files/today.md +1 -0
- package/agent-assets/docs/features/memory-files/user-profile.md +6 -0
- package/agent-assets/docs/features/messaging/bang-commands.md +20 -10
- package/agent-assets/docs/features/messaging/discord.md +12 -1
- package/agent-assets/docs/features/messaging/overview.md +10 -7
- package/agent-assets/docs/features/messaging/slack.md +13 -1
- package/agent-assets/docs/features/messaging/telegram.md +7 -1
- package/agent-assets/docs/features/messaging/whatsapp.md +12 -1
- package/agent-assets/docs/features/operations/activity-and-conversations.md +2 -2
- package/agent-assets/docs/features/operations/approvals.md +6 -0
- package/agent-assets/docs/features/operations/backend-routing.md +7 -0
- package/agent-assets/docs/features/operations/cost-tracking.md +6 -0
- package/agent-assets/docs/features/operations/notifications.md +6 -0
- package/agent-assets/docs/features/operations/schedule-approaching.md +22 -9
- package/agent-assets/docs/features/routines/custom-routines.md +10 -4
- package/agent-assets/docs/features/routines/evening-review.md +1 -1
- package/agent-assets/docs/features/routines/hourly-check.md +1 -1
- package/agent-assets/docs/features/routines/morning-routine.md +24 -15
- package/agent-assets/docs/features/routines/weekly-review.md +38 -12
- package/agent-assets/docs/features/wiki/commands.md +11 -0
- package/agent-assets/docs/features/wiki/overview.md +13 -3
- package/agent-assets/docs/getting-started/01-what-is-this.md +32 -11
- package/agent-assets/docs/getting-started/02-first-steps.md +17 -4
- package/agent-assets/docs/getting-started/03-what-can-this-do.md +21 -11
- package/agent-assets/docs/getting-started/04-first-day.md +14 -0
- package/agent-assets/docs/glossary.md +65 -12
- package/agent-assets/docs/guides/add-a-custom-routine.md +12 -0
- package/agent-assets/docs/guides/backup-and-restore.md +16 -2
- package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +6 -0
- package/agent-assets/docs/guides/build-your-wiki.md +14 -0
- package/agent-assets/docs/guides/change-which-model-handles-x.md +7 -0
- package/agent-assets/docs/guides/connect-a-new-mail-account.md +16 -0
- package/agent-assets/docs/guides/explore-with-trace-and-connect.md +6 -0
- package/agent-assets/docs/guides/import-knowledge-file.md +11 -0
- package/agent-assets/docs/guides/install-and-run.md +20 -4
- package/agent-assets/docs/guides/maintain-wiki-health.md +6 -0
- package/agent-assets/docs/guides/migrate-machines.md +13 -1
- package/agent-assets/docs/guides/multiple-wikis-for-multiple-domains.md +9 -0
- package/agent-assets/docs/guides/pause-the-agent.md +12 -4
- package/agent-assets/docs/guides/reinstall-cleanly.md +19 -4
- package/agent-assets/docs/guides/setup-wizard.md +20 -9
- package/agent-assets/docs/guides/switch-default-backend.md +10 -1
- package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +5 -0
- package/agent-assets/docs/reference/api.md +29 -1
- package/agent-assets/docs/reference/cli-commands.md +22 -3
- package/agent-assets/docs/reference/config.md +37 -5
- package/agent-assets/docs/reference/disallowed-tools.md +13 -0
- package/agent-assets/docs/reference/keyboard-shortcuts.md +13 -0
- package/agent-assets/docs/reference/process-keys.md +70 -20
- package/agent-assets/docs/reference/skills.md +27 -9
- package/agent-assets/docs/troubleshooting/auth-failed.md +7 -2
- package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +13 -1
- package/agent-assets/docs/troubleshooting/fallback-keeps-firing.md +10 -0
- package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +11 -0
- package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +9 -4
- package/agent-assets/docs/troubleshooting/observation-not-detected.md +12 -0
- package/agent-assets/docs/troubleshooting/quota-exhausted.md +7 -1
- package/agent-assets/docs/troubleshooting/wiki-ingest-full-blocked.md +5 -0
- package/agent-assets/docs/troubleshooting/wiki-write-failed.md +5 -0
- package/agent-assets/optimizer-skills/drift-analysis/SKILL.md +1 -1
- package/agent-assets/optimizer-skills/skill-curation/SKILL.md +2 -2
- package/agent-assets/skills/agent-actions/SKILL.md +122 -0
- package/agent-assets/skills/attach/SKILL.md +1 -2
- package/agent-assets/skills/context/SKILL.md +36 -454
- package/agent-assets/skills/context/references/api.md +220 -0
- package/agent-assets/skills/context/references/required-frontmatter.md +73 -0
- package/agent-assets/skills/context/references/snapshot-files.md +103 -0
- package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +1 -1
- package/agent-assets/skills/docs-search/SKILL.md +13 -13
- package/agent-assets/skills/external-services/SKILL.delegated.claude.md +5 -7
- package/agent-assets/skills/external-services/SKILL.delegated.codex.md +5 -7
- package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +5 -7
- package/agent-assets/skills/external-services/SKILL.md +6 -259
- package/agent-assets/skills/external-services/SKILL.native.claude.md +1 -2
- package/agent-assets/skills/external-services/SKILL.native.codex.md +1 -2
- package/agent-assets/skills/external-services/SKILL.native.gemini.md +1 -2
- package/agent-assets/skills/external-services/references/calendar-apple.md +97 -0
- package/agent-assets/skills/external-services/references/calendar-google.md +72 -0
- package/agent-assets/skills/external-services/references/calendar-outlook.md +36 -0
- package/agent-assets/skills/external-services/references/github.md +17 -0
- package/agent-assets/skills/external-services/references/obsidian.md +49 -0
- package/agent-assets/skills/external-services/references/skills-crud.md +27 -0
- package/agent-assets/skills/gmail-lifestyle/SKILL.md +224 -0
- package/agent-assets/skills/gmail-lifestyle/references/receipts-api.md +93 -0
- package/agent-assets/skills/gmail-lifestyle/references/travel-bookings-api.md +75 -0
- package/agent-assets/skills/gmail-lifestyle/references/travel-time-api.md +59 -0
- package/agent-assets/skills/mail/SKILL.delegated.claude.md +1 -1
- package/agent-assets/skills/mail/SKILL.delegated.codex.md +1 -1
- package/agent-assets/skills/mail/SKILL.delegated.gemini.md +1 -1
- package/agent-assets/skills/mail/SKILL.md +9 -114
- package/agent-assets/skills/mail/SKILL.native.claude.md +1 -1
- package/agent-assets/skills/mail/SKILL.native.codex.md +1 -1
- package/agent-assets/skills/mail/SKILL.native.gemini.md +1 -1
- package/agent-assets/skills/mail/references/api.md +108 -0
- package/agent-assets/skills/mail/references/examples.md +70 -0
- package/agent-assets/skills/mail/references/providers.md +8 -8
- package/agent-assets/skills/managed-tasks/SKILL.md +472 -0
- package/agent-assets/skills/managed-tasks/references/errors.md +70 -0
- package/agent-assets/skills/managed-tasks/references/output-path.md +75 -0
- package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +86 -0
- package/agent-assets/skills/management-policy/SKILL.md +33 -105
- package/agent-assets/skills/management-policy/references/policy-workflow.md +101 -0
- package/agent-assets/skills/notify/SKILL.md +6 -78
- package/agent-assets/skills/notify/references/priority.md +60 -0
- package/agent-assets/skills/notion/SKILL.delegated.claude.md +1 -1
- package/agent-assets/skills/notion/SKILL.delegated.codex.md +1 -1
- package/agent-assets/skills/notion/SKILL.delegated.gemini.md +1 -1
- package/agent-assets/skills/notion/SKILL.md +6 -10
- package/agent-assets/skills/notion/SKILL.native.claude.md +1 -2
- package/agent-assets/skills/notion/SKILL.native.codex.md +1 -2
- package/agent-assets/skills/notion/SKILL.native.gemini.md +1 -2
- package/agent-assets/skills/observations/SKILL.md +1 -6
- package/agent-assets/skills/project-doc/SKILL.md +1 -5
- package/agent-assets/skills/reading/SKILL.md +2 -2
- package/agent-assets/skills/roadmap/SKILL.md +37 -135
- package/agent-assets/skills/roadmap/references/api.md +100 -0
- package/agent-assets/skills/roadmap/references/cross-check.md +73 -0
- package/agent-assets/skills/roadmap/references/migration.md +56 -0
- package/agent-assets/skills/roadmap/references/preparation-timeline.md +2 -2
- package/agent-assets/skills/schedule/SKILL.md +52 -88
- package/agent-assets/skills/schedule/references/batch.md +93 -0
- package/agent-assets/skills/schedule/references/errors.md +214 -0
- package/agent-assets/skills/schedule/references/model-selection.md +96 -0
- package/agent-assets/skills/schedule/references/recurrence-rule.md +86 -0
- package/agent-assets/skills/schedule/references/recurring.md +185 -0
- package/agent-assets/skills/scheduled-managed-task/SKILL.md +13 -15
- package/agent-assets/skills/today/SKILL.md +27 -57
- package/agent-assets/skills/today/references/agent-plan-lifecycle.md +113 -0
- package/agent-assets/skills/user-interview/SKILL.md +12 -59
- package/agent-assets/skills/user-interview/references/op-briefing.md +51 -0
- package/agent-assets/skills/user-interview/references/op-morning.md +59 -0
- package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +1 -1
- package/agent-assets/skills/user-profile/SKILL.md +43 -63
- package/agent-assets/skills/user-profile/references/character-preferences.md +83 -0
- package/agent-assets/skills/user-profile/seeds/topic-files.seed.json +28 -0
- package/agent-assets/skills/wiki/wiki-ask/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-compile/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-connect/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-graduate/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-ingest/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-lint/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-trace/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-vault-rules/SKILL.md +0 -1
- package/agent-assets/system-prompts/routine-fetch-window.md +68 -0
- package/agent-assets/system-prompts/skill-index-instruction.md +26 -0
- package/agent-assets/task-flows/_partials/calendar-acquire.google_calendar.md +18 -11
- package/agent-assets/task-flows/_partials/calendar-acquire.outlook_calendar.md +16 -9
- package/agent-assets/task-flows/_partials/capture-user-info.md +24 -0
- package/agent-assets/task-flows/_partials/confirm-subflow.md +68 -0
- package/agent-assets/task-flows/_partials/dm-intent.long-horizon.md +35 -0
- package/agent-assets/task-flows/_partials/dm-intent.project.md +391 -0
- package/agent-assets/task-flows/_partials/mail-acquire.gmail.md +20 -11
- package/agent-assets/task-flows/_partials/mail-acquire.outlook_mail.md +17 -9
- package/agent-assets/task-flows/_partials/notion-acquire.notion.md +18 -12
- package/agent-assets/task-flows/knowledge.import.md +1 -1
- package/agent-assets/task-flows/message.received.dm.md +13 -15
- package/agent-assets/task-flows/message.received.dm_first.md +10 -14
- package/agent-assets/task-flows/routine.custom.md +3 -1
- package/agent-assets/task-flows/routine.evening_review.md +39 -163
- package/agent-assets/task-flows/routine.fetch_window.md +17 -12
- package/agent-assets/task-flows/routine.hourly_check.md +16 -8
- package/agent-assets/task-flows/routine.hourly_check.triage.md +1 -1
- package/agent-assets/task-flows/routine.monthly_review.md +46 -4
- package/agent-assets/task-flows/routine.morning_routine_journal.md +113 -0
- package/agent-assets/task-flows/routine.morning_routine_today.md +673 -0
- package/agent-assets/task-flows/routine.roadmap_refresh.md +60 -15
- package/agent-assets/task-flows/routine.user_profile_sweep.md +9 -10
- package/agent-assets/task-flows/routine.weekly_review.md +285 -70
- package/agent-assets/task-flows/scheduled.dm.md +8 -8
- package/agent-assets/task-flows/scheduled.task.md +5 -5
- package/agent-assets/task-flows/setup.initial.md +165 -245
- package/agent-assets/task-flows/wiki.ingest_url.md +1 -1
- package/agent-assets/templates/_manifest.json +7 -7
- package/agent-assets/templates/dossiers/_index.md +1 -1
- package/agent-assets/templates/rules/journal-format.md +145 -38
- package/agent-assets/templates/user/expertise.md +4 -2
- package/agent-assets/templates/user/goals.md +4 -2
- package/agent-assets/templates/user/people.md +8 -2
- package/agent-assets/templates/user/personal.md +4 -2
- package/agent-assets/templates/user/work.md +4 -2
- package/bin/aitne.mjs +8 -1
- package/package.json +4 -4
- package/scripts/commands/doctor.mjs +52 -0
- package/scripts/commands/run-now.mjs +202 -0
- package/scripts/commands/verify.mjs +264 -0
- package/agent-assets/docs/features/routines/monthly-review.md +0 -65
- package/agent-assets/skills/management-task-modify/SKILL.md +0 -203
- package/agent-assets/skills/management-task-register/SKILL.md +0 -330
- package/agent-assets/skills/management-task-stop/SKILL.md +0 -166
- package/agent-assets/skills/receipts/SKILL.md +0 -134
- package/agent-assets/skills/travel/SKILL.md +0 -132
- package/agent-assets/skills/travel-time/SKILL.md +0 -158
- package/agent-assets/task-flows/routine.morning_routine.md +0 -322
- package/agent-assets/task-flows/routine.morning_routine_initial.md +0 -204
|
@@ -6,17 +6,9 @@ The user has sent <user_input> below. Respond to it, applying the steps in order
|
|
|
6
6
|
|
|
7
7
|
### Step 1 — Capture user info silently (before replying)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Apply the canonical capture-user-info routing below to `<user_input>`.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
**Declarative facts about the user** → route through the user-profile skill. The skill owns the trigger shapes, the file split (`profile.md` vs `user/<topic>.md`), the read-before-write contract, the `section_not_found` → `append_to_file` first-write fallback, and the Learned-Context-vs-personal.md disambiguator. Key calls:
|
|
14
|
-
|
|
15
|
-
- Top-level identity / platform / notification fact → `user/profile.md`.
|
|
16
|
-
- Detail-heavy fact (specific person, workplace, hobby, tool, goal) → matching `user/<topic>.md` (`people` / `work` / `expertise` / `personal` / `goals`).
|
|
17
|
-
- Self-reported behavioral pattern the agent should adapt to ("I'm not a morning person") → `user/profile.md ## Learned Context` with today's `[YYYY-MM-DD]` prefix.
|
|
18
|
-
|
|
19
|
-
Never invent facts the user did not state. Never re-write a fact a paraphrase of which already exists in the target file.
|
|
11
|
+
{include:_partials/capture-user-info.md}
|
|
20
12
|
|
|
21
13
|
### Step 2 — Profile-question reconcile / latent opportunity
|
|
22
14
|
|
|
@@ -50,7 +42,9 @@ Worked examples (illustrate the topic-continuing vs. topic-pivoting distinction;
|
|
|
50
42
|
| "Feeling pretty drained today." | *(no trailing question — acknowledge the mood)* | *"What time should I remind you about the design review?"* (ignores the mood) |
|
|
51
43
|
| "What's on today?" | *"Want a heads-up 15 min before the 2pm review?"* (continues the orientation) | *"Also — what city are you in these days?"* (latent-profile weave on a tight factual ask) |
|
|
52
44
|
|
|
53
|
-
This rule covers the latent-profile-question weave in Step 2 and any future opportunistic ask. **When a gate would have asked here but this rule suppresses it, the gate SHOULD instead schedule a `confirm:` sub-flow row** (see `scheduled.dm.md` ## Confirmation follow-up) so the question lands at a natural moment without violating the thread.
|
|
45
|
+
This rule covers the latent-profile-question weave in Step 2 and any future opportunistic ask. **When a gate would have asked here but this rule suppresses it, the gate SHOULD instead schedule a `confirm:` sub-flow row** (see `scheduled.dm.md` ## Confirmation follow-up) so the question lands at a natural moment without violating the thread. The dedup pre-check + `confirm_dedup_key` shape contract apply before scheduling — see the partial below.
|
|
46
|
+
|
|
47
|
+
{include:_partials/confirm-subflow.md}
|
|
54
48
|
|
|
55
49
|
**Day-type filter.** Parse line 2 of <today>. For any category whose focus is `off` (map via the today skill's "Category → focus-dimension mapping"), do not volunteer items in that category.
|
|
56
50
|
|
|
@@ -110,7 +104,7 @@ clock and lag). `<turn_context>` is present only on resumed turns; on a
|
|
|
110
104
|
fresh turn the system-prompt `<current_time>` is already current and the
|
|
111
105
|
snapshot is fresh.
|
|
112
106
|
|
|
113
|
-
Refetch the live log when the user asks about recent activity — for example "what have you been up to", "did anything come in", "anything new since X", "
|
|
107
|
+
Refetch the live log when the user asks about recent activity — for example "what have you been up to", "did anything come in", "anything new since X", "anything happen", "in the last N minutes".
|
|
114
108
|
|
|
115
109
|
- Issue `GET /api/context/today` (the standard context-read endpoint).
|
|
116
110
|
- Compare the live `## Agent Log` against what is in <today>.
|
|
@@ -149,7 +143,7 @@ detection" §"Reply branches", carrying the user's reply shape (yes /
|
|
|
149
143
|
counter-proposal / no) into that handler. Apply the same pattern to
|
|
150
144
|
any other gate that opts into the confirm sub-flow in the future.
|
|
151
145
|
|
|
152
|
-
**Scheduling.** Recurring ("every morning at 9", "weekly") → `POST /api/recurring-schedules`. One-shot ("tomorrow 3pm", "in 30 min") → `POST /api/schedule/dm` (pre-composed; default) or `POST /api/schedule` (wake-up that must look something up at fire time). Edit / cancel / list use the same endpoints. Load the schedule skill for the request shape, dedup pre-check, DM-vs-wake decision, and description contract. Use `<current_time>` for timezone resolution.
|
|
146
|
+
**Scheduling.** Recurring ("every hour", "every morning at 9", "weekly", "25th of each month") → `POST /api/recurring-schedules`. One-shot ("tomorrow 3pm", "in 30 min") → `POST /api/schedule/dm` (pre-composed; default) or `POST /api/schedule` (wake-up that must look something up at fire time). Edit / cancel / list use the same endpoints. Load the schedule skill for the request shape, dedup pre-check, DM-vs-wake decision, and description contract. Use `<current_time>` for timezone resolution. Prefer `tier` over `model`; the two are mutually exclusive on a single row.
|
|
153
147
|
|
|
154
148
|
Schedules go through this daemon — never through any cloud-hosted scheduled-agent feature your CLI may expose. Cloud routines cannot reach `localhost:8321`, so they cannot deliver via the user's chat platforms or use any integration registered here. Do not propose one as a tradeoff.
|
|
155
149
|
|
|
@@ -163,9 +157,13 @@ Schedules go through this daemon — never through any cloud-hosted scheduled-ag
|
|
|
163
157
|
- **Re-enable** → `PATCH /api/recurring-schedules/:id` `{"enabled": true}`.
|
|
164
158
|
3. Confirm to the user in persona voice. Keep it short — never name internal mechanisms ("recurring schedule", "pin_to_quiet_hours_end", row IDs) in user-visible text.
|
|
165
159
|
|
|
166
|
-
**Long-horizon intent** (commitment, trip, deliverable, learning target beyond today) →
|
|
160
|
+
**Long-horizon intent** (commitment, trip, deliverable, learning target beyond today) → apply the decision tree below; the `roadmap` skill is the writer. Ambiguous or speculative items belong in `agent/journal.md` as a candidate line for the next morning routine to confirm — do **not** write directly to `roadmap.md` without a clear positive signal.
|
|
161
|
+
|
|
162
|
+
{include:_partials/dm-intent.long-horizon.md}
|
|
163
|
+
|
|
164
|
+
**Project intent** (state, progress, milestone, blocker, or a new-project request for a named workstream) → apply the decision tree below; the `context` skill is the writer (PUT / PATCH / archive). A new project requires the project-creation gate before any write; the gate's "No match" path schedules a `confirm:` DM rather than asking inline (see Step 3 of the decision tree and `scheduled.dm.md` ## Confirmation follow-up). Silently inferring a slug is forbidden. A project update tied to a dated milestone runs both this dispatcher and the long-horizon one (see "Tie-breakers" inside the partial). Future durable-state domains (e.g. git) follow the same shape — per-domain partial, thin dispatcher here.
|
|
167
165
|
|
|
168
|
-
|
|
166
|
+
{include:_partials/dm-intent.project.md}
|
|
169
167
|
|
|
170
168
|
## User Message
|
|
171
169
|
Platform: {event_data[platform]}
|
|
@@ -8,17 +8,9 @@ The behavior in this flow is identical to `message.received.dm.md` except for th
|
|
|
8
8
|
|
|
9
9
|
### Step 1 — Capture user info silently (before replying)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Apply the canonical capture-user-info routing below to `<user_input>`.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
**Declarative facts about the user** → route through the user-profile skill. The skill owns the trigger shapes, the file split (`profile.md` vs `user/<topic>.md`), the read-before-write contract, the `section_not_found` → `append_to_file` first-write fallback, and the Learned-Context-vs-personal.md disambiguator. Key calls:
|
|
16
|
-
|
|
17
|
-
- Top-level identity / platform / notification fact → `user/profile.md`.
|
|
18
|
-
- Detail-heavy fact (specific person, workplace, hobby, tool, goal) → matching `user/<topic>.md`.
|
|
19
|
-
- Self-reported behavioral pattern the agent should adapt to → `user/profile.md ## Learned Context` with today's `[YYYY-MM-DD]` prefix.
|
|
20
|
-
|
|
21
|
-
Never invent facts the user did not state. Never re-write a fact a paraphrase of which already exists in the target file.
|
|
13
|
+
{include:_partials/capture-user-info.md}
|
|
22
14
|
|
|
23
15
|
### Step 2 — Profile-question reconcile / latent opportunity
|
|
24
16
|
|
|
@@ -36,7 +28,7 @@ The user must never feel they are filling out a profile.
|
|
|
36
28
|
|
|
37
29
|
### Step 3 — Compose the reply
|
|
38
30
|
|
|
39
|
-
Apply the conversational profile's "speak as one agent" rule: phrase your knowledge as your own memory; never name internal storage, sections, files, or routines in user-visible text.
|
|
31
|
+
Apply the conversational profile's "speak as one agent" rule: phrase your knowledge as your own memory; never name internal storage, sections, files, or routines in user-visible text. The user-facing message discipline (awareness, no ceremony, no readback, compactness) is owned by the notify skill.
|
|
40
32
|
|
|
41
33
|
#### No topic-pivoting trailing question (universal, non-negotiable)
|
|
42
34
|
|
|
@@ -140,13 +132,17 @@ project?"* → user replies "yeah" → route through the context skill's
|
|
|
140
132
|
"Project DM-intent detection" §"Reply branches" with branch=
|
|
141
133
|
affirmative.
|
|
142
134
|
|
|
143
|
-
**Scheduling.** Recurring ("every morning at 9", "weekly") → `POST /api/recurring-schedules`. One-shot ("tomorrow 3pm", "in 30 min") → `POST /api/schedule/dm` (pre-composed; default) or `POST /api/schedule` (wake-up). Edit / cancel / list use the same endpoints. Load the schedule skill for the request shape, dedup pre-check, and description contract. Use `<current_time>` for timezone resolution.
|
|
135
|
+
**Scheduling.** Recurring ("every hour", "every morning at 9", "weekly", "25th of each month") → `POST /api/recurring-schedules`. One-shot ("tomorrow 3pm", "in 30 min") → `POST /api/schedule/dm` (pre-composed; default) or `POST /api/schedule` (wake-up). Edit / cancel / list use the same endpoints. Load the schedule skill for the request shape, dedup pre-check, and description contract. Use `<current_time>` for timezone resolution. Prefer `tier` over `model`; the two are mutually exclusive on a single row.
|
|
144
136
|
|
|
145
137
|
Schedules go through this daemon — never through any cloud-hosted scheduled-agent feature your CLI may expose. Cloud routines cannot reach `localhost:8321`, so they cannot deliver via the user's chat platforms or use any integration registered here.
|
|
146
138
|
|
|
147
|
-
**Long-horizon intent** (commitment, trip, deliverable, learning target beyond today) →
|
|
139
|
+
**Long-horizon intent** (commitment, trip, deliverable, learning target beyond today) → apply the decision tree below; the `roadmap` skill is the writer. Ambiguous or speculative items belong in `agent/journal.md` as a candidate line for the next morning routine to confirm — do **not** write directly to `roadmap.md` without a clear positive signal.
|
|
140
|
+
|
|
141
|
+
{include:_partials/dm-intent.long-horizon.md}
|
|
142
|
+
|
|
143
|
+
**Project intent** (state, progress, milestone, blocker, or a new-project request for a named workstream) → apply the decision tree below; the `context` skill is the writer. A new project requires the project-creation gate before any write; the gate's "No match" path schedules a `confirm:` DM rather than asking inline (see Step 3 of the decision tree and `scheduled.dm.md` ## Confirmation follow-up). Silently inferring a slug is forbidden. A project update tied to a dated milestone runs both this dispatcher and the long-horizon one (see "Tie-breakers" inside the partial).
|
|
148
144
|
|
|
149
|
-
|
|
145
|
+
{include:_partials/dm-intent.project.md}
|
|
150
146
|
|
|
151
147
|
## User Message
|
|
152
148
|
Platform: {event_data[platform]}
|
|
@@ -18,7 +18,9 @@ it exists.
|
|
|
18
18
|
either.
|
|
19
19
|
4. For each action, use the same conventions as the other routines:
|
|
20
20
|
- Scheduled actions → append to `today.md` `## Agent Plan` and
|
|
21
|
-
register a matching `POST /api/schedule` row.
|
|
21
|
+
register a matching `POST /api/schedule` row. Use `tier` for the
|
|
22
|
+
row's cost knob; check `GET /api/schedule/options` for the live
|
|
23
|
+
model list when a step needs to pin a specific model id.
|
|
22
24
|
- User-visible findings → route through the `notify` skill only when
|
|
23
25
|
truly urgent. Silent is the default.
|
|
24
26
|
- Observations → consume via `observations` skill if the step pulls
|
|
@@ -15,8 +15,13 @@ a `PUT` full rewrite keep the frontmatter and only refresh `updated:`
|
|
|
15
15
|
— writes that drop the frontmatter are rejected with 422.
|
|
16
16
|
|
|
17
17
|
Close out today and prepare tomorrow. Steps 1–3 are internal bookkeeping
|
|
18
|
-
(Morning Routine depends on them)
|
|
19
|
-
|
|
18
|
+
(Morning Routine depends on them) and emit no user-facing output by default.
|
|
19
|
+
User-defined entries in `routines/evening.md` run alongside the built-in
|
|
20
|
+
steps and are authoritative: execute them as written, including any that
|
|
21
|
+
call `POST /api/notify` — the built-in steps' silence does not override the
|
|
22
|
+
user's explicit rulebook intent. For ad-hoc deadline or surprise nudges,
|
|
23
|
+
the surfacing event handler that discovered the item — not this routine —
|
|
24
|
+
is the right vehicle.
|
|
20
25
|
|
|
21
26
|
### Step 0 — Read today's mail outcomes
|
|
22
27
|
|
|
@@ -39,22 +44,11 @@ GET /api/observations?pending=true&source_prefix=gmail:,outlook_mail:&observed_a
|
|
|
39
44
|
|
|
40
45
|
Fold meaningful items into the in-memory state you carry into Step 1
|
|
41
46
|
(Finalize today.md — Agent Log entries when an outbound reply closed a
|
|
42
|
-
loop)
|
|
43
|
-
|
|
44
|
-
this step is read-only; outbound replies belong to the user / morning
|
|
45
|
-
routine / DM-reply paths.
|
|
47
|
+
loop). Do NOT push back into the mail provider — this step is read-only;
|
|
48
|
+
outbound replies belong to the user / morning routine / DM-reply paths.
|
|
46
49
|
|
|
47
50
|
### Step 1 — Finalize today.md
|
|
48
51
|
- Check incomplete ## User Tasks status and mark accordingly.
|
|
49
|
-
- Reconcile ## Agent Plan: every row whose HH:MM has already passed should be
|
|
50
|
-
either `- [x]` (executed) or `- [x] ... ⚠ failed: <reason>` (attempted).
|
|
51
|
-
Any row still `- [ ]` with a past HH:MM is a bug — the scheduled task did
|
|
52
|
-
not close its loop. Flip it to `- [x] ... ⚠ did-not-fire` and log a line to
|
|
53
|
-
## Agent Log so the user can see the gap.
|
|
54
|
-
- **Do not retroactively execute did-not-fire rows.** The window is
|
|
55
|
-
gone — a 10:00 briefing fired at 21:00 is noise, not value. Only
|
|
56
|
-
flip the row and log the gap; do not send a stand-alone catch-up
|
|
57
|
-
notify here.
|
|
58
52
|
- Update the ## Handoff section per the context skill:
|
|
59
53
|
### Tomorrow — carry-over User Tasks with reason, key context, suggested priorities
|
|
60
54
|
### Later — keep existing future items, add new ones discovered today
|
|
@@ -62,27 +56,33 @@ routine / DM-reply paths.
|
|
|
62
56
|
setup completion, or placeholder cleanup unless the user explicitly asked
|
|
63
57
|
to track them.
|
|
64
58
|
- Do **not** carry Agent Plan rows into Handoff — Agent Plan is regenerated
|
|
65
|
-
fresh by Morning Routine the next day.
|
|
59
|
+
fresh by Morning Routine the next day. Past-HH:MM `[ ]` rows are flipped
|
|
60
|
+
to `did-not-fire` by Morning Routine reading yesterday.md the next day;
|
|
61
|
+
this routine no longer reconciles Agent Plan row state.
|
|
66
62
|
|
|
67
|
-
### Step 2 — Roadmap maintenance (
|
|
63
|
+
### Step 2 — Roadmap maintenance (promote, fire)
|
|
68
64
|
|
|
69
65
|
Consult the **roadmap** skill for section shapes, entry schema, and the
|
|
70
66
|
write lock. This step only touches `## Long-term Plans` and
|
|
71
67
|
`## Agent Action Plan`; `## Annual Goals`, `## Quarterly Focus`, and
|
|
72
68
|
`## Recurring` are preserved verbatim.
|
|
73
69
|
|
|
70
|
+
The mechanical sweeps (Scheduled-status sync, 180d Agent Action Plan
|
|
71
|
+
sweep, Long-term Plans stale/awaiting-reply marking) ran 15 minutes
|
|
72
|
+
ago as the daemon-driven `roadmap_mechanical_maintenance` job — they
|
|
73
|
+
are NOT this routine's job anymore. This step only carries the two
|
|
74
|
+
substeps that genuinely need an LLM in the loop: promote-on-resolution
|
|
75
|
+
and Review-date fire.
|
|
76
|
+
|
|
74
77
|
**Write-lock handling.** `<roadmap_write_lock_id>` is NOT injected for
|
|
75
78
|
evening_review, so acquire the lock explicitly before the first PATCH:
|
|
76
79
|
`POST /api/context/lock/roadmap` → read back `lockId`. On 409 (a
|
|
77
80
|
refresh is mid-write), back off 30 s and retry up to 3 times; if still
|
|
78
|
-
held, skip Step 2 entirely —
|
|
79
|
-
next
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
with `DELETE /api/context/lock/roadmap` with `{"lockId": "<lockId>"}`
|
|
84
|
-
at the end, and on every early-exit path. Every PATCH / PUT must
|
|
85
|
-
carry `X-Lock-Id: <lockId>`.
|
|
81
|
+
held, skip Step 2 entirely — 2a / 2b are evening-only and will just
|
|
82
|
+
wait until the next Evening Review (a 24-hour delay is acceptable).
|
|
83
|
+
Release with `DELETE /api/context/lock/roadmap` with
|
|
84
|
+
`{"lockId": "<lockId>"}` at the end, and on every early-exit path.
|
|
85
|
+
Every PATCH / PUT must carry `X-Lock-Id: <lockId>`.
|
|
86
86
|
|
|
87
87
|
**Section-body-rebuild discipline** (applies to every `mode=replace`
|
|
88
88
|
below). LLM rebuilds silently drop lines far too easily. Before each
|
|
@@ -94,24 +94,7 @@ PATCH:
|
|
|
94
94
|
- The new body equals `keep-list + new/mutated line(s)`, byte-for-byte
|
|
95
95
|
for kept lines. Do NOT paraphrase or reformat sibling lines.
|
|
96
96
|
|
|
97
|
-
2a. **
|
|
98
|
-
<desc> (task #<id>)` entry under `## Agent Action Plan`, compare
|
|
99
|
-
its Status line against the latest `/api/schedule` row for that id.
|
|
100
|
-
Flip `⏳ pending` → `▶ running` → `✓ completed` / `✗ failed` as
|
|
101
|
-
needed. Completed entries persist one extra day for the journal,
|
|
102
|
-
then the next refresh removes them. PATCH
|
|
103
|
-
`section=agent_action_plan` `mode=replace` so sibling entries
|
|
104
|
-
survive — apply the rebuild discipline above.
|
|
105
|
-
|
|
106
|
-
2b. **Sweep `## Agent Action Plan` event entries.** Remove entries
|
|
107
|
-
whose header date is more than 180 days in the future, and entries
|
|
108
|
-
whose latest `✓`'d Preparation Timeline row is older than 7 days
|
|
109
|
-
(past events whose prep is wrapped up). Preserve every entry in
|
|
110
|
-
the `[today - 7d, today + 180d]` window even if no prep rows
|
|
111
|
-
fired — the next refresh prunes them when the header date rolls
|
|
112
|
-
off.
|
|
113
|
-
|
|
114
|
-
2c. **Promote Long-term Plans → Agent Action Plan.** Scan
|
|
97
|
+
2a. **Promote Long-term Plans → Agent Action Plan.** Scan
|
|
115
98
|
`## Long-term Plans` lines. If an entry has resolved to a concrete
|
|
116
99
|
date today (user DM confirmed, mail booking landed, calendar event
|
|
117
100
|
created), move it into `## Agent Action Plan` as an event entry
|
|
@@ -125,25 +108,7 @@ PATCH:
|
|
|
125
108
|
doubly carefully; dropping an unrelated sibling here is silent user
|
|
126
109
|
data loss.
|
|
127
110
|
|
|
128
|
-
|
|
129
|
-
Long-term Plans line, compare the `Source: ... YYYY-MM-DD` date
|
|
130
|
-
against today:
|
|
131
|
-
- 90 days without date movement → append ` [stale since
|
|
132
|
-
YYYY-MM-DD]` (today's date) if the marker is not already
|
|
133
|
-
present. Mechanical marker only — do not DM.
|
|
134
|
-
- 180 days with `[stale since ...]` still present → append `
|
|
135
|
-
[awaiting-reply YYYY-MM-DD]` (today's date). **Do NOT call
|
|
136
|
-
`POST /api/notify` from this step.** Evening Review's user-
|
|
137
|
-
visible messaging is owned entirely by Step 4 (silence-by-
|
|
138
|
-
default contract). Surfacing the awaiting-reply state to the
|
|
139
|
-
user is deferred to a follow-up RFC-D.2; for now the marker
|
|
140
|
-
persists in roadmap.md for the user to discover via the
|
|
141
|
-
dashboard or a future digest.
|
|
142
|
-
- `[awaiting-reply YYYY-MM-DD]` older than 7 days with no reply
|
|
143
|
-
surfaced in <yesterday> / <today> Handoff → remove the line via
|
|
144
|
-
PATCH replace.
|
|
145
|
-
|
|
146
|
-
2e. **Fire due Long-term Plans.** For each Long-term Plans line whose
|
|
111
|
+
2b. **Fire due Long-term Plans.** For each Long-term Plans line whose
|
|
147
112
|
`Review:` date is on or before today, ignoring `Review: [noreview]`:
|
|
148
113
|
1. Resolve the horizon anchor using the roadmap skill's horizon
|
|
149
114
|
table.
|
|
@@ -173,7 +138,7 @@ PATCH:
|
|
|
173
138
|
|
|
174
139
|
If a roadmap PATCH/PUT returns 400 from the transition guard, re-GET
|
|
175
140
|
roadmap.md, rebuild from that current body, and retry once while
|
|
176
|
-
preserving every existing
|
|
141
|
+
preserving every existing `completed ...` row byte-for-byte. If
|
|
177
142
|
the retry still fails, stop Step 2, append the validation error and
|
|
178
143
|
affected IDs to `agent/journal.md`, and stay silent.
|
|
179
144
|
|
|
@@ -185,23 +150,22 @@ PATCH:
|
|
|
185
150
|
whether a reasonable rewrite is imperative ("do X") or declarative
|
|
186
151
|
("user does Y"). When ambiguous, default to **character**.
|
|
187
152
|
|
|
153
|
+
The routing surface below is the same one the DM handler / sweep
|
|
154
|
+
apply to live input. Raw Signals are already-detected facts, so the
|
|
155
|
+
"scan / persist same turn" framing is moot here, but the
|
|
156
|
+
imperative-vs-declarative bucket assignment and the `profile.md` vs
|
|
157
|
+
`user/<topic>.md` vs Learned Context split are identical:
|
|
158
|
+
|
|
159
|
+
{include:_partials/capture-user-info.md}
|
|
160
|
+
|
|
188
161
|
a₁. **Tone-class signals (imperative rewrite)** — "replies short when
|
|
189
162
|
tired", "prefers English for technical terms", "dislikes long
|
|
190
163
|
paragraphs", "often asks for bullet points" → graduate to the
|
|
191
|
-
`character` runtime-config field
|
|
164
|
+
`character` runtime-config field per the **user-profile** skill
|
|
165
|
+
§"Tone / character preferences" (read-before-write, cap-aware).
|
|
192
166
|
These are agent directives disguised as observations — writing them
|
|
193
167
|
to `Learned Context` would repeat the profile-vs-character
|
|
194
|
-
conflation the split rule is designed to prevent.
|
|
195
|
-
```bash
|
|
196
|
-
curl -s http://localhost:8321/api/config/character | jq -r .character
|
|
197
|
-
curl -s -X PATCH http://localhost:8321/api/config/character \
|
|
198
|
-
-H 'Content-Type: application/json' \
|
|
199
|
-
-d '{"character": "<merged value>"}'
|
|
200
|
-
```
|
|
201
|
-
Observe the 1000-char cap — if the merged value would exceed the
|
|
202
|
-
cap, trim the oldest / least specific directives rather than
|
|
203
|
-
failing the review silently. The updated `character` is injected
|
|
204
|
-
into every session's CLAUDE.md / AGENTS.md / GEMINI.md uniformly.
|
|
168
|
+
conflation the split rule is designed to prevent.
|
|
205
169
|
a₂. **Attribute-class signals (declarative rewrite)** — "seems to
|
|
206
170
|
work late", "tends to skim long messages", "is not a morning
|
|
207
171
|
person", "usually catches up on weekends" → integrate into
|
|
@@ -260,91 +224,3 @@ PATCH:
|
|
|
260
224
|
Learned Context entries out to the matching user/*.md file and
|
|
261
225
|
remove them from user/profile.md so the primary profile stays compact.
|
|
262
226
|
|
|
263
|
-
### Step 4 — User-facing wrap-up (the only externally visible output)
|
|
264
|
-
|
|
265
|
-
The user lived through today. They do not need a bookkeeping recap of
|
|
266
|
-
what you wrote to disk in Steps 1–3 — that belongs in ## Agent Log only.
|
|
267
|
-
Step 4 is the single notification (if any) that the user actually sees,
|
|
268
|
-
and it must be written FOR the user, not as an agent status report.
|
|
269
|
-
|
|
270
|
-
#### 4a. Silence is the default — notify only on a positive trigger
|
|
271
|
-
|
|
272
|
-
The evening is silent by default.
|
|
273
|
-
|
|
274
|
-
**Awareness gate.** See notify skill § Universal user-facing message
|
|
275
|
-
discipline § Awareness gate.
|
|
276
|
-
|
|
277
|
-
Only after the awareness gate passes, send a notification ONLY if at
|
|
278
|
-
least one of the following positive triggers holds:
|
|
279
|
-
(a) A ## User Tasks row ended the day incomplete AND is NOT safely
|
|
280
|
-
carried to ## Handoff Tomorrow with a clear reason — something is
|
|
281
|
-
dangling, not merely deferred.
|
|
282
|
-
(b) A hard deadline within the next 48h that the agent surfaced
|
|
283
|
-
*today* from new input (mail, DM, observation) and the user has
|
|
284
|
-
not yet acted on it. **Self-set deadlines, course assignments,
|
|
285
|
-
class times, and items already on the user's calendar do NOT
|
|
286
|
-
qualify** — they failed the awareness gate.
|
|
287
|
-
(c) A `did-not-fire` / `failed` Agent Plan row affected the user's
|
|
288
|
-
real plans (a meeting pre-brief that was supposed to fire, not a
|
|
289
|
-
routine nudge the user already handled on their own).
|
|
290
|
-
(d) A new ## Handoff Tomorrow item the agent *discovered today* that
|
|
291
|
-
the user has not seen yet and would be surprised by in the
|
|
292
|
-
morning. Items the user themselves added or already know about
|
|
293
|
-
do NOT qualify.
|
|
294
|
-
(e) Today carried unusual weight — a milestone shipped, a hard day
|
|
295
|
-
survived, an illness — and a brief human acknowledgement is
|
|
296
|
-
warranted.
|
|
297
|
-
|
|
298
|
-
If NONE of (a)–(e) holds after the awareness gate, do not send
|
|
299
|
-
anything. Write one line to ## Agent Log (e.g. `- HH:MM Evening Review
|
|
300
|
-
completed (silent — nothing actionable)`) and stop. Do NOT send an
|
|
301
|
-
empty or filler notification, and do NOT invent a reason to break the
|
|
302
|
-
silence. **The vast majority of days should land in the silent path** —
|
|
303
|
-
this is the routine working as intended, not a skipped task.
|
|
304
|
-
|
|
305
|
-
**Anti-example — do NOT send messages like this.** This is the exact
|
|
306
|
-
shape of message the user has flagged as unwanted noise; every line
|
|
307
|
-
fails either the awareness gate or the no-ceremony rule:
|
|
308
|
-
|
|
309
|
-
```
|
|
310
|
-
Evening check-in — [408019] Week 3 deadline tonight at 11:59pm PT:
|
|
311
|
-
Procurement Plan, RACI Chart, Resource Plan. Still about 6 hours to go.
|
|
312
|
-
Tomorrow: Agile class 6–9pm @ UCLA Extension Gayley.
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
Why this is bad: (1) "Evening check-in —" is forbidden ceremony.
|
|
316
|
-
(2) The course assignment deadline is the user's own syllabus —
|
|
317
|
-
they're already aware. (3) Tomorrow's class is on the user's own
|
|
318
|
-
calendar — also already aware. (4) "Still about 6 hours to go" is
|
|
319
|
-
filler timing commentary. The correct action for this content is to
|
|
320
|
-
write to ## Agent Log and stay silent.
|
|
321
|
-
|
|
322
|
-
#### 4b. Late-run handling (quiet hours)
|
|
323
|
-
|
|
324
|
-
If the current time is inside quiet hours (default 22:00–08:00, configurable) when the routine
|
|
325
|
-
actually executes — e.g., a daemon restart delayed the cron past
|
|
326
|
-
midnight — go silent regardless of (a)–(e). The Handoff section has
|
|
327
|
-
already been written in Step 1, and the next Morning Routine will
|
|
328
|
-
surface anything the user needs to know. Do NOT schedule a deferred
|
|
329
|
-
wrap-up for quiet_hours_end; that would fire right next to the Morning
|
|
330
|
-
Routine briefing and produce a duplicate.
|
|
331
|
-
|
|
332
|
-
#### 4c. Content and format — delegated to the notify skill
|
|
333
|
-
|
|
334
|
-
When one of (a)–(e) triggers a notification, follow the **Evening
|
|
335
|
-
wrap-up contract** in the notify skill. That contract owns:
|
|
336
|
-
- the content structure (lead with the agent-discovered item that
|
|
337
|
-
cleared the awareness gate),
|
|
338
|
-
- the 4-line cap and markdown rules,
|
|
339
|
-
- the no-ceremony / no-filler-timing-commentary rule,
|
|
340
|
-
- the no-internal-mechanism-names vocabulary rule,
|
|
341
|
-
- output language per `<output_language_policy>` and tone from the
|
|
342
|
-
Character block (always present when set),
|
|
343
|
-
- the good / bad worked examples (including the exact anti-pattern
|
|
344
|
-
the user has flagged).
|
|
345
|
-
|
|
346
|
-
This prompt owns only the go/no-go decision above. Send exactly ONE
|
|
347
|
-
notification via POST /api/notify with priority `high` — the
|
|
348
|
-
awareness gate plus triggers (a)–(e) raise the bar high enough that
|
|
349
|
-
anything reaching this point genuinely needs the user's attention
|
|
350
|
-
tonight. Do not split the wrap-up across multiple messages.
|
|
@@ -8,11 +8,16 @@ sub-session is scoped to a single integration** — every `<fetch>` row
|
|
|
8
8
|
in the `<acquisition-plan>` block below shares the same `integration`
|
|
9
9
|
attribute, and the sole partial inlined below owns the only
|
|
10
10
|
`(integration, mode)` cell you can hit. Your job is to materialise
|
|
11
|
-
those `<fetch>` rows into fresh `/api/observations` rows via
|
|
12
|
-
`
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
those `<fetch>` rows into fresh `/api/observations` rows via the
|
|
12
|
+
`mcp__aitne-observations__submit_observations` MCP tool (preferred —
|
|
13
|
+
structured-JSON transport that bypasses the SDK bash preflight, so mail
|
|
14
|
+
subjects/snippets carrying Unicode whitespace land cleanly) — one batched
|
|
15
|
+
array per acquired window, not one call per item. If the MCP tool is not
|
|
16
|
+
in your allowed tools (non-Claude session backend), fall back to
|
|
17
|
+
`POST /api/observations/batch` with the same envelope. The coordinator
|
|
18
|
+
merges your single JSON-line output with the other integrations'
|
|
19
|
+
sub-sessions; you do not write to context files, do not synthesize, and
|
|
20
|
+
do not notify the owner.
|
|
16
21
|
|
|
17
22
|
Read the `<acquisition-plan>` block carefully — every row carries the
|
|
18
23
|
exact `(integration, mode, window, account?, query)` tuple the daemon
|
|
@@ -55,11 +60,11 @@ error), emit exactly one JSON line on stdout with the shape:
|
|
|
55
60
|
```
|
|
56
61
|
|
|
57
62
|
- `fetched` — total items returned by upstream APIs across every row.
|
|
58
|
-
- `posted` — sum of the
|
|
59
|
-
|
|
60
|
-
(i.e. `results[*].status ∈ {"created","modified"}`).
|
|
61
|
-
- `duplicates` — sum of the
|
|
62
|
-
|
|
63
|
+
- `posted` — sum of the submit envelope's `posted` counter across
|
|
64
|
+
every `submit_observations` (or `POST /api/observations/batch`) call
|
|
65
|
+
you make (i.e. `results[*].status ∈ {"created","modified"}`).
|
|
66
|
+
- `duplicates` — sum of the submit envelope's `duplicates` counter
|
|
67
|
+
(i.e. `results[*].status == "duplicate"`).
|
|
63
68
|
- `errors` — list of `{type, ...}` records. Common types:
|
|
64
69
|
- `no-surface` — the row points at an in-session connector that
|
|
65
70
|
isn't bound on this backend.
|
|
@@ -67,11 +72,11 @@ error), emit exactly one JSON line on stdout with the shape:
|
|
|
67
72
|
filter (defensive).
|
|
68
73
|
- `fetch-failed` — upstream API returned a non-2xx; include
|
|
69
74
|
`{type, integration, account?, status, message}`.
|
|
70
|
-
- `flip-locked` —
|
|
75
|
+
- `flip-locked` — the submit envelope returned
|
|
71
76
|
`results[*].status="flip_locked"` for an integration mid-flip.
|
|
72
77
|
Include `{type, integration, account?}`. Do NOT retry inline —
|
|
73
78
|
the next routine tick reaps it.
|
|
74
|
-
- `validation-error` —
|
|
79
|
+
- `validation-error` — the submit envelope returned
|
|
75
80
|
`results[*].status="validation_error"` for a malformed item.
|
|
76
81
|
Include `{type, integration, ref, detail}` (copy `detail` from
|
|
77
82
|
`results[*].error`).
|
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## Hourly Observation Review
|
|
4
4
|
|
|
5
|
+
This task-flow is the **daemon-internal** hourly cron — a built-in
|
|
6
|
+
observation review the dispatcher fires every hour. It is NOT the
|
|
7
|
+
user-facing hourly recurring schedule path. Operators who want to
|
|
8
|
+
register a custom hourly task should POST to
|
|
9
|
+
`/api/recurring-schedules` with `recurrenceRule.frequency:"hourly"`
|
|
10
|
+
(see the `schedule` skill's `references/recurring.md`); those rows
|
|
11
|
+
fire `scheduled.task` / `scheduled.dm` events instead.
|
|
12
|
+
|
|
5
13
|
The "Vault policy files" block appended to this prompt includes
|
|
6
14
|
`routines/hourly.md` — your canonical check list for this cadence.
|
|
7
15
|
The "Vault review context" block includes `context-index.md` and
|
|
@@ -69,11 +77,9 @@ observation warrants project-state context (e.g. references a project,
|
|
|
69
77
|
milestone, or deliverable — not merely a file edit in a watched repo).
|
|
70
78
|
|
|
71
79
|
### Stage gate decision (cost-reduction-structural §B)
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
you were spawned — pull the `reason` and `signals_snapshot` into
|
|
76
|
-
your prioritisation. Examples:
|
|
80
|
+
The `<gate_decision>` block is always present — every Stage 3 enqueue
|
|
81
|
+
emits it. The block tells you *why* you were spawned — pull the
|
|
82
|
+
`reason` and `signals_snapshot` into your prioritisation. Examples:
|
|
77
83
|
|
|
78
84
|
- `reason: vip_mail_unread` → start with the mail observation, do not
|
|
79
85
|
scan obsidian noise first.
|
|
@@ -84,9 +90,11 @@ your prioritisation. Examples:
|
|
|
84
90
|
own dispatcher.
|
|
85
91
|
- `reason: heartbeat_due` → low-signal heartbeat. Stay maximally
|
|
86
92
|
silent unless something actually warrants action.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
93
|
+
- `reason: cautious_escalate_prepass_failure` → the pre-pass fetcher
|
|
94
|
+
failed for at least one non-direct integration this tick. The
|
|
95
|
+
`<fetch_report status="failed">` block in your prompt tells you
|
|
96
|
+
which integration is lossy; treat its observations as potentially
|
|
97
|
+
stale and lean on whatever rows the previous tick left.
|
|
90
98
|
|
|
91
99
|
### Pre-summarized observations (cost-reduction-structural §A)
|
|
92
100
|
Every observation arrives with `summary_text` (≤120 chars) and
|
|
@@ -71,7 +71,7 @@ Stay log-only when **all** these hold:
|
|
|
71
71
|
|
|
72
72
|
Default to `escalate`. Stage 3 has the full skills, MCP surface, and
|
|
73
73
|
context to reach the right answer; a wrongly-escalated tick costs ~$0.01
|
|
74
|
-
in
|
|
74
|
+
in medium-tier tokens, while a wrongly-suppressed tick costs the user a
|
|
75
75
|
missed reminder. The shadow-mode validation phase explicitly rewards
|
|
76
76
|
high recall over high precision: ship the bias toward escalate, the
|
|
77
77
|
operator-tunable thresholds will trim it later.
|
|
@@ -1,3 +1,45 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
STATUS: disabled by default (pre-release).
|
|
3
|
+
|
|
4
|
+
The scheduler cron and boot-time catchup in
|
|
5
|
+
`packages/daemon/src/{core/scheduler.ts,bootstrap/schedule-helpers.ts}`
|
|
6
|
+
consult `config.monthlyReviewEnabled` (default `false`) before
|
|
7
|
+
firing this routine. The task flow below is preserved verbatim as
|
|
8
|
+
the design-of-record but is not exercised at runtime until the kill
|
|
9
|
+
switch flips on.
|
|
10
|
+
|
|
11
|
+
Why disabled: the current routine reads ~30 daily files + 4-5 weekly
|
|
12
|
+
files + the agent journal to synthesise a user-facing snapshot whose
|
|
13
|
+
downstream leverage is unimplemented (`<previous_month>` injection
|
|
14
|
+
is documented as "未実装" in docs/design/06-memory.md §6.2.8 and
|
|
15
|
+
weekly-next-week-leverage.md §6 "Out of scope"). Cost lands near the
|
|
16
|
+
per-execute `max_budget_usd: 1.00` ceiling for an output that no
|
|
17
|
+
routine consumes downstream — the cost/value ratio is poor in the
|
|
18
|
+
current shape.
|
|
19
|
+
|
|
20
|
+
Re-enable path: Mirror+Prune redesign.
|
|
21
|
+
1. Drop the 30 × daily/*.md re-read (already aggregated in weekly).
|
|
22
|
+
2. Collapse Wins / Outstanding / Metrics / Risks / Reading sections
|
|
23
|
+
into two atomic outputs:
|
|
24
|
+
- Unit 1 — one trend observation, ≥3 weeks of evidence, 1 line.
|
|
25
|
+
- Unit 2 — aged carry-over decisions (drop/defer/do-now/
|
|
26
|
+
delegate/decide) on Carry Over entries that appeared ≥4
|
|
27
|
+
weeks in a row.
|
|
28
|
+
3. Add `previous-month-digest.ts` so the new-month day-1
|
|
29
|
+
morning_routine receives a `<previous_month>` block (analogous
|
|
30
|
+
to `previous-week-digest.ts`). Without this, monthly remains a
|
|
31
|
+
write-only snapshot.
|
|
32
|
+
4. Default Phase 4 notification to silent; only send when Unit 2
|
|
33
|
+
has at least one `decide` verb or Unit 1 contradicts a
|
|
34
|
+
user-stated commitment.
|
|
35
|
+
5. Drop the agent-internal `## Monthly YYYY-MM` block — weekly's
|
|
36
|
+
12-week journal already covers self-critique signal.
|
|
37
|
+
|
|
38
|
+
When the redesign ships, flip the default to `true` in
|
|
39
|
+
`packages/daemon/src/settings/runtime-settings.ts:monthlyReviewEnabled`
|
|
40
|
+
and re-introduce the docs under `agent-assets/docs/features/routines/`.
|
|
41
|
+
-->
|
|
42
|
+
|
|
1
43
|
{context}
|
|
2
44
|
|
|
3
45
|
## Task: Monthly Review
|
|
@@ -122,7 +164,7 @@ continue.
|
|
|
122
164
|
reliability)
|
|
123
165
|
|
|
124
166
|
## Reading
|
|
125
|
-
- Completed this month: N — short list of "Title — Author (
|
|
167
|
+
- Completed this month: N — short list of "Title — Author (rating: N/5)"
|
|
126
168
|
bullets, max 5 lines. Omit the Reading section entirely if N = 0
|
|
127
169
|
AND currently-reading count = 0.
|
|
128
170
|
- Currently reading: up to 3 titles with highlight count.
|
|
@@ -157,9 +199,9 @@ continue.
|
|
|
157
199
|
### Prior adjustments follow-up
|
|
158
200
|
- (Review EACH bullet from last month's `### Proposed adjustments`.
|
|
159
201
|
For each one, write exactly one of:
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
202
|
+
implemented: [what changed]
|
|
203
|
+
in-progress: [current state]
|
|
204
|
+
dropped: [why]
|
|
163
205
|
Fallback rules:
|
|
164
206
|
- No prior monthly section exists → "- First month — no prior adjustments"
|
|
165
207
|
- Prior section exists but has no `### Proposed adjustments` subsection
|