Conversation
…utines, calendar
Notch was capture-only (track → summarize → ask). This adds the forward-looking
half so it covers what Little Bird does for planning, all zero-dependency and
fully working offline (deterministic drafts when no ANTHROPIC_API_KEY).
New capabilities
- Daily plan: AI drafts the day's 3–5 focus items, grounded in yesterday's
unfinished items, the calendar, weekly priorities, and goals.md. Checkable;
hand-added items survive regeneration.
- Daily review: evening plan-vs-actual using tracked activity as ground truth.
- Weekly plan & weekly review: theme + priorities; review rolls up the week's
daily reviews + tracked time into progress and patterns.
- Routines engine (Little Bird's "Routines"): time-of-day triggers that
auto-generate the above and post a card to a proactive feed; per-routine
enable/disable + run-now.
- Calendar integration via read-only ICS (CALENDAR_ICS_URL) — no OAuth, works
with Google/Apple. Plans anchor to real meetings.
- goals.md: hand-written long-horizon context every plan reads — a lightweight
take on "knowing your work" without a dozen integrations.
Implementation
- server/llm.js shared Anthropic helper
- server/calendar.js zero-dep ICS fetch+parse, per-day/week filtering
- server/context.js gathers activity + calendar + goals + history
- server/planner.js the four generators with structured parse + fallbacks
- server/routines.js proactive scheduler + feed
- storage.js day.plan/day.review, weeks/*.json, routines.json, feed.json,
ISO-week helpers; regeneration preserves manual items
- index.js plan/review/week/calendar/routines/feed endpoints
- public/index.html tabbed UI (今天 / 本周 / Bird) + markdown renderer,
interactive checklists, calendar lists, routine toggles, feed
Existing capture/summary/ask/tracking behavior is unchanged.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L8tdhu5NoQ3KMPmyxpKtGN
The "ask" chat only ever loaded today's file, so "上周做了什么 / 这个月的进展 /
周二干了啥" had no data to answer from. Now it resolves a time range out of the
question and feeds the model a compact history digest spanning it.
- server/history.js: resolveRange() parses 今天/昨天/前天/这周/上周/上上周/这个月/
上个月/最近N天/最近N周/单个星期几/具体日期(YYYY-MM-DD)/"最近" (EN equivalents too),
defaulting to today so existing behavior is untouched. renderHistoryForChat()
builds a compact per-day + weekly digest (reviews > summaries > raw task/app
totals) that stays small even over a month; capped at 92 days.
- summarizer.ask(): takes { historyContext, rangeLabel }; appends an EARLIER
section to the system prompt and bumps max_tokens for range answers. CHAT_SYSTEM
now covers multi-day synthesis. No-key fallback returns the digest directly.
- index.js /api/ask: resolves the range, loads the days (+weeks when relevant),
builds the digest, returns the resolved range alongside the answer.
- Frontend: card retitled "问问 Notch · 可跨天跨周", new range chips (这周/上周/
这个月), and each answer shows the resolved 📅 range.
Tested: range resolver across 13 phrasings; end-to-end "这周/上周/过去一小时".
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L8tdhu5NoQ3KMPmyxpKtGN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
研究了 https://littlebird.ai/ 后,把它「前瞻型」的那一半搬进了 Notch。原来 Notch 只「记录过去」(追踪 → 总结 → 问答),这个 PR 补上「规划未来」,覆盖你点名要的四件事,并加上 Little Bird 的 Routines(主动)和系统集成(日历)思路。零新依赖,没 API key / 没接日历也都能用(自动退化成本地草稿)。
新增能力
goals.md;可勾选,手动加的条目在「重新生成」时会保留。CALENDAR_ICS_URL),免 OAuth,Google/Apple 通用,让计划锚定真实日程。goals.md— 一个手写的长期上下文文件,每次生成计划都会读它 —— Notch 版的「了解你的世界」,一个文件代替十几个集成。UI
三个标签页:今天 / 本周 / Bird·助理。新增 markdown 渲染、可交互勾选清单、日历列表、Routine 开关、动态卡片。原有的随手记 / 计时 / 问答 / 活动追踪完全不变。
代码
测试
本地起服务全流程跑通:四类计划/复盘生成、勾选、手动加项、Routine 开关与 run-now、feed、日历未接时的优雅降级,三个标签页均正常渲染。
🤖 Generated with Claude Code