@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
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: travel
|
|
3
|
-
description: Load when the user asks about an upcoming trip or reservation, morning routines need to surface travel within the next 7 days, or reviews need a travel overview — flight, hotel, restaurant, train, and bus bookings detected by the Gmail observer.
|
|
4
|
-
allowed-tools:
|
|
5
|
-
- Bash(curl *)
|
|
6
|
-
- Read
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Travel & Booking Tracker
|
|
10
|
-
|
|
11
|
-
The daemon's Gmail observer detects booking confirmation emails from airlines,
|
|
12
|
-
hotels, OTAs, restaurant reservation platforms, and rail services. Data is
|
|
13
|
-
stored in the `travel_bookings` SQLite table.
|
|
14
|
-
|
|
15
|
-
## When to Use
|
|
16
|
-
|
|
17
|
-
- **Morning routine**: include upcoming travel/bookings in today.md.
|
|
18
|
-
- **Evening review**: report newly detected bookings.
|
|
19
|
-
- **User asks about trips/reservations**: query bookings and summarize.
|
|
20
|
-
- **Pre-trip reminders**: surface upcoming travel day before departure.
|
|
21
|
-
|
|
22
|
-
## Workflow
|
|
23
|
-
|
|
24
|
-
1. Fetch upcoming bookings from `/api/travel-bookings/upcoming`.
|
|
25
|
-
2. For morning routine, highlight bookings within the next 7 days.
|
|
26
|
-
3. For evening review, check for newly detected bookings (today's createdAt).
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## API Reference
|
|
31
|
-
|
|
32
|
-
Base URL: `http://localhost:8321`
|
|
33
|
-
|
|
34
|
-
### GET /api/travel-bookings
|
|
35
|
-
|
|
36
|
-
List travel bookings with optional filters.
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
# All bookings
|
|
40
|
-
curl -s "http://localhost:8321/api/travel-bookings?limit=20"
|
|
41
|
-
|
|
42
|
-
# Filter by type
|
|
43
|
-
curl -s "http://localhost:8321/api/travel-bookings?type=flight"
|
|
44
|
-
|
|
45
|
-
# Upcoming only
|
|
46
|
-
curl -s "http://localhost:8321/api/travel-bookings?status=upcoming"
|
|
47
|
-
|
|
48
|
-
# Date range
|
|
49
|
-
curl -s "http://localhost:8321/api/travel-bookings?from=2026-04-01&to=2026-05-01"
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
| Param | Type | Default | Description |
|
|
53
|
-
|-------|------|---------|-------------|
|
|
54
|
-
| `type` | string | — | flight, hotel, restaurant, train, bus, other |
|
|
55
|
-
| `status` | string | all | upcoming, completed, cancelled, all |
|
|
56
|
-
| `from` | ISO date | — | Bookings with start_date on or after |
|
|
57
|
-
| `to` | ISO date | — | Bookings with start_date before |
|
|
58
|
-
| `limit` | number | 50 | Max results (1–200) |
|
|
59
|
-
|
|
60
|
-
Response:
|
|
61
|
-
```json
|
|
62
|
-
{
|
|
63
|
-
"bookings": [
|
|
64
|
-
{
|
|
65
|
-
"id": 1,
|
|
66
|
-
"type": "flight",
|
|
67
|
-
"provider": "United",
|
|
68
|
-
"destination": null,
|
|
69
|
-
"startDate": "2026-05-15T10:30:00Z",
|
|
70
|
-
"endDate": null,
|
|
71
|
-
"confirmationNumber": "ABC123",
|
|
72
|
-
"amount": 350,
|
|
73
|
-
"currency": "USD",
|
|
74
|
-
"status": "upcoming",
|
|
75
|
-
"gmailMessageId": "18f...",
|
|
76
|
-
"createdAt": "2026-04-12T10:00:00Z"
|
|
77
|
-
}
|
|
78
|
-
],
|
|
79
|
-
"total": 1
|
|
80
|
-
}
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### GET /api/travel-bookings/upcoming
|
|
84
|
-
|
|
85
|
-
Convenience endpoint for upcoming bookings sorted by start date.
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
curl -s "http://localhost:8321/api/travel-bookings/upcoming?limit=10"
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### PATCH /api/travel-bookings/:id
|
|
92
|
-
|
|
93
|
-
Update booking status or destination.
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
curl -s -X PATCH "http://localhost:8321/api/travel-bookings/1" \
|
|
97
|
-
-H "Content-Type: application/json" \
|
|
98
|
-
-d '{"status": "completed"}'
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## Formatting Guide
|
|
104
|
-
|
|
105
|
-
### Morning routine — today.md
|
|
106
|
-
|
|
107
|
-
```
|
|
108
|
-
## Travel & Reservations
|
|
109
|
-
Upcoming flight: United to SFO (May 15) — confirmation ABC123
|
|
110
|
-
Hotel: Marriott SF (May 15-17) — confirmation XYZ789
|
|
111
|
-
Restaurant: OpenTable reservation tonight 19:00
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Omit section if no upcoming bookings within 7 days.
|
|
115
|
-
|
|
116
|
-
### Evening review
|
|
117
|
-
|
|
118
|
-
```
|
|
119
|
-
## New Bookings Detected
|
|
120
|
-
- United flight: May 15, confirmation ABC123, $350
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### Booking type display names
|
|
124
|
-
|
|
125
|
-
| type value | Display name |
|
|
126
|
-
|------------|-------------|
|
|
127
|
-
| flight | Flight |
|
|
128
|
-
| hotel | Hotel |
|
|
129
|
-
| restaurant | Restaurant |
|
|
130
|
-
| train | Train |
|
|
131
|
-
| bus | Bus |
|
|
132
|
-
| other | Reservation |
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: travel-time
|
|
3
|
-
description: Load when a calendar event needs a departure time, the user asks about commute / transit duration, or a reminder includes "leave by HH:MM".
|
|
4
|
-
when_to_use: Backed by Google Maps Directions — requires `googleMapsApiKey` in the daemon secret store; falls back gracefully when missing.
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Bash(curl *)
|
|
7
|
-
- Read
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Travel Time & Commute Optimizer
|
|
11
|
-
|
|
12
|
-
Uses the Google Maps Directions API to estimate travel time between locations.
|
|
13
|
-
Integrates with the calendar to compute departure times for events with
|
|
14
|
-
location fields.
|
|
15
|
-
|
|
16
|
-
**Prerequisite**: Google Maps API key must be configured in the daemon's
|
|
17
|
-
secret store (`googleMapsApiKey`). The API key needs the Directions API
|
|
18
|
-
enabled.
|
|
19
|
-
|
|
20
|
-
## When to Use
|
|
21
|
-
|
|
22
|
-
- **Morning routine**: check today's calendar events with locations,
|
|
23
|
-
compute departure times, add to today.md.
|
|
24
|
-
- **User asks about commute/travel time**: query specific routes.
|
|
25
|
-
- **Pre-event reminders**: DM departure time suggestions.
|
|
26
|
-
|
|
27
|
-
## Workflow
|
|
28
|
-
|
|
29
|
-
1. Fetch today's calendar events. The right call depends on the current
|
|
30
|
-
Google Calendar mode (read `<integration_modes>` injected at session
|
|
31
|
-
start):
|
|
32
|
-
<!-- mode:direct:google_calendar -->
|
|
33
|
-
Direct mode → `GET /api/calendar/events?date=today&days=1`
|
|
34
|
-
(see the `external-services` skill).
|
|
35
|
-
<!-- /mode:direct:google_calendar -->
|
|
36
|
-
<!-- mode:delegated-same:google_calendar -->
|
|
37
|
-
Same-backend delegated → use this session backend's native Calendar
|
|
38
|
-
list-events MCP tool. `/api/calendar/events` returns 410.
|
|
39
|
-
<!-- /mode:delegated-same:google_calendar -->
|
|
40
|
-
<!-- mode:delegated-cross:google_calendar -->
|
|
41
|
-
Cross-backend delegated → `POST /api/integrations/google_calendar/exec`
|
|
42
|
-
with a natural-language `task` + `outputSchema` (see the
|
|
43
|
-
`external-services` skill — cross-backend variant for worked
|
|
44
|
-
examples).
|
|
45
|
-
<!-- /mode:delegated-cross:google_calendar -->
|
|
46
|
-
<!-- mode:native:google_calendar -->
|
|
47
|
-
Native mode → use this session backend's native Calendar
|
|
48
|
-
list-events MCP tool (same call shape as `delegated-same`). The
|
|
49
|
-
materialized `external-services` skill body
|
|
50
|
-
(`SKILL.native.<session-backend>.md`) lists the per-backend tool
|
|
51
|
-
names. The daemon does not proxy in native mode;
|
|
52
|
-
`/api/calendar/events` returns 410 and
|
|
53
|
-
`/api/integrations/google_calendar/exec` returns 410 too.
|
|
54
|
-
<!-- /mode:native:google_calendar -->
|
|
55
|
-
<!-- mode:disabled:google_calendar -->
|
|
56
|
-
Disabled → skip this skill; there is no calendar to source events from.
|
|
57
|
-
<!-- /mode:disabled:google_calendar -->
|
|
58
|
-
2. For events with a `location` field, call `/api/travel-time` or
|
|
59
|
-
`/api/travel-time/for-event/:eventId` to get travel duration.
|
|
60
|
-
3. Include departure time recommendations in today.md or DM.
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## API Reference
|
|
65
|
-
|
|
66
|
-
Base URL: `http://localhost:8321`
|
|
67
|
-
|
|
68
|
-
### GET /api/travel-time
|
|
69
|
-
|
|
70
|
-
Estimate travel time between two locations.
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
# Transit (default)
|
|
74
|
-
curl -s "http://localhost:8321/api/travel-time?origin=Grand+Central&destination=Times+Square"
|
|
75
|
-
|
|
76
|
-
# Driving with arrival time
|
|
77
|
-
curl -s "http://localhost:8321/api/travel-time?origin=Brooklyn&destination=Newark&mode=driving&arrival=2026-04-12T14:00:00-04:00"
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
| Param | Type | Default | Description |
|
|
81
|
-
|-------|------|---------|-------------|
|
|
82
|
-
| `origin` | string | (required) | Origin address or place name |
|
|
83
|
-
| `destination` | string | (required) | Destination address or place name |
|
|
84
|
-
| `mode` | string | transit | driving, transit, walking, bicycling |
|
|
85
|
-
| `arrival` | ISO 8601 | — | Desired arrival time (computes departure time) |
|
|
86
|
-
|
|
87
|
-
Response:
|
|
88
|
-
```json
|
|
89
|
-
{
|
|
90
|
-
"origin": "Grand Central Terminal, NY",
|
|
91
|
-
"destination": "Times Square, NY",
|
|
92
|
-
"mode": "transit",
|
|
93
|
-
"durationSeconds": 1380,
|
|
94
|
-
"durationText": "23 mins",
|
|
95
|
-
"distanceMeters": 8500,
|
|
96
|
-
"distanceText": "8.5 km",
|
|
97
|
-
"departBy": "2026-04-12T13:34:00.000Z"
|
|
98
|
-
}
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
### GET /api/travel-time/for-event/:eventId
|
|
102
|
-
|
|
103
|
-
Estimate travel time for a specific calendar event.
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
curl -s "http://localhost:8321/api/travel-time/for-event/abc123?origin=Home&mode=transit"
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
| Param | Type | Default | Description |
|
|
110
|
-
|-------|------|---------|-------------|
|
|
111
|
-
| `origin` | string | (required) | Your starting location |
|
|
112
|
-
| `mode` | string | transit | Travel mode |
|
|
113
|
-
|
|
114
|
-
Response:
|
|
115
|
-
```json
|
|
116
|
-
{
|
|
117
|
-
"event": {
|
|
118
|
-
"id": "abc123",
|
|
119
|
-
"summary": "Team meeting",
|
|
120
|
-
"location": "WeWork Times Square",
|
|
121
|
-
"start": "2026-04-12T14:00:00-04:00"
|
|
122
|
-
},
|
|
123
|
-
"travelTime": {
|
|
124
|
-
"origin": "Home, NY",
|
|
125
|
-
"destination": "WeWork Times Square, NY",
|
|
126
|
-
"mode": "transit",
|
|
127
|
-
"durationSeconds": 2400,
|
|
128
|
-
"durationText": "40 mins",
|
|
129
|
-
"distanceMeters": 15000,
|
|
130
|
-
"distanceText": "15 km",
|
|
131
|
-
"departBy": "2026-04-12T13:16:00.000Z"
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
---
|
|
137
|
-
|
|
138
|
-
## Formatting Guide
|
|
139
|
-
|
|
140
|
-
### Morning routine — today.md
|
|
141
|
-
|
|
142
|
-
```
|
|
143
|
-
## Commute & Travel
|
|
144
|
-
14:00 Team meeting @ WeWork Times Square — depart by 13:15 (transit, 40 min)
|
|
145
|
-
18:30 Dinner @ Restaurant ABC — depart by 18:00 (transit, 25 min)
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
Only include events that have a `location` field.
|
|
149
|
-
Omit section if no events with locations today.
|
|
150
|
-
|
|
151
|
-
### Mode display names
|
|
152
|
-
|
|
153
|
-
| mode | Display |
|
|
154
|
-
|------|---------|
|
|
155
|
-
| transit | Transit |
|
|
156
|
-
| driving | Driving |
|
|
157
|
-
| walking | Walking |
|
|
158
|
-
| bicycling | Bicycle |
|
|
@@ -1,322 +0,0 @@
|
|
|
1
|
-
{context}
|
|
2
|
-
|
|
3
|
-
## Task: Morning Routine (04:00 pipeline)
|
|
4
|
-
|
|
5
|
-
This is the B-007 §5.9 nine-step pipeline. The daemon has already rotated
|
|
6
|
-
yesterday's `today.md` → `yesterday.md` before you start. Each numbered
|
|
7
|
-
step below maps to a §5.9 step. Follow the `context` skill for section
|
|
8
|
-
formats and entry shapes — this prompt owns the workflow; the skill owns
|
|
9
|
-
the schema.
|
|
10
|
-
|
|
11
|
-
The "Vault review context" block appended to this prompt includes
|
|
12
|
-
`context-index.md` and `dossiers/morning.md`; consult it during context
|
|
13
|
-
gathering and update the dossier's Open items / Last run before finishing.
|
|
14
|
-
Writes to `dossiers/<flow>.md` MUST preserve the existing YAML
|
|
15
|
-
frontmatter block (`---\ntype: dossier\nowner: agent\nupdated: <date>\n---`);
|
|
16
|
-
prefer `PATCH` with a section target to mutate a single block, and when
|
|
17
|
-
doing a `PUT` full rewrite keep the frontmatter and only refresh
|
|
18
|
-
`updated:` — writes that drop the frontmatter are rejected with 422.
|
|
19
|
-
|
|
20
|
-
Global rules (apply at every step):
|
|
21
|
-
- Do **not** add meta-maintenance tasks about context files, setup completion, or placeholder cleanup (for example, "initialize context files") to User Tasks or Handoff, whether carried from yesterday or newly discovered, unless the user explicitly asked to track them.
|
|
22
|
-
- If `<today_write_lock_id>` is present, every PUT/PATCH to
|
|
23
|
-
`/api/context/today` must send header `X-Lock-Id: <today_write_lock_id>`.
|
|
24
|
-
- Silent-by-default: your final text is agent-internal. User notifications
|
|
25
|
-
require an explicit `POST /api/notify`.
|
|
26
|
-
|
|
27
|
-
### Step 1 — Read handoff and derive day-type
|
|
28
|
-
1. Read `<yesterday>` ## Handoff.
|
|
29
|
-
- "### Tomorrow" items → candidates for today's User Tasks / Agent Notes.
|
|
30
|
-
- "### Later" items → carry into the new `today.md` ## Handoff.
|
|
31
|
-
2. Derive today's day-type header per the today skill "Header line —
|
|
32
|
-
day-type filter". Read `<user>` ## Notification Preferences for the
|
|
33
|
-
matching policy. The resulting line 2 of `today.md` is load-bearing —
|
|
34
|
-
every downstream event parses it.
|
|
35
|
-
|
|
36
|
-
> **Date reference for today.md.** Take the H1 date from
|
|
37
|
-
> `<current_agent_day date="…" weekday="…" />` in your prompt context, not
|
|
38
|
-
> from `<current_time>`. The two diverge between local midnight and
|
|
39
|
-
> `boundary_hour:00` local; the daemon validates line 1 against
|
|
40
|
-
> `<current_agent_day>` and rejects mismatches with 422. The morning
|
|
41
|
-
> routine prepares the agent-day in progress — never tomorrow.
|
|
42
|
-
|
|
43
|
-
### Step 2 — Sync external sources (apply the day-type filter at read time)
|
|
44
|
-
3. Mail, Calendar, and Notion acquisition. The pre-pass fetcher session
|
|
45
|
-
(`routine.fetch_window`) ran ahead of you and posted a `<fetch>` row's
|
|
46
|
-
worth of observations for every active mail / calendar / notion
|
|
47
|
-
integration. Calendar windows are pre-fetched ONLY for non-direct
|
|
48
|
-
modes (delegated / native); direct-mode calendar data is still
|
|
49
|
-
inlined into `<calendar_events_7d>` by ContextBuilder. The
|
|
50
|
-
`<fetch_report>` block injected ahead of this body tells you the
|
|
51
|
-
pre-pass status:
|
|
52
|
-
|
|
53
|
-
- `status="success"` or `"partial"` → freshly-fetched rows are
|
|
54
|
-
visible in `/api/observations?pending=true`. Trust the table.
|
|
55
|
-
- `status="failed"` → the pre-pass either crashed or its output was
|
|
56
|
-
unparseable. Pending observations from prior ticks may still be
|
|
57
|
-
present; treat the table as best-effort and skip integration
|
|
58
|
-
sections whose source_prefix returns nothing.
|
|
59
|
-
- `status="skipped"` → no integration was active for this routine
|
|
60
|
-
this tick; mail / notion sections are no-ops for this run.
|
|
61
|
-
|
|
62
|
-
Then drain pending observations and apply category / focus filtering:
|
|
63
|
-
|
|
64
|
-
a. **Mail observations**:
|
|
65
|
-
`GET /api/observations?pending=true&source_prefix=gmail:,outlook_mail:&limit=30`.
|
|
66
|
-
Classify each per the `mail` skill's category taxonomy. Drop any
|
|
67
|
-
whose day-type focus is `off`. When `summary_text` is NULL (the
|
|
68
|
-
async summarizer has not drained yet) fall back to a one-line
|
|
69
|
-
snippet from `payload.raw` (subject + from). Mail data arrives
|
|
70
|
-
here regardless of integration mode — the pre-pass partial
|
|
71
|
-
handled the direct / delegated-same / delegated-cross / native
|
|
72
|
-
wire surface for you.
|
|
73
|
-
|
|
74
|
-
b. **Notion observations**:
|
|
75
|
-
`GET /api/observations?pending=true&source_prefix=notion:&limit=20`.
|
|
76
|
-
Use for project / decision context only. Do NOT graduate Notion
|
|
77
|
-
edits into User Tasks unless the user explicitly tagged the entry.
|
|
78
|
-
|
|
79
|
-
c. **Calendar context** is already injected as `<calendar_events_7d>`
|
|
80
|
-
(multi-provider) ahead of this prompt — reference the block
|
|
81
|
-
directly in Step 6 (today.md generation). Mode-aware shape:
|
|
82
|
-
direct providers carry inline events; non-direct providers
|
|
83
|
-
(delegated / native) carry a hint pointing at
|
|
84
|
-
`/api/observations?source_prefix=google_calendar:,outlook_calendar:`
|
|
85
|
-
because the pre-pass already POSTed events there. Read the
|
|
86
|
-
observations table verbatim for non-direct providers — do NOT
|
|
87
|
-
re-drive the connector yourself.
|
|
88
|
-
|
|
89
|
-
Skip the entire step when no integrations are active and no mail /
|
|
90
|
-
notion observations are pending.
|
|
91
|
-
4. Source-of-Truth tasks: read `<management_rules>` ## Source of Truth →
|
|
92
|
-
Tasks, call the matching endpoint, drop filtered-off items before merge.
|
|
93
|
-
Skip if no external source is configured.
|
|
94
|
-
5. Roadmap ## Agent Action Plan — process items dated today or overdue
|
|
95
|
-
(not marked ✓). Drop items whose category focus is off, then:
|
|
96
|
-
- `[notify]` → `POST /api/schedule` + one row in `today.md` ## Agent Plan
|
|
97
|
-
- `[today]` → collect for `today.md` ## User Tasks
|
|
98
|
-
- `[check]` → `POST /api/schedule` (check-in) + one row in ## Agent Plan
|
|
99
|
-
- If a roadmap row includes `[provisional ...]`, copy that tag and
|
|
100
|
-
its meaning into the scheduled task `description` so
|
|
101
|
-
`scheduled.task.md` frames the first contact as a confirmation
|
|
102
|
-
question, not a directive.
|
|
103
|
-
- Mark processed roadmap rows complete via `PATCH /api/context/roadmap`,
|
|
104
|
-
`section=agent_action_plan`, `mode=replace`, rewriting the exact
|
|
105
|
-
row from `- YYYY-MM-DD [tag]: ...` to
|
|
106
|
-
`- ✓ completed <today>: YYYY-MM-DD [tag]: ...`. Keep the entry ID
|
|
107
|
-
marker and all existing completed rows byte-for-byte.
|
|
108
|
-
Then generate **look-ahead entries** for tomorrow → +3 days by cross-
|
|
109
|
-
referencing unprocessed roadmap items against `<calendar_events_7d>`.
|
|
110
|
-
These go into `today.md` ## Agent Notes using the skill's "Agent Notes
|
|
111
|
-
flavor 1: Look-ahead checklist" format (`- [ ] (HIGH/MID/LOW) ...`).
|
|
112
|
-
Skip this step entirely if no today-items and no look-ahead items exist.
|
|
113
|
-
|
|
114
|
-
### Step 3 — Review overnight user-originated observations
|
|
115
|
-
6. Call `GET /api/observations?pending=true&actor=user` (observations
|
|
116
|
-
skill). This is the **user-actor** complement to Step 2 — mail / notion
|
|
117
|
-
rows posted by the pre-pass / partials carry `actor=agent` and have
|
|
118
|
-
already been folded in. Step 3 picks up anything the user themselves
|
|
119
|
-
changed overnight (Obsidian edits, manual file drops, git commits)
|
|
120
|
-
that the daemon recorded under `actor=user`. Fold only meaningful
|
|
121
|
-
changes into the `today.md` draft you're building, respecting the
|
|
122
|
-
day-type filter.
|
|
123
|
-
|
|
124
|
-
### Step 4 — Inbox triage (B-007 §5.9 Q5 case A)
|
|
125
|
-
7. `GET /api/context/list/inbox` to enumerate pasted memos. For each file:
|
|
126
|
-
- `GET /api/context/inbox/<file>` to read the body, then classify:
|
|
127
|
-
**project**, **user**, **memo**, **task**.
|
|
128
|
-
- Integrate into the right target:
|
|
129
|
-
- existing project → append to `projects/<slug>.md` (notify tier).
|
|
130
|
-
- new-project shape → DM to confirm *"create project `<slug>`?"* and
|
|
131
|
-
wait for reply before creating the file.
|
|
132
|
-
- New `projects/<slug>.md` files must include YAML frontmatter: `type: project`, `owner: shared`, `updated: YYYY-MM-DD`, then an H1.
|
|
133
|
-
- user dictionary (people / health / goals / …) → append to the
|
|
134
|
-
matching `user/<area>.md`.
|
|
135
|
-
- date-bound memo → summarize into `today.md` ## Agent Notes.
|
|
136
|
-
- unclassifiable → DM the user an excerpt asking what to do; leave
|
|
137
|
-
the file in `inbox/` for next pass.
|
|
138
|
-
- After integration, move the original: (a) `PUT /api/context/agent/scratch/inbox-YYYY-MM-DD-<orig-slug>.md` with the original body, then (b) `DELETE /api/context/inbox/<file>` to remove the source. The 30-day retention on `agent/scratch/` is a convention for now — no sweeper exists yet.
|
|
139
|
-
- **High-risk triggers — DM for confirmation before writing:**
|
|
140
|
-
new project creation, wholesale overwrite of `user/profile.md`,
|
|
141
|
-
financial or health data with a numeric impact. The agent's own
|
|
142
|
-
judgment is the gate — call `POST /api/notify` with the
|
|
143
|
-
proposed change and wait for confirmation; don't auto-write.
|
|
144
|
-
- **Hard stop (never write)** — if the memo contains anything that
|
|
145
|
-
looks like a credential, password, API key, or private token, do
|
|
146
|
-
NOT write it to any context file. Log one line to ## Agent Log
|
|
147
|
-
(`- HH:MM [inbox] skipped <file>: secret suspected`), leave the
|
|
148
|
-
source file in `inbox/` for the user to handle, and move on. This
|
|
149
|
-
overrides the "DM then proceed" path above — see _safety.md.
|
|
150
|
-
|
|
151
|
-
### Step 5 — Daily journal synthesis (skipped on first-run flow)
|
|
152
|
-
8. Synthesize yesterday's journal from the data you already have:
|
|
153
|
-
- `<yesterday_agent_actions>` — previous agent-day execution rows from
|
|
154
|
-
SQLite. Use these for authoritative timing / result counts.
|
|
155
|
-
- `<yesterday_messages>` — previous agent-day non-system messages from
|
|
156
|
-
SQLite. Use these for conversations that never made it into
|
|
157
|
-
`yesterday.md`.
|
|
158
|
-
- `<yesterday_dm_conversation_log>` — rolling DM summaries recorded in
|
|
159
|
-
SQLite; useful when many message rows collapse into one thread.
|
|
160
|
-
- `<yesterday>` — User Schedule, User Tasks, Agent Plan, Agent Log,
|
|
161
|
-
Handoff sections are the primary source. The `## Agent Log` line
|
|
162
|
-
entries are authoritative for what the agent did; `## User Schedule`
|
|
163
|
-
for what was planned; conversations you handled yesterday surface
|
|
164
|
-
through Agent Log entries the agent wrote at the time.
|
|
165
|
-
- Step 4 inbox triage outcomes — in-memory from this very run.
|
|
166
|
-
- `<calendar_events_7d>` — reconcile against yesterday's column for
|
|
167
|
-
attended/skipped flags on the Schedule section.
|
|
168
|
-
If SQLite tags disagree with `yesterday.md`, prefer SQLite for counts,
|
|
169
|
-
timing, and whether an interaction/action happened at all; prefer
|
|
170
|
-
`yesterday.md` for curated phrasing already shown to the user.
|
|
171
|
-
Compose `daily/YYYY-MM-DD.md` (YYYY-MM-DD = yesterday's agent-day
|
|
172
|
-
date) following the **`Daily journal format spec`** policy block above.
|
|
173
|
-
- Output language: follow `<output_language_policy>` (Policy B —
|
|
174
|
-
skeleton H2 headers stay English; body prose in
|
|
175
|
-
`<settings primary_language>`). Keep technical terms in their
|
|
176
|
-
original form.
|
|
177
|
-
- When `<settings vault_mode>` is `obsidian`, render project / people
|
|
178
|
-
references as `[[wikilink]]`s resolving to `projects/<slug>.md` or
|
|
179
|
-
`user/people.md#...`. When `plain`, write plain text only.
|
|
180
|
-
- Apply redaction from the `Redaction patterns` and `Journal export
|
|
181
|
-
rules` policy blocks above.
|
|
182
|
-
- Include frontmatter fields `date`, `weekday`, `type: daily`, `owner: agent`, `updated`,
|
|
183
|
-
`agent_generated: true`, `agent_last_synced_at`, `content_hash`,
|
|
184
|
-
`projects`, `people`, `tags`, `calendar_events`, `messages_handled`.
|
|
185
|
-
If the API rejects unknown fields, write the ones it accepts and
|
|
186
|
-
log the gap in `agent/journal.md` (Step 9).
|
|
187
|
-
- If `<yesterday>` frontmatter carries `no_journal_export: true`,
|
|
188
|
-
write the placeholder `[Skipped by user request]` as body and still
|
|
189
|
-
populate required frontmatter fields.
|
|
190
|
-
- Conflict handling: first `GET /api/context/daily/YYYY-MM-DD.md`.
|
|
191
|
-
- 404 → `PUT /api/context/daily/YYYY-MM-DD.md` with the full body.
|
|
192
|
-
- 200 → the user (or a prior run) already wrote this date. Do **not**
|
|
193
|
-
PUT-overwrite. Instead `PATCH /api/context/daily/YYYY-MM-DD.md`
|
|
194
|
-
with `mode=append_to_file` and a new section
|
|
195
|
-
`## Agent revision — YYYY-MM-DDTHH:MM:SS` whose body is the
|
|
196
|
-
synthesized journal. B-006 content-hash protection.
|
|
197
|
-
|
|
198
|
-
### Step 6 — Generate new today.md (PUT full replace)
|
|
199
|
-
9. Follow the context skill "Structure overview", "Entry formats", and
|
|
200
|
-
"Required sections for full replace" sections for the exact schema.
|
|
201
|
-
The H1 (line 1) MUST be `# <current_agent_day.date> (<current_agent_day.weekday>)`
|
|
202
|
-
exactly — the daemon rejects mismatches with 422. No YAML frontmatter
|
|
203
|
-
on today.md. Agent Plan rows MUST match
|
|
204
|
-
`- [ ] HH:MM <action> [work|study|personal|home] →<DM|notify|check-in|wake>`;
|
|
205
|
-
any other category or trigger keyword is rejected and forces a retry
|
|
206
|
-
on Sonnet.
|
|
207
|
-
Source → section mapping:
|
|
208
|
-
- ## User Schedule ← `<calendar_events_7d>` (filtered). Write
|
|
209
|
-
`- (calendar unavailable)` when the block has been replaced by
|
|
210
|
-
`<calendar_status>Calendar service not available...</calendar_status>`
|
|
211
|
-
(no active provider) or when every `<provider>` sub-block's
|
|
212
|
-
directive fetch failed for this run.
|
|
213
|
-
- ## User Tasks ← Step 1 handoff Tomorrow + Step 2 email actionables
|
|
214
|
-
+ SoT tasks + roadmap `[today]`. Use `<active_projects>` for context.
|
|
215
|
-
- ## Agent Plan ← Step 2 `[notify]`/`[check]` rows plus any
|
|
216
|
-
proactive reminders you add (meeting pre-briefs, deadline nudges).
|
|
217
|
-
Every row will be registered in Step 7 — the Agent Plan contract is
|
|
218
|
-
defined in the skill's "User Tasks vs Agent Plan" section.
|
|
219
|
-
- ## Agent Notes ← Step 2 look-ahead items + date-bound memos folded
|
|
220
|
-
from Step 4 inbox triage.
|
|
221
|
-
- ## Agent Log ← initialize with
|
|
222
|
-
`- HH:MM Morning Routine completed (day-type: …)`.
|
|
223
|
-
- ## Handoff ← Step 1 "Later" items, dropping past dates.
|
|
224
|
-
Write `- (none)` if empty.
|
|
225
|
-
10. Update `roadmap.md` only if a milestone completed or shifted today.
|
|
226
|
-
|
|
227
|
-
### Step 7 — Register schedule
|
|
228
|
-
11. Register every `## Agent Plan` row via `POST /api/schedule` (schedule skill owns the contract). This is the Agent Plan contract — every
|
|
229
|
-
`- [ ] HH:MM … [cat] → <trigger>` row must have exactly one matching
|
|
230
|
-
schedule entry.
|
|
231
|
-
> **Morning briefing scheduling moved.** The morning briefing is no
|
|
232
|
-
> longer registered here. It is a `recurring_schedules` row
|
|
233
|
-
> (`task_type='dm_session'`, `task_context.sub_flow='morning_briefing'`)
|
|
234
|
-
> created at setup completion and reconciled daily by the daemon. The
|
|
235
|
-
> firing session runs under the `conversational` profile via the
|
|
236
|
-
> `scheduled.dm.md` task-flow. See SCHEDULED-DM-IMPLEMENTATION-PLAN.md.
|
|
237
|
-
|
|
238
|
-
### Step 7.5 — Profile-interview queue (latent, two-phase)
|
|
239
|
-
|
|
240
|
-
Use the **user-interview** skill. This step has two phases — phase (a)
|
|
241
|
-
ALWAYS runs (it is what keeps today.md's ## Agent Notes mirror in sync
|
|
242
|
-
across day boundaries, since today.md is PUT-replaced fresh each
|
|
243
|
-
morning); phase (b) only runs when there is no open question.
|
|
244
|
-
|
|
245
|
-
#### Step 7.5a — Mirror existing latent entries to today.md (always)
|
|
246
|
-
|
|
247
|
-
GET `agent/profile-questions.md ## In Progress`. For every entry whose
|
|
248
|
-
state is `latent` (NOT `asked` — those have already been answered or
|
|
249
|
-
will be cleaned up by the sweep), append one line to `today.md`
|
|
250
|
-
`## Agent Notes` using the **today** skill's "Latent profile question"
|
|
251
|
-
Agent Notes flavor:
|
|
252
|
-
|
|
253
|
-
```
|
|
254
|
-
- Profile question (latent): <id> — wait for natural opportunity
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
This is the only writer of the `Profile question (latent):` line.
|
|
258
|
-
Without it, a row
|
|
259
|
-
that stays latent across multiple days disappears from today.md after
|
|
260
|
-
day 1's PUT-replace and the DM-handler / morning-briefing opportunity
|
|
261
|
-
checks lose their visible cue.
|
|
262
|
-
|
|
263
|
-
#### Step 7.5b — Pick a new question (conditional)
|
|
264
|
-
|
|
265
|
-
Skip phase (b) entirely if any of:
|
|
266
|
-
(a) `## In Progress` is non-empty (a prior latent / asked entry is
|
|
267
|
-
already open — we hold to the 1-question-at-a-time invariant).
|
|
268
|
-
(b) The user has not sent a DM in the last 24h (no point if they're
|
|
269
|
-
absent).
|
|
270
|
-
(c) Day-type focus for `[personal]` on line 2 of `<today>` is `off`.
|
|
271
|
-
(d) `## Pending` is empty.
|
|
272
|
-
|
|
273
|
-
Otherwise, walk Pending rows in priority order (HIGH → MID → LOW, then
|
|
274
|
-
file order). For each candidate:
|
|
275
|
-
- If the row carries `<!-- last_attempted=YYYY-MM-DD -->` within the
|
|
276
|
-
last 7 days, skip — cooldown.
|
|
277
|
-
- GET `/api/profile-questions/slot-filled?path=<target>§ion=<section?>&anchor=<anchor?>`
|
|
278
|
-
for the row. If `filled: true`, the slot was filled since the last
|
|
279
|
-
sweep — tick the row `[ ]` → `[x]` (read-rebuild + replace), append
|
|
280
|
-
`- [x] <today> → <id> (reconciled:morning)` to `## Answered`,
|
|
281
|
-
continue to the next candidate.
|
|
282
|
-
- Otherwise this is the chosen row. Stop walking.
|
|
283
|
-
|
|
284
|
-
If a row was chosen:
|
|
285
|
-
|
|
286
|
-
1. PATCH `agent/profile-questions.md ## In Progress` (read-rebuild +
|
|
287
|
-
replace) — add a single entry. The `since=<today>` field is
|
|
288
|
-
load-bearing for the evening sweep's 3-day fallback computation:
|
|
289
|
-
```
|
|
290
|
-
- <id> :: state=latent :: since=<today>
|
|
291
|
-
```
|
|
292
|
-
2. PATCH `today.md ## Agent Notes` (mode=append) — same flavor as
|
|
293
|
-
phase (a):
|
|
294
|
-
```
|
|
295
|
-
- Profile question (latent): <id> — wait for natural opportunity
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
**Do NOT register a `POST /api/schedule` for this row.** Latent rows
|
|
299
|
-
are NOT scheduled DMs — they wait for a natural opportunity (DM topic
|
|
300
|
-
match or morning briefing piggyback). The fallback DM path is owned by
|
|
301
|
-
the evening sweep (Operation 5B), not the morning routine.
|
|
302
|
-
|
|
303
|
-
### Step 8 — Extension checks from routines/morning.md
|
|
304
|
-
12. The `Morning routine checks` policy block above is the user-editable
|
|
305
|
-
extension surface. Execute any check listed there that is **not
|
|
306
|
-
already covered by Steps 1-7**. User-added entries typically carry an
|
|
307
|
-
`**Added: YYYY-MM-DD by user via DM**` line — those are your target.
|
|
308
|
-
|
|
309
|
-
### Step 9 — Log to agent/journal.md (English, always)
|
|
310
|
-
13. Append a one-paragraph English summary to `agent/journal.md` via
|
|
311
|
-
`PATCH /api/context/agent/journal` with `mode=append_to_file` (this
|
|
312
|
-
is the only append mode that takes no `section` argument — it's
|
|
313
|
-
designed for append-only journals). Use this shape:
|
|
314
|
-
```
|
|
315
|
-
## YYYY-MM-DD morning routine
|
|
316
|
-
- Day-type: <weekday / weekend / focus / …>
|
|
317
|
-
- Journal: daily/YYYY-MM-DD.md (<N lines, M projects referenced>)
|
|
318
|
-
- Inbox: <N files triaged, M moved to scratch, K DM-confirmations sent>
|
|
319
|
-
- Checks from routines/morning.md: <list any user-added ones executed>
|
|
320
|
-
- Anomalies / skipped steps: <short notes or "none">
|
|
321
|
-
```
|
|
322
|
-
<output_language>english_only — Policy A surface (agent journal, parsed log); `<output_language_policy>` carves this out explicitly.</output_language>
|