@aitne-sh/aitne 0.1.0
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/LICENSE +21 -0
- package/README.md +464 -0
- package/agent-assets/agent-profiles/_safety.md +26 -0
- package/agent-assets/agent-profiles/conversational.md +33 -0
- package/agent-assets/agent-profiles/docs-qa.md +24 -0
- package/agent-assets/agent-profiles/observer.md +28 -0
- package/agent-assets/agent-profiles/profile-importer.md +63 -0
- package/agent-assets/agent-profiles/proxy.md +28 -0
- package/agent-assets/agent-profiles/routine.md +16 -0
- package/agent-assets/agent-profiles/task.md +18 -0
- package/agent-assets/docs/concepts/agent-day.md +88 -0
- package/agent-assets/docs/concepts/auth-health.md +75 -0
- package/agent-assets/docs/concepts/backends-and-tiers.md +126 -0
- package/agent-assets/docs/concepts/costs-and-quotas.md +103 -0
- package/agent-assets/docs/concepts/delegated-mode.md +223 -0
- package/agent-assets/docs/concepts/memory-model.md +118 -0
- package/agent-assets/docs/concepts/observations.md +80 -0
- package/agent-assets/docs/concepts/process-keys.md +89 -0
- package/agent-assets/docs/concepts/routines.md +108 -0
- package/agent-assets/docs/concepts/safety-and-execution.md +109 -0
- package/agent-assets/docs/concepts/safety-model.md +279 -0
- package/agent-assets/docs/concepts/skills.md +100 -0
- package/agent-assets/docs/features/integrations/calendar.md +92 -0
- package/agent-assets/docs/features/integrations/git.md +95 -0
- package/agent-assets/docs/features/integrations/github.md +170 -0
- package/agent-assets/docs/features/integrations/mail.md +106 -0
- package/agent-assets/docs/features/integrations/notion.md +69 -0
- package/agent-assets/docs/features/integrations/obsidian.md +71 -0
- package/agent-assets/docs/features/lifestyle/git.md +178 -0
- package/agent-assets/docs/features/lifestyle/reading.md +93 -0
- package/agent-assets/docs/features/lifestyle/receipts.md +71 -0
- package/agent-assets/docs/features/lifestyle/travel-bookings.md +44 -0
- package/agent-assets/docs/features/lifestyle/travel-time.md +52 -0
- package/agent-assets/docs/features/memory-files/agent-journal.md +105 -0
- package/agent-assets/docs/features/memory-files/projects.md +56 -0
- package/agent-assets/docs/features/memory-files/roadmap.md +61 -0
- package/agent-assets/docs/features/memory-files/schedule.md +112 -0
- package/agent-assets/docs/features/memory-files/today.md +73 -0
- package/agent-assets/docs/features/memory-files/user-profile.md +81 -0
- package/agent-assets/docs/features/messaging/dashboard-chat.md +93 -0
- package/agent-assets/docs/features/messaging/discord.md +50 -0
- package/agent-assets/docs/features/messaging/overview.md +111 -0
- package/agent-assets/docs/features/messaging/pairing-and-magic-phrase.md +69 -0
- package/agent-assets/docs/features/messaging/slack.md +51 -0
- package/agent-assets/docs/features/messaging/telegram.md +63 -0
- package/agent-assets/docs/features/messaging/whatsapp.md +48 -0
- package/agent-assets/docs/features/operations/activity-and-conversations.md +105 -0
- package/agent-assets/docs/features/operations/approvals.md +58 -0
- package/agent-assets/docs/features/operations/backend-routing.md +62 -0
- package/agent-assets/docs/features/operations/cost-tracking.md +59 -0
- package/agent-assets/docs/features/operations/notifications.md +69 -0
- package/agent-assets/docs/features/operations/quiet-hours.md +106 -0
- package/agent-assets/docs/features/operations/schedule-approaching.md +60 -0
- package/agent-assets/docs/features/routines/custom-routines.md +101 -0
- package/agent-assets/docs/features/routines/evening-review.md +81 -0
- package/agent-assets/docs/features/routines/hourly-check.md +85 -0
- package/agent-assets/docs/features/routines/monthly-review.md +65 -0
- package/agent-assets/docs/features/routines/morning-routine.md +123 -0
- package/agent-assets/docs/features/routines/weekly-review.md +70 -0
- package/agent-assets/docs/getting-started/01-what-is-this.md +192 -0
- package/agent-assets/docs/getting-started/02-first-steps.md +80 -0
- package/agent-assets/docs/getting-started/03-what-can-this-do.md +110 -0
- package/agent-assets/docs/getting-started/04-first-day.md +287 -0
- package/agent-assets/docs/glossary.md +116 -0
- package/agent-assets/docs/guides/add-a-custom-routine.md +71 -0
- package/agent-assets/docs/guides/backup-and-restore.md +54 -0
- package/agent-assets/docs/guides/change-which-model-handles-x.md +47 -0
- package/agent-assets/docs/guides/connect-a-new-mail-account.md +59 -0
- package/agent-assets/docs/guides/import-knowledge-file.md +275 -0
- package/agent-assets/docs/guides/install-and-run.md +72 -0
- package/agent-assets/docs/guides/migrate-machines.md +52 -0
- package/agent-assets/docs/guides/pause-the-agent.md +65 -0
- package/agent-assets/docs/guides/reinstall-cleanly.md +52 -0
- package/agent-assets/docs/guides/setup-wizard.md +107 -0
- package/agent-assets/docs/guides/switch-default-backend.md +60 -0
- package/agent-assets/docs/reference/api.md +51 -0
- package/agent-assets/docs/reference/cli-commands.md +121 -0
- package/agent-assets/docs/reference/config.md +74 -0
- package/agent-assets/docs/reference/disallowed-tools.md +76 -0
- package/agent-assets/docs/reference/keyboard-shortcuts.md +39 -0
- package/agent-assets/docs/reference/process-keys.md +59 -0
- package/agent-assets/docs/reference/skills.md +50 -0
- package/agent-assets/docs/troubleshooting/auth-failed.md +57 -0
- package/agent-assets/docs/troubleshooting/dashboard-shows-degraded.md +55 -0
- package/agent-assets/docs/troubleshooting/fallback-keeps-firing.md +54 -0
- package/agent-assets/docs/troubleshooting/messaging-not-pairing.md +53 -0
- package/agent-assets/docs/troubleshooting/morning-routine-didnt-run.md +75 -0
- package/agent-assets/docs/troubleshooting/observation-not-detected.md +57 -0
- package/agent-assets/docs/troubleshooting/quota-exhausted.md +57 -0
- package/agent-assets/optimizer-skills/drift-analysis/SKILL.md +75 -0
- package/agent-assets/optimizer-skills/knowledge-map/SKILL.md +71 -0
- package/agent-assets/optimizer-skills/skill-curation/SKILL.md +108 -0
- package/agent-assets/project-doc-templates/git-repo.md +21 -0
- package/agent-assets/project-doc-templates/project.md +38 -0
- package/agent-assets/skills/attach/SKILL.md +104 -0
- package/agent-assets/skills/context/SKILL.md +257 -0
- package/agent-assets/skills/context/curation.json +37 -0
- package/agent-assets/skills/context/seeds/file-responsibilities.seed.json +13 -0
- package/agent-assets/skills/context/seeds/frontmatter-requirements.seed.json +40 -0
- package/agent-assets/skills/docs-search/SKILL.md +176 -0
- package/agent-assets/skills/external-services/SKILL.delegated.claude.md +369 -0
- package/agent-assets/skills/external-services/SKILL.delegated.codex.md +349 -0
- package/agent-assets/skills/external-services/SKILL.delegated.gemini.md +347 -0
- package/agent-assets/skills/external-services/SKILL.md +371 -0
- package/agent-assets/skills/mail/SKILL.delegated.claude.md +284 -0
- package/agent-assets/skills/mail/SKILL.delegated.codex.md +261 -0
- package/agent-assets/skills/mail/SKILL.delegated.gemini.md +255 -0
- package/agent-assets/skills/mail/SKILL.md +313 -0
- package/agent-assets/skills/mail/references/errors.md +17 -0
- package/agent-assets/skills/mail/references/providers.md +40 -0
- package/agent-assets/skills/mail/references/query-grammar.md +24 -0
- package/agent-assets/skills/management-policy/SKILL.md +307 -0
- package/agent-assets/skills/management-policy/curation.json +13 -0
- package/agent-assets/skills/management-policy/seeds/policy-file-shape.seed.json +16 -0
- package/agent-assets/skills/management-task-modify/SKILL.md +202 -0
- package/agent-assets/skills/management-task-register/SKILL.md +330 -0
- package/agent-assets/skills/management-task-stop/SKILL.md +166 -0
- package/agent-assets/skills/notify/SKILL.md +196 -0
- package/agent-assets/skills/notion/SKILL.delegated.claude.md +254 -0
- package/agent-assets/skills/notion/SKILL.delegated.codex.md +195 -0
- package/agent-assets/skills/notion/SKILL.delegated.gemini.md +194 -0
- package/agent-assets/skills/notion/SKILL.md +86 -0
- package/agent-assets/skills/observations/SKILL.md +234 -0
- package/agent-assets/skills/observations/curation.json +13 -0
- package/agent-assets/skills/observations/seeds/source-namespacing.seed.json +20 -0
- package/agent-assets/skills/project-doc/SKILL.md +86 -0
- package/agent-assets/skills/project-doc/curation.json +21 -0
- package/agent-assets/skills/project-doc/seeds/project-shape.seed.json +25 -0
- package/agent-assets/skills/project-doc/seeds/slug-grammar.seed.json +20 -0
- package/agent-assets/skills/reading/SKILL.md +198 -0
- package/agent-assets/skills/reading/references/reading-taste.md +197 -0
- package/agent-assets/skills/receipts/SKILL.md +134 -0
- package/agent-assets/skills/roadmap/SKILL.md +276 -0
- package/agent-assets/skills/roadmap/curation.json +13 -0
- package/agent-assets/skills/roadmap/references/horizon-tags.md +40 -0
- package/agent-assets/skills/roadmap/references/preparation-timeline.md +47 -0
- package/agent-assets/skills/roadmap/seeds/entry-types.seed.json +16 -0
- package/agent-assets/skills/schedule/SKILL.md +228 -0
- package/agent-assets/skills/scheduled-managed-task/SKILL.md +392 -0
- package/agent-assets/skills/today/SKILL.md +198 -0
- package/agent-assets/skills/today/curation.json +21 -0
- package/agent-assets/skills/today/seeds/agent-notes-flavors.seed.json +17 -0
- package/agent-assets/skills/today/seeds/section-shape.seed.json +17 -0
- package/agent-assets/skills/travel/SKILL.md +132 -0
- package/agent-assets/skills/travel-time/SKILL.md +149 -0
- package/agent-assets/skills/user-interview/SKILL.md +323 -0
- package/agent-assets/skills/user-interview/references/sweep-and-fallback.md +94 -0
- package/agent-assets/skills/user-profile/SKILL.md +210 -0
- package/agent-assets/skills/user-profile/curation.json +29 -0
- package/agent-assets/skills/user-profile/seeds/learned-context-format.seed.json +14 -0
- package/agent-assets/skills/user-profile/seeds/routing-table.seed.json +53 -0
- package/agent-assets/skills/user-profile/seeds/topic-files.seed.json +27 -0
- package/agent-assets/task-flows/dashboard.docs_qa.md +43 -0
- package/agent-assets/task-flows/default.md +11 -0
- package/agent-assets/task-flows/git.branch.created.md +25 -0
- package/agent-assets/task-flows/git.lifecycle.poll.md +52 -0
- package/agent-assets/task-flows/git.local_ahead.stale.md +34 -0
- package/agent-assets/task-flows/git.merge_to_default.md +30 -0
- package/agent-assets/task-flows/git.project.refresh_architecture.md +100 -0
- package/agent-assets/task-flows/git.project.retemplate.md +73 -0
- package/agent-assets/task-flows/git.push.detected.md +32 -0
- package/agent-assets/task-flows/git.push.force_pushed.md +36 -0
- package/agent-assets/task-flows/git.tag.created.md +24 -0
- package/agent-assets/task-flows/github.assigned.md +43 -0
- package/agent-assets/task-flows/github.pull_request.review_requested.md +57 -0
- package/agent-assets/task-flows/github.security_alert.md +45 -0
- package/agent-assets/task-flows/github.workflow_run.failed.md +57 -0
- package/agent-assets/task-flows/knowledge.import.md +161 -0
- package/agent-assets/task-flows/message.received.dm.md +142 -0
- package/agent-assets/task-flows/message.received.dm_first.md +117 -0
- package/agent-assets/task-flows/message.received.md +14 -0
- package/agent-assets/task-flows/routine.custom.md +38 -0
- package/agent-assets/task-flows/routine.evening_review.md +323 -0
- package/agent-assets/task-flows/routine.hourly_check.delegated.claude.md +405 -0
- package/agent-assets/task-flows/routine.hourly_check.delegated.codex.md +400 -0
- package/agent-assets/task-flows/routine.hourly_check.delegated.gemini.md +404 -0
- package/agent-assets/task-flows/routine.hourly_check.md +184 -0
- package/agent-assets/task-flows/routine.hourly_check.triage.md +93 -0
- package/agent-assets/task-flows/routine.monthly_review.md +250 -0
- package/agent-assets/task-flows/routine.morning_routine.md +300 -0
- package/agent-assets/task-flows/routine.morning_routine_initial.md +184 -0
- package/agent-assets/task-flows/routine.roadmap_refresh.md +275 -0
- package/agent-assets/task-flows/routine.today_refresh.md +172 -0
- package/agent-assets/task-flows/routine.user_profile_sweep.md +242 -0
- package/agent-assets/task-flows/routine.weekly_review.md +247 -0
- package/agent-assets/task-flows/schedule.approaching.md +124 -0
- package/agent-assets/task-flows/scheduled.dm.md +391 -0
- package/agent-assets/task-flows/scheduled.task.md +141 -0
- package/agent-assets/task-flows/setup.initial.md +277 -0
- package/agent-assets/task-flows/setup.update.md +53 -0
- package/agent-assets/templates/README.md +85 -0
- package/agent-assets/templates/_index.md +39 -0
- package/agent-assets/templates/_manifest.json +103 -0
- package/agent-assets/templates/agent/journal.md +10 -0
- package/agent-assets/templates/agent/profile-questions.md +74 -0
- package/agent-assets/templates/context-index.md +42 -0
- package/agent-assets/templates/dossiers/_index.md +22 -0
- package/agent-assets/templates/dossiers/evening.md +23 -0
- package/agent-assets/templates/dossiers/hourly.md +23 -0
- package/agent-assets/templates/dossiers/monthly.md +23 -0
- package/agent-assets/templates/dossiers/morning.md +23 -0
- package/agent-assets/templates/dossiers/roadmap.md +23 -0
- package/agent-assets/templates/dossiers/weekly.md +23 -0
- package/agent-assets/templates/projects/_active.base +14 -0
- package/agent-assets/templates/projects/_index.md +29 -0
- package/agent-assets/templates/roadmap.md +15 -0
- package/agent-assets/templates/routines/_index.md +20 -0
- package/agent-assets/templates/routines/evening.md +22 -0
- package/agent-assets/templates/routines/hourly.md +30 -0
- package/agent-assets/templates/routines/monthly.md +25 -0
- package/agent-assets/templates/routines/morning.md +26 -0
- package/agent-assets/templates/routines/weekly.md +23 -0
- package/agent-assets/templates/rules/_index.md +19 -0
- package/agent-assets/templates/rules/journal-export.md +41 -0
- package/agent-assets/templates/rules/journal-format.md +61 -0
- package/agent-assets/templates/rules/management.md +48 -0
- package/agent-assets/templates/rules/mcp.md +40 -0
- package/agent-assets/templates/rules/policies/_index.md +22 -0
- package/agent-assets/templates/rules/redaction.md +30 -0
- package/agent-assets/templates/today.md +13 -0
- package/agent-assets/templates/user/_index.md +16 -0
- package/agent-assets/templates/user/expertise.md +7 -0
- package/agent-assets/templates/user/goals.md +7 -0
- package/agent-assets/templates/user/people.md +7 -0
- package/agent-assets/templates/user/personal.md +7 -0
- package/agent-assets/templates/user/profile.md +28 -0
- package/agent-assets/templates/user/work.md +7 -0
- package/bin/aitne.mjs +1096 -0
- package/package.json +78 -0
- package/personal-agent.mjs +39 -0
- package/scripts/browser.mjs +99 -0
- package/scripts/check-redaction-coverage.mjs +109 -0
- package/scripts/commands/audit.mjs +309 -0
- package/scripts/commands/doctor.mjs +437 -0
- package/scripts/commands/open.mjs +40 -0
- package/scripts/commands/setup.mjs +21 -0
- package/scripts/commands/uninstall.mjs +114 -0
- package/scripts/commands/update.mjs +96 -0
- package/scripts/commands/version.mjs +62 -0
- package/scripts/commands.md +0 -0
- package/scripts/lib/sqlite-loader.mjs +49 -0
- package/scripts/message-discipline-digest.mjs +535 -0
- package/scripts/poc/google-connector-inheritance/REPORT.md +197 -0
- package/scripts/poc/google-connector-inheritance/claude-sdk-probe.mjs +79 -0
- package/scripts/remint-roadmap-ids.mjs +257 -0
- package/scripts/rm-paths.mjs +22 -0
- package/scripts/run-node.mjs +223 -0
- package/scripts/smoke-obsidian-api.mjs +166 -0
- package/scripts/start.mjs +160 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: roadmap
|
|
3
|
+
description: Load when writing to roadmap.md — roadmap refresh, morning/evening routines, DMs with long-horizon intent, or scheduled tasks. Owns the section schema, entry taxonomy, Preparation Timeline rules, destination extraction, and the roadmap write lock.
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Bash(curl *)
|
|
6
|
+
- Read
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# roadmap.md Guide
|
|
10
|
+
|
|
11
|
+
`roadmap.md` is the single source of truth for **long-horizon user
|
|
12
|
+
intent** — everything that does not belong in `today.md`. It aggregates
|
|
13
|
+
Calendar events, pending `agent_schedule` rows, DM-captured intent,
|
|
14
|
+
mail-derived bookings, reading goals, and observations; Morning Routine
|
|
15
|
+
consumes it to shape `today.md`.
|
|
16
|
+
|
|
17
|
+
## Section schema
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
# Roadmap
|
|
21
|
+
> Last synced: YYYY-MM-DD
|
|
22
|
+
|
|
23
|
+
## Annual Goals (user-authored — never rewrite autonomously)
|
|
24
|
+
## Quarterly Focus (user-authored — never rewrite autonomously)
|
|
25
|
+
## Long-term Plans (agent-writable, undated OK)
|
|
26
|
+
## Agent Action Plan (agent-writable, dated entries)
|
|
27
|
+
## Recurring (preserved verbatim)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
- Preserve user-authored sections (`## Annual Goals`, `## Quarterly
|
|
31
|
+
Focus`, `## Recurring`) verbatim.
|
|
32
|
+
- `## Agent Action Plan` is rebuilt by entry ID during refresh. Do not
|
|
33
|
+
regenerate it as anonymous text: preserve stable IDs and completed
|
|
34
|
+
Preparation Timeline rows.
|
|
35
|
+
- `## Long-term Plans` is cumulative: append / per-entry edit; **never
|
|
36
|
+
clear it during refresh**.
|
|
37
|
+
- The `> Last synced` header line carries the audit-timestamp role.
|
|
38
|
+
Always bump it on PUT, even on no-op runs.
|
|
39
|
+
|
|
40
|
+
## Decision tree — where does this item go?
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
Is the item actionable and does it need agent-side preparation or awareness?
|
|
44
|
+
├── No → don't write to roadmap
|
|
45
|
+
│ (short-lived → today.md; preference → user-profile)
|
|
46
|
+
└── Yes
|
|
47
|
+
├── Is it an agent_schedule row?
|
|
48
|
+
│ ├── task_context.importance is "transient" or "low" → don't write to roadmap
|
|
49
|
+
│ ├── task_context.importance === "strategic" → Agent Action Plan "Scheduled:" entry
|
|
50
|
+
│ ├── scheduled_for <= now + 7d → today.md Agent Plan only
|
|
51
|
+
│ └── normal/unspecified beyond 7d → Agent Action Plan "Scheduled:" entry
|
|
52
|
+
├── Does it have a specific event date?
|
|
53
|
+
│ ├── Yes + within 48h → today.md only, not roadmap
|
|
54
|
+
│ ├── Yes + >48h away → Agent Action Plan event entry
|
|
55
|
+
│ │ with Preparation Timeline
|
|
56
|
+
│ └── No → Long-term Plans (single line,
|
|
57
|
+
│ dateable later)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Entry shapes
|
|
61
|
+
|
|
62
|
+
### Event entry (calendar / travel-bookings / DM-dated)
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
### YYYY-MM-DD ~ MM-DD: <event title> <!-- id: rm-YYYYMMDD-abcdef -->
|
|
66
|
+
Source: <Google Calendar | Travel Bookings | DM>
|
|
67
|
+
Destination: <resolved location or "unknown — pending check">
|
|
68
|
+
|
|
69
|
+
**Preparation Timeline:**
|
|
70
|
+
- YYYY-MM-DD [tag]: action description
|
|
71
|
+
- ...
|
|
72
|
+
|
|
73
|
+
**Agent Notes:**
|
|
74
|
+
- supplementary info
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Scheduled-task entry (`agent_schedule` rows)
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
### Scheduled: <description> (task #<id>) <!-- id: rm-YYYYMMDD-abcdef -->
|
|
81
|
+
Source: scheduled.task — wake-up YYYY-MM-DD HH:MM
|
|
82
|
+
Status: ⏳ pending | ▶ running | ✓ completed | ✗ failed
|
|
83
|
+
|
|
84
|
+
**Preparation Timeline:** (optional — only when the agent judges prep is useful)
|
|
85
|
+
- ...
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Long-term plan line
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
- [<horizon-tag>] <intent> — Source: <dm|mail|observation|reading|dashboard|manual> <YYYY-MM-DD> — Review: <YYYY-MM-DD|[noreview]> — ReviewCount: <0-3> <!-- id: rm-YYYYMMDD-abcdef -->
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Horizon-tag grammar (validated by the context API):
|
|
95
|
+
- `YYYY-MM` → month-granular
|
|
96
|
+
- `YYYY-Qn` → calendar quarter
|
|
97
|
+
- `YYYY spring|summer|autumn|winter`
|
|
98
|
+
- `undated` → no horizon yet
|
|
99
|
+
|
|
100
|
+
Examples:
|
|
101
|
+
- `- [2026-05] LA trip candidate — Source: dm 2026-04-19 — Review: 2026-04-20 — ReviewCount: 0 <!-- id: rm-20260419-a3f1c2 -->`
|
|
102
|
+
- `- [2026-Q3] US study prep — Source: dm 2026-04-19 — Review: 2026-05-17 — ReviewCount: 0 <!-- id: rm-20260419-b8e7d4 -->`
|
|
103
|
+
- `- [undated] Eventually learn Spanish — Source: dm 2026-04-19 — Review: [noreview] — ReviewCount: 3 <!-- id: rm-20260419-0d4c9a -->`
|
|
104
|
+
|
|
105
|
+
## Stable entry identity
|
|
106
|
+
|
|
107
|
+
Every `## Agent Action Plan` entry and every `## Long-term Plans` line
|
|
108
|
+
must carry a daemon-minted HTML comment ID:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
<!-- id: rm-YYYYMMDD-abcdef -->
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
- Format: `rm-YYYYMMDD-<6 lowercase hex>`.
|
|
115
|
+
- The `YYYYMMDD` segment is the entry creation date / Source date, not
|
|
116
|
+
the event date. Keep it stable when dates are refined.
|
|
117
|
+
- Do not invent IDs in prose. Before adding a new roadmap entry, call
|
|
118
|
+
`POST /api/context/roadmap/id`:
|
|
119
|
+
```bash
|
|
120
|
+
curl -s -X POST http://localhost:8321/api/context/roadmap/id \
|
|
121
|
+
-H 'Content-Type: application/json' \
|
|
122
|
+
-d '{"creationDate": "YYYY-MM-DD"}'
|
|
123
|
+
```
|
|
124
|
+
- If preserving or editing an existing entry, keep its ID byte-for-byte.
|
|
125
|
+
- When promoting a Long-term Plan into Agent Action Plan, transfer the
|
|
126
|
+
same ID to the new `###` heading and remove the original line.
|
|
127
|
+
- If a `roadmap_candidate` observation has
|
|
128
|
+
`payload.roadmap_entry_id`, treat that as the intended entry ID
|
|
129
|
+
before considering destination/date matching or minting a fresh ID.
|
|
130
|
+
- If a PUT/PATCH fails with duplicate-ID validation, re-GET roadmap,
|
|
131
|
+
mint a fresh ID for only the colliding new entry, and retry once.
|
|
132
|
+
|
|
133
|
+
## Long-term Plans review fields
|
|
134
|
+
|
|
135
|
+
{{> ref:horizon-tags }}
|
|
136
|
+
|
|
137
|
+
## Preparation Timeline taxonomy
|
|
138
|
+
|
|
139
|
+
{{> ref:preparation-timeline }}
|
|
140
|
+
|
|
141
|
+
## Destination extraction (travel-class entries)
|
|
142
|
+
|
|
143
|
+
1. `calendar.location` is non-empty and parseable → use it.
|
|
144
|
+
2. Else: title regex for a known city / country →
|
|
145
|
+
classify international vs. domestic.
|
|
146
|
+
3. Else: description body regex.
|
|
147
|
+
4. Else: destination = `"unknown — pending check"`, and add a
|
|
148
|
+
`[check] <event_date - 28d>: Confirm destination for <title>` line
|
|
149
|
+
to the Preparation Timeline.
|
|
150
|
+
|
|
151
|
+
## travel_bookings cross-check
|
|
152
|
+
|
|
153
|
+
Before generating a new entry or a `[check]` line for accommodation or
|
|
154
|
+
flights:
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
curl -s 'http://localhost:8321/api/travel-bookings/upcoming?limit=50'
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
If a matching booking exists, mark the corresponding prep line with the
|
|
161
|
+
completed-row grammar above and include the confirmation number in
|
|
162
|
+
Agent Notes.
|
|
163
|
+
|
|
164
|
+
## Long-horizon DM-intent detection
|
|
165
|
+
|
|
166
|
+
Referenced from `message.received.dm` and `message.received.dm_first`.
|
|
167
|
+
Identify user messages that describe a commitment or plan beyond the
|
|
168
|
+
current day so the DM handler can route them into roadmap.
|
|
169
|
+
|
|
170
|
+
**Signals (positive):**
|
|
171
|
+
- Explicit forward-looking verb + horizon phrase:
|
|
172
|
+
*"going to X next month"*, *"planning to do Y this summer"*,
|
|
173
|
+
*"want to Z this quarter"*
|
|
174
|
+
- Specific future date ≥ 48h out
|
|
175
|
+
- Concrete object (destination, deliverable, learning target,
|
|
176
|
+
reservation)
|
|
177
|
+
|
|
178
|
+
**Not signals:**
|
|
179
|
+
- Speculative language (*"maybe"*, *"someday"*, *"might"*, *"perhaps"*,
|
|
180
|
+
*"thinking about"*) without a concrete anchor
|
|
181
|
+
- Current-week commitments (those belong in `today.md`)
|
|
182
|
+
- Opinions, preferences, taste statements
|
|
183
|
+
(those belong in `user/*.md` via the `user-profile` skill)
|
|
184
|
+
|
|
185
|
+
**Routing after detection:**
|
|
186
|
+
- Dated ≥ 48h out → Agent Action Plan event entry (Preparation
|
|
187
|
+
Timeline grows once destination / details resolve).
|
|
188
|
+
- Undated horizon ("this summer", "this quarter") →
|
|
189
|
+
`## Long-term Plans` line with a horizon-tag.
|
|
190
|
+
- Ambiguous → keep in `agent-journal.md` as a candidate line and
|
|
191
|
+
surface via the next morning routine for user confirmation
|
|
192
|
+
(dry-run mode).
|
|
193
|
+
|
|
194
|
+
## Section auto-ensure PATCH recipe
|
|
195
|
+
|
|
196
|
+
Legacy roadmaps created before the `## Long-term Plans` section was
|
|
197
|
+
introduced may be missing it. Before the first PATCH to that section:
|
|
198
|
+
|
|
199
|
+
1. `curl -s http://localhost:8321/api/context/roadmap` and inspect the
|
|
200
|
+
body for `## Long-term Plans`.
|
|
201
|
+
2. If absent, insert it after `## Quarterly Focus`:
|
|
202
|
+
```bash
|
|
203
|
+
curl -s -X PATCH http://localhost:8321/api/context/roadmap \
|
|
204
|
+
-H 'Content-Type: application/json' \
|
|
205
|
+
-d '{"section": "quarterly_focus", "mode": "append", "content": "\n## Long-term Plans\n"}'
|
|
206
|
+
```
|
|
207
|
+
3. Then PATCH `long_term_plans` normally.
|
|
208
|
+
|
|
209
|
+
Full-file PUT writers (e.g. `routine.roadmap_refresh`) do not need this
|
|
210
|
+
recipe — they always emit the full section schema.
|
|
211
|
+
|
|
212
|
+
## Retention (RFC-D preview)
|
|
213
|
+
|
|
214
|
+
- **Agent Action Plan event entries** — kept while the event's header
|
|
215
|
+
date is within `[today - 7d, today + 180d]`. Older ✓'d entries roll
|
|
216
|
+
off into `daily/` history.
|
|
217
|
+
- **`Scheduled:` entries** — kept while the Wake-up date is within
|
|
218
|
+
`[today - 1d, today + 180d]`. On completion, Status flips to ✓ and
|
|
219
|
+
the entry persists one extra day for the journal.
|
|
220
|
+
- **Long-term Plans** — entries without date movement for 90 days are
|
|
221
|
+
marked `[stale]` by Evening Review. 180 days without user
|
|
222
|
+
confirmation → DM; no reply in 7 days → remove.
|
|
223
|
+
|
|
224
|
+
## Cross-request write lock
|
|
225
|
+
|
|
226
|
+
Roadmap writes serialize via an optional exclusive lock so a
|
|
227
|
+
mid-session refresh is not interleaved with a DM handler PATCH.
|
|
228
|
+
|
|
229
|
+
- If `<roadmap_write_lock_id>` is in your context, include
|
|
230
|
+
`X-Lock-Id: <roadmap_write_lock_id>` on every PUT / PATCH to
|
|
231
|
+
`/api/context/roadmap`.
|
|
232
|
+
- Dispatcher auto-acquires the lock for `routine.roadmap_refresh`.
|
|
233
|
+
- Flows that need to write roadmap outside that routine (DM handler,
|
|
234
|
+
evening sweeper) can acquire via
|
|
235
|
+
`POST /api/context/lock/roadmap` and release via
|
|
236
|
+
`DELETE /api/context/lock/roadmap` with `{ "lockId": "..." }`.
|
|
237
|
+
- If another session holds the lock, PUT / PATCH returns **409
|
|
238
|
+
`roadmap_write_lock_held`** — back off 30 s and retry up to 3 times.
|
|
239
|
+
|
|
240
|
+
## roadmap.md API
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# Read
|
|
244
|
+
curl -s http://localhost:8321/api/context/roadmap
|
|
245
|
+
|
|
246
|
+
# Mint a new stable entry id
|
|
247
|
+
curl -s -X POST http://localhost:8321/api/context/roadmap/id \
|
|
248
|
+
-H 'Content-Type: application/json' \
|
|
249
|
+
-H 'X-Lock-Id: <roadmap_write_lock_id>' \
|
|
250
|
+
-d '{"creationDate": "YYYY-MM-DD"}'
|
|
251
|
+
|
|
252
|
+
# Full replace (roadmap refresh — include X-Lock-Id if context provides one)
|
|
253
|
+
curl -s -X PUT http://localhost:8321/api/context/roadmap \
|
|
254
|
+
-H 'Content-Type: application/json' \
|
|
255
|
+
-H 'X-Lock-Id: <roadmap_write_lock_id>' \
|
|
256
|
+
-d '{"content": "# Roadmap\n..."}'
|
|
257
|
+
|
|
258
|
+
# Section PATCH
|
|
259
|
+
curl -s -X PATCH http://localhost:8321/api/context/roadmap \
|
|
260
|
+
-H 'Content-Type: application/json' \
|
|
261
|
+
-H 'X-Lock-Id: <roadmap_write_lock_id>' \
|
|
262
|
+
-d '{"section": "long_term_plans", "mode": "append", "content": "- [2026-Q3] ...\n"}'
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Snapshotting, mtime updates, and path validation are handled by the
|
|
266
|
+
context API — see the `context` skill for the full endpoint reference.
|
|
267
|
+
For roadmap writes, the API also validates ID uniqueness and runs a
|
|
268
|
+
transition guard: if an entry ID survives from previous → next content,
|
|
269
|
+
every previous `✓ completed ...` row for that ID must still exist
|
|
270
|
+
byte-for-byte. If an entry ID disappears entirely, removal is accepted
|
|
271
|
+
only when the retention window permits it or the operator bypass header
|
|
272
|
+
is used.
|
|
273
|
+
|
|
274
|
+
## Roadmap section schema (auto-curated)
|
|
275
|
+
|
|
276
|
+
<!-- CURATION:knowledge_layout id="entry-types" -->
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"sections": [
|
|
4
|
+
{
|
|
5
|
+
"id": "entry-types",
|
|
6
|
+
"kind": "knowledge_layout",
|
|
7
|
+
"anchor": "<!-- CURATION:knowledge_layout id=\"entry-types\" -->",
|
|
8
|
+
"human_label": "Roadmap section schema",
|
|
9
|
+
"description": "Required sections in roadmap.md and what each holds",
|
|
10
|
+
"scope_paths": ["roadmap.md"]
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
kind: reference
|
|
3
|
+
parent_skill: roadmap
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`Review:` is the date when Evening Review should re-evaluate whether the
|
|
7
|
+
line is ready to become an Agent Action Plan entry. Date math uses the
|
|
8
|
+
configured user timezone, not UTC midnight.
|
|
9
|
+
|
|
10
|
+
| Horizon tag | Anchor (earliest plausible start) | Default `Review:` |
|
|
11
|
+
|---|---:|---:|
|
|
12
|
+
| `YYYY-MM` | first day of that month | anchor - 28 days |
|
|
13
|
+
| `YYYY-Qn` | first day of the quarter's first month | anchor - 45 days |
|
|
14
|
+
| `YYYY spring` | `YYYY-03-01` | anchor - 60 days |
|
|
15
|
+
| `YYYY summer` | `YYYY-06-01` | anchor - 60 days |
|
|
16
|
+
| `YYYY autumn` | `YYYY-09-01` | anchor - 60 days |
|
|
17
|
+
| `YYYY winter` | `YYYY-12-01` | anchor - 60 days |
|
|
18
|
+
| `undated` | none | Source date + 90 days |
|
|
19
|
+
| explicit `Review: [noreview]` | none | never fires |
|
|
20
|
+
|
|
21
|
+
Northern-hemisphere season anchors are intentional. When a derived
|
|
22
|
+
review date is already in the past at write time, clamp it to
|
|
23
|
+
`Source date + 1 day` so newly captured plans do not fire in the same
|
|
24
|
+
turn.
|
|
25
|
+
|
|
26
|
+
`ReviewCount:` starts at `0`. For undated entries that fail to promote,
|
|
27
|
+
Evening Review moves `Review:` forward by 90 days and increments
|
|
28
|
+
`ReviewCount:`. When an undated entry reaches `ReviewCount: 3` with no
|
|
29
|
+
movement, rewrite `Review:` to `[noreview]` silently; do not DM the
|
|
30
|
+
user. Dated entries that fail to promote move `Review:` forward by 30
|
|
31
|
+
days.
|
|
32
|
+
|
|
33
|
+
User edits are normalized narrowly. If a Dashboard/API write adds a
|
|
34
|
+
parseable bullet with a horizon tag and intent but omits `Source:`,
|
|
35
|
+
`Review:`, or `ReviewCount:`, the context API fills
|
|
36
|
+
`Source: dashboard <today>`, derives `Review:` from the table above,
|
|
37
|
+
and sets `ReviewCount: 0`. Direct filesystem edits bypass the API, so
|
|
38
|
+
the next roadmap refresh or evening review must preserve the line by
|
|
39
|
+
rewriting it into the same canonical shape. Unparseable bullets are
|
|
40
|
+
validation errors with line numbers; do not guess.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
kind: reference
|
|
3
|
+
parent_skill: roadmap
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Action line formats:
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
- YYYY-MM-DD [tag]: description
|
|
10
|
+
- ✓ completed YYYY-MM-DD: YYYY-MM-DD [tag]: description
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The completed prefix date is the completion date; the second date is
|
|
14
|
+
the original planned date. Preserve completed rows byte-for-byte across
|
|
15
|
+
refreshes. Morning Routine marks an open row complete by rewriting:
|
|
16
|
+
`- YYYY-MM-DD [tag]: foo` →
|
|
17
|
+
`- ✓ completed <today>: YYYY-MM-DD [tag]: foo`.
|
|
18
|
+
|
|
19
|
+
Tags: `[notify]`, `[today]`, `[check]`, `[schedule]`.
|
|
20
|
+
|
|
21
|
+
### Travel (domestic / international)
|
|
22
|
+
|
|
23
|
+
- International: visa/ESTA application `[notify]` 3–4 weeks before
|
|
24
|
+
- Flight tickets `[notify]` 2–3 weeks before (prices rise closer to date)
|
|
25
|
+
- Accommodation confirmation `[check]` 1–2 weeks before
|
|
26
|
+
- Packing list `[today]` 2 days before
|
|
27
|
+
- Transit plan, weather check `[today]` 1 day before
|
|
28
|
+
- Final checklist `[notify]` day before departure
|
|
29
|
+
|
|
30
|
+
### Deadlines / Submissions
|
|
31
|
+
|
|
32
|
+
- Data gathering / research `[today]` 2 weeks before
|
|
33
|
+
- Draft creation `[today]` 1 week before
|
|
34
|
+
- Final review reminder `[notify]` 2 days before
|
|
35
|
+
- Due date reminder `[notify]` 1 day before
|
|
36
|
+
|
|
37
|
+
### Conferences / Presentations
|
|
38
|
+
|
|
39
|
+
- Slide preparation `[today]` 2 weeks before
|
|
40
|
+
- Rehearsal `[today]` 3 days before
|
|
41
|
+
- Travel prep if applicable (see Travel above)
|
|
42
|
+
|
|
43
|
+
### Recurring milestones
|
|
44
|
+
|
|
45
|
+
- Progress review `[today]` 3 weeks before
|
|
46
|
+
- Remaining tasks audit `[notify]` 2 weeks before
|
|
47
|
+
- Final confirmation `[today]` 3 days before
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"kind": "knowledge_layout",
|
|
3
|
+
"files": [
|
|
4
|
+
{
|
|
5
|
+
"path": "roadmap.md",
|
|
6
|
+
"purpose": "Long-horizon user intent: goals, focus, plans, scheduled tasks, and recurring entries",
|
|
7
|
+
"sections": [
|
|
8
|
+
{ "heading": "## Annual Goals", "contains": "user-authored yearly goals preserved verbatim" },
|
|
9
|
+
{ "heading": "## Quarterly Focus", "contains": "user-authored quarterly focus areas preserved verbatim" },
|
|
10
|
+
{ "heading": "## Long-term Plans", "contains": "agent-writable cumulative plan lines tagged with horizon" },
|
|
11
|
+
{ "heading": "## Agent Action Plan", "contains": "agent-writable dated entries with stable IDs and Preparation Timeline" },
|
|
12
|
+
{ "heading": "## Recurring", "contains": "recurring schedule entries preserved verbatim across refreshes" }
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: schedule
|
|
3
|
+
description: Load when scheduling a future agent wake-up, pre-composed DM, recurring task, or de-duping against existing pending schedules.
|
|
4
|
+
when_to_use: Owns `/api/schedule`, `/api/schedule/dm`, and `/api/recurring-schedules`. `external-services` defers here for all time-based work.
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Bash(curl *)
|
|
7
|
+
- Read
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Schedule Wake-Up Decision Guide
|
|
11
|
+
|
|
12
|
+
## When to Schedule
|
|
13
|
+
Register a wake-up when **all three** are true:
|
|
14
|
+
1. There is follow-up work that must happen at a specific time
|
|
15
|
+
2. The current session is ending before that time
|
|
16
|
+
3. No other session will reliably pick it up (a peer routine, an SSE poll, etc.)
|
|
17
|
+
|
|
18
|
+
Common triggers: morning routine end, calendar event prep (15 min before), deadline/reminder requests, in-flight work needing follow-up (e.g. PR review).
|
|
19
|
+
|
|
20
|
+
## Before creating — dedup pre-check (mandatory)
|
|
21
|
+
|
|
22
|
+
Every `POST /api/schedule` / `POST /api/schedule/dm` call MUST be
|
|
23
|
+
preceded by a dedup scan. Duplicate schedules are invisible to the
|
|
24
|
+
user but compound into duplicate DMs/notifications at fire time.
|
|
25
|
+
|
|
26
|
+
1. **Agent Plan check.** Scan `<today>` `## Agent Plan` for a row with
|
|
27
|
+
HH:MM within ±15 min of your target AND an overlapping subject. If
|
|
28
|
+
present, the plan is already in place — do NOT add a second one.
|
|
29
|
+
2. **Pending schedule check.** `GET /api/schedule?status=pending,running`
|
|
30
|
+
and look for an item whose `scheduledFor` is within ±15 min of your
|
|
31
|
+
target with a matching `description` subject. If found, skip (or
|
|
32
|
+
PATCH the existing item if it needs updating — never register a
|
|
33
|
+
parallel second one).
|
|
34
|
+
3. **Recurring check.** `GET /api/recurring-schedules?enabled=true` to
|
|
35
|
+
confirm no recurring rule already covers this cadence (e.g. a daily
|
|
36
|
+
09:00 inbox triage). If covered, skip — the recurring instance will
|
|
37
|
+
regenerate on its own.
|
|
38
|
+
|
|
39
|
+
Log the skip to `## Agent Log`:
|
|
40
|
+
`- HH:MM [schedule] skipped <subject>: duplicate of <planId|row>`.
|
|
41
|
+
|
|
42
|
+
Only after all three clear do you create the new schedule.
|
|
43
|
+
|
|
44
|
+
## When the user wants a durable rule, not a wake-up
|
|
45
|
+
|
|
46
|
+
If the request expresses an **ongoing management practice** with a
|
|
47
|
+
recorded reason — "every morning, run my finance app and log the
|
|
48
|
+
balance to a finance dossier", "from now on whenever X happens, do
|
|
49
|
+
Y" — switch to the `management-policy` skill instead. It creates a
|
|
50
|
+
`rules/policies/<slug>.md` that captures the WHY alongside the cadence
|
|
51
|
+
(via `routines/custom/<slug>.md`) so the rule survives a context
|
|
52
|
+
reset. Plain recurring schedules via `/api/recurring-schedules` are
|
|
53
|
+
still right when the cadence is all that matters and there is no need
|
|
54
|
+
to record intent.
|
|
55
|
+
|
|
56
|
+
## DM vs Agent Task
|
|
57
|
+
|
|
58
|
+
| Criterion | `/api/schedule/dm` (free) | `/api/schedule` (~$0.03) |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| Message text knowable now? | Yes | No — needs lookup/decision at execution |
|
|
61
|
+
| Needs calendar/API data at execution? | No | Yes |
|
|
62
|
+
| Multi-step action at execution? | No | Yes |
|
|
63
|
+
| Conditional on state that may change? | No | Yes |
|
|
64
|
+
|
|
65
|
+
**Default to DM** when possible. Every agent wake-up costs money and context.
|
|
66
|
+
|
|
67
|
+
## Writing a Good Description (for agent tasks)
|
|
68
|
+
|
|
69
|
+
> **The wake-up agent has NO memory of why it was scheduled.** It receives only: `today.md`, a fresh 1-day calendar, `user/profile.md` + `rules/management.md`, and the `description` + `taskContext` fields you provide. Nothing else.
|
|
70
|
+
|
|
71
|
+
Include all four elements:
|
|
72
|
+
|
|
73
|
+
| Element | What it answers |
|
|
74
|
+
|---|---|
|
|
75
|
+
| **What** | Specific verb + object (notify, check, update, prepare) |
|
|
76
|
+
| **Why** | The trigger or reason (meeting approaching, deadline, user request) |
|
|
77
|
+
| **Who/What** | Concrete names, IDs, URLs, filenames |
|
|
78
|
+
| **Expected output** | What "success" looks like (notification sent, file updated) |
|
|
79
|
+
|
|
80
|
+
**Good:** `"15-minute reminder for the 14:00 design review. Attendees: Sarah, Mike. Agenda: API v2 breaking changes. Prepare the meeting-note template and notify the user via Slack."`
|
|
81
|
+
|
|
82
|
+
**Bad:** `"Meeting prep"` — which meeting? when? what to prepare?
|
|
83
|
+
|
|
84
|
+
## Using `taskContext`
|
|
85
|
+
Structured metadata for IDs, URLs, and correlation. Put long identifiers here so `description` stays under ~2 sentences:
|
|
86
|
+
```json
|
|
87
|
+
{ "scheduledBy": "morning_routine", "prUrl": "https://github.com/user/repo/pull/42" }
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**`importance` convention.** This controls whether `agent_schedule`
|
|
91
|
+
rows become `roadmap.md` `Scheduled:` entries:
|
|
92
|
+
|
|
93
|
+
| Tier | Roadmap behavior | Use |
|
|
94
|
+
|---|---|---|
|
|
95
|
+
| `transient` | Never in roadmap; surfaces in today.md only on the day it fires | Default for `/api/schedule/dm`; short pings like "call mom next Tuesday" |
|
|
96
|
+
| `normal` | In roadmap only when scheduled more than 7 days out | Default for `/api/schedule`; ordinary user-facing follow-ups |
|
|
97
|
+
| `strategic` | In roadmap regardless of horizon | Long-prep commitments such as ESTA / travel / deadline reminders |
|
|
98
|
+
| `low` | Never in roadmap | Internal ticks already visible elsewhere, e.g. Agent Plan rows, recurring-schedule instances, morning retries |
|
|
99
|
+
|
|
100
|
+
For direct DMs, omit `importance` for ordinary one-off pings. If the
|
|
101
|
+
reminder is clearly tied to a long-prep commitment ("remind me in a
|
|
102
|
+
month about ESTA for the LA trip"), either write/promote the roadmap
|
|
103
|
+
item via the roadmap skill and let AAP schedule the reminder, or call
|
|
104
|
+
`/api/schedule/dm` with `"importance":"strategic"`.
|
|
105
|
+
|
|
106
|
+
## Model selection
|
|
107
|
+
- **`sonnet`** (default) — reminders, notifications, single-step tasks
|
|
108
|
+
- **`opus`** — multi-file analysis, cross-repo reasoning, decisions affecting user commitments
|
|
109
|
+
|
|
110
|
+
## Time discipline
|
|
111
|
+
- **Absolute time required** — resolve relative expressions via `<current_time>` into ISO 8601 with offset. E.g. "in 1 hour" at 15:30 EDT → `2026-04-06T16:30:00-04:00`.
|
|
112
|
+
- **No quiet hours (default 22:00-08:00, configurable)** unless `critical` priority.
|
|
113
|
+
- **Check today.md Schedule** before creating wakes to avoid piling onto a busy hour.
|
|
114
|
+
|
|
115
|
+
## Budget
|
|
116
|
+
- **Max 5 wake-ups per execution.** Consolidate into a single briefing task if more.
|
|
117
|
+
- **Morning Routine batches all day's wake-ups at once.** Other events schedule only immediate needs.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## API Reference
|
|
122
|
+
|
|
123
|
+
### POST /api/schedule/dm — Schedule a direct DM
|
|
124
|
+
Sends a pre-composed message at the specified time. No AI agent invoked.
|
|
125
|
+
```bash
|
|
126
|
+
curl -s -X POST http://localhost:8321/api/schedule/dm \
|
|
127
|
+
-H 'Content-Type: application/json' \
|
|
128
|
+
-d '{"time":"2026-04-06T16:00:00-04:00","message":"Reminder: Design review in 30 min.","platform":"slack"}'
|
|
129
|
+
```
|
|
130
|
+
| Field | Required | Description |
|
|
131
|
+
|---|---|---|
|
|
132
|
+
| `time` | Yes | ISO 8601 with timezone offset |
|
|
133
|
+
| `message` | Yes | Complete message text — sent as-is |
|
|
134
|
+
| `platform` | No | Target platform (defaults to primary) |
|
|
135
|
+
| `importance` | No | `transient` (default), `normal`, or `strategic`. Use `strategic` only for roadmap-shaped long-prep reminders. |
|
|
136
|
+
|
|
137
|
+
Response: `{ "status":"scheduled", "scheduleId":"123", "scheduledFor":"..." }`. Rejects times in the past (> 1 min ago).
|
|
138
|
+
|
|
139
|
+
### POST /api/schedule — Schedule an agent task
|
|
140
|
+
```bash
|
|
141
|
+
curl -s -X POST http://localhost:8321/api/schedule \
|
|
142
|
+
-H 'Content-Type: application/json' \
|
|
143
|
+
-d '{"time":"2026-04-06T16:00:00-04:00","taskType":"wake","description":"Check PR #42 status and notify user.","model":"sonnet","taskContext":{"scheduledBy":"dm_conversation"}}'
|
|
144
|
+
```
|
|
145
|
+
| Field | Required | Description |
|
|
146
|
+
|---|---|---|
|
|
147
|
+
| `time` | Yes | ISO 8601 with timezone offset |
|
|
148
|
+
| `taskType` | Yes | `wake` for scheduled tasks |
|
|
149
|
+
| `description` | Yes | Self-contained (min 20 chars). See format above. Doubles as the agent body unless `prompt` overrides it. |
|
|
150
|
+
| `prompt` | No | Optional override for the agent body (min 20 chars when set). When set, the dispatcher injects this — not `description` — into the task-flow template. Use when you want a short list-friendly `description` plus a longer, separate instruction for the agent. |
|
|
151
|
+
| `model` | No | `sonnet` (default) or `opus` |
|
|
152
|
+
| `taskContext` | No | Structured metadata object |
|
|
153
|
+
|
|
154
|
+
Rejects times in the past (> 1 min ago), same as `/api/schedule/dm`.
|
|
155
|
+
|
|
156
|
+
### PATCH /api/schedule/:id — Edit a pending item
|
|
157
|
+
```bash
|
|
158
|
+
curl -s -X PATCH http://localhost:8321/api/schedule/42 \
|
|
159
|
+
-H 'Content-Type: application/json' \
|
|
160
|
+
-d '{"time":"2026-04-06T17:00:00-04:00"}'
|
|
161
|
+
```
|
|
162
|
+
Fields: `time` (ISO 8601), `description` (min 20 chars, non-dm only), `prompt` (min 20 chars OR `null` to clear; non-dm only), `message` (dm only), `model`, `taskContext`. At least one required. Only `pending` items editable. `description`/`message` mutually exclusive; `prompt`/`message` mutually exclusive.
|
|
163
|
+
Response: `{ "status":"updated", "id":42 }` / 404 / 409 (not pending).
|
|
164
|
+
|
|
165
|
+
### GET /api/schedule — List scheduled items
|
|
166
|
+
```bash
|
|
167
|
+
curl -s "http://localhost:8321/api/schedule?status=pending"
|
|
168
|
+
```
|
|
169
|
+
Param `status` (default `pending,running`): comma-separated `pending`, `running`, `completed`, `failed`.
|
|
170
|
+
Param `roadmapEligible=true`: return only rows that may become
|
|
171
|
+
roadmap `Scheduled:` entries (`transient` / `low` excluded, `normal`
|
|
172
|
+
only beyond 7 days, `strategic` included).
|
|
173
|
+
Response: `{ "items":[{ "id","scheduledFor","taskType","description","prompt","status","createdAt" }] }` — `prompt` is `null` when no override is set.
|
|
174
|
+
|
|
175
|
+
### DELETE /api/schedule/:id — Cancel a pending item
|
|
176
|
+
```bash
|
|
177
|
+
curl -s -X DELETE http://localhost:8321/api/schedule/42
|
|
178
|
+
```
|
|
179
|
+
Only cancels `pending` items. Response: `{ "status":"cancelled", "id":42 }` / 404 / 409.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Recurring Schedules
|
|
184
|
+
For tasks that repeat on a fixed pattern. Auto-regenerates the next occurrence after each execution.
|
|
185
|
+
|
|
186
|
+
### POST /api/recurring-schedules — Create
|
|
187
|
+
```bash
|
|
188
|
+
# Daily at 09:00
|
|
189
|
+
curl -s -X POST http://localhost:8321/api/recurring-schedules \
|
|
190
|
+
-H 'Content-Type: application/json' \
|
|
191
|
+
-d '{"taskType":"wake","description":"Morning inbox triage — check pending observations and update today.md.","recurrenceRule":{"frequency":"daily","time":"09:00"}}'
|
|
192
|
+
# Weekly Mon/Wed/Fri at 10:00
|
|
193
|
+
curl -s -X POST http://localhost:8321/api/recurring-schedules \
|
|
194
|
+
-H 'Content-Type: application/json' \
|
|
195
|
+
-d '{"taskType":"wake","description":"Standup prep — review PRs, calendar, and blockers.","recurrenceRule":{"frequency":"weekly","time":"10:00","daysOfWeek":[1,3,5]}}'
|
|
196
|
+
```
|
|
197
|
+
| Field | Required | Description |
|
|
198
|
+
|---|---|---|
|
|
199
|
+
| `taskType` | Yes | Task type for dispatch (e.g. `wake`) |
|
|
200
|
+
| `description` | Yes | Self-contained (min 20 chars). Same rules as one-shot. Doubles as the agent body unless `prompt` overrides it. |
|
|
201
|
+
| `prompt` | No | Optional override for the agent body (min 20 chars when set). Each materialized one-shot row inherits this from the recurring parent. |
|
|
202
|
+
| `recurrenceRule` | Yes | `{ frequency, time, timezone?, daysOfWeek?, daysOfMonth? }` |
|
|
203
|
+
| `model` | No | `sonnet` (default) or `opus` |
|
|
204
|
+
| `taskContext` | No | Structured metadata object |
|
|
205
|
+
|
|
206
|
+
**Recurrence rule:** `frequency`: `daily`/`weekly`/`monthly`. `time`: `HH:MM` local. `timezone`: IANA (auto-filled from daemon config). `daysOfWeek` (weekly): 0=Sun..6=Sat. `daysOfMonth` (monthly): 1-31 (31 clamps to month end).
|
|
207
|
+
|
|
208
|
+
Response: `{ "status":"created", "item":{ "id","recurrenceLabel","nextRunAt",... } }`
|
|
209
|
+
|
|
210
|
+
### GET /api/recurring-schedules — List
|
|
211
|
+
```bash
|
|
212
|
+
curl -s "http://localhost:8321/api/recurring-schedules?enabled=true"
|
|
213
|
+
```
|
|
214
|
+
Response: `{ "items":[{ "id","taskType","description","recurrenceRule","enabled","nextRunAt","recurrenceLabel" }] }`
|
|
215
|
+
|
|
216
|
+
### PATCH /api/recurring-schedules/:id — Update
|
|
217
|
+
```bash
|
|
218
|
+
curl -s -X PATCH http://localhost:8321/api/recurring-schedules/1 \
|
|
219
|
+
-H 'Content-Type: application/json' \
|
|
220
|
+
-d '{"recurrenceRule":{"frequency":"daily","time":"10:00"}}'
|
|
221
|
+
```
|
|
222
|
+
Updatable: `recurrenceRule`, `description`, `prompt` (string sets an override, `null` clears), `model`, `taskContext`, `enabled`. Changing `recurrenceRule`/`enabled` auto-reschedules. Set `{"enabled":false}` to pause.
|
|
223
|
+
|
|
224
|
+
### DELETE /api/recurring-schedules/:id — Delete
|
|
225
|
+
```bash
|
|
226
|
+
curl -s -X DELETE http://localhost:8321/api/recurring-schedules/1
|
|
227
|
+
```
|
|
228
|
+
Deletes schedule and cancels pending instances. Response: `{ "status":"deleted", "id":1 }`
|