@aitne-sh/aitne 0.1.4 → 0.1.6

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 (87) hide show
  1. package/README.md +16 -0
  2. package/agent-assets/agent-profiles/_safety.md +29 -0
  3. package/agent-assets/agent-profiles/routine-fetch-window.md +75 -40
  4. package/agent-assets/agent-profiles/wiki-agent.md +19 -0
  5. package/agent-assets/docs/features/messaging/bang-commands.md +161 -0
  6. package/agent-assets/docs/features/messaging/overview.md +3 -0
  7. package/agent-assets/docs/features/wiki/commands.md +222 -0
  8. package/agent-assets/docs/features/wiki/overview.md +145 -0
  9. package/agent-assets/docs/getting-started/03-what-can-this-do.md +18 -0
  10. package/agent-assets/docs/glossary.md +34 -0
  11. package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +123 -0
  12. package/agent-assets/docs/guides/build-your-wiki.md +99 -0
  13. package/agent-assets/docs/guides/explore-with-trace-and-connect.md +169 -0
  14. package/agent-assets/docs/guides/maintain-wiki-health.md +168 -0
  15. package/agent-assets/docs/guides/multiple-wikis-for-multiple-domains.md +192 -0
  16. package/agent-assets/docs/guides/pause-the-agent.md +10 -3
  17. package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +156 -0
  18. package/agent-assets/docs/reference/cli-commands.md +24 -1
  19. package/agent-assets/docs/troubleshooting/wiki-ingest-full-blocked.md +96 -0
  20. package/agent-assets/docs/troubleshooting/wiki-write-failed.md +82 -0
  21. package/agent-assets/skills/context/SKILL.md +288 -17
  22. package/agent-assets/skills/external-services/SKILL.delegated.claude.md +2 -2
  23. package/agent-assets/skills/external-services/SKILL.delegated.codex.md +3 -3
  24. package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +6 -6
  25. package/agent-assets/skills/external-services/SKILL.md +5 -3
  26. package/agent-assets/skills/external-services/SKILL.native.claude.md +49 -58
  27. package/agent-assets/skills/external-services/SKILL.native.codex.md +50 -58
  28. package/agent-assets/skills/external-services/SKILL.native.gemini.md +53 -56
  29. package/agent-assets/skills/mail/SKILL.md +5 -5
  30. package/agent-assets/skills/mail/SKILL.native.claude.md +57 -65
  31. package/agent-assets/skills/mail/SKILL.native.codex.md +73 -75
  32. package/agent-assets/skills/mail/SKILL.native.gemini.md +80 -75
  33. package/agent-assets/skills/management-task-register/SKILL.md +3 -3
  34. package/agent-assets/skills/notion/SKILL.native.claude.md +78 -82
  35. package/agent-assets/skills/notion/SKILL.native.codex.md +78 -80
  36. package/agent-assets/skills/notion/SKILL.native.gemini.md +91 -90
  37. package/agent-assets/skills/observations/SKILL.md +123 -15
  38. package/agent-assets/skills/roadmap/SKILL.md +31 -4
  39. package/agent-assets/skills/schedule/SKILL.md +44 -3
  40. package/agent-assets/skills/today/SKILL.md +50 -11
  41. package/agent-assets/skills/travel-time/SKILL.md +9 -0
  42. package/agent-assets/skills/wiki/wiki-ask/SKILL.md +32 -0
  43. package/agent-assets/skills/wiki/wiki-compile/SKILL.md +126 -0
  44. package/agent-assets/skills/wiki/wiki-connect/SKILL.md +75 -0
  45. package/agent-assets/skills/wiki/wiki-graduate/SKILL.md +45 -0
  46. package/agent-assets/skills/wiki/wiki-ingest/SKILL.md +182 -0
  47. package/agent-assets/skills/wiki/wiki-lint/SKILL.md +90 -0
  48. package/agent-assets/skills/wiki/wiki-trace/SKILL.md +72 -0
  49. package/agent-assets/skills/wiki/wiki-vault-rules/SKILL.md +145 -0
  50. package/agent-assets/task-flows/_partials/calendar-acquire.google_calendar.md +28 -9
  51. package/agent-assets/task-flows/_partials/calendar-acquire.outlook_calendar.md +26 -9
  52. package/agent-assets/task-flows/_partials/mail-acquire.gmail.md +51 -24
  53. package/agent-assets/task-flows/_partials/mail-acquire.outlook_mail.md +46 -16
  54. package/agent-assets/task-flows/_partials/notion-acquire.notion.md +29 -9
  55. package/agent-assets/task-flows/message.received.dm.md +35 -2
  56. package/agent-assets/task-flows/message.received.dm.native.claude.md +25 -26
  57. package/agent-assets/task-flows/message.received.dm.native.codex.md +30 -24
  58. package/agent-assets/task-flows/message.received.dm.native.gemini.md +36 -36
  59. package/agent-assets/task-flows/message.received.dm_first.md +43 -4
  60. package/agent-assets/task-flows/message.received.dm_first.native.claude.md +20 -20
  61. package/agent-assets/task-flows/message.received.dm_first.native.codex.md +22 -19
  62. package/agent-assets/task-flows/message.received.dm_first.native.gemini.md +28 -24
  63. package/agent-assets/task-flows/routine.fetch_window.md +51 -36
  64. package/agent-assets/task-flows/routine.morning_routine.md +12 -3
  65. package/agent-assets/task-flows/routine.morning_routine_initial.md +22 -1
  66. package/agent-assets/task-flows/routine.roadmap_refresh.md +7 -3
  67. package/agent-assets/task-flows/scheduled.dm.md +477 -0
  68. package/agent-assets/task-flows/setup.initial.md +50 -23
  69. package/agent-assets/task-flows/wiki.ask.md +11 -0
  70. package/agent-assets/task-flows/wiki.compile.md +28 -0
  71. package/agent-assets/task-flows/wiki.connect.md +12 -0
  72. package/agent-assets/task-flows/wiki.ingest_url.md +35 -0
  73. package/agent-assets/task-flows/wiki.lint.md +13 -0
  74. package/agent-assets/task-flows/wiki.trace.md +13 -0
  75. package/agent-assets/wiki-seeds/schemas/output.md +12 -0
  76. package/agent-assets/wiki-seeds/schemas/raw.md +13 -0
  77. package/agent-assets/wiki-seeds/schemas/wiki.md +12 -0
  78. package/agent-assets/wiki-seeds/taxonomy.md +13 -0
  79. package/package.json +10 -6
  80. package/scripts/check-redaction-coverage.mjs +0 -109
  81. package/scripts/commands.md +0 -0
  82. package/scripts/message-discipline-digest.mjs +0 -535
  83. package/scripts/poc/google-connector-inheritance/REPORT.md +0 -197
  84. package/scripts/poc/google-connector-inheritance/claude-sdk-probe.mjs +0 -79
  85. package/scripts/regen-skill-fixtures.mjs +0 -39
  86. package/scripts/remint-roadmap-ids.mjs +0 -257
  87. package/scripts/smoke-obsidian-api.mjs +0 -166
