@aitne-sh/aitne 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +251 -164
- package/agent-assets/agent-profiles/_safety.md +3 -3
- package/agent-assets/agent-profiles/browser-task.md +108 -0
- package/agent-assets/agent-profiles/conversational.md +3 -3
- package/agent-assets/agent-profiles/profile-importer.md +2 -2
- package/agent-assets/agent-profiles/routine-fetch-window.md +30 -19
- package/agent-assets/agents/context-index-reconcile/agent.md +52 -0
- package/agent-assets/agents/evening-review/agent.md +53 -0
- package/agent-assets/agents/hourly-check/agent.md +62 -0
- package/agent-assets/agents/monthly-review/agent.md +55 -0
- package/agent-assets/agents/morning-routine/agent.md +78 -0
- package/agent-assets/agents/roadmap-maintenance/agent.md +52 -0
- package/agent-assets/agents/skill-curation/agent.md +52 -0
- package/agent-assets/agents/user-profile-sweep-evening/agent.md +48 -0
- package/agent-assets/agents/user-profile-sweep-morning/agent.md +53 -0
- package/agent-assets/agents/weekly-review/agent.md +51 -0
- package/agent-assets/docs/concepts/agent-day.md +13 -11
- package/agent-assets/docs/concepts/auth-health.md +47 -10
- package/agent-assets/docs/concepts/backends-and-tiers.md +66 -31
- package/agent-assets/docs/concepts/costs-and-quotas.md +51 -15
- package/agent-assets/docs/concepts/delegated-mode.md +56 -17
- package/agent-assets/docs/concepts/memory-model.md +77 -34
- package/agent-assets/docs/concepts/observations.md +49 -11
- package/agent-assets/docs/concepts/process-keys.md +56 -22
- package/agent-assets/docs/concepts/routines.md +60 -33
- package/agent-assets/docs/concepts/safety-and-execution.md +50 -21
- package/agent-assets/docs/concepts/safety-model.md +61 -50
- package/agent-assets/docs/concepts/skills.md +34 -18
- package/agent-assets/docs/features/integrations/browser-history.md +196 -0
- package/agent-assets/docs/features/integrations/calendar.md +39 -29
- package/agent-assets/docs/features/integrations/git.md +18 -7
- package/agent-assets/docs/features/integrations/github.md +84 -33
- package/agent-assets/docs/features/integrations/mail.md +61 -17
- package/agent-assets/docs/features/integrations/notion.md +18 -6
- package/agent-assets/docs/features/integrations/obsidian.md +28 -5
- package/agent-assets/docs/features/lifestyle/git.md +44 -40
- package/agent-assets/docs/features/lifestyle/reading.md +57 -22
- package/agent-assets/docs/features/lifestyle/receipts.md +51 -21
- package/agent-assets/docs/features/lifestyle/travel-bookings.md +77 -14
- package/agent-assets/docs/features/memory-files/agent-journal.md +132 -53
- package/agent-assets/docs/features/memory-files/agent-lessons.md +177 -0
- package/agent-assets/docs/features/memory-files/projects.md +73 -17
- package/agent-assets/docs/features/memory-files/roadmap.md +54 -11
- package/agent-assets/docs/features/memory-files/schedule.md +113 -70
- package/agent-assets/docs/features/memory-files/today.md +46 -21
- package/agent-assets/docs/features/memory-files/user-profile.md +63 -33
- package/agent-assets/docs/features/messaging/bang-commands.md +113 -36
- package/agent-assets/docs/features/messaging/dashboard-chat.md +43 -21
- package/agent-assets/docs/features/messaging/discord.md +35 -4
- package/agent-assets/docs/features/messaging/overview.md +37 -19
- package/agent-assets/docs/features/messaging/pairing-and-magic-phrase.md +94 -27
- package/agent-assets/docs/features/messaging/slack.md +67 -14
- package/agent-assets/docs/features/messaging/telegram.md +22 -8
- package/agent-assets/docs/features/messaging/whatsapp.md +71 -17
- package/agent-assets/docs/features/operations/activity-and-conversations.md +45 -15
- package/agent-assets/docs/features/operations/approvals.md +49 -16
- package/agent-assets/docs/features/operations/backend-routing.md +68 -16
- package/agent-assets/docs/features/operations/cost-tracking.md +84 -17
- package/agent-assets/docs/features/operations/managed-chromium.md +222 -0
- package/agent-assets/docs/features/operations/notifications.md +52 -11
- package/agent-assets/docs/features/operations/quiet-hours.md +64 -40
- package/agent-assets/docs/features/operations/schedule-approaching.md +54 -24
- package/agent-assets/docs/features/routines/custom-routines.md +98 -26
- package/agent-assets/docs/features/routines/evening-review.md +82 -21
- package/agent-assets/docs/features/routines/hourly-check.md +149 -29
- package/agent-assets/docs/features/routines/morning-routine.md +54 -35
- package/agent-assets/docs/features/routines/weekly-review.md +46 -21
- package/agent-assets/docs/features/wiki/commands.md +26 -16
- package/agent-assets/docs/features/wiki/cost-and-approval.md +241 -0
- package/agent-assets/docs/features/wiki/dashboard.md +256 -0
- package/agent-assets/docs/features/wiki/overview.md +70 -12
- package/agent-assets/docs/features/wiki/search.md +248 -0
- package/agent-assets/docs/features/wiki/workspaces.md +254 -0
- package/agent-assets/docs/getting-started/01-what-is-this.md +34 -23
- package/agent-assets/docs/getting-started/02-first-steps.md +17 -10
- package/agent-assets/docs/getting-started/03-what-can-this-do.md +25 -14
- package/agent-assets/docs/getting-started/04-first-day.md +39 -21
- package/agent-assets/docs/glossary.md +235 -24
- package/agent-assets/docs/guides/add-a-custom-routine.md +63 -23
- package/agent-assets/docs/guides/backup-and-restore.md +80 -16
- package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +57 -26
- package/agent-assets/docs/guides/build-your-wiki.md +22 -9
- package/agent-assets/docs/guides/change-which-model-handles-x.md +64 -10
- package/agent-assets/docs/guides/connect-a-new-mail-account.md +66 -15
- package/agent-assets/docs/guides/explore-with-trace-and-connect.md +32 -14
- package/agent-assets/docs/guides/import-knowledge-file.md +50 -40
- package/agent-assets/docs/guides/install-and-run.md +49 -20
- package/agent-assets/docs/guides/maintain-wiki-health.md +35 -10
- package/agent-assets/docs/guides/migrate-machines.md +74 -18
- package/agent-assets/docs/guides/multiple-wikis-for-multiple-domains.md +111 -60
- package/agent-assets/docs/guides/pause-the-agent.md +69 -24
- package/agent-assets/docs/guides/reinstall-cleanly.md +88 -18
- package/agent-assets/docs/guides/setup-wizard.md +116 -54
- package/agent-assets/docs/guides/switch-default-backend.md +62 -16
- package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +30 -14
- package/agent-assets/docs/reference/api.md +153 -32
- package/agent-assets/docs/reference/cli-commands.md +39 -18
- package/agent-assets/docs/reference/config.md +241 -49
- package/agent-assets/docs/reference/disallowed-tools.md +34 -13
- package/agent-assets/docs/reference/keyboard-shortcuts.md +34 -10
- package/agent-assets/docs/reference/knowledge-layout.md +629 -0
- package/agent-assets/docs/reference/process-keys.md +62 -6
- package/agent-assets/docs/reference/skills.md +41 -14
- package/agent-assets/docs/troubleshooting/auth-failed.md +51 -21
- package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +97 -28
- package/agent-assets/docs/troubleshooting/fallback-keeps-firing.md +86 -22
- package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +68 -24
- package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +80 -20
- package/agent-assets/docs/troubleshooting/observation-not-detected.md +73 -21
- package/agent-assets/docs/troubleshooting/quota-exhausted.md +33 -8
- package/agent-assets/docs/troubleshooting/wiki-ingest-full-blocked.md +126 -54
- package/agent-assets/docs/troubleshooting/wiki-write-failed.md +29 -12
- package/agent-assets/optimizer-skills/drift-analysis/SKILL.md +1 -1
- package/agent-assets/optimizer-skills/knowledge-map/SKILL.md +1 -1
- package/agent-assets/optimizer-skills/skill-curation/SKILL.md +1 -1
- package/agent-assets/sandbox/linux/aitne-chromium.apparmor +91 -0
- package/agent-assets/sandbox/macos/aitne-chromium.sb +156 -0
- package/agent-assets/skills/agent-actions/SKILL.md +25 -41
- package/agent-assets/skills/agent-create/SKILL.md +158 -0
- package/agent-assets/skills/attach/SKILL.md +10 -29
- package/agent-assets/skills/browser-history/SKILL.md +211 -0
- package/agent-assets/skills/browser-history-respond/SKILL.md +111 -0
- package/agent-assets/skills/browser-task/SKILL.md +164 -0
- package/agent-assets/skills/context/SKILL.md +35 -44
- package/agent-assets/skills/context/curation.json +14 -14
- package/agent-assets/skills/context/references/api.md +52 -40
- package/agent-assets/skills/context/references/required-frontmatter.md +13 -12
- package/agent-assets/skills/context/references/snapshot-files.md +18 -17
- package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +8 -8
- package/agent-assets/skills/context/seeds/frontmatter-requirements.seed.json +3 -3
- package/agent-assets/skills/docs-search/SKILL.md +23 -34
- package/agent-assets/skills/external-services/SKILL.delegated.claude.md +17 -114
- package/agent-assets/skills/external-services/SKILL.delegated.codex.md +17 -113
- package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +17 -113
- package/agent-assets/skills/external-services/SKILL.md +3 -3
- package/agent-assets/skills/external-services/SKILL.native.claude.md +7 -7
- package/agent-assets/skills/external-services/SKILL.native.codex.md +7 -7
- package/agent-assets/skills/external-services/SKILL.native.gemini.md +4 -4
- package/agent-assets/skills/external-services/references/calendar-apple.md +2 -2
- package/agent-assets/skills/external-services/references/calendar-outlook.md +1 -1
- package/agent-assets/skills/external-services/references/exec-errors.md +32 -0
- package/agent-assets/skills/external-services/references/obsidian.md +2 -2
- package/agent-assets/skills/external-services/references/skills-crud.md +5 -5
- package/agent-assets/skills/gmail-lifestyle/SKILL.md +11 -83
- package/agent-assets/skills/gmail-lifestyle/references/receipts-api.md +4 -0
- package/agent-assets/skills/gmail-lifestyle/references/travel-bookings-api.md +9 -0
- package/agent-assets/skills/mail/SKILL.delegated.claude.md +15 -18
- package/agent-assets/skills/mail/SKILL.delegated.codex.md +11 -6
- package/agent-assets/skills/mail/SKILL.delegated.gemini.md +11 -6
- package/agent-assets/skills/mail/SKILL.md +10 -18
- package/agent-assets/skills/mail/SKILL.native.claude.md +8 -7
- package/agent-assets/skills/mail/SKILL.native.codex.md +1 -1
- package/agent-assets/skills/mail/SKILL.native.gemini.md +1 -1
- package/agent-assets/skills/mail/references/api.md +10 -3
- package/agent-assets/skills/mail/references/examples.md +2 -1
- package/agent-assets/skills/mail/references/providers.md +1 -1
- package/agent-assets/skills/managed-tasks/SKILL.md +48 -81
- package/agent-assets/skills/managed-tasks/references/errors.md +33 -19
- package/agent-assets/skills/managed-tasks/references/output-path.md +33 -17
- package/agent-assets/skills/managed-tasks/references/recurrence-rule.md +7 -5
- package/agent-assets/skills/management-policy/SKILL.md +42 -42
- package/agent-assets/skills/management-policy/curation.json +1 -1
- package/agent-assets/skills/management-policy/references/policy-workflow.md +11 -12
- package/agent-assets/skills/management-policy/seeds/policy-file-shape.seed.json +1 -1
- package/agent-assets/skills/notify/SKILL.md +14 -16
- package/agent-assets/skills/notify/references/priority.md +28 -20
- package/agent-assets/skills/notion/SKILL.delegated.claude.md +2 -2
- package/agent-assets/skills/notion/SKILL.delegated.codex.md +2 -2
- package/agent-assets/skills/notion/SKILL.delegated.gemini.md +2 -2
- package/agent-assets/skills/notion/SKILL.md +17 -17
- package/agent-assets/skills/notion/SKILL.native.claude.md +11 -7
- package/agent-assets/skills/notion/SKILL.native.codex.md +10 -5
- package/agent-assets/skills/notion/SKILL.native.gemini.md +10 -5
- package/agent-assets/skills/observations/SKILL.md +29 -28
- package/agent-assets/skills/observations/references/fetch-fallback.md +22 -0
- package/agent-assets/skills/project-doc/SKILL.md +10 -7
- package/agent-assets/skills/project-doc/curation.json +3 -3
- package/agent-assets/skills/project-doc/seeds/project-shape.seed.json +8 -5
- package/agent-assets/skills/project-doc/seeds/slug-grammar.seed.json +5 -5
- package/agent-assets/skills/reading/SKILL.md +18 -42
- package/agent-assets/skills/reading/references/reading-taste.md +7 -7
- package/agent-assets/skills/roadmap/SKILL.md +8 -24
- package/agent-assets/skills/roadmap/curation.json +1 -1
- package/agent-assets/skills/roadmap/references/api.md +21 -11
- package/agent-assets/skills/roadmap/references/cross-check.md +15 -8
- package/agent-assets/skills/roadmap/references/horizon-tags.md +11 -0
- package/agent-assets/skills/roadmap/references/migration.md +12 -10
- package/agent-assets/skills/roadmap/references/retention.md +18 -0
- package/agent-assets/skills/roadmap/seeds/entry-types.seed.json +1 -1
- package/agent-assets/skills/schedule/SKILL.md +41 -50
- package/agent-assets/skills/schedule/references/batch.md +2 -2
- package/agent-assets/skills/schedule/references/errors.md +7 -4
- package/agent-assets/skills/schedule/references/importance.md +23 -0
- package/agent-assets/skills/schedule/references/model-selection.md +3 -3
- package/agent-assets/skills/schedule/references/recurrence-rule.md +7 -5
- package/agent-assets/skills/scheduled-managed-task/SKILL.md +77 -70
- package/agent-assets/skills/today/SKILL.md +24 -83
- package/agent-assets/skills/today/curation.json +3 -3
- package/agent-assets/skills/today/references/agent-plan-lifecycle.md +6 -5
- package/agent-assets/skills/today/references/today-skeleton.md +66 -0
- package/agent-assets/skills/today/seeds/agent-notes-flavors.seed.json +1 -1
- package/agent-assets/skills/today/seeds/section-shape.seed.json +7 -7
- package/agent-assets/skills/user-interview/SKILL.md +21 -93
- package/agent-assets/skills/user-interview/references/op-briefing.md +3 -3
- package/agent-assets/skills/user-interview/references/op-dm-handler.md +88 -0
- package/agent-assets/skills/user-interview/references/op-morning.md +1 -1
- package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +9 -1
- package/agent-assets/skills/user-profile/SKILL.md +29 -39
- package/agent-assets/skills/user-profile/curation.json +4 -4
- package/agent-assets/skills/user-profile/references/character-preferences.md +3 -3
- package/agent-assets/skills/user-profile/seeds/routing-table.seed.json +8 -8
- package/agent-assets/skills/user-profile/seeds/topic-files.seed.json +6 -6
- package/agent-assets/skills/wiki/wiki-ask/SKILL.md +1 -1
- package/agent-assets/skills/wiki/wiki-compile/SKILL.md +9 -8
- package/agent-assets/skills/wiki/wiki-connect/SKILL.md +32 -5
- package/agent-assets/skills/wiki/wiki-ingest/SKILL.md +6 -50
- package/agent-assets/skills/wiki/wiki-ingest/references/curl-errors.md +58 -0
- package/agent-assets/skills/wiki/wiki-lint/SKILL.md +20 -14
- package/agent-assets/skills/wiki/wiki-trace/SKILL.md +10 -5
- package/agent-assets/skills/wiki/wiki-vault-rules/SKILL.md +2 -0
- package/agent-assets/system-prompts/routine-fetch-window.md +22 -12
- package/agent-assets/task-flows/_partials/calendar-acquire.google_calendar.md +4 -2
- package/agent-assets/task-flows/_partials/calendar-acquire.outlook_calendar.md +4 -2
- package/agent-assets/task-flows/_partials/capture-user-info.md +2 -2
- package/agent-assets/task-flows/_partials/dm-intent.long-horizon.md +1 -1
- package/agent-assets/task-flows/_partials/dm-intent.project.md +9 -9
- package/agent-assets/task-flows/_partials/feedback-capture.md +30 -0
- package/agent-assets/task-flows/_partials/mail-acquire.outlook_mail.md +3 -2
- package/agent-assets/task-flows/_partials/notion-acquire.notion.md +10 -5
- package/agent-assets/task-flows/browser_task.md +84 -0
- package/agent-assets/task-flows/github.assigned.md +1 -1
- package/agent-assets/task-flows/github.pull_request.review_requested.md +2 -2
- package/agent-assets/task-flows/github.workflow_run.failed.md +2 -2
- package/agent-assets/task-flows/knowledge.import.md +14 -14
- package/agent-assets/task-flows/message.received.dm.md +13 -4
- package/agent-assets/task-flows/message.received.dm_first.md +7 -3
- package/agent-assets/task-flows/routine.custom.md +3 -3
- package/agent-assets/task-flows/routine.evening_review.md +88 -8
- package/agent-assets/task-flows/routine.fetch_window.md +2 -2
- package/agent-assets/task-flows/routine.hourly_check.md +16 -12
- package/agent-assets/task-flows/routine.monthly_review.md +93 -21
- package/agent-assets/task-flows/routine.morning_routine_journal.md +119 -97
- package/agent-assets/task-flows/routine.morning_routine_today.md +43 -43
- package/agent-assets/task-flows/routine.research_cluster_update.md +35 -0
- package/agent-assets/task-flows/routine.research_dispatch.md +38 -0
- package/agent-assets/task-flows/routine.research_offer_dm.md +125 -0
- package/agent-assets/task-flows/routine.research_wiki_summary.md +53 -0
- package/agent-assets/task-flows/routine.roadmap_refresh.md +10 -10
- package/agent-assets/task-flows/routine.today_refresh.md +4 -4
- package/agent-assets/task-flows/routine.user_profile_sweep.md +10 -10
- package/agent-assets/task-flows/routine.weekly_review.md +114 -24
- package/agent-assets/task-flows/schedule.approaching.md +0 -1
- package/agent-assets/task-flows/scheduled.dm.md +5 -5
- package/agent-assets/task-flows/scheduled.task.md +4 -4
- package/agent-assets/task-flows/setup.initial.md +21 -21
- package/agent-assets/task-flows/setup.update.md +2 -2
- package/agent-assets/task-flows/wiki.trace.md +1 -1
- package/agent-assets/templates/README.md +27 -20
- package/agent-assets/templates/_index.md +42 -26
- package/agent-assets/templates/_manifest.json +34 -99
- package/agent-assets/templates/{user → identity}/_index.md +1 -1
- package/agent-assets/templates/{user → identity}/profile.md +2 -2
- package/agent-assets/templates/{dossiers → knowledge/dossiers}/_index.md +1 -1
- package/agent-assets/templates/{projects → plans/projects}/_active.base +1 -1
- package/agent-assets/templates/policies/_index.md +21 -0
- package/agent-assets/templates/{rules → policies}/journal-export.md +1 -1
- package/agent-assets/templates/{rules → policies}/journal-format.md +5 -5
- package/agent-assets/templates/{rules/policies → policies/management-captures}/_index.md +2 -2
- package/agent-assets/templates/{rules → policies}/management.md +3 -3
- package/agent-assets/templates/{rules → policies}/mcp.md +1 -1
- package/agent-assets/templates/{rules → policies}/redaction.md +1 -1
- package/agent-assets/templates/{routines → policies/routines}/_index.md +1 -1
- package/agent-assets/templates/{routines → policies/routines}/evening.md +2 -2
- package/agent-assets/templates/{routines → policies/routines}/hourly.md +1 -1
- package/agent-assets/templates/{routines → policies/routines}/monthly.md +2 -2
- package/bin/aitne.mjs +58 -15
- package/package.json +5 -4
- package/scripts/commands/doctor.mjs +25 -10
- package/scripts/commands/run-now.mjs +6 -21
- package/scripts/lib/ports.d.mts +27 -0
- package/scripts/lib/ports.mjs +36 -0
- package/scripts/lib/process-identity.d.mts +46 -0
- package/scripts/lib/process-identity.mjs +193 -0
- package/scripts/lib/read-api-token.mjs +176 -0
- package/scripts/start.mjs +16 -5
- package/agent-assets/docs/features/lifestyle/travel-time.md +0 -58
- package/agent-assets/skills/gmail-lifestyle/references/travel-time-api.md +0 -59
- package/agent-assets/skills/schedule/references/recurring.md +0 -185
- package/agent-assets/templates/context-index.md +0 -42
- package/agent-assets/templates/rules/_index.md +0 -19
- /package/agent-assets/templates/{user → identity}/expertise.md +0 -0
- /package/agent-assets/templates/{user → identity}/goals.md +0 -0
- /package/agent-assets/templates/{user → identity}/people.md +0 -0
- /package/agent-assets/templates/{user → identity}/personal.md +0 -0
- /package/agent-assets/templates/{user → identity}/work.md +0 -0
- /package/agent-assets/templates/{agent/journal.md → journal/agent.md} +0 -0
- /package/agent-assets/templates/{dossiers → knowledge/dossiers}/evening.md +0 -0
- /package/agent-assets/templates/{dossiers → knowledge/dossiers}/hourly.md +0 -0
- /package/agent-assets/templates/{dossiers → knowledge/dossiers}/monthly.md +0 -0
- /package/agent-assets/templates/{dossiers → knowledge/dossiers}/morning.md +0 -0
- /package/agent-assets/templates/{dossiers → knowledge/dossiers}/roadmap.md +0 -0
- /package/agent-assets/templates/{dossiers → knowledge/dossiers}/weekly.md +0 -0
- /package/agent-assets/templates/{projects → plans/projects}/_index.md +0 -0
- /package/agent-assets/templates/{roadmap.md → plans/roadmap.md} +0 -0
- /package/agent-assets/templates/{routines → policies/routines}/morning.md +0 -0
- /package/agent-assets/templates/{routines → policies/routines}/weekly.md +0 -0
- /package/agent-assets/templates/{agent → state}/profile-questions.md +0 -0
- /package/agent-assets/templates/{today.md → state/today.md} +0 -0
|
@@ -15,20 +15,23 @@ repositories layout (see
|
|
|
15
15
|
`docs/design/appendices/unified-repositories.md` §4.5):
|
|
16
16
|
|
|
17
17
|
- **Git-managed repositories** (any classification) write to
|
|
18
|
-
`
|
|
18
|
+
`knowledge/repos/<slug>/overview.md` plus per-day
|
|
19
|
+
`journal/repos/<slug>/<YYYY-MM-DD>.md`.
|
|
19
20
|
- **Non-git project pages** (manual projects without a backing repo)
|
|
20
|
-
still live at `projects/<slug>.md` per the original layout.
|
|
21
|
+
still live at `plans/projects/<slug>.md` per the original layout.
|
|
21
22
|
|
|
22
23
|
The pre-cutover paths `projects/<slug>.md` (for git-backed projects)
|
|
23
|
-
and `git-repos/<slug>.md` are **retired
|
|
24
|
-
|
|
24
|
+
and `git-repos/<slug>.md` are **retired**; the `git/<slug>/` spelling is
|
|
25
|
+
a deprecated alias the daemon still normalizes for one release. Every
|
|
26
|
+
git-managed repo now lives under `knowledge/repos/<slug>/` (overview)
|
|
27
|
+
plus `journal/repos/<slug>/` (daily journal). Classification (`project` vs `repo-only`)
|
|
25
28
|
no longer changes the path; it controls which sections the overview
|
|
26
29
|
carries (project keeps `## Lifecycle Phases`, repo-only stays light).
|
|
27
30
|
|
|
28
31
|
## Hard rules
|
|
29
32
|
|
|
30
33
|
- Write only through `/api/context/*`. Never edit files directly on disk.
|
|
31
|
-
- Do not modify `today.md`, `roadmap.md`, `user/*`, `rules/*`, or
|
|
34
|
+
- Do not modify `state/today.md`, `plans/roadmap.md`, `user/*`, `rules/*`, or
|
|
32
35
|
unrelated context files.
|
|
33
36
|
- Preserve valid frontmatter. The overview file uses `type: git-project`,
|
|
34
37
|
the journal file uses `type: git-journal`. Both carry an ISO `updated`
|
|
@@ -40,7 +43,7 @@ carries (project keeps `## Lifecycle Phases`, repo-only stays light).
|
|
|
40
43
|
- Preserve user prose, manual notes, and existing headings. Compress
|
|
41
44
|
old Git history instead of deleting meaningful context.
|
|
42
45
|
|
|
43
|
-
## Overview file shape (`
|
|
46
|
+
## Overview file shape (`knowledge/repos/<slug>/overview.md`)
|
|
44
47
|
|
|
45
48
|
- Frontmatter: `type: git-project`, `repository_id`, `slug`,
|
|
46
49
|
`github_repo` (or null), `local_path`, `classification`, `category`,
|
|
@@ -53,7 +56,7 @@ carries (project keeps `## Lifecycle Phases`, repo-only stays light).
|
|
|
53
56
|
- `## Open Threads` (manual prose; preserved verbatim)
|
|
54
57
|
- `## Daily Activity Log` (rolling 30-day window)
|
|
55
58
|
|
|
56
|
-
## Journal file shape (`
|
|
59
|
+
## Journal file shape (`journal/repos/<slug>/<YYYY-MM-DD>.md`)
|
|
57
60
|
|
|
58
61
|
- Frontmatter: `type: git-journal`, `repository_id`, `date`,
|
|
59
62
|
`commit_count`, `pr_events`, `workflow_events`.
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"kind": "knowledge_layout",
|
|
7
7
|
"anchor": "<!-- CURATION:knowledge_layout id=\"project-shape\" -->",
|
|
8
8
|
"human_label": "Project / git-repo file shape",
|
|
9
|
-
"description": "Required sections in
|
|
10
|
-
"scope_paths": ["projects/*.md", "
|
|
9
|
+
"description": "Required sections in knowledge/repos/<slug>/overview.md (git-managed repos) and plans/projects/*.md (non-git manual projects), and what each section holds",
|
|
10
|
+
"scope_paths": ["plans/projects/*.md", "knowledge/repos/*/overview.md"]
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"id": "slug-grammar",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"anchor": "<!-- CURATION:convention_notes id=\"slug-grammar\" -->",
|
|
16
16
|
"human_label": "Project slug grammar",
|
|
17
17
|
"description": "Slug format, length cap, reserved stems",
|
|
18
|
-
"scope_paths": ["projects/*.md", "
|
|
18
|
+
"scope_paths": ["plans/projects/*.md", "knowledge/repos/*/overview.md"]
|
|
19
19
|
}
|
|
20
20
|
]
|
|
21
21
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"kind": "knowledge_layout",
|
|
3
3
|
"files": [
|
|
4
4
|
{
|
|
5
|
-
"path": "projects/*.md",
|
|
5
|
+
"path": "plans/projects/*.md",
|
|
6
6
|
"purpose": "Per-project context document for Git-backed projects",
|
|
7
7
|
"sections": [
|
|
8
8
|
{ "heading": "## Overview", "contains": "one-paragraph description of the project and its current state" },
|
|
@@ -14,11 +14,14 @@
|
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
|
-
"path": "
|
|
18
|
-
"purpose": "Per-repository
|
|
17
|
+
"path": "knowledge/repos/*/overview.md",
|
|
18
|
+
"purpose": "Per-repository overview for every git-managed repo (replaces the retired git-repos/*.md layout)",
|
|
19
19
|
"sections": [
|
|
20
|
-
{ "heading": "##
|
|
21
|
-
{ "heading": "##
|
|
20
|
+
{ "heading": "## Summary", "contains": "one-paragraph description of the repo and its current state" },
|
|
21
|
+
{ "heading": "## Architecture", "contains": "structural notes on the repo's layout and components" },
|
|
22
|
+
{ "heading": "## Notable Changes", "contains": "human-readable notes on important commits or decisions" },
|
|
23
|
+
{ "heading": "## Open Threads", "contains": "manual prose; follow-ups and pending questions, preserved verbatim" },
|
|
24
|
+
{ "heading": "## Daily Activity Log", "contains": "rolling 30-day window of summarised activity" }
|
|
22
25
|
]
|
|
23
26
|
}
|
|
24
27
|
]
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
"notes": [
|
|
4
4
|
{
|
|
5
5
|
"topic": "Slug format",
|
|
6
|
-
"rule": "Project and repo slugs are
|
|
7
|
-
"example": "projects/cost-explorer.md,
|
|
6
|
+
"rule": "Project and repo slugs are lowercase; deriveSlug sanitizes to [a-z0-9._-], so digits, dots, underscores, and hyphens all survive (e.g. v1.2.3).",
|
|
7
|
+
"example": "plans/projects/cost-explorer.md, knowledge/repos/personal-agent/overview.md"
|
|
8
8
|
},
|
|
9
9
|
{
|
|
10
10
|
"topic": "Slug length",
|
|
11
|
-
"rule": "Slugs are
|
|
12
|
-
"example": "projects/personal-agent-skills.md is at the upper bound"
|
|
11
|
+
"rule": "Slugs are 60 characters or fewer (SLUG_MAX), including the hyphens but excluding the .md suffix.",
|
|
12
|
+
"example": "plans/projects/personal-agent-skills.md is at the upper bound"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"topic": "Reserved stems",
|
|
16
16
|
"rule": "Stems _index and _archive are reserved for daemon-maintained files and not in use as project slugs.",
|
|
17
|
-
"example": "projects/_index.md is a directory listing, not a project file"
|
|
17
|
+
"example": "plans/projects/_index.md is a directory listing, not a project file"
|
|
18
18
|
}
|
|
19
19
|
]
|
|
20
20
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: reading
|
|
3
|
-
description: Load when the user mentions a book or highlight, weekly/monthly reviews need reading progress, or routines need to refresh the reading-taste profile (`
|
|
3
|
+
description: Load when the user mentions a book or highlight, weekly/monthly reviews need reading progress, or routines need to refresh the reading-taste profile (`identity/reading-taste.md`) and propose new book candidates. Owns the taste-profile schema and recommendation rules.
|
|
4
4
|
allowed-tools:
|
|
5
5
|
- Bash(curl *)
|
|
6
6
|
- Read
|
|
@@ -12,8 +12,7 @@ allowed-tools:
|
|
|
12
12
|
|
|
13
13
|
The daemon stores books and reading highlights imported from Kindle
|
|
14
14
|
(My Clippings.txt and the "Export Notebook" email pipeline) and manual
|
|
15
|
-
entries. Data lives in `books` and `reading_highlights` tables.
|
|
16
|
-
display text in `reading-taste.md` must be English (project convention).
|
|
15
|
+
entries. Data lives in `books` and `reading_highlights` tables.
|
|
17
16
|
|
|
18
17
|
## When to Use
|
|
19
18
|
|
|
@@ -93,30 +92,9 @@ curl -s "http://localhost:8321/api/books?limit=200&offset=200"
|
|
|
93
92
|
| `limit` | number | 50 | Page size (1–200) |
|
|
94
93
|
| `offset` | number | 0 | Rows to skip. Use with `limit` to paginate beyond the 200 cap |
|
|
95
94
|
|
|
96
|
-
Response:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
"books": [
|
|
100
|
-
{
|
|
101
|
-
"id": 1,
|
|
102
|
-
"title": "Thinking, Fast and Slow",
|
|
103
|
-
"author": "Daniel Kahneman",
|
|
104
|
-
"source": "kindle",
|
|
105
|
-
"status": "reading",
|
|
106
|
-
"startedAt": null,
|
|
107
|
-
"completedAt": null,
|
|
108
|
-
"rating": null,
|
|
109
|
-
"notes": null,
|
|
110
|
-
"highlightCount": 47,
|
|
111
|
-
"createdAt": "2026-04-01T10:00:00Z"
|
|
112
|
-
}
|
|
113
|
-
],
|
|
114
|
-
"total": 1,
|
|
115
|
-
"limit": 50,
|
|
116
|
-
"offset": 0,
|
|
117
|
-
"hasMore": false
|
|
118
|
-
}
|
|
119
|
-
```
|
|
95
|
+
Response: `{ books: [...], total, limit, offset, hasMore }`. Each
|
|
96
|
+
book carries `id`, `title`, `author`, `source`, `status`, `rating`,
|
|
97
|
+
`highlightCount` (plus `startedAt`/`completedAt`/`notes`/`createdAt`).
|
|
120
98
|
|
|
121
99
|
When iterating the entire library, keep calling with `offset += limit`
|
|
122
100
|
until `hasMore === false`.
|
|
@@ -137,28 +115,26 @@ Reading statistics.
|
|
|
137
115
|
curl -s "http://localhost:8321/api/books/summary?months=12"
|
|
138
116
|
```
|
|
139
117
|
|
|
140
|
-
Response:
|
|
141
|
-
|
|
142
|
-
{
|
|
143
|
-
"byStatus": [
|
|
144
|
-
{ "status": "reading", "count": 3 },
|
|
145
|
-
{ "status": "completed", "count": 12 }
|
|
146
|
-
],
|
|
147
|
-
"monthlyCompleted": [
|
|
148
|
-
{ "month": "2026-04", "count": 1 },
|
|
149
|
-
{ "month": "2026-03", "count": 2 }
|
|
150
|
-
],
|
|
151
|
-
"totalHighlights": 234
|
|
152
|
-
}
|
|
153
|
-
```
|
|
118
|
+
Response: `{ byStatus: [{status, count}], monthlyCompleted:
|
|
119
|
+
[{month, count}], totalHighlights }`.
|
|
154
120
|
|
|
155
121
|
### PATCH /api/books/:id
|
|
156
122
|
|
|
157
123
|
Update book status, rating, or notes.
|
|
158
124
|
|
|
125
|
+
**Approve tier (Bearer required).** This is an operator/dashboard-gated
|
|
126
|
+
write — an autonomous agent curl from a session workdir carries no
|
|
127
|
+
`Authorization: Bearer` header and will be rejected with **401** before
|
|
128
|
+
the handler runs. Do NOT call this autonomously and do NOT assume the
|
|
129
|
+
update landed; book status/rating/notes corrections are made by the user
|
|
130
|
+
via the dashboard. (Body shape, for reference: `status` enum
|
|
131
|
+
`reading|completed|abandoned`, `rating` 1-5, `notes`.)
|
|
132
|
+
|
|
159
133
|
```bash
|
|
134
|
+
# Operator/dashboard-only — requires Authorization: Bearer (Approve tier).
|
|
160
135
|
curl -s -X PATCH "http://localhost:8321/api/books/1" \
|
|
161
136
|
-H "Content-Type: application/json" \
|
|
137
|
+
-H "Authorization: Bearer <operator-token>" \
|
|
162
138
|
-d '{"status": "completed", "rating": 4}'
|
|
163
139
|
```
|
|
164
140
|
|
|
@@ -195,6 +171,6 @@ New highlights: 34
|
|
|
195
171
|
|
|
196
172
|
---
|
|
197
173
|
|
|
198
|
-
## Reading Taste Profile (`
|
|
174
|
+
## Reading Taste Profile (`identity/reading-taste.md`)
|
|
199
175
|
|
|
200
176
|
{{> ref:reading-taste }}
|
|
@@ -6,7 +6,7 @@ parent_skill: reading
|
|
|
6
6
|
This file captures what the user reads and *why* — topics they return to,
|
|
7
7
|
how they think, values that keep surfacing in their highlights, and a
|
|
8
8
|
rolling list of candidate books. It is dictionary-like (same layer as
|
|
9
|
-
other `
|
|
9
|
+
other `identity/*.md` files) and is consumed on-demand — never injected
|
|
10
10
|
into every session. Do not notify the user about taste updates.
|
|
11
11
|
|
|
12
12
|
### When to refresh
|
|
@@ -26,7 +26,7 @@ The file carries a dedicated frontmatter line `Highlights at last sweep: N`
|
|
|
26
26
|
holding the `totalHighlights` value from `GET /api/books/summary` at the
|
|
27
27
|
time of the last successful write. To decide whether to refresh:
|
|
28
28
|
|
|
29
|
-
1. `GET /api/context/
|
|
29
|
+
1. `GET /api/context/identity/reading-taste` — if 404, treat as
|
|
30
30
|
`N = 0` and proceed (first sweep).
|
|
31
31
|
2. `GET /api/books/summary` — read `totalHighlights` as `M`.
|
|
32
32
|
3. If `M - N < 10`, skip the sweep (log one bullet under agent-journal
|
|
@@ -62,7 +62,7 @@ The refresh-trigger check (previous section) uses `totalHighlights` from
|
|
|
62
62
|
|
|
63
63
|
### Required file schema
|
|
64
64
|
|
|
65
|
-
First refresh writes the whole file via `PUT /api/context/
|
|
65
|
+
First refresh writes the whole file via `PUT /api/context/identity/reading-taste`.
|
|
66
66
|
Subsequent refreshes use `PATCH` per section (but the metadata lines must
|
|
67
67
|
be updated via a full-file `PUT`). Required structure:
|
|
68
68
|
|
|
@@ -126,7 +126,7 @@ updated: YYYY-MM-DD
|
|
|
126
126
|
Replace a single section (snake_case the heading):
|
|
127
127
|
|
|
128
128
|
```bash
|
|
129
|
-
curl -s -X PATCH http://localhost:8321/api/context/
|
|
129
|
+
curl -s -X PATCH http://localhost:8321/api/context/identity/reading-taste \
|
|
130
130
|
-H 'Content-Type: application/json' \
|
|
131
131
|
-d '{"section": "topics_of_interest", "mode": "replace", "content": "- cognitive biases\n- systems design"}'
|
|
132
132
|
```
|
|
@@ -134,7 +134,7 @@ curl -s -X PATCH http://localhost:8321/api/context/user/reading-taste \
|
|
|
134
134
|
Replace the full file (first time, or after a major reset):
|
|
135
135
|
|
|
136
136
|
```bash
|
|
137
|
-
curl -s -X PUT http://localhost:8321/api/context/
|
|
137
|
+
curl -s -X PUT http://localhost:8321/api/context/identity/reading-taste \
|
|
138
138
|
-H 'Content-Type: application/json' \
|
|
139
139
|
-d '{"content": "---\ntype: user\nowner: shared\nupdated: 2026-04-21\n---\n# Reading Taste\n> Last updated: 2026-04-16 09:00\n> Sampled: 87 highlights across 8 books (window: last 12 weeks)\n> Highlights at last sweep: 245\n\n## Topics of Interest\n- ...\n..."}'
|
|
140
140
|
```
|
|
@@ -146,12 +146,12 @@ the sweep to write the refreshed metadata and YAML `updated` date.
|
|
|
146
146
|
|
|
147
147
|
### First-write registration (_index.md)
|
|
148
148
|
|
|
149
|
-
The `
|
|
149
|
+
The `identity/_index.md` file indexes available topic files. When
|
|
150
150
|
creating `reading-taste.md` for the first time (GET returned 404),
|
|
151
151
|
append a one-line entry to the index so other flows can discover it:
|
|
152
152
|
|
|
153
153
|
```bash
|
|
154
|
-
curl -s -X PATCH http://localhost:8321/api/context/
|
|
154
|
+
curl -s -X PATCH http://localhost:8321/api/context/identity/_index \
|
|
155
155
|
-H 'Content-Type: application/json' \
|
|
156
156
|
-d '{"section": "topics", "mode": "append", "content": "- reading-taste — derived taste profile + rolling book candidates (updated weekly)"}'
|
|
157
157
|
```
|
|
@@ -10,11 +10,11 @@ allowed-tools:
|
|
|
10
10
|
|
|
11
11
|
Output language: roadmap.md is Policy B — see `<output_language_policy>`. Section headers stay English skeleton; items, narrative, and preparation-timeline prose are in `<settings primary_language>`. Preserve user-customized headers verbatim.
|
|
12
12
|
|
|
13
|
-
`roadmap.md` is the single source of truth for **long-horizon user
|
|
14
|
-
intent** — everything that does not belong in `today.md`. It aggregates
|
|
13
|
+
`plans/roadmap.md` is the single source of truth for **long-horizon user
|
|
14
|
+
intent** — everything that does not belong in `state/today.md`. It aggregates
|
|
15
15
|
Calendar events, pending `agent_schedule` rows, DM-captured intent,
|
|
16
16
|
mail-derived bookings, reading goals, and observations; Morning Routine
|
|
17
|
-
consumes it to shape `today.md`.
|
|
17
|
+
consumes it to shape `state/today.md`.
|
|
18
18
|
|
|
19
19
|
## Section schema
|
|
20
20
|
|
|
@@ -93,16 +93,9 @@ Status: pending | running | completed | failed
|
|
|
93
93
|
- [<horizon-tag>] <intent> — Source: <dm|mail|observation|reading|dashboard|manual> <YYYY-MM-DD> — Review: <YYYY-MM-DD|[noreview]> — ReviewCount: <0-3> <!-- id: rm-YYYYMMDD-abcdef -->
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
- `YYYY-Qn` → calendar quarter
|
|
99
|
-
- `YYYY spring|summer|autumn|winter`
|
|
100
|
-
- `undated` → no horizon yet
|
|
101
|
-
|
|
102
|
-
Examples:
|
|
96
|
+
One worked example (full horizon-tag grammar + more examples are in
|
|
97
|
+
the horizon-tags reference):
|
|
103
98
|
- `- [2026-05] LA trip candidate — Source: dm 2026-04-19 — Review: 2026-04-20 — ReviewCount: 0 <!-- id: rm-20260419-a3f1c2 -->`
|
|
104
|
-
- `- [2026-Q3] US study prep — Source: dm 2026-04-19 — Review: 2026-05-17 — ReviewCount: 0 <!-- id: rm-20260419-b8e7d4 -->`
|
|
105
|
-
- `- [undated] Eventually learn Spanish — Source: dm 2026-04-19 — Review: [noreview] — ReviewCount: 3 <!-- id: rm-20260419-0d4c9a -->`
|
|
106
99
|
|
|
107
100
|
## Stable entry identity
|
|
108
101
|
|
|
@@ -117,9 +110,9 @@ must carry a daemon-minted HTML comment ID:
|
|
|
117
110
|
- The `YYYYMMDD` segment is the entry creation date / Source date, not
|
|
118
111
|
the event date. Keep it stable when dates are refined.
|
|
119
112
|
- Do not invent IDs in prose. Before adding a new roadmap entry, call
|
|
120
|
-
`POST /api/context/roadmap/id`:
|
|
113
|
+
`POST /api/context/plans/roadmap/id`:
|
|
121
114
|
```bash
|
|
122
|
-
curl -s -X POST http://localhost:8321/api/context/roadmap/id \
|
|
115
|
+
curl -s -X POST http://localhost:8321/api/context/plans/roadmap/id \
|
|
123
116
|
-H 'Content-Type: application/json' \
|
|
124
117
|
-d '{"creationDate": "YYYY-MM-DD"}'
|
|
125
118
|
```
|
|
@@ -187,16 +180,7 @@ this recipe — they always emit the full section schema.
|
|
|
187
180
|
|
|
188
181
|
## Retention (RFC-D preview)
|
|
189
182
|
|
|
190
|
-
|
|
191
|
-
date is within `[today - 7d, today + 180d]`. Older entries whose
|
|
192
|
-
Preparation Timeline rows are all `completed` roll off into `daily/`
|
|
193
|
-
history.
|
|
194
|
-
- **`Scheduled:` entries** — kept while the Wake-up date is within
|
|
195
|
-
`[today - 1d, today + 180d]`. On completion, Status flips to
|
|
196
|
-
`completed` and the entry persists one extra day for the journal.
|
|
197
|
-
- **Long-term Plans** — entries without date movement for 90 days are
|
|
198
|
-
marked `[stale]` by Evening Review. 180 days without user
|
|
199
|
-
confirmation → DM; no reply in 7 days → remove.
|
|
183
|
+
{{> ref:retention }}
|
|
200
184
|
|
|
201
185
|
## API surface
|
|
202
186
|
|
|
@@ -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
|
}
|
|
@@ -22,7 +22,7 @@ context. Other flows (DM handler, evening sweeper) may acquire and
|
|
|
22
22
|
release manually.
|
|
23
23
|
|
|
24
24
|
Include `X-Lock-Id: <roadmap_write_lock_id>` on every PUT / PATCH to
|
|
25
|
-
`/api/context/roadmap` when the tag is in your context. Other
|
|
25
|
+
`/api/context/plans/roadmap` when the tag is in your context. Other
|
|
26
26
|
sessions get `409 roadmap_write_lock_held` while the lock is held —
|
|
27
27
|
back off 30 s and retry up to 3 times.
|
|
28
28
|
|
|
@@ -31,18 +31,18 @@ back off 30 s and retry up to 3 times.
|
|
|
31
31
|
These return `404 {"error":"unknown_route", …}` with a hint pointing
|
|
32
32
|
at the correct path:
|
|
33
33
|
|
|
34
|
-
- `POST /api/context/roadmap/lock` — order reversed
|
|
35
|
-
- `POST /api/context/roadmap/write-lock` — order reversed and wrong noun
|
|
34
|
+
- `POST /api/context/plans/roadmap/lock` — order reversed
|
|
35
|
+
- `POST /api/context/plans/roadmap/write-lock` — order reversed and wrong noun
|
|
36
36
|
- `POST /api/context/lock/roadmap-write` — wrong noun
|
|
37
37
|
|
|
38
38
|
A `401 {"error":"unauthorized"}` from a path you believe is correct
|
|
39
39
|
means the path is still wrong (the lock endpoints are Autonomous-tier
|
|
40
40
|
so no bearer token is required).
|
|
41
41
|
|
|
42
|
-
## ID mint — `POST /api/context/roadmap/id`
|
|
42
|
+
## ID mint — `POST /api/context/plans/roadmap/id`
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
curl -s -X POST http://localhost:8321/api/context/roadmap/id \
|
|
45
|
+
curl -s -X POST http://localhost:8321/api/context/plans/roadmap/id \
|
|
46
46
|
-H 'Content-Type: application/json' \
|
|
47
47
|
-H 'X-Lock-Id: <roadmap_write_lock_id>' \
|
|
48
48
|
-d '{"creationDate":"YYYY-MM-DD"}'
|
|
@@ -64,7 +64,7 @@ The roadmap API validates two invariants on every PUT / PATCH:
|
|
|
64
64
|
file. Duplicate ids return:
|
|
65
65
|
|
|
66
66
|
```json
|
|
67
|
-
{"error":"validation_error","message":"
|
|
67
|
+
{"ok":false,"errors":[{"code":"context.content_validation_failed"}],"error":"validation_error","message":"Duplicate roadmap entry id `rm-YYYYMMDD-abcdef` (first seen on line N).","path":"roadmap.md"}
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
Recovery: re-GET `roadmap`, mint a fresh id **for the colliding
|
|
@@ -74,11 +74,12 @@ The roadmap API validates two invariants on every PUT / PATCH:
|
|
|
74
74
|
|
|
75
75
|
2. **Transition guard.** If an entry id survives from previous → next
|
|
76
76
|
content, every prior `completed …` row for that id must still
|
|
77
|
-
exist byte-for-byte.
|
|
78
|
-
|
|
77
|
+
exist byte-for-byte. If a completed prep row that existed before is
|
|
78
|
+
gone — dropped or reworded, since a reword no longer matches
|
|
79
|
+
byte-for-byte — the write returns:
|
|
79
80
|
|
|
80
81
|
```json
|
|
81
|
-
{"error":"validation_error","message":"
|
|
82
|
+
{"ok":false,"errors":[{"code":"context.content_validation_failed"}],"error":"validation_error","message":"Completed Preparation Timeline row for entry `rm-…` was dropped.","path":"roadmap.md"}
|
|
82
83
|
```
|
|
83
84
|
|
|
84
85
|
This is intentional: completed prep rows are the audit trail for
|
|
@@ -87,11 +88,20 @@ The roadmap API validates two invariants on every PUT / PATCH:
|
|
|
87
88
|
If an entry id disappears entirely between previous → next, removal
|
|
88
89
|
is accepted only when:
|
|
89
90
|
|
|
90
|
-
- The entry's retention window has elapsed (see
|
|
91
|
-
skill body), OR
|
|
91
|
+
- The entry's retention window has elapsed (see the **retention**
|
|
92
|
+
reference loaded by the skill body), OR
|
|
92
93
|
- The operator passes the `X-Operator-Bypass: 1` header (dashboard
|
|
93
94
|
flows only; never set this from an agent curl).
|
|
94
95
|
|
|
96
|
+
A removal before the retention window permits it returns:
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{"ok":false,"errors":[{"code":"context.content_validation_failed"}],"error":"validation_error","message":"Roadmap entry `rm-…` was removed before its retention window permits removal.","path":"roadmap.md"}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Do not blind-retry this — wait out the window or use the operator
|
|
103
|
+
bypass from a dashboard flow.
|
|
104
|
+
|
|
95
105
|
## Body submission
|
|
96
106
|
|
|
97
107
|
- Full PUT body is multi-KB → use the heredoc shape
|
|
@@ -25,14 +25,21 @@ Response shape (one row per booking):
|
|
|
25
25
|
{
|
|
26
26
|
"bookings": [
|
|
27
27
|
{
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
28
|
+
"id": "<int>",
|
|
29
|
+
"type": "flight" | "hotel" | "restaurant" | "train" | "bus" | "other",
|
|
30
|
+
"provider": "<string>",
|
|
31
31
|
"destination": "city / airport / property name",
|
|
32
|
-
"
|
|
33
|
-
"
|
|
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"
|
|
34
40
|
}
|
|
35
|
-
]
|
|
41
|
+
],
|
|
42
|
+
"total": "<int>"
|
|
36
43
|
}
|
|
37
44
|
```
|
|
38
45
|
|
|
@@ -43,7 +50,7 @@ A booking matches a roadmap event entry when **either**:
|
|
|
43
50
|
- The booking's `destination` substring-matches the event entry's
|
|
44
51
|
`Destination:` field (case-insensitive, after stripping common
|
|
45
52
|
prefixes / suffixes — "Paris" matches "Paris, FR" and "Paris CDG").
|
|
46
|
-
- The booking's `
|
|
53
|
+
- The booking's `startDate` date falls within the event entry's
|
|
47
54
|
`YYYY-MM-DD ~ MM-DD` header range (inclusive on both ends).
|
|
48
55
|
|
|
49
56
|
When a match is found:
|
|
@@ -54,7 +61,7 @@ When a match is found:
|
|
|
54
61
|
<YYYY-MM-DD> confirmation #<conf>`), preserving the original
|
|
55
62
|
`[tag]` and date.
|
|
56
63
|
3. Append a line to the entry's `**Agent Notes:**` block:
|
|
57
|
-
`- Booking confirmed (<
|
|
64
|
+
`- Booking confirmed (<type>) — #<confirmationNumber>`.
|
|
58
65
|
|
|
59
66
|
## When no match exists
|
|
60
67
|
|
|
@@ -3,6 +3,17 @@ kind: reference
|
|
|
3
3
|
parent_skill: roadmap
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
Horizon-tag grammar (validated by the context API):
|
|
7
|
+
- `YYYY-MM` → month-granular
|
|
8
|
+
- `YYYY-Qn` → calendar quarter
|
|
9
|
+
- `YYYY spring|summer|autumn|winter`
|
|
10
|
+
- `undated` → no horizon yet
|
|
11
|
+
|
|
12
|
+
Worked examples:
|
|
13
|
+
- `- [2026-05] LA trip candidate — Source: dm 2026-04-19 — Review: 2026-04-20 — ReviewCount: 0 <!-- id: rm-20260419-a3f1c2 -->`
|
|
14
|
+
- `- [2026-Q3] US study prep — Source: dm 2026-04-19 — Review: 2026-05-17 — ReviewCount: 0 <!-- id: rm-20260419-b8e7d4 -->`
|
|
15
|
+
- `- [undated] Eventually learn Spanish — Source: dm 2026-04-19 — Review: [noreview] — ReviewCount: 3 <!-- id: rm-20260419-0d4c9a -->`
|
|
16
|
+
|
|
6
17
|
`Review:` is the date when Evening Review should re-evaluate whether the
|
|
7
18
|
line is ready to become an Agent Action Plan entry. Date math uses the
|
|
8
19
|
configured user timezone, not UTC midnight.
|
|
@@ -4,18 +4,18 @@ name: migration
|
|
|
4
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
5
|
---
|
|
6
6
|
|
|
7
|
-
# Section auto-ensure — legacy `roadmap.md` files
|
|
7
|
+
# Section auto-ensure — legacy `plans/roadmap.md` files
|
|
8
8
|
|
|
9
9
|
Roadmaps created before the `## Long-term Plans` section was
|
|
10
|
-
introduced may be missing that header. A
|
|
11
|
-
`
|
|
10
|
+
introduced may be missing that header. A PATCH targeting the
|
|
11
|
+
`Long-term Plans` section against such a file returns
|
|
12
12
|
`400 section_not_found`. This reference is the one-time recovery
|
|
13
13
|
recipe DM handlers and the evening sweeper run before their first
|
|
14
|
-
write to `
|
|
14
|
+
write to the `Long-term Plans` section.
|
|
15
15
|
|
|
16
16
|
## When to run
|
|
17
17
|
|
|
18
|
-
Run this **only** if you are about to PATCH `
|
|
18
|
+
Run this **only** if you are about to PATCH the `Long-term Plans` section and the
|
|
19
19
|
file's body is unknown to you. Full-file PUT writers
|
|
20
20
|
(`routine.roadmap_refresh`) always emit the full section schema, so
|
|
21
21
|
they never trigger `section_not_found` and never need this recipe.
|
|
@@ -24,22 +24,24 @@ they never trigger `section_not_found` and never need this recipe.
|
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
26
|
# 1. Read the file
|
|
27
|
-
curl -s http://localhost:8321/api/context/roadmap
|
|
27
|
+
curl -s http://localhost:8321/api/context/plans/roadmap
|
|
28
28
|
|
|
29
29
|
# 2. Inspect the body for "## Long-term Plans". If present, skip the
|
|
30
30
|
# insert and go straight to the normal PATCH below.
|
|
31
31
|
|
|
32
32
|
# 3. Absent → insert it after "## Quarterly Focus":
|
|
33
|
-
curl -s -X PATCH http://localhost:8321/api/context/roadmap \
|
|
33
|
+
curl -s -X PATCH http://localhost:8321/api/context/plans/roadmap \
|
|
34
34
|
-H 'Content-Type: application/json' \
|
|
35
35
|
-H 'X-Lock-Id: <roadmap_write_lock_id>' \
|
|
36
36
|
-d '{"section": "quarterly_focus", "mode": "append", "content": "\n## Long-term Plans\n"}'
|
|
37
37
|
|
|
38
|
-
# 4. Then PATCH
|
|
39
|
-
|
|
38
|
+
# 4. Then PATCH the Long-term Plans section normally (note: section value
|
|
39
|
+
# "long-term plans" normalizes to match the "## Long-term Plans" header;
|
|
40
|
+
# the underscore form "long_term_plans" does NOT match)
|
|
41
|
+
curl -s -X PATCH http://localhost:8321/api/context/plans/roadmap \
|
|
40
42
|
-H 'Content-Type: application/json' \
|
|
41
43
|
-H 'X-Lock-Id: <roadmap_write_lock_id>' \
|
|
42
|
-
-d '{"section": "
|
|
44
|
+
-d '{"section": "long-term plans", "mode": "append", "content": "- [undated] …"}'
|
|
43
45
|
```
|
|
44
46
|
|
|
45
47
|
## Don'ts
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
kind: reference
|
|
3
|
+
name: retention
|
|
4
|
+
description: Roadmap retention windows (RFC-D preview) — when Agent Action Plan entries, Scheduled rows, and Long-term Plans roll off. Governs removal acceptance in the transition guard.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Retention (RFC-D preview)
|
|
8
|
+
|
|
9
|
+
- **Agent Action Plan event entries** — kept while the event's header
|
|
10
|
+
date is within `[today - 7d, today + 180d]`. Older entries whose
|
|
11
|
+
Preparation Timeline rows are all `completed` roll off into `daily/`
|
|
12
|
+
history.
|
|
13
|
+
- **`Scheduled:` entries** — kept while the Wake-up date is within
|
|
14
|
+
`[today - 1d, today + 180d]`. On completion, Status flips to
|
|
15
|
+
`completed` and the entry persists one extra day for the journal.
|
|
16
|
+
- **Long-term Plans** — entries without date movement for 90 days are
|
|
17
|
+
marked `[stale]` by Evening Review. 180 days without user
|
|
18
|
+
confirmation → DM; no reply in 7 days → remove.
|
|
@@ -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" },
|