@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
|
@@ -8,18 +8,13 @@ allowed-tools:
|
|
|
8
8
|
|
|
9
9
|
# roadmap.md Guide
|
|
10
10
|
|
|
11
|
-
Output language:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
prose underneath are written in `<settings primary_language>`. Preserve
|
|
16
|
-
user-customized headers verbatim.
|
|
17
|
-
|
|
18
|
-
`roadmap.md` is the single source of truth for **long-horizon user
|
|
19
|
-
intent** — everything that does not belong in `today.md`. It aggregates
|
|
11
|
+
Output language: roadmap.md is Policy B — see `<output_language_policy>`. Section headers stay English skeleton; items, narrative, and preparation-timeline prose are in `<settings primary_language>`. Preserve user-customized headers verbatim.
|
|
12
|
+
|
|
13
|
+
`plans/roadmap.md` is the single source of truth for **long-horizon user
|
|
14
|
+
intent** — everything that does not belong in `state/today.md`. It aggregates
|
|
20
15
|
Calendar events, pending `agent_schedule` rows, DM-captured intent,
|
|
21
16
|
mail-derived bookings, reading goals, and observations; Morning Routine
|
|
22
|
-
consumes it to shape `today.md`.
|
|
17
|
+
consumes it to shape `state/today.md`.
|
|
23
18
|
|
|
24
19
|
## Section schema
|
|
25
20
|
|
|
@@ -86,7 +81,7 @@ Destination: <resolved location or "unknown — pending check">
|
|
|
86
81
|
```
|
|
87
82
|
### Scheduled: <description> (task #<id>) <!-- id: rm-YYYYMMDD-abcdef -->
|
|
88
83
|
Source: scheduled.task — wake-up YYYY-MM-DD HH:MM
|
|
89
|
-
Status:
|
|
84
|
+
Status: pending | running | completed | failed
|
|
90
85
|
|
|
91
86
|
**Preparation Timeline:** (optional — only when the agent judges prep is useful)
|
|
92
87
|
- ...
|
|
@@ -122,9 +117,9 @@ must carry a daemon-minted HTML comment ID:
|
|
|
122
117
|
- The `YYYYMMDD` segment is the entry creation date / Source date, not
|
|
123
118
|
the event date. Keep it stable when dates are refined.
|
|
124
119
|
- Do not invent IDs in prose. Before adding a new roadmap entry, call
|
|
125
|
-
`POST /api/context/roadmap/id`:
|
|
120
|
+
`POST /api/context/plans/roadmap/id`:
|
|
126
121
|
```bash
|
|
127
|
-
curl -s -X POST http://localhost:8321/api/context/roadmap/id \
|
|
122
|
+
curl -s -X POST http://localhost:8321/api/context/plans/roadmap/id \
|
|
128
123
|
-H 'Content-Type: application/json' \
|
|
129
124
|
-d '{"creationDate": "YYYY-MM-DD"}'
|
|
130
125
|
```
|
|
@@ -157,153 +152,60 @@ must carry a daemon-minted HTML comment ID:
|
|
|
157
152
|
|
|
158
153
|
## travel_bookings cross-check
|
|
159
154
|
|
|
160
|
-
Before generating a new entry or a `[check]` line for
|
|
161
|
-
flights
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
```
|
|
155
|
+
Before generating a new event entry or a `[check]` prep line for
|
|
156
|
+
accommodation or flights, match against the user's actual booked
|
|
157
|
+
travel via `GET /api/travel-bookings/upcoming`. Match rules,
|
|
158
|
+
flip-to-completed grammar, and the no-match fallback are in the
|
|
159
|
+
cross-check reference below.
|
|
166
160
|
|
|
167
|
-
|
|
168
|
-
completed-row grammar above and include the confirmation number in
|
|
169
|
-
Agent Notes.
|
|
161
|
+
{{> ref:cross-check }}
|
|
170
162
|
|
|
171
163
|
## Long-horizon DM-intent detection
|
|
172
164
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
**Not signals:**
|
|
186
|
-
- Speculative language (*"maybe"*, *"someday"*, *"might"*, *"perhaps"*,
|
|
187
|
-
*"thinking about"*) without a concrete anchor
|
|
188
|
-
- Current-week commitments (those belong in `today.md`)
|
|
189
|
-
- Opinions, preferences, taste statements
|
|
190
|
-
(those belong in `user/*.md` via the `user-profile` skill)
|
|
191
|
-
|
|
192
|
-
**Routing after detection:**
|
|
193
|
-
- Dated ≥ 48h out → Agent Action Plan event entry (Preparation
|
|
194
|
-
Timeline grows once destination / details resolve).
|
|
195
|
-
- Undated horizon ("this summer", "this quarter") →
|
|
196
|
-
`## Long-term Plans` line with a horizon-tag.
|
|
197
|
-
- Ambiguous → keep in `agent-journal.md` as a candidate line and
|
|
198
|
-
surface via the next morning routine for user confirmation
|
|
199
|
-
(dry-run mode).
|
|
165
|
+
DM-driven long-horizon writes are dispatched from
|
|
166
|
+
`message.received.dm.md` / `message.received.dm_first.md` Step 4 via
|
|
167
|
+
the `_partials/dm-intent.long-horizon.md` task-flow partial — that
|
|
168
|
+
partial carries the signal/non-signal enumeration and the
|
|
169
|
+
post-detection routing rules (Agent Action Plan vs Long-term Plans vs
|
|
170
|
+
agent-journal candidate line).
|
|
171
|
+
|
|
172
|
+
**This skill is the writer.** Entry-shape recipes, stable identity,
|
|
173
|
+
preparation timeline taxonomy, destination extraction, retention, and
|
|
174
|
+
the cross-request write lock all live below — the partial dispatches,
|
|
175
|
+
this skill executes the writes.
|
|
200
176
|
|
|
201
177
|
## Section auto-ensure PATCH recipe
|
|
202
178
|
|
|
203
|
-
Legacy roadmaps
|
|
204
|
-
|
|
179
|
+
Legacy roadmaps may be missing `## Long-term Plans`. The PATCH-driven
|
|
180
|
+
recovery recipe — GET-inspect, insert after `## Quarterly Focus`,
|
|
181
|
+
then PATCH the target section — is in the migration reference below.
|
|
205
182
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
2. If absent, insert it after `## Quarterly Focus`:
|
|
209
|
-
```bash
|
|
210
|
-
curl -s -X PATCH http://localhost:8321/api/context/roadmap \
|
|
211
|
-
-H 'Content-Type: application/json' \
|
|
212
|
-
-d '{"section": "quarterly_focus", "mode": "append", "content": "\n## Long-term Plans\n"}'
|
|
213
|
-
```
|
|
214
|
-
3. Then PATCH `long_term_plans` normally.
|
|
183
|
+
Full-file PUT writers (e.g. `routine.roadmap_refresh`) do not need
|
|
184
|
+
this recipe — they always emit the full section schema.
|
|
215
185
|
|
|
216
|
-
|
|
217
|
-
recipe — they always emit the full section schema.
|
|
186
|
+
{{> ref:migration }}
|
|
218
187
|
|
|
219
188
|
## Retention (RFC-D preview)
|
|
220
189
|
|
|
221
190
|
- **Agent Action Plan event entries** — kept while the event's header
|
|
222
|
-
date is within `[today - 7d, today + 180d]`. Older
|
|
223
|
-
off into `daily/`
|
|
191
|
+
date is within `[today - 7d, today + 180d]`. Older entries whose
|
|
192
|
+
Preparation Timeline rows are all `completed` roll off into `daily/`
|
|
193
|
+
history.
|
|
224
194
|
- **`Scheduled:` entries** — kept while the Wake-up date is within
|
|
225
|
-
`[today - 1d, today + 180d]`. On completion, Status flips to
|
|
226
|
-
the entry persists one extra day for the journal.
|
|
195
|
+
`[today - 1d, today + 180d]`. On completion, Status flips to
|
|
196
|
+
`completed` and the entry persists one extra day for the journal.
|
|
227
197
|
- **Long-term Plans** — entries without date movement for 90 days are
|
|
228
198
|
marked `[stale]` by Evening Review. 180 days without user
|
|
229
199
|
confirmation → DM; no reply in 7 days → remove.
|
|
230
200
|
|
|
231
|
-
##
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
| Operation | Method | Path |
|
|
239
|
-
|---|---|---|
|
|
240
|
-
| Acquire | `POST` | `/api/context/lock/roadmap` |
|
|
241
|
-
| Release | `DELETE` | `/api/context/lock/roadmap` |
|
|
242
|
-
|
|
243
|
-
**Common mistakes (NOT registered):**
|
|
244
|
-
|
|
245
|
-
- `POST /api/context/roadmap/lock` — order reversed
|
|
246
|
-
- `POST /api/context/roadmap/write-lock` — order reversed and wrong noun
|
|
247
|
-
- `POST /api/context/lock/roadmap-write` — wrong noun
|
|
248
|
-
|
|
249
|
-
Any of these return `404 {"error":"unknown_route", ...}` with a hint
|
|
250
|
-
pointing at the correct path — re-read the table above and resend. The
|
|
251
|
-
correct lock endpoints are Autonomous-tier, so no bearer token is
|
|
252
|
-
required; if you see `401 {"error":"unauthorized"}` from a path you
|
|
253
|
-
believe is correct, the path is still wrong.
|
|
254
|
-
|
|
255
|
-
- If `<roadmap_write_lock_id>` is in your context, include
|
|
256
|
-
`X-Lock-Id: <roadmap_write_lock_id>` on every PUT / PATCH to
|
|
257
|
-
`/api/context/roadmap`.
|
|
258
|
-
- Dispatcher auto-acquires the lock for `routine.roadmap_refresh`.
|
|
259
|
-
- Flows that need to write roadmap outside that routine (DM handler,
|
|
260
|
-
evening sweeper) can acquire via
|
|
261
|
-
`POST /api/context/lock/roadmap` and release via
|
|
262
|
-
`DELETE /api/context/lock/roadmap` with `{ "lockId": "..." }`.
|
|
263
|
-
- If another session holds the lock, PUT / PATCH returns **409
|
|
264
|
-
`roadmap_write_lock_held`** — back off 30 s and retry up to 3 times.
|
|
265
|
-
|
|
266
|
-
## roadmap.md API
|
|
267
|
-
|
|
268
|
-
Body submission follows `_safety.md` "Daemon-API body submission":
|
|
269
|
-
small POST / PATCH bodies use inline `-d '{...}'`; the full-file PUT
|
|
270
|
-
runs multi-KB and uses the stdin heredoc `-d @- <<'JSON'` shape.
|
|
271
|
-
Include `X-Lock-Id: <roadmap_write_lock_id>` on every PUT / PATCH
|
|
272
|
-
when that tag is in your context.
|
|
273
|
-
|
|
274
|
-
```bash
|
|
275
|
-
# Read
|
|
276
|
-
curl -s http://localhost:8321/api/context/roadmap
|
|
277
|
-
|
|
278
|
-
# Mint a new stable entry id
|
|
279
|
-
curl -s -X POST http://localhost:8321/api/context/roadmap/id \
|
|
280
|
-
-H 'Content-Type: application/json' \
|
|
281
|
-
-H 'X-Lock-Id: <roadmap_write_lock_id>' \
|
|
282
|
-
-d '{"creationDate":"YYYY-MM-DD"}'
|
|
283
|
-
|
|
284
|
-
# Full replace (roadmap refresh) — multi-KB body, use heredoc.
|
|
285
|
-
curl -s -X PUT http://localhost:8321/api/context/roadmap \
|
|
286
|
-
-H 'Content-Type: application/json' \
|
|
287
|
-
-H 'X-Lock-Id: <roadmap_write_lock_id>' \
|
|
288
|
-
-d @- <<'JSON'
|
|
289
|
-
{"content":"# Roadmap\n> Last synced: 2026-04-23\n\n## Annual Goals\n- ...\n\n## Quarterly Focus\n- ...\n\n## Long-term Plans\n- [2026-Q3] ... <!-- id: rm-20260419-b8e7d4 -->\n\n## Agent Action Plan\n\n## Recurring\n- Every Friday: weekly review\n"}
|
|
290
|
-
JSON
|
|
291
|
-
|
|
292
|
-
# Section PATCH
|
|
293
|
-
curl -s -X PATCH http://localhost:8321/api/context/roadmap \
|
|
294
|
-
-H 'Content-Type: application/json' \
|
|
295
|
-
-H 'X-Lock-Id: <roadmap_write_lock_id>' \
|
|
296
|
-
-d '{"section":"long_term_plans","mode":"append","content":"- [2026-Q3] ...\n"}'
|
|
297
|
-
```
|
|
201
|
+
## API surface
|
|
202
|
+
|
|
203
|
+
Generic GET / PUT / PATCH / DELETE lives in the **context** skill's
|
|
204
|
+
`references/api.md`. The roadmap-specific layer — lock endpoints
|
|
205
|
+
(with the path-name gotchas), ID mint, the duplicate-id retry recipe,
|
|
206
|
+
and the transition guard — is in the reference below.
|
|
298
207
|
|
|
299
|
-
|
|
300
|
-
context API — see the `context` skill for the full endpoint reference.
|
|
301
|
-
For roadmap writes, the API also validates ID uniqueness and runs a
|
|
302
|
-
transition guard: if an entry ID survives from previous → next content,
|
|
303
|
-
every previous `✓ completed ...` row for that ID must still exist
|
|
304
|
-
byte-for-byte. If an entry ID disappears entirely, removal is accepted
|
|
305
|
-
only when the retention window permits it or the operator bypass header
|
|
306
|
-
is used.
|
|
208
|
+
{{> ref:api }}
|
|
307
209
|
|
|
308
210
|
## Roadmap section schema (auto-curated)
|
|
309
211
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"anchor": "<!-- CURATION:knowledge_layout id=\"entry-types\" -->",
|
|
8
8
|
"human_label": "Roadmap section schema",
|
|
9
9
|
"description": "Required sections in roadmap.md and what each holds",
|
|
10
|
-
"scope_paths": ["roadmap.md"]
|
|
10
|
+
"scope_paths": ["plans/roadmap.md"]
|
|
11
11
|
}
|
|
12
12
|
]
|
|
13
13
|
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
kind: reference
|
|
3
|
+
name: api
|
|
4
|
+
description: roadmap.md-specific layering on top of /api/context/* — lock endpoints, ID-mint, transition guard, duplicate-id retry recipe.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# roadmap.md API — specific rules
|
|
8
|
+
|
|
9
|
+
The generic GET / PUT / PATCH surface lives in the **context** skill's
|
|
10
|
+
`references/api.md`. The rules below are the roadmap-specific layer.
|
|
11
|
+
|
|
12
|
+
## Lock — `roadmap_write_lock_id`
|
|
13
|
+
|
|
14
|
+
| Action | Verb | Path |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| Acquire | `POST` | `/api/context/lock/roadmap` |
|
|
17
|
+
| Release | `DELETE` | `/api/context/lock/roadmap` (body `{"lockId":"…"}`) |
|
|
18
|
+
|
|
19
|
+
The dispatcher auto-acquires this lock for `routine.roadmap_refresh`
|
|
20
|
+
and exposes the id via `<roadmap_write_lock_id>` in the prompt
|
|
21
|
+
context. Other flows (DM handler, evening sweeper) may acquire and
|
|
22
|
+
release manually.
|
|
23
|
+
|
|
24
|
+
Include `X-Lock-Id: <roadmap_write_lock_id>` on every PUT / PATCH to
|
|
25
|
+
`/api/context/plans/roadmap` when the tag is in your context. Other
|
|
26
|
+
sessions get `409 roadmap_write_lock_held` while the lock is held —
|
|
27
|
+
back off 30 s and retry up to 3 times.
|
|
28
|
+
|
|
29
|
+
### Path-name gotchas
|
|
30
|
+
|
|
31
|
+
These return `404 {"error":"unknown_route", …}` with a hint pointing
|
|
32
|
+
at the correct path:
|
|
33
|
+
|
|
34
|
+
- `POST /api/context/plans/roadmap/lock` — order reversed
|
|
35
|
+
- `POST /api/context/plans/roadmap/write-lock` — order reversed and wrong noun
|
|
36
|
+
- `POST /api/context/lock/roadmap-write` — wrong noun
|
|
37
|
+
|
|
38
|
+
A `401 {"error":"unauthorized"}` from a path you believe is correct
|
|
39
|
+
means the path is still wrong (the lock endpoints are Autonomous-tier
|
|
40
|
+
so no bearer token is required).
|
|
41
|
+
|
|
42
|
+
## ID mint — `POST /api/context/plans/roadmap/id`
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
curl -s -X POST http://localhost:8321/api/context/plans/roadmap/id \
|
|
46
|
+
-H 'Content-Type: application/json' \
|
|
47
|
+
-H 'X-Lock-Id: <roadmap_write_lock_id>' \
|
|
48
|
+
-d '{"creationDate":"YYYY-MM-DD"}'
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Returns `{"id":"rm-YYYYMMDD-<6hex>"}`. Use the returned value as the
|
|
52
|
+
`<!-- id: ... -->` HTML comment on a new entry. Never invent the
|
|
53
|
+
6-hex suffix in prose.
|
|
54
|
+
|
|
55
|
+
When promoting a Long-term Plans line into Agent Action Plan, transfer
|
|
56
|
+
the existing id to the new `###` heading and remove the original line
|
|
57
|
+
— do NOT mint a fresh id (the journal trail would break).
|
|
58
|
+
|
|
59
|
+
## ID uniqueness + transition guard
|
|
60
|
+
|
|
61
|
+
The roadmap API validates two invariants on every PUT / PATCH:
|
|
62
|
+
|
|
63
|
+
1. **Uniqueness.** Every `<!-- id: rm-* -->` is unique within the
|
|
64
|
+
file. Duplicate ids return:
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{"error":"validation_error","message":"duplicate roadmap id rm-YYYYMMDD-abcdef","path":"plans/roadmap.md"}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Recovery: re-GET `roadmap`, mint a fresh id **for the colliding
|
|
71
|
+
new entry only**, retry the PUT / PATCH once. If the same error
|
|
72
|
+
fires twice, abort and surface the message to the user — something
|
|
73
|
+
in the pipeline is double-emitting.
|
|
74
|
+
|
|
75
|
+
2. **Transition guard.** If an entry id survives from previous → next
|
|
76
|
+
content, every prior `completed …` row for that id must still
|
|
77
|
+
exist byte-for-byte. Removing or rewording a historical completed
|
|
78
|
+
row returns:
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{"error":"validation_error","message":"transition_guard: completed row for rm-… changed","path":"plans/roadmap.md"}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
This is intentional: completed prep rows are the audit trail for
|
|
85
|
+
what the agent actually did. Edit only forward-looking rows.
|
|
86
|
+
|
|
87
|
+
If an entry id disappears entirely between previous → next, removal
|
|
88
|
+
is accepted only when:
|
|
89
|
+
|
|
90
|
+
- The entry's retention window has elapsed (see §"Retention" in the
|
|
91
|
+
skill body), OR
|
|
92
|
+
- The operator passes the `X-Operator-Bypass: 1` header (dashboard
|
|
93
|
+
flows only; never set this from an agent curl).
|
|
94
|
+
|
|
95
|
+
## Body submission
|
|
96
|
+
|
|
97
|
+
- Full PUT body is multi-KB → use the heredoc shape
|
|
98
|
+
(`-d @- <<'JSON'`) per `_safety.md` "Daemon-API body submission".
|
|
99
|
+
- Section PATCH bodies are small → inline `-d '{...}'`.
|
|
100
|
+
- ID-mint POST is small → inline `-d '{"creationDate":"…"}'`.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
kind: reference
|
|
3
|
+
name: cross-check
|
|
4
|
+
description: Travel-bookings cross-check — match new roadmap event entries against /api/travel-bookings/upcoming before minting a [check] prep line.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Travel-bookings cross-check
|
|
8
|
+
|
|
9
|
+
Before generating a new event entry — or a `[check] <date>: Confirm
|
|
10
|
+
…` line in an existing entry's Preparation Timeline — for
|
|
11
|
+
**accommodation** or **flights**, look up the user's actual booked
|
|
12
|
+
travel. If a matching booking already exists, the prep line is
|
|
13
|
+
redundant; mark it `completed` and surface the confirmation number in
|
|
14
|
+
Agent Notes instead.
|
|
15
|
+
|
|
16
|
+
## Query
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
curl -s 'http://localhost:8321/api/travel-bookings/upcoming?limit=50'
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Response shape (one row per booking):
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"bookings": [
|
|
27
|
+
{
|
|
28
|
+
"id": "<int>",
|
|
29
|
+
"type": "flight" | "hotel" | "restaurant" | "train" | "bus" | "other",
|
|
30
|
+
"provider": "<string>",
|
|
31
|
+
"destination": "city / airport / property name",
|
|
32
|
+
"startDate": "ISO8601 | YYYY-MM-DD | null",
|
|
33
|
+
"endDate": "ISO8601 | YYYY-MM-DD | null",
|
|
34
|
+
"confirmationNumber": "<string | null>",
|
|
35
|
+
"amount": "<number | null>",
|
|
36
|
+
"currency": "<string | null>",
|
|
37
|
+
"status": "upcoming",
|
|
38
|
+
"providerMsgId": "<string | null>",
|
|
39
|
+
"createdAt": "ISO8601"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"total": "<int>"
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Match rules
|
|
47
|
+
|
|
48
|
+
A booking matches a roadmap event entry when **either**:
|
|
49
|
+
|
|
50
|
+
- The booking's `destination` substring-matches the event entry's
|
|
51
|
+
`Destination:` field (case-insensitive, after stripping common
|
|
52
|
+
prefixes / suffixes — "Paris" matches "Paris, FR" and "Paris CDG").
|
|
53
|
+
- The booking's `startDate` date falls within the event entry's
|
|
54
|
+
`YYYY-MM-DD ~ MM-DD` header range (inclusive on both ends).
|
|
55
|
+
|
|
56
|
+
When a match is found:
|
|
57
|
+
|
|
58
|
+
1. Locate the matching `[check]` row in the event entry's Preparation
|
|
59
|
+
Timeline.
|
|
60
|
+
2. Flip it to the completed-row grammar (`completed: <prep>
|
|
61
|
+
<YYYY-MM-DD> confirmation #<conf>`), preserving the original
|
|
62
|
+
`[tag]` and date.
|
|
63
|
+
3. Append a line to the entry's `**Agent Notes:**` block:
|
|
64
|
+
`- Booking confirmed (<type>) — #<confirmationNumber>`.
|
|
65
|
+
|
|
66
|
+
## When no match exists
|
|
67
|
+
|
|
68
|
+
The `[check] <event_date - 28d>: Confirm <…> for <title>` line stays
|
|
69
|
+
in the Preparation Timeline. The morning routine will surface it as
|
|
70
|
+
an Agent Plan row when its date is within `today + 7d`.
|
|
71
|
+
|
|
72
|
+
## When NOT to run this cross-check
|
|
73
|
+
|
|
74
|
+
- Inside the morning routine when it is rebuilding `## Agent Action
|
|
75
|
+
Plan` from scratch — the routine already has the bookings table
|
|
76
|
+
loaded in its pre-pass and runs the match itself.
|
|
77
|
+
- For non-travel entries (work projects, deadlines, study sessions).
|
|
78
|
+
Travel-bookings is a travel-specific source of truth.
|
|
79
|
+
- When `/api/travel-bookings/upcoming` returns an empty list — skip
|
|
80
|
+
the match step entirely.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
kind: reference
|
|
3
|
+
name: migration
|
|
4
|
+
description: Section auto-ensure recipe for legacy roadmaps missing ## Long-term Plans. PATCH-driven; full-file PUT writers (refresh routine) do not need this.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Section auto-ensure — legacy `plans/roadmap.md` files
|
|
8
|
+
|
|
9
|
+
Roadmaps created before the `## Long-term Plans` section was
|
|
10
|
+
introduced may be missing that header. A direct
|
|
11
|
+
`PATCH section=long_term_plans` against such a file returns
|
|
12
|
+
`400 section_not_found`. This reference is the one-time recovery
|
|
13
|
+
recipe DM handlers and the evening sweeper run before their first
|
|
14
|
+
write to `long_term_plans`.
|
|
15
|
+
|
|
16
|
+
## When to run
|
|
17
|
+
|
|
18
|
+
Run this **only** if you are about to PATCH `long_term_plans` and the
|
|
19
|
+
file's body is unknown to you. Full-file PUT writers
|
|
20
|
+
(`routine.roadmap_refresh`) always emit the full section schema, so
|
|
21
|
+
they never trigger `section_not_found` and never need this recipe.
|
|
22
|
+
|
|
23
|
+
## Steps
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# 1. Read the file
|
|
27
|
+
curl -s http://localhost:8321/api/context/plans/roadmap
|
|
28
|
+
|
|
29
|
+
# 2. Inspect the body for "## Long-term Plans". If present, skip the
|
|
30
|
+
# insert and go straight to the normal PATCH below.
|
|
31
|
+
|
|
32
|
+
# 3. Absent → insert it after "## Quarterly Focus":
|
|
33
|
+
curl -s -X PATCH http://localhost:8321/api/context/plans/roadmap \
|
|
34
|
+
-H 'Content-Type: application/json' \
|
|
35
|
+
-H 'X-Lock-Id: <roadmap_write_lock_id>' \
|
|
36
|
+
-d '{"section": "quarterly_focus", "mode": "append", "content": "\n## Long-term Plans\n"}'
|
|
37
|
+
|
|
38
|
+
# 4. Then PATCH long_term_plans normally
|
|
39
|
+
curl -s -X PATCH http://localhost:8321/api/context/plans/roadmap \
|
|
40
|
+
-H 'Content-Type: application/json' \
|
|
41
|
+
-H 'X-Lock-Id: <roadmap_write_lock_id>' \
|
|
42
|
+
-d '{"section": "long_term_plans", "mode": "append", "content": "- [undated] …"}'
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Don'ts
|
|
46
|
+
|
|
47
|
+
- Do NOT insert `## Long-term Plans` blindly without GET-ing first;
|
|
48
|
+
appending it twice produces a malformed file (the PATCH route does
|
|
49
|
+
not deduplicate H2 headers).
|
|
50
|
+
- Do NOT use this recipe to insert `## Agent Action Plan` or other
|
|
51
|
+
agent-writable sections. The roadmap refresh routine owns the
|
|
52
|
+
per-section schema; section-by-section insertion from DM is not
|
|
53
|
+
supported.
|
|
54
|
+
- Do NOT skip the `X-Lock-Id` header when the
|
|
55
|
+
`<roadmap_write_lock_id>` tag is in your context — PATCH without it
|
|
56
|
+
returns `409 roadmap_write_lock_held` during a held-lock window.
|
|
@@ -7,14 +7,14 @@ Action line formats:
|
|
|
7
7
|
|
|
8
8
|
```
|
|
9
9
|
- YYYY-MM-DD [tag]: description
|
|
10
|
-
-
|
|
10
|
+
- completed YYYY-MM-DD: YYYY-MM-DD [tag]: description
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
The completed prefix date is the completion date; the second date is
|
|
14
14
|
the original planned date. Preserve completed rows byte-for-byte across
|
|
15
15
|
refreshes. Morning Routine marks an open row complete by rewriting:
|
|
16
16
|
`- YYYY-MM-DD [tag]: foo` →
|
|
17
|
-
`-
|
|
17
|
+
`- completed <today>: YYYY-MM-DD [tag]: foo`.
|
|
18
18
|
|
|
19
19
|
Tags: `[notify]`, `[today]`, `[check]`, `[schedule]`.
|
|
20
20
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"kind": "knowledge_layout",
|
|
3
3
|
"files": [
|
|
4
4
|
{
|
|
5
|
-
"path": "roadmap.md",
|
|
5
|
+
"path": "plans/roadmap.md",
|
|
6
6
|
"purpose": "Long-horizon user intent: goals, focus, plans, scheduled tasks, and recurring entries",
|
|
7
7
|
"sections": [
|
|
8
8
|
{ "heading": "## Annual Goals", "contains": "user-authored yearly goals preserved verbatim" },
|