{"slug": "built-a-schedule-aware-pm-copilot-that-actually-respects", "title": "Built a schedule-aware PM copilot that actually respects", "summary": "A developer built a schedule-aware project management copilot that flags sprint backlog items at risk of missing deadlines by comparing ticket estimates against available focus windows, and reports that it cut context-switching by roughly 40% in the first two weeks. The tool, implemented in about 200 lines of Python with a Firestore cache, runs daily at 7 AM via a Cloud Function and suggests concrete actions like splitting tickets or moving dates. The developer notes the current limitation is that it does not model energy levels, with future iterations planned to weight windows by personal productivity curves.", "body_md": "# Built a schedule-aware PM copilot that actually respects\n\nThe core loop is dead simple: every morning at 7 AM a Cloud Function pulls the next 14 days of events, computes \"focus windows\" (contiguous blocks ≥ 90 min, no meetings, no recurring holds), then cross-references the current sprint backlog. If a ticket's estimate exceeds the sum of available focus windows before its due date, the copilot flags it in Slack with a concrete suggestion — split the ticket, move the date, or negotiate scope. No vague \"at risk\" badges. Just math.\n\n``` python\ndef compute_focus_windows(calendar_events, min_block_minutes=90):\n    \"\"\"Return list of (start, end) tuples where deep work can happen.\"\"\"\n    busy = sorted([(e.start, e.end) for e in calendar_events])\n    windows = []\n    day_start = datetime.combine(date.today(), time(9, 0))\n    day_end   = datetime.combine(date.today(), time(18, 0))\n    \n    cursor = day_start\n    for b_start, b_end in busy:\n        if b_start - cursor >= timedelta(minutes=min_block_minutes):\n            windows.append((cursor, b_start))\n        cursor = max(cursor, b_end)\n    if day_end - cursor >= timedelta(minutes=min_block_minutes):\n        windows.append((cursor, day_end))\n    return windows\n```\n\nSurprising side effect: the team stopped padding estimates \"just in case\" once they saw the copilot would call out the slack immediately. Velocity didn't drop — accuracy went up. We also added a \"protect focus\" toggle that auto-declines meeting invites during claimed deep-work blocks (with a polite auto-reply), which cut context-switching by roughly 40% in the first two weeks.\n\nBiggest limitation right now: it doesn't model energy levels. A 3-hour window at 4 PM isn't the same as 9 AM, but the current heuristic treats them equally. Next iteration will weight windows by personal productivity curves — probably just a simple multiplier per hour-of-day learned from past commit timestamps.\n\nIf you're running a small team drowning in meeting creep, the whole thing is ~200 lines of Python + a Firestore cache. Happy to share the repo structure if anyone wants to fork it.\n\n[MCP server runs on Android 1d ago](/en/news/6941/)\n\n[Why most companies will miss the AI-native shift entirely 1d ago](/en/news/6912/)\n\n[Built a remote control for the AI agents living on my garage 1d ago](/en/news/6905/)\n\n[Does anyone actually care about llms. 1d ago](/en/news/6847/)\n\n[AI is making every side project feel like meaningless slop 2d ago](/en/news/6755/)\n\n[HarnessRouter makes it way easier to switch between Claude Code 2d ago](/en/news/6726/)\n\n[Next The alignment problem just stopped being theoretical →](/en/news/7073/)", "url": "https://wpnews.pro/news/built-a-schedule-aware-pm-copilot-that-actually-respects", "canonical_source": "https://promptcube3.com/en/news/7077/", "published_at": "2026-08-20 17:44:47+00:00", "updated_at": "2026-08-20 18:15:59.056795+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents"], "entities": ["Cloud Function", "Firestore", "Slack", "Python"], "alternates": {"html": "https://wpnews.pro/news/built-a-schedule-aware-pm-copilot-that-actually-respects", "markdown": "https://wpnews.pro/news/built-a-schedule-aware-pm-copilot-that-actually-respects.md", "text": "https://wpnews.pro/news/built-a-schedule-aware-pm-copilot-that-actually-respects.txt", "jsonld": "https://wpnews.pro/news/built-a-schedule-aware-pm-copilot-that-actually-respects.jsonld"}}