@@ -13,8 +13,9 @@ session backend (Claude) matches the integration's `nativeBackend`.
13
13
  > actionable per-integration routing table is what you act on. For any
14
14
  > native integration the user's DM may need:
15
15
  >
16
- > - Call `mcp__claude_ai_<Service>__*` MCP tools directly. The exact
17
- > tool namespace per service is documented in each skill's
16
+ > - Call the in-session connector tools your harness exposes for that
17
+ > service directly. Your tool menu lists every available tool at
18
+ > session start. Per-service guidance lives in each skill's
18
19
  > `SKILL.native.claude.md` body materialised for this session
19
20
  > (`mail`, `external-services`, `notion`).
20
21
  > - Do **NOT** call `POST /api/integrations/<key>/exec` — returns 410
@@ -22,7 +23,7 @@ session backend (Claude) matches the integration's `nativeBackend`.
22
23
  > - Do **NOT** call the per-integration daemon routes listed in
23
24
  > `<integration-routing-table>` as `(DO NOT call /api/<key>/*)` —
24
25
  > each route-prefix returns 410 in native mode.
25
- > - Write-class MCP calls (per each connector's registry
26
+ > - Write-class connector calls (per each connector's registry
26
27
  > `destructiveTools` set) still require explicit user confirmation
27
28
  > per `docs/design/09-safety-cost.md` §7. The absolute-block layer
28
29
  > continues to fire regardless of mode.
@@ -35,38 +36,36 @@ session backend (Claude) matches the integration's `nativeBackend`.
35
36
 
36
37
  <integration-routing-table>
37
38
 
38
- ### Native MCP routing — per integration
39
+ ### Native connector routing — per integration
39
40
 
40
41
  The Calendar / Mail / Notion entries below override the matching
41
42
  sections in the shared base flow. Mode-conditional markers in the base
42
43
  (`<!-- mode:native:google_calendar -->`) still fire, but the explicit
43
- prose here carries the exact tool namespace and the safety contract
44
- for Claude's hosted connectors so the agent does not have to derive it
45
- mid-turn.
44
+ prose here carries the per-service intent and the safety contract for
45
+ in-session connectors so the agent does not have to derive it mid-turn.
46
46
 
47
47
  **Calendar — real-time queries.** When `google_calendar="native"`, use
48
- the `mcp__claude_ai_Google_Calendar__*` MCP tools (`list_events` /
49
- `get_event` / `list_calendars` / `suggest_time`). See the
50
- `external-services` skill's native body for argument shapes and the
51
- destructive-confirm contract for `create_event` / `update_event` /
52
- `delete_event` / `respond_to_event`. `/api/calendar/*` returns 410.
53
- `POST /api/integrations/google_calendar/exec` returns 410.
48
+ your in-session Google Calendar connector (list events / get event /
49
+ list calendars / suggest free-busy slot). See the `external-services`
50
+ skill's native body for capability shapes and the destructive-confirm
51
+ contract for create / update / delete / RSVP. `/api/calendar/*` returns
52
+ 410. `POST /api/integrations/google_calendar/exec` returns 410.
54
53
 
55
- **Mail — DM read / draft / reply.** When `gmail="native"`, use the
56
- `mcp__claude_ai_Gmail__*` MCP tools per the `mail` skill's native
57
- body (`search_threads` / `get_thread` / `create_draft` / label
58
- operations). Claude's hosted Gmail connector is **draft-only** —
59
- there is no send / forward / delete surface. If the user explicitly
60
- asks to send, point them at the Gmail web UI. For non-Gmail accounts
61
- (IMAP / Outlook / iCloud / Yahoo), keep using the direct-mode
62
- `/api/mail/<acct>/*` routes per the base `mail` skill body.
54
+ **Mail — DM read / draft / reply.** When `gmail="native"`, use your
55
+ in-session Gmail connector per the `mail` skill's native body (search
56
+ threads / read thread / create draft / label operations). The hosted
57
+ Gmail connector is typically **draft-only** — there is no send /
58
+ forward / delete surface. If the user explicitly asks to send, point
59
+ them at the Gmail web UI. For non-Gmail accounts (IMAP / Outlook /
60
+ iCloud / Yahoo), keep using the direct-mode `/api/mail/<acct>/*` routes
61
+ per the base `mail` skill body.
63
62
 
