@aitne-sh/aitne 0.1.9 → 0.1.11
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 +41 -11
- package/agent-assets/agent-profiles/background-task.md +53 -0
- package/agent-assets/agent-profiles/conversational.md +1 -0
- package/agent-assets/agent-profiles/routine-fetch-window.md +14 -75
- package/agent-assets/agent-profiles/routine.md +1 -1
- package/agent-assets/agents/{hourly-check → activity-scan}/agent.md +22 -17
- package/agent-assets/agents/monthly-review/agent.md +6 -5
- package/agent-assets/docs/concepts/agent-day.md +6 -7
- package/agent-assets/docs/concepts/auth-health.md +23 -20
- package/agent-assets/docs/concepts/backends-and-tiers.md +13 -9
- package/agent-assets/docs/concepts/costs-and-quotas.md +14 -12
- package/agent-assets/docs/concepts/delegated-mode.md +18 -17
- package/agent-assets/docs/concepts/memory-model.md +16 -9
- package/agent-assets/docs/concepts/observations.md +24 -20
- package/agent-assets/docs/concepts/process-keys.md +10 -9
- package/agent-assets/docs/concepts/routines.md +34 -31
- package/agent-assets/docs/concepts/safety-and-execution.md +11 -7
- package/agent-assets/docs/concepts/safety-model.md +39 -25
- package/agent-assets/docs/concepts/skills.md +12 -10
- package/agent-assets/docs/features/integrations/browser-history.md +23 -18
- package/agent-assets/docs/features/integrations/calendar.md +28 -17
- package/agent-assets/docs/features/integrations/git.md +13 -11
- package/agent-assets/docs/features/integrations/github.md +22 -14
- package/agent-assets/docs/features/integrations/mail.md +25 -22
- package/agent-assets/docs/features/integrations/notion.md +35 -11
- package/agent-assets/docs/features/integrations/obsidian.md +8 -8
- package/agent-assets/docs/features/lifestyle/git.md +27 -23
- package/agent-assets/docs/features/lifestyle/reading.md +20 -11
- package/agent-assets/docs/features/lifestyle/receipts.md +11 -10
- package/agent-assets/docs/features/lifestyle/travel-bookings.md +4 -3
- package/agent-assets/docs/features/memory-files/agent-journal.md +53 -26
- package/agent-assets/docs/features/memory-files/agent-lessons.md +178 -0
- package/agent-assets/docs/features/memory-files/projects.md +11 -8
- package/agent-assets/docs/features/memory-files/roadmap.md +17 -14
- package/agent-assets/docs/features/memory-files/schedule.md +6 -3
- package/agent-assets/docs/features/memory-files/today.md +10 -7
- package/agent-assets/docs/features/memory-files/user-profile.md +14 -9
- package/agent-assets/docs/features/messaging/bang-commands.md +21 -6
- package/agent-assets/docs/features/messaging/overview.md +17 -14
- package/agent-assets/docs/features/messaging/telegram.md +10 -9
- package/agent-assets/docs/features/operations/activity-and-conversations.md +6 -5
- package/agent-assets/docs/features/operations/approvals.md +6 -5
- package/agent-assets/docs/features/operations/browser-tasks.md +184 -0
- package/agent-assets/docs/features/operations/cost-tracking.md +11 -1
- package/agent-assets/docs/features/operations/managed-chromium.md +4 -2
- package/agent-assets/docs/features/operations/notifications.md +11 -1
- package/agent-assets/docs/features/operations/quiet-hours.md +41 -11
- package/agent-assets/docs/features/operations/schedule-approaching.md +2 -2
- package/agent-assets/docs/features/routines/activity-scan.md +220 -0
- package/agent-assets/docs/features/routines/custom-routines.md +82 -134
- package/agent-assets/docs/features/routines/evening-review.md +23 -13
- package/agent-assets/docs/features/routines/morning-routine.md +7 -5
- package/agent-assets/docs/features/routines/weekly-review.md +24 -3
- package/agent-assets/docs/features/wiki/commands.md +4 -4
- package/agent-assets/docs/features/wiki/cost-and-approval.md +4 -3
- package/agent-assets/docs/features/wiki/dashboard.md +7 -6
- package/agent-assets/docs/features/wiki/overview.md +3 -3
- package/agent-assets/docs/features/wiki/search.md +5 -5
- package/agent-assets/docs/features/wiki/workspaces.md +2 -2
- package/agent-assets/docs/getting-started/01-what-is-this.md +3 -3
- package/agent-assets/docs/getting-started/02-first-steps.md +5 -3
- package/agent-assets/docs/getting-started/04-first-day.md +27 -30
- package/agent-assets/docs/glossary.md +8 -8
- package/agent-assets/docs/guides/add-a-custom-routine.md +122 -68
- package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +2 -2
- package/agent-assets/docs/guides/connect-a-new-mail-account.md +4 -2
- package/agent-assets/docs/guides/explore-with-trace-and-connect.md +5 -4
- package/agent-assets/docs/guides/install-and-run.md +2 -2
- package/agent-assets/docs/guides/maintain-wiki-health.md +2 -2
- package/agent-assets/docs/guides/pause-the-agent.md +27 -21
- package/agent-assets/docs/guides/reinstall-cleanly.md +2 -0
- package/agent-assets/docs/guides/setup-wizard.md +12 -6
- package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +6 -6
- package/agent-assets/docs/reference/api.md +26 -5
- package/agent-assets/docs/reference/cli-commands.md +3 -3
- package/agent-assets/docs/reference/config.md +51 -24
- package/agent-assets/docs/reference/disallowed-tools.md +6 -4
- package/agent-assets/docs/reference/keyboard-shortcuts.md +2 -2
- package/agent-assets/docs/reference/knowledge-layout.md +25 -12
- package/agent-assets/docs/reference/process-keys.md +9 -9
- package/agent-assets/docs/reference/skills.md +10 -6
- package/agent-assets/docs/troubleshooting/auth-failed.md +9 -8
- package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +16 -9
- package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +2 -2
- package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +32 -16
- package/agent-assets/docs/troubleshooting/observation-not-detected.md +26 -24
- package/agent-assets/docs/troubleshooting/quota-exhausted.md +7 -6
- package/agent-assets/docs/troubleshooting/wiki-write-failed.md +3 -3
- package/agent-assets/skills/agent-actions/SKILL.md +23 -39
- package/agent-assets/skills/agent-create/SKILL.md +26 -6
- package/agent-assets/skills/attach/SKILL.md +8 -27
- package/agent-assets/skills/background-task/SKILL.md +184 -0
- package/agent-assets/skills/background-task-reply/SKILL.md +100 -0
- package/agent-assets/skills/browser-history/SKILL.md +60 -29
- package/agent-assets/skills/browser-history-respond/SKILL.md +6 -1
- package/agent-assets/skills/browser-task/SKILL.md +33 -31
- package/agent-assets/skills/context/SKILL.md +26 -34
- package/agent-assets/skills/context/curation.json +12 -12
- package/agent-assets/skills/context/references/api.md +22 -20
- package/agent-assets/skills/context/references/required-frontmatter.md +10 -9
- package/agent-assets/skills/context/references/snapshot-files.md +16 -15
- package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +5 -5
- package/agent-assets/skills/context/seeds/frontmatter-requirements.seed.json +3 -3
- package/agent-assets/skills/docs-search/SKILL.md +19 -31
- package/agent-assets/skills/external-services/SKILL.delegated.claude.md +8 -95
- package/agent-assets/skills/external-services/SKILL.delegated.codex.md +8 -94
- package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +8 -94
- package/agent-assets/skills/external-services/SKILL.native.claude.md +15 -9
- package/agent-assets/skills/external-services/SKILL.native.codex.md +11 -5
- package/agent-assets/skills/external-services/SKILL.native.gemini.md +11 -5
- package/agent-assets/skills/external-services/references/exec-errors.md +32 -0
- package/agent-assets/skills/external-services/references/skills-crud.md +5 -5
- package/agent-assets/skills/gmail-lifestyle/SKILL.md +3 -2
- package/agent-assets/skills/gmail-lifestyle/references/receipts-api.md +4 -0
- package/agent-assets/skills/gmail-lifestyle/references/travel-bookings-api.md +9 -0
- package/agent-assets/skills/mail/SKILL.delegated.claude.md +13 -25
- package/agent-assets/skills/mail/SKILL.delegated.codex.md +3 -2
- package/agent-assets/skills/mail/SKILL.delegated.gemini.md +3 -2
- package/agent-assets/skills/mail/SKILL.md +12 -20
- package/agent-assets/skills/mail/SKILL.native.claude.md +24 -16
- package/agent-assets/skills/mail/SKILL.native.codex.md +16 -9
- package/agent-assets/skills/mail/SKILL.native.gemini.md +12 -6
- package/agent-assets/skills/mail/references/api.md +6 -1
- package/agent-assets/skills/mail/references/examples.md +2 -1
- package/agent-assets/skills/managed-tasks/SKILL.md +44 -77
- package/agent-assets/skills/managed-tasks/references/errors.md +25 -14
- package/agent-assets/skills/managed-tasks/references/output-path.md +33 -17
- package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +26 -16
- package/agent-assets/skills/management-policy/SKILL.md +36 -28
- package/agent-assets/skills/management-policy/curation.json +1 -1
- package/agent-assets/skills/management-policy/references/policy-workflow.md +30 -18
- package/agent-assets/skills/notify/SKILL.md +16 -13
- package/agent-assets/skills/notify/references/priority.md +42 -26
- 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 +18 -18
- package/agent-assets/skills/notion/SKILL.native.claude.md +4 -4
- package/agent-assets/skills/notion/SKILL.native.codex.md +3 -3
- package/agent-assets/skills/notion/SKILL.native.gemini.md +3 -3
- package/agent-assets/skills/observations/SKILL.md +9 -24
- package/agent-assets/skills/observations/references/fetch-fallback.md +22 -0
- package/agent-assets/skills/project-doc/SKILL.md +9 -6
- package/agent-assets/skills/project-doc/curation.json +3 -3
- package/agent-assets/skills/project-doc/seeds/project-shape.seed.json +2 -2
- package/agent-assets/skills/project-doc/seeds/slug-grammar.seed.json +3 -3
- package/agent-assets/skills/reading/SKILL.md +8 -42
- package/agent-assets/skills/reading/references/reading-taste.md +5 -5
- package/agent-assets/skills/roadmap/SKILL.md +3 -19
- package/agent-assets/skills/roadmap/references/api.md +23 -8
- package/agent-assets/skills/roadmap/references/horizon-tags.md +11 -0
- package/agent-assets/skills/roadmap/references/migration.md +8 -6
- package/agent-assets/skills/roadmap/references/retention.md +18 -0
- package/agent-assets/skills/schedule/SKILL.md +20 -28
- package/agent-assets/skills/schedule/references/importance.md +23 -0
- package/agent-assets/skills/schedule/references/recurrence-rule.md +26 -16
- package/agent-assets/skills/scheduled-managed-task/SKILL.md +46 -46
- package/agent-assets/skills/today/SKILL.md +38 -81
- package/agent-assets/skills/today/references/agent-plan-lifecycle.md +9 -4
- package/agent-assets/skills/today/references/agent-plan-revision.md +28 -0
- package/agent-assets/skills/today/references/today-skeleton.md +66 -0
- package/agent-assets/skills/today/seeds/agent-notes-flavors.seed.json +1 -1
- package/agent-assets/skills/today/seeds/section-shape.seed.json +6 -6
- package/agent-assets/skills/user-interview/SKILL.md +15 -90
- package/agent-assets/skills/user-interview/references/op-briefing.md +1 -1
- package/agent-assets/skills/user-interview/references/op-dm-handler.md +88 -0
- package/agent-assets/skills/user-interview/references/op-morning.md +2 -2
- package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +1 -1
- package/agent-assets/skills/user-profile/SKILL.md +16 -26
- package/agent-assets/skills/user-profile/curation.json +3 -3
- package/agent-assets/skills/user-profile/references/character-preferences.md +3 -3
- package/agent-assets/skills/wiki/wiki-ask/SKILL.md +1 -1
- package/agent-assets/skills/wiki/wiki-compile/SKILL.md +5 -4
- package/agent-assets/skills/wiki/wiki-connect/SKILL.md +32 -5
- package/agent-assets/skills/wiki/wiki-ingest/SKILL.md +6 -50
- package/agent-assets/skills/wiki/wiki-ingest/references/curl-errors.md +58 -0
- package/agent-assets/skills/wiki/wiki-lint/SKILL.md +20 -14
- package/agent-assets/skills/wiki/wiki-trace/SKILL.md +10 -5
- package/agent-assets/skills/wiki/wiki-vault-rules/SKILL.md +2 -0
- package/agent-assets/system-prompts/routine-research-cluster-update.md +71 -0
- package/agent-assets/task-flows/_partials/feedback-capture.md +30 -0
- package/agent-assets/task-flows/_partials/notion-acquire.notion.md +47 -21
- package/agent-assets/task-flows/background_task.md +81 -0
- package/agent-assets/task-flows/git.local_ahead.stale.md +1 -1
- package/agent-assets/task-flows/git.push.detected.md +1 -1
- package/agent-assets/task-flows/git.tag.created.md +1 -1
- package/agent-assets/task-flows/github.assigned.md +1 -1
- package/agent-assets/task-flows/github.pull_request.review_requested.md +2 -2
- package/agent-assets/task-flows/github.security_alert.md +1 -1
- package/agent-assets/task-flows/message.received.dm.md +11 -3
- package/agent-assets/task-flows/message.received.dm_first.md +8 -2
- package/agent-assets/task-flows/{routine.hourly_check.md → routine.activity_scan.md} +31 -23
- package/agent-assets/task-flows/{routine.hourly_check.triage.md → routine.activity_scan.triage.md} +3 -3
- package/agent-assets/task-flows/routine.evening_review.md +80 -0
- package/agent-assets/task-flows/routine.monthly_review.md +81 -8
- package/agent-assets/task-flows/routine.research_cluster_update.md +33 -19
- package/agent-assets/task-flows/routine.roadmap_refresh.md +2 -2
- package/agent-assets/task-flows/routine.today_refresh.md +1 -1
- package/agent-assets/task-flows/routine.weekly_review.md +124 -4
- package/agent-assets/task-flows/schedule.approaching.md +2 -2
- package/agent-assets/task-flows/scheduled.dm.md +77 -1
- package/agent-assets/task-flows/scheduled.task.md +7 -1
- package/agent-assets/task-flows/wiki.trace.md +1 -1
- package/agent-assets/templates/_manifest.json +2 -2
- package/agent-assets/templates/knowledge/dossiers/_index.md +1 -1
- package/agent-assets/templates/knowledge/dossiers/{hourly.md → activity-scan.md} +1 -1
- package/agent-assets/templates/policies/journal-format.md +1 -1
- package/agent-assets/templates/policies/mcp.md +1 -1
- package/agent-assets/templates/policies/routines/_index.md +1 -1
- package/agent-assets/templates/policies/routines/{hourly.md → activity-scan.md} +5 -5
- package/bin/aitne.mjs +45 -11
- package/package.json +6 -5
- package/scripts/commands/doctor.mjs +11 -2
- package/scripts/lib/process-identity.d.mts +46 -0
- package/scripts/lib/process-identity.mjs +193 -0
- package/scripts/lib/read-api-token.mjs +1 -1
- package/scripts/start.mjs +14 -4
- package/agent-assets/docs/features/routines/hourly-check.md +0 -205
|
@@ -13,7 +13,11 @@ agent to keep applying. It is NOT a one-off task.
|
|
|
13
13
|
|
|
14
14
|
Each policy lives at `policies/management-captures/<slug>.md` and may link to:
|
|
15
15
|
|
|
16
|
-
- `policies/
|
|
16
|
+
- a recurring **Agent** (`policies/agents/<slug>/agent.md`, created via
|
|
17
|
+
`POST /api/agents`) — the cron-driven execution vehicle, recorded in the
|
|
18
|
+
policy frontmatter under `linked.routine` (legacy field name; the value is
|
|
19
|
+
the Agent slug — legacy `policies/routines/custom/` files no longer fire
|
|
20
|
+
and were auto-converted to same-slug Agents at upgrade).
|
|
17
21
|
- `knowledge/dossiers/<topic>.md` — where the policy's accumulating data lands
|
|
18
22
|
|
|
19
23
|
A readable summary of every policy lives at `policies/management-captures/_index.md`,
|
|
@@ -69,8 +73,8 @@ curl -s "http://localhost:8321/api/context/list/policies"
|
|
|
69
73
|
```
|
|
70
74
|
|
|
71
75
|
If the listing and `_index.md` rows disagree, **prefer the listing**
|
|
72
|
-
and trust the next reconcile pass to refresh the index.
|
|
73
|
-
|
|
76
|
+
and trust the next reconcile pass to refresh the index (`_index.md` is
|
|
77
|
+
reconciler-owned — see body intro).
|
|
74
78
|
|
|
75
79
|
### Step 2 — Detect similarity
|
|
76
80
|
|
|
@@ -79,7 +83,7 @@ Heuristics to compare against existing policies:
|
|
|
79
83
|
| Signal | Likely interpretation |
|
|
80
84
|
|---|---|
|
|
81
85
|
| Same `linked.dossier` topic | Likely a duplicate or extension of an existing policy |
|
|
82
|
-
| Same cron expression on the linked
|
|
86
|
+
| Same cron expression on the linked Agent | Likely a duplicate cadence |
|
|
83
87
|
| Slug stem matches an existing slug ("finance", "inbox", …) | Likely related |
|
|
84
88
|
|
|
85
89
|
If a candidate matches, ask the user **before** creating:
|
|
@@ -110,12 +114,13 @@ saved. The slug must:
|
|
|
110
114
|
- equal the filename stem
|
|
111
115
|
- match `^[a-z0-9][a-z0-9-]*[a-z0-9]$` (or a single `[a-z0-9]`)
|
|
112
116
|
- be ≤ 64 chars
|
|
113
|
-
- equal the linked
|
|
114
|
-
|
|
117
|
+
- equal the linked Agent's slug (if any) — keep them aligned in v1; Agent
|
|
118
|
+
slugs must start with a lowercase letter, so avoid digit-first slugs when
|
|
119
|
+
scheduling.
|
|
115
120
|
|
|
116
121
|
### Step 5 — Wire the dependencies (strict order; on failure, roll back in reverse)
|
|
117
122
|
|
|
118
|
-
5.1 dossier → 5.2
|
|
123
|
+
5.1 dossier → 5.2 Agent → 5.3 policy file → 5.4 (auto-index — no
|
|
119
124
|
manual step). Each step gates the next. The full curl recipes,
|
|
120
125
|
when-to-skip rules, and rollback table are in the policy-workflow
|
|
121
126
|
reference below.
|
|
@@ -152,13 +157,12 @@ the active policies first and ask.
|
|
|
152
157
|
`updated: <today>`, PUT back. (The frontmatter parser is
|
|
153
158
|
line-scalar so a per-field PATCH section call would not target a
|
|
154
159
|
frontmatter key — always GET-merge-PUT for frontmatter edits.)
|
|
155
|
-
2. If `linked.routine` is set:
|
|
156
|
-
|
|
157
|
-
|
|
160
|
+
2. If `linked.routine` is set: `PATCH /api/agents/<slug>` with
|
|
161
|
+
`{"enabled": false}`. (User Agents stop without a warning ack; the
|
|
162
|
+
scheduler's fire-time gate takes effect immediately.)
|
|
158
163
|
|
|
159
|
-
The policy-index reconciler
|
|
160
|
-
|
|
161
|
-
~10 s. Do not PATCH them manually.
|
|
164
|
+
The policy-index reconciler re-renders both `_index.md` and the
|
|
165
|
+
management.md section within ~10 s (reconciler-owned — see body intro).
|
|
162
166
|
|
|
163
167
|
If step 2 fails after step 1 succeeded, **attempt to roll back step 1**
|
|
164
168
|
(`status` back to `active`). If the rollback itself fails, report the
|
|
@@ -166,20 +170,22 @@ partial state to the user and tell them which file is in which state.
|
|
|
166
170
|
|
|
167
171
|
### Resume
|
|
168
172
|
|
|
169
|
-
Same fan-out, with `status: active` and `
|
|
173
|
+
Same fan-out, with `status: active` and `PATCH /api/agents/<slug>`
|
|
174
|
+
`{"enabled": true}`.
|
|
170
175
|
|
|
171
176
|
### Remove
|
|
172
177
|
|
|
173
178
|
1. GET the policy file, flip frontmatter `status: removed` and
|
|
174
179
|
`updated: <today>`, PUT back.
|
|
175
|
-
2. If `linked.routine` is set: `DELETE
|
|
176
|
-
|
|
180
|
+
2. If `linked.routine` is set: `DELETE /api/agents/<slug>` with body
|
|
181
|
+
`{"keep_history": false}` — removes the Agent definition, schedule,
|
|
182
|
+
and execution history (the default `true` would merely disable it).
|
|
177
183
|
|
|
178
184
|
The reconciler moves the row from `## Active` to `## Removed`
|
|
179
185
|
automatically — the `removedAt` cell is read from the policy file's
|
|
180
186
|
`updated` field, which step 1 set to today.
|
|
181
187
|
|
|
182
|
-
The policy file itself is **kept for history** — DELETE on `
|
|
188
|
+
The policy file itself is **kept for history** — DELETE on `policies/management-captures/*`
|
|
183
189
|
is intentionally not whitelisted (see MANAGEMENT-POLICY-CAPTURE-PLAN
|
|
184
190
|
§5.1).
|
|
185
191
|
|
|
@@ -187,11 +193,10 @@ is intentionally not whitelisted (see MANAGEMENT-POLICY-CAPTURE-PLAN
|
|
|
187
193
|
|
|
188
194
|
- Does NOT touch `policies/management.md` body sections (Source of Truth
|
|
189
195
|
table, Notification Rules, Schedule, etc.). Those are wizard-only.
|
|
190
|
-
- Does NOT
|
|
191
|
-
`
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
retroactively. Migration is a separate one-time operation.
|
|
196
|
+
- Does NOT write `recurring_schedules` rows or `agent.md` files by hand —
|
|
197
|
+
scheduling goes through `POST /api/agents`, which materialises the
|
|
198
|
+
user-visible `policies/agents/<slug>/agent.md` and pairs the schedule row
|
|
199
|
+
itself.
|
|
195
200
|
|
|
196
201
|
## Cross-skill pointers
|
|
197
202
|
|
|
@@ -217,17 +222,20 @@ skill targets these paths:
|
|
|
217
222
|
- `GET /api/context/list/policies` (Step 1 authoritative — entries prefixed `management-captures/`)
|
|
218
223
|
- `GET /api/context/policies/management-captures/<slug>` (read before pause / resume / remove)
|
|
219
224
|
- `PUT /api/context/knowledge/dossiers/<topic>` (Step 5.1 — if new)
|
|
220
|
-
- `
|
|
225
|
+
- `POST /api/agents` (Step 5.2 — if scheduling; the only non-context call)
|
|
221
226
|
- `PUT /api/context/policies/management-captures/<slug>` (Step 5.3)
|
|
222
227
|
- `PATCH /api/context/policies/management-captures/<slug>` (pause / resume / remove; frontmatter via GET-merge-PUT only — line-scalar parser)
|
|
223
|
-
- `
|
|
228
|
+
- `PATCH /api/agents/<slug>` (pause / resume — `{"enabled": …}`)
|
|
229
|
+
- `DELETE /api/agents/<slug>` (remove only — `{"keep_history": false}`)
|
|
224
230
|
|
|
225
231
|
`policies/management-captures/_index.md` and the `## Active Policies` section in
|
|
226
|
-
`policies/management.md` are
|
|
227
|
-
|
|
232
|
+
`policies/management.md` are reconciler-owned (see body intro) — NOT in
|
|
233
|
+
the agent's write surface for this skill.
|
|
228
234
|
|
|
229
|
-
Frontmatter validation enforces `
|
|
230
|
-
|
|
235
|
+
Frontmatter validation enforces `type: rule`, `kind: policy`,
|
|
236
|
+
`owner: agent`, `status`, `created_at` (YYYY-MM-DD), `origin`,
|
|
237
|
+
`updated` (ISO), an H1, and the slug rules in Step 4 — see 5.3 for the
|
|
238
|
+
full required set. Malformed writes return 422 with the failing
|
|
231
239
|
field — surface that text to the user verbatim rather than retrying
|
|
232
240
|
blindly.
|
|
233
241
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"kind": "knowledge_layout",
|
|
7
7
|
"anchor": "<!-- CURATION:knowledge_layout id=\"policy-file-shape\" -->",
|
|
8
8
|
"human_label": "Policy file section shape",
|
|
9
|
-
"description": "Required sections inside
|
|
9
|
+
"description": "Required sections inside policies/management-captures/<slug>.md and what each holds",
|
|
10
10
|
"scope_paths": ["policies/management-captures/*.md"]
|
|
11
11
|
}
|
|
12
12
|
]
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
kind: reference
|
|
3
3
|
name: policy-workflow
|
|
4
|
-
description: Step 5.1-5.4 dossier →
|
|
4
|
+
description: Step 5.1-5.4 dossier → Agent → policy file → auto-index fan-out, with curl recipes and rollback ordering.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Step 5 fan-out — dossier →
|
|
7
|
+
# Step 5 fan-out — dossier → Agent → policy file → auto-index
|
|
8
8
|
|
|
9
9
|
Each step gates the next. If step `N` fails, attempt to roll back
|
|
10
10
|
steps `N-1 … 1` in reverse before reporting the failure to the user.
|
|
@@ -24,18 +24,29 @@ Skip this step if `linked.dossier` is not set or the dossier already
|
|
|
24
24
|
exists. The dossier file is data only — no harm if it ends up empty
|
|
25
25
|
when the rest of the flow rolls back.
|
|
26
26
|
|
|
27
|
-
## 5.2 Create the
|
|
27
|
+
## 5.2 Create the execution Agent (only if scheduling is needed)
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
curl -sS -X
|
|
30
|
+
curl -sS -X POST http://localhost:8321/api/agents \
|
|
31
31
|
-H 'Content-Type: application/json' \
|
|
32
32
|
-d @- <<'JSON'
|
|
33
|
-
{
|
|
33
|
+
{
|
|
34
|
+
"slug": "<slug>",
|
|
35
|
+
"name": "<Title>",
|
|
36
|
+
"description": "Scheduled enforcement for management policy <slug>.",
|
|
37
|
+
"schedule": { "kind": "cron", "expression": "0 7 * * *" },
|
|
38
|
+
"backend": { "tier": "lite" },
|
|
39
|
+
"limits": { "max_budget_usd": 0.20 },
|
|
40
|
+
"prompt": "# <Title>\n\n## Checks\n\n### <step label>\n**Action**: …"
|
|
41
|
+
}
|
|
34
42
|
JSON
|
|
35
43
|
```
|
|
36
44
|
|
|
37
|
-
The
|
|
38
|
-
|
|
45
|
+
The `prompt` becomes the Agent's task body verbatim; the daemon writes the
|
|
46
|
+
user-visible `policies/agents/<slug>/agent.md` and pairs the recurring
|
|
47
|
+
schedule row itself — no reload call needed. A 409 means the slug is taken
|
|
48
|
+
(go back to Step 2 dedup); a 400 `invalid_definition` returns the failing
|
|
49
|
+
field — surface it verbatim.
|
|
39
50
|
|
|
40
51
|
Skip this step if the policy is purely passive (e.g. "from now on,
|
|
41
52
|
when the user mentions X in DM, also …"). The policy file itself
|
|
@@ -68,19 +79,20 @@ needed.
|
|
|
68
79
|
|
|
69
80
|
The `linked:` mapping uses nested YAML for human / LLM readability.
|
|
70
81
|
The daemon's frontmatter validator does not parse nested keys, but
|
|
71
|
-
the **policy-index reconciler does** — it reads `linked.routine`
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
82
|
+
the **policy-index reconciler does** — it reads `linked.routine` (the
|
|
83
|
+
Agent slug; field name kept from the pre-Agents era) to populate the
|
|
84
|
+
cadence column (from `policies/agents/<slug>/agent.md`'s schedule
|
|
85
|
+
expression, falling back to a legacy `policies/routines/custom/<slug>.md`
|
|
86
|
+
cron) and `linked.dossier` for the dossier column. Keep the slug values
|
|
87
|
+
aligned with what you created at 5.1 / 5.2 so the reconciler can
|
|
88
|
+
resolve them.
|
|
76
89
|
|
|
77
90
|
## 5.4 _(no manual step required)_
|
|
78
91
|
|
|
79
|
-
`policies/management-captures/_index.md`
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
doing so just races the reconciler and creates snapshot churn.
|
|
92
|
+
Both `policies/management-captures/_index.md` and the `## Active Policies`
|
|
93
|
+
section in `policies/management.md` are reconciler-owned and re-render
|
|
94
|
+
within ~10 s of step 5.3's write (see SKILL.md body intro — no manual
|
|
95
|
+
PATCH/PUT).
|
|
84
96
|
|
|
85
97
|
If you need to confirm the index is up to date before replying to the
|
|
86
98
|
user, GET `policies/management-captures/_index` after a short wait. The
|
|
@@ -92,7 +104,7 @@ reconciler's last-run record lives at `runtime_state` key
|
|
|
92
104
|
| Failure at | Roll back |
|
|
93
105
|
|---|---|
|
|
94
106
|
| 5.2 | undo 5.1 — the dossier path does **not** accept `DELETE` (`knowledge/dossiers/*` is PUT/PATCH only; a `DELETE` returns `403 context.write_forbidden`). If you created it new, PUT it to empty content / `status: removed`; an empty dossier is harmless (per 5.1). Leave a pre-existing dossier untouched. |
|
|
95
|
-
| 5.3 | undo 5.2
|
|
107
|
+
| 5.3 | undo 5.2 — `DELETE /api/agents/<slug>` with `{"keep_history": false}` (you created it new at 5.2, so a hard delete leaves no orphan), then undo 5.1 as above |
|
|
96
108
|
| 5.4 | none required — there is no manual 5.4. If the reconciler does not pick the change up within ~30 s, surface the diagnostics record (`runtime_state` key above) to the user rather than rolling back. |
|
|
97
109
|
|
|
98
110
|
If any rollback step itself fails, **report the partial state to the
|
|
@@ -41,10 +41,9 @@ language-agnostic** — it applies whatever language the agent uses
|
|
|
41
41
|
with the user.
|
|
42
42
|
|
|
43
43
|
Anti-examples (non-exhaustive — the positive rule above is
|
|
44
|
-
load-bearing, not this list): "Good morning!", "
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
these in any language also fail the positive rule.
|
|
44
|
+
load-bearing, not this list): "Good morning!", "Summary:", "Done.",
|
|
45
|
+
"Heads-up —". Near-synonyms of these in any language also fail the
|
|
46
|
+
positive rule.
|
|
48
47
|
|
|
49
48
|
### No internal mechanism names
|
|
50
49
|
|
|
@@ -56,9 +55,8 @@ user-visible text. Those go in Agent Log only.
|
|
|
56
55
|
|
|
57
56
|
### No filler timing commentary
|
|
58
57
|
|
|
59
|
-
Forbidden — "Just a heads-up", "
|
|
60
|
-
|
|
61
|
-
itself carries it.
|
|
58
|
+
Forbidden — "Just a heads-up", "About N hours left", "FYI". If timing
|
|
59
|
+
matters, the deadline / event time itself carries it.
|
|
62
60
|
|
|
63
61
|
### No table-of-contents readback
|
|
64
62
|
|
|
@@ -96,16 +94,17 @@ Notify when **all three** are true: (1) **actionable** or requires awareness, (2
|
|
|
96
94
|
- **A pending Agent Plan row / scheduled DM is already set to fire
|
|
97
95
|
for this item within the next 2 hours** — let the planned channel
|
|
98
96
|
deliver; don't pre-empt it.
|
|
99
|
-
- **
|
|
100
|
-
- **Over the rate-limit caps (3/hour, 12/day; `critical` bypasses both)** — do NOT spam-retry. The endpoint does NOT signal this: `/api/notify` returns `200 {status:"sent"}` even when quiet-hours or the rate-limit silently drops the message, so a `"sent"` response is not proof of delivery. Self-throttle by checking `<today>` `## Agent Log` before firing; if you suspect suppression, log the skip rather than re-posting. If time-critical, upgrade priority at next opportunity
|
|
97
|
+
- **Already delivered this item** — a `200 {status:"sent"}` is proof of delivery and a `200 {status:"deferred_quiet_hours"}` is proof of queued delivery, so do NOT re-post on either. Self-throttle via `<today>` `## Agent Log` before firing and log the skip rather than re-posting. (The endpoint defers during quiet hours and enforces rate caps, but dedup and noise control are still your job.)
|
|
101
98
|
- **Routine file changes** or **agent internal state** — use Agent Log instead
|
|
102
99
|
- **When in doubt — prefer silence**
|
|
103
100
|
|
|
104
101
|
## Priority
|
|
105
102
|
|
|
106
103
|
**Default to `normal`.** Reserve `high` for 8h-delay-matters. Reserve
|
|
107
|
-
`critical` for 3am-matters
|
|
108
|
-
|
|
104
|
+
`critical` for 3am-matters — it is the only level that bypasses the
|
|
105
|
+
endpoint's quiet-hours deferral and rate caps; everything else is
|
|
106
|
+
metadata recorded in the notification log. Full per-level table,
|
|
107
|
+
examples, and delivery semantics are in the priority reference below.
|
|
109
108
|
|
|
110
109
|
{{> ref:priority }}
|
|
111
110
|
|
|
@@ -120,5 +119,9 @@ curl -s -X POST http://localhost:8321/api/notify \
|
|
|
120
119
|
-H 'Content-Type: application/json' \
|
|
121
120
|
-d '{"message": "Design review starts in 15 minutes.", "priority": "normal"}'
|
|
122
121
|
```
|
|
123
|
-
Fields: `message` (required, markdown), `priority` (optional: critical/high/normal/low), `platform` (optional, override target).
|
|
124
|
-
|
|
122
|
+
Fields: `message` (required, markdown), `priority` (optional: critical/high/normal/low), `platform` (optional, override target) OR `platforms` (optional, array of targets) — mutually exclusive, not both.
|
|
123
|
+
Responses:
|
|
124
|
+
- `200 { "status": "sent", "notificationId": "...", "dispatchId": "..." }` = delivered to ≥1 channel; a total delivery failure returns HTTP 500 (not a silent 200-drop).
|
|
125
|
+
- `200 { "status": "deferred_quiet_hours", "scheduleId": "...", "deliverAfter": "..." }` = fired inside the user's quiet hours; queued as a scheduled DM that delivers at `deliverAfter`. Treat as delivered — do NOT re-post. If the item will be stale by then, `DELETE /api/schedule/{scheduleId}` and use `<today>` `## Agent Log` instead.
|
|
126
|
+
- `429 { "status": "rate_limited", "retryAfter": "..." }` = hourly/daily notification cap spent; nothing sent or queued. Don't retry-loop — drop to `<today>` `## Agent Log`.
|
|
127
|
+
`critical` priority bypasses both gates and always sends immediately. Risk tier: `Autonomous` — the agent decides when to notify; recorded in `notification_log` for the on-demand retrospective.
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
---
|
|
2
2
|
kind: reference
|
|
3
3
|
name: priority
|
|
4
|
-
description: Notification priority levels — critical / high / normal / low —
|
|
4
|
+
description: Notification priority levels — critical / high / normal / low — as metadata you set, with per-level usage examples.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Notification priority levels
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
|
9
|
+
`priority` is a metadata field you set on the `/api/notify` call. It
|
|
10
|
+
travels into `notification_log` and helps the user (and the
|
|
11
|
+
retrospective) gauge how urgent each message was. One level changes
|
|
12
|
+
delivery: `critical` bypasses the endpoint's quiet-hours deferral and
|
|
13
|
+
rate caps and always sends immediately — every other level rides the
|
|
14
|
+
gates below. Pick the lowest priority that still honestly describes
|
|
15
|
+
the message. **Default to `normal`.**
|
|
16
|
+
|
|
17
|
+
| Priority | Use for |
|
|
18
|
+
|---|---|
|
|
19
|
+
| `critical` | Security alerts (credential leak, account lockout), data-loss risk (about to overwrite without backup, irreversible deletion in flight), system errors blocking the user from working. The "wake the user at 3 am" tier. |
|
|
20
|
+
| `high` | Hard deadlines firing in the next 8 hours, urgent inbound messages from people the user has flagged as priority, "meeting starting now". Important but not 3 am. |
|
|
21
|
+
| `normal` | Regular reminders (`15 min until standup`), digest-style summaries, single-recipient FYIs the user opted into. **Default.** |
|
|
22
|
+
| `low` | Background updates, observational FYIs the user did not explicitly ask for, optional context. Often better as an Agent Log entry instead of a notification at all. |
|
|
18
23
|
|
|
19
24
|
## Examples by level
|
|
20
25
|
|
|
@@ -47,19 +52,30 @@ If the next morning would still be soon enough, it is not `high`.
|
|
|
47
52
|
If the user did not opt in to receiving this category of update, do not
|
|
48
53
|
send `low`. Drop it to an Agent Log entry instead.
|
|
49
54
|
|
|
50
|
-
##
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
`
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
55
|
+
## Delivery semantics
|
|
56
|
+
|
|
57
|
+
`/api/notify` returns one of three envelopes:
|
|
58
|
+
|
|
59
|
+
- `200 {status:"sent", ...}` — delivered to at least one channel right
|
|
60
|
+
now. `"sent"` IS proof of delivery — do NOT re-post the same item on
|
|
61
|
+
a 200. A total delivery failure THROWS and surfaces as HTTP 500 (not
|
|
62
|
+
a silent 200-drop).
|
|
63
|
+
- `200 {status:"deferred_quiet_hours", scheduleId, deliverAfter}` —
|
|
64
|
+
you fired inside the user's quiet hours; the message was queued as a
|
|
65
|
+
scheduled DM that delivers at `deliverAfter` (quiet-hours end).
|
|
66
|
+
Nothing was lost; do NOT re-post. Repeat calls from the same origin
|
|
67
|
+
coalesce into the same pending DM. If the item will be stale by
|
|
68
|
+
`deliverAfter`, `DELETE /api/schedule/{scheduleId}` and record it in
|
|
69
|
+
`<today>` `## Agent Log` instead. `critical` priority bypasses this
|
|
70
|
+
gate entirely.
|
|
71
|
+
- `429 {status:"rate_limited", retryAfter}` — the proactive hourly or
|
|
72
|
+
daily notification cap is spent. Nothing was sent or queued. Do not
|
|
73
|
+
retry-loop; drop the item to `<today>` `## Agent Log` (or escalate
|
|
74
|
+
honestly to `critical` if it truly cannot wait).
|
|
75
|
+
|
|
76
|
+
Noise control is still YOUR job, not the endpoint's. The agent CANNOT
|
|
77
|
+
query `notification_log` directly (Approve-tier), so use `<today>`
|
|
78
|
+
`## Agent Log` as the authoritative dedup source (look for `notify
|
|
79
|
+
sent` / `DM sent` lines) and self-throttle before firing. Don't
|
|
80
|
+
re-send the same item at the same level; if the situation has
|
|
81
|
+
genuinely escalated, raise the priority metadata to reflect that.
|
|
@@ -29,7 +29,7 @@ delegated mode:
|
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
31
|
curl -s http://localhost:8321/api/notion/databases
|
|
32
|
-
# → { databases: { "
|
|
32
|
+
# → { databases: [ { "label": "<label>", "id": "<uuid>" }, ... ] }
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
Resolve label → UUID here BEFORE the `/exec` call so your `task`
|
|
@@ -26,7 +26,7 @@ delegated mode:
|
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
28
|
curl -sS http://localhost:8321/api/notion/databases
|
|
29
|
-
# → { databases: { "
|
|
29
|
+
# → { databases: [ { "label": "<label>", "id": "<uuid>" }, ... ] }
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
Resolve label → UUID here BEFORE the `/exec` call so your `task`
|
|
@@ -26,7 +26,7 @@ delegated mode:
|
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
28
|
curl -sS http://localhost:8321/api/notion/databases
|
|
29
|
-
# → { databases: { "
|
|
29
|
+
# → { databases: [ { "label": "<label>", "id": "<uuid>" }, ... ] }
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
Resolve label → UUID here BEFORE the `/exec` call so your `task`
|
|
@@ -14,11 +14,10 @@ Base URL: `http://localhost:8321`. All calls via `curl -s` with
|
|
|
14
14
|
`Content-Type: application/json` on POST/PATCH/PUT. URL-encode spaces in paths.
|
|
15
15
|
|
|
16
16
|
Full CRUD over Notion pages plus workspace search. Reads and writes are
|
|
17
|
-
Autonomous; writes are
|
|
18
|
-
`notion:<pageId>` for
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
want immediate awareness.
|
|
17
|
+
Autonomous; writes are serialized per-process and pre-marked
|
|
18
|
+
`notion:<pageId>` for attribution. The daemon does not DM the owner before
|
|
19
|
+
a write — the `deniedTools` setting is the gate. Call `POST /api/notify`
|
|
20
|
+
yourself when you judge the user would want immediate awareness.
|
|
22
21
|
|
|
23
22
|
**Parent shorthand**: `parent` accepts a label string (`"tasks"`),
|
|
24
23
|
`{ database: "tasks" }`, `{ data_source_id }`, `{ database_id }`, or
|
|
@@ -34,8 +33,10 @@ curl -s "http://localhost:8321/api/notion/search?q=launch+plan" # se
|
|
|
34
33
|
curl -s http://localhost:8321/api/notion/pages/abc123... # retrieve page
|
|
35
34
|
```
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
`
|
|
36
|
+
Query also accepts `sorts` (URL-encoded JSON) alongside `filter`, and
|
|
37
|
+
`in_trash=true` to query trashed rows. Pagination: `page_size` (1–100,
|
|
38
|
+
default 20) + `start_cursor` from response's `next_cursor`; check
|
|
39
|
+
`has_more` to know if more pages exist.
|
|
39
40
|
|
|
40
41
|
## Create a page (write — Autonomous)
|
|
41
42
|
|
|
@@ -55,12 +56,13 @@ curl -s -X PATCH http://localhost:8321/api/notion/pages/abc123... \
|
|
|
55
56
|
|
|
56
57
|
## Update page content (write — Autonomous)
|
|
57
58
|
|
|
58
|
-
**Concurrency
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
**Concurrency**: Notion v5 has no etags — if another client edits between
|
|
60
|
+
GET and PATCH, `oldStr` may fail silently; for high-risk edits prefer
|
|
61
|
+
`mode=replace_all`.
|
|
61
62
|
|
|
62
63
|
Modes: `append`, `replace_all`, `update` (find-and-replace via
|
|
63
|
-
`updates: [{oldStr, newStr}]`)
|
|
64
|
+
`updates: [{oldStr, newStr}]`), `replace_range` (in-place swap of a line
|
|
65
|
+
range; requires `content` + `contentRange`, optional `allowDeleting`).
|
|
64
66
|
|
|
65
67
|
```bash
|
|
66
68
|
curl -s -X PATCH http://localhost:8321/api/notion/pages/abc123.../content \
|
|
@@ -78,11 +80,9 @@ Moves to trash (~30 days). Restore via `PATCH` with `{ "in_trash": false }`.
|
|
|
78
80
|
|
|
79
81
|
## When NOT to act
|
|
80
82
|
|
|
81
|
-
- During `routine.
|
|
83
|
+
- During `routine.activity_scan` this skill is **read-only** — no creates,
|
|
82
84
|
property updates, content patches, or archives.
|
|
83
|
-
- No bulk operations without user confirmation
|
|
84
|
-
|
|
85
|
-
-
|
|
86
|
-
|
|
87
|
-
message-discipline contract for any `POST /api/notify` call you issue
|
|
88
|
-
here is in the `notify` skill — do not invent ad-hoc phrasing rules.
|
|
85
|
+
- No bulk operations without user confirmation: about to touch 3+ pages,
|
|
86
|
+
stop and ask first. Single ops only.
|
|
87
|
+
- For any `POST /api/notify` call you issue, the message-discipline
|
|
88
|
+
contract lives in the `notify` skill — do not invent ad-hoc phrasing.
|
|
@@ -42,7 +42,7 @@ connector arguments carry concrete UUIDs.
|
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
44
|
curl -s http://localhost:8321/api/notion/databases
|
|
45
|
-
# → { "databases": { "
|
|
45
|
+
# → { "databases": [ { "label": "<label>", "id": "<uuid>" }, ... ] }
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
This route is **not** part of the absolute deny set and is intentionally
|
|
@@ -135,9 +135,9 @@ instead).
|
|
|
135
135
|
|
|
136
136
|
## 5. Decision rules
|
|
137
137
|
|
|
138
|
-
- **
|
|
138
|
+
- **Activity scan is read-only.** Native variants inherit the
|
|
139
139
|
"External services are read-only this hour" constraint from
|
|
140
|
-
`routine.
|
|
140
|
+
`routine.activity_scan.native.claude.md`. No creates, property
|
|
141
141
|
updates, content patches, or archives during the hourly pass.
|
|
142
142
|
- **Mass-update — ask first.** A page-creation call can take up to
|
|
143
143
|
100 pages in one shot, and move / update batches can touch many
|
|
@@ -151,7 +151,7 @@ instead).
|
|
|
151
151
|
|
|
152
152
|
## 6. Persisting observations from native fetches
|
|
153
153
|
|
|
154
|
-
When `routine.
|
|
154
|
+
When `routine.activity_scan.native.claude.md`'s Step 0c fetches recent
|
|
155
155
|
Notion edits, POST each materialised page to `/api/observations`. The
|
|
156
156
|
daemon computes `contentHash` server-side via
|
|
157
157
|
`@aitne/shared/observations-hash.ts`; pass `payload` verbatim.
|
|
@@ -36,7 +36,7 @@ the `<integration-routing-table>` block in the session preamble.
|
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
38
|
curl -s http://localhost:8321/api/notion/databases
|
|
39
|
-
# → { "databases": { "
|
|
39
|
+
# → { "databases": [ { "label": "<label>", "id": "<uuid>" }, ... ] }
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
Resolve label → UUID before any Notion call so the connector arguments
|
|
@@ -110,8 +110,8 @@ Surface the choice to the user before issuing.
|
|
|
110
110
|
|
|
111
111
|
## 4. Decision rules
|
|
112
112
|
|
|
113
|
-
- **
|
|
114
|
-
`routine.
|
|
113
|
+
- **Activity scan is read-only** — inherits the constraint from
|
|
114
|
+
`routine.activity_scan.native.codex.md`.
|
|
115
115
|
- **Mass-update — ask first.** Batch page-creation can take up to 100
|
|
116
116
|
pages; page-move and page-update batches can touch many rows.
|
|
117
117
|
Summarise and confirm anything >~10 pages.
|
|
@@ -46,7 +46,7 @@ the `<integration-routing-table>` block in the session preamble.
|
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
48
|
curl -s http://localhost:8321/api/notion/databases
|
|
49
|
-
# → { "databases": { "
|
|
49
|
+
# → { "databases": [ { "label": "<label>", "id": "<uuid>" }, ... ] }
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
Resolve label → UUID before any Notion call.
|
|
@@ -114,8 +114,8 @@ Surface the choice to the user.
|
|
|
114
114
|
|
|
115
115
|
## 4. Decision rules
|
|
116
116
|
|
|
117
|
-
- **
|
|
118
|
-
`routine.
|
|
117
|
+
- **Activity scan is read-only** — inherits the constraint from
|
|
118
|
+
`routine.activity_scan.native.gemini.md`.
|
|
119
119
|
- **Mass-update — ask first.** Batch page-creation can take up to 100
|
|
120
120
|
pages; batches >~10 pages warrant explicit confirmation.
|
|
121
121
|
- **Schema admin — Approve-tier.** Database / view / data-source
|