@aitne-sh/aitne 0.1.8 → 0.1.9
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 +218 -161
- package/agent-assets/agent-profiles/_safety.md +3 -3
- package/agent-assets/agent-profiles/browser-task.md +108 -0
- package/agent-assets/agent-profiles/conversational.md +3 -3
- package/agent-assets/agent-profiles/profile-importer.md +2 -2
- package/agent-assets/agent-profiles/routine-fetch-window.md +30 -19
- package/agent-assets/agents/context-index-reconcile/agent.md +52 -0
- package/agent-assets/agents/evening-review/agent.md +53 -0
- package/agent-assets/agents/hourly-check/agent.md +62 -0
- package/agent-assets/agents/monthly-review/agent.md +55 -0
- package/agent-assets/agents/morning-routine/agent.md +78 -0
- package/agent-assets/agents/roadmap-maintenance/agent.md +52 -0
- package/agent-assets/agents/skill-curation/agent.md +52 -0
- package/agent-assets/agents/user-profile-sweep-evening/agent.md +48 -0
- package/agent-assets/agents/user-profile-sweep-morning/agent.md +53 -0
- package/agent-assets/agents/weekly-review/agent.md +51 -0
- package/agent-assets/docs/concepts/agent-day.md +13 -11
- package/agent-assets/docs/concepts/auth-health.md +47 -10
- package/agent-assets/docs/concepts/backends-and-tiers.md +66 -31
- package/agent-assets/docs/concepts/costs-and-quotas.md +50 -15
- package/agent-assets/docs/concepts/delegated-mode.md +52 -13
- package/agent-assets/docs/concepts/memory-model.md +72 -32
- package/agent-assets/docs/concepts/observations.md +49 -11
- package/agent-assets/docs/concepts/process-keys.md +56 -22
- package/agent-assets/docs/concepts/routines.md +60 -33
- package/agent-assets/docs/concepts/safety-and-execution.md +50 -21
- package/agent-assets/docs/concepts/safety-model.md +42 -34
- package/agent-assets/docs/concepts/skills.md +33 -17
- package/agent-assets/docs/features/integrations/browser-history.md +195 -0
- package/agent-assets/docs/features/integrations/calendar.md +39 -29
- package/agent-assets/docs/features/integrations/git.md +18 -7
- package/agent-assets/docs/features/integrations/github.md +84 -33
- package/agent-assets/docs/features/integrations/mail.md +59 -16
- package/agent-assets/docs/features/integrations/notion.md +18 -6
- package/agent-assets/docs/features/integrations/obsidian.md +28 -5
- package/agent-assets/docs/features/lifestyle/git.md +42 -38
- package/agent-assets/docs/features/lifestyle/reading.md +50 -22
- package/agent-assets/docs/features/lifestyle/receipts.md +51 -21
- package/agent-assets/docs/features/lifestyle/travel-bookings.md +76 -14
- package/agent-assets/docs/features/memory-files/agent-journal.md +111 -50
- package/agent-assets/docs/features/memory-files/projects.md +71 -17
- package/agent-assets/docs/features/memory-files/roadmap.md +50 -10
- package/agent-assets/docs/features/memory-files/schedule.md +113 -70
- package/agent-assets/docs/features/memory-files/today.md +46 -21
- package/agent-assets/docs/features/memory-files/user-profile.md +63 -33
- package/agent-assets/docs/features/messaging/bang-commands.md +113 -36
- package/agent-assets/docs/features/messaging/dashboard-chat.md +43 -21
- package/agent-assets/docs/features/messaging/discord.md +35 -4
- package/agent-assets/docs/features/messaging/overview.md +37 -19
- package/agent-assets/docs/features/messaging/pairing-and-magic-phrase.md +94 -27
- package/agent-assets/docs/features/messaging/slack.md +67 -14
- package/agent-assets/docs/features/messaging/telegram.md +18 -5
- package/agent-assets/docs/features/messaging/whatsapp.md +71 -17
- package/agent-assets/docs/features/operations/activity-and-conversations.md +44 -15
- package/agent-assets/docs/features/operations/approvals.md +48 -16
- package/agent-assets/docs/features/operations/backend-routing.md +68 -16
- package/agent-assets/docs/features/operations/cost-tracking.md +84 -17
- package/agent-assets/docs/features/operations/managed-chromium.md +221 -0
- package/agent-assets/docs/features/operations/notifications.md +52 -11
- package/agent-assets/docs/features/operations/quiet-hours.md +63 -40
- package/agent-assets/docs/features/operations/schedule-approaching.md +54 -24
- package/agent-assets/docs/features/routines/custom-routines.md +88 -20
- package/agent-assets/docs/features/routines/evening-review.md +74 -21
- package/agent-assets/docs/features/routines/hourly-check.md +149 -29
- package/agent-assets/docs/features/routines/morning-routine.md +53 -35
- package/agent-assets/docs/features/routines/weekly-review.md +40 -21
- package/agent-assets/docs/features/wiki/commands.md +26 -16
- package/agent-assets/docs/features/wiki/cost-and-approval.md +240 -0
- package/agent-assets/docs/features/wiki/dashboard.md +255 -0
- package/agent-assets/docs/features/wiki/overview.md +68 -10
- package/agent-assets/docs/features/wiki/search.md +248 -0
- package/agent-assets/docs/features/wiki/workspaces.md +254 -0
- package/agent-assets/docs/getting-started/01-what-is-this.md +34 -23
- package/agent-assets/docs/getting-started/02-first-steps.md +13 -8
- package/agent-assets/docs/getting-started/03-what-can-this-do.md +25 -14
- package/agent-assets/docs/getting-started/04-first-day.md +38 -20
- package/agent-assets/docs/glossary.md +235 -24
- package/agent-assets/docs/guides/add-a-custom-routine.md +63 -23
- package/agent-assets/docs/guides/backup-and-restore.md +80 -16
- package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +56 -25
- package/agent-assets/docs/guides/build-your-wiki.md +22 -9
- package/agent-assets/docs/guides/change-which-model-handles-x.md +64 -10
- package/agent-assets/docs/guides/connect-a-new-mail-account.md +64 -15
- package/agent-assets/docs/guides/explore-with-trace-and-connect.md +28 -11
- package/agent-assets/docs/guides/import-knowledge-file.md +50 -40
- package/agent-assets/docs/guides/install-and-run.md +48 -19
- package/agent-assets/docs/guides/maintain-wiki-health.md +35 -10
- package/agent-assets/docs/guides/migrate-machines.md +74 -18
- package/agent-assets/docs/guides/multiple-wikis-for-multiple-domains.md +111 -60
- package/agent-assets/docs/guides/pause-the-agent.md +65 -24
- package/agent-assets/docs/guides/reinstall-cleanly.md +88 -18
- package/agent-assets/docs/guides/setup-wizard.md +113 -54
- package/agent-assets/docs/guides/switch-default-backend.md +62 -16
- package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +26 -10
- package/agent-assets/docs/reference/api.md +143 -32
- package/agent-assets/docs/reference/cli-commands.md +38 -17
- package/agent-assets/docs/reference/config.md +224 -49
- package/agent-assets/docs/reference/disallowed-tools.md +29 -10
- package/agent-assets/docs/reference/keyboard-shortcuts.md +34 -10
- package/agent-assets/docs/reference/knowledge-layout.md +620 -0
- package/agent-assets/docs/reference/process-keys.md +61 -5
- package/agent-assets/docs/reference/skills.md +38 -12
- package/agent-assets/docs/troubleshooting/auth-failed.md +48 -19
- package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +90 -28
- package/agent-assets/docs/troubleshooting/fallback-keeps-firing.md +86 -22
- package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +68 -24
- package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +80 -20
- package/agent-assets/docs/troubleshooting/observation-not-detected.md +73 -21
- package/agent-assets/docs/troubleshooting/quota-exhausted.md +29 -5
- package/agent-assets/docs/troubleshooting/wiki-ingest-full-blocked.md +126 -54
- package/agent-assets/docs/troubleshooting/wiki-write-failed.md +29 -12
- package/agent-assets/optimizer-skills/drift-analysis/SKILL.md +1 -1
- package/agent-assets/optimizer-skills/knowledge-map/SKILL.md +1 -1
- package/agent-assets/optimizer-skills/skill-curation/SKILL.md +1 -1
- package/agent-assets/sandbox/linux/aitne-chromium.apparmor +91 -0
- package/agent-assets/sandbox/macos/aitne-chromium.sb +156 -0
- package/agent-assets/skills/agent-actions/SKILL.md +2 -2
- package/agent-assets/skills/agent-create/SKILL.md +149 -0
- package/agent-assets/skills/attach/SKILL.md +2 -2
- package/agent-assets/skills/browser-history/SKILL.md +198 -0
- package/agent-assets/skills/browser-history-respond/SKILL.md +106 -0
- package/agent-assets/skills/browser-task/SKILL.md +169 -0
- package/agent-assets/skills/context/SKILL.md +12 -12
- package/agent-assets/skills/context/curation.json +2 -2
- package/agent-assets/skills/context/references/api.md +43 -31
- package/agent-assets/skills/context/references/required-frontmatter.md +3 -3
- package/agent-assets/skills/context/references/snapshot-files.md +6 -6
- package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +3 -3
- package/agent-assets/skills/docs-search/SKILL.md +4 -3
- package/agent-assets/skills/external-services/SKILL.delegated.claude.md +11 -21
- package/agent-assets/skills/external-services/SKILL.delegated.codex.md +11 -21
- package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +11 -21
- package/agent-assets/skills/external-services/SKILL.md +3 -3
- package/agent-assets/skills/external-services/SKILL.native.claude.md +5 -5
- package/agent-assets/skills/external-services/SKILL.native.codex.md +7 -7
- package/agent-assets/skills/external-services/SKILL.native.gemini.md +4 -4
- package/agent-assets/skills/external-services/references/calendar-apple.md +2 -2
- package/agent-assets/skills/external-services/references/calendar-outlook.md +1 -1
- package/agent-assets/skills/external-services/references/obsidian.md +2 -2
- package/agent-assets/skills/gmail-lifestyle/SKILL.md +9 -82
- package/agent-assets/skills/mail/SKILL.delegated.claude.md +14 -5
- package/agent-assets/skills/mail/SKILL.delegated.codex.md +8 -4
- package/agent-assets/skills/mail/SKILL.delegated.gemini.md +8 -4
- package/agent-assets/skills/mail/references/api.md +4 -2
- package/agent-assets/skills/mail/references/providers.md +1 -1
- package/agent-assets/skills/managed-tasks/SKILL.md +9 -9
- package/agent-assets/skills/managed-tasks/references/errors.md +9 -6
- package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +1 -1
- package/agent-assets/skills/management-policy/SKILL.md +32 -31
- package/agent-assets/skills/management-policy/curation.json +1 -1
- package/agent-assets/skills/management-policy/references/policy-workflow.md +9 -9
- package/agent-assets/skills/management-policy/seeds/policy-file-shape.seed.json +1 -1
- package/agent-assets/skills/notify/SKILL.md +4 -4
- package/agent-assets/skills/notify/references/priority.md +9 -4
- 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.native.claude.md +10 -6
- package/agent-assets/skills/notion/SKILL.native.codex.md +9 -4
- package/agent-assets/skills/notion/SKILL.native.gemini.md +9 -4
- package/agent-assets/skills/observations/SKILL.md +24 -8
- package/agent-assets/skills/project-doc/SKILL.md +1 -1
- package/agent-assets/skills/project-doc/curation.json +3 -3
- package/agent-assets/skills/project-doc/seeds/project-shape.seed.json +7 -4
- package/agent-assets/skills/project-doc/seeds/slug-grammar.seed.json +3 -3
- package/agent-assets/skills/reading/SKILL.md +10 -0
- package/agent-assets/skills/reading/references/reading-taste.md +2 -2
- package/agent-assets/skills/roadmap/SKILL.md +5 -5
- package/agent-assets/skills/roadmap/curation.json +1 -1
- package/agent-assets/skills/roadmap/references/api.md +7 -7
- package/agent-assets/skills/roadmap/references/cross-check.md +15 -8
- package/agent-assets/skills/roadmap/references/migration.md +4 -4
- package/agent-assets/skills/roadmap/seeds/entry-types.seed.json +1 -1
- package/agent-assets/skills/schedule/SKILL.md +42 -34
- package/agent-assets/skills/schedule/references/batch.md +2 -2
- package/agent-assets/skills/schedule/references/errors.md +7 -4
- package/agent-assets/skills/schedule/references/model-selection.md +3 -3
- package/agent-assets/skills/schedule/references/recurrence-rule.md +1 -1
- package/agent-assets/skills/scheduled-managed-task/SKILL.md +46 -36
- package/agent-assets/skills/today/SKILL.md +9 -9
- package/agent-assets/skills/today/curation.json +3 -3
- package/agent-assets/skills/today/references/agent-plan-lifecycle.md +6 -5
- package/agent-assets/skills/today/seeds/section-shape.seed.json +1 -1
- package/agent-assets/skills/user-interview/SKILL.md +12 -9
- package/agent-assets/skills/user-interview/references/op-briefing.md +2 -2
- package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +8 -0
- package/agent-assets/skills/user-profile/SKILL.md +17 -17
- package/agent-assets/skills/user-profile/curation.json +2 -2
- package/agent-assets/skills/user-profile/references/character-preferences.md +2 -2
- package/agent-assets/skills/user-profile/seeds/routing-table.seed.json +8 -8
- package/agent-assets/skills/user-profile/seeds/topic-files.seed.json +6 -6
- package/agent-assets/skills/wiki/wiki-compile/SKILL.md +4 -4
- package/agent-assets/system-prompts/routine-fetch-window.md +22 -12
- package/agent-assets/task-flows/_partials/calendar-acquire.google_calendar.md +4 -2
- package/agent-assets/task-flows/_partials/calendar-acquire.outlook_calendar.md +4 -2
- package/agent-assets/task-flows/_partials/capture-user-info.md +2 -2
- package/agent-assets/task-flows/_partials/dm-intent.long-horizon.md +1 -1
- package/agent-assets/task-flows/_partials/dm-intent.project.md +9 -9
- package/agent-assets/task-flows/_partials/mail-acquire.outlook_mail.md +3 -2
- package/agent-assets/task-flows/_partials/notion-acquire.notion.md +10 -5
- package/agent-assets/task-flows/browser_task.md +84 -0
- 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.workflow_run.failed.md +2 -2
- package/agent-assets/task-flows/knowledge.import.md +14 -14
- package/agent-assets/task-flows/message.received.dm.md +9 -4
- package/agent-assets/task-flows/message.received.dm_first.md +3 -3
- package/agent-assets/task-flows/routine.custom.md +3 -3
- package/agent-assets/task-flows/routine.evening_review.md +8 -8
- package/agent-assets/task-flows/routine.fetch_window.md +2 -2
- package/agent-assets/task-flows/routine.hourly_check.md +16 -12
- package/agent-assets/task-flows/routine.monthly_review.md +21 -21
- package/agent-assets/task-flows/routine.morning_routine_journal.md +119 -97
- package/agent-assets/task-flows/routine.morning_routine_today.md +43 -43
- package/agent-assets/task-flows/routine.research_cluster_update.md +35 -0
- package/agent-assets/task-flows/routine.research_dispatch.md +38 -0
- package/agent-assets/task-flows/routine.research_offer_dm.md +125 -0
- package/agent-assets/task-flows/routine.research_wiki_summary.md +53 -0
- package/agent-assets/task-flows/routine.roadmap_refresh.md +10 -10
- package/agent-assets/task-flows/routine.today_refresh.md +4 -4
- package/agent-assets/task-flows/routine.user_profile_sweep.md +10 -10
- package/agent-assets/task-flows/routine.weekly_review.md +93 -24
- package/agent-assets/task-flows/schedule.approaching.md +0 -1
- package/agent-assets/task-flows/scheduled.dm.md +5 -5
- package/agent-assets/task-flows/scheduled.task.md +4 -4
- package/agent-assets/task-flows/setup.initial.md +21 -21
- package/agent-assets/task-flows/setup.update.md +2 -2
- package/agent-assets/templates/README.md +27 -20
- package/agent-assets/templates/_index.md +42 -26
- package/agent-assets/templates/_manifest.json +34 -99
- package/agent-assets/templates/{user → identity}/_index.md +1 -1
- package/agent-assets/templates/{user → identity}/profile.md +2 -2
- package/agent-assets/templates/{dossiers → knowledge/dossiers}/_index.md +1 -1
- package/agent-assets/templates/{projects → plans/projects}/_active.base +1 -1
- package/agent-assets/templates/policies/_index.md +21 -0
- package/agent-assets/templates/{rules → policies}/journal-export.md +1 -1
- package/agent-assets/templates/{rules → policies}/journal-format.md +5 -5
- package/agent-assets/templates/{rules/policies → policies/management-captures}/_index.md +2 -2
- package/agent-assets/templates/{rules → policies}/management.md +3 -3
- package/agent-assets/templates/{rules → policies}/mcp.md +1 -1
- package/agent-assets/templates/{rules → policies}/redaction.md +1 -1
- package/agent-assets/templates/{routines → policies/routines}/_index.md +1 -1
- package/agent-assets/templates/{routines → policies/routines}/evening.md +2 -2
- package/agent-assets/templates/{routines → policies/routines}/hourly.md +1 -1
- package/agent-assets/templates/{routines → policies/routines}/monthly.md +2 -2
- package/bin/aitne.mjs +13 -4
- package/package.json +5 -4
- package/scripts/commands/doctor.mjs +14 -8
- package/scripts/commands/run-now.mjs +6 -21
- package/scripts/lib/ports.d.mts +27 -0
- package/scripts/lib/ports.mjs +36 -0
- package/scripts/lib/read-api-token.mjs +176 -0
- package/scripts/start.mjs +2 -1
- package/agent-assets/docs/features/lifestyle/travel-time.md +0 -58
- package/agent-assets/skills/gmail-lifestyle/references/travel-time-api.md +0 -59
- package/agent-assets/skills/schedule/references/recurring.md +0 -185
- package/agent-assets/templates/context-index.md +0 -42
- package/agent-assets/templates/rules/_index.md +0 -19
- /package/agent-assets/templates/{user → identity}/expertise.md +0 -0
- /package/agent-assets/templates/{user → identity}/goals.md +0 -0
- /package/agent-assets/templates/{user → identity}/people.md +0 -0
- /package/agent-assets/templates/{user → identity}/personal.md +0 -0
- /package/agent-assets/templates/{user → identity}/work.md +0 -0
- /package/agent-assets/templates/{agent/journal.md → journal/agent.md} +0 -0
- /package/agent-assets/templates/{dossiers → knowledge/dossiers}/evening.md +0 -0
- /package/agent-assets/templates/{dossiers → knowledge/dossiers}/hourly.md +0 -0
- /package/agent-assets/templates/{dossiers → knowledge/dossiers}/monthly.md +0 -0
- /package/agent-assets/templates/{dossiers → knowledge/dossiers}/morning.md +0 -0
- /package/agent-assets/templates/{dossiers → knowledge/dossiers}/roadmap.md +0 -0
- /package/agent-assets/templates/{dossiers → knowledge/dossiers}/weekly.md +0 -0
- /package/agent-assets/templates/{projects → plans/projects}/_index.md +0 -0
- /package/agent-assets/templates/{roadmap.md → plans/roadmap.md} +0 -0
- /package/agent-assets/templates/{routines → policies/routines}/morning.md +0 -0
- /package/agent-assets/templates/{routines → policies/routines}/weekly.md +0 -0
- /package/agent-assets/templates/{agent → state}/profile-questions.md +0 -0
- /package/agent-assets/templates/{today.md → state/today.md} +0 -0
|
@@ -11,17 +11,17 @@ allowed-tools:
|
|
|
11
11
|
A **management policy** is a durable, ongoing rule the user wants the
|
|
12
12
|
agent to keep applying. It is NOT a one-off task.
|
|
13
13
|
|
|
14
|
-
Each policy lives at `
|
|
14
|
+
Each policy lives at `policies/management-captures/<slug>.md` and may link to:
|
|
15
15
|
|
|
16
|
-
- `routines/custom/<slug>.md` — the cron-driven execution rulebook
|
|
17
|
-
- `dossiers/<topic>.md` — where the policy's accumulating data lands
|
|
16
|
+
- `policies/routines/custom/<slug>.md` — the cron-driven execution rulebook
|
|
17
|
+
- `knowledge/dossiers/<topic>.md` — where the policy's accumulating data lands
|
|
18
18
|
|
|
19
|
-
A readable summary of every policy lives at `
|
|
19
|
+
A readable summary of every policy lives at `policies/management-captures/_index.md`,
|
|
20
20
|
which the daemon's policy-index reconciler **auto-maintains** from the
|
|
21
|
-
policy files on disk. The directory listing under `
|
|
21
|
+
policy files on disk. The directory listing under `policies/management-captures/` is
|
|
22
22
|
the source of truth; `_index.md` is a derived snapshot — **do not
|
|
23
23
|
PATCH or PUT it by hand**. The same reconciler also re-renders the
|
|
24
|
-
`## Active Policies` section in `
|
|
24
|
+
`## Active Policies` section in `policies/management.md` so it stays in
|
|
25
25
|
sync. Both files refresh within ~10 s of any policy file write.
|
|
26
26
|
|
|
27
27
|
## When to use this skill
|
|
@@ -42,7 +42,7 @@ Use when the user expresses a **durable, ongoing management rule**:
|
|
|
42
42
|
| "Reply more tersely from now on" / tone, voice, style | `user-profile` (routes to `character`) |
|
|
43
43
|
| "I'm an NYC-based dev" / single user fact | `user-profile` |
|
|
44
44
|
| "Add a project for the Q3 roadmap" | `context` (`projects/*.md`) |
|
|
45
|
-
| Pure data write — "log this transaction" | direct context write to the relevant `dossiers/<topic>.md` |
|
|
45
|
+
| Pure data write — "log this transaction" | direct context write to the relevant `knowledge/dossiers/<topic>.md` |
|
|
46
46
|
|
|
47
47
|
If the user's request is **a recurring task with no need for a recorded
|
|
48
48
|
reason** (e.g. "ping me every Monday at 9 to start standup prep"), use
|
|
@@ -60,12 +60,12 @@ the directory listing if you need authoritative state.
|
|
|
60
60
|
```bash
|
|
61
61
|
# Auto-maintained by the daemon — fastest read for slug / status /
|
|
62
62
|
# cadence / linked routine + dossier / one-line why.
|
|
63
|
-
curl -s "http://localhost:8321/api/context/
|
|
63
|
+
curl -s "http://localhost:8321/api/context/policies/management-captures/_index"
|
|
64
64
|
|
|
65
65
|
# Directory listing — authoritative source of truth. Use this if a
|
|
66
66
|
# specific policy file looks newer than the index (the reconciler
|
|
67
67
|
# debounces ~10 s; fresh writes may not be reflected yet).
|
|
68
|
-
curl -s "http://localhost:8321/api/context/list/
|
|
68
|
+
curl -s "http://localhost:8321/api/context/list/policies"
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
If the listing and `_index.md` rows disagree, **prefer the listing**
|
|
@@ -103,14 +103,14 @@ wait again.
|
|
|
103
103
|
|
|
104
104
|
### Step 4 — Build the policy file
|
|
105
105
|
|
|
106
|
-
Emit the full `
|
|
106
|
+
Emit the full `policies/management-captures/<slug>.md` content as a fenced markdown
|
|
107
107
|
block in the DM **before** writing, so the user sees what's about to be
|
|
108
108
|
saved. The slug must:
|
|
109
109
|
|
|
110
110
|
- equal the filename stem
|
|
111
111
|
- match `^[a-z0-9][a-z0-9-]*[a-z0-9]$` (or a single `[a-z0-9]`)
|
|
112
112
|
- be ≤ 64 chars
|
|
113
|
-
- equal the linked `routines/custom/<slug>.md` slug (if any) — keep
|
|
113
|
+
- equal the linked `policies/routines/custom/<slug>.md` slug (if any) — keep
|
|
114
114
|
them aligned in v1
|
|
115
115
|
|
|
116
116
|
### Step 5 — Wire the dependencies (strict order; on failure, roll back in reverse)
|
|
@@ -152,7 +152,7 @@ the active policies first and ask.
|
|
|
152
152
|
`updated: <today>`, PUT back. (The frontmatter parser is
|
|
153
153
|
line-scalar so a per-field PATCH section call would not target a
|
|
154
154
|
frontmatter key — always GET-merge-PUT for frontmatter edits.)
|
|
155
|
-
2. If `linked.routine` is set: GET `routines/custom/<slug>`, flip
|
|
155
|
+
2. If `linked.routine` is set: GET `policies/routines/custom/<slug>`, flip
|
|
156
156
|
frontmatter `enabled: false`, PUT back. The reload hook flips the
|
|
157
157
|
cron job off automatically.
|
|
158
158
|
|
|
@@ -173,7 +173,7 @@ Same fan-out, with `status: active` and `enabled: true`.
|
|
|
173
173
|
1. GET the policy file, flip frontmatter `status: removed` and
|
|
174
174
|
`updated: <today>`, PUT back.
|
|
175
175
|
2. If `linked.routine` is set: `DELETE
|
|
176
|
-
/api/context/routines/custom/<slug>` (whitelisted).
|
|
176
|
+
/api/context/policies/routines/custom/<slug>` (whitelisted).
|
|
177
177
|
|
|
178
178
|
The reconciler moves the row from `## Active` to `## Removed`
|
|
179
179
|
automatically — the `removedAt` cell is read from the policy file's
|
|
@@ -185,10 +185,10 @@ is intentionally not whitelisted (see MANAGEMENT-POLICY-CAPTURE-PLAN
|
|
|
185
185
|
|
|
186
186
|
## What this skill does NOT do
|
|
187
187
|
|
|
188
|
-
- Does NOT touch `
|
|
188
|
+
- Does NOT touch `policies/management.md` body sections (Source of Truth
|
|
189
189
|
table, Notification Rules, Schedule, etc.). Those are wizard-only.
|
|
190
190
|
- Does NOT create rows in the `recurring_schedules` DB table — defer to
|
|
191
|
-
`routines/custom/` for cron, which gives the user a visible MD file
|
|
191
|
+
`policies/routines/custom/` for cron, which gives the user a visible MD file
|
|
192
192
|
to edit.
|
|
193
193
|
- Does NOT migrate existing custom routines into policy files
|
|
194
194
|
retroactively. Migration is a separate one-time operation.
|
|
@@ -197,11 +197,12 @@ is intentionally not whitelisted (see MANAGEMENT-POLICY-CAPTURE-PLAN
|
|
|
197
197
|
|
|
198
198
|
- **Need a one-off wake-up?** Use `schedule` (`/api/schedule` or
|
|
199
199
|
`/api/schedule/dm`) — no policy file needed.
|
|
200
|
-
- **Need a recurring
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
200
|
+
- **Need a recurring task with no recorded `## Why`?** Recurring autonomous
|
|
201
|
+
**work** → create an Agent via the `agent-create` skill (`POST /api/agents`);
|
|
202
|
+
recurring scheduled **DM / briefing** → `schedule`'s
|
|
203
|
+
`/api/recurring-schedules` with `taskType: "dm_session"`. Default to
|
|
204
|
+
`tier:"medium"`; pin a specific model id only when the rule needs to
|
|
205
|
+
outlive a `/settings/models` re-route.
|
|
205
206
|
- **Tone / voice / language preference?** Belongs in `user-profile`
|
|
206
207
|
(which routes to `PATCH /api/config/character`), NOT a policy file.
|
|
207
208
|
Full recipe in `user-profile/references/character-preferences.md`.
|
|
@@ -212,17 +213,17 @@ All writes go through `/api/context/*` — see the **context** skill's
|
|
|
212
213
|
`references/api.md` for verb / mode / error envelope details. This
|
|
213
214
|
skill targets these paths:
|
|
214
215
|
|
|
215
|
-
- `GET /api/context/
|
|
216
|
-
- `GET /api/context/list/
|
|
217
|
-
- `GET /api/context/
|
|
218
|
-
- `PUT /api/context/dossiers/<topic>` (Step 5.1 — if new)
|
|
219
|
-
- `PUT /api/context/routines/custom/<slug>` (Step 5.2 — if scheduling)
|
|
220
|
-
- `PUT /api/context/
|
|
221
|
-
- `PATCH /api/context/
|
|
222
|
-
- `DELETE /api/context/routines/custom/<slug>` (remove only)
|
|
223
|
-
|
|
224
|
-
`
|
|
225
|
-
`
|
|
216
|
+
- `GET /api/context/policies/management-captures/_index` (Step 1 summary)
|
|
217
|
+
- `GET /api/context/list/policies` (Step 1 authoritative — entries prefixed `management-captures/`)
|
|
218
|
+
- `GET /api/context/policies/management-captures/<slug>` (read before pause / resume / remove)
|
|
219
|
+
- `PUT /api/context/knowledge/dossiers/<topic>` (Step 5.1 — if new)
|
|
220
|
+
- `PUT /api/context/policies/routines/custom/<slug>` (Step 5.2 — if scheduling)
|
|
221
|
+
- `PUT /api/context/policies/management-captures/<slug>` (Step 5.3)
|
|
222
|
+
- `PATCH /api/context/policies/management-captures/<slug>` (pause / resume / remove; frontmatter via GET-merge-PUT only — line-scalar parser)
|
|
223
|
+
- `DELETE /api/context/policies/routines/custom/<slug>` (remove only)
|
|
224
|
+
|
|
225
|
+
`policies/management-captures/_index.md` and the `## Active Policies` section in
|
|
226
|
+
`policies/management.md` are written by the daemon's policy-index
|
|
226
227
|
reconciler — they are NOT in the agent's write surface for this skill.
|
|
227
228
|
|
|
228
229
|
Frontmatter validation enforces `kind: policy`, `owner: agent`, and
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"anchor": "<!-- CURATION:knowledge_layout id=\"policy-file-shape\" -->",
|
|
8
8
|
"human_label": "Policy file section shape",
|
|
9
9
|
"description": "Required sections inside rules/policies/<slug>.md and what each holds",
|
|
10
|
-
"scope_paths": ["
|
|
10
|
+
"scope_paths": ["policies/management-captures/*.md"]
|
|
11
11
|
}
|
|
12
12
|
]
|
|
13
13
|
}
|
|
@@ -13,7 +13,7 @@ steps `N-1 … 1` in reverse before reporting the failure to the user.
|
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
15
|
# Optional — only if the policy accumulates data into a new topic.
|
|
16
|
-
curl -sS -X PUT http://localhost:8321/api/context/dossiers/<topic> \
|
|
16
|
+
curl -sS -X PUT http://localhost:8321/api/context/knowledge/dossiers/<topic> \
|
|
17
17
|
-H 'Content-Type: application/json' \
|
|
18
18
|
-d @- <<'JSON'
|
|
19
19
|
{"content":"---\ntype: dossier\nowner: agent\nupdated: 2026-04-24\n---\n# <Topic>\n\n## Daily Log\n"}
|
|
@@ -27,7 +27,7 @@ when the rest of the flow rolls back.
|
|
|
27
27
|
## 5.2 Create the custom routine (only if scheduling is needed)
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
curl -sS -X PUT http://localhost:8321/api/context/routines/custom/<slug> \
|
|
30
|
+
curl -sS -X PUT http://localhost:8321/api/context/policies/routines/custom/<slug> \
|
|
31
31
|
-H 'Content-Type: application/json' \
|
|
32
32
|
-d @- <<'JSON'
|
|
33
33
|
{"content":"---\ntype: rule\nslug: <slug>\nprocess_key: routine.custom.<slug>\ncron: \"0 7 * * *\"\nbackend_tier: light\nmax_budget_usd: 0.20\nenabled: true\n---\n# <Title>\n\n## Checks\n\n### <step label>\n**Action**: …\n"}
|
|
@@ -52,7 +52,7 @@ line, write a short summary in `origin` and put the verbatim quote in
|
|
|
52
52
|
a body section called `## Captured From`.
|
|
53
53
|
|
|
54
54
|
```bash
|
|
55
|
-
curl -sS -X PUT http://localhost:8321/api/context/
|
|
55
|
+
curl -sS -X PUT http://localhost:8321/api/context/policies/management-captures/<slug> \
|
|
56
56
|
-H 'Content-Type: application/json' \
|
|
57
57
|
-d @- <<'JSON'
|
|
58
58
|
{"content":"---\ntype: rule\nkind: policy\nowner: agent\nupdated: 2026-04-24\nslug: <slug>\nstatus: active\ncreated_at: 2026-04-24\ncreated_via: dm\norigin: \"User DM 2026-04-24T14:30Z: <one-line summary or short quote>\"\nlinked:\n routine: <slug>\n dossier: <topic>\ntemplate_version: 1\n---\n# <Title>\n\n## Why\n<one short paragraph>\n\n## How\n1. …\n\n## Source of Truth\n- Authoritative: …\n- Local cache: dossiers/<topic>.md\n\n## Captured From\n> <verbatim DM quote, only when too long for the origin line>\n\n## Notes\n- …\n"}
|
|
@@ -62,7 +62,7 @@ JSON
|
|
|
62
62
|
The global FS-watch reconciler picks this up within ~1 s and the
|
|
63
63
|
policy appears in `context-index.md` automatically. The policy-index
|
|
64
64
|
reconciler also fires on the same FS event (chained off the same
|
|
65
|
-
debounce), so `
|
|
65
|
+
debounce), so `policies/management-captures/_index.md` and `policies/management.md`'s
|
|
66
66
|
`## Active Policies` section refresh within ~10 s — no manual PATCH
|
|
67
67
|
needed.
|
|
68
68
|
|
|
@@ -76,14 +76,14 @@ reconciler can resolve them.
|
|
|
76
76
|
|
|
77
77
|
## 5.4 _(no manual step required)_
|
|
78
78
|
|
|
79
|
-
`
|
|
79
|
+
`policies/management-captures/_index.md` is auto-maintained by the daemon's
|
|
80
80
|
policy-index reconciler — it re-renders within ~10 s of step 5.3's
|
|
81
81
|
write. Same for the `## Active Policies` section in
|
|
82
|
-
`
|
|
82
|
+
`policies/management.md`. **Do not PATCH or PUT either path manually**;
|
|
83
83
|
doing so just races the reconciler and creates snapshot churn.
|
|
84
84
|
|
|
85
85
|
If you need to confirm the index is up to date before replying to the
|
|
86
|
-
user, GET `
|
|
86
|
+
user, GET `policies/management-captures/_index` after a short wait. The
|
|
87
87
|
reconciler's last-run record lives at `runtime_state` key
|
|
88
88
|
`reconciler.policy_index.last_run` for diagnostics.
|
|
89
89
|
|
|
@@ -91,8 +91,8 @@ reconciler's last-run record lives at `runtime_state` key
|
|
|
91
91
|
|
|
92
92
|
| Failure at | Roll back |
|
|
93
93
|
|---|---|
|
|
94
|
-
| 5.2 | undo 5.1
|
|
95
|
-
| 5.3 | undo 5.2 (PUT routines file back to `enabled: false` and the next reconcile clears the cron job; or `DELETE` if you created it new), then undo 5.1 as above |
|
|
94
|
+
| 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 (PUT routines file back to `enabled: false` and the next reconcile clears the cron job; or `DELETE` if you created it new — `policies/routines/custom/*` is DELETE-whitelisted), then undo 5.1 as above |
|
|
96
96
|
| 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
97
|
|
|
98
98
|
If any rollback step itself fails, **report the partial state to the
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"kind": "knowledge_layout",
|
|
3
3
|
"files": [
|
|
4
4
|
{
|
|
5
|
-
"path": "
|
|
5
|
+
"path": "policies/management-captures/*.md",
|
|
6
6
|
"purpose": "Durable management policy capturing why a recurring rule exists, how it runs, and where data lands",
|
|
7
7
|
"sections": [
|
|
8
8
|
{ "heading": "## Why", "contains": "one short paragraph stating the motivation behind the policy" },
|
|
@@ -48,7 +48,7 @@ these in any language also fail the positive rule.
|
|
|
48
48
|
|
|
49
49
|
### No internal mechanism names
|
|
50
50
|
|
|
51
|
-
Never mention `today.md`, `
|
|
51
|
+
Never mention `state/today.md`, `identity/profile.md`, `plans/roadmap.md`, `## Agent
|
|
52
52
|
Plan`, `## Agent Log`, `## Handoff`, `did-not-fire`, "Morning
|
|
53
53
|
Routine", "Evening Review", "scheduled.task", "scheduled.dm",
|
|
54
54
|
"dm_session", "sub_flow", or any other internal mechanism in
|
|
@@ -71,7 +71,7 @@ rule above bars *introducing* such enumeration in any other surface.)
|
|
|
71
71
|
### Language and style
|
|
72
72
|
|
|
73
73
|
Output language: follow `<output_language_policy>`. Tone: follow
|
|
74
|
-
`
|
|
74
|
+
`identity/profile.md` Communication Style and the Character block in your
|
|
75
75
|
system prompt. Keep technical terms in original form.
|
|
76
76
|
|
|
77
77
|
### Compactness
|
|
@@ -91,13 +91,13 @@ Notify when **all three** are true: (1) **actionable** or requires awareness, (2
|
|
|
91
91
|
`[cal] ... — reminder sent` referencing the same item within the
|
|
92
92
|
last 4 hours. If the injected log is truncated (`[...N earlier
|
|
93
93
|
entries omitted ...]` marker) and you can't rule out a prior
|
|
94
|
-
notification, `GET /api/context/today` for the full log before
|
|
94
|
+
notification, `GET /api/context/state/today` for the full log before
|
|
95
95
|
firing. Duplicate notifications are the #1 cause of noise.
|
|
96
96
|
- **A pending Agent Plan row / scheduled DM is already set to fire
|
|
97
97
|
for this item within the next 2 hours** — let the planned channel
|
|
98
98
|
deliver; don't pre-empt it.
|
|
99
99
|
- **Quiet hours (default 22:00-08:00, configurable)** unless `critical` — schedule for after instead
|
|
100
|
-
- **
|
|
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
|
|
101
101
|
- **Routine file changes** or **agent internal state** — use Agent Log instead
|
|
102
102
|
- **When in doubt — prefer silence**
|
|
103
103
|
|
|
@@ -54,7 +54,12 @@ The agent CANNOT query `notification_log` directly (Approve-tier). Use
|
|
|
54
54
|
`<today>` `## Agent Log` as the authoritative dedup source (look for
|
|
55
55
|
`notify sent` / `DM sent` lines).
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
the
|
|
57
|
+
`/api/notify` does NOT report rate-limit or quiet-hours suppression
|
|
58
|
+
back to you — it returns `200 {status:"sent"}` even when the message is
|
|
59
|
+
silently dropped inside the delivery layer. A `"sent"` response is
|
|
60
|
+
therefore not proof the user saw it. Do NOT re-post the same item
|
|
61
|
+
hoping for delivery; self-throttle by scanning `<today>` `## Agent Log`
|
|
62
|
+
first and log `notify skipped (rate_limited)` when you choose to hold.
|
|
63
|
+
If the message is time-critical and the next opportunity arises,
|
|
64
|
+
upgrade to `high` (or `critical` if the situation has escalated)
|
|
65
|
+
rather than re-sending at the same level.
|
|
@@ -53,7 +53,7 @@ The daemon:
|
|
|
53
53
|
tool against the per-task allowed-tools envelope, validates the
|
|
54
54
|
final JSON against your `outputSchema`, returns it.
|
|
55
55
|
|
|
56
|
-
`outputSchema` is **required** (4 KB cap). Defaults: `maxToolCalls=
|
|
56
|
+
`outputSchema` is **required** (4 KB cap). Defaults: `maxToolCalls=8`,
|
|
57
57
|
`maxBudgetUsd=0.05`, `timeoutMs=60000`. Bump up to 15 / 0.50 / 300000
|
|
58
58
|
for genuinely larger intents.
|
|
59
59
|
|
|
@@ -48,7 +48,7 @@ The daemon:
|
|
|
48
48
|
tool against the per-task allowed-tools envelope, validates the
|
|
49
49
|
final JSON against your `outputSchema`, returns it.
|
|
50
50
|
|
|
51
|
-
`outputSchema` is **required** (4 KB cap). Defaults: `maxToolCalls=
|
|
51
|
+
`outputSchema` is **required** (4 KB cap). Defaults: `maxToolCalls=8`,
|
|
52
52
|
`maxBudgetUsd=0.05`, `timeoutMs=60000`. Bump up to 15 / 0.50 / 300000
|
|
53
53
|
for genuinely larger intents.
|
|
54
54
|
|
|
@@ -48,7 +48,7 @@ The daemon:
|
|
|
48
48
|
tool against the per-task allowed-tools envelope, validates the
|
|
49
49
|
final JSON against your `outputSchema`, returns it.
|
|
50
50
|
|
|
51
|
-
`outputSchema` is **required** (4 KB cap). Defaults: `maxToolCalls=
|
|
51
|
+
`outputSchema` is **required** (4 KB cap). Defaults: `maxToolCalls=8`,
|
|
52
52
|
`maxBudgetUsd=0.05`, `timeoutMs=60000`. Bump up to 15 / 0.50 / 300000
|
|
53
53
|
for genuinely larger intents.
|
|
54
54
|
|
|
@@ -11,12 +11,16 @@ allowed-tools:
|
|
|
11
11
|
> **Refusal directive — read first.** Notion is in `native` mode bound
|
|
12
12
|
> to Claude. Do **NOT** call any of:
|
|
13
13
|
>
|
|
14
|
-
> - `POST /api/integrations/notion/exec` (returns `
|
|
15
|
-
>
|
|
16
|
-
>
|
|
17
|
-
> - `/api/notion/query`, `/api/notion/search`, `/api/notion/pages`,
|
|
18
|
-
> `/api/notion/pages/<id>/content` (each route-prefix 410 in native
|
|
14
|
+
> - `POST /api/integrations/notion/exec` (returns `409 mode_mismatch`
|
|
15
|
+
> in native mode — this route is NOT route-gated and carries no
|
|
16
|
+
> `X-Integration-Mode` header; `/exec` only succeeds in `delegated`
|
|
19
17
|
> mode)
|
|
18
|
+
> - `POST /api/integrations/notion/reconcile` (not route-gated either;
|
|
19
|
+
> an LLM-issued notion reconcile returns `400 validation_error` on the
|
|
20
|
+
> window-key allowlist, which is calendar-only)
|
|
21
|
+
> - `/api/notion/query`, `/api/notion/search`, `/api/notion/pages`,
|
|
22
|
+
> `/api/notion/pages/<id>/content` (each route-prefix returns `410`
|
|
23
|
+
> with `X-Integration-Mode: native` — these ARE route-gated)
|
|
20
24
|
>
|
|
21
25
|
> Reach Notion through the in-session Notion connector your harness
|
|
22
26
|
> exposes. Your tool menu lists every available tool at session start
|
|
@@ -150,7 +154,7 @@ instead).
|
|
|
150
154
|
When `routine.hourly_check.native.claude.md`'s Step 0c fetches recent
|
|
151
155
|
Notion edits, POST each materialised page to `/api/observations`. The
|
|
152
156
|
daemon computes `contentHash` server-side via
|
|
153
|
-
`@
|
|
157
|
+
`@aitne/shared/observations-hash.ts`; pass `payload` verbatim.
|
|
154
158
|
|
|
155
159
|
**Batch when you have more than one page.** Use
|
|
156
160
|
`POST /api/observations/batch` with up to 200 items in one
|
|
@@ -11,11 +11,16 @@ allowed-tools:
|
|
|
11
11
|
> **Refusal directive — read first.** Notion is in `native` mode bound
|
|
12
12
|
> to Codex. Do **NOT** call any of:
|
|
13
13
|
>
|
|
14
|
-
> - `POST /api/integrations/notion/exec` (returns `
|
|
15
|
-
>
|
|
16
|
-
>
|
|
14
|
+
> - `POST /api/integrations/notion/exec` (returns `409 mode_mismatch`
|
|
15
|
+
> in native mode — this route is NOT route-gated and carries no
|
|
16
|
+
> `X-Integration-Mode` header; `/exec` only succeeds in `delegated`
|
|
17
|
+
> mode)
|
|
18
|
+
> - `POST /api/integrations/notion/reconcile` (not route-gated either;
|
|
19
|
+
> an LLM-issued notion reconcile returns `400 validation_error` on the
|
|
20
|
+
> window-key allowlist, which is calendar-only)
|
|
17
21
|
> - `/api/notion/query`, `/api/notion/search`, `/api/notion/pages`,
|
|
18
|
-
> `/api/notion/pages/<id>/content` (each route-prefix 410
|
|
22
|
+
> `/api/notion/pages/<id>/content` (each route-prefix returns `410`
|
|
23
|
+
> with `X-Integration-Mode: native` — these ARE route-gated)
|
|
19
24
|
>
|
|
20
25
|
> Reach Notion through the in-session Notion connector your harness
|
|
21
26
|
> exposes. Your tool menu lists every available tool at session start
|
|
@@ -11,11 +11,16 @@ allowed-tools:
|
|
|
11
11
|
> **Refusal directive — read first.** Notion is in `native` mode bound
|
|
12
12
|
> to Gemini. Do **NOT** call any of:
|
|
13
13
|
>
|
|
14
|
-
> - `POST /api/integrations/notion/exec` (returns `
|
|
15
|
-
>
|
|
16
|
-
>
|
|
14
|
+
> - `POST /api/integrations/notion/exec` (returns `409 mode_mismatch`
|
|
15
|
+
> in native mode — this route is NOT route-gated and carries no
|
|
16
|
+
> `X-Integration-Mode` header; `/exec` only succeeds in `delegated`
|
|
17
|
+
> mode)
|
|
18
|
+
> - `POST /api/integrations/notion/reconcile` (not route-gated either;
|
|
19
|
+
> an LLM-issued notion reconcile returns `400 validation_error` on the
|
|
20
|
+
> window-key allowlist, which is calendar-only)
|
|
17
21
|
> - `/api/notion/query`, `/api/notion/search`, `/api/notion/pages`,
|
|
18
|
-
> `/api/notion/pages/<id>/content` (each route-prefix 410
|
|
22
|
+
> `/api/notion/pages/<id>/content` (each route-prefix returns `410`
|
|
23
|
+
> with `X-Integration-Mode: native` — these ARE route-gated)
|
|
19
24
|
>
|
|
20
25
|
> Reach Notion through the in-session Notion connector your harness
|
|
21
26
|
> exposes (typically a user-installed Notion MCP server registered
|
|
@@ -17,8 +17,8 @@ Output language: write-ups inherit the destination file's policy via the `today`
|
|
|
17
17
|
2. Group related observations before acting.
|
|
18
18
|
3. For each group, apply the **fetch decision** (below) — `summary_text` + `novelty_score` are pre-computed by the daemon's per-observation summarizer; only `novelty_score >= 2` warrants full content fetch.
|
|
19
19
|
4. Decide actionability:
|
|
20
|
-
- Update `today.md` for TODOs, blockers, decisions, or deadlines
|
|
21
|
-
- Update `roadmap.md` or `projects/*.md` only for material project-state changes
|
|
20
|
+
- Update `state/today.md` for TODOs, blockers, decisions, or deadlines
|
|
21
|
+
- Update `plans/roadmap.md` or `projects/*.md` only for material project-state changes
|
|
22
22
|
- Schedule a wake-up if the observation implies a future reminder
|
|
23
23
|
5. Apply the smallest meaningful set of context updates.
|
|
24
24
|
6. Mark processed observations consumed via the bulk endpoint
|
|
@@ -138,6 +138,16 @@ that caps each curl invocation at one HTTP request and strips heredoc
|
|
|
138
138
|
bodies before URL validation. The batch endpoint resolves the
|
|
139
139
|
cardinality mismatch without weakening either hook.
|
|
140
140
|
|
|
141
|
+
> **If `mcp__aitne-observations__submit_observations` is in your allowed
|
|
142
|
+
> tools (the `routine.fetch_window` pre-pass on Claude), submit the batch
|
|
143
|
+
> through that MCP tool instead of the curl below.** The structured
|
|
144
|
+
> transport never goes through the SDK bash preflight, so Unicode-bearing
|
|
145
|
+
> payloads (NBSP/ZWS in subjects, U+3000 in titles) can't trip its
|
|
146
|
+
> `too-complex` gate and cascade to a denied curl / wasted retry /
|
|
147
|
+
> `budget-cap`. The tool input is the same `{"observations":[…]}` envelope
|
|
148
|
+
> and the response is identical. The curl form below is the fallback for
|
|
149
|
+
> sessions without the MCP tool (the hourly check, Codex/Gemini).
|
|
150
|
+
|
|
141
151
|
```bash
|
|
142
152
|
curl -s -X POST http://localhost:8321/api/observations/batch \
|
|
143
153
|
-H 'Content-Type: application/json' \
|
|
@@ -190,8 +200,8 @@ Hard limits:
|
|
|
190
200
|
### POST /api/observations/consume
|
|
191
201
|
|
|
192
202
|
Marks one or more observations consumed. **Bulk-only** — there is no
|
|
193
|
-
per-id endpoint (`POST /api/observations/<id>/consume` returns
|
|
194
|
-
Always use this shape, even for a single id.
|
|
203
|
+
per-id endpoint (`POST /api/observations/<id>/consume` returns 405
|
|
204
|
+
`use_bulk_endpoint`). Always use this shape, even for a single id.
|
|
195
205
|
|
|
196
206
|
Copy the `correlationId` value verbatim from the
|
|
197
207
|
`<event_correlation_id>…</event_correlation_id>` tag in your turn
|
|
@@ -230,7 +240,9 @@ you to.**
|
|
|
230
240
|
|
|
231
241
|
### GET /api/observations/stats
|
|
232
242
|
|
|
233
|
-
`curl -s http://localhost:8321/api/observations/stats` → `{ "
|
|
243
|
+
`curl -s http://localhost:8321/api/observations/stats` → `{ "totalPending", "oldestPendingObservedAt", "bySource": [{ "source", "pendingCount", "oldestObservedAt" }], "summaryStatusCounts": {...}, "noveltyDistribution": [...] }`
|
|
244
|
+
|
|
245
|
+
`totalPending` is the single count of unconsumed observations (no separate `total` / `pending` keys). `bySource` is an **array** of per-source rows, not a map. There is no `byActor`. `summaryStatusCounts` / `noveltyDistribution` are summarizer-health telemetry.
|
|
234
246
|
|
|
235
247
|
---
|
|
236
248
|
|
|
@@ -267,7 +279,10 @@ current state.
|
|
|
267
279
|
|
|
268
280
|
<!-- mode:direct:notion -->
|
|
269
281
|
```bash
|
|
270
|
-
|
|
282
|
+
# ?database= takes a database LABEL (default "tasks"), not a UUID.
|
|
283
|
+
# An unrecognized label returns 404 notion.database_not_found with the
|
|
284
|
+
# list of valid labels; an absent param silently uses "tasks".
|
|
285
|
+
curl -s "http://localhost:8321/api/notion/query?database=tasks"
|
|
271
286
|
```
|
|
272
287
|
<!-- /mode:direct:notion -->
|
|
273
288
|
<!-- mode:delegated-same:notion -->
|
|
@@ -331,8 +346,9 @@ names and the canonical search / fetch call shapes. Resolve
|
|
|
331
346
|
`<databaseId>` first via the un-gated config dump
|
|
332
347
|
(`curl -s http://localhost:8321/api/notion/databases`) and pass the
|
|
333
348
|
UUID to the connector's data-source / search tool. Do NOT call
|
|
334
|
-
`/api/notion/*` (410) or `/api/integrations/notion/exec` (
|
|
335
|
-
in native mode
|
|
349
|
+
`/api/notion/*` (410) or `/api/integrations/notion/exec` (returns 409
|
|
350
|
+
`mode_mismatch` in native mode — the `/exec` path is not route-gated,
|
|
351
|
+
so it is the handler, not the 410 gate, that rejects it).
|
|
336
352
|
<!-- /mode:native:notion -->
|
|
337
353
|
<!-- mode:disabled:notion -->
|
|
338
354
|
Notion is disabled — there is no live source. Treat the observation
|
|
@@ -28,7 +28,7 @@ carries (project keeps `## Lifecycle Phases`, repo-only stays light).
|
|
|
28
28
|
## Hard rules
|
|
29
29
|
|
|
30
30
|
- Write only through `/api/context/*`. Never edit files directly on disk.
|
|
31
|
-
- Do not modify `today.md`, `roadmap.md`, `user/*`, `rules/*`, or
|
|
31
|
+
- Do not modify `state/today.md`, `plans/roadmap.md`, `user/*`, `rules/*`, or
|
|
32
32
|
unrelated context files.
|
|
33
33
|
- Preserve valid frontmatter. The overview file uses `type: git-project`,
|
|
34
34
|
the journal file uses `type: git-journal`. Both carry an ISO `updated`
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"kind": "knowledge_layout",
|
|
7
7
|
"anchor": "<!-- CURATION:knowledge_layout id=\"project-shape\" -->",
|
|
8
8
|
"human_label": "Project / git-repo file shape",
|
|
9
|
-
"description": "Required sections in
|
|
10
|
-
"scope_paths": ["projects/*.md", "git
|
|
9
|
+
"description": "Required sections in git/<slug>/overview.md (git-managed repos) and projects/*.md (non-git manual projects), and what each section holds",
|
|
10
|
+
"scope_paths": ["projects/*.md", "git/*/overview.md"]
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"id": "slug-grammar",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"anchor": "<!-- CURATION:convention_notes id=\"slug-grammar\" -->",
|
|
16
16
|
"human_label": "Project slug grammar",
|
|
17
17
|
"description": "Slug format, length cap, reserved stems",
|
|
18
|
-
"scope_paths": ["projects/*.md", "git
|
|
18
|
+
"scope_paths": ["projects/*.md", "git/*/overview.md"]
|
|
19
19
|
}
|
|
20
20
|
]
|
|
21
21
|
}
|
|
@@ -14,11 +14,14 @@
|
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
|
-
"path": "git
|
|
18
|
-
"purpose": "Per-repository
|
|
17
|
+
"path": "git/*/overview.md",
|
|
18
|
+
"purpose": "Per-repository overview for every git-managed repo (replaces the retired git-repos/*.md layout)",
|
|
19
19
|
"sections": [
|
|
20
|
-
{ "heading": "##
|
|
21
|
-
{ "heading": "##
|
|
20
|
+
{ "heading": "## Summary", "contains": "one-paragraph description of the repo and its current state" },
|
|
21
|
+
{ "heading": "## Architecture", "contains": "structural notes on the repo's layout and components" },
|
|
22
|
+
{ "heading": "## Notable Changes", "contains": "human-readable notes on important commits or decisions" },
|
|
23
|
+
{ "heading": "## Open Threads", "contains": "manual prose; follow-ups and pending questions, preserved verbatim" },
|
|
24
|
+
{ "heading": "## Daily Activity Log", "contains": "rolling 30-day window of summarised activity" }
|
|
22
25
|
]
|
|
23
26
|
}
|
|
24
27
|
]
|
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
{
|
|
5
5
|
"topic": "Slug format",
|
|
6
6
|
"rule": "Project and repo slugs are kebab-case, lowercase letters with hyphens between words.",
|
|
7
|
-
"example": "projects/cost-explorer.md, git
|
|
7
|
+
"example": "plans/projects/cost-explorer.md, git/personal-agent/overview.md"
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
"topic": "Slug length",
|
|
11
11
|
"rule": "Slugs are 32 characters or fewer, including the hyphens but excluding the .md suffix.",
|
|
12
|
-
"example": "projects/personal-agent-skills.md is at the upper bound"
|
|
12
|
+
"example": "plans/projects/personal-agent-skills.md is at the upper bound"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"topic": "Reserved stems",
|
|
16
16
|
"rule": "Stems _index and _archive are reserved for daemon-maintained files and not in use as project slugs.",
|
|
17
|
-
"example": "projects/_index.md is a directory listing, not a project file"
|
|
17
|
+
"example": "plans/projects/_index.md is a directory listing, not a project file"
|
|
18
18
|
}
|
|
19
19
|
]
|
|
20
20
|
}
|
|
@@ -156,9 +156,19 @@ Response:
|
|
|
156
156
|
|
|
157
157
|
Update book status, rating, or notes.
|
|
158
158
|
|
|
159
|
+
**Approve tier (Bearer required).** This is an operator/dashboard-gated
|
|
160
|
+
write — an autonomous agent curl from a session workdir carries no
|
|
161
|
+
`Authorization: Bearer` header and will be rejected with **401** before
|
|
162
|
+
the handler runs. Do NOT call this autonomously and do NOT assume the
|
|
163
|
+
update landed; book status/rating/notes corrections are made by the user
|
|
164
|
+
via the dashboard. (Body shape, for reference: `status` enum
|
|
165
|
+
`reading|completed|abandoned`, `rating` 1-5, `notes`.)
|
|
166
|
+
|
|
159
167
|
```bash
|
|
168
|
+
# Operator/dashboard-only — requires Authorization: Bearer (Approve tier).
|
|
160
169
|
curl -s -X PATCH "http://localhost:8321/api/books/1" \
|
|
161
170
|
-H "Content-Type: application/json" \
|
|
171
|
+
-H "Authorization: Bearer <operator-token>" \
|
|
162
172
|
-d '{"status": "completed", "rating": 4}'
|
|
163
173
|
```
|
|
164
174
|
|
|
@@ -146,12 +146,12 @@ the sweep to write the refreshed metadata and YAML `updated` date.
|
|
|
146
146
|
|
|
147
147
|
### First-write registration (_index.md)
|
|
148
148
|
|
|
149
|
-
The `
|
|
149
|
+
The `identity/_index.md` file indexes available topic files. When
|
|
150
150
|
creating `reading-taste.md` for the first time (GET returned 404),
|
|
151
151
|
append a one-line entry to the index so other flows can discover it:
|
|
152
152
|
|
|
153
153
|
```bash
|
|
154
|
-
curl -s -X PATCH http://localhost:8321/api/context/
|
|
154
|
+
curl -s -X PATCH http://localhost:8321/api/context/identity/_index \
|
|
155
155
|
-H 'Content-Type: application/json' \
|
|
156
156
|
-d '{"section": "topics", "mode": "append", "content": "- reading-taste — derived taste profile + rolling book candidates (updated weekly)"}'
|
|
157
157
|
```
|
|
@@ -10,11 +10,11 @@ allowed-tools:
|
|
|
10
10
|
|
|
11
11
|
Output language: roadmap.md is Policy B — see `<output_language_policy>`. Section headers stay English skeleton; items, narrative, and preparation-timeline prose are in `<settings primary_language>`. Preserve user-customized headers verbatim.
|
|
12
12
|
|
|
13
|
-
`roadmap.md` is the single source of truth for **long-horizon user
|
|
14
|
-
intent** — everything that does not belong in `today.md`. It aggregates
|
|
13
|
+
`plans/roadmap.md` is the single source of truth for **long-horizon user
|
|
14
|
+
intent** — everything that does not belong in `state/today.md`. It aggregates
|
|
15
15
|
Calendar events, pending `agent_schedule` rows, DM-captured intent,
|
|
16
16
|
mail-derived bookings, reading goals, and observations; Morning Routine
|
|
17
|
-
consumes it to shape `today.md`.
|
|
17
|
+
consumes it to shape `state/today.md`.
|
|
18
18
|
|
|
19
19
|
## Section schema
|
|
20
20
|
|
|
@@ -117,9 +117,9 @@ must carry a daemon-minted HTML comment ID:
|
|
|
117
117
|
- The `YYYYMMDD` segment is the entry creation date / Source date, not
|
|
118
118
|
the event date. Keep it stable when dates are refined.
|
|
119
119
|
- Do not invent IDs in prose. Before adding a new roadmap entry, call
|
|
120
|
-
`POST /api/context/roadmap/id`:
|
|
120
|
+
`POST /api/context/plans/roadmap/id`:
|
|
121
121
|
```bash
|
|
122
|
-
curl -s -X POST http://localhost:8321/api/context/roadmap/id \
|
|
122
|
+
curl -s -X POST http://localhost:8321/api/context/plans/roadmap/id \
|
|
123
123
|
-H 'Content-Type: application/json' \
|
|
124
124
|
-d '{"creationDate": "YYYY-MM-DD"}'
|
|
125
125
|
```
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"anchor": "<!-- CURATION:knowledge_layout id=\"entry-types\" -->",
|
|
8
8
|
"human_label": "Roadmap section schema",
|
|
9
9
|
"description": "Required sections in roadmap.md and what each holds",
|
|
10
|
-
"scope_paths": ["roadmap.md"]
|
|
10
|
+
"scope_paths": ["plans/roadmap.md"]
|
|
11
11
|
}
|
|
12
12
|
]
|
|
13
13
|
}
|