@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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
## Skills
|
|
2
|
+
|
|
3
|
+
You have access to skills materialized under `.codex/skills/` (or
|
|
4
|
+
`.gemini/skills/` when running Gemini). Each skill is a small markdown
|
|
5
|
+
file with frontmatter (`name`, `description`, `allowed-tools`) followed
|
|
6
|
+
by guidance and worked examples.
|
|
7
|
+
|
|
8
|
+
All skills require: `Bash(curl *)` for daemon API calls, `Read` for
|
|
9
|
+
on-demand `SKILL.md` introspection. Skills with additional tool
|
|
10
|
+
requirements declare them in their own `SKILL.md` frontmatter — `Read`
|
|
11
|
+
the file to see the full list before invoking those tools.
|
|
12
|
+
|
|
13
|
+
Before acting on a user request:
|
|
14
|
+
|
|
15
|
+
1. Scan the `<skill-index>` below for a skill whose `description` matches
|
|
16
|
+
your task.
|
|
17
|
+
2. If one matches, `Read` `.codex/skills/<name>/SKILL.md` (or
|
|
18
|
+
`.gemini/skills/<name>/SKILL.md`) and follow its contents. The path is
|
|
19
|
+
fixed by the header sentence inside `<skill-index>`; the `<name>` comes
|
|
20
|
+
verbatim from the entry.
|
|
21
|
+
3. You may load multiple skills in a single turn.
|
|
22
|
+
4. Do not invent skill names — only use entries listed in `<skill-index>`.
|
|
23
|
+
|
|
24
|
+
The directory under `.codex/skills/` (or `.gemini/skills/`) is the
|
|
25
|
+
authoritative source of skill content. Anything inlined in this system
|
|
26
|
+
prompt above is supporting context only.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: calendar-acquire.google_calendar
|
|
3
3
|
description: Acquire a Google Calendar event window per <acquisition-plan> row.
|
|
4
|
-
spec:
|
|
4
|
+
spec: docs/design/appendices/routine-data-acquisition.md §6.8 / §8.3
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Google Calendar acquisition
|
|
@@ -17,8 +17,13 @@ Note on coverage: routines whose calendar window is already covered by
|
|
|
17
17
|
double-fetch. The catalog only emits drift / retrospective / imminent
|
|
18
18
|
windows for the pre-pass.
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
`
|
|
20
|
+
Submit every returned event — for a whole window in **one** call — via the
|
|
21
|
+
`mcp__aitne-observations__submit_observations` MCP tool when it is in your
|
|
22
|
+
allowed tools (preferred — bypasses the SDK bash preflight). Build the
|
|
23
|
+
tool input as `{"observations":[…]}` with one entry per event.
|
|
24
|
+
|
|
25
|
+
If the MCP tool is unavailable (non-Claude session backend), fall back to
|
|
26
|
+
`POST http://localhost:8321/api/observations/batch` with the same envelope:
|
|
22
27
|
|
|
23
28
|
```json
|
|
24
29
|
{"observations":[
|
|
@@ -42,9 +47,10 @@ Field rules per element:
|
|
|
42
47
|
"raw": { "title": ..., "start": ..., "end": ...,
|
|
43
48
|
"attendees": [...], "status": ... } }`
|
|
44
49
|
|
|
45
|
-
Server computes the dedup hash from `(source, payload)`. The
|
|
46
|
-
|
|
47
|
-
"posted": N, "duplicates": N, "errors": N }`. Per-item
|
|
50
|
+
Server computes the dedup hash from `(source, payload)`. The MCP tool and
|
|
51
|
+
the batch endpoint return the same envelope: `{ "results": [...],
|
|
52
|
+
"fetched": N, "posted": N, "duplicates": N, "errors": N }`. Per-item
|
|
53
|
+
`results[*].status`:
|
|
48
54
|
|
|
49
55
|
- `"created"` / `"modified"` — rolled into `posted`.
|
|
50
56
|
- `"duplicate"` — rolled into `duplicates`.
|
|
@@ -53,8 +59,8 @@ always returns `200` with a JSON envelope `{ "results": [...], "fetched": N,
|
|
|
53
59
|
- `"validation_error"` — append `{type:"validation-error","integration":"google_calendar","ref":"<ref>","detail":"<results[*].error>"}`
|
|
54
60
|
to `errors` and continue.
|
|
55
61
|
|
|
56
|
-
Cap each batch at 200 entries — split the window into multiple
|
|
57
|
-
upstream
|
|
62
|
+
Cap each batch at 200 entries — split the window into multiple
|
|
63
|
+
`submit_observations` (or POST) calls if the upstream returns more than that.
|
|
58
64
|
|
|
59
65
|
<!-- mode:direct:google_calendar -->
|
|
60
66
|
GET `http://localhost:8321/api/calendar/events<query>` where `<query>` is
|
|
@@ -63,7 +69,8 @@ the literal `query` attribute of the `<fetch>` row (e.g.
|
|
|
63
69
|
accepts `date=YYYY-MM-DD` (or `today`) plus `days=N` (≤90); `timeMin`
|
|
64
70
|
/ `timeMax` are NOT recognised. The daemon returns `{ "events": [...] }`;
|
|
65
71
|
map every event into the `observations[]` array of a single
|
|
66
|
-
`POST /api/observations/batch`
|
|
72
|
+
`submit_observations` MCP tool call (or `POST /api/observations/batch`
|
|
73
|
+
fallback).
|
|
67
74
|
<!-- /mode:direct:google_calendar -->
|
|
68
75
|
|
|
69
76
|
<!-- mode:delegated-same:google_calendar -->
|
|
@@ -118,8 +125,8 @@ following body (substitute the row's `query` into `task`):
|
|
|
118
125
|
}
|
|
119
126
|
```
|
|
120
127
|
|
|
121
|
-
Map all items in `result.events[]` into a single
|
|
122
|
-
`POST /api/observations/batch`
|
|
128
|
+
Map all items in `result.events[]` into a single `submit_observations`
|
|
129
|
+
MCP tool call (or `POST /api/observations/batch` fallback).
|
|
123
130
|
<!-- /mode:delegated-cross:google_calendar -->
|
|
124
131
|
|
|
125
132
|
<!-- mode:native:google_calendar -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: calendar-acquire.outlook_calendar
|
|
3
3
|
description: Acquire an Outlook Calendar event window per <acquisition-plan> row.
|
|
4
|
-
spec:
|
|
4
|
+
spec: docs/design/appendices/routine-data-acquisition.md §6.8 / §8.4
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Outlook Calendar acquisition
|
|
@@ -28,8 +28,13 @@ the window via `<calendar_events_*>` (multi-provider after §6.6), the
|
|
|
28
28
|
catalog skips the pre-pass row to avoid double-fetching. The pre-pass
|
|
29
29
|
only ships drift / retrospective / imminent windows.
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
`
|
|
31
|
+
Submit every returned event — for a whole window in **one** call — via the
|
|
32
|
+
`mcp__aitne-observations__submit_observations` MCP tool when it is in your
|
|
33
|
+
allowed tools (preferred — bypasses the SDK bash preflight). Build the
|
|
34
|
+
tool input as `{"observations":[…]}` with one entry per event.
|
|
35
|
+
|
|
36
|
+
If the MCP tool is unavailable (non-Claude session backend), fall back to
|
|
37
|
+
`POST http://localhost:8321/api/observations/batch` with the same envelope:
|
|
33
38
|
|
|
34
39
|
```json
|
|
35
40
|
{"observations":[
|
|
@@ -52,9 +57,10 @@ Field rules per element:
|
|
|
52
57
|
"raw": { "title": ..., "start": ..., "end": ...,
|
|
53
58
|
"attendees": [...], "status": ... } }`
|
|
54
59
|
|
|
55
|
-
Server computes the dedup hash from `(source, payload)`. The
|
|
56
|
-
|
|
57
|
-
"posted": N, "duplicates": N, "errors": N }`. Per-item
|
|
60
|
+
Server computes the dedup hash from `(source, payload)`. The MCP tool and
|
|
61
|
+
the batch endpoint return the same envelope: `{ "results": [...],
|
|
62
|
+
"fetched": N, "posted": N, "duplicates": N, "errors": N }`. Per-item
|
|
63
|
+
`results[*].status`:
|
|
58
64
|
|
|
59
65
|
- `"created"` / `"modified"` — rolled into `posted`.
|
|
60
66
|
- `"duplicate"` — rolled into `duplicates`.
|
|
@@ -63,8 +69,8 @@ always returns `200` with a JSON envelope `{ "results": [...], "fetched": N,
|
|
|
63
69
|
- `"validation_error"` — append `{type:"validation-error","integration":"outlook_calendar","ref":"<ref>","detail":"<results[*].error>"}`
|
|
64
70
|
to `errors` and continue.
|
|
65
71
|
|
|
66
|
-
Cap each batch at 200 entries — split the window into multiple
|
|
67
|
-
upstream
|
|
72
|
+
Cap each batch at 200 entries — split the window into multiple
|
|
73
|
+
`submit_observations` (or POST) calls if the upstream returns more than that.
|
|
68
74
|
|
|
69
75
|
<!-- mode:direct:outlook_calendar -->
|
|
70
76
|
GET `http://localhost:8321/api/calendar/outlook/events<query>` where
|
|
@@ -73,7 +79,8 @@ GET `http://localhost:8321/api/calendar/outlook/events<query>` where
|
|
|
73
79
|
accepts `date=YYYY-MM-DD` (or `today`) plus `days=N` (≤90); `timeMin`
|
|
74
80
|
/ `timeMax` are NOT recognised. The daemon returns
|
|
75
81
|
`{ "events": [...] }`; map every event into the `observations[]` array
|
|
76
|
-
of a single `
|
|
82
|
+
of a single `submit_observations` MCP tool call (or `POST
|
|
83
|
+
/api/observations/batch` fallback).
|
|
77
84
|
<!-- /mode:direct:outlook_calendar -->
|
|
78
85
|
|
|
79
86
|
<!-- mode:delegated-same:outlook_calendar -->
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
# capture-user-info — canonical trigger-shape enumeration + routing rules
|
|
3
|
+
# for silent same-turn user-info writes. Included from:
|
|
4
|
+
# - message.received.dm.md (Step 1)
|
|
5
|
+
# - message.received.dm_first.md (Step 1)
|
|
6
|
+
# - routine.user_profile_sweep.md (Step 2)
|
|
7
|
+
# - routine.evening_review.md (Step 3 cross-reference)
|
|
8
|
+
# Source of truth: this partial. The user-profile skill is the writer
|
|
9
|
+
# (file split, read-before-write, section_not_found fallback, anchor
|
|
10
|
+
# convention); this partial is the trigger-and-routing summary the
|
|
11
|
+
# task-flows consume.
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
Scan for declarative user facts or imperative tone/style directives. If matched, persist in the **same turn** — silent (no acknowledgement to the user); do not defer to Evening Review (the message may be truncated by then).
|
|
15
|
+
|
|
16
|
+
**Imperative tone/style directives** ("always reply in English", "shorter please", "don't add emojis", "speak casually", "be more concise") are agent directives, NOT user facts → route per the user-profile skill §"Tone / character preferences". When ambiguous (e.g. "I prefer short replies"), default to character — never duplicate in profile.md.
|
|
17
|
+
|
|
18
|
+
**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:
|
|
19
|
+
|
|
20
|
+
- Top-level identity / platform / notification fact → `user/profile.md`.
|
|
21
|
+
- Detail-heavy fact (specific person, workplace, hobby, tool, goal) → matching `user/<topic>.md` (`people` / `work` / `expertise` / `personal` / `goals`).
|
|
22
|
+
- 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.
|
|
23
|
+
|
|
24
|
+
Never invent facts the user did not state. Never re-write a fact a paraphrase of which already exists in the target file.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Confirm sub-flow contract (`confirm:` `dm_session` rows).
|
|
3
|
+
Single source of truth for the `confirm_dedup_key` shape and the
|
|
4
|
+
cross-path cancellation behaviour. Included from:
|
|
5
|
+
- `scheduled.dm.md` (`## Confirmation follow-up`)
|
|
6
|
+
- `message.received.dm.md` / `message.received.dm_first.md`
|
|
7
|
+
(suppression rule → schedule a `confirm:` row instead)
|
|
8
|
+
- `schedule/SKILL.md` references this partial via the pointer
|
|
9
|
+
paragraph in its dedup pre-check section.
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
### `confirm_dedup_key` pre-check (mandatory for `confirm:` sub-flow rows)
|
|
13
|
+
|
|
14
|
+
When scheduling a `dm_session` row with `taskContext.sub_flow="confirm"`,
|
|
15
|
+
filter `GET /api/schedule?status=pending,running` by
|
|
16
|
+
`taskContext.confirm_dedup_key`. Skip if any match exists — regardless of
|
|
17
|
+
`scheduledFor` distance or description match. The confirm sub-flow's
|
|
18
|
+
chained-fire model (successor row queued for `<current_time> + 15 min`)
|
|
19
|
+
and the hot-thread defer both inherit the same `dedup_key`, so a
|
|
20
|
+
legitimate successor / defer row will occupy the queue with the same
|
|
21
|
+
key — a second gate firing for the same topic MUST yield to it rather
|
|
22
|
+
than double-asking.
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
curl -s "http://localhost:8321/api/schedule?status=pending,running" \
|
|
26
|
+
| jq --arg k "<gate>:<stable-topic>" \
|
|
27
|
+
'[.items[] | select(.taskContext.confirm_dedup_key == $k)] | length'
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
If the count is `≥ 1`, log to `## Agent Log` and proceed without
|
|
31
|
+
scheduling:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
- HH:MM [confirm] skipped <dedup_key>: row already pending
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### `confirm_dedup_key` shape contract
|
|
38
|
+
|
|
39
|
+
The key is `<gate>:<stable-topic>`. Examples:
|
|
40
|
+
|
|
41
|
+
- `create_project:la-pm-masters`
|
|
42
|
+
- `roadmap_ambiguous:tokyo-trip-date`
|
|
43
|
+
- `managed_task_dedup:<existing-task-id>`
|
|
44
|
+
|
|
45
|
+
The gate scope ensures two unrelated gates can't collide on the same
|
|
46
|
+
topic name. The topic component MUST be deterministic from the topic
|
|
47
|
+
itself — no timestamps, no message IDs, no random nonces — so re-fires
|
|
48
|
+
of the same gate produce the same key and the pre-flight catches them.
|
|
49
|
+
|
|
50
|
+
This rule layers on top of the schedule skill's three baseline dedup
|
|
51
|
+
checks (Agent Plan, description-match, recurring-schedule). It catches
|
|
52
|
+
the case where two confirms target the same topic at different
|
|
53
|
+
scheduled times (e.g. one queued for the morning briefing, another the
|
|
54
|
+
gate would queue for `+4h`).
|
|
55
|
+
|
|
56
|
+
### Cross-path cancellation
|
|
57
|
+
|
|
58
|
+
A pending `confirm:` row is cancelled by the agent updating
|
|
59
|
+
`taskContext` on either:
|
|
60
|
+
|
|
61
|
+
- The row itself (via `PATCH /api/schedule/:id`) when the originating
|
|
62
|
+
gate's outcome resolves through a non-confirm path (e.g. the user
|
|
63
|
+
answered inline before the scheduled `confirm:` fired).
|
|
64
|
+
- A predecessor confirm row whose decision supersedes the topic.
|
|
65
|
+
|
|
66
|
+
Cancellation is the gate's responsibility — the scheduler does not
|
|
67
|
+
introspect `taskContext` for it. Use the `confirm_dedup_key` to locate
|
|
68
|
+
the row(s) to cancel.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
# dm-intent.long-horizon — Long-horizon DM-intent detection decision tree.
|
|
3
|
+
# Included from: message.received.dm.md (Step 4), message.received.dm_first.md
|
|
4
|
+
# (Step 4). The `roadmap` skill is the WRITER (PUT / PATCH / archive); this
|
|
5
|
+
# partial carries the trigger surface that the DM dispatcher applies before
|
|
6
|
+
# the writer runs.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Referenced from `message.received.dm` and `message.received.dm_first`.
|
|
10
|
+
Identify user messages that describe a commitment or plan beyond the
|
|
11
|
+
current day so the DM handler can route them into roadmap.
|
|
12
|
+
|
|
13
|
+
**Signals (positive):**
|
|
14
|
+
- Explicit forward-looking verb + horizon phrase:
|
|
15
|
+
*"going to X next month"*, *"planning to do Y this summer"*,
|
|
16
|
+
*"want to Z this quarter"*
|
|
17
|
+
- Specific future date ≥ 48h out
|
|
18
|
+
- Concrete object (destination, deliverable, learning target,
|
|
19
|
+
reservation)
|
|
20
|
+
|
|
21
|
+
**Not signals:**
|
|
22
|
+
- Speculative language (*"maybe"*, *"someday"*, *"might"*, *"perhaps"*,
|
|
23
|
+
*"thinking about"*) without a concrete anchor
|
|
24
|
+
- Current-week commitments (those belong in `today.md`)
|
|
25
|
+
- Opinions, preferences, taste statements
|
|
26
|
+
(those belong in `user/*.md` via the `user-profile` skill)
|
|
27
|
+
|
|
28
|
+
**Routing after detection:**
|
|
29
|
+
- Dated ≥ 48h out → Agent Action Plan event entry (Preparation
|
|
30
|
+
Timeline grows once destination / details resolve).
|
|
31
|
+
- Undated horizon ("this summer", "this quarter") →
|
|
32
|
+
`## Long-term Plans` line with a horizon-tag.
|
|
33
|
+
- Ambiguous → keep in `agent-journal.md` as a candidate line and
|
|
34
|
+
surface via the next morning routine for user confirmation
|
|
35
|
+
(dry-run mode).
|