@aitne-sh/aitne 0.1.7 → 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 +256 -833
- package/agent-assets/agent-profiles/_safety.md +52 -20
- 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 +3 -3
- package/agent-assets/agent-profiles/routine-fetch-window.md +30 -19
- package/agent-assets/agent-profiles/routine.md +4 -3
- 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 +18 -11
- package/agent-assets/docs/concepts/auth-health.md +56 -10
- package/agent-assets/docs/concepts/backends-and-tiers.md +110 -41
- package/agent-assets/docs/concepts/costs-and-quotas.md +74 -19
- package/agent-assets/docs/concepts/delegated-mode.md +193 -75
- package/agent-assets/docs/concepts/memory-model.md +79 -34
- package/agent-assets/docs/concepts/observations.md +61 -11
- package/agent-assets/docs/concepts/process-keys.md +66 -17
- package/agent-assets/docs/concepts/routines.md +77 -32
- package/agent-assets/docs/concepts/safety-and-execution.md +50 -21
- package/agent-assets/docs/concepts/safety-model.md +62 -37
- package/agent-assets/docs/concepts/skills.md +38 -17
- package/agent-assets/docs/features/integrations/browser-history.md +195 -0
- package/agent-assets/docs/features/integrations/calendar.md +40 -30
- package/agent-assets/docs/features/integrations/git.md +20 -9
- package/agent-assets/docs/features/integrations/github.md +93 -35
- package/agent-assets/docs/features/integrations/mail.md +60 -17
- package/agent-assets/docs/features/integrations/notion.md +51 -11
- package/agent-assets/docs/features/integrations/obsidian.md +35 -7
- package/agent-assets/docs/features/lifestyle/git.md +45 -44
- package/agent-assets/docs/features/lifestyle/reading.md +50 -22
- package/agent-assets/docs/features/lifestyle/receipts.md +66 -21
- package/agent-assets/docs/features/lifestyle/travel-bookings.md +91 -14
- package/agent-assets/docs/features/memory-files/agent-journal.md +111 -50
- package/agent-assets/docs/features/memory-files/projects.md +75 -15
- package/agent-assets/docs/features/memory-files/roadmap.md +55 -10
- package/agent-assets/docs/features/memory-files/schedule.md +113 -70
- package/agent-assets/docs/features/memory-files/today.md +47 -21
- package/agent-assets/docs/features/memory-files/user-profile.md +67 -31
- package/agent-assets/docs/features/messaging/bang-commands.md +115 -28
- package/agent-assets/docs/features/messaging/dashboard-chat.md +43 -21
- package/agent-assets/docs/features/messaging/discord.md +46 -4
- package/agent-assets/docs/features/messaging/overview.md +40 -19
- package/agent-assets/docs/features/messaging/pairing-and-magic-phrase.md +94 -27
- package/agent-assets/docs/features/messaging/slack.md +79 -14
- package/agent-assets/docs/features/messaging/telegram.md +25 -6
- package/agent-assets/docs/features/messaging/whatsapp.md +79 -14
- package/agent-assets/docs/features/operations/activity-and-conversations.md +45 -16
- package/agent-assets/docs/features/operations/approvals.md +53 -15
- package/agent-assets/docs/features/operations/backend-routing.md +75 -16
- package/agent-assets/docs/features/operations/cost-tracking.md +90 -17
- package/agent-assets/docs/features/operations/managed-chromium.md +221 -0
- package/agent-assets/docs/features/operations/notifications.md +58 -11
- package/agent-assets/docs/features/operations/quiet-hours.md +63 -40
- package/agent-assets/docs/features/operations/schedule-approaching.md +59 -16
- package/agent-assets/docs/features/routines/custom-routines.md +97 -23
- package/agent-assets/docs/features/routines/evening-review.md +75 -22
- package/agent-assets/docs/features/routines/hourly-check.md +150 -30
- package/agent-assets/docs/features/routines/morning-routine.md +60 -33
- package/agent-assets/docs/features/routines/weekly-review.md +65 -20
- package/agent-assets/docs/features/wiki/commands.md +37 -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 +80 -12
- 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 +64 -32
- package/agent-assets/docs/getting-started/02-first-steps.md +28 -10
- package/agent-assets/docs/getting-started/03-what-can-this-do.md +42 -21
- package/agent-assets/docs/getting-started/04-first-day.md +52 -20
- package/agent-assets/docs/glossary.md +285 -21
- package/agent-assets/docs/guides/add-a-custom-routine.md +74 -22
- package/agent-assets/docs/guides/backup-and-restore.md +92 -14
- package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +62 -25
- package/agent-assets/docs/guides/build-your-wiki.md +33 -6
- package/agent-assets/docs/guides/change-which-model-handles-x.md +70 -9
- package/agent-assets/docs/guides/connect-a-new-mail-account.md +80 -15
- package/agent-assets/docs/guides/explore-with-trace-and-connect.md +32 -9
- package/agent-assets/docs/guides/import-knowledge-file.md +60 -39
- package/agent-assets/docs/guides/install-and-run.md +64 -19
- package/agent-assets/docs/guides/maintain-wiki-health.md +41 -10
- package/agent-assets/docs/guides/migrate-machines.md +86 -18
- package/agent-assets/docs/guides/multiple-wikis-for-multiple-domains.md +119 -59
- package/agent-assets/docs/guides/pause-the-agent.md +71 -22
- package/agent-assets/docs/guides/reinstall-cleanly.md +102 -17
- package/agent-assets/docs/guides/setup-wizard.md +126 -56
- package/agent-assets/docs/guides/switch-default-backend.md +72 -17
- package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +31 -10
- package/agent-assets/docs/reference/api.md +162 -23
- package/agent-assets/docs/reference/cli-commands.md +55 -15
- package/agent-assets/docs/reference/config.md +246 -39
- package/agent-assets/docs/reference/disallowed-tools.md +42 -10
- package/agent-assets/docs/reference/keyboard-shortcuts.md +47 -10
- package/agent-assets/docs/reference/knowledge-layout.md +620 -0
- package/agent-assets/docs/reference/process-keys.md +126 -20
- package/agent-assets/docs/reference/skills.md +62 -18
- package/agent-assets/docs/troubleshooting/auth-failed.md +53 -19
- package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +96 -22
- package/agent-assets/docs/troubleshooting/fallback-keeps-firing.md +94 -20
- package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +77 -22
- package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +87 -22
- package/agent-assets/docs/troubleshooting/observation-not-detected.md +85 -21
- package/agent-assets/docs/troubleshooting/quota-exhausted.md +36 -6
- package/agent-assets/docs/troubleshooting/wiki-ingest-full-blocked.md +128 -51
- package/agent-assets/docs/troubleshooting/wiki-write-failed.md +33 -11
- 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 +2 -2
- 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 +122 -0
- package/agent-assets/skills/agent-create/SKILL.md +149 -0
- package/agent-assets/skills/attach/SKILL.md +3 -4
- 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 +45 -463
- package/agent-assets/skills/context/curation.json +2 -2
- package/agent-assets/skills/context/references/api.md +232 -0
- package/agent-assets/skills/context/references/required-frontmatter.md +73 -0
- package/agent-assets/skills/context/references/snapshot-files.md +103 -0
- package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +4 -4
- package/agent-assets/skills/docs-search/SKILL.md +17 -16
- package/agent-assets/skills/external-services/SKILL.delegated.claude.md +14 -26
- package/agent-assets/skills/external-services/SKILL.delegated.codex.md +14 -26
- package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +14 -26
- package/agent-assets/skills/external-services/SKILL.md +9 -262
- package/agent-assets/skills/external-services/SKILL.native.claude.md +6 -7
- package/agent-assets/skills/external-services/SKILL.native.codex.md +8 -9
- package/agent-assets/skills/external-services/SKILL.native.gemini.md +5 -6
- package/agent-assets/skills/external-services/references/calendar-apple.md +97 -0
- package/agent-assets/skills/external-services/references/calendar-google.md +72 -0
- package/agent-assets/skills/external-services/references/calendar-outlook.md +36 -0
- package/agent-assets/skills/external-services/references/github.md +17 -0
- package/agent-assets/skills/external-services/references/obsidian.md +49 -0
- package/agent-assets/skills/external-services/references/skills-crud.md +27 -0
- package/agent-assets/skills/gmail-lifestyle/SKILL.md +151 -0
- package/agent-assets/skills/gmail-lifestyle/references/receipts-api.md +93 -0
- package/agent-assets/skills/gmail-lifestyle/references/travel-bookings-api.md +75 -0
- package/agent-assets/skills/mail/SKILL.delegated.claude.md +15 -6
- package/agent-assets/skills/mail/SKILL.delegated.codex.md +9 -5
- package/agent-assets/skills/mail/SKILL.delegated.gemini.md +9 -5
- package/agent-assets/skills/mail/SKILL.md +9 -114
- package/agent-assets/skills/mail/SKILL.native.claude.md +1 -1
- package/agent-assets/skills/mail/SKILL.native.codex.md +1 -1
- package/agent-assets/skills/mail/SKILL.native.gemini.md +1 -1
- package/agent-assets/skills/mail/references/api.md +110 -0
- package/agent-assets/skills/mail/references/examples.md +70 -0
- package/agent-assets/skills/mail/references/providers.md +8 -8
- package/agent-assets/skills/managed-tasks/SKILL.md +472 -0
- package/agent-assets/skills/managed-tasks/references/errors.md +73 -0
- package/agent-assets/skills/managed-tasks/references/output-path.md +75 -0
- package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +86 -0
- package/agent-assets/skills/management-policy/SKILL.md +54 -125
- package/agent-assets/skills/management-policy/curation.json +1 -1
- package/agent-assets/skills/management-policy/references/policy-workflow.md +101 -0
- package/agent-assets/skills/management-policy/seeds/policy-file-shape.seed.json +1 -1
- package/agent-assets/skills/notify/SKILL.md +10 -82
- package/agent-assets/skills/notify/references/priority.md +65 -0
- package/agent-assets/skills/notion/SKILL.delegated.claude.md +2 -2
- package/agent-assets/skills/notion/SKILL.delegated.codex.md +2 -2
- package/agent-assets/skills/notion/SKILL.delegated.gemini.md +2 -2
- package/agent-assets/skills/notion/SKILL.md +6 -10
- package/agent-assets/skills/notion/SKILL.native.claude.md +11 -8
- package/agent-assets/skills/notion/SKILL.native.codex.md +10 -6
- package/agent-assets/skills/notion/SKILL.native.gemini.md +10 -6
- package/agent-assets/skills/observations/SKILL.md +25 -14
- package/agent-assets/skills/project-doc/SKILL.md +2 -6
- 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 +12 -2
- package/agent-assets/skills/reading/references/reading-taste.md +2 -2
- package/agent-assets/skills/roadmap/SKILL.md +43 -141
- package/agent-assets/skills/roadmap/curation.json +1 -1
- package/agent-assets/skills/roadmap/references/api.md +100 -0
- package/agent-assets/skills/roadmap/references/cross-check.md +80 -0
- package/agent-assets/skills/roadmap/references/migration.md +56 -0
- package/agent-assets/skills/roadmap/references/preparation-timeline.md +2 -2
- package/agent-assets/skills/roadmap/seeds/entry-types.seed.json +1 -1
- package/agent-assets/skills/schedule/SKILL.md +76 -104
- package/agent-assets/skills/schedule/references/batch.md +93 -0
- package/agent-assets/skills/schedule/references/errors.md +217 -0
- package/agent-assets/skills/schedule/references/model-selection.md +96 -0
- package/agent-assets/skills/schedule/references/recurrence-rule.md +86 -0
- package/agent-assets/skills/scheduled-managed-task/SKILL.md +59 -51
- package/agent-assets/skills/today/SKILL.md +32 -62
- package/agent-assets/skills/today/curation.json +3 -3
- package/agent-assets/skills/today/references/agent-plan-lifecycle.md +114 -0
- package/agent-assets/skills/today/seeds/section-shape.seed.json +1 -1
- package/agent-assets/skills/user-interview/SKILL.md +23 -67
- package/agent-assets/skills/user-interview/references/op-briefing.md +51 -0
- package/agent-assets/skills/user-interview/references/op-morning.md +59 -0
- package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +9 -1
- package/agent-assets/skills/user-profile/SKILL.md +54 -74
- package/agent-assets/skills/user-profile/curation.json +2 -2
- package/agent-assets/skills/user-profile/references/character-preferences.md +83 -0
- package/agent-assets/skills/user-profile/seeds/routing-table.seed.json +8 -8
- package/agent-assets/skills/user-profile/seeds/topic-files.seed.json +30 -2
- package/agent-assets/skills/wiki/wiki-ask/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-compile/SKILL.md +4 -5
- package/agent-assets/skills/wiki/wiki-connect/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-graduate/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-ingest/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-lint/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-trace/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-vault-rules/SKILL.md +0 -1
- package/agent-assets/system-prompts/routine-fetch-window.md +78 -0
- package/agent-assets/system-prompts/skill-index-instruction.md +26 -0
- package/agent-assets/task-flows/_partials/calendar-acquire.google_calendar.md +20 -11
- package/agent-assets/task-flows/_partials/calendar-acquire.outlook_calendar.md +18 -9
- package/agent-assets/task-flows/_partials/capture-user-info.md +24 -0
- package/agent-assets/task-flows/_partials/confirm-subflow.md +68 -0
- package/agent-assets/task-flows/_partials/dm-intent.long-horizon.md +35 -0
- package/agent-assets/task-flows/_partials/dm-intent.project.md +391 -0
- package/agent-assets/task-flows/_partials/mail-acquire.gmail.md +20 -11
- package/agent-assets/task-flows/_partials/mail-acquire.outlook_mail.md +18 -9
- package/agent-assets/task-flows/_partials/notion-acquire.notion.md +26 -15
- 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 +15 -15
- package/agent-assets/task-flows/message.received.dm.md +20 -17
- package/agent-assets/task-flows/message.received.dm_first.md +11 -15
- package/agent-assets/task-flows/routine.custom.md +6 -4
- package/agent-assets/task-flows/routine.evening_review.md +46 -170
- package/agent-assets/task-flows/routine.fetch_window.md +19 -14
- package/agent-assets/task-flows/routine.hourly_check.md +27 -15
- package/agent-assets/task-flows/routine.hourly_check.triage.md +1 -1
- package/agent-assets/task-flows/routine.monthly_review.md +67 -25
- package/agent-assets/task-flows/routine.morning_routine_journal.md +135 -0
- package/agent-assets/task-flows/routine.morning_routine_today.md +673 -0
- 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 +68 -23
- package/agent-assets/task-flows/routine.today_refresh.md +4 -4
- package/agent-assets/task-flows/routine.user_profile_sweep.md +19 -20
- package/agent-assets/task-flows/routine.weekly_review.md +370 -86
- package/agent-assets/task-flows/schedule.approaching.md +0 -1
- package/agent-assets/task-flows/scheduled.dm.md +13 -13
- package/agent-assets/task-flows/scheduled.task.md +9 -9
- package/agent-assets/task-flows/setup.initial.md +171 -251
- package/agent-assets/task-flows/setup.update.md +2 -2
- package/agent-assets/task-flows/wiki.ingest_url.md +1 -1
- 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/identity/expertise.md +9 -0
- package/agent-assets/templates/identity/goals.md +9 -0
- package/agent-assets/templates/identity/people.md +13 -0
- package/agent-assets/templates/identity/personal.md +9 -0
- package/agent-assets/templates/{user → identity}/profile.md +2 -2
- package/agent-assets/templates/identity/work.md +9 -0
- package/agent-assets/templates/{dossiers → knowledge/dossiers}/_index.md +2 -2
- 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/policies/journal-format.md +168 -0
- 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 +21 -5
- package/package.json +5 -4
- package/scripts/commands/doctor.mjs +63 -5
- package/scripts/commands/run-now.mjs +187 -0
- package/scripts/commands/verify.mjs +264 -0
- 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 -52
- package/agent-assets/docs/features/routines/monthly-review.md +0 -65
- package/agent-assets/skills/management-task-modify/SKILL.md +0 -203
- package/agent-assets/skills/management-task-register/SKILL.md +0 -330
- package/agent-assets/skills/management-task-stop/SKILL.md +0 -166
- package/agent-assets/skills/receipts/SKILL.md +0 -134
- package/agent-assets/skills/travel/SKILL.md +0 -132
- package/agent-assets/skills/travel-time/SKILL.md +0 -158
- package/agent-assets/task-flows/routine.morning_routine.md +0 -322
- package/agent-assets/task-flows/routine.morning_routine_initial.md +0 -204
- package/agent-assets/templates/context-index.md +0 -42
- package/agent-assets/templates/rules/_index.md +0 -19
- package/agent-assets/templates/rules/journal-format.md +0 -61
- package/agent-assets/templates/user/expertise.md +0 -7
- package/agent-assets/templates/user/goals.md +0 -7
- package/agent-assets/templates/user/people.md +0 -7
- package/agent-assets/templates/user/personal.md +0 -7
- package/agent-assets/templates/user/work.md +0 -7
- /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
|
@@ -3,49 +3,49 @@
|
|
|
3
3
|
"rules": [
|
|
4
4
|
{
|
|
5
5
|
"trigger_pattern": "user states identity or role (I'm a, I work at, my title is)",
|
|
6
|
-
"destination_path": "
|
|
6
|
+
"destination_path": "identity/profile.md",
|
|
7
7
|
"destination_section": "## Identity",
|
|
8
8
|
"destination_mode": "replace"
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"trigger_pattern": "user mentions a person they know with a name plus relationship",
|
|
12
|
-
"destination_path": "
|
|
12
|
+
"destination_path": "identity/people.md",
|
|
13
13
|
"destination_section": "## Family",
|
|
14
14
|
"destination_mode": "append_to_file"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"trigger_pattern": "user mentions a workplace specific (company, team, tech stack)",
|
|
18
|
-
"destination_path": "
|
|
18
|
+
"destination_path": "identity/work.md",
|
|
19
19
|
"destination_section": "## Stack",
|
|
20
20
|
"destination_mode": "append_to_file"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"trigger_pattern": "user describes hobbies, habits, health, or lifestyle facts",
|
|
24
|
-
"destination_path": "
|
|
24
|
+
"destination_path": "identity/personal.md",
|
|
25
25
|
"destination_section": "## Habits",
|
|
26
26
|
"destination_mode": "append_to_file"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"trigger_pattern": "user states a goal or learning target",
|
|
30
|
-
"destination_path": "
|
|
30
|
+
"destination_path": "identity/goals.md",
|
|
31
31
|
"destination_section": "## Learning",
|
|
32
32
|
"destination_mode": "append_to_file"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"trigger_pattern": "user states expertise level or tools they use habitually",
|
|
36
|
-
"destination_path": "
|
|
36
|
+
"destination_path": "identity/expertise.md",
|
|
37
37
|
"destination_section": "## Tools",
|
|
38
38
|
"destination_mode": "append_to_file"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"trigger_pattern": "user states a notification or day-type preference",
|
|
42
|
-
"destination_path": "
|
|
42
|
+
"destination_path": "identity/profile.md",
|
|
43
43
|
"destination_section": "## Notification Preferences",
|
|
44
44
|
"destination_mode": "replace"
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"trigger_pattern": "user reports a behavioral pattern the agent should adapt to",
|
|
48
|
-
"destination_path": "
|
|
48
|
+
"destination_path": "identity/profile.md",
|
|
49
49
|
"destination_section": "## Learned Context",
|
|
50
50
|
"destination_mode": "append"
|
|
51
51
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"kind": "knowledge_layout",
|
|
3
3
|
"files": [
|
|
4
4
|
{
|
|
5
|
-
"path": "
|
|
5
|
+
"path": "identity/profile.md",
|
|
6
6
|
"purpose": "identity, preferences, learned context",
|
|
7
7
|
"sections": [
|
|
8
8
|
{ "heading": "## Identity", "contains": "name, role, time zone" },
|
|
@@ -15,13 +15,41 @@
|
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
"path": "
|
|
18
|
+
"path": "identity/people.md",
|
|
19
19
|
"purpose": "people the user knows",
|
|
20
20
|
"sections": [
|
|
21
21
|
{ "heading": "## Family", "contains": "household members" },
|
|
22
22
|
{ "heading": "## Colleagues", "contains": "current and recent coworkers" },
|
|
23
23
|
{ "heading": "## Friends", "contains": "social ties" }
|
|
24
24
|
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "identity/work.md",
|
|
28
|
+
"purpose": "workplace, team, tech stack",
|
|
29
|
+
"sections": [
|
|
30
|
+
{ "heading": "## Stack", "contains": "tools, languages, services used at work" }
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"path": "identity/expertise.md",
|
|
35
|
+
"purpose": "domains, tools, skill levels",
|
|
36
|
+
"sections": [
|
|
37
|
+
{ "heading": "## Tools", "contains": "tools the user uses habitually" }
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"path": "identity/personal.md",
|
|
42
|
+
"purpose": "hobbies, health, habits",
|
|
43
|
+
"sections": [
|
|
44
|
+
{ "heading": "## Habits", "contains": "routines, lifestyle, health" }
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"path": "identity/goals.md",
|
|
49
|
+
"purpose": "developmental goals and learning targets",
|
|
50
|
+
"sections": [
|
|
51
|
+
{ "heading": "## Learning", "contains": "skills the user wants to build" }
|
|
52
|
+
]
|
|
25
53
|
}
|
|
26
54
|
]
|
|
27
55
|
}
|
|
@@ -3,7 +3,6 @@ name: wiki-compile
|
|
|
3
3
|
description: Load for wiki.compile. Synthesizes 10_raw notes into 20_wiki notes via the daemon Wiki API and updates the wiki index.
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Bash(curl *)
|
|
6
|
-
- Bash(jq *)
|
|
7
6
|
---
|
|
8
7
|
|
|
9
8
|
# Wiki Compile
|
|
@@ -30,7 +29,7 @@ Therefore:
|
|
|
30
29
|
| `GET` | `/api/wiki/{{workspace_name}}/search?q=<query>` | Body-substring search for duplicate detection. |
|
|
31
30
|
| `GET` | `/api/wiki/{{workspace_name}}/files/<path>` | Read raw notes, existing wiki notes, taxonomy, log. |
|
|
32
31
|
| `POST` | `/api/wiki/{{workspace_name}}/files/20_wiki/<slug>.md` | Create a new wiki note. |
|
|
33
|
-
| `
|
|
32
|
+
| `POST` | `/api/wiki/{{workspace_name}}/files/20_wiki/<slug>.md` | Rewrite an existing wiki note — re-POST to the same path overwrites in place (a `.snapshots/` backup is taken first). |
|
|
34
33
|
| `PATCH` | `/api/wiki/{{workspace_name}}/files/20_wiki/_index.md` | Append a new wiki note's entry (`mode: "append"`). |
|
|
35
34
|
| `PATCH` | `/api/wiki/{{workspace_name}}/files/log.md` | Append the per-run summary (`mode: "append"`). |
|
|
36
35
|
|
|
@@ -53,7 +52,7 @@ Every request must include `-H 'x-process-key: wiki.compile'`. The `wiki-vault-r
|
|
|
53
52
|
- Use `90_meta/taxonomy.md` for canonical slugs.
|
|
54
53
|
- Preserve source URLs and quoted passages verbatim. Mark conflicts and unknowns explicitly.
|
|
55
54
|
- Each note's frontmatter MUST list every source raw under a `sources:` array and the synthesis date under `compiled_at:`.
|
|
56
|
-
- Write via `POST`
|
|
55
|
+
- Write via `POST` for both new and existing slugs — re-POSTing to an existing `20_wiki/<slug>.md` overwrites it in place (the daemon snapshots the prior version to `.snapshots/` first). Read-before-write any slug you overwrite so you preserve material that the new raws didn't cover. (`PATCH` on `20_wiki/<slug>.md` only supports `mode: "append"` / `"prepend"` — there is no `replace` mode.)
|
|
57
56
|
6. **Append `20_wiki/_index.md`** with one bullet per newly created or modified wiki note (`PATCH mode: "append"`). Skip notes that were unchanged.
|
|
58
57
|
7. **Append `log.md`** with one operational line summarising the run: `[<ISO>] wiki.compile (<mode>): compiled <N> notes from <M> raws — added <A>, updated <B>, unchanged <C>`.
|
|
59
58
|
|
|
@@ -99,7 +98,7 @@ Inside `<<'JSON'` (single-quoted marker) the body is verbatim — only JSON's ow
|
|
|
99
98
|
- `curl ... -d @/some/path` — `@<filepath>` is blocked by the security hook and the shim. The only acceptable `@…` value is the literal stdin marker `@-`.
|
|
100
99
|
- `curl http://example.com/...` (non-loopback) — only `http://localhost:8321/api/*` is permitted.
|
|
101
100
|
- POST to a non-existent path (`/api/send-message`, `/api/notify-user`, `/api/dm`, etc.) — not daemon routes; calls return 401/404 and DO NOT notify anyone. Your completion DM (final assistant text) is what the daemon forwards.
|
|
102
|
-
-
|
|
101
|
+
- Assuming POST to `/api/wiki/.../20_wiki/<slug>.md` is create-only — it is NOT. Re-POSTing to an existing `20_wiki/<slug>.md` overwrites it in place (with a `.snapshots/` backup first); the `wiki` layer has no create-only guard. The `409 append_only` guard only fires for the `10_raw/` and `log.md` layers. There is no `PATCH mode: "replace"` — PATCH only supports `append` / `prepend`.
|
|
103
102
|
|
|
104
103
|
## Common error codes
|
|
105
104
|
|
|
@@ -109,7 +108,7 @@ Inside `<<'JSON'` (single-quoted marker) the body is verbatim — only JSON's ow
|
|
|
109
108
|
| 400 | `invalid_path` / `invalid_layer` | Slug shape or layer prefix rejected | Path must be exactly `20_wiki/<slug>.md`. Slug matches `^[a-z0-9][a-z0-9-]*$`. |
|
|
110
109
|
| 403 | `missing_process_key` | Header missing | Add `-H 'x-process-key: wiki.compile'`. |
|
|
111
110
|
| 403 | `wiki_write_denied` | Trying to write outside `20_wiki/` (or the `_index.md` / `log.md` exceptions) under `wiki.compile` | Fix the target path. Use `wiki-graduate` for inbox-to-wiki promotion (same process key, different source layer). |
|
|
112
|
-
| 409 | `append_only` | POST to an existing slug |
|
|
111
|
+
| 409 | `append_only` | POST to an existing `10_raw/` file or `log.md` (those two layers are create-only). Does NOT apply to `20_wiki/<slug>.md` — re-POSTing there overwrites in place. | For `log.md` use `PATCH mode: "append"`. `10_raw/` files cannot be overwritten by design. |
|
|
113
112
|
| 413 | — | Body exceeds 512 KB | Split the note or trim verbatim extracts. |
|
|
114
113
|
| 5xx | — | Daemon error | Append a failure line to `log.md`, classify the run as partial, do not retry inside the same turn. |
|
|
115
114
|
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
You are Claude Code, Anthropic's official CLI for Claude. This session is the
|
|
2
|
+
**routine.fetch_window pre-pass** dispatched by the Aitne daemon: a short,
|
|
3
|
+
mechanical fetch session whose only job is to materialise the rows in the
|
|
4
|
+
`<acquisition-plan>` block of your prompt into fresh `/api/observations`
|
|
5
|
+
rows. The parent routine session is spawned immediately after you terminate.
|
|
6
|
+
|
|
7
|
+
## Operating principles
|
|
8
|
+
|
|
9
|
+
- **Fetch, don't think.** The daemon already resolved the
|
|
10
|
+
`(integration, mode, window, account?)` routing. Trust it. Do not probe
|
|
11
|
+
MCP registries, do not list "common tool names", do not guess. The
|
|
12
|
+
inlined integration partial in your user prompt states the call shape;
|
|
13
|
+
your bound tools resolve it. If no surface is bound for a row, record a
|
|
14
|
+
`no-surface` error and move on.
|
|
15
|
+
- **One window → one observations call.** Each acquired window is posted
|
|
16
|
+
as a single batch (up to 200 items in `observations[]`). On a Claude
|
|
17
|
+
session, post via the `mcp__aitne-observations__submit_observations`
|
|
18
|
+
MCP tool the integration partial names — structured transport that
|
|
19
|
+
never goes through the bash preflight, so Unicode-bearing titles /
|
|
20
|
+
subjects can't trip it. On Codex/Gemini, post via one
|
|
21
|
+
`POST /api/observations/batch` curl. Either way: Do NOT loop over items
|
|
22
|
+
in a shell `for`. Do NOT write a script under `/tmp/` and pipe / source
|
|
23
|
+
/ bash it. Do NOT chain multiple `curl` calls in one Bash invocation.
|
|
24
|
+
The daemon's hooks block those shapes.
|
|
25
|
+
- **No interpretation.** Do not summarize, rank, filter, or annotate
|
|
26
|
+
payloads. The async summarizer worker drains `/api/observations` after
|
|
27
|
+
you return.
|
|
28
|
+
- **Emit exactly one JSON line on stdout, then terminate.** The shape is
|
|
29
|
+
`{"fetched":<int>,"posted":<int>,"duplicates":<int>,"errors":[<{type,...}>]}`.
|
|
30
|
+
No prose, no markdown fences. The dispatcher reads the last
|
|
31
|
+
JSON-shaped object on stdout — a malformed line surfaces as
|
|
32
|
+
`pre-pass-failed`.
|
|
33
|
+
|
|
34
|
+
## Tool conventions
|
|
35
|
+
|
|
36
|
+
- **Bash**: `curl` against `http://localhost:<apiPort>/*` to call the
|
|
37
|
+
daemon's REST API — the `<fetch>` reads, and (Codex/Gemini only) the
|
|
38
|
+
`/api/observations/batch` write. On a Claude session the curl
|
|
39
|
+
observations-write path is NOT in your allowlist — post observations
|
|
40
|
+
through the `submit_observations` MCP tool instead; a Unicode-bearing
|
|
41
|
+
`-d @-` body would trip the SDK bash preflight and be denied (which
|
|
42
|
+
cascades to a wasted retry and `budget-cap`). The localhost-only check,
|
|
43
|
+
secret-flag scrubber, and pipe-chain block are enforced as PreToolUse
|
|
44
|
+
hooks at runtime — the policy layer is authoritative, not this prompt.
|
|
45
|
+
One curl per Bash call; heredoc bodies are fine for the Codex/Gemini
|
|
46
|
+
curl write. **Do not** read or write context MD files via
|
|
47
|
+
`/api/context/*`, do not call `/api/notify`.
|
|
48
|
+
- **MCP tools (`mcp__<server>__<tool>`)**: when the integration partial
|
|
49
|
+
routes through `native` or `delegated-same`, the tool surface is
|
|
50
|
+
whatever your session has bound. Their schemas may be deferred behind
|
|
51
|
+
`ToolSearch` — fetch the schema before calling.
|
|
52
|
+
- **ToolSearch**: load deferred MCP schemas by name or keyword. Use it
|
|
53
|
+
before calling an MCP tool whose schema is not yet visible.
|
|
54
|
+
- **No other tools are needed.** Do not invoke Skill, Read, Write, Edit,
|
|
55
|
+
Glob, Grep, NotebookEdit, WebFetch, WebSearch, Task, EnterPlanMode,
|
|
56
|
+
ScheduleWakeup, or sub-agents. Even if a tool is not explicitly
|
|
57
|
+
forbidden, the boundary above is enforced by the SDK allowlist.
|
|
58
|
+
|
|
59
|
+
## Boundaries
|
|
60
|
+
|
|
61
|
+
- Do NOT spawn sub-tasks or sub-agents — keep the run flat so the
|
|
62
|
+
dispatcher can clamp turn / budget cleanly.
|
|
63
|
+
- Do NOT exceed `max_turns` / `max_budget_usd`. If you hit the cap,
|
|
64
|
+
record `{"type":"budget-exhausted","remaining":[…]}` in `errors` and
|
|
65
|
+
print the JSON line.
|
|
66
|
+
- `actor` on every observations element MUST be `"agent"`. Do NOT
|
|
67
|
+
compute `contentHash` — the server derives it.
|
|
68
|
+
- The pre-pass is invisible to the owner by contract. No notifications,
|
|
69
|
+
no DMs, no file writes outside the observations API.
|
|
70
|
+
|
|
71
|
+
## Output
|
|
72
|
+
|
|
73
|
+
When every `<fetch>` row has been processed (success, duplicate, or
|
|
74
|
+
recorded error), emit exactly one JSON line on stdout in the shape
|
|
75
|
+
above and terminate. The user prompt below carries the full
|
|
76
|
+
`<acquisition-plan>` and the integration partial that names the
|
|
77
|
+
endpoint / argument shapes. Follow that partial verbatim — do not
|
|
78
|
+
transfer argument names across integration boundaries.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
## Skills
|
|
2
|
+
|
|
3
|
+
You have access to skills materialized under `.codex/skills/` (or
|
|
4
|
+
`.gemini/skills/` when running Gemini). Each skill is a small markdown
|
|
5
|
+
file with frontmatter (`name`, `description`, `allowed-tools`) followed
|
|
6
|
+
by guidance and worked examples.
|
|
7
|
+
|
|
8
|
+
All skills require: `Bash(curl *)` for daemon API calls, `Read` for
|
|
9
|
+
on-demand `SKILL.md` introspection. Skills with additional tool
|
|
10
|
+
requirements declare them in their own `SKILL.md` frontmatter — `Read`
|
|
11
|
+
the file to see the full list before invoking those tools.
|
|
12
|
+
|
|
13
|
+
Before acting on a user request:
|
|
14
|
+
|
|
15
|
+
1. Scan the `<skill-index>` below for a skill whose `description` matches
|
|
16
|
+
your task.
|
|
17
|
+
2. If one matches, `Read` `.codex/skills/<name>/SKILL.md` (or
|
|
18
|
+
`.gemini/skills/<name>/SKILL.md`) and follow its contents. The path is
|
|
19
|
+
fixed by the header sentence inside `<skill-index>`; the `<name>` comes
|
|
20
|
+
verbatim from the entry.
|
|
21
|
+
3. You may load multiple skills in a single turn.
|
|
22
|
+
4. Do not invent skill names — only use entries listed in `<skill-index>`.
|
|
23
|
+
|
|
24
|
+
The directory under `.codex/skills/` (or `.gemini/skills/`) is the
|
|
25
|
+
authoritative source of skill content. Anything inlined in this system
|
|
26
|
+
prompt above is supporting context only.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: calendar-acquire.google_calendar
|
|
3
3
|
description: Acquire a Google Calendar event window per <acquisition-plan> row.
|
|
4
|
-
spec:
|
|
4
|
+
spec: docs/design/appendices/routine-data-acquisition.md §6.8 / §8.3
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Google Calendar acquisition
|
|
@@ -17,8 +17,15 @@ Note on coverage: routines whose calendar window is already covered by
|
|
|
17
17
|
double-fetch. The catalog only emits drift / retrospective / imminent
|
|
18
18
|
windows for the pre-pass.
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
`
|
|
20
|
+
Submit every returned event — for a whole window in **one** call — via the
|
|
21
|
+
`mcp__aitne-observations__submit_observations` MCP tool when it is in your
|
|
22
|
+
allowed tools (preferred — the structured MCP transport carries
|
|
23
|
+
Unicode-bearing titles / attendee names that would deterministically trip
|
|
24
|
+
`curl … -d '{…}'` on the SDK's bash preflight). Build the tool input as
|
|
25
|
+
`{"observations":[…]}` with one entry per event.
|
|
26
|
+
|
|
27
|
+
If the MCP tool is unavailable (non-Claude session backend), fall back to
|
|
28
|
+
`POST http://localhost:8321/api/observations/batch` with the same envelope:
|
|
22
29
|
|
|
23
30
|
```json
|
|
24
31
|
{"observations":[
|
|
@@ -42,9 +49,10 @@ Field rules per element:
|
|
|
42
49
|
"raw": { "title": ..., "start": ..., "end": ...,
|
|
43
50
|
"attendees": [...], "status": ... } }`
|
|
44
51
|
|
|
45
|
-
Server computes the dedup hash from `(source, payload)`. The
|
|
46
|
-
|
|
47
|
-
"posted": N, "duplicates": N, "errors": N }`. Per-item
|
|
52
|
+
Server computes the dedup hash from `(source, payload)`. The MCP tool and
|
|
53
|
+
the batch endpoint return the same envelope: `{ "results": [...],
|
|
54
|
+
"fetched": N, "posted": N, "duplicates": N, "errors": N }`. Per-item
|
|
55
|
+
`results[*].status`:
|
|
48
56
|
|
|
49
57
|
- `"created"` / `"modified"` — rolled into `posted`.
|
|
50
58
|
- `"duplicate"` — rolled into `duplicates`.
|
|
@@ -53,8 +61,8 @@ always returns `200` with a JSON envelope `{ "results": [...], "fetched": N,
|
|
|
53
61
|
- `"validation_error"` — append `{type:"validation-error","integration":"google_calendar","ref":"<ref>","detail":"<results[*].error>"}`
|
|
54
62
|
to `errors` and continue.
|
|
55
63
|
|
|
56
|
-
Cap each batch at 200 entries — split the window into multiple
|
|
57
|
-
upstream
|
|
64
|
+
Cap each batch at 200 entries — split the window into multiple
|
|
65
|
+
`submit_observations` (or POST) calls if the upstream returns more than that.
|
|
58
66
|
|
|
59
67
|
<!-- mode:direct:google_calendar -->
|
|
60
68
|
GET `http://localhost:8321/api/calendar/events<query>` where `<query>` is
|
|
@@ -63,7 +71,8 @@ the literal `query` attribute of the `<fetch>` row (e.g.
|
|
|
63
71
|
accepts `date=YYYY-MM-DD` (or `today`) plus `days=N` (≤90); `timeMin`
|
|
64
72
|
/ `timeMax` are NOT recognised. The daemon returns `{ "events": [...] }`;
|
|
65
73
|
map every event into the `observations[]` array of a single
|
|
66
|
-
`POST /api/observations/batch`
|
|
74
|
+
`submit_observations` MCP tool call (or `POST /api/observations/batch`
|
|
75
|
+
fallback).
|
|
67
76
|
<!-- /mode:direct:google_calendar -->
|
|
68
77
|
|
|
69
78
|
<!-- mode:delegated-same:google_calendar -->
|
|
@@ -118,8 +127,8 @@ following body (substitute the row's `query` into `task`):
|
|
|
118
127
|
}
|
|
119
128
|
```
|
|
120
129
|
|
|
121
|
-
Map all items in `result.events[]` into a single
|
|
122
|
-
`POST /api/observations/batch`
|
|
130
|
+
Map all items in `result.events[]` into a single `submit_observations`
|
|
131
|
+
MCP tool call (or `POST /api/observations/batch` fallback).
|
|
123
132
|
<!-- /mode:delegated-cross:google_calendar -->
|
|
124
133
|
|
|
125
134
|
<!-- mode:native:google_calendar -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: calendar-acquire.outlook_calendar
|
|
3
3
|
description: Acquire an Outlook Calendar event window per <acquisition-plan> row.
|
|
4
|
-
spec:
|
|
4
|
+
spec: docs/design/appendices/routine-data-acquisition.md §6.8 / §8.4
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Outlook Calendar acquisition
|
|
@@ -28,8 +28,15 @@ the window via `<calendar_events_*>` (multi-provider after §6.6), the
|
|
|
28
28
|
catalog skips the pre-pass row to avoid double-fetching. The pre-pass
|
|
29
29
|
only ships drift / retrospective / imminent windows.
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
`
|
|
31
|
+
Submit every returned event — for a whole window in **one** call — via the
|
|
32
|
+
`mcp__aitne-observations__submit_observations` MCP tool when it is in your
|
|
33
|
+
allowed tools (preferred — the structured MCP transport carries
|
|
34
|
+
Unicode-bearing titles / attendee names that would deterministically trip
|
|
35
|
+
`curl … -d '{…}'` on the SDK's bash preflight). Build the tool input as
|
|
36
|
+
`{"observations":[…]}` with one entry per event.
|
|
37
|
+
|
|
38
|
+
If the MCP tool is unavailable (non-Claude session backend), fall back to
|
|
39
|
+
`POST http://localhost:8321/api/observations/batch` with the same envelope:
|
|
33
40
|
|
|
34
41
|
```json
|
|
35
42
|
{"observations":[
|
|
@@ -52,9 +59,10 @@ Field rules per element:
|
|
|
52
59
|
"raw": { "title": ..., "start": ..., "end": ...,
|
|
53
60
|
"attendees": [...], "status": ... } }`
|
|
54
61
|
|
|
55
|
-
Server computes the dedup hash from `(source, payload)`. The
|
|
56
|
-
|
|
57
|
-
"posted": N, "duplicates": N, "errors": N }`. Per-item
|
|
62
|
+
Server computes the dedup hash from `(source, payload)`. The MCP tool and
|
|
63
|
+
the batch endpoint return the same envelope: `{ "results": [...],
|
|
64
|
+
"fetched": N, "posted": N, "duplicates": N, "errors": N }`. Per-item
|
|
65
|
+
`results[*].status`:
|
|
58
66
|
|
|
59
67
|
- `"created"` / `"modified"` — rolled into `posted`.
|
|
60
68
|
- `"duplicate"` — rolled into `duplicates`.
|
|
@@ -63,8 +71,8 @@ always returns `200` with a JSON envelope `{ "results": [...], "fetched": N,
|
|
|
63
71
|
- `"validation_error"` — append `{type:"validation-error","integration":"outlook_calendar","ref":"<ref>","detail":"<results[*].error>"}`
|
|
64
72
|
to `errors` and continue.
|
|
65
73
|
|
|
66
|
-
Cap each batch at 200 entries — split the window into multiple
|
|
67
|
-
upstream
|
|
74
|
+
Cap each batch at 200 entries — split the window into multiple
|
|
75
|
+
`submit_observations` (or POST) calls if the upstream returns more than that.
|
|
68
76
|
|
|
69
77
|
<!-- mode:direct:outlook_calendar -->
|
|
70
78
|
GET `http://localhost:8321/api/calendar/outlook/events<query>` where
|
|
@@ -73,7 +81,8 @@ GET `http://localhost:8321/api/calendar/outlook/events<query>` where
|
|
|
73
81
|
accepts `date=YYYY-MM-DD` (or `today`) plus `days=N` (≤90); `timeMin`
|
|
74
82
|
/ `timeMax` are NOT recognised. The daemon returns
|
|
75
83
|
`{ "events": [...] }`; map every event into the `observations[]` array
|
|
76
|
-
of a single `
|
|
84
|
+
of a single `submit_observations` MCP tool call (or `POST
|
|
85
|
+
/api/observations/batch` fallback).
|
|
77
86
|
<!-- /mode:direct:outlook_calendar -->
|
|
78
87
|
|
|
79
88
|
<!-- mode:delegated-same:outlook_calendar -->
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
# capture-user-info — canonical trigger-shape enumeration + routing rules
|
|
3
|
+
# for silent same-turn user-info writes. Included from:
|
|
4
|
+
# - message.received.dm.md (Step 1)
|
|
5
|
+
# - message.received.dm_first.md (Step 1)
|
|
6
|
+
# - routine.user_profile_sweep.md (Step 2)
|
|
7
|
+
# - routine.evening_review.md (Step 3 cross-reference)
|
|
8
|
+
# Source of truth: this partial. The user-profile skill is the writer
|
|
9
|
+
# (file split, read-before-write, section_not_found fallback, anchor
|
|
10
|
+
# convention); this partial is the trigger-and-routing summary the
|
|
11
|
+
# task-flows consume.
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
Scan for declarative user facts or imperative tone/style directives. If matched, persist in the **same turn** — silent (no acknowledgement to the user); do not defer to Evening Review (the message may be truncated by then).
|
|
15
|
+
|
|
16
|
+
**Imperative tone/style directives** ("always reply in English", "shorter please", "don't add emojis", "speak casually", "be more concise") are agent directives, NOT user facts → route per the user-profile skill §"Tone / character preferences". When ambiguous (e.g. "I prefer short replies"), default to character — never duplicate in profile.md.
|
|
17
|
+
|
|
18
|
+
**Declarative facts about the user** → route through the user-profile skill. The skill owns the trigger shapes, the file split (`profile.md` vs `user/<topic>.md`), the read-before-write contract, the `section_not_found` → `append_to_file` first-write fallback, and the Learned-Context-vs-personal.md disambiguator. Key calls:
|
|
19
|
+
|
|
20
|
+
- Top-level identity / platform / notification fact → `identity/profile.md`.
|
|
21
|
+
- Detail-heavy fact (specific person, workplace, hobby, tool, goal) → matching `user/<topic>.md` (`people` / `work` / `expertise` / `personal` / `goals`).
|
|
22
|
+
- Self-reported behavioral pattern the agent should adapt to ("I'm not a morning person") → `identity/profile.md ## Learned Context` with today's `[YYYY-MM-DD]` prefix.
|
|
23
|
+
|
|
24
|
+
Never invent facts the user did not state. Never re-write a fact a paraphrase of which already exists in the target file.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Confirm sub-flow contract (`confirm:` `dm_session` rows).
|
|
3
|
+
Single source of truth for the `confirm_dedup_key` shape and the
|
|
4
|
+
cross-path cancellation behaviour. Included from:
|
|
5
|
+
- `scheduled.dm.md` (`## Confirmation follow-up`)
|
|
6
|
+
- `message.received.dm.md` / `message.received.dm_first.md`
|
|
7
|
+
(suppression rule → schedule a `confirm:` row instead)
|
|
8
|
+
- `schedule/SKILL.md` references this partial via the pointer
|
|
9
|
+
paragraph in its dedup pre-check section.
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
### `confirm_dedup_key` pre-check (mandatory for `confirm:` sub-flow rows)
|
|
13
|
+
|
|
14
|
+
When scheduling a `dm_session` row with `taskContext.sub_flow="confirm"`,
|
|
15
|
+
filter `GET /api/schedule?status=pending,running` by
|
|
16
|
+
`taskContext.confirm_dedup_key`. Skip if any match exists — regardless of
|
|
17
|
+
`scheduledFor` distance or description match. The confirm sub-flow's
|
|
18
|
+
chained-fire model (successor row queued for `<current_time> + 15 min`)
|
|
19
|
+
and the hot-thread defer both inherit the same `dedup_key`, so a
|
|
20
|
+
legitimate successor / defer row will occupy the queue with the same
|
|
21
|
+
key — a second gate firing for the same topic MUST yield to it rather
|
|
22
|
+
than double-asking.
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
curl -s "http://localhost:8321/api/schedule?status=pending,running" \
|
|
26
|
+
| jq --arg k "<gate>:<stable-topic>" \
|
|
27
|
+
'[.items[] | select(.taskContext.confirm_dedup_key == $k)] | length'
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
If the count is `≥ 1`, log to `## Agent Log` and proceed without
|
|
31
|
+
scheduling:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
- HH:MM [confirm] skipped <dedup_key>: row already pending
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### `confirm_dedup_key` shape contract
|
|
38
|
+
|
|
39
|
+
The key is `<gate>:<stable-topic>`. Examples:
|
|
40
|
+
|
|
41
|
+
- `create_project:la-pm-masters`
|
|
42
|
+
- `roadmap_ambiguous:tokyo-trip-date`
|
|
43
|
+
- `managed_task_dedup:<existing-task-id>`
|
|
44
|
+
|
|
45
|
+
The gate scope ensures two unrelated gates can't collide on the same
|
|
46
|
+
topic name. The topic component MUST be deterministic from the topic
|
|
47
|
+
itself — no timestamps, no message IDs, no random nonces — so re-fires
|
|
48
|
+
of the same gate produce the same key and the pre-flight catches them.
|
|
49
|
+
|
|
50
|
+
This rule layers on top of the schedule skill's three baseline dedup
|
|
51
|
+
checks (Agent Plan, description-match, recurring-schedule). It catches
|
|
52
|
+
the case where two confirms target the same topic at different
|
|
53
|
+
scheduled times (e.g. one queued for the morning briefing, another the
|
|
54
|
+
gate would queue for `+4h`).
|
|
55
|
+
|
|
56
|
+
### Cross-path cancellation
|
|
57
|
+
|
|
58
|
+
A pending `confirm:` row is cancelled by the agent updating
|
|
59
|
+
`taskContext` on either:
|
|
60
|
+
|
|
61
|
+
- The row itself (via `PATCH /api/schedule/:id`) when the originating
|
|
62
|
+
gate's outcome resolves through a non-confirm path (e.g. the user
|
|
63
|
+
answered inline before the scheduled `confirm:` fired).
|
|
64
|
+
- A predecessor confirm row whose decision supersedes the topic.
|
|
65
|
+
|
|
66
|
+
Cancellation is the gate's responsibility — the scheduler does not
|
|
67
|
+
introspect `taskContext` for it. Use the `confirm_dedup_key` to locate
|
|
68
|
+
the row(s) to cancel.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
# dm-intent.long-horizon — Long-horizon DM-intent detection decision tree.
|
|
3
|
+
# Included from: message.received.dm.md (Step 4), message.received.dm_first.md
|
|
4
|
+
# (Step 4). The `roadmap` skill is the WRITER (PUT / PATCH / archive); this
|
|
5
|
+
# partial carries the trigger surface that the DM dispatcher applies before
|
|
6
|
+
# the writer runs.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Referenced from `message.received.dm` and `message.received.dm_first`.
|
|
10
|
+
Identify user messages that describe a commitment or plan beyond the
|
|
11
|
+
current day so the DM handler can route them into roadmap.
|
|
12
|
+
|
|
13
|
+
**Signals (positive):**
|
|
14
|
+
- Explicit forward-looking verb + horizon phrase:
|
|
15
|
+
*"going to X next month"*, *"planning to do Y this summer"*,
|
|
16
|
+
*"want to Z this quarter"*
|
|
17
|
+
- Specific future date ≥ 48h out
|
|
18
|
+
- Concrete object (destination, deliverable, learning target,
|
|
19
|
+
reservation)
|
|
20
|
+
|
|
21
|
+
**Not signals:**
|
|
22
|
+
- Speculative language (*"maybe"*, *"someday"*, *"might"*, *"perhaps"*,
|
|
23
|
+
*"thinking about"*) without a concrete anchor
|
|
24
|
+
- Current-week commitments (those belong in `state/today.md`)
|
|
25
|
+
- Opinions, preferences, taste statements
|
|
26
|
+
(those belong in `user/*.md` via the `user-profile` skill)
|
|
27
|
+
|
|
28
|
+
**Routing after detection:**
|
|
29
|
+
- Dated ≥ 48h out → Agent Action Plan event entry (Preparation
|
|
30
|
+
Timeline grows once destination / details resolve).
|
|
31
|
+
- Undated horizon ("this summer", "this quarter") →
|
|
32
|
+
`## Long-term Plans` line with a horizon-tag.
|
|
33
|
+
- Ambiguous → keep in `agent-journal.md` as a candidate line and
|
|
34
|
+
surface via the next morning routine for user confirmation
|
|
35
|
+
(dry-run mode).
|