64
63
  **Notion — DM read / search / page operations.** When `notion="native"`,
65
- use the `mcp__claude_ai_Notion__*` MCP tools per the `notion` skill's
66
- native body (`notion-search` / `notion-fetch` / read-class + the
67
- destructive set). `/api/notion/databases` (label → UUID config dump)
68
- is still reachable in every mode — consult it before any Notion
69
- read so the MCP call carries a concrete UUID.
64
+ use your in-session Notion connector per the `notion` skill's native
65
+ body (search / fetch / read-class + the destructive set).
66
+ `/api/notion/databases` (label → UUID config dump) is still reachable
67
+ in every mode — consult it before any Notion read so the connector
68
+ call carries a concrete UUID.
70
69
 
71
70
  The dispatch decision flow (capture user info, profile-question
72
71
  reconcile, compose reply, route durable intent) is identical to the
@@ -11,16 +11,18 @@ session backend (Codex) matches the integration's `nativeBackend`.
11
11
  > `<key>_native_backend="<backend>"` for every native key. For any
12
12
  > native integration the user's DM may need:
13
13
  >
14
- > - Call `mcp__codex_apps__<service>._*` MCP tools directly. The Codex
15
- > namespace terminates with `._` the bare suffix from each skill's
16
- > `SKILL.native.codex.md` body is what you append.
14
+ > - Call the in-session connector tools your harness exposes for that
15
+ > service directly. Your tool menu lists every available tool at
16
+ > session start. Per-service guidance lives in each skill's
17
+ > `SKILL.native.codex.md` body materialised for this session
18
+ > (`mail`, `external-services`, `notion`).
17
19
  > - Do **NOT** call `POST /api/integrations/<key>/exec` (410 in native).
18
20
  > - Do **NOT** call the per-integration daemon routes
19
21
  > (`/api/calendar/*`, `/api/notion/query|search|pages|...`, Gmail
20
22
  > accounts under `/api/mail/*`) — each returns 410 in native mode.
21
- > - Write-class MCP calls (per registry `destructiveTools`) require
22
- > explicit user confirmation; the absolute-block layer continues to
23
- > fire.
23
+ > - Write-class connector calls (per registry `destructiveTools`)
24
+ > require explicit user confirmation; the absolute-block layer
25
+ > continues to fire.
24
26
  > - Direct-mode siblings keep using their direct routes — native gate
25
27
  > is per-key.
26
28
 
@@ -28,26 +30,30 @@ session backend (Codex) matches the integration's `nativeBackend`.
28
30
 
29
31
  <integration-routing-table>
30
32
 
31
- ### Native MCP routing — per integration
33
+ ### Native connector routing — per integration
32
34
 
33
35
  **Calendar — real-time queries.** When `google_calendar="native"`, use
