Weekly Review: /week command#21
Open
cristoforows wants to merge 1 commit into
Open
Conversation
New weekly.py command (auth-gated). Selects the most recent 7 daily Drive files, groups their captured notes by day, and asks the LLM (reusing scheduler.create_llm) for a themed review (themes / action items / highlights). Falls back to per-day counts if the LLM is unavailable. File selection + parsing are pure functions. Closes #16.
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.
Closes #16.
What
Auth-gated
/week: an LLM-summarized review of the notes captured over the last 7 daily Drive files — the higher-altitude counterpart to/today.How
weekly.py(new): pureselect_recent_daily(most recent 7YYYY-MM-DD.md, newest first, ignores non-daily files),parse_blocks,build_review_input(groups notes by day for the prompt).week_commandfeeds the day-grouped notes to the LLM for a Themes / Action items / Highlights review; falls back to per-day counts if the LLM call fails. Summary runs off the event loop viaasyncio.to_thread.drive_handler.py: addslist_markdown_filesandread_file(read-only).bot.py: registers/week, adds to help/start text.Test
tests/test_weekly.py: file selection (filter/sort/cap/empty), block parsing, prompt grouping. Full suite green (17 passed).