Files
full-focus/.claude/commands/weekly-template.md
aj.siegel 20d8c1aedc Add fetch_evening_tasks.py script and shared notion_helpers module
Refactors weekly-template's Notion client setup into a shared helper
(with .env/dotenv support and full pagination), and adds a dedicated
evening-prep script so both commands can fall back to script-based
fetching instead of the MCP search/fetch pattern.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-21 23:05:57 -04:00

5.1 KiB
Raw Blame History

Weekly Template

You are given the following context for my week: $ARGUMENTS

Step 0: Clean up previous week's daily notes

Ask the user if they want to delete the previous week's daily notes from the ./Daily Notes folder. If they say yes, delete all daily notes from the previous week (7 days prior) Also remove all prior weekly notes that are more than 1 week old.

Step 1: Create the weekly note

Please create a new note in the "Weekly Notes" folder. The title should be "Weekly Note - Month, Day Year" using today's date.

Step 2: Fetch Notion data and create the note

Run python3 scripts/fetch_weekly_data.py to get projects, tasks, and reading in one JSON payload (this reduces MCP round-trips and inference cost). projects is already filtered to active, non-personal projects and includes each one's current focus_this_week state. tasks is already filtered to non-Done tasks due within 7 days. reading is already filtered to "To Read"/"In Progress".

If the script errors or is unavailable (e.g. missing .env/NOTION_TOKEN on this machine), fall back to the search → fetch → filter pattern instead of failing the command (see CLAUDE.md "HOW TO QUERY THESE DATABASES"): notion-search the Projects collection collection://2c0abd6c-450a-807a-a3d7-000b8d8aaecc and Tasks collection collection://2c0abd6c-450a-8085-80a0-000ba136a154 (both page_size: 25, max_highlight_length: 0), fetch results in parallel, and apply the same filters manually. Do NOT try to fetch view:// URLs and do NOT print any "falling back" message for those — but DO mention to me that the script failed and you're using the fallback.

List all active projects and ask me which 3 I want to prioritize for the upcoming week. If there isn't a weekly goal for the selected projects, ask me to write one. Update the Focus this week field to true for the selected projects (and false for any project where focus_this_week was already true but isn't in my new list) via the Notion MCP — the script is read-only and can't make this update.

Then add the following to the note

Format the note with the following sections:

  1. Priorities for this week - List the three projects I selected with their weekly goal.
  2. Key tasks - List all tasks that are due this week. Order by due date and blocker status. Show the task name, related project, type, and effort level. Provide a link to the task in Notion.
  3. Workouts this week - The table from Step 3b (omit this section entirely if no workouts are scheduled).

Step 3: Review the week's calendar

Use the Microsoft 365 connector's outlook_calendar_search tool to fetch the upcoming week's events:

  • afterDateTime: this coming Monday at 00:00, beforeDateTime: Friday at 23:59
  • query: "*", order: "oldest", limit: 25

🚨 TIMEZONE: The connector returns times in UTC (ISO strings ending in Z). Convert each to Eastern Time before reasoning about them — EDT = UTC−4 (mid-Mar to early-Nov), EST = UTC−5 otherwise. Exclude "NDS Design Readiness & Refinement" meetings, and treat isAllDay events (PTO/OOO) as out-of-office.

Use AJ's work day (9 AM–5:30 PM ET) and these events to estimate how much unscheduled time exists across the week — this feeds the reading suggestions below.

Step 3b: Check the week's Runna workouts

Fetch the Runna ical feed (see CLAUDE.md "Data Sources") with curl -sL <url>. For each VEVENT whose DTSTART falls Monday–Friday of this week, compute the 9 AM block: workout duration (X-WORKOUT-ESTIMATED-DURATION, falling back to the high end of the range in SUMMARY/DESCRIPTION) + a 20-minute shower buffer after, starting at 9:00 AM. Check each block against that day's calendar events from Step 3.

Add a Workouts this week section: a table with columns Date, Workout, Block (e.g. 9:00–9:50 AM), and Status (Clear, or "Conflict:

Step 4: Generate my reading list

Use the reading list already fetched in Step 2 (from fetch_weekly_data.py, or its fallback). If the Step 2 fallback was used and didn't cover reading, notion-search the Reading List collection collection://2c4abd6c-450a-804a-809a-000bc77d02c1 with page_size: 25, max_highlight_length: 0, fetch the returned pages in parallel, and keep those with Status = "To Read" or "In Progress". (Don't fetch view:// URLs.)

Recommend 2 articles under Suggested Reading that fit the available time blocks:

  • Look at the unscheduled time across the week (from Step 3) to determine what reading time is appropriate
  • Match articles based on Read time field:
    • Short = <5 minutes (fits in small gaps)
    • Medium = <15 minutes (needs decent gap)
    • Long = >15 minutes (needs larger block)
  • For each article show: Title, Topic, Read time, and URL
  • Briefly explain why these articles fit the week's schedule

Formatting Rules

  • Always provide a tl;dr summary at the top of the note
  • Add a "## Table of Contents" section after the frontmatter using Obsidian internal link syntax [[#Heading Name]] for all H2 sections (if there are more than 3 H2 sections)