@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
|
@@ -1,322 +0,0 @@
|
|
|
1
|
-
{context}
|
|
2
|
-
|
|
3
|
-
## Task: Morning Routine (04:00 pipeline)
|
|
4
|
-
|
|
5
|
-
This is the B-007 §5.9 nine-step pipeline. The daemon has already rotated
|
|
6
|
-
yesterday's `today.md` → `yesterday.md` before you start. Each numbered
|
|
7
|
-
step below maps to a §5.9 step. Follow the `context` skill for section
|
|
8
|
-
formats and entry shapes — this prompt owns the workflow; the skill owns
|
|
9
|
-
the schema.
|
|
10
|
-
|
|
11
|
-
The "Vault review context" block appended to this prompt includes
|
|
12
|
-
`context-index.md` and `dossiers/morning.md`; consult it during context
|
|
13
|
-
gathering and update the dossier's Open items / Last run before finishing.
|
|
14
|
-
Writes to `dossiers/<flow>.md` MUST preserve the existing YAML
|
|
15
|
-
frontmatter block (`---\ntype: dossier\nowner: agent\nupdated: <date>\n---`);
|
|
16
|
-
prefer `PATCH` with a section target to mutate a single block, and when
|
|
17
|
-
doing a `PUT` full rewrite keep the frontmatter and only refresh
|
|
18
|
-
`updated:` — writes that drop the frontmatter are rejected with 422.
|
|
19
|
-
|
|
20
|
-
Global rules (apply at every step):
|
|
21
|
-
- Do **not** add meta-maintenance tasks about context files, setup completion, or placeholder cleanup (for example, "initialize context files") to User Tasks or Handoff, whether carried from yesterday or newly discovered, unless the user explicitly asked to track them.
|
|
22
|
-
- If `<today_write_lock_id>` is present, every PUT/PATCH to
|
|
23
|
-
`/api/context/today` must send header `X-Lock-Id: <today_write_lock_id>`.
|
|
24
|
-
- Silent-by-default: your final text is agent-internal. User notifications
|
|
25
|
-
require an explicit `POST /api/notify`.
|
|
26
|
-
|
|
27
|
-
### Step 1 — Read handoff and derive day-type
|
|
28
|
-
1. Read `<yesterday>` ## Handoff.
|
|
29
|
-
- "### Tomorrow" items → candidates for today's User Tasks / Agent Notes.
|
|
30
|
-
- "### Later" items → carry into the new `today.md` ## Handoff.
|
|
31
|
-
2. Derive today's day-type header per the today skill "Header line —
|
|
32
|
-
day-type filter". Read `<user>` ## Notification Preferences for the
|
|
33
|
-
matching policy. The resulting line 2 of `today.md` is load-bearing —
|
|
34
|
-
every downstream event parses it.
|
|
35
|
-
|
|
36
|
-
> **Date reference for today.md.** Take the H1 date from
|
|
37
|
-
> `<current_agent_day date="…" weekday="…" />` in your prompt context, not
|
|
38
|
-
> from `<current_time>`. The two diverge between local midnight and
|
|
39
|
-
> `boundary_hour:00` local; the daemon validates line 1 against
|
|
40
|
-
> `<current_agent_day>` and rejects mismatches with 422. The morning
|
|
41
|
-
> routine prepares the agent-day in progress — never tomorrow.
|
|
42
|
-
|
|
43
|
-
### Step 2 — Sync external sources (apply the day-type filter at read time)
|
|
44
|
-
3. Mail, Calendar, and Notion acquisition. The pre-pass fetcher session
|
|
45
|
-
(`routine.fetch_window`) ran ahead of you and posted a `<fetch>` row's
|
|
46
|
-
worth of observations for every active mail / calendar / notion
|
|
47
|
-
integration. Calendar windows are pre-fetched ONLY for non-direct
|
|
48
|
-
modes (delegated / native); direct-mode calendar data is still
|
|
49
|
-
inlined into `<calendar_events_7d>` by ContextBuilder. The
|
|
50
|
-
`<fetch_report>` block injected ahead of this body tells you the
|
|
51
|
-
pre-pass status:
|
|
52
|
-
|
|
53
|
-
- `status="success"` or `"partial"` → freshly-fetched rows are
|
|
54
|
-
visible in `/api/observations?pending=true`. Trust the table.
|
|
55
|
-
- `status="failed"` → the pre-pass either crashed or its output was
|
|
56
|
-
unparseable. Pending observations from prior ticks may still be
|
|
57
|
-
present; treat the table as best-effort and skip integration
|
|
58
|
-
sections whose source_prefix returns nothing.
|
|
59
|
-
- `status="skipped"` → no integration was active for this routine
|
|
60
|
-
this tick; mail / notion sections are no-ops for this run.
|
|
61
|
-
|
|
62
|
-
Then drain pending observations and apply category / focus filtering:
|
|
63
|
-
|
|
64
|
-
a. **Mail observations**:
|
|
65
|
-
`GET /api/observations?pending=true&source_prefix=gmail:,outlook_mail:&limit=30`.
|
|
66
|
-
Classify each per the `mail` skill's category taxonomy. Drop any
|
|
67
|
-
whose day-type focus is `off`. When `summary_text` is NULL (the
|
|
68
|
-
async summarizer has not drained yet) fall back to a one-line
|
|
69
|
-
snippet from `payload.raw` (subject + from). Mail data arrives
|
|
70
|
-
here regardless of integration mode — the pre-pass partial
|
|
71
|
-
handled the direct / delegated-same / delegated-cross / native
|
|
72
|
-
wire surface for you.
|
|
73
|
-
|
|
74
|
-
b. **Notion observations**:
|
|
75
|
-
`GET /api/observations?pending=true&source_prefix=notion:&limit=20`.
|
|
76
|
-
Use for project / decision context only. Do NOT graduate Notion
|
|
77
|
-
edits into User Tasks unless the user explicitly tagged the entry.
|
|
78
|
-
|
|
79
|
-
c. **Calendar context** is already injected as `<calendar_events_7d>`
|
|
80
|
-
(multi-provider) ahead of this prompt — reference the block
|
|
81
|
-
directly in Step 6 (today.md generation). Mode-aware shape:
|
|
82
|
-
direct providers carry inline events; non-direct providers
|
|
83
|
-
(delegated / native) carry a hint pointing at
|
|
84
|
-
`/api/observations?source_prefix=google_calendar:,outlook_calendar:`
|
|
85
|
-
because the pre-pass already POSTed events there. Read the
|
|
86
|
-
observations table verbatim for non-direct providers — do NOT
|
|
87
|
-
re-drive the connector yourself.
|
|
88
|
-
|
|
89
|
-
Skip the entire step when no integrations are active and no mail /
|
|
90
|
-
notion observations are pending.
|
|
91
|
-
4. Source-of-Truth tasks: read `<management_rules>` ## Source of Truth →
|
|
92
|
-
Tasks, call the matching endpoint, drop filtered-off items before merge.
|
|
93
|
-
Skip if no external source is configured.
|
|
94
|
-
5. Roadmap ## Agent Action Plan — process items dated today or overdue
|
|
95
|
-
(not marked ✓). Drop items whose category focus is off, then:
|
|
96
|
-
- `[notify]` → `POST /api/schedule` + one row in `today.md` ## Agent Plan
|
|
97
|
-
- `[today]` → collect for `today.md` ## User Tasks
|
|
98
|
-
- `[check]` → `POST /api/schedule` (check-in) + one row in ## Agent Plan
|
|
99
|
-
- If a roadmap row includes `[provisional ...]`, copy that tag and
|
|
100
|
-
its meaning into the scheduled task `description` so
|
|
101
|
-
`scheduled.task.md` frames the first contact as a confirmation
|
|
102
|
-
question, not a directive.
|
|
103
|
-
- Mark processed roadmap rows complete via `PATCH /api/context/roadmap`,
|
|
104
|
-
`section=agent_action_plan`, `mode=replace`, rewriting the exact
|
|
105
|
-
row from `- YYYY-MM-DD [tag]: ...` to
|
|
106
|
-
`- ✓ completed <today>: YYYY-MM-DD [tag]: ...`. Keep the entry ID
|
|
107
|
-
marker and all existing completed rows byte-for-byte.
|
|
108
|
-
Then generate **look-ahead entries** for tomorrow → +3 days by cross-
|
|
109
|
-
referencing unprocessed roadmap items against `<calendar_events_7d>`.
|
|
110
|
-
These go into `today.md` ## Agent Notes using the skill's "Agent Notes
|
|
111
|
-
flavor 1: Look-ahead checklist" format (`- [ ] (HIGH/MID/LOW) ...`).
|
|
112
|
-
Skip this step entirely if no today-items and no look-ahead items exist.
|
|
113
|
-
|
|
114
|
-
### Step 3 — Review overnight user-originated observations
|
|
115
|
-
6. Call `GET /api/observations?pending=true&actor=user` (observations
|
|
116
|
-
skill). This is the **user-actor** complement to Step 2 — mail / notion
|
|
117
|
-
rows posted by the pre-pass / partials carry `actor=agent` and have
|
|
118
|
-
already been folded in. Step 3 picks up anything the user themselves
|
|
119
|
-
changed overnight (Obsidian edits, manual file drops, git commits)
|
|
120
|
-
that the daemon recorded under `actor=user`. Fold only meaningful
|
|
121
|
-
changes into the `today.md` draft you're building, respecting the
|
|
122
|
-
day-type filter.
|
|
123
|
-
|
|
124
|
-
### Step 4 — Inbox triage (B-007 §5.9 Q5 case A)
|
|
125
|
-
7. `GET /api/context/list/inbox` to enumerate pasted memos. For each file:
|
|
126
|
-
- `GET /api/context/inbox/<file>` to read the body, then classify:
|
|
127
|
-
**project**, **user**, **memo**, **task**.
|
|
128
|
-
- Integrate into the right target:
|
|
129
|
-
- existing project → append to `projects/<slug>.md` (notify tier).
|
|
130
|
-
- new-project shape → DM to confirm *"create project `<slug>`?"* and
|
|
131
|
-
wait for reply before creating the file.
|
|
132
|
-
- New `projects/<slug>.md` files must include YAML frontmatter: `type: project`, `owner: shared`, `updated: YYYY-MM-DD`, then an H1.
|
|
133
|
-
- user dictionary (people / health / goals / …) → append to the
|
|
134
|
-
matching `user/<area>.md`.
|
|
135
|
-
- date-bound memo → summarize into `today.md` ## Agent Notes.
|
|
136
|
-
- unclassifiable → DM the user an excerpt asking what to do; leave
|
|
137
|
-
the file in `inbox/` for next pass.
|
|
138
|
-
- After integration, move the original: (a) `PUT /api/context/agent/scratch/inbox-YYYY-MM-DD-<orig-slug>.md` with the original body, then (b) `DELETE /api/context/inbox/<file>` to remove the source. The 30-day retention on `agent/scratch/` is a convention for now — no sweeper exists yet.
|
|
139
|
-
- **High-risk triggers — DM for confirmation before writing:**
|
|
140
|
-
new project creation, wholesale overwrite of `user/profile.md`,
|
|
141
|
-
financial or health data with a numeric impact. The agent's own
|
|
142
|
-
judgment is the gate — call `POST /api/notify` with the
|
|
143
|
-
proposed change and wait for confirmation; don't auto-write.
|
|
144
|
-
- **Hard stop (never write)** — if the memo contains anything that
|
|
145
|
-
looks like a credential, password, API key, or private token, do
|
|
146
|
-
NOT write it to any context file. Log one line to ## Agent Log
|
|
147
|
-
(`- HH:MM [inbox] skipped <file>: secret suspected`), leave the
|
|
148
|
-
source file in `inbox/` for the user to handle, and move on. This
|
|
149
|
-
overrides the "DM then proceed" path above — see _safety.md.
|
|
150
|
-
|
|
151
|
-
### Step 5 — Daily journal synthesis (skipped on first-run flow)
|
|
152
|
-
8. Synthesize yesterday's journal from the data you already have:
|
|
153
|
-
- `<yesterday_agent_actions>` — previous agent-day execution rows from
|
|
154
|
-
SQLite. Use these for authoritative timing / result counts.
|
|
155
|
-
- `<yesterday_messages>` — previous agent-day non-system messages from
|
|
156
|
-
SQLite. Use these for conversations that never made it into
|
|
157
|
-
`yesterday.md`.
|
|
158
|
-
- `<yesterday_dm_conversation_log>` — rolling DM summaries recorded in
|
|
159
|
-
SQLite; useful when many message rows collapse into one thread.
|
|
160
|
-
- `<yesterday>` — User Schedule, User Tasks, Agent Plan, Agent Log,
|
|
161
|
-
Handoff sections are the primary source. The `## Agent Log` line
|
|
162
|
-
entries are authoritative for what the agent did; `## User Schedule`
|
|
163
|
-
for what was planned; conversations you handled yesterday surface
|
|
164
|
-
through Agent Log entries the agent wrote at the time.
|
|
165
|
-
- Step 4 inbox triage outcomes — in-memory from this very run.
|
|
166
|
-
- `<calendar_events_7d>` — reconcile against yesterday's column for
|
|
167
|
-
attended/skipped flags on the Schedule section.
|
|
168
|
-
If SQLite tags disagree with `yesterday.md`, prefer SQLite for counts,
|
|
169
|
-
timing, and whether an interaction/action happened at all; prefer
|
|
170
|
-
`yesterday.md` for curated phrasing already shown to the user.
|
|
171
|
-
Compose `daily/YYYY-MM-DD.md` (YYYY-MM-DD = yesterday's agent-day
|
|
172
|
-
date) following the **`Daily journal format spec`** policy block above.
|
|
173
|
-
- Output language: follow `<output_language_policy>` (Policy B —
|
|
174
|
-
skeleton H2 headers stay English; body prose in
|
|
175
|
-
`<settings primary_language>`). Keep technical terms in their
|
|
176
|
-
original form.
|
|
177
|
-
- When `<settings vault_mode>` is `obsidian`, render project / people
|
|
178
|
-
references as `[[wikilink]]`s resolving to `projects/<slug>.md` or
|
|
179
|
-
`user/people.md#...`. When `plain`, write plain text only.
|
|
180
|
-
- Apply redaction from the `Redaction patterns` and `Journal export
|
|
181
|
-
rules` policy blocks above.
|
|
182
|
-
- Include frontmatter fields `date`, `weekday`, `type: daily`, `owner: agent`, `updated`,
|
|
183
|
-
`agent_generated: true`, `agent_last_synced_at`, `content_hash`,
|
|
184
|
-
`projects`, `people`, `tags`, `calendar_events`, `messages_handled`.
|
|
185
|
-
If the API rejects unknown fields, write the ones it accepts and
|
|
186
|
-
log the gap in `agent/journal.md` (Step 9).
|
|
187
|
-
- If `<yesterday>` frontmatter carries `no_journal_export: true`,
|
|
188
|
-
write the placeholder `[Skipped by user request]` as body and still
|
|
189
|
-
populate required frontmatter fields.
|
|
190
|
-
- Conflict handling: first `GET /api/context/daily/YYYY-MM-DD.md`.
|
|
191
|
-
- 404 → `PUT /api/context/daily/YYYY-MM-DD.md` with the full body.
|
|
192
|
-
- 200 → the user (or a prior run) already wrote this date. Do **not**
|
|
193
|
-
PUT-overwrite. Instead `PATCH /api/context/daily/YYYY-MM-DD.md`
|
|
194
|
-
with `mode=append_to_file` and a new section
|
|
195
|
-
`## Agent revision — YYYY-MM-DDTHH:MM:SS` whose body is the
|
|
196
|
-
synthesized journal. B-006 content-hash protection.
|
|
197
|
-
|
|
198
|
-
### Step 6 — Generate new today.md (PUT full replace)
|
|
199
|
-
9. Follow the context skill "Structure overview", "Entry formats", and
|
|
200
|
-
"Required sections for full replace" sections for the exact schema.
|
|
201
|
-
The H1 (line 1) MUST be `# <current_agent_day.date> (<current_agent_day.weekday>)`
|
|
202
|
-
exactly — the daemon rejects mismatches with 422. No YAML frontmatter
|
|
203
|
-
on today.md. Agent Plan rows MUST match
|
|
204
|
-
`- [ ] HH:MM <action> [work|study|personal|home] →<DM|notify|check-in|wake>`;
|
|
205
|
-
any other category or trigger keyword is rejected and forces a retry
|
|
206
|
-
on Sonnet.
|
|
207
|
-
Source → section mapping:
|
|
208
|
-
- ## User Schedule ← `<calendar_events_7d>` (filtered). Write
|
|
209
|
-
`- (calendar unavailable)` when the block has been replaced by
|
|
210
|
-
`<calendar_status>Calendar service not available...</calendar_status>`
|
|
211
|
-
(no active provider) or when every `<provider>` sub-block's
|
|
212
|
-
directive fetch failed for this run.
|
|
213
|
-
- ## User Tasks ← Step 1 handoff Tomorrow + Step 2 email actionables
|
|
214
|
-
+ SoT tasks + roadmap `[today]`. Use `<active_projects>` for context.
|
|
215
|
-
- ## Agent Plan ← Step 2 `[notify]`/`[check]` rows plus any
|
|
216
|
-
proactive reminders you add (meeting pre-briefs, deadline nudges).
|
|
217
|
-
Every row will be registered in Step 7 — the Agent Plan contract is
|
|
218
|
-
defined in the skill's "User Tasks vs Agent Plan" section.
|
|
219
|
-
- ## Agent Notes ← Step 2 look-ahead items + date-bound memos folded
|
|
220
|
-
from Step 4 inbox triage.
|
|
221
|
-
- ## Agent Log ← initialize with
|
|
222
|
-
`- HH:MM Morning Routine completed (day-type: …)`.
|
|
223
|
-
- ## Handoff ← Step 1 "Later" items, dropping past dates.
|
|
224
|
-
Write `- (none)` if empty.
|
|
225
|
-
10. Update `roadmap.md` only if a milestone completed or shifted today.
|
|
226
|
-
|
|
227
|
-
### Step 7 — Register schedule
|
|
228
|
-
11. Register every `## Agent Plan` row via `POST /api/schedule` (schedule skill owns the contract). This is the Agent Plan contract — every
|
|
229
|
-
`- [ ] HH:MM … [cat] → <trigger>` row must have exactly one matching
|
|
230
|
-
schedule entry.
|
|
231
|
-
> **Morning briefing scheduling moved.** The morning briefing is no
|
|
232
|
-
> longer registered here. It is a `recurring_schedules` row
|
|
233
|
-
> (`task_type='dm_session'`, `task_context.sub_flow='morning_briefing'`)
|
|
234
|
-
> created at setup completion and reconciled daily by the daemon. The
|
|
235
|
-
> firing session runs under the `conversational` profile via the
|
|
236
|
-
> `scheduled.dm.md` task-flow. See SCHEDULED-DM-IMPLEMENTATION-PLAN.md.
|
|
237
|
-
|
|
238
|
-
### Step 7.5 — Profile-interview queue (latent, two-phase)
|
|
239
|
-
|
|
240
|
-
Use the **user-interview** skill. This step has two phases — phase (a)
|
|
241
|
-
ALWAYS runs (it is what keeps today.md's ## Agent Notes mirror in sync
|
|
242
|
-
across day boundaries, since today.md is PUT-replaced fresh each
|
|
243
|
-
morning); phase (b) only runs when there is no open question.
|
|
244
|
-
|
|
245
|
-
#### Step 7.5a — Mirror existing latent entries to today.md (always)
|
|
246
|
-
|
|
247
|
-
GET `agent/profile-questions.md ## In Progress`. For every entry whose
|
|
248
|
-
state is `latent` (NOT `asked` — those have already been answered or
|
|
249
|
-
will be cleaned up by the sweep), append one line to `today.md`
|
|
250
|
-
`## Agent Notes` using the **today** skill's "Latent profile question"
|
|
251
|
-
Agent Notes flavor:
|
|
252
|
-
|
|
253
|
-
```
|
|
254
|
-
- Profile question (latent): <id> — wait for natural opportunity
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
This is the only writer of the `Profile question (latent):` line.
|
|
258
|
-
Without it, a row
|
|
259
|
-
that stays latent across multiple days disappears from today.md after
|
|
260
|
-
day 1's PUT-replace and the DM-handler / morning-briefing opportunity
|
|
261
|
-
checks lose their visible cue.
|
|
262
|
-
|
|
263
|
-
#### Step 7.5b — Pick a new question (conditional)
|
|
264
|
-
|
|
265
|
-
Skip phase (b) entirely if any of:
|
|
266
|
-
(a) `## In Progress` is non-empty (a prior latent / asked entry is
|
|
267
|
-
already open — we hold to the 1-question-at-a-time invariant).
|
|
268
|
-
(b) The user has not sent a DM in the last 24h (no point if they're
|
|
269
|
-
absent).
|
|
270
|
-
(c) Day-type focus for `[personal]` on line 2 of `<today>` is `off`.
|
|
271
|
-
(d) `## Pending` is empty.
|
|
272
|
-
|
|
273
|
-
Otherwise, walk Pending rows in priority order (HIGH → MID → LOW, then
|
|
274
|
-
file order). For each candidate:
|
|
275
|
-
- If the row carries `<!-- last_attempted=YYYY-MM-DD -->` within the
|
|
276
|
-
last 7 days, skip — cooldown.
|
|
277
|
-
- GET `/api/profile-questions/slot-filled?path=<target>§ion=<section?>&anchor=<anchor?>`
|
|
278
|
-
for the row. If `filled: true`, the slot was filled since the last
|
|
279
|
-
sweep — tick the row `[ ]` → `[x]` (read-rebuild + replace), append
|
|
280
|
-
`- [x] <today> → <id> (reconciled:morning)` to `## Answered`,
|
|
281
|
-
continue to the next candidate.
|
|
282
|
-
- Otherwise this is the chosen row. Stop walking.
|
|
283
|
-
|
|
284
|
-
If a row was chosen:
|
|
285
|
-
|
|
286
|
-
1. PATCH `agent/profile-questions.md ## In Progress` (read-rebuild +
|
|
287
|
-
replace) — add a single entry. The `since=<today>` field is
|
|
288
|
-
load-bearing for the evening sweep's 3-day fallback computation:
|
|
289
|
-
```
|
|
290
|
-
- <id> :: state=latent :: since=<today>
|
|
291
|
-
```
|
|
292
|
-
2. PATCH `today.md ## Agent Notes` (mode=append) — same flavor as
|
|
293
|
-
phase (a):
|
|
294
|
-
```
|
|
295
|
-
- Profile question (latent): <id> — wait for natural opportunity
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
**Do NOT register a `POST /api/schedule` for this row.** Latent rows
|
|
299
|
-
are NOT scheduled DMs — they wait for a natural opportunity (DM topic
|
|
300
|
-
match or morning briefing piggyback). The fallback DM path is owned by
|
|
301
|
-
the evening sweep (Operation 5B), not the morning routine.
|
|
302
|
-
|
|
303
|
-
### Step 8 — Extension checks from routines/morning.md
|
|
304
|
-
12. The `Morning routine checks` policy block above is the user-editable
|
|
305
|
-
extension surface. Execute any check listed there that is **not
|
|
306
|
-
already covered by Steps 1-7**. User-added entries typically carry an
|
|
307
|
-
`**Added: YYYY-MM-DD by user via DM**` line — those are your target.
|
|
308
|
-
|
|
309
|
-
### Step 9 — Log to agent/journal.md (English, always)
|
|
310
|
-
13. Append a one-paragraph English summary to `agent/journal.md` via
|
|
311
|
-
`PATCH /api/context/agent/journal` with `mode=append_to_file` (this
|
|
312
|
-
is the only append mode that takes no `section` argument — it's
|
|
313
|
-
designed for append-only journals). Use this shape:
|
|
314
|
-
```
|
|
315
|
-
## YYYY-MM-DD morning routine
|
|
316
|
-
- Day-type: <weekday / weekend / focus / …>
|
|
317
|
-
- Journal: daily/YYYY-MM-DD.md (<N lines, M projects referenced>)
|
|
318
|
-
- Inbox: <N files triaged, M moved to scratch, K DM-confirmations sent>
|
|
319
|
-
- Checks from routines/morning.md: <list any user-added ones executed>
|
|
320
|
-
- Anomalies / skipped steps: <short notes or "none">
|
|
321
|
-
```
|
|
322
|
-
<output_language>english_only — Policy A surface (agent journal, parsed log); `<output_language_policy>` carves this out explicitly.</output_language>
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
{context}
|
|
2
|
-
|
|
3
|
-
## Task: Morning Routine — Initial run (no prior-day data)
|
|
4
|
-
|
|
5
|
-
This is the first-boot variant of the B-007 §5.9 pipeline. No
|
|
6
|
-
`yesterday.md` exists yet, so Steps 1 (handoff) and 5 (daily journal
|
|
7
|
-
synthesis) are skipped. Everything else mirrors the standard morning
|
|
8
|
-
routine. Follow the `context` skill for schema.
|
|
9
|
-
|
|
10
|
-
The "Vault review context" block appended to this prompt includes
|
|
11
|
-
`context-index.md` and `dossiers/morning.md`; consult it during context
|
|
12
|
-
gathering and update the dossier's Open items / Last run before finishing.
|
|
13
|
-
Writes to `dossiers/<flow>.md` MUST preserve the existing YAML
|
|
14
|
-
frontmatter block (`---\ntype: dossier\nowner: agent\nupdated: <date>\n---`);
|
|
15
|
-
prefer `PATCH` with a section target to mutate a single block, and when
|
|
16
|
-
doing a `PUT` full rewrite keep the frontmatter and only refresh
|
|
17
|
-
`updated:` — writes that drop the frontmatter are rejected with 422.
|
|
18
|
-
|
|
19
|
-
Global rules:
|
|
20
|
-
- Do **not** add meta-maintenance tasks about context files, setup completion, or placeholder cleanup to User Tasks (there is no handoff to carry them from in the initial flow) unless the user explicitly asked to track them.
|
|
21
|
-
- If `<today_write_lock_id>` is present, every PUT/PATCH to
|
|
22
|
-
`/api/context/today` must send header `X-Lock-Id: <today_write_lock_id>`.
|
|
23
|
-
- Silent-by-default: your final text is agent-internal. User notifications
|
|
24
|
-
require an explicit `POST /api/notify`.
|
|
25
|
-
|
|
26
|
-
### Step 1 — Derive day-type (no handoff to read)
|
|
27
|
-
1. Derive today's day-type header per the today skill "Header line —
|
|
28
|
-
day-type filter". Read `<user>` ## Notification Preferences for the
|
|
29
|
-
matching policy. Write the resulting line as line 2 of `today.md`.
|
|
30
|
-
|
|
31
|
-
> **Date reference for today.md.** Take the H1 date from
|
|
32
|
-
> `<current_agent_day date="…" weekday="…" />` in your prompt context, not
|
|
33
|
-
> from `<current_time>`. They diverge between local midnight and
|
|
34
|
-
> `boundary_hour:00` local; the daemon validates line 1 against
|
|
35
|
-
> `<current_agent_day>` and rejects mismatches with 422. The morning
|
|
36
|
-
> routine prepares the agent-day in progress — never tomorrow.
|
|
37
|
-
|
|
38
|
-
### Step 2 — Sync external sources
|
|
39
|
-
2. Mail and Notion acquisition. The pre-pass fetcher session
|
|
40
|
-
(`routine.fetch_window`) ran ahead of you and posted observations
|
|
41
|
-
for every active mail / notion integration. The `<fetch_report>`
|
|
42
|
-
block in your prompt tells you the pre-pass status — `success` /
|
|
43
|
-
`partial` means the table is fresh, `failed` / `skipped` means
|
|
44
|
-
trust nothing newer than the prior tick.
|
|
45
|
-
|
|
46
|
-
Drain pending observations and apply category / focus filtering:
|
|
47
|
-
|
|
48
|
-
a. **Mail observations**:
|
|
49
|
-
`GET /api/observations?pending=true&source_prefix=gmail:,outlook_mail:&limit=30`.
|
|
50
|
-
Classify each actionable item into a category tag and drop any
|
|
51
|
-
whose day-type focus is `off`. When `summary_text` is NULL fall
|
|
52
|
-
back to a one-line snippet from `payload.raw`. Mail data arrives
|
|
53
|
-
here regardless of integration mode — the pre-pass partial
|
|
54
|
-
handled the wire surface.
|
|
55
|
-
|
|
56
|
-
b. **Notion observations**:
|
|
57
|
-
`GET /api/observations?pending=true&source_prefix=notion:&limit=20`.
|
|
58
|
-
Use for project / decision context only.
|
|
59
|
-
|
|
60
|
-
c. **Calendar context** is already injected as `<calendar_events_7d>`
|
|
61
|
-
(multi-provider) ahead of this prompt — reference the block
|
|
62
|
-
directly in Step 6.
|
|
63
|
-
|
|
64
|
-
Skip the entire step when no integrations are active and no mail /
|
|
65
|
-
notion observations are pending.
|
|
66
|
-
3. Source-of-Truth tasks: read `<management_rules>` ## Source of Truth →
|
|
67
|
-
Tasks, call the matching endpoint, drop filtered-off items.
|
|
68
|
-
4. Roadmap ## Agent Action Plan — process items dated today or overdue:
|
|
69
|
-
- `[notify]` → `POST /api/schedule` + one row in ## Agent Plan
|
|
70
|
-
- `[today]` → collect for ## User Tasks
|
|
71
|
-
- `[check]` → `POST /api/schedule` (check-in) + one row in ## Agent Plan
|
|
72
|
-
- Mark processed items with ✓ via `PATCH /api/context/roadmap`,
|
|
73
|
-
`section=agent_action_plan`, `mode=replace`.
|
|
74
|
-
Generate look-ahead entries for tomorrow → +3 days (roadmap vs
|
|
75
|
-
`<calendar_events_7d>`) into ## Agent Notes using the skill's "Agent
|
|
76
|
-
Notes flavor 1: Look-ahead checklist" format.
|
|
77
|
-
|
|
78
|
-
### Step 3 — Review overnight user-originated observations
|
|
79
|
-
5. `GET /api/observations?pending=true&actor=user` (observations skill).
|
|
80
|
-
This is the user-actor complement to Step 2 — mail / notion rows
|
|
81
|
-
posted by the partials carry `actor=agent` and have already been
|
|
82
|
-
folded in. Step 3 picks up user-originated changes (manual file drops,
|
|
83
|
-
Obsidian edits, git commits) recorded under `actor=user`. Fold only
|
|
84
|
-
meaningful changes into the draft.
|
|
85
|
-
|
|
86
|
-
### Step 4 — Inbox triage
|
|
87
|
-
6. `GET /api/context/list/inbox` to enumerate any pasted memos the user
|
|
88
|
-
dropped during setup. For each file: `GET /api/context/inbox/<file>`,
|
|
89
|
-
classify (project / user / memo / task), integrate into the matching
|
|
90
|
-
target. After integration, `PUT /api/context/agent/scratch/inbox-YYYY-MM-DD-<slug>.md` with the original body, then `DELETE /api/context/inbox/<file>`. DM-confirm high-risk cases (new project creation, user-profile overwrites, financial or health numerics). **Hard stop**: if a memo contains anything that looks like a credential, password, API key, or private token, skip it — do NOT write it anywhere, log `- HH:MM [inbox] skipped <file>: secret suspected`, leave the file in `inbox/`, and move on (overrides the DM-confirm path; see _safety.md).
|
|
91
|
-
|
|
92
|
-
### Step 5 — Skipped (no prior day to synthesize from)
|
|
93
|
-
Journal synthesis is deferred to the next morning run. The first
|
|
94
|
-
`daily/*.md` file is generated tomorrow.
|
|
95
|
-
|
|
96
|
-
### Step 6 — Generate today.md (PUT full replace)
|
|
97
|
-
7. Follow the context skill "Structure overview", "Entry formats", and
|
|
98
|
-
"Required sections for full replace". The H1 (line 1) MUST be
|
|
99
|
-
`# <current_agent_day.date> (<current_agent_day.weekday>)` exactly — the
|
|
100
|
-
daemon rejects mismatches with 422. No YAML frontmatter on today.md.
|
|
101
|
-
Agent Plan rows MUST match
|
|
102
|
-
`- [ ] HH:MM <action> [work|study|personal|home] →<DM|notify|check-in|wake>`.
|
|
103
|
-
Source → section mapping:
|
|
104
|
-
- ## User Schedule ← `<calendar_events_7d>` (filtered). Write
|
|
105
|
-
`- (calendar unavailable)` when the block has been replaced by
|
|
106
|
-
`<calendar_status>Calendar service not available...</calendar_status>`
|
|
107
|
-
(no active provider) or when every `<provider>` sub-block's
|
|
108
|
-
directive fetch failed for this run.
|
|
109
|
-
- ## User Tasks ← Step 2 email actionables + SoT tasks + roadmap
|
|
110
|
-
`[today]`. Use `<active_projects>` for context. Drop meta-maintenance.
|
|
111
|
-
- ## Agent Plan ← Step 2 `[notify]`/`[check]` rows plus any
|
|
112
|
-
proactive reminders you add. Each row will be registered in Step 7.
|
|
113
|
-
- ## Agent Notes ← Step 2 look-ahead items + any date-bound memos
|
|
114
|
-
folded from Step 4 inbox triage.
|
|
115
|
-
- ## Agent Log ← initialize with
|
|
116
|
-
`- HH:MM Morning Routine (initial) completed (day-type: …)`.
|
|
117
|
-
- ## Handoff ← `- (none)` (no carry-over data available).
|
|
118
|
-
8. **Populate `roadmap.md` inline (initial-day variant).** On the very first
|
|
119
|
-
morning routine the setup wizard's skeleton roadmap is still in place
|
|
120
|
-
(the `## Annual Goals`, `## Quarterly Focus`, and `## Agent Action Plan`
|
|
121
|
-
sections all contain the placeholder line `_(Not yet configured)_`).
|
|
122
|
-
When *any* of those placeholders is still present, run a full populate
|
|
123
|
-
per the `roadmap` skill — same forward-90-day scope as
|
|
124
|
-
`routine.roadmap_refresh` (Annual Goals from the management rules,
|
|
125
|
-
Quarterly Focus from active projects + `<calendar_events_7d>`,
|
|
126
|
-
Preparation Timeline from `travel_bookings` + dated calendar items,
|
|
127
|
-
Agent Action Plan seeded from User Tasks + roadmap-relevant
|
|
128
|
-
`agent_schedule` rows). Acquire the cross-request write lock via the
|
|
129
|
-
skill before any `PUT /api/context/roadmap` — the daemon enforces it
|
|
130
|
-
and a missing lock returns 423. If every placeholder has already been
|
|
131
|
-
replaced (rare: a previous initial run completed Step 6.8 then today.md
|
|
132
|
-
failed, or a manual edit landed), fall back to the regular
|
|
133
|
-
morning-routine semantics: spot-update only if a milestone completed
|
|
134
|
-
or shifted. Skipping this step leaves roadmap.md as the skeleton — the
|
|
135
|
-
daemon's `isRoadmapStale()` post-hook then schedules a separate
|
|
136
|
-
`routine.roadmap_refresh` to make it good, but the user will see a
|
|
137
|
-
blank-looking roadmap until that second session lands. Doing it inline
|
|
138
|
-
here is one Sonnet/Opus turn instead of two and removes ~1–2 minutes
|
|
139
|
-
of post-setup latency.
|
|
140
|
-
|
|
141
|
-
### Step 7 — Register schedule
|
|
142
|
-
9. Register every `## Agent Plan` row via `POST /api/schedule`.
|
|
143
|
-
10. **Ensure the daily morning briefing recurring schedule exists.**
|
|
144
|
-
The setup wizard's `ensureMorningBriefingRecurring` (`packages/daemon/src/api/routes/setup.ts`)
|
|
145
|
-
normally seeds this row at first save-rules, so the daily fire
|
|
146
|
-
path is daemon-owned and the description is hardcoded. The check
|
|
147
|
-
below covers the rare case where setup completed without the
|
|
148
|
-
seeder (legacy setup, partial DB restore).
|
|
149
|
-
|
|
150
|
-
a. **Pre-flight.** `GET /api/recurring-schedules?enabled=true` and
|
|
151
|
-
scan for an item with `taskType === "dm_session"` AND
|
|
152
|
-
`taskContext.sub_flow === "morning_briefing"`. If found, skip
|
|
153
|
-
the rest of this step — duplicate insertion would cause double
|
|
154
|
-
daily fires. Log one line to `## Agent Log`:
|
|
155
|
-
`- HH:MM [morning_routine_initial] morning briefing recurring already seeded`.
|
|
156
|
-
|
|
157
|
-
b. **If absent, register via `POST /api/recurring-schedules`** with
|
|
158
|
-
this body (NOT `POST /api/schedule`):
|
|
159
|
-
```json
|
|
160
|
-
{
|
|
161
|
-
"taskType": "dm_session",
|
|
162
|
-
"description": "morning briefing — daily summary",
|
|
163
|
-
"recurrenceRule": {
|
|
164
|
-
"frequency": "daily",
|
|
165
|
-
"time": "<quiet_hours_end or 08:00>",
|
|
166
|
-
"timezone": "<user timezone from <settings primary_timezone> or system default>"
|
|
167
|
-
},
|
|
168
|
-
"taskContext": {
|
|
169
|
-
"sub_flow": "morning_briefing",
|
|
170
|
-
"pin_to_quiet_hours_end": true
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
```
|
|
174
|
-
The `dm_session` task_type + `sub_flow=morning_briefing` is the
|
|
175
|
-
activation key the daemon's scheduler keys off to emit a
|
|
176
|
-
`scheduled.dm` event (see `scheduler.ts` and the sub-flow
|
|
177
|
-
router in `scheduled.dm.md`). Description ≥ 20 chars per the
|
|
178
|
-
schema; `"morning briefing — daily summary"` matches the
|
|
179
|
-
wording the daemon's seeder uses verbatim.
|
|
180
|
-
|
|
181
|
-
Do **not** add a one-off `## Agent Plan` row for today's briefing
|
|
182
|
-
here. The recurring-schedule reconciler (poll loop in
|
|
183
|
-
`scheduler.ts`) materialises today's `agent_schedule` row
|
|
184
|
-
automatically from `next_run_at`; hand-seeding would duplicate.
|
|
185
|
-
Do **not** send the briefing yourself from this run — this runs
|
|
186
|
-
during quiet hours.
|
|
187
|
-
|
|
188
|
-
### Step 8 — Extension checks from routines/morning.md
|
|
189
|
-
11. Execute any check from the `Morning routine checks` policy block that
|
|
190
|
-
is not already covered by Steps 1-7 (typically user-added entries
|
|
191
|
-
with an `**Added:** ...` line).
|
|
192
|
-
|
|
193
|
-
### Step 9 — Log to agent/journal.md (English, always)
|
|
194
|
-
12. Append a one-paragraph English summary to `agent/journal.md` via
|
|
195
|
-
`PATCH /api/context/agent/journal` with `mode=append_to_file`:
|
|
196
|
-
```
|
|
197
|
-
## YYYY-MM-DD morning routine (initial)
|
|
198
|
-
- Day-type: …
|
|
199
|
-
- Journal synthesis: skipped (no prior-day data)
|
|
200
|
-
- Inbox: <N files triaged, M moved to scratch, K DM-confirmations sent>
|
|
201
|
-
- Checks from routines/morning.md: <list any user-added ones executed>
|
|
202
|
-
- Anomalies / skipped steps: <short notes or "none">
|
|
203
|
-
```
|
|
204
|
-
Always English (B-007 §3 P6).
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: index
|
|
3
|
-
owner: agent
|
|
4
|
-
updated: 2026-04-17
|
|
5
|
-
template_version: 1
|
|
6
|
-
---
|
|
7
|
-
# Context Index
|
|
8
|
-
|
|
9
|
-
Prompt-injection hub for dossier-backed flows (B-004). This file stays in
|
|
10
|
-
English so review / routine prompts read a stable, backend-neutral summary.
|
|
11
|
-
|
|
12
|
-
## Files
|
|
13
|
-
|
|
14
|
-
| Path | Purpose | Review flows | Last touched |
|
|
15
|
-
|---|---|---|---|
|
|
16
|
-
| `_index.md` | Human-readable vault navigation | - | 2026-04-17 |
|
|
17
|
-
| `user/profile.md` | User identity, preferences, communication style | all | 2026-04-17 |
|
|
18
|
-
| `today.md` | Current-day schedule, tasks, agent plan, handoff | hourly, morning, evening | 2026-04-17 |
|
|
19
|
-
| `roadmap.md` | Long-horizon commitments and recurring plans | evening, weekly, monthly, roadmap | 2026-04-17 |
|
|
20
|
-
| `projects/_index.md` | Project area index | weekly, monthly, roadmap | 2026-04-17 |
|
|
21
|
-
| `agent/journal.md` | Agent-internal reflection log | weekly, monthly | 2026-04-17 |
|
|
22
|
-
| `rules/management.md` | Source-of-truth bindings and behavioral policy | all | 2026-04-17 |
|
|
23
|
-
| `rules/redaction.md` | Secret and private-data handling rules | all | 2026-04-17 |
|
|
24
|
-
| `routines/hourly.md` | Hourly check rulebook | hourly | 2026-04-17 |
|
|
25
|
-
| `routines/morning.md` | Morning routine extension rulebook | morning | 2026-04-17 |
|
|
26
|
-
| `routines/evening.md` | Evening review extension rulebook | evening | 2026-04-17 |
|
|
27
|
-
| `routines/weekly.md` | Weekly review extension rulebook | weekly | 2026-04-17 |
|
|
28
|
-
| `routines/monthly.md` | Monthly review and roadmap planning rulebook | monthly, roadmap | 2026-04-17 |
|
|
29
|
-
| `dossiers/hourly.md` | Hourly carry-forward state | hourly | 2026-04-17 |
|
|
30
|
-
| `dossiers/morning.md` | Morning carry-forward state | morning | 2026-04-17 |
|
|
31
|
-
| `dossiers/evening.md` | Evening carry-forward state | evening | 2026-04-17 |
|
|
32
|
-
| `dossiers/weekly.md` | Weekly carry-forward state | weekly | 2026-04-17 |
|
|
33
|
-
| `dossiers/monthly.md` | Monthly carry-forward state | monthly | 2026-04-17 |
|
|
34
|
-
| `dossiers/roadmap.md` | Roadmap refresh carry-forward state | roadmap | 2026-04-17 |
|
|
35
|
-
|
|
36
|
-
## Notes
|
|
37
|
-
|
|
38
|
-
- Keep `Review flows` short: `all`, `hourly`, `morning`, `evening`,
|
|
39
|
-
`weekly`, `monthly`, and `roadmap` are the flow tags the prompt loader
|
|
40
|
-
understands.
|
|
41
|
-
- When a new context file should be reviewed routinely, add one row here
|
|
42
|
-
with the narrowest matching flow tag.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: index
|
|
3
|
-
owner: shared
|
|
4
|
-
updated: 2026-04-24
|
|
5
|
-
template_version: 2
|
|
6
|
-
---
|
|
7
|
-
# Rules
|
|
8
|
-
|
|
9
|
-
Natural-language policy files the agent reads to decide HOW to act. Each
|
|
10
|
-
is user-editable; changes take effect at the next task-flow assembly.
|
|
11
|
-
|
|
12
|
-
| File | Purpose |
|
|
13
|
-
|---|---|
|
|
14
|
-
| `management.md` | Source-of-truth bindings (where each category lives) |
|
|
15
|
-
| `policies/_index.md` | Active management policies captured from conversation |
|
|
16
|
-
| `mcp.md` | MCP usage rules (B-003) |
|
|
17
|
-
| `journal-format.md` | Format spec for the daily synthesized journal |
|
|
18
|
-
| `journal-export.md` | User-defined redaction / inclusion rules for B-005 |
|
|
19
|
-
| `redaction.md` | Built-in secret patterns (English, informational) |
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: rule
|
|
3
|
-
slug: journal-format
|
|
4
|
-
owner: user
|
|
5
|
-
updated: 2026-04-17
|
|
6
|
-
template_version: 1
|
|
7
|
-
---
|
|
8
|
-
# Daily journal — format template
|
|
9
|
-
|
|
10
|
-
This file controls how the agent writes `daily/YYYY-MM-DD.md` during the
|
|
11
|
-
04:00 morning routine. Edit this file to change the format. The agent
|
|
12
|
-
reads it as a **format spec** (body structure, required/optional sections,
|
|
13
|
-
voice) — it does NOT follow this as code; natural-language guidance is
|
|
14
|
-
fine.
|
|
15
|
-
|
|
16
|
-
## Required frontmatter fields
|
|
17
|
-
- `date`, `weekday`, `type: daily`, `agent_generated: true`
|
|
18
|
-
- `agent_last_synced_at`, `content_hash`
|
|
19
|
-
- `projects: [...]`, `people: [...]`, `tags: [...]`
|
|
20
|
-
- `calendar_events: <count>`, `messages_handled: <count>`
|
|
21
|
-
|
|
22
|
-
## Required body sections (in order)
|
|
23
|
-
1. `# YYYY-MM-DD (Weekday)` — title
|
|
24
|
-
2. `## Summary` — 1 paragraph, 3–5 sentences, first-person voice
|
|
25
|
-
3. `## Schedule` — actual events (from calendar + today.md), time — title,
|
|
26
|
-
flag attended/skipped
|
|
27
|
-
4. `## What moved forward` — bullets of real progress, work + personal
|
|
28
|
-
separated if meaningful
|
|
29
|
-
5. `## Conversations` — key DM/mail exchanges only:
|
|
30
|
-
`### <Name> — <channel>, HH:MM → HH:MM` with one-line summary
|
|
31
|
-
6. `## Decisions` — bullets
|
|
32
|
-
7. `## Open threads` — checkboxes (`- [ ] ...`)
|
|
33
|
-
8. `## Tomorrow hook` — 1–2 sentences pointing to the next day's focus
|
|
34
|
-
|
|
35
|
-
## Optional sections (include only when relevant)
|
|
36
|
-
- `## Meetings` — if ≥1 meeting (time — title — outcome)
|
|
37
|
-
- `## Reading / Learning` — books / articles / courses touched
|
|
38
|
-
- `## Health / mood` — ONLY if explicitly logged by user
|
|
39
|
-
|
|
40
|
-
## Voice
|
|
41
|
-
- First-person ("I shipped...", "I met with..."), concise, factual
|
|
42
|
-
- Written in `settings.primary_language`; keep technical terms in their
|
|
43
|
-
original form if that's how the user writes them
|
|
44
|
-
|
|
45
|
-
## Wikilink rendering
|
|
46
|
-
- When `settings.vault_mode` is `obsidian`, render project / people
|
|
47
|
-
references as `[[wikilinks]]` targeting `projects/<slug>.md` or
|
|
48
|
-
`user/people.md#<person>` (basename resolves automatically).
|
|
49
|
-
- When `vault_mode` is `plain`, write plain text only — no double
|
|
50
|
-
brackets, no link markup.
|
|
51
|
-
|
|
52
|
-
## Redaction
|
|
53
|
-
- Apply `rules/redaction.md` patterns (always)
|
|
54
|
-
- Apply `rules/journal-export.md` user rules (always)
|
|
55
|
-
- If yesterday.md frontmatter had `no_journal_export: true`, write the
|
|
56
|
-
placeholder `[Skipped by user request]` and no body
|
|
57
|
-
|
|
58
|
-
## Conflict behavior
|
|
59
|
-
- Follow B-006 content-hash protection: if the user edited the previous
|
|
60
|
-
day's `daily/<date>.md`, append `## Agent revision — <timestamp>` rather
|
|
61
|
-
than overwrite.
|