@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
|
@@ -0,0 +1,620 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 1
|
|
3
|
+
slug: reference/knowledge-layout
|
|
4
|
+
title: Knowledge Layout Reference
|
|
5
|
+
id: knowledge-layout
|
|
6
|
+
aliases:
|
|
7
|
+
- knowledge layout
|
|
8
|
+
- context layout
|
|
9
|
+
- memory layout
|
|
10
|
+
- vault layout
|
|
11
|
+
- context tree
|
|
12
|
+
- file map
|
|
13
|
+
category: reference
|
|
14
|
+
summary: |
|
|
15
|
+
The authoritative map of every Markdown file Aitne writes under
|
|
16
|
+
~/.personal-agent/context/ — purpose, structure, owner, retention,
|
|
17
|
+
and write permissions. Mirrors CONTEXT_RELATIVE_PATHS in
|
|
18
|
+
context-paths.ts and the whitelist in
|
|
19
|
+
api/routes/context/permissions.ts.
|
|
20
|
+
section: knowledge-layout
|
|
21
|
+
tags:
|
|
22
|
+
- reference
|
|
23
|
+
- core
|
|
24
|
+
- memory
|
|
25
|
+
- knowledge
|
|
26
|
+
- operations
|
|
27
|
+
status: stable
|
|
28
|
+
ask_examples:
|
|
29
|
+
- Where does the agent store what it remembers?
|
|
30
|
+
- What lives in ~/.personal-agent/context/?
|
|
31
|
+
- What files are always injected into prompts?
|
|
32
|
+
- How long does the agent keep its memory files?
|
|
33
|
+
- Where does the daily journal live?
|
|
34
|
+
- Which files can the agent write to?
|
|
35
|
+
locale: en-US
|
|
36
|
+
created: 2026-05-18
|
|
37
|
+
updated: 2026-05-28
|
|
38
|
+
keywords:
|
|
39
|
+
- context
|
|
40
|
+
- knowledge
|
|
41
|
+
- memory
|
|
42
|
+
- vault
|
|
43
|
+
- retention
|
|
44
|
+
- permissions
|
|
45
|
+
- today.md
|
|
46
|
+
- roadmap.md
|
|
47
|
+
- profile.md
|
|
48
|
+
- management.md
|
|
49
|
+
related:
|
|
50
|
+
- concepts/memory-model
|
|
51
|
+
- features/memory-files/today
|
|
52
|
+
- features/memory-files/roadmap
|
|
53
|
+
- features/memory-files/user-profile
|
|
54
|
+
- features/memory-files/agent-journal
|
|
55
|
+
- features/memory-files/schedule
|
|
56
|
+
- features/memory-files/projects
|
|
57
|
+
ui_anchors:
|
|
58
|
+
- /knowledge
|
|
59
|
+
- /knowledge?tab=context-files
|
|
60
|
+
process_keys:
|
|
61
|
+
- routine.morning_routine
|
|
62
|
+
- routine.morning_routine_journal
|
|
63
|
+
- routine.evening_review
|
|
64
|
+
- routine.weekly_review
|
|
65
|
+
- routine.monthly_review
|
|
66
|
+
- routine.hourly_check
|
|
67
|
+
- routine.roadmap_refresh
|
|
68
|
+
config_keys:
|
|
69
|
+
- dayBoundaryHour
|
|
70
|
+
api_endpoints:
|
|
71
|
+
- PUT /api/context/state/today
|
|
72
|
+
- PATCH /api/context/state/today
|
|
73
|
+
- PUT /api/context/plans/roadmap
|
|
74
|
+
- PUT /api/context/policies/management
|
|
75
|
+
context_files:
|
|
76
|
+
- state/today.md
|
|
77
|
+
- plans/roadmap.md
|
|
78
|
+
- identity/profile.md
|
|
79
|
+
- policies/management.md
|
|
80
|
+
- journal/agent.md
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
# Knowledge layout — what Aitne remembers, and where
|
|
84
|
+
|
|
85
|
+
This is the authoritative map of everything Aitne writes to disk as its
|
|
86
|
+
knowledge of you. Every file lives under `PA_DATA_DIR/context/`
|
|
87
|
+
(default `~/.personal-agent/context/`) as plain Markdown that you can read,
|
|
88
|
+
edit, version, and back up with ordinary tools.
|
|
89
|
+
|
|
90
|
+
The vault is partitioned into **six authority classes** — `identity/`, `state/`,
|
|
91
|
+
`plans/`, `journal/`, `knowledge/`, and `policies/`. Each top-level directory
|
|
92
|
+
carries a distinct authority + lifecycle contract; the daemon enforces those
|
|
93
|
+
contracts via the file's YAML frontmatter (advisory in this release; strict in
|
|
94
|
+
the next phase). This shape landed in the context-vault v2 restructure
|
|
95
|
+
(migration `0004-context-vault-restructure`); legacy pre-v2 paths such as <!-- drift-allow -->
|
|
96
|
+
`today.md`, `user/profile`, `rules/management`, `agent/journal`, etc. continue to work <!-- drift-allow -->
|
|
97
|
+
because the daemon normalizes them in-process — never via HTTP 3xx — for one
|
|
98
|
+
minor release while shipped skills and task-flows are updated.
|
|
99
|
+
|
|
100
|
+
The layout below is the canonical source-of-truth. It mirrors
|
|
101
|
+
`packages/daemon/src/core/context-paths.ts` (`CONTEXT_RELATIVE_PATHS`) and
|
|
102
|
+
the write-permission whitelist in `packages/daemon/src/api/routes/context/permissions.ts`.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Tree at a glance
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
~/.personal-agent/context/
|
|
110
|
+
├── _index.md Root nav + machine-rebuilt reconciler block
|
|
111
|
+
│
|
|
112
|
+
├── identity/ USER-authored — who you are
|
|
113
|
+
│ ├── _index.md
|
|
114
|
+
│ ├── profile.md Identity, preferences (always injected)
|
|
115
|
+
│ ├── people.md People dictionary
|
|
116
|
+
│ ├── work.md Workplace, team, stack
|
|
117
|
+
│ ├── expertise.md Domains, tools, skills
|
|
118
|
+
│ ├── personal.md Hobbies, health, habits, location
|
|
119
|
+
│ └── goals.md Developmental goals
|
|
120
|
+
│
|
|
121
|
+
├── state/ AGENT-authored — volatile working state
|
|
122
|
+
│ ├── today.md Today's working view (always injected)
|
|
123
|
+
│ ├── yesterday.md today.md snapshot rotated each morning
|
|
124
|
+
│ ├── profile-questions.md Onboarding interview queue
|
|
125
|
+
│ ├── activity/
|
|
126
|
+
│ │ └── <source>.md Per-source 90-day Activity view (reconciler)
|
|
127
|
+
│ ├── inbox/
|
|
128
|
+
│ │ └── YYYY-MM-DD-<slug>.md Paste bucket (triaged at morning)
|
|
129
|
+
│ └── scratch/
|
|
130
|
+
│ └── YYYY-MM-DD-<slug>.md Ephemeral 48-hour TTL working area
|
|
131
|
+
│
|
|
132
|
+
├── plans/ MIXED — user direction + agent progress
|
|
133
|
+
│ ├── _index.md
|
|
134
|
+
│ ├── roadmap.md Long-horizon goals and recurring plans
|
|
135
|
+
│ └── projects/
|
|
136
|
+
│ ├── _index.md
|
|
137
|
+
│ ├── _active.base Obsidian Bases live view of active projects
|
|
138
|
+
│ └── <slug>.md Project page with structured frontmatter
|
|
139
|
+
│
|
|
140
|
+
├── journal/ APPEND-ONLY narrative
|
|
141
|
+
│ ├── _index.md
|
|
142
|
+
│ ├── daily/
|
|
143
|
+
│ │ └── YYYY-MM-DD.md Stage B morning synthesis (user's diary)
|
|
144
|
+
│ ├── weekly/
|
|
145
|
+
│ │ └── YYYY-Www.md ISO year-week, e.g. 2026-W19.md
|
|
146
|
+
│ ├── monthly/
|
|
147
|
+
│ │ └── YYYY-MM.md
|
|
148
|
+
│ ├── repos/
|
|
149
|
+
│ │ └── <slug>/
|
|
150
|
+
│ │ └── YYYY-MM-DD.md Per-repo daily activity journal
|
|
151
|
+
│ └── agent.md Agent decision log (CREATE_ONLY_PUT,
|
|
152
|
+
│ append-only PATCH only)
|
|
153
|
+
│
|
|
154
|
+
├── knowledge/ Persistent reference material
|
|
155
|
+
│ ├── _index.md
|
|
156
|
+
│ ├── wiki/ Internal wiki workspaces (FTS5-indexed)
|
|
157
|
+
│ │ └── <workspace>/
|
|
158
|
+
│ │ ├── 00_inbox/
|
|
159
|
+
│ │ ├── 10_raw/
|
|
160
|
+
│ │ ├── 20_wiki/
|
|
161
|
+
│ │ ├── 30_outputs/
|
|
162
|
+
│ │ ├── 90_meta/
|
|
163
|
+
│ │ └── log/
|
|
164
|
+
│ ├── repos/
|
|
165
|
+
│ │ └── <slug>/
|
|
166
|
+
│ │ └── overview.md Long-arc per-repository overview
|
|
167
|
+
│ ├── entities/ Management-registry entities
|
|
168
|
+
│ │ └── <domain>/ work/travel/finance/personal/health/learning
|
|
169
|
+
│ │ ├── _index.md Per-domain index (reconciler-written)
|
|
170
|
+
│ │ └── <type-plural>/ meetings, trips, receipts, projects, books, notes
|
|
171
|
+
│ │ └── <slug>.md
|
|
172
|
+
│ └── dossiers/ Per-flow carry-forward state (agent-owned)
|
|
173
|
+
│ ├── _index.md
|
|
174
|
+
│ └── <flow>.md One per routine (hourly/morning/evening/…)
|
|
175
|
+
│
|
|
176
|
+
└── policies/ USER-authored config + rules
|
|
177
|
+
├── _index.md
|
|
178
|
+
├── management.md SoT bindings + managed tasks (always injected)
|
|
179
|
+
├── mcp.md Per-server MCP usage rules
|
|
180
|
+
├── redaction.md Mirror of built-in secret-redaction patterns
|
|
181
|
+
├── journal-format.md Format spec for the synthesized daily journal
|
|
182
|
+
├── journal-export.md Inclusion / exclusion rules for exporting journal/daily/
|
|
183
|
+
├── integrations.md Integration-mode snapshot (daemon-rendered,
|
|
184
|
+
│ chokidar-watched at this new path)
|
|
185
|
+
├── management-captures/ One captured policy per file
|
|
186
|
+
│ ├── _index.md
|
|
187
|
+
│ └── <slug>.md
|
|
188
|
+
├── routines/ Per-cadence checklist rulebooks
|
|
189
|
+
│ ├── _index.md
|
|
190
|
+
│ ├── hourly.md Extension checks for routine.hourly_check
|
|
191
|
+
│ ├── morning.md …for routine.morning_routine
|
|
192
|
+
│ ├── evening.md …for routine.evening_review
|
|
193
|
+
│ ├── weekly.md …for routine.weekly_review
|
|
194
|
+
│ ├── monthly.md …for routine.monthly_review
|
|
195
|
+
│ └── custom/
|
|
196
|
+
│ └── <slug>.md User-defined cron routines
|
|
197
|
+
└── skills/ User-registered skills (lazy directory)
|
|
198
|
+
└── <slug>/
|
|
199
|
+
└── SKILL.md Built-in skills stay in agent-assets/skills/ (read-only)
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
> **Files outside the vault.** A few daemon-managed files intentionally live at `<dataDir>/` and never enter the vault: `<dataDir>/prompts/` (dashboard-editable prompt templates), `<dataDir>/templates/` (project-note rendering templates), `<dataDir>/skill-curation-overlays/` (skill JSON overlay metadata), and `<dataDir>/agent-sessions/` (per-session scratch workdirs). The integration-mode snapshot previously lived at `<dataDir>/integrations.md`; the v2 restructure moved it into the vault at `policies/integrations.md`.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Always-injected context
|
|
207
|
+
|
|
208
|
+
Every backend session (DM responses, routines, dashboard chat — everything
|
|
209
|
+
except the slim `routine.fetch_window` pre-pass) loads these three files
|
|
210
|
+
into the prompt by default:
|
|
211
|
+
|
|
212
|
+
| Path | Injected as | Notes |
|
|
213
|
+
|---|---|---|
|
|
214
|
+
| `identity/profile.md` | `<user>` | Identity anchor for every turn. |
|
|
215
|
+
| `policies/management.md` | `<management_rules>` | Skipped only by Stage B of the morning routine (`routine.morning_routine_journal`). Size-capped: if it exceeds `POLICY_FILE_MAX_BYTES` it is dropped with a warning rather than truncated. |
|
|
216
|
+
| `state/today.md` | `<today snapshot_at="...">` | `## Agent Log` is truncated to the last 10 entries for non-evening sessions. `routine.evening_review` gets the full log. |
|
|
217
|
+
|
|
218
|
+
Other files (`plans/roadmap.md`, `journal/agent.md`, project pages, dossiers, etc.)
|
|
219
|
+
are loaded on demand by the specific routines or skills that need them —
|
|
220
|
+
see the reconciler block inside `_index.md` for the per-flow mapping.
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Top-level files
|
|
225
|
+
|
|
226
|
+
### `_index.md`
|
|
227
|
+
Root navigation hub. The top portion is human-curated (edit freely); the lower
|
|
228
|
+
portion sits inside a reserved `<!-- reconciler-section -->` … `<!-- /reconciler-section -->`
|
|
229
|
+
block that the daemon rebuilds from the filesystem (daily at 03:45, on startup,
|
|
230
|
+
and on file-event debounce). It serves as both the human-readable map and the
|
|
231
|
+
agent-facing file catalog the prompt loader consults when deciding which
|
|
232
|
+
non-always-injected files a given flow should pull in. (Pre-v2 installs kept
|
|
233
|
+
the agent-facing catalog at a separate `context-index.md` file; the migration
|
|
234
|
+
runner merges that file into the reconciler block.)
|
|
235
|
+
|
|
236
|
+
### `state/today.md`
|
|
237
|
+
The current agent-day's working view. Daemon-managed structure:
|
|
238
|
+
|
|
239
|
+
```
|
|
240
|
+
# Today
|
|
241
|
+
## User Schedule — events for the day (from calendar observers)
|
|
242
|
+
## User Tasks — what you need to do today
|
|
243
|
+
## Agent Plan — what the agent intends to do today
|
|
244
|
+
## Agent Notes — observations the agent surfaced
|
|
245
|
+
## Agent Log — append-only action log (truncated to last 10 on injection)
|
|
246
|
+
## Handoff — what carries into tomorrow
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
Always injected. Writes go through `PUT /api/context/state/today` (locked) and
|
|
250
|
+
are validated against the structure above. The agent-day boundary is 04:00
|
|
251
|
+
local by default (`dayBoundaryHour`); before that, "today" still refers to
|
|
252
|
+
the previous calendar date.
|
|
253
|
+
|
|
254
|
+
### `state/yesterday.md`
|
|
255
|
+
The previous agent-day's `state/today.md`, rotated at 04:00 by the morning
|
|
256
|
+
routine. The new morning's first job is to read it, parse the `## Handoff`
|
|
257
|
+
section, and seed today's plan. Replaced by the next rotation — there is no
|
|
258
|
+
multi-day `yesterday-N.md` history; the synthesized `daily/YYYY-MM-DD.md`
|
|
259
|
+
is the durable record.
|
|
260
|
+
|
|
261
|
+
### `plans/roadmap.md`
|
|
262
|
+
Long-horizon commitments and recurring plans. Structure:
|
|
263
|
+
|
|
264
|
+
```
|
|
265
|
+
# Roadmap
|
|
266
|
+
> Last synced: YYYY-MM-DD
|
|
267
|
+
## Annual Goals
|
|
268
|
+
## Quarterly Focus
|
|
269
|
+
## Long-term Plans
|
|
270
|
+
## Agent Action Plan
|
|
271
|
+
## Recurring
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
Loaded for the morning, evening, weekly, monthly, and roadmap-refresh
|
|
275
|
+
routines. Not loaded for ordinary DM turns.
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## `identity/` — who you are
|
|
280
|
+
|
|
281
|
+
Slow-changing biographical facts. The `user-profile` and `user-interview`
|
|
282
|
+
skills write here through the context API.
|
|
283
|
+
|
|
284
|
+
| File | Holds |
|
|
285
|
+
|---|---|
|
|
286
|
+
| `_index.md` | Per-area navigation for the directory. |
|
|
287
|
+
| `profile.md` | Identity, timezone, communication style, notification preferences, platforms. **Always injected.** |
|
|
288
|
+
| `people.md` | Colleagues, family, frequent contacts. |
|
|
289
|
+
| `work.md` | Employer, role, team, tech stack. |
|
|
290
|
+
| `expertise.md` | Domains, tools, skills the user has. |
|
|
291
|
+
| `personal.md` | Hobbies, sleep pattern, diet, background, health, location. |
|
|
292
|
+
| `goals.md` | Developmental goals (distinct from `plans/roadmap.md` project milestones). |
|
|
293
|
+
|
|
294
|
+
**Growth pattern.** When a topic outgrows a single file (e.g. a multi-month
|
|
295
|
+
sleep log), it can be promoted to a subdirectory: the API allows arbitrary
|
|
296
|
+
`identity/<area>/<file>.md` writes (e.g. `identity/health/sleep-log.md`). The
|
|
297
|
+
default install does not seed any subdirectories.
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## `policies/` — how the agent should behave
|
|
302
|
+
|
|
303
|
+
Natural-language policy files. Edits take effect at the next task-flow
|
|
304
|
+
assembly. All writes go through the context API; the agent cannot `Edit` /
|
|
305
|
+
`Write` these directly.
|
|
306
|
+
|
|
307
|
+
### `_index.md`
|
|
308
|
+
Per-file navigation for the policies directory.
|
|
309
|
+
|
|
310
|
+
### `management.md`
|
|
311
|
+
The structured registry of:
|
|
312
|
+
|
|
313
|
+
- **A. Source-of-Truth bindings** — for each category of state (tasks,
|
|
314
|
+
notes, calendar, etc.), which app is authoritative and which mirror MD
|
|
315
|
+
path the agent writes to.
|
|
316
|
+
- **B. Managed tasks** — active recurring agent jobs (e.g. "check Zoom
|
|
317
|
+
daily at 10 AM"), rendered from the DB. Re-parsed if hand-edited.
|
|
318
|
+
- **C. Active policies** — bullet list of policy slugs auto-rendered from
|
|
319
|
+
`policies/management-captures/`.
|
|
320
|
+
|
|
321
|
+
**Always injected.** Capped in size on injection (oversize is skipped with
|
|
322
|
+
a warning, not truncated). Writes go through
|
|
323
|
+
`PUT /api/context/policies/management` (locked + snapshotted) or the
|
|
324
|
+
`managed-tasks` / `sot-bindings` API surfaces.
|
|
325
|
+
|
|
326
|
+
### `mcp.md`
|
|
327
|
+
MCP usage rules. One global-policy block + one section per connected
|
|
328
|
+
server (per-server read/write posture, scope rules).
|
|
329
|
+
|
|
330
|
+
### `journal-format.md`
|
|
331
|
+
Format spec for `journal/daily/YYYY-MM-DD.md`. Read by the morning routine's
|
|
332
|
+
Stage B as a natural-language template — required frontmatter fields,
|
|
333
|
+
required body sections (`## Summary`, `## Schedule`, `## Tasks`,
|
|
334
|
+
`## Conversations`), voice rules ("first-person from the user's
|
|
335
|
+
perspective"), wikilink rendering, and redaction layering.
|
|
336
|
+
|
|
337
|
+
### `journal-export.md`
|
|
338
|
+
User-defined inclusion / exclusion rules layered on top of `redaction.md`
|
|
339
|
+
when daily journal entries are mirrored to an external vault. Supports
|
|
340
|
+
per-day opt-out via `no_journal_export: true` frontmatter on the
|
|
341
|
+
individual `journal/daily/<date>.md`.
|
|
342
|
+
|
|
343
|
+
### `redaction.md`
|
|
344
|
+
Informational mirror of the built-in secret patterns. Actual redaction
|
|
345
|
+
lives in `packages/shared/src/secret-redaction.ts` — this file exists so
|
|
346
|
+
you can see what is being redacted from anything the agent writes.
|
|
347
|
+
|
|
348
|
+
### `management-captures/_index.md`
|
|
349
|
+
Auto-maintained registry of active policies (Active table + Removed
|
|
350
|
+
table). Direct edits are overwritten by the reconciler; to add or modify
|
|
351
|
+
a policy, edit its `management-captures/<slug>.md` file or use the
|
|
352
|
+
`management-policy` skill.
|
|
353
|
+
|
|
354
|
+
### `management-captures/<slug>.md`
|
|
355
|
+
One captured policy per file (origin DM, reasoning, linked routine).
|
|
356
|
+
Policies are deactivated by setting `status: removed` in frontmatter —
|
|
357
|
+
the file is preserved so the captured history survives. The directory is
|
|
358
|
+
not exposed for arbitrary `DELETE` via the API.
|
|
359
|
+
|
|
360
|
+
### `integrations.md`
|
|
361
|
+
Daemon-rendered snapshot of integration delegation state — kept in
|
|
362
|
+
bidirectional sync with the `integrations_json` settings row and
|
|
363
|
+
chokidar-watched at this new path (`policies/integrations.md`, formerly
|
|
364
|
+
`<dataDir>/integrations.md` before the v2 restructure). Hand-edits are
|
|
365
|
+
parsed back on every save.
|
|
366
|
+
|
|
367
|
+
### `skills/<slug>/SKILL.md`
|
|
368
|
+
User-registered skills. Built-in skills remain in `agent-assets/skills/`
|
|
369
|
+
(read-only, ships with the npm package). The directory is created lazily
|
|
370
|
+
on first user-skill registration.
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
## `policies/routines/` — per-cadence rulebooks
|
|
375
|
+
|
|
376
|
+
User-editable extension surfaces. Each routine's task-flow owns the fixed
|
|
377
|
+
pipeline; the matching file here lists user-added checks executed after
|
|
378
|
+
the built-in steps.
|
|
379
|
+
|
|
380
|
+
| File | Cadence | Process key |
|
|
381
|
+
|---|---|---|
|
|
382
|
+
| `_index.md` | — | (navigation) |
|
|
383
|
+
| `hourly.md` | every hour (during active window) | `routine.hourly_check` |
|
|
384
|
+
| `morning.md` | 04:00 daily | `routine.morning_routine` |
|
|
385
|
+
| `evening.md` | evening | `routine.evening_review` |
|
|
386
|
+
| `weekly.md` | Friday | `routine.weekly_review` |
|
|
387
|
+
| `monthly.md` | month-end | `routine.monthly_review` |
|
|
388
|
+
| `custom/<slug>.md` | user cron | `routine.custom.<slug>` |
|
|
389
|
+
|
|
390
|
+
`custom/<slug>.md` is the only routine path that supports `DELETE` —
|
|
391
|
+
when removed, the scheduler unregisters the cron job on the next reload.
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
## `plans/projects/` — one file per active project
|
|
396
|
+
|
|
397
|
+
| File | Holds |
|
|
398
|
+
|---|---|
|
|
399
|
+
| `_index.md` | Index of active projects. |
|
|
400
|
+
| `_active.base` | Obsidian Bases live view: filtered to `state ≠ archived`, sorted by last update. Query: `file.inFolder("plans/projects")`. |
|
|
401
|
+
| `<slug>.md` | Per-project page. Frontmatter: `type: project`, `slug`, `state` (`active` / `incubating` / `on-hold` / `archived`), `owner`, `start`, optional `due`, `stakeholders`, `next_milestone`, `tags`, `agent_last_synced_at`. |
|
|
402
|
+
|
|
403
|
+
---
|
|
404
|
+
|
|
405
|
+
## `knowledge/repos/` and `journal/repos/` — unified per-repository pages
|
|
406
|
+
|
|
407
|
+
For repositories paired between a local clone and a GitHub remote.
|
|
408
|
+
|
|
409
|
+
| File | Holds |
|
|
410
|
+
|---|---|
|
|
411
|
+
| `knowledge/repos/<slug>/overview.md` | Long-arc project overview (lifecycle phases, notable changes). Written by `git.project.init` and refreshed when something durable changes during a daily scan. |
|
|
412
|
+
| `journal/repos/<slug>/YYYY-MM-DD.md` | Per-day activity log, written by `git.project.update` on days that had activity. 365-day retention; older entries pruned by `retention.ts`. |
|
|
413
|
+
|
|
414
|
+
Arbitrary writes under `knowledge/repos/` and `journal/repos/` are not permitted — only these two patterns
|
|
415
|
+
are whitelisted to keep the layout disciplined.
|
|
416
|
+
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
## `knowledge/dossiers/` — per-flow carry-forward state
|
|
420
|
+
|
|
421
|
+
Agent-owned. Each dossier captures enough context for one specific
|
|
422
|
+
routine to run without re-scanning the full vault.
|
|
423
|
+
|
|
424
|
+
| File | Process key |
|
|
425
|
+
|---|---|
|
|
426
|
+
| `_index.md` | (navigation) |
|
|
427
|
+
| `hourly.md` | `routine.hourly_check` |
|
|
428
|
+
| `morning.md` | `routine.morning_routine`, `routine.morning_routine_today` |
|
|
429
|
+
| `evening.md` | `routine.evening_review` |
|
|
430
|
+
| `weekly.md` | `routine.weekly_review` |
|
|
431
|
+
| `monthly.md` | `routine.monthly_review` |
|
|
432
|
+
| `roadmap.md` | `routine.roadmap_refresh` (this is the dossier `knowledge/dossiers/roadmap.md`, not the plan at `plans/roadmap.md`) |
|
|
433
|
+
|
|
434
|
+
Each dossier carries a fixed shape: `## Standing checklist`, `## Focus
|
|
435
|
+
this period`, `## Open items`, `## Last run`. Pulled into prompts on
|
|
436
|
+
demand via the file catalog in the `_index.md` reconciler block (the
|
|
437
|
+
pre-v2 `context-index.md` catalog was merged there by the migration).
|
|
438
|
+
|
|
439
|
+
---
|
|
440
|
+
|
|
441
|
+
## `journal/daily/YYYY-MM-DD.md` — synthesized daily journal
|
|
442
|
+
|
|
443
|
+
Written by Stage B of the 04:00 morning routine. It is **the user's
|
|
444
|
+
diary** — first-person, from the user's perspective ("I shipped X", "I
|
|
445
|
+
met with Y") — not an agent activity log. Agent-side bookkeeping lives
|
|
446
|
+
in `journal/agent.md` instead.
|
|
447
|
+
|
|
448
|
+
Required frontmatter (daemon-owned, validated on write):
|
|
449
|
+
`date`, `weekday`, `type: daily`, `owner: agent`, `agent_generated: true`,
|
|
450
|
+
`calendar_events`, `messages_handled`, `updated`. Stage B adds
|
|
451
|
+
`agent_last_synced_at`, `content_hash`, `projects`, `people`, `tags`.
|
|
452
|
+
|
|
453
|
+
Body sections (Stage B-authored): `## Summary` (3–5 sentences),
|
|
454
|
+
`## Schedule`, `## Tasks`, `## Conversations`.
|
|
455
|
+
|
|
456
|
+
**Retention: persistent by design.** The cleanup config carries a 100-year
|
|
457
|
+
safety value (`dailyMd: 36500`) but the daily folder is not enrolled in
|
|
458
|
+
the prune loop.
|
|
459
|
+
|
|
460
|
+
**Conflict handling.** If you edited a previous day's entry, the next
|
|
461
|
+
write appends `## Agent revision — <ISO timestamp>` rather than overwriting
|
|
462
|
+
your edit.
|
|
463
|
+
|
|
464
|
+
---
|
|
465
|
+
|
|
466
|
+
## `journal/weekly/YYYY-Www.md` — weekly review
|
|
467
|
+
|
|
468
|
+
Written by `routine.weekly_review` (Fridays by default). ISO year-week
|
|
469
|
+
format, e.g. `2026-W19.md`.
|
|
470
|
+
|
|
471
|
+
**Retention: 365 days** (`retention.ts:weeklyMd`). The long-arc rollup
|
|
472
|
+
survives in `journal/agent.md`'s monthly sections.
|
|
473
|
+
|
|
474
|
+
---
|
|
475
|
+
|
|
476
|
+
## `journal/monthly/YYYY-MM.md` — monthly review
|
|
477
|
+
|
|
478
|
+
Written by `routine.monthly_review` (month-end). YYYY-MM format.
|
|
479
|
+
|
|
480
|
+
**Retention: persistent.** Not enrolled in `retention.ts` pruning.
|
|
481
|
+
|
|
482
|
+
---
|
|
483
|
+
|
|
484
|
+
## `state/inbox/` — paste bucket
|
|
485
|
+
|
|
486
|
+
Dump anything here — text snippets, captured links, pasted email,
|
|
487
|
+
brainstorming notes. The morning routine triages each file and moves
|
|
488
|
+
the original to `state/scratch/inbox-YYYY-MM-DD-<slug>.md`. The
|
|
489
|
+
synthesized content lands wherever it belongs (a project file, today.md
|
|
490
|
+
tasks, your journal). Supports `DELETE` for post-triage cleanup.
|
|
491
|
+
|
|
492
|
+
No fixed format — write whatever you want.
|
|
493
|
+
|
|
494
|
+
---
|
|
495
|
+
|
|
496
|
+
## `state/scratch/` and `journal/agent.md` — agent's private workspace
|
|
497
|
+
|
|
498
|
+
### `journal/agent.md`
|
|
499
|
+
Append-only self-reflection log. Created with one `PUT` at first
|
|
500
|
+
boot; subsequent writes must be `PATCH` (append) — the API enforces
|
|
501
|
+
this with `CREATE_ONLY_PUT`. Used internally for the agent's own
|
|
502
|
+
notes about anomalies, MCP-call patterns, and the like.
|
|
503
|
+
|
|
504
|
+
Append-only is enforced; long-arc content is bounded by a rollup pass:
|
|
505
|
+
|
|
506
|
+
| Section | Kept | Why |
|
|
507
|
+
|---|---|---|
|
|
508
|
+
| `## Weekly YYYY-Www` | last 12 | superseded by the monthly rollup that covers them |
|
|
509
|
+
| `## Monthly YYYY-MM` | last 24 | 2 years of retrospectives, ~96 KB worst-case |
|
|
510
|
+
|
|
511
|
+
Duplicate sections (same week or month appended twice) are collapsed
|
|
512
|
+
last-write-wins. A single section over ~4000 bytes triggers a warning
|
|
513
|
+
log (never truncated mid-sentence). The file itself is never deleted
|
|
514
|
+
even when nothing qualifies for pruning.
|
|
515
|
+
|
|
516
|
+
This file is never auto-pushed as a notification.
|
|
517
|
+
|
|
518
|
+
### `state/scratch/`
|
|
519
|
+
Ephemeral working files with a **48-hour TTL** (`B-007 §5.3`).
|
|
520
|
+
|
|
521
|
+
| File pattern | Origin |
|
|
522
|
+
|---|---|
|
|
523
|
+
| `<YYYY-MM-DD>-<slug>.md` | Skill working notes; helper `agentScratchPath(dateStr, slug)`. |
|
|
524
|
+
| `inbox-YYYY-MM-DD-<slug>.md` | Triage residue from the inbox post-morning-routine move. |
|
|
525
|
+
|
|
526
|
+
Both patterns support `PUT` / `PATCH` / `DELETE`.
|
|
527
|
+
|
|
528
|
+
---
|
|
529
|
+
|
|
530
|
+
## Write chokepoint
|
|
531
|
+
|
|
532
|
+
The agent cannot use the SDK's `Edit` / `Write` tools on any path inside
|
|
533
|
+
`context/`. Every write goes through `PUT /api/context/<path>` or
|
|
534
|
+
`PATCH /api/context/<path>`, which:
|
|
535
|
+
|
|
536
|
+
- Validates the path against the whitelist in `permissions.ts`
|
|
537
|
+
- Holds a per-file lock (notably the `state/today.md` write lock)
|
|
538
|
+
- Validates frontmatter against the file's schema where one exists
|
|
539
|
+
- Records a snapshot in the `md_file_snapshots` table (30-day retention)
|
|
540
|
+
- Notifies the prompt context cache so active DM sessions can refresh
|
|
541
|
+
|
|
542
|
+
Bash `curl` to `127.0.0.1:8321` is allowed; arbitrary file writes are
|
|
543
|
+
blocked at the SDK permission layer and the always-disallowed-tools
|
|
544
|
+
hook layer.
|
|
545
|
+
|
|
546
|
+
---
|
|
547
|
+
|
|
548
|
+
## File-permissions reference
|
|
549
|
+
|
|
550
|
+
This table is the contract enforced by
|
|
551
|
+
`CONTEXT_WRITE_PERMISSIONS` in
|
|
552
|
+
`packages/daemon/src/api/routes/context/permissions.ts`. Anything not
|
|
553
|
+
listed is read-only via the API.
|
|
554
|
+
|
|
555
|
+
| Pattern | Methods |
|
|
556
|
+
|---|---|
|
|
557
|
+
| `state/today` · `state/yesterday` · `plans/roadmap` · `_index` | `PUT`, `PATCH` |
|
|
558
|
+
| `state/profile-questions` · `state/activity/*` | `PUT`, `PATCH` |
|
|
559
|
+
| `identity/_index` · `identity/*` | `PUT`, `PATCH` |
|
|
560
|
+
| `policies/_index` · `policies/*` (top-level files) | `PUT`, `PATCH` |
|
|
561
|
+
| `policies/routines/_index` · `policies/routines/*` | `PUT`, `PATCH` |
|
|
562
|
+
| `policies/routines/custom/*` | `PUT`, `PATCH`, `DELETE` |
|
|
563
|
+
| `plans/projects/_index` · `plans/projects/*` | `PUT`, `PATCH` |
|
|
564
|
+
| `plans/projects/_active` | `PUT` (the Obsidian Bases view) |
|
|
565
|
+
| `knowledge/repos/{slug}/overview` · `journal/repos/{slug}/{date}` | `PUT`, `PATCH` |
|
|
566
|
+
| `knowledge/repos/legacy-registry/*` | `PUT`, `PATCH` (cleanup of dangling entries only) |
|
|
567
|
+
| `knowledge/entities/{domain}/_index` · `knowledge/entities/{domain}/{typePlural}/{slug}` | `PUT`, `PATCH` |
|
|
568
|
+
| `journal/daily/*` · `journal/weekly/*` · `journal/monthly/*` | `PUT`, `PATCH` |
|
|
569
|
+
| `knowledge/dossiers/_index` · `knowledge/dossiers/*` | `PUT`, `PATCH` |
|
|
570
|
+
| `state/inbox/*` · `state/scratch/*` | `PUT`, `PATCH`, `DELETE` |
|
|
571
|
+
| `journal/agent` | `PUT` once (create-only), then `PATCH` (append) |
|
|
572
|
+
| `policies/management-captures/_index` · `policies/management-captures/*` | `PUT`, `PATCH` |
|
|
573
|
+
|
|
574
|
+
> Legacy URL forms (`/api/context/today.md`, `/api/context/user/profile`, `/api/context/rules/management`, `/api/context/agent/journal`, etc.) are normalized to the class-prefixed canonical paths in-process by `core/context-vault-aliases.ts` before any of the above checks run. Normalization is not a redirect (no HTTP 3xx) so legacy `curl -X PUT/PATCH` callers keep working. The alias bridge lives for one minor release after PR-6's content sweep lands. <!-- drift-allow -->
|
|
575
|
+
|
|
576
|
+
---
|
|
577
|
+
|
|
578
|
+
## Retention summary
|
|
579
|
+
|
|
580
|
+
From `packages/daemon/src/core/retention.ts`:
|
|
581
|
+
|
|
582
|
+
| File / pattern | Retention | Mechanism |
|
|
583
|
+
|---|---|---|
|
|
584
|
+
| `state/today.md` | rotates every agent-day at 04:00 | morning routine writes the new file; previous becomes `state/yesterday.md` |
|
|
585
|
+
| `state/yesterday.md` | one agent-day | overwritten by next rotation |
|
|
586
|
+
| `journal/daily/YYYY-MM-DD.md` | **persistent by design** | safety-net value `dailyMd: 36500` (~100 years); not enrolled in prune |
|
|
587
|
+
| `journal/weekly/YYYY-Www.md` | 365 days | `retention.ts:weeklyMd` |
|
|
588
|
+
| `journal/monthly/YYYY-MM.md` | **persistent** | no prune entry |
|
|
589
|
+
| `journal/repos/<slug>/<date>.md` | 365 days | `retention.ts:gitJournalMd` |
|
|
590
|
+
| `journal/agent.md` weekly sections | last 12 | content-level rollup in `retention.ts` |
|
|
591
|
+
| `journal/agent.md` monthly sections | last 24 | content-level rollup in `retention.ts` |
|
|
592
|
+
| `state/scratch/*` | 48 hours | TTL sweep |
|
|
593
|
+
| `state/inbox/*` | until next morning routine | triage moves to `state/scratch/` |
|
|
594
|
+
| `md_file_snapshots` (DB) | 30 days | row-level prune |
|
|
595
|
+
|
|
596
|
+
---
|
|
597
|
+
|
|
598
|
+
## How to inspect / back up your knowledge
|
|
599
|
+
|
|
600
|
+
Everything here is plain text. The usual tooling works:
|
|
601
|
+
|
|
602
|
+
```bash
|
|
603
|
+
# Read your profile
|
|
604
|
+
cat ~/.personal-agent/context/identity/profile.md
|
|
605
|
+
|
|
606
|
+
# Edit any file
|
|
607
|
+
$EDITOR ~/.personal-agent/context/state/today.md
|
|
608
|
+
|
|
609
|
+
# Version it
|
|
610
|
+
cd ~/.personal-agent/context && git init && git add . && git commit -m "snapshot"
|
|
611
|
+
|
|
612
|
+
# Back it up
|
|
613
|
+
cp -r ~/.personal-agent/context ~/aitne-backup-$(date +%F)
|
|
614
|
+
|
|
615
|
+
# Search across everything
|
|
616
|
+
grep -rni "topic" ~/.personal-agent/context/
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
Edits take effect at the next routine. There is no proprietary index
|
|
620
|
+
and no migration step on uninstall — the directory is yours.
|