34
- the `mcp__codex_apps__google_calendar._*` MCP tools (`_search` /
35
- `_search_events` / `_read_event` / `_fetch` / `_get_availability` +
36
- destructive set). `/api/calendar/*` and
37
- `POST /api/integrations/google_calendar/exec` both return 410.
38
-
39
- **Mail DM read / draft / reply.** When `gmail="native"`, use the
40
- `mcp__codex_apps__gmail._*` MCP tools per the `mail` skill's native
41
- body (`_search_emails` / `_read_email` / `_read_email_thread` /
42
- `_create_draft`). Destructive set (`_send_email` / `_send_draft` /
43
- `_forward_emails` / `_delete_emails` / `_archive_emails` / etc.)
44
- requires explicit user confirmation. For non-Gmail accounts (IMAP /
45
- Outlook / iCloud / Yahoo), keep using the direct-mode
46
- `/api/mail/<acct>/*` routes per the base `mail` skill body.
47
-
48
- **Notion DM read / search.** When `notion="native"`, use the
49
- `mcp__codex_apps__notion._*` MCP tools (`_search` / `_fetch` /
50
- `_notion_query_data_sources` for structured filters). The
36
+ your in-session Google Calendar connector (search / window-list events
37
+ / read event / batch-read / free-busy + destructive set). See the
38
+ `external-services` skill's native body for capability shapes and the
39
+ destructive-confirm contract for create / update / delete / RSVP.
40
+ `/api/calendar/*` and `POST /api/integrations/google_calendar/exec`
41
+ both return 410.
42
+
43
+ **Mail DM read / draft / reply.** When `gmail="native"`, use your
44
+ in-session Gmail connector per the `mail` skill's native body (search /
45
+ read / read-thread / create-draft). The Codex-side hosted Gmail
46
+ connector typically exposes a richer destructive surface than Claude's
47
+ (send / send-draft / forward / delete / archive / label / batch
48
+ modify); each of those capability classes requires explicit user
49
+ confirmation. For non-Gmail accounts (IMAP / Outlook / iCloud / Yahoo),
50
+ keep using the direct-mode `/api/mail/<acct>/*` routes per the base
51
+ `mail` skill body.
52
+
53
+ **Notion — DM read / search.** When `notion="native"`, use your
54
+ in-session Notion connector per the `notion` skill's native body
55
+ (search / fetch + the structured query primitive when the connector
56
+ exposes it, for property-shaped intents like "tasks in status X"). The
51
57
  `/api/notion/databases` config dump remains reachable in every mode.
52
58
 
