@aitne-sh/aitne 0.1.8 → 0.1.10
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 +251 -164
- 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 +51 -15
- package/agent-assets/docs/concepts/delegated-mode.md +56 -17
- package/agent-assets/docs/concepts/memory-model.md +77 -34
- 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 +61 -50
- package/agent-assets/docs/concepts/skills.md +34 -18
- package/agent-assets/docs/features/integrations/browser-history.md +196 -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 +61 -17
- 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 +44 -40
- package/agent-assets/docs/features/lifestyle/reading.md +57 -22
- package/agent-assets/docs/features/lifestyle/receipts.md +51 -21
- package/agent-assets/docs/features/lifestyle/travel-bookings.md +77 -14
- package/agent-assets/docs/features/memory-files/agent-journal.md +132 -53
- package/agent-assets/docs/features/memory-files/agent-lessons.md +177 -0
- package/agent-assets/docs/features/memory-files/projects.md +73 -17
- package/agent-assets/docs/features/memory-files/roadmap.md +54 -11
- 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 +22 -8
- package/agent-assets/docs/features/messaging/whatsapp.md +71 -17
- package/agent-assets/docs/features/operations/activity-and-conversations.md +45 -15
- package/agent-assets/docs/features/operations/approvals.md +49 -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 +222 -0
- package/agent-assets/docs/features/operations/notifications.md +52 -11
- package/agent-assets/docs/features/operations/quiet-hours.md +64 -40
- package/agent-assets/docs/features/operations/schedule-approaching.md +54 -24
- package/agent-assets/docs/features/routines/custom-routines.md +98 -26
- package/agent-assets/docs/features/routines/evening-review.md +82 -21
- package/agent-assets/docs/features/routines/hourly-check.md +149 -29
- package/agent-assets/docs/features/routines/morning-routine.md +54 -35
- package/agent-assets/docs/features/routines/weekly-review.md +46 -21
- package/agent-assets/docs/features/wiki/commands.md +26 -16
- package/agent-assets/docs/features/wiki/cost-and-approval.md +241 -0
- package/agent-assets/docs/features/wiki/dashboard.md +256 -0
- package/agent-assets/docs/features/wiki/overview.md +70 -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 +34 -23
- package/agent-assets/docs/getting-started/02-first-steps.md +17 -10
- package/agent-assets/docs/getting-started/03-what-can-this-do.md +25 -14
- package/agent-assets/docs/getting-started/04-first-day.md +39 -21
- 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 +57 -26
- 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 +66 -15
- package/agent-assets/docs/guides/explore-with-trace-and-connect.md +32 -14
- package/agent-assets/docs/guides/import-knowledge-file.md +50 -40
- package/agent-assets/docs/guides/install-and-run.md +49 -20
- 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 +69 -24
- package/agent-assets/docs/guides/reinstall-cleanly.md +88 -18
- package/agent-assets/docs/guides/setup-wizard.md +116 -54
- package/agent-assets/docs/guides/switch-default-backend.md +62 -16
- package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +30 -14
- package/agent-assets/docs/reference/api.md +153 -32
- package/agent-assets/docs/reference/cli-commands.md +39 -18
- package/agent-assets/docs/reference/config.md +241 -49
- package/agent-assets/docs/reference/disallowed-tools.md +34 -13
- package/agent-assets/docs/reference/keyboard-shortcuts.md +34 -10
- package/agent-assets/docs/reference/knowledge-layout.md +629 -0
- package/agent-assets/docs/reference/process-keys.md +62 -6
- package/agent-assets/docs/reference/skills.md +41 -14
- package/agent-assets/docs/troubleshooting/auth-failed.md +51 -21
- package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +97 -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 +33 -8
- 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 +25 -41
- package/agent-assets/skills/agent-create/SKILL.md +158 -0
- package/agent-assets/skills/attach/SKILL.md +10 -29
- package/agent-assets/skills/browser-history/SKILL.md +211 -0
- package/agent-assets/skills/browser-history-respond/SKILL.md +111 -0
- package/agent-assets/skills/browser-task/SKILL.md +164 -0
- package/agent-assets/skills/context/SKILL.md +35 -44
- package/agent-assets/skills/context/curation.json +14 -14
- package/agent-assets/skills/context/references/api.md +52 -40
- package/agent-assets/skills/context/references/required-frontmatter.md +13 -12
- package/agent-assets/skills/context/references/snapshot-files.md +18 -17
- package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +8 -8
- package/agent-assets/skills/context/seeds/frontmatter-requirements.seed.json +3 -3
- package/agent-assets/skills/docs-search/SKILL.md +23 -34
- package/agent-assets/skills/external-services/SKILL.delegated.claude.md +17 -114
- package/agent-assets/skills/external-services/SKILL.delegated.codex.md +17 -113
- package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +17 -113
- package/agent-assets/skills/external-services/SKILL.md +3 -3
- package/agent-assets/skills/external-services/SKILL.native.claude.md +7 -7
- 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/exec-errors.md +32 -0
- package/agent-assets/skills/external-services/references/obsidian.md +2 -2
- package/agent-assets/skills/external-services/references/skills-crud.md +5 -5
- package/agent-assets/skills/gmail-lifestyle/SKILL.md +11 -83
- package/agent-assets/skills/gmail-lifestyle/references/receipts-api.md +4 -0
- package/agent-assets/skills/gmail-lifestyle/references/travel-bookings-api.md +9 -0
- package/agent-assets/skills/mail/SKILL.delegated.claude.md +15 -18
- package/agent-assets/skills/mail/SKILL.delegated.codex.md +11 -6
- package/agent-assets/skills/mail/SKILL.delegated.gemini.md +11 -6
- package/agent-assets/skills/mail/SKILL.md +10 -18
- package/agent-assets/skills/mail/SKILL.native.claude.md +8 -7
- 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 +10 -3
- package/agent-assets/skills/mail/references/examples.md +2 -1
- package/agent-assets/skills/mail/references/providers.md +1 -1
- package/agent-assets/skills/managed-tasks/SKILL.md +48 -81
- package/agent-assets/skills/managed-tasks/references/errors.md +33 -19
- package/agent-assets/skills/managed-tasks/references/output-path.md +33 -17
- package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +7 -5
- package/agent-assets/skills/management-policy/SKILL.md +42 -42
- package/agent-assets/skills/management-policy/curation.json +1 -1
- package/agent-assets/skills/management-policy/references/policy-workflow.md +11 -12
- package/agent-assets/skills/management-policy/seeds/policy-file-shape.seed.json +1 -1
- package/agent-assets/skills/notify/SKILL.md +14 -16
- package/agent-assets/skills/notify/references/priority.md +28 -20
- 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 +17 -17
- package/agent-assets/skills/notion/SKILL.native.claude.md +11 -7
- package/agent-assets/skills/notion/SKILL.native.codex.md +10 -5
- package/agent-assets/skills/notion/SKILL.native.gemini.md +10 -5
- package/agent-assets/skills/observations/SKILL.md +29 -28
- package/agent-assets/skills/observations/references/fetch-fallback.md +22 -0
- package/agent-assets/skills/project-doc/SKILL.md +10 -7
- package/agent-assets/skills/project-doc/curation.json +3 -3
- package/agent-assets/skills/project-doc/seeds/project-shape.seed.json +8 -5
- package/agent-assets/skills/project-doc/seeds/slug-grammar.seed.json +5 -5
- package/agent-assets/skills/reading/SKILL.md +18 -42
- package/agent-assets/skills/reading/references/reading-taste.md +7 -7
- package/agent-assets/skills/roadmap/SKILL.md +8 -24
- package/agent-assets/skills/roadmap/curation.json +1 -1
- package/agent-assets/skills/roadmap/references/api.md +21 -11
- package/agent-assets/skills/roadmap/references/cross-check.md +15 -8
- package/agent-assets/skills/roadmap/references/horizon-tags.md +11 -0
- package/agent-assets/skills/roadmap/references/migration.md +12 -10
- package/agent-assets/skills/roadmap/references/retention.md +18 -0
- package/agent-assets/skills/roadmap/seeds/entry-types.seed.json +1 -1
- package/agent-assets/skills/schedule/SKILL.md +41 -50
- 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/importance.md +23 -0
- package/agent-assets/skills/schedule/references/model-selection.md +3 -3
- package/agent-assets/skills/schedule/references/recurrence-rule.md +7 -5
- package/agent-assets/skills/scheduled-managed-task/SKILL.md +77 -70
- package/agent-assets/skills/today/SKILL.md +24 -83
- 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/references/today-skeleton.md +66 -0
- package/agent-assets/skills/today/seeds/agent-notes-flavors.seed.json +1 -1
- package/agent-assets/skills/today/seeds/section-shape.seed.json +7 -7
- package/agent-assets/skills/user-interview/SKILL.md +21 -93
- package/agent-assets/skills/user-interview/references/op-briefing.md +3 -3
- package/agent-assets/skills/user-interview/references/op-dm-handler.md +88 -0
- package/agent-assets/skills/user-interview/references/op-morning.md +1 -1
- package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +9 -1
- package/agent-assets/skills/user-profile/SKILL.md +29 -39
- package/agent-assets/skills/user-profile/curation.json +4 -4
- package/agent-assets/skills/user-profile/references/character-preferences.md +3 -3
- 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-ask/SKILL.md +1 -1
- package/agent-assets/skills/wiki/wiki-compile/SKILL.md +9 -8
- package/agent-assets/skills/wiki/wiki-connect/SKILL.md +32 -5
- package/agent-assets/skills/wiki/wiki-ingest/SKILL.md +6 -50
- package/agent-assets/skills/wiki/wiki-ingest/references/curl-errors.md +58 -0
- package/agent-assets/skills/wiki/wiki-lint/SKILL.md +20 -14
- package/agent-assets/skills/wiki/wiki-trace/SKILL.md +10 -5
- package/agent-assets/skills/wiki/wiki-vault-rules/SKILL.md +2 -0
- package/agent-assets/system-prompts/routine-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/feedback-capture.md +30 -0
- 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 +13 -4
- package/agent-assets/task-flows/message.received.dm_first.md +7 -3
- package/agent-assets/task-flows/routine.custom.md +3 -3
- package/agent-assets/task-flows/routine.evening_review.md +88 -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 +93 -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 +114 -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/task-flows/wiki.trace.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/{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 +58 -15
- package/package.json +5 -4
- package/scripts/commands/doctor.mjs +25 -10
- 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/process-identity.d.mts +46 -0
- package/scripts/lib/process-identity.mjs +193 -0
- package/scripts/lib/read-api-token.mjs +176 -0
- package/scripts/start.mjs +16 -5
- 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
|
@@ -10,11 +10,15 @@ Apply the canonical capture-user-info routing below to `<user_input>`.
|
|
|
10
10
|
|
|
11
11
|
{include:_partials/capture-user-info.md}
|
|
12
12
|
|
|
13
|
+
Apply the canonical feedback-capture routing below to `<user_input>`.
|
|
14
|
+
|
|
15
|
+
{include:_partials/feedback-capture.md}
|
|
16
|
+
|
|
13
17
|
### Step 2 — Profile-question reconcile / latent opportunity
|
|
14
18
|
|
|
15
19
|
Two operations from the user-interview skill — run in order, before composing the reply.
|
|
16
20
|
|
|
17
|
-
**A. Queue reconcile (Operation 4).** GET `
|
|
21
|
+
**A. Queue reconcile (Operation 4).** GET `state/profile-questions.md ## In Progress`. For any `state=asked` entry where `(now − asked_at) < 24h`, treat the inbound DM as the answer: tick the matching `## Pending` row `[ ]` → `[x]`, remove from `## In Progress`, append to `## Answered`, and remove the matching `Profile question (...)` line from today's notes section. Leave `state=latent` / `state=scheduled` entries alone.
|
|
18
22
|
|
|
19
23
|
**B. Latent opportunity (Operation 2).** If after reconcile a `state=latent` entry remains:
|
|
20
24
|
|
|
@@ -106,7 +110,7 @@ snapshot is fresh.
|
|
|
106
110
|
|
|
107
111
|
Refetch the live log when the user asks about recent activity — for example "what have you been up to", "did anything come in", "anything new since X", "anything happen", "in the last N minutes".
|
|
108
112
|
|
|
109
|
-
- Issue `GET /api/context/today` (the standard context-read endpoint).
|
|
113
|
+
- Issue `GET /api/context/state/today` (the standard context-read endpoint).
|
|
110
114
|
- Compare the live `## Agent Log` against what is in <today>.
|
|
111
115
|
- Answer from the union. If the live log shows no new entries beyond
|
|
112
116
|
<today>, the snapshot was sufficient — answer from <today> with no
|
|
@@ -143,7 +147,12 @@ detection" §"Reply branches", carrying the user's reply shape (yes /
|
|
|
143
147
|
counter-proposal / no) into that handler. Apply the same pattern to
|
|
144
148
|
any other gate that opts into the confirm sub-flow in the future.
|
|
145
149
|
|
|
146
|
-
**Scheduling.**
|
|
150
|
+
**Scheduling.** Split by what fires:
|
|
151
|
+
- **Recurring autonomous work** ("every hour check my PRs and act", "each morning fetch X and update Y") → create an **Agent** via the `agent-create` skill (`POST /api/agents`). These are durable, named, recurring work identities managed on `/agents`.
|
|
152
|
+
- **Recurring scheduled DM / briefing** ("DM me a summary every morning at 9") → `POST /api/recurring-schedules` with `taskType: "dm_session"` (still the home for recurring DMs).
|
|
153
|
+
- **One-shot** ("tomorrow 3pm", "in 30 min") → `POST /api/schedule/dm` (pre-composed; default) or `POST /api/schedule` (wake-up that must look something up at fire time).
|
|
154
|
+
|
|
155
|
+
Load the `schedule` skill (one-shot + recurring-DM request shape, dedup, DM-vs-wake, description contract) or the `agent-create` skill (recurring work Agents). Use `<current_time>` for timezone resolution. Prefer `tier` over `model`; the two are mutually exclusive.
|
|
147
156
|
|
|
148
157
|
Schedules go through this daemon — never through any cloud-hosted scheduled-agent feature your CLI may expose. Cloud routines cannot reach `localhost:8321`, so they cannot deliver via the user's chat platforms or use any integration registered here. Do not propose one as a tradeoff.
|
|
149
158
|
|
|
@@ -157,7 +166,7 @@ Schedules go through this daemon — never through any cloud-hosted scheduled-ag
|
|
|
157
166
|
- **Re-enable** → `PATCH /api/recurring-schedules/:id` `{"enabled": true}`.
|
|
158
167
|
3. Confirm to the user in persona voice. Keep it short — never name internal mechanisms ("recurring schedule", "pin_to_quiet_hours_end", row IDs) in user-visible text.
|
|
159
168
|
|
|
160
|
-
**Long-horizon intent** (commitment, trip, deliverable, learning target beyond today) → apply the decision tree below; the `roadmap` skill is the writer. Ambiguous or speculative items belong in `agent
|
|
169
|
+
**Long-horizon intent** (commitment, trip, deliverable, learning target beyond today) → apply the decision tree below; the `roadmap` skill is the writer. Ambiguous or speculative items belong in `journal/agent.md` as a candidate line for the next morning routine to confirm — do **not** write directly to `plans/roadmap.md` without a clear positive signal.
|
|
161
170
|
|
|
162
171
|
{include:_partials/dm-intent.long-horizon.md}
|
|
163
172
|
|
|
@@ -12,11 +12,15 @@ Apply the canonical capture-user-info routing below to `<user_input>`.
|
|
|
12
12
|
|
|
13
13
|
{include:_partials/capture-user-info.md}
|
|
14
14
|
|
|
15
|
+
Apply the canonical feedback-capture routing below to `<user_input>`.
|
|
16
|
+
|
|
17
|
+
{include:_partials/feedback-capture.md}
|
|
18
|
+
|
|
15
19
|
### Step 2 — Profile-question reconcile / latent opportunity
|
|
16
20
|
|
|
17
21
|
Two operations from the user-interview skill — run in order, before composing the reply.
|
|
18
22
|
|
|
19
|
-
**A. Queue reconcile (Operation 4).** GET `
|
|
23
|
+
**A. Queue reconcile (Operation 4).** GET `state/profile-questions.md ## In Progress`. For any `state=asked` entry where `(now − asked_at) < 24h`, treat the inbound DM as the answer: tick the matching `## Pending` row `[ ]` → `[x]`, remove from `## In Progress`, append to `## Answered`, and remove the matching `Profile question (...)` line from today's notes section. Leave `state=latent` / `state=scheduled` entries alone.
|
|
20
24
|
|
|
21
25
|
**B. Latent opportunity (Operation 2).** If after reconcile a `state=latent` entry remains, FIRST run the slot-filled pre-check (GET `/api/profile-questions/slot-filled?path=<target>§ion=<section?>&anchor=<anchor?>`); if `filled: true`, resolve the row (tick Pending, remove In Progress, append `(reconciled:opportunity)` to Answered, remove the matching note line) and **do not weave a question**.
|
|
22
26
|
|
|
@@ -132,11 +136,11 @@ project?"* → user replies "yeah" → route through the context skill's
|
|
|
132
136
|
"Project DM-intent detection" §"Reply branches" with branch=
|
|
133
137
|
affirmative.
|
|
134
138
|
|
|
135
|
-
**Scheduling.** Recurring ("every hour
|
|
139
|
+
**Scheduling.** Recurring autonomous **work** ("every hour check X and act") → create an **Agent** via the `agent-create` skill (`POST /api/agents`). Recurring scheduled **DM / briefing** ("DM me every morning at 9") → `POST /api/recurring-schedules` (`taskType: "dm_session"`). One-shot ("tomorrow 3pm", "in 30 min") → `POST /api/schedule/dm` (pre-composed; default) or `POST /api/schedule` (wake-up). Load the `schedule` skill (one-shot + recurring-DM) or `agent-create` (recurring work Agents). Use `<current_time>` for timezone resolution. Prefer `tier` over `model`; the two are mutually exclusive.
|
|
136
140
|
|
|
137
141
|
Schedules go through this daemon — never through any cloud-hosted scheduled-agent feature your CLI may expose. Cloud routines cannot reach `localhost:8321`, so they cannot deliver via the user's chat platforms or use any integration registered here.
|
|
138
142
|
|
|
139
|
-
**Long-horizon intent** (commitment, trip, deliverable, learning target beyond today) → apply the decision tree below; the `roadmap` skill is the writer. Ambiguous or speculative items belong in `agent
|
|
143
|
+
**Long-horizon intent** (commitment, trip, deliverable, learning target beyond today) → apply the decision tree below; the `roadmap` skill is the writer. Ambiguous or speculative items belong in `journal/agent.md` as a candidate line for the next morning routine to confirm — do **not** write directly to `plans/roadmap.md` without a clear positive signal.
|
|
140
144
|
|
|
141
145
|
{include:_partials/dm-intent.long-horizon.md}
|
|
142
146
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
## Custom Routine
|
|
4
4
|
|
|
5
5
|
This is a user-defined recurring check fired from a cron schedule. The
|
|
6
|
-
primary-vault file `routines/custom/<slug>.md` (injected above under
|
|
6
|
+
primary-vault file `policies/routines/custom/<slug>.md` (injected above under
|
|
7
7
|
"Vault policy files") contains your canonical check list and the reason
|
|
8
8
|
it exists.
|
|
9
9
|
|
|
@@ -17,7 +17,7 @@ it exists.
|
|
|
17
17
|
`max_budget_usd` and `backend_tier`; stop early rather than exceed
|
|
18
18
|
either.
|
|
19
19
|
4. For each action, use the same conventions as the other routines:
|
|
20
|
-
- Scheduled actions → append to `today.md` `## Agent Plan` and
|
|
20
|
+
- Scheduled actions → append to `state/today.md` `## Agent Plan` and
|
|
21
21
|
register a matching `POST /api/schedule` row. Use `tier` for the
|
|
22
22
|
row's cost knob; check `GET /api/schedule/options` for the live
|
|
23
23
|
model list when a step needs to pin a specific model id.
|
|
@@ -25,7 +25,7 @@ it exists.
|
|
|
25
25
|
truly urgent. Silent is the default.
|
|
26
26
|
- Observations → consume via `observations` skill if the step pulls
|
|
27
27
|
from pending observations.
|
|
28
|
-
5. When all checks complete, append ONE line to `agent
|
|
28
|
+
5. When all checks complete, append ONE line to `journal/agent.md`
|
|
29
29
|
summarising what ran:
|
|
30
30
|
`- HH:MM [routine.custom.<slug>] ran N checks, skipped M (<reasons>)`.
|
|
31
31
|
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
## Task: Evening Review
|
|
4
4
|
|
|
5
5
|
The "Vault policy files" block appended to this prompt includes
|
|
6
|
-
`routines/evening.md` — run any `### <label>` entries there alongside the
|
|
6
|
+
`policies/routines/evening.md` — run any `### <label>` entries there alongside the
|
|
7
7
|
built-in review steps below, using the same journaling conventions.
|
|
8
8
|
The "Vault review context" block includes `context-index.md` and
|
|
9
|
-
`dossiers/evening.md`; consult it before Step 1 and update the
|
|
9
|
+
`knowledge/dossiers/evening.md`; consult it before Step 1 and update the
|
|
10
10
|
dossier's Open items / Last run before finishing. Writes to
|
|
11
|
-
`dossiers/<flow>.md` MUST preserve the existing YAML frontmatter block
|
|
11
|
+
`knowledge/dossiers/<flow>.md` MUST preserve the existing YAML frontmatter block
|
|
12
12
|
(`---\ntype: dossier\nowner: agent\nupdated: <date>\n---`); prefer
|
|
13
13
|
`PATCH` with a section target to mutate a single block, and when doing
|
|
14
14
|
a `PUT` full rewrite keep the frontmatter and only refresh `updated:`
|
|
@@ -16,7 +16,7 @@ a `PUT` full rewrite keep the frontmatter and only refresh `updated:`
|
|
|
16
16
|
|
|
17
17
|
Close out today and prepare tomorrow. Steps 1–3 are internal bookkeeping
|
|
18
18
|
(Morning Routine depends on them) and emit no user-facing output by default.
|
|
19
|
-
User-defined entries in `routines/evening.md` run alongside the built-in
|
|
19
|
+
User-defined entries in `policies/routines/evening.md` run alongside the built-in
|
|
20
20
|
steps and are authoritative: execute them as written, including any that
|
|
21
21
|
call `POST /api/notify` — the built-in steps' silence does not override the
|
|
22
22
|
user's explicit rulebook intent. For ad-hoc deadline or surprise nudges,
|
|
@@ -126,7 +126,7 @@ PATCH:
|
|
|
126
126
|
`section=long_term_plans` `mode=replace`.
|
|
127
127
|
3. Otherwise, bump `Review:` forward by the class review interval:
|
|
128
128
|
previous Review +30 days by default, or +90 days for `undated`;
|
|
129
|
-
increment `ReviewCount:` and log one line to `agent
|
|
129
|
+
increment `ReviewCount:` and log one line to `journal/agent.md`.
|
|
130
130
|
4. For `undated` lines reaching `ReviewCount: 3` with no
|
|
131
131
|
promotion, silently rewrite `Review:` to `[noreview]`. Do NOT
|
|
132
132
|
DM.
|
|
@@ -140,7 +140,7 @@ PATCH:
|
|
|
140
140
|
roadmap.md, rebuild from that current body, and retry once while
|
|
141
141
|
preserving every existing `completed ...` row byte-for-byte. If
|
|
142
142
|
the retry still fails, stop Step 2, append the validation error and
|
|
143
|
-
affected IDs to `agent
|
|
143
|
+
affected IDs to `journal/agent.md`, and stay silent.
|
|
144
144
|
|
|
145
145
|
### Step 3 — Process user/profile.md and user/ per the user-profile skill
|
|
146
146
|
Read <user> ## Raw Signals and classify each entry into one of four buckets.
|
|
@@ -179,7 +179,7 @@ PATCH:
|
|
|
179
179
|
referenced, a lifestyle habit stated, a long-term goal declared, a
|
|
180
180
|
specific framework with years of experience — → graduate into the
|
|
181
181
|
matching user/*.md file via PATCH. The routing table lives in
|
|
182
|
-
the user-profile skill "
|
|
182
|
+
the user-profile skill "identity/profile.md vs user/" section; the curl
|
|
183
183
|
recipe for read-before-write is under "How to navigate user/".
|
|
184
184
|
Always read the target file first, check for duplicates, then PATCH
|
|
185
185
|
(prefer `mode: "append"` for new bullets — it preserves siblings).
|
|
@@ -204,7 +204,7 @@ PATCH:
|
|
|
204
204
|
mode to remove only those entries, preserving any signals that
|
|
205
205
|
SignalDetector appended after your read:
|
|
206
206
|
```bash
|
|
207
|
-
curl -s -X PATCH http://localhost:8321/api/context/
|
|
207
|
+
curl -s -X PATCH http://localhost:8321/api/context/identity/profile \
|
|
208
208
|
-H 'Content-Type: application/json' \
|
|
209
209
|
-d '{"section": "raw_signals", "mode": "clear_before", "cutoff": "<latest_processed_timestamp>"}'
|
|
210
210
|
```
|
|
@@ -224,3 +224,83 @@ PATCH:
|
|
|
224
224
|
Learned Context entries out to the matching user/*.md file and
|
|
225
225
|
remove them from user/profile.md so the primary profile stays compact.
|
|
226
226
|
|
|
227
|
+
### Step 4 — Consolidate feedback signals into lessons
|
|
228
|
+
|
|
229
|
+
If a `<feedback_worksheet>` block is present in your context, fold the
|
|
230
|
+
unconsumed feedback signals it lists into the scoped lesson stores. The daemon
|
|
231
|
+
already did the mechanical work: every candidate carries a deterministic
|
|
232
|
+
`decision`, `conf`, `weighted_ev`, and `reason`; every existing lesson carries a
|
|
233
|
+
`rank` (rank 1 = lowest score = evict first); and the block ends with the exact
|
|
234
|
+
`<consume ids="…">` set. Your job is only the **semantic** part — judge whether a
|
|
235
|
+
candidate matches an existing lesson's intent, phrase the generalization, and
|
|
236
|
+
detect contradictions. Do **not** recompute promotion or caps; honour the
|
|
237
|
+
worksheet's `decision` and `rank` verbatim. If the block is absent, skip this
|
|
238
|
+
step entirely. Like Steps 1–3 it is internal bookkeeping and emits no
|
|
239
|
+
user-facing output.
|
|
240
|
+
|
|
241
|
+
4a. **Lesson-store scopes** — process **every** `<scope … mode="lessons">` in the
|
|
242
|
+
worksheet, writing each to the `store=` path it declares: the global `agent`
|
|
243
|
+
scope (`store="policies/agent-lessons.md"`) and any per-agent
|
|
244
|
+
`agent:<slug>` scope (`store="policies/agents/<slug>/lessons.md"` — feedback
|
|
245
|
+
on one named agent's own output, injected only into that agent's runs). The
|
|
246
|
+
per-candidate rules below are identical for each; only the target file and
|
|
247
|
+
its H1 change. GET the scope's `store=` file first. If it 404s, PUT a fresh
|
|
248
|
+
file: frontmatter `type: rule` / `owner: agent` / `updated: <agent_day_date>`,
|
|
249
|
+
an H1 (`# Agent Lessons` for the global `agent` scope; `# Agent Lessons —
|
|
250
|
+
<label>` for an `agent:<slug>` scope, e.g. `# Agent Lessons — agent:report-writer`),
|
|
251
|
+
then a `## Lessons` section. Then, per candidate in that scope:
|
|
252
|
+
- `decision="promote"` → find an existing `## Lessons` bullet with the same
|
|
253
|
+
intent. If found, bump its `ev=` by `weighted_ev` (rounded to a whole
|
|
254
|
+
number), refresh `last=` to today, raise `conf`, and tighten the wording.
|
|
255
|
+
If not, add a new **active** bullet:
|
|
256
|
+
`- [<today>] <directive> <!-- ev=<round(weighted_ev), min 1> kind=<kind> src=<src> conf=<conf> last=<today> -->`
|
|
257
|
+
(`src`/`conf` come from the candidate; use the candidate's `kind=` when
|
|
258
|
+
present, otherwise infer it from the directive; `kind` ∈
|
|
259
|
+
preference|correction|do-more|do-less|constraint).
|
|
260
|
+
- `decision="hold-provisional"` with `reason="below-threshold"` → if it
|
|
261
|
+
matches an existing lesson's intent, bump that lesson's `ev`; otherwise add
|
|
262
|
+
the bullet with a trailing `<!-- provisional -->` marker (stored, not yet
|
|
263
|
+
injected — it promotes once corroboration reaches the threshold).
|
|
264
|
+
- `decision="hold-provisional"` with `reason="ignored-non-initiating"` →
|
|
265
|
+
silence never *starts* a lesson. Only use it to bump the `ev` of an
|
|
266
|
+
existing matching lesson; if none matches, write nothing for it.
|
|
267
|
+
- A newer `correction` that contradicts an active lesson **supersedes** it:
|
|
268
|
+
drop the stale bullet in the same rebuild so a changed mind leaves no
|
|
269
|
+
stale guidance.
|
|
270
|
+
- **Staleness prune** (§4 step 7): drop any existing lesson the worksheet
|
|
271
|
+
marks `stale="true"` (its `last=` is past the staleness horizon and it is
|
|
272
|
+
not a `constraint`) unless a fresh candidate re-reinforces it this pass —
|
|
273
|
+
a `constraint` is durable and is never stale-pruned.
|
|
274
|
+
Write the scope's section back with `PATCH <store= path> section=lessons
|
|
275
|
+
mode=replace`, applying the Step-2 section-body-rebuild discipline (GET fresh,
|
|
276
|
+
write the keep-list down first, byte-for-byte for unchanged bullets). Repeat
|
|
277
|
+
for each `mode="lessons"` scope; a write failure on one scope must not block
|
|
278
|
+
the others (omit only the failed scope's ids from the consume call, 4d).
|
|
279
|
+
|
|
280
|
+
4b. **Cap enforcement.** After your edits to each scope, if its `## Lessons`
|
|
281
|
+
section exceeds that scope's `cap_bytes` or `max_entries`, remove existing
|
|
282
|
+
lessons starting from `rank="1"` (the worksheet's lowest-scored) upward until
|
|
283
|
+
it fits, then append exactly one marker line:
|
|
284
|
+
`- [...N lower-signal lessons omitted — full history in feedback_signals]`.
|
|
285
|
+
Never evict a `kind=constraint` lesson — drop the next-lowest instead.
|
|
286
|
+
|
|
287
|
+
4c. **User-scope signals** (`<scope label="user" … mode="raw">`). These are
|
|
288
|
+
explicit owner directives captured via `POST /api/feedback`, *not* Raw
|
|
289
|
+
Signals. Route each into `## Learned Context` (or the matching
|
|
290
|
+
`identity/*.md` file) using the same bucket rules as Step 3 (a₂ / b),
|
|
291
|
+
respecting the ~600-token profile budget. Do not double-write a signal you
|
|
292
|
+
already folded from Raw Signals.
|
|
293
|
+
|
|
294
|
+
4d. **Consume.** Once every scope above is written, mark the processed signals
|
|
295
|
+
consumed so they don't resurface tomorrow — send the worksheet's full
|
|
296
|
+
`<consume>` id list:
|
|
297
|
+
```bash
|
|
298
|
+
curl -s -X POST http://localhost:8321/api/feedback/consume \
|
|
299
|
+
-H 'Content-Type: application/json' \
|
|
300
|
+
-d '{"ids": [<the ids from <consume ids="…"/>>]}'
|
|
301
|
+
```
|
|
302
|
+
Consume is by id and race-safe: any signal the detector appended after the
|
|
303
|
+
worksheet was built has a higher id absent from the list and survives
|
|
304
|
+
untouched for tomorrow's pass. If a lesson write failed, omit that scope's
|
|
305
|
+
ids from the consume call so its signals are retried next Evening Review.
|
|
306
|
+
|
|
@@ -108,6 +108,6 @@ of the plan produced.
|
|
|
108
108
|
loop over items in a shell `for`. Do NOT chain multiple curl
|
|
109
109
|
invocations. Those shapes are blocked by the daemon's Bash hooks
|
|
110
110
|
(one curl per Bash call, heredoc bodies are stripped from URL
|
|
111
|
-
validation). One window → one
|
|
111
|
+
validation). One window → one submit → one JSON body whose
|
|
112
112
|
`observations[]` array carries every fetched item (up to 200; split
|
|
113
|
-
larger windows into multiple
|
|
113
|
+
larger windows into multiple `submit_observations` / POST calls).
|
|
@@ -4,17 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
This task-flow is the **daemon-internal** hourly cron — a built-in
|
|
6
6
|
observation review the dispatcher fires every hour. It is NOT the
|
|
7
|
-
user-facing
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
fire `scheduled.task` / `scheduled.dm` events instead.
|
|
7
|
+
user-facing recurring path. An operator who wants a custom recurring
|
|
8
|
+
task creates a recurring **Agent** (`POST /api/agents`, e.g. an hourly
|
|
9
|
+
cron `0 * * * *`); those fire `scheduled.task` / `scheduled.dm` events
|
|
10
|
+
instead.
|
|
12
11
|
|
|
13
12
|
The "Vault policy files" block appended to this prompt includes
|
|
14
|
-
`routines/hourly.md` — your canonical check list for this cadence.
|
|
13
|
+
`policies/routines/hourly.md` — your canonical check list for this cadence.
|
|
15
14
|
The "Vault review context" block includes `context-index.md` and
|
|
16
|
-
`dossiers/hourly.md`; consult it before Step 1 and update the dossier's
|
|
17
|
-
Open items / Last run before finishing. Writes to `dossiers/<flow>.md`
|
|
15
|
+
`knowledge/dossiers/hourly.md`; consult it before Step 1 and update the dossier's
|
|
16
|
+
Open items / Last run before finishing. Writes to `knowledge/dossiers/<flow>.md`
|
|
18
17
|
MUST preserve the existing YAML frontmatter block (`---\ntype: dossier\nowner: agent\nupdated: <date>\n---`); prefer `PATCH` with a
|
|
19
18
|
section target to mutate a single block, and when doing a `PUT` full
|
|
20
19
|
rewrite keep the frontmatter and only refresh `updated:` — writes that
|
|
@@ -27,7 +26,7 @@ routing rules.
|
|
|
27
26
|
|
|
28
27
|
Output language: follow `<output_language_policy>` (Policy B for any
|
|
29
28
|
context-MD write-up; Policy C for the optional `POST /api/notify` DM).
|
|
30
|
-
Agent log appends to `agent
|
|
29
|
+
Agent log appends to `journal/agent.md` stay English (Policy A).
|
|
31
30
|
|
|
32
31
|
Use the observations skill to fetch pending items. The pre-pass
|
|
33
32
|
fetcher session (`routine.fetch_window`) ran ahead of you and posted
|
|
@@ -135,7 +134,7 @@ This routine reads external state for context — it does not push back. While r
|
|
|
135
134
|
- Create / update / delete calendar events.
|
|
136
135
|
- Open / merge / comment on GitHub PRs or issues.
|
|
137
136
|
|
|
138
|
-
External-source signals (`mail:*`, `notion:*`, `calendar:*`, `git:*`) reach you through `<observations>`. Consume them, route to `today.md` / `projects/*.md` / the `roadmap_candidate` queue per the Decision Framework below, but do **not** act back on the source system. Outbound writes against external services belong in the morning routine, evening review, or DM-reply paths — `routine.hourly_check` is a silent bookkeeping pass.
|
|
137
|
+
External-source signals (`mail:*`, `notion:*`, `calendar:*`, `git:*`) reach you through `<observations>`. Consume them, route to `state/today.md` / `projects/*.md` / the `roadmap_candidate` queue per the Decision Framework below, but do **not** act back on the source system. Outbound writes against external services belong in the morning routine, evening review, or DM-reply paths — `routine.hourly_check` is a silent bookkeeping pass.
|
|
139
138
|
|
|
140
139
|
This rule applies regardless of integration mode (direct, same-backend delegated, cross-backend delegated). It is owned by the routine, so a session whose `notion` / `mail` / `external-services` skill body was dropped under same-backend delegation (because the connector covers the surface) still inherits the constraint.
|
|
141
140
|
|
|
@@ -190,6 +189,11 @@ This rule applies regardless of integration mode (direct, same-backend delegated
|
|
|
190
189
|
6. Skip noise: journal-only edits, trivial formatting, auto-generated churn,
|
|
191
190
|
already-processed agent writes, deletion of auto-generated artifacts.
|
|
192
191
|
7. Mark processed observations consumed via POST /api/observations/consume.
|
|
192
|
+
Shape: `{"ids":[<int>...],"correlationId":"<verbatim from <event_correlation_id>>"}`.
|
|
193
|
+
Both fields are required and camelCase — `correlation_id` snake_case is
|
|
194
|
+
rejected. `ids` must be integers (not strings). Copy `correlationId`
|
|
195
|
+
verbatim from the `<event_correlation_id>…</event_correlation_id>` tag
|
|
196
|
+
in this prompt; do not paste the angle-bracket placeholder.
|
|
193
197
|
8. Urgency gate for POST /api/notify — the default is SILENCE. At most
|
|
194
198
|
ONE call per run, and only after the dedup pre-check passes AND one
|
|
195
199
|
of (a)(b)(c) holds with its concrete threshold:
|
|
@@ -200,7 +204,7 @@ This rule applies regardless of integration mode (direct, same-backend delegated
|
|
|
200
204
|
last 4 hours.
|
|
201
205
|
- The truncation marker `[...N earlier entries omitted ...]` appears
|
|
202
206
|
in `<today>` and you cannot rule out a same-day prior notification
|
|
203
|
-
from the truncated view. In that case `GET /api/context/today`
|
|
207
|
+
from the truncated view. In that case `GET /api/context/state/today`
|
|
204
208
|
once for the full log before deciding.
|
|
205
209
|
- A matching pending `POST /api/schedule/dm` or Agent Plan row is
|
|
206
210
|
already going to fire for this item within the next 2 hours
|
|
@@ -210,7 +214,7 @@ This rule applies regardless of integration mode (direct, same-backend delegated
|
|
|
210
214
|
(a) Hard deadline ≤ 2 hours away that the agent surfaced **this
|
|
211
215
|
hour** from new input (mail, DM, observation) AND the user has
|
|
212
216
|
not yet acted on it. **Self-set deadlines, course assignments,
|
|
213
|
-
class times, and items already in `today.md` ## User Tasks do
|
|
217
|
+
class times, and items already in `state/today.md` ## User Tasks do
|
|
214
218
|
NOT qualify** — they fail the awareness gate (see notify skill
|
|
215
219
|
§ Universal user-facing message discipline § Awareness gate).
|
|
216
220
|
A 6-hour deadline is NOT urgent regardless.
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
## Task: Monthly Review
|
|
46
46
|
|
|
47
47
|
The "Vault policy files" block appended to this prompt includes
|
|
48
|
-
`routines/monthly.md` — run any `### <label>` entries there alongside the
|
|
48
|
+
`policies/routines/monthly.md` — run any `### <label>` entries there alongside the
|
|
49
49
|
built-in review phases below, using the same journaling conventions.
|
|
50
50
|
The "Vault review context" block includes `context-index.md` and
|
|
51
|
-
`dossiers/monthly.md`; consult it during Phase 1 and update the
|
|
51
|
+
`knowledge/dossiers/monthly.md`; consult it during Phase 1 and update the
|
|
52
52
|
dossier's Open items / Last run before finishing. Writes to
|
|
53
|
-
`dossiers/<flow>.md` MUST preserve the existing YAML frontmatter block
|
|
53
|
+
`knowledge/dossiers/<flow>.md` MUST preserve the existing YAML frontmatter block
|
|
54
54
|
(`---\ntype: dossier\nowner: agent\nupdated: <date>\n---`); prefer
|
|
55
55
|
`PATCH` with a section target to mutate a single block, and when doing
|
|
56
56
|
a `PUT` full rewrite keep the frontmatter and only refresh `updated:`
|
|
@@ -59,9 +59,9 @@ a `PUT` full rewrite keep the frontmatter and only refresh `updated:`
|
|
|
59
59
|
Generate the monthly review snapshot for the current month and set up the next month.
|
|
60
60
|
|
|
61
61
|
This routine produces **two separate artifacts** with strict audience boundaries:
|
|
62
|
-
- **User-facing**: `monthly/YYYY-MM.md` + (optionally) a short notification.
|
|
62
|
+
- **User-facing**: `journal/monthly/YYYY-MM.md` + (optionally) a short notification.
|
|
63
63
|
Only real user work, wins, and next-month focus. No agent mechanics.
|
|
64
|
-
- **Agent-internal**: `agent
|
|
64
|
+
- **Agent-internal**: `journal/agent.md` (append). Monthly self-critique,
|
|
65
65
|
recurring filter/schedule failures, cross-week patterns in the agent's
|
|
66
66
|
own behavior, and concrete system improvement proposals. **Never**
|
|
67
67
|
surfaced to the user via notify.
|
|
@@ -71,7 +71,7 @@ workflow; the skill owns the file contract.
|
|
|
71
71
|
|
|
72
72
|
### Phase 1: Gather the month
|
|
73
73
|
1. Determine the target file name from <current_time>:
|
|
74
|
-
`monthly/YYYY-MM.md`.
|
|
74
|
+
`journal/monthly/YYYY-MM.md`.
|
|
75
75
|
|
|
76
76
|
**Pre-pass acquisition (none).** Unlike morning / hourly / today_refresh /
|
|
77
77
|
evening / weekly, monthly_review does NOT trigger an `<acquisition-plan>`
|
|
@@ -85,13 +85,13 @@ state rather than fetching fresh windows. If the dispatcher emitted any
|
|
|
85
85
|
continue.
|
|
86
86
|
2. Fetch source material for the current month:
|
|
87
87
|
- Use GET /api/context/list/daily to discover archived daily files and
|
|
88
|
-
read each `daily/YYYY-MM-DD.md` in the current month.
|
|
88
|
+
read each `journal/daily/YYYY-MM-DD.md` in the current month.
|
|
89
89
|
- Use GET /api/context/list/weekly to read weekly reviews that overlap this month.
|
|
90
|
-
- Read the last ~4 weekly sections of `agent
|
|
90
|
+
- Read the last ~4 weekly sections of `journal/agent.md` via GET — they
|
|
91
91
|
accumulate the agent-internal bucket across the month and are the basis
|
|
92
92
|
for Phase 3b's monthly retrospective.
|
|
93
93
|
- Also locate the **previous month's** `## Monthly YYYY-MM` section in
|
|
94
|
-
`agent
|
|
94
|
+
`journal/agent.md`. Extract its `### Proposed adjustments` bullets —
|
|
95
95
|
these are the improvement proposals you committed to last month. You
|
|
96
96
|
will evaluate their status in Phase 3b.
|
|
97
97
|
- Include <today> if it belongs to the same month.
|
|
@@ -114,13 +114,13 @@ continue.
|
|
|
114
114
|
|
|
115
115
|
### Phase 2: Synthesize — split into two buckets
|
|
116
116
|
5. Build TWO separate mental lists before writing anything:
|
|
117
|
-
a. **User-facing bucket** (goes to `monthly/YYYY-MM.md` and possibly notify):
|
|
117
|
+
a. **User-facing bucket** (goes to `journal/monthly/YYYY-MM.md` and possibly notify):
|
|
118
118
|
- What meaningful user progress happened this month?
|
|
119
119
|
- Which user commitments slipped or stayed open, and why (in terms the
|
|
120
120
|
user cares about, not agent mechanics)?
|
|
121
121
|
- What user-side risks or workload patterns carry into next month?
|
|
122
122
|
- What should the user prioritize next month?
|
|
123
|
-
b. **Agent-internal bucket** (goes to `agent
|
|
123
|
+
b. **Agent-internal bucket** (goes to `journal/agent.md` only):
|
|
124
124
|
- Cross-week patterns in scheduled-task failures / did-not-fire
|
|
125
125
|
- Filter and prioritization failures the agent noticed about itself
|
|
126
126
|
- Notification discipline: over-notify / under-notify patterns
|
|
@@ -133,7 +133,7 @@ continue.
|
|
|
133
133
|
own performance or reliability.
|
|
134
134
|
|
|
135
135
|
### Phase 3a: Write the user-facing review
|
|
136
|
-
7. PUT the review to `monthly/YYYY-MM.md`.
|
|
136
|
+
7. PUT the review to `journal/monthly/YYYY-MM.md`.
|
|
137
137
|
Required structure (user outcomes only — no agent mechanics in any section):
|
|
138
138
|
```
|
|
139
139
|
---
|
|
@@ -177,15 +177,15 @@ continue.
|
|
|
177
177
|
```
|
|
178
178
|
The `## Metrics` section tracks **user** activity only. Do not add rows
|
|
179
179
|
like "agent plan rows completed", "scheduled tasks fired", "observations
|
|
180
|
-
processed" — those belong in agent
|
|
180
|
+
processed" — those belong in journal/agent.md.
|
|
181
181
|
|
|
182
182
|
Skip the `## Reading` section entirely if the user imported zero books
|
|
183
183
|
and has zero completions this month — an empty reading block is noise.
|
|
184
184
|
8. Update roadmap.md and relevant projects/*.md when the review shows
|
|
185
185
|
milestone drift, completed phases, or a changed next-month focus.
|
|
186
186
|
|
|
187
|
-
### Phase 3b: Append to agent
|
|
188
|
-
9. PATCH-append a monthly retrospective block to `agent
|
|
187
|
+
### Phase 3b: Append to journal/agent.md (internal)
|
|
188
|
+
9. PATCH-append a monthly retrospective block to `journal/agent.md` via
|
|
189
189
|
`mode: "append_to_file"` (no `section` param needed — content is
|
|
190
190
|
appended to the end of the file). This is the cross-week synthesis of
|
|
191
191
|
the weekly sections that accumulated during the month.
|
|
@@ -236,7 +236,28 @@ continue.
|
|
|
236
236
|
cross-week frequency and drop the rest. Single-week anomalies are already
|
|
237
237
|
in that week's journal entry and do not need re-listing.
|
|
238
238
|
|
|
239
|
-
|
|
239
|
+
For each concrete, actionable bullet in `### Proposed adjustments`, also
|
|
240
|
+
record a structured self-critique signal:
|
|
241
|
+
|
|
242
|
+
```
|
|
243
|
+
POST /api/feedback
|
|
244
|
+
{
|
|
245
|
+
"source": "self_critique",
|
|
246
|
+
"summary": "<the specific testable adjustment, max 280 chars>",
|
|
247
|
+
"valence": "neutral",
|
|
248
|
+
"kind": "do-more",
|
|
249
|
+
"scope_type": "agent",
|
|
250
|
+
"action_kind": "agent_execution",
|
|
251
|
+
"evidence": { "excerpt": "monthly_review YYYY-MM proposed adjustment" }
|
|
252
|
+
}
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Post only concrete proposed adjustments. Do not post every retrospective
|
|
256
|
+
sentence, metrics row, or vague wish. If an adjustment is clearly about one
|
|
257
|
+
named Agent Definition's output, use `scope_type: "agent_slug"` and
|
|
258
|
+
`scope_ref` with that slug; otherwise keep `scope_type: "agent"`.
|
|
259
|
+
|
|
260
|
+
If `journal/agent.md` does not yet exist, PUT a minimal file with
|
|
240
261
|
`# Agent Journal\n\n` header plus this section, in a single call.
|
|
241
262
|
|
|
242
263
|
**Idempotency note**: if a `## Monthly YYYY-MM` section for the current
|
|
@@ -244,9 +265,60 @@ continue.
|
|
|
244
265
|
rollup collapses duplicate keys last-write-wins, so your newer append
|
|
245
266
|
automatically supersedes the earlier one within 24 hours.
|
|
246
267
|
|
|
268
|
+
### Phase 3c: Re-generalize feedback lessons (internal)
|
|
269
|
+
|
|
270
|
+
If a `<feedback_regeneralization>` block is present in your context, collapse
|
|
271
|
+
accumulated specific lessons into a smaller set of higher-level principles. This
|
|
272
|
+
is the monthly counterpart to the Evening Review's signal-folding: it processes
|
|
273
|
+
**no new signals and consumes nothing** — it only re-reads the already-consolidated
|
|
274
|
+
lesson stores the block lists and rewrites them. The daemon already did the
|
|
275
|
+
mechanical work: every `<scope>` carries its `store=` path and caps, and every
|
|
276
|
+
`<lesson>` carries a `rank` (rank 1 = lowest eviction score = drop-first), its
|
|
277
|
+
`ev`/`kind`/`last`, and a `stale="true"` flag when it is past the staleness
|
|
278
|
+
horizon. Your job is the **semantic** part — cluster lessons that share a theme
|
|
279
|
+
and phrase the generalization. If the block is absent, skip this phase entirely.
|
|
280
|
+
Like Phase 3b it is internal bookkeeping and emits no user-facing output.
|
|
281
|
+
|
|
282
|
+
For **each** `<scope … >` in the block, writing back to the `store=` path it
|
|
283
|
+
declares (`policies/agent-lessons.md` for the global `agent` scope;
|
|
284
|
+
`policies/agents/<slug>/lessons.md` for a per-agent `agent:<slug>` scope):
|
|
285
|
+
|
|
286
|
+
11. GET the scope's `store=` file. Identify clusters of two or more lessons that
|
|
287
|
+
express the same underlying preference at different surfaces — e.g.
|
|
288
|
+
"shorter mail summary", "shorter standup", "shorter report" all express
|
|
289
|
+
"default to terse output". For each cluster:
|
|
290
|
+
- Replace its members with **one** higher-level bullet that captures the
|
|
291
|
+
shared principle:
|
|
292
|
+
`- [<today>] <generalized directive> <!-- ev=<sum of the cluster's ev, min 1> kind=<the cluster's strongest kind> src=<strongest src> conf=<high if any member was high, else medium> last=<today> -->`
|
|
293
|
+
(summing `ev` keeps the merged lesson harder to evict — never re-derive it lower).
|
|
294
|
+
- Leave a lesson that belongs to no cluster untouched, byte-for-byte.
|
|
295
|
+
- **Never collapse, merge, or promote a `<!-- provisional -->` lesson.** The
|
|
296
|
+
worksheet block lists only active (promoted) lessons; the file also holds
|
|
297
|
+
provisional lessons awaiting corroboration, which the nightly evening pass
|
|
298
|
+
alone may promote. Preserve every provisional lesson in the file exactly as
|
|
299
|
+
it is — re-generalization is not a promotion path.
|
|
300
|
+
- **Do not** collapse across a contradiction: if two lessons give opposing
|
|
301
|
+
guidance, keep them separate and prefer the one with the more recent `last=`;
|
|
302
|
+
drop the stale opposite only when a `correction` superseded it.
|
|
303
|
+
- Drop any lesson the block marks `stale="true"` unless it joins a cluster —
|
|
304
|
+
a `kind=constraint` lesson is durable and is never collapsed away or
|
|
305
|
+
stale-pruned.
|
|
306
|
+
Re-generalization should make each store **smaller**, not larger; if a scope
|
|
307
|
+
has no genuine clusters, leave it unchanged.
|
|
308
|
+
12. After your edits, if the section still exceeds the scope's `cap_bytes` or
|
|
309
|
+
`max_entries`, remove existing lessons starting from `rank="1"` upward until
|
|
310
|
+
it fits, then append exactly one marker line:
|
|
311
|
+
`- [...N lower-signal lessons omitted — full history in feedback_signals]`.
|
|
312
|
+
Never evict a `kind=constraint` lesson.
|
|
313
|
+
Write the scope's section back with `PATCH <store= path> section=lessons
|
|
314
|
+
mode=replace`, applying the same GET-fresh / write-the-keep-list discipline
|
|
315
|
+
Phase 3a uses. A write failure on one scope must not block the others or any
|
|
316
|
+
later phase. There is **no consume call** in this phase — re-generalization
|
|
317
|
+
rewrites lessons in place and touches no `feedback_signals` rows.
|
|
318
|
+
|
|
247
319
|
### Phase 4: Notify (user-facing only)
|
|
248
320
|
10. The notification is for the USER, not a report of Phases 1–3. Never
|
|
249
|
-
mention monthly/YYYY-MM.md, agent
|
|
321
|
+
mention journal/monthly/YYYY-MM.md, journal/agent.md, "Monthly Review complete",
|
|
250
322
|
agent plan rows, did-not-fire, filter quality, observation processing,
|
|
251
323
|
or any other internal mechanism.
|
|
252
324
|
|
|
@@ -259,8 +331,8 @@ hold:
|
|
|
259
331
|
it in the first morning briefing of the new month anyway)
|
|
260
332
|
- No hard deadline within the next 30 days that is slipping
|
|
261
333
|
When the gate triggers: skip POST /api/notify entirely. The
|
|
262
|
-
monthly/YYYY-MM.md file is still written. Also log one line in the current
|
|
263
|
-
weekly section of agent
|
|
334
|
+
journal/monthly/YYYY-MM.md file is still written. Also log one line in the current
|
|
335
|
+
weekly section of journal/agent.md: `silent monthly wrap-up — nothing
|
|
264
336
|
actionable`.
|
|
265
337
|
|
|
266
338
|
#### 4b. When you DO notify — content rules
|
|
@@ -292,7 +364,7 @@ Good (something worth saying):
|
|
|
292
364
|
Next month's focus: Phase 2 foundation + the Q2 roadmap refresh.
|
|
293
365
|
|
|
294
366
|
Good (silent path — nothing is sent):
|
|
295
|
-
(no POST /api/notify call; one-line note appended to agent
|
|
367
|
+
(no POST /api/notify call; one-line note appended to journal/agent.md)
|
|
296
368
|
|
|
297
369
|
Bad (this is the failure mode this prompt exists to prevent):
|
|
298
370
|
Monthly Review YYYY-MM complete. Wrote monthly/2026-04.md. Metrics:
|
|
@@ -300,4 +372,4 @@ Bad (this is the failure mode this prompt exists to prevent):
|
|
|
300
372
|
processed 82. System improvement ideas logged. Review notification sent.
|
|
301
373
|
|
|
302
374
|
The bad example reports the agent's bookkeeping. Everything in it either
|
|
303
|
-
belongs in agent
|
|
375
|
+
belongs in journal/agent.md or was never worth telling the user.
|