@aitne-sh/aitne 0.1.3 → 0.1.4
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 +151 -147
- package/agent-assets/agent-profiles/conversational.md +23 -1
- package/agent-assets/agent-profiles/observer.md +15 -0
- package/agent-assets/agent-profiles/routine-fetch-window.md +128 -0
- package/agent-assets/agent-profiles/routine.md +16 -0
- package/agent-assets/agent-profiles/task.md +15 -0
- package/agent-assets/docs/concepts/auth-health.md +25 -9
- package/agent-assets/docs/concepts/backends-and-tiers.md +40 -4
- package/agent-assets/docs/concepts/costs-and-quotas.md +87 -25
- package/agent-assets/docs/concepts/delegated-mode.md +7 -13
- package/agent-assets/docs/concepts/memory-model.md +14 -1
- package/agent-assets/docs/concepts/observations.md +19 -1
- package/agent-assets/docs/concepts/process-keys.md +5 -0
- package/agent-assets/docs/concepts/routines.md +22 -10
- package/agent-assets/docs/concepts/safety-model.md +3 -8
- package/agent-assets/docs/concepts/skills.md +36 -1
- package/agent-assets/docs/features/integrations/calendar.md +74 -3
- package/agent-assets/docs/features/integrations/git.md +4 -4
- package/agent-assets/docs/features/integrations/github.md +75 -107
- package/agent-assets/docs/features/lifestyle/git.md +169 -22
- package/agent-assets/docs/features/messaging/overview.md +10 -1
- package/agent-assets/docs/features/routines/morning-routine.md +1 -1
- package/agent-assets/docs/getting-started/01-what-is-this.md +30 -12
- package/agent-assets/docs/getting-started/02-first-steps.md +15 -4
- package/agent-assets/docs/getting-started/03-what-can-this-do.md +17 -2
- package/agent-assets/docs/guides/install-and-run.md +10 -1
- package/agent-assets/docs/guides/setup-wizard.md +43 -6
- package/agent-assets/docs/guides/switch-default-backend.md +7 -3
- package/agent-assets/docs/reference/skills.md +10 -1
- package/agent-assets/docs/troubleshooting/auth-failed.md +27 -8
- package/agent-assets/docs/troubleshooting/quota-exhausted.md +35 -12
- package/agent-assets/skills/context/SKILL.md +6 -0
- package/agent-assets/skills/external-services/SKILL.md +4 -0
- package/agent-assets/skills/external-services/SKILL.native.claude.md +320 -0
- package/agent-assets/skills/external-services/SKILL.native.codex.md +243 -0
- package/agent-assets/skills/external-services/SKILL.native.gemini.md +237 -0
- package/agent-assets/skills/mail/SKILL.md +42 -14
- package/agent-assets/skills/mail/SKILL.native.claude.md +175 -0
- package/agent-assets/skills/mail/SKILL.native.codex.md +165 -0
- package/agent-assets/skills/mail/SKILL.native.gemini.md +169 -0
- package/agent-assets/skills/management-task-modify/SKILL.md +2 -1
- package/agent-assets/skills/management-task-stop/SKILL.md +2 -2
- package/agent-assets/skills/notify/SKILL.md +4 -4
- package/agent-assets/skills/notion/SKILL.md +6 -0
- package/agent-assets/skills/notion/SKILL.native.claude.md +202 -0
- package/agent-assets/skills/notion/SKILL.native.codex.md +166 -0
- package/agent-assets/skills/notion/SKILL.native.gemini.md +167 -0
- package/agent-assets/skills/observations/SKILL.md +7 -0
- package/agent-assets/skills/project-doc/SKILL.md +6 -0
- package/agent-assets/skills/reading/SKILL.md +2 -0
- package/agent-assets/skills/roadmap/SKILL.md +7 -0
- package/agent-assets/skills/today/SKILL.md +7 -0
- package/agent-assets/skills/user-interview/SKILL.md +1 -1
- package/agent-assets/skills/user-profile/SKILL.md +7 -0
- package/agent-assets/task-flows/_partials/calendar-acquire.google_calendar.md +119 -0
- package/agent-assets/task-flows/_partials/calendar-acquire.outlook_calendar.md +101 -0
- package/agent-assets/task-flows/_partials/mail-acquire.gmail.md +113 -0
- package/agent-assets/task-flows/_partials/mail-acquire.outlook_mail.md +97 -0
- package/agent-assets/task-flows/_partials/notion-acquire.notion.md +104 -0
- package/agent-assets/task-flows/git.project.refresh_architecture.md +24 -1
- package/agent-assets/task-flows/message.received.dm.md +3 -0
- package/agent-assets/task-flows/message.received.dm.native.claude.md +76 -0
- package/agent-assets/task-flows/message.received.dm.native.codex.md +57 -0
- package/agent-assets/task-flows/message.received.dm.native.gemini.md +70 -0
- package/agent-assets/task-flows/message.received.dm_first.md +3 -0
- package/agent-assets/task-flows/message.received.dm_first.native.claude.md +56 -0
- package/agent-assets/task-flows/message.received.dm_first.native.codex.md +48 -0
- package/agent-assets/task-flows/message.received.dm_first.native.gemini.md +54 -0
- package/agent-assets/task-flows/routine.evening_review.md +28 -1
- package/agent-assets/task-flows/routine.fetch_window.md +93 -0
- package/agent-assets/task-flows/routine.hourly_check.md +44 -5
- package/agent-assets/task-flows/routine.monthly_review.md +13 -2
- package/agent-assets/task-flows/routine.morning_routine.md +55 -42
- package/agent-assets/task-flows/routine.morning_routine_initial.md +37 -38
- package/agent-assets/task-flows/routine.roadmap_refresh.md +38 -46
- package/agent-assets/task-flows/routine.today_refresh.md +53 -96
- package/agent-assets/task-flows/routine.weekly_review.md +40 -17
- package/agent-assets/task-flows/scheduled.dm.md +13 -11
- package/agent-assets/task-flows/scheduled.task.md +2 -2
- package/agent-assets/task-flows/setup.initial.md +5 -4
- package/agent-assets/task-flows/setup.update.md +1 -1
- package/agent-assets/templates/README.md +13 -6
- package/package.json +4 -4
- package/scripts/regen-skill-fixtures.mjs +39 -0
- package/agent-assets/task-flows/routine.hourly_check.delegated.claude.md +0 -405
- package/agent-assets/task-flows/routine.hourly_check.delegated.codex.md +0 -400
- package/agent-assets/task-flows/routine.hourly_check.delegated.gemini.md +0 -404
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: notion
|
|
3
|
+
description: Load when the task touches Notion and Notion is in native mode bound to Claude (`nativeBackend === "claude"`). Use Claude's hosted Notion connector directly; the daemon does not proxy Notion. `/api/notion/databases` (label → UUID config dump) is the only daemon route still reachable.
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Bash(curl *)
|
|
6
|
+
- Bash(jq *)
|
|
7
|
+
- Read
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Notion (native — Claude Notion connector)
|
|
11
|
+
|
|
12
|
+
> **Refusal directive — read first.** Notion is in `native` mode bound
|
|
13
|
+
> to Claude. Do **NOT** call any of:
|
|
14
|
+
>
|
|
15
|
+
> - `POST /api/integrations/notion/exec` (returns `410` with
|
|
16
|
+
> `X-Integration-Mode: native`)
|
|
17
|
+
> - `POST /api/integrations/notion/reconcile` (410)
|
|
18
|
+
> - `/api/notion/query`, `/api/notion/search`, `/api/notion/pages`,
|
|
19
|
+
> `/api/notion/pages/<id>/content` (each route-prefix 410 in native
|
|
20
|
+
> mode)
|
|
21
|
+
>
|
|
22
|
+
> Reach Notion through the `mcp__claude_ai_Notion__*` MCP tools this
|
|
23
|
+
> Claude session already holds.
|
|
24
|
+
>
|
|
25
|
+
> The one exception: **`GET /api/notion/databases`** remains reachable
|
|
26
|
+
> in every mode. It is a config dump (label → UUID map) with no Notion
|
|
27
|
+
> API side-effect; native-mode gating does not apply to it.
|
|
28
|
+
|
|
29
|
+
Confirm the binding via `<integration_modes>` (`notion="native"`) and
|
|
30
|
+
the `<integration-routing-table>` block in the session preamble.
|
|
31
|
+
|
|
32
|
+
## 1. Label resolution — read `/api/notion/databases` first
|
|
33
|
+
|
|
34
|
+
Database UUIDs are unstable; user-facing labels (`"projects"`,
|
|
35
|
+
`"meeting-notes"`, `"tasks"`) map to UUIDs through the daemon's
|
|
36
|
+
settings store. Resolve label → UUID BEFORE any Notion call so the
|
|
37
|
+
MCP arguments carry concrete UUIDs.
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
curl -s http://localhost:8321/api/notion/databases
|
|
41
|
+
# → { "databases": { "<label>": { "id": "<uuid>", "title": "..." }, ... } }
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This route is **not** part of the absolute deny set and is intentionally
|
|
45
|
+
ungated in native mode — the agent reads the same labels in every mode.
|
|
46
|
+
The `notion-fetch` tool accepts either a Notion page URL or a UUID;
|
|
47
|
+
pass the UUID resolved here.
|
|
48
|
+
|
|
49
|
+
## 2. Notion — Claude's hosted Notion connector (native MCP)
|
|
50
|
+
|
|
51
|
+
Tool namespace: `mcp__claude_ai_Notion__`
|
|
52
|
+
|
|
53
|
+
### Read-class tools
|
|
54
|
+
|
|
55
|
+
| Capability | Tool | Use |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| `search` | `mcp__claude_ai_Notion__notion-search` | Workspace search (text + Notion query parameters). |
|
|
58
|
+
| `read` | `mcp__claude_ai_Notion__notion-fetch` | Retrieve a single page / database / block by URL or UUID; returns content + child block tree. |
|
|
59
|
+
| `comments` | `mcp__claude_ai_Notion__notion-get-comments` | Read comments on a page. |
|
|
60
|
+
| `users` | `mcp__claude_ai_Notion__notion-get-users` | Enumerate workspace users. |
|
|
61
|
+
| `teams` | `mcp__claude_ai_Notion__notion-get-teams` | Enumerate teams / teamspaces. |
|
|
62
|
+
|
|
63
|
+
Canonical search call:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
mcp__claude_ai_Notion__notion-search(
|
|
67
|
+
query="acme proposal",
|
|
68
|
+
query_type="internal",
|
|
69
|
+
data_source_url="https://www.notion.so/<workspace>/<database-uuid>"
|
|
70
|
+
)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Canonical page read:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
mcp__claude_ai_Notion__notion-fetch(id="<page-url-or-uuid>")
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Destructive tools (require explicit user confirmation)
|
|
80
|
+
|
|
81
|
+
Per the registry's
|
|
82
|
+
`notion.backendConnectors.claude.destructiveTools`:
|
|
83
|
+
|
|
84
|
+
- `notion-create-pages` — adds new pages.
|
|
85
|
+
- `notion-update-page` — mutates properties / content; **also** the
|
|
86
|
+
archive workaround (Status="Archived") — §3 below.
|
|
87
|
+
- `notion-duplicate-page` — clones a page.
|
|
88
|
+
- `notion-move-pages` — relocates pages between databases / parents.
|
|
89
|
+
- `notion-create-comment` — posts a comment (user-visible).
|
|
90
|
+
- `notion-create-database` — schema admin (creates new DB).
|
|
91
|
+
- `notion-update-data-source` — schema admin (mutates DB columns).
|
|
92
|
+
- `notion-create-view` — schema admin (new view on DB).
|
|
93
|
+
- `notion-update-view` — schema admin (mutates view config).
|
|
94
|
+
|
|
95
|
+
Apply the destructive-confirm contract every time:
|
|
96
|
+
|
|
97
|
+
1. Summarise the plan in one line.
|
|
98
|
+
2. Surface verbatim and wait for explicit user OK.
|
|
99
|
+
3. On OK, issue the call.
|
|
100
|
+
|
|
101
|
+
Schema-admin tools (`notion-create-database`, `notion-update-data-source`,
|
|
102
|
+
`notion-create-view`, `notion-update-view`) are higher stakes than
|
|
103
|
+
page mutations — explicitly name "this is a schema-admin change" in
|
|
104
|
+
the plan you surface.
|
|
105
|
+
|
|
106
|
+
The starter `deniedTools` list (typically denies the schema-admin set)
|
|
107
|
+
is enforced before the call lands. The absolute-block layer continues
|
|
108
|
+
to fire regardless of mode.
|
|
109
|
+
|
|
110
|
+
## 3. Page archive — workaround only
|
|
111
|
+
|
|
112
|
+
Claude's hosted Notion connector does **not** expose an archive /
|
|
113
|
+
trash tool. `in_trash` is rejected as a property by
|
|
114
|
+
`notion-update-page`. To "archive" a page:
|
|
115
|
+
|
|
116
|
+
1. **Property workaround** (preferred when the page lives in a
|
|
117
|
+
database with a Status property): `notion-update-page(id=<uuid>,
|
|
118
|
+
properties={Status: {status: {name: "Archived"}}})`. The page
|
|
119
|
+
stays addressable but drops out of default views.
|
|
120
|
+
2. **Move to a "Trash" page**: `notion-move-pages(...)` under a
|
|
121
|
+
top-level "Trash" page (creating it first via
|
|
122
|
+
`notion-create-pages` if absent). Reversible without admin
|
|
123
|
+
intervention.
|
|
124
|
+
|
|
125
|
+
Surface either option to the user before issuing — they are
|
|
126
|
+
explicitly user-visible workarounds, not silent archive equivalents.
|
|
127
|
+
|
|
128
|
+
## 4. Structured database filtering
|
|
129
|
+
|
|
130
|
+
For "what tasks are in status X" or any `WHERE <property> = ...`
|
|
131
|
+
intent, use `notion-search` with the data-source filter and let the
|
|
132
|
+
connector do the matching. Claude's connector does not expose a
|
|
133
|
+
SQL-style query primitive (Codex's `notion_query_data_sources`
|
|
134
|
+
covers that gap when delegated cross-backend; native-Claude has the
|
|
135
|
+
search-with-filter primitive instead).
|
|
136
|
+
|
|
137
|
+
## 5. Decision rules
|
|
138
|
+
|
|
139
|
+
- **Hourly check is read-only.** Native variants inherit the
|
|
140
|
+
"External services are read-only this hour" constraint from
|
|
141
|
+
`routine.hourly_check.native.claude.md`. No creates, property
|
|
142
|
+
updates, content patches, or archives during the hourly pass.
|
|
143
|
+
- **Mass-update — ask first.** A `notion-create-pages` call can take
|
|
144
|
+
up to 100 pages in one shot, and `notion-move-pages` /
|
|
145
|
+
`notion-update-page` batches can touch many rows. Summarise and
|
|
146
|
+
confirm any change that would touch more than ~10 pages.
|
|
147
|
+
- **Schema admin — Approve-tier.** Database / view / data-source
|
|
148
|
+
mutations alter workspace structure. Surface explicitly and ask;
|
|
149
|
+
do not auto-confirm "this looks right".
|
|
150
|
+
- **Comments are user-visible.** `notion-create-comment` posts to a
|
|
151
|
+
page comment thread — treat it like a send: confirm before issuing.
|
|
152
|
+
|
|
153
|
+
## 6. Persisting observations from native fetches
|
|
154
|
+
|
|
155
|
+
When `routine.hourly_check.native.claude.md`'s Step 0c fetches recent
|
|
156
|
+
Notion edits, POST each materialised page to `/api/observations`. The
|
|
157
|
+
daemon computes `contentHash` server-side via
|
|
158
|
+
`@personal-agent/shared/observations-hash.ts`; pass `payload` verbatim:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
curl -s -X POST http://localhost:8321/api/observations \
|
|
162
|
+
-H 'Content-Type: application/json' \
|
|
163
|
+
-d '{
|
|
164
|
+
"source": "notion",
|
|
165
|
+
"type": "notion:lifecycle",
|
|
166
|
+
"ref": "<pageId>",
|
|
167
|
+
"actor": "user",
|
|
168
|
+
"receivedAt": "<ISO-8601 UTC>",
|
|
169
|
+
"summary_text": "<title — last edited HH:MM>",
|
|
170
|
+
"refs": {
|
|
171
|
+
"pageId": "<id>",
|
|
172
|
+
"parentDatabase": "<db-uuid-or-null>",
|
|
173
|
+
"title": "<title>"
|
|
174
|
+
},
|
|
175
|
+
"payload": <verbatim MCP page object>
|
|
176
|
+
}'
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
`/api/observations` is never gated. HTTP 409 indicates a mode-flip
|
|
180
|
+
race window (§11.3.1); stop and re-read `<integration_modes>`.
|
|
181
|
+
|
|
182
|
+
## 7. Owner notification (opt-in)
|
|
183
|
+
|
|
184
|
+
The daemon does not auto-DM the owner. When a Notion action is
|
|
185
|
+
user-visible enough to warrant an immediate awareness ping (a
|
|
186
|
+
public comment, a mass-archive operation, content moved out of a
|
|
187
|
+
long-lived database), call:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
curl -s -X POST http://localhost:8321/api/notify \
|
|
191
|
+
-H 'Content-Type: application/json' \
|
|
192
|
+
-d '{"message": "Archived 7 stale pages under the <db> database."}'
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Single page edits and routine reads do not need a notify.
|
|
196
|
+
|
|
197
|
+
## 8. Cost / audit
|
|
198
|
+
|
|
199
|
+
Native MCP calls land `agent_actions` rows of type `mcp_call` with
|
|
200
|
+
`provider="claude"`, the tool name, and the parent `event_id` /
|
|
201
|
+
`processKey`. The cost dashboard joins these to the registry by
|
|
202
|
+
`toolNamespace` prefix for the `nativeAttribution` rollup (§14.4).
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: notion
|
|
3
|
+
description: Load when the task touches Notion and Notion is in native mode bound to Codex (`nativeBackend === "codex"`). Use Codex's hosted Notion MCP directly; the daemon does not proxy Notion. `/api/notion/databases` (label → UUID config dump) is the only daemon route still reachable.
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Bash(curl *)
|
|
6
|
+
- Bash(jq *)
|
|
7
|
+
- Read
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Notion (native — Codex Notion MCP)
|
|
11
|
+
|
|
12
|
+
> **Refusal directive — read first.** Notion is in `native` mode bound
|
|
13
|
+
> to Codex. Do **NOT** call any of:
|
|
14
|
+
>
|
|
15
|
+
> - `POST /api/integrations/notion/exec` (returns `410` with
|
|
16
|
+
> `X-Integration-Mode: native`)
|
|
17
|
+
> - `POST /api/integrations/notion/reconcile` (410)
|
|
18
|
+
> - `/api/notion/query`, `/api/notion/search`, `/api/notion/pages`,
|
|
19
|
+
> `/api/notion/pages/<id>/content` (each route-prefix 410)
|
|
20
|
+
>
|
|
21
|
+
> Reach Notion through the `mcp__codex_apps__notion._*` MCP tools your
|
|
22
|
+
> Codex session already holds.
|
|
23
|
+
>
|
|
24
|
+
> Exception: **`GET /api/notion/databases`** remains reachable in every
|
|
25
|
+
> mode (it is a config dump with no Notion API side-effect).
|
|
26
|
+
|
|
27
|
+
Confirm the binding via `<integration_modes>` (`notion="native"`) and
|
|
28
|
+
the `<integration-routing-table>` block in the session preamble.
|
|
29
|
+
|
|
30
|
+
## 1. Label resolution — read `/api/notion/databases` first
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
curl -s http://localhost:8321/api/notion/databases
|
|
34
|
+
# → { "databases": { "<label>": { "id": "<uuid>", "title": "..." }, ... } }
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Resolve label → UUID before any Notion call. Codex's namespace
|
|
38
|
+
terminates with `._`; the bare suffix below is what you write after
|
|
39
|
+
the namespace (`_search` = `mcp__codex_apps__notion._search`).
|
|
40
|
+
|
|
41
|
+
## 2. Notion — Codex's hosted Notion MCP (native)
|
|
42
|
+
|
|
43
|
+
Tool namespace: `mcp__codex_apps__notion._`
|
|
44
|
+
|
|
45
|
+
### Read-class tools
|
|
46
|
+
|
|
47
|
+
| Capability | Tool | Use |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| `search` | `_search` | Workspace search. |
|
|
50
|
+
| `read` | `_fetch` | Single page / database / block by URL or UUID; returns block tree. |
|
|
51
|
+
| `comments` | `_notion_get_comments` | Read page comments. |
|
|
52
|
+
| `users` | `_notion_get_users` | Enumerate workspace users. |
|
|
53
|
+
| `teams` | `_notion_get_teams` | Enumerate teams. |
|
|
54
|
+
| `query_data_sources` | `_notion_query_data_sources` | **SQL-style** structured filter (`WHERE <property> = ?`) — Codex-only capability, not exposed by Claude. Use it for "what tasks are in status X" intents. |
|
|
55
|
+
| `query_meeting_notes` | `_notion_query_meeting_notes` | Structured filter over the user's meeting-notes data source (niche). |
|
|
56
|
+
|
|
57
|
+
Canonical search call:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
mcp__codex_apps__notion._search(
|
|
61
|
+
query="acme proposal",
|
|
62
|
+
data_source_id="<db-uuid-resolved-from-labels>"
|
|
63
|
+
)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Canonical structured filter (Codex-only):
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
mcp__codex_apps__notion._notion_query_data_sources(
|
|
70
|
+
data_source_id="<db-uuid>",
|
|
71
|
+
filter="Status = 'Active' AND Priority = 'P1'",
|
|
72
|
+
limit=20
|
|
73
|
+
)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Canonical page read:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
mcp__codex_apps__notion._fetch(id="<page-url-or-uuid>")
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Destructive tools (require explicit user confirmation)
|
|
83
|
+
|
|
84
|
+
Per the registry's `notion.backendConnectors.codex.destructiveTools`:
|
|
85
|
+
|
|
86
|
+
- `_notion_create_pages`
|
|
87
|
+
- `_notion_update_page` — properties, content, archive workaround.
|
|
88
|
+
- `_notion_duplicate_page`
|
|
89
|
+
- `_notion_move_pages`
|
|
90
|
+
- `_notion_create_comment`
|
|
91
|
+
- `_notion_create_database` — schema admin.
|
|
92
|
+
- `_notion_update_data_source` — schema admin.
|
|
93
|
+
- `_notion_create_view` — schema admin.
|
|
94
|
+
- `_notion_update_view` — schema admin.
|
|
95
|
+
|
|
96
|
+
Apply the destructive-confirm contract: summarise, wait for explicit
|
|
97
|
+
OK, then issue. Schema-admin tools warrant an explicit "schema admin"
|
|
98
|
+
label on the plan you surface. The starter `deniedTools` list is
|
|
99
|
+
enforced before the call lands.
|
|
100
|
+
|
|
101
|
+
## 3. Page archive — workaround only
|
|
102
|
+
|
|
103
|
+
Same gap as Claude's connector — no dedicated archive tool. Use the
|
|
104
|
+
property-update workaround (Status="Archived") via
|
|
105
|
+
`_notion_update_page`, or move the page under a top-level Trash page
|
|
106
|
+
via `_notion_move_pages`. Surface the choice to the user.
|
|
107
|
+
|
|
108
|
+
## 4. Decision rules
|
|
109
|
+
|
|
110
|
+
- **Hourly check is read-only** — inherits the constraint from
|
|
111
|
+
`routine.hourly_check.native.codex.md`.
|
|
112
|
+
- **Mass-update — ask first.** `_notion_create_pages` can take up to
|
|
113
|
+
100 pages; `_notion_move_pages` and `_notion_update_page` batches
|
|
114
|
+
can touch many rows. Summarise and confirm anything >~10 pages.
|
|
115
|
+
- **Schema admin — Approve-tier.** Database / view / data-source
|
|
116
|
+
mutations alter workspace structure. Explicit user confirmation
|
|
117
|
+
required.
|
|
118
|
+
- **Comments are user-visible.** `_notion_create_comment` posts to a
|
|
119
|
+
page comment thread — treat like a send.
|
|
120
|
+
- **Prefer structured filter over text search** when the user's
|
|
121
|
+
intent is property-shaped. `_notion_query_data_sources` is the
|
|
122
|
+
Codex-only capability that closes the gap Claude's connector has;
|
|
123
|
+
use it.
|
|
124
|
+
|
|
125
|
+
## 5. Persisting observations from native fetches
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
curl -s -X POST http://localhost:8321/api/observations \
|
|
129
|
+
-H 'Content-Type: application/json' \
|
|
130
|
+
-d '{
|
|
131
|
+
"source": "notion",
|
|
132
|
+
"type": "notion:lifecycle",
|
|
133
|
+
"ref": "<pageId>",
|
|
134
|
+
"actor": "user",
|
|
135
|
+
"receivedAt": "<ISO-8601 UTC>",
|
|
136
|
+
"summary_text": "<title — last edited HH:MM>",
|
|
137
|
+
"refs": {
|
|
138
|
+
"pageId": "<id>",
|
|
139
|
+
"parentDatabase": "<db-uuid-or-null>",
|
|
140
|
+
"title": "<title>"
|
|
141
|
+
},
|
|
142
|
+
"payload": <verbatim MCP page object>
|
|
143
|
+
}'
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
The daemon computes `contentHash` server-side. Pass `payload`
|
|
147
|
+
verbatim. HTTP 409 → mode-flip race window (§11.3.1); stop and re-read
|
|
148
|
+
`<integration_modes>`.
|
|
149
|
+
|
|
150
|
+
## 6. Owner notification (opt-in)
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
curl -s -X POST http://localhost:8321/api/notify \
|
|
154
|
+
-H 'Content-Type: application/json' \
|
|
155
|
+
-d '{"message": "Archived 7 stale pages under the <db> database."}'
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
For public comments, mass archives, or content moved out of long-lived
|
|
159
|
+
databases. Routine reads and single-page edits do not need a notify.
|
|
160
|
+
|
|
161
|
+
## 7. Cost / audit
|
|
162
|
+
|
|
163
|
+
Native MCP calls land `agent_actions` rows of type `mcp_call` with
|
|
164
|
+
`provider="codex"`, the tool name, and the parent `event_id` /
|
|
165
|
+
`processKey`. The cost dashboard joins these to the registry by
|
|
166
|
+
`toolNamespace` prefix (§14.4 `nativeAttribution`).
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: notion
|
|
3
|
+
description: Load when the task touches Notion and Notion is in native mode bound to Gemini (`nativeBackend === "gemini"`). Use the user-installed Notion MCP server on Gemini CLI directly; the daemon does not proxy Notion. `/api/notion/databases` (label → UUID config dump) is the only daemon route still reachable.
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Bash(curl *)
|
|
6
|
+
- Bash(jq *)
|
|
7
|
+
- Read
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Notion (native — Gemini, user-installed Notion MCP)
|
|
11
|
+
|
|
12
|
+
> **Refusal directive — read first.** Notion is in `native` mode bound
|
|
13
|
+
> to Gemini. Do **NOT** call any of:
|
|
14
|
+
>
|
|
15
|
+
> - `POST /api/integrations/notion/exec` (returns `410` with
|
|
16
|
+
> `X-Integration-Mode: native`)
|
|
17
|
+
> - `POST /api/integrations/notion/reconcile` (410)
|
|
18
|
+
> - `/api/notion/query`, `/api/notion/search`, `/api/notion/pages`,
|
|
19
|
+
> `/api/notion/pages/<id>/content` (each route-prefix 410)
|
|
20
|
+
>
|
|
21
|
+
> Reach Notion through the `mcp_notion_*` MCP tools your Gemini session
|
|
22
|
+
> already holds via the user-installed Notion MCP server.
|
|
23
|
+
>
|
|
24
|
+
> Exception: **`GET /api/notion/databases`** remains reachable in every
|
|
25
|
+
> mode (config dump, no Notion API side-effect).
|
|
26
|
+
|
|
27
|
+
## Server-name assumption
|
|
28
|
+
|
|
29
|
+
The registry assumes the user registered Notion's official MCP server
|
|
30
|
+
under the literal name `notion` (`gemini mcp add notion <url>` or via
|
|
31
|
+
the dashboard's MCP page). Gemini surfaces tools as
|
|
32
|
+
`mcp_<server>_<tool>`, so the namespace `mcp_notion_` only resolves if
|
|
33
|
+
the server is named `notion` exactly. If the user picked a different
|
|
34
|
+
name, the §9.3 probe at flip time will report every required capability
|
|
35
|
+
missing and the dashboard surfaces an actionable "wrong server name"
|
|
36
|
+
hint. This skill body assumes the probe passed.
|
|
37
|
+
|
|
38
|
+
Confirm the binding via `<integration_modes>` (`notion="native"`) and
|
|
39
|
+
the `<integration-routing-table>` block in the session preamble.
|
|
40
|
+
|
|
41
|
+
## 1. Label resolution — read `/api/notion/databases` first
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
curl -s http://localhost:8321/api/notion/databases
|
|
45
|
+
# → { "databases": { "<label>": { "id": "<uuid>", "title": "..." }, ... } }
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Resolve label → UUID before any Notion call.
|
|
49
|
+
|
|
50
|
+
## 2. Notion — user-installed Notion MCP (native)
|
|
51
|
+
|
|
52
|
+
Tool namespace: `mcp_notion_`
|
|
53
|
+
|
|
54
|
+
The Notion MCP server exposes the same tool names as Anthropic's hosted
|
|
55
|
+
Notion connector (hyphenated identifiers, e.g. `notion-search`); under
|
|
56
|
+
Gemini's namespace convention they surface as `mcp_notion_<tool>`.
|
|
57
|
+
|
|
58
|
+
### Read-class tools
|
|
59
|
+
|
|
60
|
+
| Capability | Tool | Use |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| `search` | `mcp_notion_notion-search` | Workspace search. |
|
|
63
|
+
| `read` | `mcp_notion_notion-fetch` | Single page / database / block by URL or UUID. |
|
|
64
|
+
| `comments` | `mcp_notion_notion-get-comments` | Read page comments. |
|
|
65
|
+
| `users` | `mcp_notion_notion-get-users` | Enumerate workspace users. |
|
|
66
|
+
| `teams` | `mcp_notion_notion-get-teams` | Enumerate teams. |
|
|
67
|
+
|
|
68
|
+
Canonical search call:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
mcp_notion_notion-search(
|
|
72
|
+
query="acme proposal",
|
|
73
|
+
data_source_url="https://www.notion.so/<workspace>/<database-uuid>"
|
|
74
|
+
)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Canonical page read:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
mcp_notion_notion-fetch(id="<page-url-or-uuid>")
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Destructive tools (require explicit user confirmation)
|
|
84
|
+
|
|
85
|
+
Per the registry's `notion.backendConnectors.gemini.destructiveTools`:
|
|
86
|
+
|
|
87
|
+
- `mcp_notion_notion-create-pages`
|
|
88
|
+
- `mcp_notion_notion-update-page` — properties / content / archive
|
|
89
|
+
workaround.
|
|
90
|
+
- `mcp_notion_notion-duplicate-page`
|
|
91
|
+
- `mcp_notion_notion-move-pages`
|
|
92
|
+
- `mcp_notion_notion-create-comment`
|
|
93
|
+
- `mcp_notion_notion-create-database` — schema admin.
|
|
94
|
+
- `mcp_notion_notion-update-data-source` — schema admin.
|
|
95
|
+
- `mcp_notion_notion-create-view` — schema admin.
|
|
96
|
+
- `mcp_notion_notion-update-view` — schema admin.
|
|
97
|
+
|
|
98
|
+
Apply the destructive-confirm contract every time. Schema-admin tools
|
|
99
|
+
warrant an explicit "schema admin" label on the surfaced plan. The
|
|
100
|
+
starter `deniedTools` list is enforced before the call lands.
|
|
101
|
+
|
|
102
|
+
## 3. Page archive — workaround only
|
|
103
|
+
|
|
104
|
+
Same gap as Claude / Codex hosted connectors — no dedicated archive
|
|
105
|
+
tool. Use the property-update workaround (Status="Archived") via
|
|
106
|
+
`mcp_notion_notion-update-page`, or move the page under a top-level
|
|
107
|
+
Trash page via `mcp_notion_notion-move-pages`. Surface the choice.
|
|
108
|
+
|
|
109
|
+
## 4. Decision rules
|
|
110
|
+
|
|
111
|
+
- **Hourly check is read-only** — inherits the constraint from
|
|
112
|
+
`routine.hourly_check.native.gemini.md`.
|
|
113
|
+
- **Mass-update — ask first.** `mcp_notion_notion-create-pages` can
|
|
114
|
+
take up to 100 pages; batches >~10 pages warrant explicit
|
|
115
|
+
confirmation.
|
|
116
|
+
- **Schema admin — Approve-tier.** Database / view / data-source
|
|
117
|
+
mutations alter workspace structure.
|
|
118
|
+
- **Comments are user-visible.** `mcp_notion_notion-create-comment`
|
|
119
|
+
posts to a page comment thread — treat like a send.
|
|
120
|
+
- **No `_notion_query_data_sources` equivalent** on this connector.
|
|
121
|
+
For "what tasks are in status X" intents, use
|
|
122
|
+
`mcp_notion_notion-search` with the data-source filter scoping the
|
|
123
|
+
workspace and process the result client-side; Codex's SQL-style
|
|
124
|
+
query is a Codex-only feature.
|
|
125
|
+
|
|
126
|
+
## 5. Persisting observations from native fetches
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
curl -s -X POST http://localhost:8321/api/observations \
|
|
130
|
+
-H 'Content-Type: application/json' \
|
|
131
|
+
-d '{
|
|
132
|
+
"source": "notion",
|
|
133
|
+
"type": "notion:lifecycle",
|
|
134
|
+
"ref": "<pageId>",
|
|
135
|
+
"actor": "user",
|
|
136
|
+
"receivedAt": "<ISO-8601 UTC>",
|
|
137
|
+
"summary_text": "<title — last edited HH:MM>",
|
|
138
|
+
"refs": {
|
|
139
|
+
"pageId": "<id>",
|
|
140
|
+
"parentDatabase": "<db-uuid-or-null>",
|
|
141
|
+
"title": "<title>"
|
|
142
|
+
},
|
|
143
|
+
"payload": <verbatim MCP page object>
|
|
144
|
+
}'
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
The daemon computes `contentHash` server-side. Pass `payload`
|
|
148
|
+
verbatim. HTTP 409 → mode-flip race window (§11.3.1); stop and re-read
|
|
149
|
+
`<integration_modes>`.
|
|
150
|
+
|
|
151
|
+
## 6. Owner notification (opt-in)
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
curl -s -X POST http://localhost:8321/api/notify \
|
|
155
|
+
-H 'Content-Type: application/json' \
|
|
156
|
+
-d '{"message": "Archived 7 stale pages under the <db> database."}'
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
For public comments, mass archives, or content moved out of long-lived
|
|
160
|
+
databases. Routine reads and single-page edits do not need a notify.
|
|
161
|
+
|
|
162
|
+
## 7. Cost / audit
|
|
163
|
+
|
|
164
|
+
Native MCP calls land `agent_actions` rows of type `mcp_call` with
|
|
165
|
+
`provider="gemini"`, the tool name, and the parent `event_id` /
|
|
166
|
+
`processKey`. The cost dashboard joins these to the registry by
|
|
167
|
+
`toolNamespace` prefix (§14.4 `nativeAttribution`).
|
|
@@ -8,6 +8,13 @@ allowed-tools:
|
|
|
8
8
|
|
|
9
9
|
# Observations Review & Source Access
|
|
10
10
|
|
|
11
|
+
Output language: follow `<output_language_policy>`. This skill routes
|
|
12
|
+
observations into other Policy B destinations (`today.md`, `roadmap.md`,
|
|
13
|
+
`projects/*.md`) — write-ups inherit the destination file's policy
|
|
14
|
+
(English skeleton, body in `<settings primary_language>`) via the
|
|
15
|
+
`today` / `roadmap` / `context` / `project-doc` skills you call to land
|
|
16
|
+
the update.
|
|
17
|
+
|
|
11
18
|
## Workflow
|
|
12
19
|
|
|
13
20
|
1. Fetch pending user-originated observations:
|
|
@@ -8,6 +8,12 @@ allowed-tools:
|
|
|
8
8
|
|
|
9
9
|
# Project Doc
|
|
10
10
|
|
|
11
|
+
Output language: follow `<output_language_policy>`. Project docs are
|
|
12
|
+
Policy B — H2/H3 headers from `agent-assets/templates/projects/` and
|
|
13
|
+
`agent-assets/templates/git/` are skeleton (English); body prose,
|
|
14
|
+
bullets, and summaries are written in `<settings primary_language>`.
|
|
15
|
+
Preserve user-customized headers verbatim.
|
|
16
|
+
|
|
11
17
|
Use this skill for Git-backed context documents under the unified
|
|
12
18
|
repositories layout (see
|
|
13
19
|
`docs/design/appendices/unified-repositories.md` §4.5):
|
|
@@ -8,6 +8,8 @@ allowed-tools:
|
|
|
8
8
|
|
|
9
9
|
# Reading & Highlights Tracker
|
|
10
10
|
|
|
11
|
+
<output_language>english_only — `reading-taste.md` is parsed by display logic; field values and bullet text in that file are Policy A and override `<output_language_policy>`. Other user-facing prose from this skill (e.g. weekly recommendation DMs) follows `<output_language_policy>`.</output_language>
|
|
12
|
+
|
|
11
13
|
The daemon stores books and reading highlights imported from Kindle
|
|
12
14
|
(My Clippings.txt and the "Export Notebook" email pipeline) and manual
|
|
13
15
|
entries. Data lives in `books` and `reading_highlights` tables. All
|
|
@@ -8,6 +8,13 @@ allowed-tools:
|
|
|
8
8
|
|
|
9
9
|
# roadmap.md Guide
|
|
10
10
|
|
|
11
|
+
Output language: follow `<output_language_policy>`. roadmap.md is
|
|
12
|
+
Policy B — the section headers (`## Annual Goals`, `## Quarterly Focus`,
|
|
13
|
+
`## Long-term Plans`, `## Agent Action Plan`, `## Recurring`) are
|
|
14
|
+
skeleton and stay English; items, narrative, and preparation-timeline
|
|
15
|
+
prose underneath are written in `<settings primary_language>`. Preserve
|
|
16
|
+
user-customized headers verbatim.
|
|
17
|
+
|
|
11
18
|
`roadmap.md` is the single source of truth for **long-horizon user
|
|
12
19
|
intent** — everything that does not belong in `today.md`. It aggregates
|
|
13
20
|
Calendar events, pending `agent_schedule` rows, DM-captured intent,
|
|
@@ -8,6 +8,13 @@ allowed-tools:
|
|
|
8
8
|
|
|
9
9
|
# today.md Guide
|
|
10
10
|
|
|
11
|
+
Output language: follow `<output_language_policy>`. today.md is
|
|
12
|
+
Policy B — the six required H2 headers (`## User Schedule`,
|
|
13
|
+
`## User Tasks`, `## Agent Plan`, `## Agent Notes`, `## Agent Log`,
|
|
14
|
+
`## Handoff`) are skeleton and stay English; bullets, narrative, and
|
|
15
|
+
free-text fields under them are written in `<settings primary_language>`.
|
|
16
|
+
Preserve user-customized headers verbatim.
|
|
17
|
+
|
|
11
18
|
today.md has a **day-type header line** (second line) and **six required sections**.
|
|
12
19
|
|
|
13
20
|
```
|
|
@@ -37,7 +37,7 @@ curl -s http://localhost:8321/api/context/agent/profile-questions
|
|
|
37
37
|
| `target_path` | which user file the answer should land in, e.g. `user/profile.md` |
|
|
38
38
|
| `## Section` | optional — narrows to a section within the target file |
|
|
39
39
|
| `match=<anchor>` | optional — bullet key (English, like `Name`, `Timezone`, `Sleep`, `Working hours`). Required when multiple rows share a section, or when setup pre-seeds the section with an unrelated bullet |
|
|
40
|
-
| `ask-hint` | English brief of WHAT to ask. Render the actual DM
|
|
40
|
+
| `ask-hint` | English brief of WHAT to ask (agent-internal, Policy A). Render the actual DM per `<output_language_policy>` — this skill intentionally splits the two surfaces |
|
|
41
41
|
| `last_attempted=...` | optional inline HTML comment maintained by the evening sweep — selector deprioritises rows whose comment is < 7 days old |
|
|
42
42
|
|
|
43
43
|
### In Progress entry format
|
|
@@ -8,6 +8,13 @@ allowed-tools:
|
|
|
8
8
|
|
|
9
9
|
# User Profile Update Guide
|
|
10
10
|
|
|
11
|
+
Output language: follow `<output_language_policy>`. `user/profile.md`
|
|
12
|
+
and `user/*.md` are Policy B — template H2 headers (`## Identity`,
|
|
13
|
+
`## Work Pattern`, `## Platforms`, `## Expertise`, `## Notification
|
|
14
|
+
Preferences`, `## Learned Context`, `## Raw Signals`) are skeleton and
|
|
15
|
+
stay English; the facts you write under them are in
|
|
16
|
+
`<settings primary_language>`. Preserve user-customized headers verbatim.
|
|
17
|
+
|
|
11
18
|
`user/profile.md` stores the user's identity, preferences, and learned behavioral patterns. It is injected into every agent session via `<user>` tags — keep it concise (target: under ~600 tokens total).
|
|
12
19
|
|
|
13
20
|
Detailed, dictionary-like background belongs under `user/*.md`. Read `user/_index.md` first, then fetch only the topic file you need.
|