@aitne-sh/aitne 0.1.7 → 0.1.8
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 +195 -829
- package/agent-assets/agent-profiles/_safety.md +49 -17
- package/agent-assets/agent-profiles/profile-importer.md +1 -1
- package/agent-assets/agent-profiles/routine.md +4 -3
- package/agent-assets/docs/concepts/agent-day.md +6 -1
- package/agent-assets/docs/concepts/auth-health.md +10 -1
- package/agent-assets/docs/concepts/backends-and-tiers.md +74 -40
- package/agent-assets/docs/concepts/costs-and-quotas.md +25 -5
- package/agent-assets/docs/concepts/delegated-mode.md +147 -68
- package/agent-assets/docs/concepts/memory-model.md +9 -4
- package/agent-assets/docs/concepts/observations.md +13 -1
- package/agent-assets/docs/concepts/process-keys.md +20 -5
- package/agent-assets/docs/concepts/routines.md +38 -20
- package/agent-assets/docs/concepts/safety-model.md +30 -13
- package/agent-assets/docs/concepts/skills.md +12 -7
- package/agent-assets/docs/features/integrations/calendar.md +1 -1
- package/agent-assets/docs/features/integrations/git.md +2 -2
- package/agent-assets/docs/features/integrations/github.md +9 -2
- package/agent-assets/docs/features/integrations/mail.md +1 -1
- package/agent-assets/docs/features/integrations/notion.md +34 -6
- package/agent-assets/docs/features/integrations/obsidian.md +7 -2
- package/agent-assets/docs/features/lifestyle/git.md +4 -7
- package/agent-assets/docs/features/lifestyle/receipts.md +17 -2
- package/agent-assets/docs/features/lifestyle/travel-bookings.md +15 -0
- package/agent-assets/docs/features/lifestyle/travel-time.md +7 -1
- package/agent-assets/docs/features/memory-files/agent-journal.md +2 -2
- package/agent-assets/docs/features/memory-files/projects.md +6 -0
- package/agent-assets/docs/features/memory-files/roadmap.md +5 -0
- package/agent-assets/docs/features/memory-files/today.md +1 -0
- package/agent-assets/docs/features/memory-files/user-profile.md +6 -0
- package/agent-assets/docs/features/messaging/bang-commands.md +20 -10
- package/agent-assets/docs/features/messaging/discord.md +12 -1
- package/agent-assets/docs/features/messaging/overview.md +10 -7
- package/agent-assets/docs/features/messaging/slack.md +13 -1
- package/agent-assets/docs/features/messaging/telegram.md +7 -1
- package/agent-assets/docs/features/messaging/whatsapp.md +12 -1
- package/agent-assets/docs/features/operations/activity-and-conversations.md +2 -2
- package/agent-assets/docs/features/operations/approvals.md +6 -0
- package/agent-assets/docs/features/operations/backend-routing.md +7 -0
- package/agent-assets/docs/features/operations/cost-tracking.md +6 -0
- package/agent-assets/docs/features/operations/notifications.md +6 -0
- package/agent-assets/docs/features/operations/schedule-approaching.md +22 -9
- package/agent-assets/docs/features/routines/custom-routines.md +10 -4
- package/agent-assets/docs/features/routines/evening-review.md +1 -1
- package/agent-assets/docs/features/routines/hourly-check.md +1 -1
- package/agent-assets/docs/features/routines/morning-routine.md +24 -15
- package/agent-assets/docs/features/routines/weekly-review.md +38 -12
- package/agent-assets/docs/features/wiki/commands.md +11 -0
- package/agent-assets/docs/features/wiki/overview.md +13 -3
- package/agent-assets/docs/getting-started/01-what-is-this.md +32 -11
- package/agent-assets/docs/getting-started/02-first-steps.md +17 -4
- package/agent-assets/docs/getting-started/03-what-can-this-do.md +21 -11
- package/agent-assets/docs/getting-started/04-first-day.md +14 -0
- package/agent-assets/docs/glossary.md +65 -12
- package/agent-assets/docs/guides/add-a-custom-routine.md +12 -0
- package/agent-assets/docs/guides/backup-and-restore.md +16 -2
- package/agent-assets/docs/guides/budget-and-cost-for-wiki.md +6 -0
- package/agent-assets/docs/guides/build-your-wiki.md +14 -0
- package/agent-assets/docs/guides/change-which-model-handles-x.md +7 -0
- package/agent-assets/docs/guides/connect-a-new-mail-account.md +16 -0
- package/agent-assets/docs/guides/explore-with-trace-and-connect.md +6 -0
- package/agent-assets/docs/guides/import-knowledge-file.md +11 -0
- package/agent-assets/docs/guides/install-and-run.md +20 -4
- package/agent-assets/docs/guides/maintain-wiki-health.md +6 -0
- package/agent-assets/docs/guides/migrate-machines.md +13 -1
- package/agent-assets/docs/guides/multiple-wikis-for-multiple-domains.md +9 -0
- package/agent-assets/docs/guides/pause-the-agent.md +12 -4
- package/agent-assets/docs/guides/reinstall-cleanly.md +19 -4
- package/agent-assets/docs/guides/setup-wizard.md +20 -9
- package/agent-assets/docs/guides/switch-default-backend.md +10 -1
- package/agent-assets/docs/guides/use-an-existing-obsidian-vault.md +5 -0
- package/agent-assets/docs/reference/api.md +29 -1
- package/agent-assets/docs/reference/cli-commands.md +22 -3
- package/agent-assets/docs/reference/config.md +37 -5
- package/agent-assets/docs/reference/disallowed-tools.md +13 -0
- package/agent-assets/docs/reference/keyboard-shortcuts.md +13 -0
- package/agent-assets/docs/reference/process-keys.md +70 -20
- package/agent-assets/docs/reference/skills.md +27 -9
- package/agent-assets/docs/troubleshooting/auth-failed.md +7 -2
- package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +13 -1
- package/agent-assets/docs/troubleshooting/fallback-keeps-firing.md +10 -0
- package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +11 -0
- package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +9 -4
- package/agent-assets/docs/troubleshooting/observation-not-detected.md +12 -0
- package/agent-assets/docs/troubleshooting/quota-exhausted.md +7 -1
- package/agent-assets/docs/troubleshooting/wiki-ingest-full-blocked.md +5 -0
- package/agent-assets/docs/troubleshooting/wiki-write-failed.md +5 -0
- package/agent-assets/optimizer-skills/drift-analysis/SKILL.md +1 -1
- package/agent-assets/optimizer-skills/skill-curation/SKILL.md +2 -2
- package/agent-assets/skills/agent-actions/SKILL.md +122 -0
- package/agent-assets/skills/attach/SKILL.md +1 -2
- package/agent-assets/skills/context/SKILL.md +36 -454
- package/agent-assets/skills/context/references/api.md +220 -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 +1 -1
- package/agent-assets/skills/docs-search/SKILL.md +13 -13
- package/agent-assets/skills/external-services/SKILL.delegated.claude.md +5 -7
- package/agent-assets/skills/external-services/SKILL.delegated.codex.md +5 -7
- package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +5 -7
- package/agent-assets/skills/external-services/SKILL.md +6 -259
- package/agent-assets/skills/external-services/SKILL.native.claude.md +1 -2
- package/agent-assets/skills/external-services/SKILL.native.codex.md +1 -2
- package/agent-assets/skills/external-services/SKILL.native.gemini.md +1 -2
- 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 +224 -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/gmail-lifestyle/references/travel-time-api.md +59 -0
- package/agent-assets/skills/mail/SKILL.delegated.claude.md +1 -1
- package/agent-assets/skills/mail/SKILL.delegated.codex.md +1 -1
- package/agent-assets/skills/mail/SKILL.delegated.gemini.md +1 -1
- 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 +108 -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 +70 -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 +33 -105
- package/agent-assets/skills/management-policy/references/policy-workflow.md +101 -0
- package/agent-assets/skills/notify/SKILL.md +6 -78
- package/agent-assets/skills/notify/references/priority.md +60 -0
- package/agent-assets/skills/notion/SKILL.delegated.claude.md +1 -1
- package/agent-assets/skills/notion/SKILL.delegated.codex.md +1 -1
- package/agent-assets/skills/notion/SKILL.delegated.gemini.md +1 -1
- package/agent-assets/skills/notion/SKILL.md +6 -10
- package/agent-assets/skills/notion/SKILL.native.claude.md +1 -2
- package/agent-assets/skills/notion/SKILL.native.codex.md +1 -2
- package/agent-assets/skills/notion/SKILL.native.gemini.md +1 -2
- package/agent-assets/skills/observations/SKILL.md +1 -6
- package/agent-assets/skills/project-doc/SKILL.md +1 -5
- package/agent-assets/skills/reading/SKILL.md +2 -2
- package/agent-assets/skills/roadmap/SKILL.md +37 -135
- package/agent-assets/skills/roadmap/references/api.md +100 -0
- package/agent-assets/skills/roadmap/references/cross-check.md +73 -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/schedule/SKILL.md +52 -88
- package/agent-assets/skills/schedule/references/batch.md +93 -0
- package/agent-assets/skills/schedule/references/errors.md +214 -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/schedule/references/recurring.md +185 -0
- package/agent-assets/skills/scheduled-managed-task/SKILL.md +13 -15
- package/agent-assets/skills/today/SKILL.md +27 -57
- package/agent-assets/skills/today/references/agent-plan-lifecycle.md +113 -0
- package/agent-assets/skills/user-interview/SKILL.md +12 -59
- 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 +1 -1
- package/agent-assets/skills/user-profile/SKILL.md +43 -63
- package/agent-assets/skills/user-profile/references/character-preferences.md +83 -0
- package/agent-assets/skills/user-profile/seeds/topic-files.seed.json +28 -0
- package/agent-assets/skills/wiki/wiki-ask/SKILL.md +0 -1
- package/agent-assets/skills/wiki/wiki-compile/SKILL.md +0 -1
- 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 +68 -0
- package/agent-assets/system-prompts/skill-index-instruction.md +26 -0
- package/agent-assets/task-flows/_partials/calendar-acquire.google_calendar.md +18 -11
- package/agent-assets/task-flows/_partials/calendar-acquire.outlook_calendar.md +16 -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 +17 -9
- package/agent-assets/task-flows/_partials/notion-acquire.notion.md +18 -12
- package/agent-assets/task-flows/knowledge.import.md +1 -1
- package/agent-assets/task-flows/message.received.dm.md +13 -15
- package/agent-assets/task-flows/message.received.dm_first.md +10 -14
- package/agent-assets/task-flows/routine.custom.md +3 -1
- package/agent-assets/task-flows/routine.evening_review.md +39 -163
- package/agent-assets/task-flows/routine.fetch_window.md +17 -12
- package/agent-assets/task-flows/routine.hourly_check.md +16 -8
- package/agent-assets/task-flows/routine.hourly_check.triage.md +1 -1
- package/agent-assets/task-flows/routine.monthly_review.md +46 -4
- package/agent-assets/task-flows/routine.morning_routine_journal.md +113 -0
- package/agent-assets/task-flows/routine.morning_routine_today.md +673 -0
- package/agent-assets/task-flows/routine.roadmap_refresh.md +60 -15
- package/agent-assets/task-flows/routine.user_profile_sweep.md +9 -10
- package/agent-assets/task-flows/routine.weekly_review.md +285 -70
- package/agent-assets/task-flows/scheduled.dm.md +8 -8
- package/agent-assets/task-flows/scheduled.task.md +5 -5
- package/agent-assets/task-flows/setup.initial.md +165 -245
- package/agent-assets/task-flows/wiki.ingest_url.md +1 -1
- package/agent-assets/templates/_manifest.json +7 -7
- package/agent-assets/templates/dossiers/_index.md +1 -1
- package/agent-assets/templates/rules/journal-format.md +145 -38
- package/agent-assets/templates/user/expertise.md +4 -2
- package/agent-assets/templates/user/goals.md +4 -2
- package/agent-assets/templates/user/people.md +8 -2
- package/agent-assets/templates/user/personal.md +4 -2
- package/agent-assets/templates/user/work.md +4 -2
- package/bin/aitne.mjs +8 -1
- package/package.json +4 -4
- package/scripts/commands/doctor.mjs +52 -0
- package/scripts/commands/run-now.mjs +202 -0
- package/scripts/commands/verify.mjs +264 -0
- 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
|
@@ -279,11 +279,11 @@ voice carries the whole message.
|
|
|
279
279
|
### Delivery channel — final text only, NOT `/api/notify`
|
|
280
280
|
|
|
281
281
|
The briefing is delivered as the final assistant turn of this
|
|
282
|
-
session. Do NOT call `POST /api/notify` for it — that path
|
|
283
|
-
the `notify` skill's
|
|
284
|
-
|
|
285
|
-
Compose the briefing as your final assistant turn; the daemon
|
|
286
|
-
it automatically.
|
|
282
|
+
session. Do NOT call `POST /api/notify` for it — that path is for
|
|
283
|
+
ad-hoc alerts and applies the `notify` skill's universal
|
|
284
|
+
message-discipline rules, which have the wrong semantics for a daily
|
|
285
|
+
DM. Compose the briefing as your final assistant turn; the daemon
|
|
286
|
+
DMs it automatically.
|
|
287
287
|
|
|
288
288
|
### Bookkeeping (silent — never visible to the user)
|
|
289
289
|
|
|
@@ -460,7 +460,7 @@ Inspect `<recent_dm_messages window="60min">`:
|
|
|
460
460
|
"time": "<current_time + 15min, ISO 8601 with offset>",
|
|
461
461
|
"taskType": "dm_session",
|
|
462
462
|
"description": "confirm:<topic> — <hint>",
|
|
463
|
-
"
|
|
463
|
+
"tier": "medium",
|
|
464
464
|
"taskContext": {
|
|
465
465
|
"scheduledBy": "scheduled_dm.confirm_followup.self_defer",
|
|
466
466
|
"sub_flow": "confirm",
|
|
@@ -775,7 +775,7 @@ curl -s -X POST http://localhost:8321/api/schedule \
|
|
|
775
775
|
"time": "<current_time + 24h, ISO 8601 with offset>",
|
|
776
776
|
"taskType": "dm_session",
|
|
777
777
|
"description": "confirm:<topic> — <hint, softened paraphrase>",
|
|
778
|
-
"
|
|
778
|
+
"tier": "medium",
|
|
779
779
|
"taskContext": {
|
|
780
780
|
"scheduledBy": "scheduled_dm.confirm_followup.retry",
|
|
781
781
|
"sub_flow": "confirm",
|
|
@@ -817,7 +817,7 @@ curl -s -X POST http://localhost:8321/api/schedule \
|
|
|
817
817
|
"time": "<current_time + 24h, ISO 8601 with offset>",
|
|
818
818
|
"taskType": "dm_session",
|
|
819
819
|
"description": "confirm:<topic> — silence-evaluator",
|
|
820
|
-
"
|
|
820
|
+
"tier": "medium",
|
|
821
821
|
"taskContext": {
|
|
822
822
|
"scheduledBy": "scheduled_dm.confirm_followup.evaluator",
|
|
823
823
|
"sub_flow": "confirm",
|
|
@@ -91,14 +91,14 @@ confirmation.
|
|
|
91
91
|
proceed to Step 3 below so the task still executes.
|
|
92
92
|
2. `GET /api/context/roadmap` and locate the matching
|
|
93
93
|
`### Scheduled: ... (task #<id>) <!-- id: rm-... -->` entry.
|
|
94
|
-
Flip only its Status line to
|
|
94
|
+
Flip only its Status line to `running` via `PATCH`
|
|
95
95
|
`section=agent_action_plan` `mode=replace` (include
|
|
96
96
|
`X-Lock-Id: <lockId>`). Preserve the heading ID marker and any
|
|
97
|
-
|
|
97
|
+
`completed ...` Preparation Timeline rows byte-for-byte.
|
|
98
98
|
Follow the **roadmap** skill for the exact entry shape.
|
|
99
99
|
3. Execute the task body (the remaining steps in this prompt).
|
|
100
100
|
4. After Step 4 closes the loop, PATCH the entry Status to
|
|
101
|
-
|
|
101
|
+
`completed` / `failed` (`X-Lock-Id: <lockId>`), then
|
|
102
102
|
`DELETE /api/context/lock/roadmap` with `{"lockId": "<lockId>"}`
|
|
103
103
|
— always release even on failure paths.
|
|
104
104
|
|
|
@@ -129,8 +129,8 @@ confirmation.
|
|
|
129
129
|
7. If Step 1 found a matching Agent Plan row, flip it to `- [x]` via the
|
|
130
130
|
lifecycle recipe in the context skill (GET → edit body → PATCH
|
|
131
131
|
replace section=agent_plan). Annotate per the skill's outcome table:
|
|
132
|
-
success = no annotation, skip =
|
|
133
|
-
|
|
132
|
+
success = no annotation, skip = `(skipped: <reason>)`, failure =
|
|
133
|
+
`(failed: <reason>)`. Never leave a past-HH:MM row as `[ ]`.
|
|
134
134
|
8. If the PATCH returns 409 (Morning Routine lock), follow the skill's
|
|
135
135
|
"retry 3 times, else log deferred" guidance. Do not drop silently.
|
|
136
136
|
|
|
@@ -2,249 +2,148 @@
|
|
|
2
2
|
|
|
3
3
|
## Task: Initial Setup — Create rules/management.md
|
|
4
4
|
|
|
5
|
-
The
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
`<output_language_policy>`.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
file — e.g. `PUT /api/context/user/profile` — are Autonomous-tier and
|
|
37
|
-
work normally.)
|
|
38
|
-
|
|
39
|
-
Tags available in the prompt:
|
|
40
|
-
|
|
41
|
-
- `<integration_modes …/>` — one attribute per integration. Always
|
|
42
|
-
present, always covers every key. Example:
|
|
43
|
-
`<integration_modes gmail="disabled" google_calendar="direct" notion="delegated" notion_delegated_to="claude" outlook_calendar="disabled" outlook_mail="disabled" git="disabled" github="disabled" />`.
|
|
44
|
-
Values are `direct | delegated | disabled`.
|
|
45
|
-
- `<obsidian_vault_path>…</obsidian_vault_path>` — emitted **iff** the
|
|
46
|
-
user has configured an external Obsidian vault. **Absence means the
|
|
47
|
-
user has no external Obsidian vault** (treat as "no").
|
|
5
|
+
The dashboard wizard already captured `settings.primary_language` and
|
|
6
|
+
`settings.vault_mode`. Steps 4–6 (Mail / Calendar / Note) configured
|
|
7
|
+
the user's integrations. Your role:
|
|
8
|
+
derive an initial Source-of-Truth table from those integrations,
|
|
9
|
+
confirm it with the user, gather two remaining preferences, and
|
|
10
|
+
generate rules/management.md.
|
|
11
|
+
|
|
12
|
+
Output language: follow `<output_language_policy>`. The conversation
|
|
13
|
+
matches the user's input language.
|
|
14
|
+
|
|
15
|
+
This is a **strictly two-turn** dashboard conversation. The same prompt
|
|
16
|
+
renders every turn — decide which turn you're on by inspecting prior
|
|
17
|
+
assistant messages.
|
|
18
|
+
|
|
19
|
+
| Turn | Trigger | What you emit |
|
|
20
|
+
|------|---------|---------------|
|
|
21
|
+
| Turn 1 | No prior assistant message | One natural-language message: greeting + derived Source-of-Truth table + remaining questions. **No code blocks. No curl.** |
|
|
22
|
+
| Turn 2 | The most recent prior assistant message was Turn 1 and the user has now replied | `management-rules` block **FIRST**, then optional `character` block, then silent PUT /api/context/user/profile + any user/*.md PATCHes |
|
|
23
|
+
| Turn 3+ | User requested revisions after Turn 2 | Revised `management-rules` block only (cap: 2 revision rounds). No curl writes — they already ran in Turn 2. |
|
|
24
|
+
|
|
25
|
+
### Step 0 (silent) — Derive Source-of-Truth from context tags
|
|
26
|
+
|
|
27
|
+
Read these tags from the prompt context. Do **NOT** curl
|
|
28
|
+
`/api/integrations` or `/api/config` — both are Approve-tier and the
|
|
29
|
+
agent's session has only an `X-Read-Token`, so those reads return 401.
|
|
30
|
+
|
|
31
|
+
- `<integration_modes …/>` — one attribute per integration, always
|
|
32
|
+
emitted. Values are `direct | delegated | native | disabled`. Any
|
|
33
|
+
value other than `disabled` means the integration is wired up.
|
|
34
|
+
- `<obsidian_vault_path>…</obsidian_vault_path>` — present **iff** the
|
|
35
|
+
user has configured an external Obsidian vault. Absence means "no".
|
|
48
36
|
- `<settings primary_language="…" vault_mode="…" />` — primary
|
|
49
|
-
language and primary-vault layout
|
|
37
|
+
language and primary-vault layout.
|
|
50
38
|
|
|
51
|
-
|
|
39
|
+
Derive the four rows:
|
|
52
40
|
|
|
53
41
|
| Source-of-Truth row | Derive from |
|
|
54
42
|
|---|---|
|
|
55
|
-
| Schedule | `google_calendar != "disabled"` → `Google Calendar`; else `outlook_calendar != "disabled"` → `Outlook Calendar`; else ask
|
|
56
|
-
| Notes | `<obsidian_vault_path>`
|
|
57
|
-
| Tasks | `notion != "disabled"` → `Notion`; else
|
|
43
|
+
| Schedule | `google_calendar != "disabled"` → `Google Calendar`; else `outlook_calendar != "disabled"` → `Outlook Calendar`; else ask |
|
|
44
|
+
| Notes | `<obsidian_vault_path>` present → `Obsidian`; else `notion != "disabled"` → `Notion`; else ask |
|
|
45
|
+
| Tasks | `notion != "disabled"` → `Notion`; else `<obsidian_vault_path>` present → `Obsidian`; else ask |
|
|
58
46
|
| Projects | same precedence as Tasks |
|
|
59
47
|
|
|
60
|
-
|
|
61
|
-
(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
"
|
|
104
|
-
block.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
When you PUT /api/context/user/profile, write the full file in this shape so setup is deterministic:
|
|
148
|
-
|
|
149
|
-
```
|
|
150
|
-
---
|
|
151
|
-
type: user
|
|
152
|
-
owner: shared
|
|
153
|
-
updated: 2026-04-21
|
|
154
|
-
---
|
|
155
|
-
# User
|
|
156
|
-
> Primary profile injected into every session. Keep this file concise.
|
|
157
|
-
> Detailed profile lives under `user/`.
|
|
158
|
-
> Fetch index: `curl -s http://localhost:8321/api/context/user/_index`
|
|
159
|
-
|
|
160
|
-
## Identity
|
|
161
|
-
(leave bullets blank — setup does not collect name or timezone)
|
|
162
|
-
|
|
163
|
-
## Work Pattern
|
|
164
|
-
- Working hours: Weekdays 09:00–18:00
|
|
165
|
-
|
|
166
|
-
## Platforms
|
|
167
|
-
- Schedule: {from derived Source-of-Truth table}
|
|
168
|
-
- Tasks: {from derived Source-of-Truth table}
|
|
169
|
-
- Notes: {from derived Source-of-Truth table}
|
|
170
|
-
- Projects: {from derived Source-of-Truth table}
|
|
171
|
-
|
|
172
|
-
## Expertise
|
|
173
|
-
- {one-line summary if the user mentioned their field; otherwise leave empty}
|
|
174
|
-
|
|
175
|
-
## Notification Preferences
|
|
176
|
-
- Quiet hours: 22:00–08:00
|
|
177
|
-
|
|
178
|
-
## Learned Context
|
|
179
|
-
|
|
180
|
-
## Raw Signals
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
Use today's YYYY-MM-DD for `updated` (the date above is only an example).
|
|
184
|
-
Do not omit `## Notification Preferences` — Morning Routine reads it directly.
|
|
185
|
-
|
|
186
|
-
### How to submit user/profile.md
|
|
187
|
-
|
|
188
|
-
Use inline `-d '{"content": "..."}'` with `\n` escapes. Do NOT use
|
|
189
|
-
`-d @-`, heredoc pipelines, or `--data-raw '@-'` — those have
|
|
190
|
-
produced malformed bodies in this flow (server saw literal `@-` and
|
|
191
|
-
returned 500).
|
|
192
|
-
|
|
193
|
-
```bash
|
|
194
|
-
curl -s -X PUT http://localhost:8321/api/context/user/profile \
|
|
195
|
-
-H 'Content-Type: application/json' \
|
|
196
|
-
-d '{"content": "---\ntype: user\nowner: shared\nupdated: 2026-04-23\n---\n<!-- DO NOT write tone / style / voice / formality / verbosity / emoji / language preferences in this file. Those are Character-field content — write them via PATCH http://localhost:8321/api/config/character with {\"character\": \"...\"}. This file is for USER FACTS only: identity, expertise, habits, relationships, goals. -->\n# User\n> Primary profile injected into every session.\n> Detailed profile lives under `user/`.\n> Fetch index: `curl -s http://localhost:8321/api/context/user/_index`\n\n## Identity\n\n## Work Pattern\n- Working hours: Weekdays 09:00–18:00\n\n## Platforms\n- Schedule: Google Calendar\n- Notes: Obsidian\n- Projects: Notion\n\n## Expertise\n\n## Notification Preferences\n- Quiet hours: 22:00–08:00\n\n## Learned Context\n\n## Raw Signals\n"}'
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
If the response is non-2xx, retry once with a smaller body or switch
|
|
200
|
-
to section-level PATCH. Do not report the error to the user as a
|
|
201
|
-
permission issue — the default allowlist includes `Bash(curl *)`.
|
|
202
|
-
|
|
203
|
-
### Character code block format
|
|
204
|
-
|
|
205
|
-
If the user answered the communication-style question with an actual
|
|
206
|
-
preference (not "no preference" / "skip"), emit a ```character``` code
|
|
207
|
-
block in the same turn the management-rules block is emitted:
|
|
208
|
-
|
|
209
|
-
```character
|
|
210
|
-
Speak casually. Tight bullets. No emojis.
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
Rules for the block body:
|
|
214
|
-
- The body is raw text — no markdown, no outer quotes, no nested fences.
|
|
215
|
-
- Stay under the 1000-char cap; surface the excess to the user rather
|
|
216
|
-
than silently truncating.
|
|
217
|
-
- Emit **at most one** character block per turn.
|
|
218
|
-
|
|
219
|
-
The dashboard extracts this block, stages it into an inline editor
|
|
220
|
-
alongside the Management Rules Preview, and PATCHes `/api/config`
|
|
221
|
-
atomically when the user clicks Save & Finish. **Do NOT call `/api/config/character` (or any `/api/config*`) yourself from the agent during setup.**
|
|
222
|
-
|
|
223
|
-
If the user did not state a preference, omit the block entirely — the
|
|
224
|
-
dashboard will leave the existing `character` value unchanged.
|
|
225
|
-
|
|
226
|
-
The character value is written verbatim into every session's
|
|
227
|
-
CLAUDE.md / AGENTS.md / GEMINI.md (between the safety preamble and
|
|
228
|
-
the profile body) uniformly across Claude, Codex, and Gemini. Never
|
|
229
|
-
write tone/style preferences into user/profile.md.
|
|
48
|
+
Defensive fallback: if `<integration_modes>` is missing from the prompt
|
|
49
|
+
(shouldn't happen), ask the user about all four rows rather than
|
|
50
|
+
fabricating defaults. Do not retry with a curl.
|
|
51
|
+
|
|
52
|
+
### Turn 1 — Greet, present derived table, ask questions
|
|
53
|
+
|
|
54
|
+
Emit ONE natural-language message containing:
|
|
55
|
+
|
|
56
|
+
1. A one-line greeting using `<agent_identity>` display_name.
|
|
57
|
+
2. The derived Source-of-Truth table ("Here's what I picked up from
|
|
58
|
+
your setup — does this look right?").
|
|
59
|
+
3. Any **rows you could NOT infer** (typically zero or one).
|
|
60
|
+
4. Two preference questions in the **same** message — no `Q1`/`Q2`
|
|
61
|
+
labels, speak naturally:
|
|
62
|
+
- Communication style — how should the agent talk to you?
|
|
63
|
+
(e.g., concise, casual, no emojis). Skip is OK.
|
|
64
|
+
- Project-management preferences — any preferences for how the
|
|
65
|
+
agent should handle your projects? (e.g., weekly milestones,
|
|
66
|
+
design doc before code). Skip is OK.
|
|
67
|
+
|
|
68
|
+
Hard rules for Turn 1:
|
|
69
|
+
|
|
70
|
+
- Do **NOT** emit a `management-rules` code block.
|
|
71
|
+
- Do **NOT** emit a `character` code block.
|
|
72
|
+
- Do **NOT** call any curl.
|
|
73
|
+
|
|
74
|
+
Then wait for the user's reply.
|
|
75
|
+
|
|
76
|
+
A common failure mode here is the model treating Turn 1 as a one-shot
|
|
77
|
+
"produce the document" task and emitting `management-rules` before
|
|
78
|
+
the user has answered — the dashboard would silently lock in default
|
|
79
|
+
preferences on the unanswered Turn-1 emission. Don't.
|
|
80
|
+
|
|
81
|
+
### Turn 2 — After the user replies, emit the artifacts
|
|
82
|
+
|
|
83
|
+
In this exact order:
|
|
84
|
+
|
|
85
|
+
1. Emit the `management-rules` code block **FIRST** — the dashboard
|
|
86
|
+
reveals the preview as soon as the block lands, so emitting it
|
|
87
|
+
first makes visible-progress immediate. Use the template in
|
|
88
|
+
"rules/management.md Format" below.
|
|
89
|
+
|
|
90
|
+
2. If the user stated a tone / style preference (not "no preference" /
|
|
91
|
+
"skip"), emit a `character` code block immediately after — see
|
|
92
|
+
"Character code block format" below. Omit the block entirely if
|
|
93
|
+
they skipped.
|
|
94
|
+
**Do NOT put communication style inside rules/management.md, and do NOT put it inside user/profile.md.**
|
|
95
|
+
Tone / style / voice / formality / emoji / language preferences
|
|
96
|
+
live in the `character` runtime-config field only.
|
|
97
|
+
|
|
98
|
+
3. Silently PUT /api/context/user/profile using the
|
|
99
|
+
"user/profile.md Format" template below. Working hours and quiet
|
|
100
|
+
hours pre-populate with defaults (Weekdays 09:00–18:00,
|
|
101
|
+
Quiet hours 22:00–08:00) — do not ask. Fill Platforms from the
|
|
102
|
+
**derived Source-of-Truth table** (Step 0). Leave Identity blank —
|
|
103
|
+
setup does not collect name or timezone.
|
|
104
|
+
|
|
105
|
+
4. If the user shared detail-heavy facts in their reply, PATCH the
|
|
106
|
+
matching `user/*.md` file. **Only seed what the user actually
|
|
107
|
+
stated — do not invent or infer.**
|
|
108
|
+
|
|
109
|
+
| Fact type | File |
|
|
110
|
+
|-----------|------|
|
|
111
|
+
| Named colleagues, family, friends | user/people.md |
|
|
112
|
+
| Current company, role specifics, ongoing projects | user/work.md |
|
|
113
|
+
| Specific frameworks, years of experience | user/expertise.md |
|
|
114
|
+
| Long-term goals, aspirations | user/goals.md |
|
|
115
|
+
| Hobbies, lifestyle habits, dietary notes | user/personal.md |
|
|
116
|
+
|
|
117
|
+
See the user-profile skill for the read-before-write PATCH recipe
|
|
118
|
+
and the `section_not_found` → `append_to_file` first-write
|
|
119
|
+
fallback. (user/profile.md `## Expertise` keeps a one-line summary
|
|
120
|
+
only — detailed framework history goes to user/expertise.md.)
|
|
121
|
+
|
|
122
|
+
**Important**: Do NOT curl-write rules/management.md yourself. The
|
|
123
|
+
dashboard persists it via `POST /setup/save-rules` when the user
|
|
124
|
+
clicks Save & Finish. Do NOT PATCH /api/config/character either —
|
|
125
|
+
the dashboard stages the `character` block and writes it atomically
|
|
126
|
+
on Save & Finish.
|
|
127
|
+
|
|
128
|
+
### Turn 3+ — Revisions (cap: 2 rounds)
|
|
129
|
+
|
|
130
|
+
If the user requests changes, revise the `management-rules` block and
|
|
131
|
+
re-emit it. Hard cap: **at most 2 revision rounds** total. Do NOT
|
|
132
|
+
re-run the Turn-2 curl writes — they already persisted. The dashboard
|
|
133
|
+
saves the revised rules block on Save & Finish.
|
|
230
134
|
|
|
231
135
|
### rules/management.md Format
|
|
232
136
|
|
|
233
|
-
Output language:
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
and
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
`Obsidian`, `Notion`, `today.md`, `projects/*.md`).
|
|
244
|
-
|
|
245
|
-
Fill the Source of Truth table from the **derived rows you confirmed
|
|
246
|
-
with the user in Step 0** (Schedule / Tasks / Notes / Projects).
|
|
247
|
-
Generate using this format:
|
|
137
|
+
Output language: section headers stay English (the daemon parses
|
|
138
|
+
them); descriptive bullets under `## Autonomy Levels`, `## Notification
|
|
139
|
+
Rules`, `## Schedule`, `## Project Management` follow `<settings
|
|
140
|
+
primary_language>`. Also stay English: `## Agent Identity` field
|
|
141
|
+
labels (`- AI name:`, `- WhatsApp label:`), Source-of-Truth table
|
|
142
|
+
headers and Domain labels, and product/brand cells (`Google
|
|
143
|
+
Calendar`, `Obsidian`, `Notion`, `today.md`, `projects/*.md`).
|
|
144
|
+
|
|
145
|
+
Fill the Source of Truth table from the rows you confirmed in Turn 1.
|
|
146
|
+
Use today's YYYY-MM-DD for `updated` (the date below is an example).
|
|
248
147
|
|
|
249
148
|
```management-rules
|
|
250
149
|
---
|
|
@@ -288,18 +187,39 @@ updated: 2026-04-21
|
|
|
288
187
|
- {user's project-management-method answer verbatim, or "No specific preferences — follow standard project practices" if they skipped}
|
|
289
188
|
```
|
|
290
189
|
|
|
291
|
-
|
|
190
|
+
Reproduce blank lines exactly — every `##` heading and every table
|
|
191
|
+
must be preceded by a blank line. Never concatenate a heading onto
|
|
192
|
+
the end of the previous list item.
|
|
292
193
|
|
|
293
|
-
###
|
|
194
|
+
### Character code block format
|
|
294
195
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
then newline, blank line, then the next heading.
|
|
196
|
+
Emit only when the user stated an actual preference. Body rules:
|
|
197
|
+
raw text only (no markdown, no outer quotes, no nested fences),
|
|
198
|
+
≤1000 chars (surface excess rather than silently truncating), at
|
|
199
|
+
most one block per turn.
|
|
300
200
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
201
|
+
```character
|
|
202
|
+
Speak casually. Tight bullets. No emojis.
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### user/profile.md Format
|
|
206
|
+
|
|
207
|
+
When you PUT /api/context/user/profile, write the full file in this
|
|
208
|
+
shape. Use today's YYYY-MM-DD for `updated`. Do not omit
|
|
209
|
+
`## Notification Preferences` — Morning Routine reads it directly.
|
|
210
|
+
|
|
211
|
+
Use inline `-d '{"content": "..."}'` with `\n` escapes. Do **NOT**
|
|
212
|
+
use `-d @-`, heredoc pipelines, or `--data-raw '@-'` — those have
|
|
213
|
+
produced malformed bodies in this flow (server saw literal `@-` and
|
|
214
|
+
returned 500).
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
curl -s -X PUT http://localhost:8321/api/context/user/profile \
|
|
218
|
+
-H 'Content-Type: application/json' \
|
|
219
|
+
-d '{"content": "---\ntype: user\nowner: shared\nupdated: 2026-04-23\n---\n# User\n\n## Identity\n\n## Work Pattern\n- Working hours: Weekdays 09:00–18:00\n\n## Platforms\n- Schedule: Google Calendar\n- Notes: Obsidian\n- Projects: Notion\n\n## Expertise\n\n## Notification Preferences\n- Quiet hours: 22:00–08:00\n\n## Learned Context\n\n## Raw Signals\n"}'
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
If the response is non-2xx, retry once with a smaller body or switch
|
|
223
|
+
to section-level PATCH. The default allowlist includes
|
|
224
|
+
`Bash(curl *)` — a denial here is a body-shape issue, not a
|
|
225
|
+
permission issue.
|
|
@@ -26,7 +26,7 @@ The shim reads stdin when `-d @-` is passed, so the heredoc body lands as the JS
|
|
|
26
26
|
|
|
27
27
|
### Procedure
|
|
28
28
|
|
|
29
|
-
1. Fetch the URL with the per-backend primitive (WebFetch on Claude, curl on Codex, web_fetch on Gemini).
|
|
29
|
+
1. Fetch the URL with the per-backend primitive (WebFetch on Claude, curl on Codex/OpenCode, web_fetch on Gemini).
|
|
30
30
|
2. POST one new note at `10_raw/<slug>.md` via the daemon Wiki API with `-H 'x-process-key: wiki.ingest_url'`. Path is EXACTLY `10_raw/<slug>.md` — no nested folders like `10_raw/articles/...`.
|
|
31
31
|
3. **Inspect the curl response.** Only `{"ok":true,"path":"10_raw/<slug>.md"}` counts as success. Anything else (4xx, 5xx, missing fields, hallucinated endpoint like `/api/send-message`, no response) means the file was NOT created — PATCH `log.md` with the failure reason and emit the failure DM.
|
|
32
32
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifestVersion": 1,
|
|
3
|
-
"generatedAt": "2026-
|
|
3
|
+
"generatedAt": "2026-05-18",
|
|
4
4
|
"notes": "Auto-generated inventory of versioned templates. Each entry's 'version' must equal the `template_version:` field in the corresponding template file's frontmatter. Bump both in the same PR. A unit test asserts this consistency.",
|
|
5
5
|
"templates": {
|
|
6
6
|
"_index.md": {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"version": 1
|
|
65
65
|
},
|
|
66
66
|
"rules/journal-format.md": {
|
|
67
|
-
"version":
|
|
67
|
+
"version": 3
|
|
68
68
|
},
|
|
69
69
|
"rules/management.md": {
|
|
70
70
|
"version": 2
|
|
@@ -82,22 +82,22 @@
|
|
|
82
82
|
"version": 1
|
|
83
83
|
},
|
|
84
84
|
"user/expertise.md": {
|
|
85
|
-
"version":
|
|
85
|
+
"version": 2
|
|
86
86
|
},
|
|
87
87
|
"user/goals.md": {
|
|
88
|
-
"version":
|
|
88
|
+
"version": 2
|
|
89
89
|
},
|
|
90
90
|
"user/people.md": {
|
|
91
|
-
"version":
|
|
91
|
+
"version": 2
|
|
92
92
|
},
|
|
93
93
|
"user/personal.md": {
|
|
94
|
-
"version":
|
|
94
|
+
"version": 2
|
|
95
95
|
},
|
|
96
96
|
"user/profile.md": {
|
|
97
97
|
"version": 2
|
|
98
98
|
},
|
|
99
99
|
"user/work.md": {
|
|
100
|
-
"version":
|
|
100
|
+
"version": 2
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -15,7 +15,7 @@ Injected into prompts through the root-level context-index.md catalog.
|
|
|
15
15
|
| File | Process key |
|
|
16
16
|
|---|---|
|
|
17
17
|
| `hourly.md` | `routine.hourly_check` |
|
|
18
|
-
| `morning.md` | `routine.morning_routine`, `routine.
|
|
18
|
+
| `morning.md` | `routine.morning_routine`, `routine.morning_routine_today` |
|
|
19
19
|
| `evening.md` | `routine.evening_review` |
|
|
20
20
|
| `weekly.md` | `routine.weekly_review` |
|
|
21
21
|
| `monthly.md` | `routine.monthly_review` |
|