53
59
  The dispatch decision flow (capture user info, profile-question
@@ -11,57 +11,57 @@ session backend (Gemini) matches the integration's `nativeBackend`.
11
11
  > `<key>_native_backend="<backend>"` for every native key. For any
12
12
  > native integration the user's DM may need:
13
13
  >
14
- > - Call `mcp_google-workspace_*.*` and `mcp_notion_*` MCP tools
15
- > directly. Gemini's namespace convention uses single underscores
16
- > between server and tool names with `.` as the inner separator (see
17
- > each skill's `SKILL.native.gemini.md` body for exact tool names).
14
+ > - Call the in-session connector tools your harness exposes for that
15
+ > service directly. Your tool menu lists every available tool at
16
+ > session start. Per-service guidance lives in each skill's
17
+ > `SKILL.native.gemini.md` body materialised for this session
18
+ > (`mail`, `external-services`, `notion`).
18
19
  > - Do **NOT** call `POST /api/integrations/<key>/exec` (410 in native).
19
20
  > - Do **NOT** call the per-integration daemon routes
20
21
  > (`/api/calendar/*`, `/api/notion/query|search|pages|...`, Gmail
21
22
  > accounts under `/api/mail/*`) — each returns 410 in native mode.
22
- > - Write-class MCP calls (per registry `destructiveTools`) require
23
- > explicit user confirmation; the absolute-block layer continues to
24
- > fire.
23
+ > - Write-class connector calls (per registry `destructiveTools`)
24
+ > require explicit user confirmation; the absolute-block layer
25
+ > continues to fire.
25
26
  > - Direct-mode siblings keep using their direct routes.
26
- > - **Gemini-specific quirks** (carry over from delegated mode):
27
- > `maxResults` is silently ignored on Gmail `search` and Calendar
28
- > `listEvents` — narrow the query window when the result is larger
29
- > than expected.
27
+ > - **Gemini-specific quirks** (typical of the `google-workspace`
28
+ > extension): `maxResults` is silently ignored on Gmail search and
29
+ > Calendar list-events — narrow the query window when the result is
30
+ > larger than expected.
30
31
 
31
32
  ### Per-session integration routing
32
33
 
33
34
  <integration-routing-table>
34
35
 
35
- ### Native MCP routing — per integration
36
+ ### Native connector routing — per integration
36
37
 
37
38
  **Calendar — real-time queries.** When `google_calendar="native"`, use
38
- the `mcp_google-workspace_calendar.*` MCP tools (`listEvents` /
39
- `getEvent` / `list` (list calendars) / `findFreeTime` + destructive
40
- set). `/api/calendar/*` and
39
+ your in-session Google Calendar connector (list-events / get-event /
40
+ list-calendars / find-free-time + destructive set). See the
41
+ `external-services` skill's native body for capability shapes and the
42
+ destructive-confirm contract. `/api/calendar/*` and
41
43
  `POST /api/integrations/google_calendar/exec` both return 410.
42
- `maxResults` is silently ignored on `listEvents` — narrow the window
43
- when needed. The default `attendeeResponseStatus` excludes declined
44
- events; pass the full list explicitly when declined meetings are
45
- relevant.
44
+ `maxResults` is typically silently ignored on list-events — narrow the
45
+ window when needed. The default `attendeeResponseStatus` typically
46
+ excludes declined events; pass the full list explicitly when declined
47
+ meetings are relevant.
46
48
 
47
- **Mail — DM read / draft / reply.** When `gmail="native"`, use the
48
- `mcp_google-workspace_gmail.*` MCP tools per the `mail` skill's
49
- native body (`search` / `get` / `createDraft`). Destructive set
50
- (`send` / `sendDraft` / `modify` / `modifyThread` / `createLabel` /
51
- `batchModify`) requires explicit user confirmation. The extension
52
- has no dedicated `delete` or `forward` tool — compose from primitives.
53
- For non-Gmail accounts (IMAP / Outlook / iCloud / Yahoo), keep using
54
- the direct-mode `/api/mail/<acct>/*` routes per the base `mail` skill
55
- body.
49
+ **Mail — DM read / draft / reply.** When `gmail="native"`, use your
50
+ in-session Gmail connector per the `mail` skill's native body (search /
51
+ read / create-draft). The destructive set (send / send-draft / modify
52
+ / modify-thread / create-label / batch-modify) requires explicit user
53
+ confirmation. Some Gemini-side Gmail connectors expose no dedicated
54
+ delete or forward tool — compose from primitives (delete = modify +
55
+ add `TRASH`; forward = send with re-quoted body). For non-Gmail
56
+ accounts (IMAP / Outlook / iCloud / Yahoo), keep using the direct-mode
57
+ `/api/mail/<acct>/*` routes per the base `mail` skill body.
56
58
 
57
- **Notion — DM read / search.** When `notion="native"`, use the
58
- `mcp_notion_*` MCP tools per the `notion` skill's native body
59
- (`mcp_notion_notion-search` / `mcp_notion_notion-fetch` and the
60
- destructive set). The descriptor assumes the user registered Notion's
61
- official MCP server under the literal name `notion`
62
- (`gemini mcp add notion <url>`); the §9.3 probe at flip time verifies
63
- presence. The `/api/notion/databases` config dump remains reachable in
64
- every mode.
59
+ **Notion — DM read / search.** When `notion="native"`, use your
60
+ in-session Notion connector per the `notion` skill's native body
61
+ (search / fetch and the destructive set). Native:gemini mode assumes
62
+ the user has registered a Notion MCP server against their Gemini CLI;
63
+ the §9.3 probe at flip time verifies presence. The
64
+ `/api/notion/databases` config dump remains reachable in every mode.
65
65
 
66
66
  The dispatch decision flow (capture user info, profile-question
67
67
  reconcile, compose reply, route durable intent) is shared with the
@@ -4,7 +4,7 @@
4
4
 
5
5
  This is the first message in today's DM session. <today> contains today's schedule, the user's tasks, and the agent's day plan. Respond to <user_input> below, applying the steps in order.
6
6
 
7
- The behavior in this flow is identical to `message.received.dm.md` except for the first-day delta in Step 3 (you may briefly preview the user's most imminent task as a follow-up question).
7
+ The behavior in this flow is identical to `message.received.dm.md` except for the first-day delta in Step 3 (you MAY briefly preview the user's most imminent task as a follow-up question — but ONLY when the gates in §"First-day delta" pass, never on a content-rich opener).
8
8
 
9
9
  ### Step 1 — Capture user info silently (before replying)
10
10
 
@@ -38,10 +38,34 @@ The user must never feel they are filling out a profile.
38
38
 
39
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.
40
40
 
41
- #### First-day delta optional 1–2 task preview
41
+ #### No topic-pivoting trailing question (universal, non-negotiable)
42
+
43
+ Never append a question that **changes the topic** of the user's message. A topic-continuing question (clarifier, follow-up, "want me to track this as X?" that flows from what the user just said) is fine when it reads as a natural beat in the same thread. A topic-pivoting question — about an unrelated task, deadline, or profile slot — is forbidden in the same reply, even if a gate's conditions for that ask are technically met.
44
+
45
+ If the reply does not naturally invite a question of its own, end with a statement. The agent has other surfaces (the morning briefing, the `scheduled.dm` confirm sub-flow, observation alerts) for non-conversational asks — the inbound DM reply is not the only channel, and pushing them here costs the conversation more than it saves the agent.
46
+
47
+ Worked examples (illustrate the topic-continuing vs. topic-pivoting distinction; tone follows persona / Character, NOT these example phrasings):
48
+
49
+ | User opener | Acceptable trailing question | Forbidden trailing question |
50
+ |---|---|---|
51
+ | "I quit IBM Japan, moved to LA for a PM master's." | *"Want me to start tracking the program — syllabus, deadlines — as a project?"* (continues the share) | *"By the way, your 23:59 PT 407632 midterm is tomorrow — how's prep?"* (pivots to an unrelated deadline) |
52
+ | "Feeling pretty drained today." | *(no trailing question — acknowledge the mood)* | *"What time should I remind you about the design review?"* (ignores the mood) |
53
+ | "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) |
54
+
55
+ This rule covers the First-day delta below, 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.
56
+
57
+ #### First-day delta — optional 1–2 task preview (gated)
42
58
 
43
59
  After responding to the user's actual message, you MAY briefly preview the user's 1–2 most imminent uncompleted tasks as a natural follow-up question. This delta only applies on the first DM of the day — once contact is established, subsequent DMs in `message.received.dm.md` skip this step.
44
60
 
61
+ The preview is **opt-in by opener shape**, not the default:
62
+
63
+ - **Eligible openers (preview welcome).** Short greetings ("morning", "hey", "hi", "yo") or explicit status queries ("what's on today", "schedule pls", "give me the day", "what's up"). The opener is generic with no embedded content; the user is asking for orientation. The preview is welcome here because the user has *asked* for it. Recognise the same opener shapes in any language the user writes in — the examples are English for prompt clarity only.
64
+ - **Disqualifying openers (preview forbidden — stay in the thread).** Substantive personal share, mood / feeling, question about the agent's behaviour, or anything the agent needs to acknowledge first. When the opener carries content the agent must respond to, *stay in the thread* — defer the preview to the next DM or the morning briefing. Pivoting away from a content-rich opener violates the universal rule above.
65
+ - **Compose-time length check.** If your reply is already 3+ lines acknowledging the user's content, do NOT append a task preview regardless of opener shape. The reply length is itself the signal that you are in conversation, not orientation.
66
+
67
+ If the preview clears all three gates, surface 1–2 tasks:
68
+
45
69
  - Look at the user's uncompleted tasks (`- [ ] HH:MM ...` rows in `## User Tasks`). Do NOT include `## Agent Plan` rows — those are the agent's internal to-dos.
46
70
  - Parse the day-type filter on line 2 of <today>. Drop tasks whose category focus is `off`.
47
71
  - Surface the 1–2 closest to <current_time> by HH:MM (overdue rank first).
@@ -101,13 +125,28 @@ When an incoming message has an attachment or asks you to operate on one, attemp
101
125
 
102
126
  These dispatchers are not exclusive — multiple may apply to one message.
103
127
 
128
+ **Confirm-reply continuation.** Before evaluating the per-domain
129
+ dispatchers below, scan `<conversation_history>` for the most recent
130
+ assistant message. If that message was a one-question confirm DM
131
+ (emitted by `scheduled.dm.md` ## Confirmation follow-up — typical
132
+ shape: a short single-question DM with no project/task name
133
+ embedded), route the user's reply to the originating gate's **reply
134
+ branches** based on the topic of the question, not on the literal
135
+ text of the user's reply. A bare "yeah" / "no" / counter-proposal
136
+ will not match the named-workstream shape the per-domain dispatchers
137
+ expect, so without this routing rule the reply silently misses the
138
+ gate. Example: confirm DM about *"track LA PM master's as a
139
+ project?"* → user replies "yeah" → route through the context skill's
140
+ "Project DM-intent detection" §"Reply branches" with branch=
141
+ affirmative.
142
+
104
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.
105
144
 
106
145
  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.
107
146
 
108
- **Long-horizon intent** (commitment, trip, deliverable, learning target beyond today) → route through the roadmap skill's "Long-horizon DM-intent detection". 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.
147
+ **Long-horizon intent** (commitment, trip, deliverable, learning target beyond today) → route through the roadmap skill's "Long-horizon DM-intent detection". 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.
109
148
 
110
- **Project intent** (state, progress, milestone, blocker, or a new-project request for a named workstream) → route through the context skill's "Project DM-intent detection". A new project requires the DM-confirm gate before any write; silently inferring a slug is forbidden. A project update tied to a dated milestone runs both this dispatcher and the long-horizon one (see the context skill's "Tie-breakers").
149
+ **Project intent** (state, progress, milestone, blocker, or a new-project request for a named workstream) → route through the context skill's "Project DM-intent detection". 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 the context skill Step 3 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 the context skill's "Tie-breakers").
111
150
 
112
151
  ## User Message
113
152
  Platform: {event_data[platform]}
@@ -16,37 +16,37 @@ most imminent task as a follow-up question — handled by the base
16
16
  > `<key>_native_backend="claude"` for every native key. For any native
17
17
  > integration the user's DM may need:
18
18
  >
19
- > - Call `mcp__claude_ai_<Service>__*` MCP tools directly per each
20
- > skill's `SKILL.native.claude.md` body.
19
+ > - Call the in-session connector tools your harness exposes for that
20
+ > service directly, per each skill's `SKILL.native.claude.md` body.
21
21
  > - Do **NOT** call `POST /api/integrations/<key>/exec` (410 in native).
22
22
  > - Do **NOT** call the per-integration daemon routes — each returns
23
23
  > 410 in native mode.
24
- > - Write-class MCP calls require explicit user confirmation.
24
+ > - Write-class connector calls require explicit user confirmation.
25
25
  > - Direct-mode siblings keep using their direct routes.
26
26
 
27
27
  ### Per-session integration routing
28
28
 
29
29
  <integration-routing-table>
30
30
 
31
- ### Native MCP routing — per integration
31
+ ### Native connector routing — per integration
32
32
 
33
- **Calendar.** When `google_calendar="native"`, use
34
- `mcp__claude_ai_Google_Calendar__*` MCP tools (`list_events` /
35
- `get_event` / `list_calendars` / `suggest_time`). `/api/calendar/*` and
33
+ **Calendar.** When `google_calendar="native"`, use your in-session
34
+ Google Calendar connector (list events / get event / list calendars /
35
+ suggest free-busy slot). `/api/calendar/*` and
36
36
  `POST /api/integrations/google_calendar/exec` both return 410.
37
- Destructive calendar tools require explicit user confirmation.
38
-
39
- **Mail.** When `gmail="native"`, use `mcp__claude_ai_Gmail__*` MCP
40
- tools per the `mail` skill's native body. Claude's hosted Gmail
41
- connector is **draft-only** — there is no send / forward / delete
42
- surface; if the user asks to send, point them at the Gmail web UI.
43
- For non-Gmail accounts (IMAP / Outlook / iCloud / Yahoo), keep using
44
- the direct-mode `/api/mail/<acct>/*` routes per the base `mail`
45
- skill body.
46
-
47
- **Notion.** When `notion="native"`, use the
48
- `mcp__claude_ai_Notion__*` MCP tools. `/api/notion/databases` (label
49
- → UUID config dump) remains reachable in every mode.
37
+ Destructive calendar capabilities require explicit user confirmation.
38
+
39
+ **Mail.** When `gmail="native"`, use your in-session Gmail connector
40
+ per the `mail` skill's native body. Hosted Gmail connectors are
41
+ typically **draft-only** — there is no send / forward / delete surface;
42
+ if the user asks to send, point them at the Gmail web UI. For
43
+ non-Gmail accounts (IMAP / Outlook / iCloud / Yahoo), keep using the
44
+ direct-mode `/api/mail/<acct>/*` routes per the base `mail` skill
45
+ body.
46
+
47
+ **Notion.** When `notion="native"`, use your in-session Notion
48
+ connector. `/api/notion/databases` (label → UUID config dump) remains
49
+ reachable in every mode.
50
50
 
51
51
  The first-DM dispatch decision flow (capture user info, profile-question
52
52
  reconcile, compose reply with the optional 1–2 task preview, route
@@ -11,34 +11,37 @@ Behavior is identical to `message.received.dm.native.codex.md` except
11
11
  for the first-day delta in Step 3 (handled by the base
12
12
  `message.received.dm_first.md` flow inlined below).
13
13
 
14
- > **Connector routing (native).** Use
15
- > `mcp__codex_apps__<service>._*` MCP tools directly. Do **NOT** call
14
+ > **Connector routing (native).** Use the in-session connector tools
15
+ > your harness exposes for each native integration directly, per each
16
+ > skill's `SKILL.native.codex.md` body. Do **NOT** call
16
17
  > `POST /api/integrations/<key>/exec` (410) or the per-integration
17
- > daemon routes (410). Write-class MCP calls require explicit user
18
- > confirmation; direct-mode siblings keep using their direct routes.
18
+ > daemon routes (410). Write-class connector calls require explicit
19
+ > user confirmation; direct-mode siblings keep using their direct
20
+ > routes.
19
21
 
20
22
  ### Per-session integration routing
21
23
 
22
24
  <integration-routing-table>
23
25
 
24
- ### Native MCP routing — per integration
26
+ ### Native connector routing — per integration
25
27
 
26
- **Calendar.** When `google_calendar="native"`, use
27
- `mcp__codex_apps__google_calendar._*` MCP tools (`_search` /
28
- `_search_events` / `_read_event` / `_fetch` / `_get_availability` +
29
- destructive set). `/api/calendar/*` and
28
+ **Calendar.** When `google_calendar="native"`, use your in-session
29
+ Google Calendar connector (search / window-list events / read event /
30
+ batch-read / free-busy + destructive set). `/api/calendar/*` and
30
31
  `POST /api/integrations/google_calendar/exec` both return 410.
31
32
 
32
- **Mail.** When `gmail="native"`, use `mcp__codex_apps__gmail._*` MCP
33
- tools. Destructive set (`_send_email` / `_send_draft` /
34
- `_forward_emails` / `_delete_emails` / `_archive_emails` / ...)
35
- requires explicit user confirmation. For non-Gmail accounts keep
36
- using `/api/mail/<acct>/*`.
37
-
38
- **Notion.** When `notion="native"`, use `mcp__codex_apps__notion._*`
39
- MCP tools. `_notion_query_data_sources` is the SQL-style structured
40
- query for property-shaped intents (Codex-only capability).
41
- `/api/notion/databases` config dump is reachable in every mode.
33
+ **Mail.** When `gmail="native"`, use your in-session Gmail connector.
34
+ The Codex-side hosted Gmail destructive surface (send / send-draft /
35
+ forward / delete / archive / label / batch modify) requires explicit
36
+ user confirmation. For non-Gmail accounts keep using
37
+ `/api/mail/<acct>/*`.
38
+
39
+ **Notion.** When `notion="native"`, use your in-session Notion
40
+ connector. Use the structured query primitive when the connector
41
+ exposes it (Codex-side hosted Notion connectors typically do — see the
42
+ `notion` skill's native body); fall back to search + client-side
43
+ filtering otherwise. `/api/notion/databases` config dump is reachable
44
+ in every mode.
42
45
 
43
46
  The first-DM dispatch decision flow (capture user info, profile-question
44
47
  reconcile, compose reply with the optional 1–2 task preview, route
@@ -11,40 +11,44 @@ Behavior is identical to `message.received.dm.native.gemini.md`
11
11
  except for the first-day delta in Step 3 (handled by the base
12
12
  `message.received.dm_first.md` flow inlined below).
13
13
 
14
- > **Connector routing (native).** Use `mcp_google-workspace_*.*` and
15
- > `mcp_notion_*` MCP tools directly. Do **NOT** call
14
+ > **Connector routing (native).** Use the in-session connector tools
15
+ > your harness exposes for each native integration directly, per each
16
+ > skill's `SKILL.native.gemini.md` body. Do **NOT** call
16
17
  > `POST /api/integrations/<key>/exec` (410) or the per-integration
17
- > daemon routes (410). Write-class MCP calls require explicit user
18
- > confirmation; direct-mode siblings keep using their direct routes.
19
- > **Gemini quirks**: `maxResults` is silently ignored on Gmail
20
- > `search` and Calendar `listEvents` — narrow the query window when
21
- > the result is larger than expected.
18
+ > daemon routes (410). Write-class connector calls require explicit
19
+ > user confirmation; direct-mode siblings keep using their direct
20
+ > routes. **Gemini quirks**: `maxResults` is typically silently
21
+ > ignored on Gmail search and Calendar list-events — narrow the query
22
+ > window when the result is larger than expected.
22
23
 
23
24
  ### Per-session integration routing
24
25
 
25
26
  <integration-routing-table>
26
27
 
27
- ### Native MCP routing — per integration
28
+ ### Native connector routing — per integration
28
29
 
29
- **Calendar.** When `google_calendar="native"`, use
30
- `mcp_google-workspace_calendar.*` MCP tools (`listEvents` / `getEvent`
31
- / `list` / `findFreeTime` + destructive set). `maxResults` silently
32
- ignored on `listEvents`; default `attendeeResponseStatus` excludes
33
- declined events (pass full list explicitly when needed).
30
+ **Calendar.** When `google_calendar="native"`, use your in-session
31
+ Google Calendar connector (list-events / get-event / list-calendars /
32
+ find-free-time + destructive set). `maxResults` typically silently
33
+ ignored on list-events; default `attendeeResponseStatus` typically
34
+ excludes declined events (pass full list explicitly when needed).
34
35
  `/api/calendar/*` and `POST /api/integrations/google_calendar/exec`
35
36
  both return 410.
36
37
 
37
- **Mail.** When `gmail="native"`, use `mcp_google-workspace_gmail.*`
38
- MCP tools. The extension has no dedicated `delete` or `forward` tool
39
- — compose from primitives (delete = `modify` + add TRASH; forward =
40
- `send` with re-quoted body). Destructive set requires explicit user
41
- confirmation. For non-Gmail accounts keep using `/api/mail/<acct>/*`.
42
-
43
- **Notion.** When `notion="native"`, use `mcp_notion_*` MCP tools per
44
- the `notion` skill's native body. No SQL-style structured query
45
- exists on this connector use `mcp_notion_notion-search` for
46
- property-shaped intents and filter client-side.
47
- `/api/notion/databases` config dump is reachable in every mode.
38
+ **Mail.** When `gmail="native"`, use your in-session Gmail connector.
39
+ Some Gemini-side connectors expose no dedicated delete or forward
40
+ tool — compose from primitives (delete = modify + add `TRASH`;
41
+ forward = send with re-quoted body). The destructive set requires
42
+ explicit user confirmation. For non-Gmail accounts keep using
43
+ `/api/mail/<acct>/*`.
44
+
45
+ **Notion.** When `notion="native"`, use your in-session Notion
46
+ connector per the `notion` skill's native body. No SQL-style
47
+ structured query primitive is typically exposed on this surface
48
+ (Notion's official MCP server lacks it) use workspace search with a
49
+ data-source filter for property-shaped intents and filter
50
+ client-side. `/api/notion/databases` config dump is reachable in
51
+ every mode.
48
52
 
49
53
  The first-DM dispatch decision flow (capture user info, profile-question
50
54
  reconcile, compose reply with the optional 1–2 task preview, route