Bubs

An AI Chief of Staff, built on Claude Code.

Bubs is a persistent, context-aware system that manages email triage, meeting prep, project tracking, account deep dives, proactive churn mitigation, and daily briefings for a busy executive. Not a chatbot — a system. Because it has deep context on the business, Bubs can answer almost any question about Optimizely. And with connections to every important system (Outlook, Teams, Salesforce, etc), Bubs knows about every conversation - whether it's about the business strategy, Opal, customers health, adoption data, and more. Bubs' superpower is that it can connect the dots across every aspect of Shafqat's professional channels and contacts beyond what any human could do. Through Salesforce, Bubs has access to every email sent back and forth with every customer, providing a remarkably unbiased view into customer sentiment and account health — unfiltered by the optimism or politics that often color internal reporting. This page explains how it works, how it's organized, and the principles behind it.

01 The Problem

A typical executive at a large company processes 200+ emails per day across multiple accounts, attends 6-10 meetings, monitors Teams/Slack for urgent messages, tracks dozens of active projects, and tries to stay ahead of a calendar that changes by the hour.

The information exists — in email threads, calendar invites, CRM records, chat messages, meeting transcripts, shared docs. But it's scattered across systems, mixed with noise, and requires constant manual synthesis. The cognitive overhead of just staying current is enormous.

Most AI tools today are reactive: you ask a question, you get an answer. That's useful, but it doesn't solve the real problem. The real problem is that no one is watching the full picture — connecting the email from this morning to the meeting this afternoon to the project that's been stalling for two weeks.

Bubs is an attempt to solve that. An AI system that has enough context, enough structure, and enough operational autonomy to act as an actual Chief of Staff — not just answering questions, but proactively surfacing what matters, preparing for what's next, and making sure nothing falls through the cracks.

02 Solution Overview

Bubs is a Claude Code project — a folder on disk with a set of markdown files that give Claude persistent context, operational procedures, and a defined personality. Every time a session starts, Claude loads these files and "becomes" Bubs.

It's not an app. There's no custom UI, no database, no backend. It's just a well-organized set of files and a Claude Code subscription. The magic is in the structure.

And it was surprisingly easy to build. The initial setup took a couple of hours — Claude guided the process by asking questions about my role, my team, my calendar, my priorities, and filled out the context files based on my answers. After that, everything else was built out naturally through regular conversations. Need email triage? Just describe how you want it to work. Want automated briefs? Talk through the format and schedule. Every system file, every operational procedure, every refinement came from simple back-and-forth chat. If you know how to have a conversation, you can build, manage, and continuously improve a system like this.

Tech Stack

Claude Code (CLI)
The runtime (the engine that powers everything). Interactive sessions (where you chat back and forth in real time) for live work, headless mode (runs automatically in the background with no human present) for automated jobs like daily briefs.
Claude Max Subscription
Required for the volume of usage. Interactive sessions + automated briefs run ~$30-40/day in API-equivalent value.
MCP Servers
Connectors to Microsoft 365 (email, calendar, Teams, SharePoint), Gmail, Coda, ClickUp, Salesforce, and Optimizely Analytics.
macOS launchd
Scheduled job runner. Fires briefs at specific times, catches up on missed runs, and monitors for new email.
Gmail (SMTP)
Bubs has its own email address for sending briefs and correspondence. App password for SMTP; MCP for reading.
Markdown Files
The entire system is plain text. No database, no proprietary format. Version-controlled with git.

03 Examples — What Bubs Can Do

Here are real examples of things I ask Bubs to do on a daily or weekly basis. These range from quick lookups to complex multi-step research that would take a human hours.

▶
Daily Operations
Morning briefs, evening briefs, inbox triage
"Run the morning brief"
Bubs pulls overnight emails and Teams messages, triages by priority, summarizes tomorrow's schedule, checks pipeline numbers, and delivers a 60-second briefing. Also runs automatically at 8am every day.
"Run the evening brief"
The heavy-lifting session. Surfaces loose ends, preps tomorrow's meetings (pulling email threads, Teams context, and transcripts from prior meetings), checks pipeline, scans 1-2 weeks ahead for high-stakes meetings that need advance prep, and reviews today's meeting transcripts for action items.
"Triage my inbox"
Pulls the last 100+ messages, applies the four-tier priority system, surfaces what needs a response, and drafts suggested replies for Tier 1 items. Catches things like customer escalations from people not in the usual priority list.
▶
Meeting Prep
Customer dossiers, 1:1 agendas, talking points
"Prep me for the [Customer] meeting tomorrow"
Bubs pulls the full email thread (how the meeting came about, who's attending, what's at stake), checks the account in Salesforce and ClickUp (deal size, onboarding status, open issues), reads transcripts from prior meetings, checks the prep queue for queued talking points, and assembles a dossier with suggested talking points.
"What should I raise with Rupali in our biweekly?"
Checks the prep queue for queued talking points, cross-references active projects for anything tagged to Rupali, scans recent emails/Teams for open threads, and suggests a prioritized agenda.
▶
Business Intelligence
Pipeline checks, account deep dives, strategy questions
"What's our Opal pipeline looking like?"
Pulls live numbers from Optimizely Analytics: pipe generated this quarter, open pipe with next quarter close date, bookings against target. Compares to quarterly goals and flags if coverage ratios are healthy or not.
"Pull up everything on the [Customer] account"
Queries Salesforce for deal history and ARR, checks ClickUp for onboarding status, pulls the internal Teams chat thread, reads recent email threads, checks experimentation usage data, and assembles a full account health picture with risk assessment.
"How many Opal customers are actually onboarded?"
Cross-references the customer accounts data (from Salesforce) with ClickUp onboarding project statuses to identify how many are live vs. stalled vs. never started. This kind of cross-system analysis is what surfaced onboarding as a top priority.
"What's our competitive moat for Opal?"
Because Bubs has the full strategy docs loaded, it can discuss the four-layer MX moat (CMP as encoded consensus, process lock-in, integration depth, trust journey), the CX data generation moat (Biruni), the competitive window, and how specific product decisions strengthen or weaken the moat — grounded in the actual strategy, not generic advice.
▶
Research & Deep Dives
Account health reports, email drafting, transcript lookups
"Do a deep dive on this account"
A multi-hour research task compressed into minutes. Pulls Salesforce data, onboarding status, email history, Teams threads, experimentation usage, CSM assignments, and produces a structured account health report with systemic failure analysis and recommended actions. The methodology was codified after the first dive so it's repeatable.
"Draft a reply to this customer email"
Bubs reads the full thread, understands the account context, and drafts a reply in the right tone — from Bubs' own email account or as a suggested draft for the executive to send. Confirms before sending because email isn't reversible.
"What did we decide in last week's Opal Team Meeting?"
Reads the transcript digest from that day (or pulls the raw transcript if the digest wasn't generated), extracts decisions, action items, and open threads. Cross-references against the projects file to flag anything that should be updated.
▶
Proactive Nudges
Loose end reminders, advance prep warnings
"You haven't replied to [Customer] yet"
Bubs tracks loose ends from briefs and flags them in subsequent sessions. If an important email was flagged yesterday and still hasn't been answered, Bubs will remind you — but only after cross-referencing Teams to make sure you didn't already respond there.
"[Customer] exec meeting is in 3 days and no prep deck has been shared"
The Advance Prep Radar in the evening brief scans 1-2 weeks ahead for high-stakes meetings and checks whether prep is on track. If a customer exec meeting is approaching and no materials have been circulated, Bubs flags it and suggests who to ping.

04 The Organizational System

Everything Bubs knows is stored in a structured folder of markdown files. Some are loaded every session (context), some define how Bubs operates (systems), and some track live state (active). Here's the full structure:

Project Root
CLAUDE.md The brain — personality, principles, integrations, what gets loaded
context/ Who you are, who you know, how your calendar works
shafqat.md Bio, values, communication style, preferences
professional.md Role, org structure, key dynamics
professional-contacts.md People directory with roles and context
personal.md Family, hobbies, important dates
personal-contacts.md Personal contacts (family, school, services)
calendar-rhythms.md Recurring meetings, priorities, color coding
systems/ Operating procedures — how Bubs does things
email-triage.md Priority tiers, search methodology, filtering rules
meeting-prep.md Prep levels by meeting type, investigation rules
morning-brief.md Quick morning refresh procedure
evening-brief.md Heavy-lifting end-of-day prep procedure
weekly-review.md Sunday evening week-in-review procedure
transcript-processing.md Meeting transcript pull and summarization
active/ Living state — what's happening right now
priorities.md Top 3-5 professional and personal priorities
projects.md Active project index (tiered, always loaded)
projects/ Deep dive files per project (loaded on demand)
prep-queue.md Upcoming meeting prep items and talking points
data/ Cached data (CSVs, transcript digests)
scripts/ Automation (brief runners, email sender, email checker)
prep/ Meeting prep materials (decks, PDFs, agendas)
Key design decision: Files marked with @ in CLAUDE.md are loaded into every conversation automatically. Everything else is pulled on demand. This keeps the context window focused — Bubs always knows who you are and how to operate, but only loads project deep dives or data files when actively working on them.

05 File Deep Dives

Each file serves a specific purpose. Click to expand and see a sanitized sample of what the file looks like in practice.

▶
CLAUDE.md — The Brain
Personality, operating principles, integration config, and what files to load. This is the single most important file.
This file defines who Bubs is, how it thinks, and what it has access to. Claude Code reads CLAUDE.md at the start of every session. It's the entry point for the entire system.
Key sections:
  • Personality — warm, direct, opinionated. Pushes back when things don't make sense.
  • Operating Principles — strategic lens, codification rules, propagation rules.
  • Integrations — which MCP servers are available and what they connect to.
  • Automated Briefs — schedule, architecture, budget caps.
  • Context Loading — the @ file list that gets loaded every session.
# Bubs — Chief of Staff

You are Bubs, [Name]'s Chief of Staff. You operate across professional and personal life.

## Personality

- Warm, direct, and opinionated — a trusted advisor, not a yes-man
- You push back when something doesn't make sense
- Casual tone but sharp thinking — you read the room
- You anticipate needs before being asked
- Concise by default but thorough when the situation demands it

## Operating Principles

- **Wartime mindset** — every decision evaluated through one lens: does this help
  the company's most important strategic transformation?
- [Name]'s time is the most valuable asset — protect it ruthlessly
- Surface what matters, filter what doesn't
- Always have a point of view — don't just present options, recommend one
- **Codify, don't just do.** When you establish a useful pattern, write it down
  in the relevant system file. The goal is that Bubs gets smarter over time.
- **Propagate, don't just update.** System files have dependencies. When you change
  a system file, update every downstream file that references it.

## Integrations

- Microsoft 365 (email, calendar, SharePoint) — always available
- Microsoft Teams — chat search and reading via MCP
- Gmail — Bubs' own email account (read/draft via MCP, send via SMTP)

## Automated Briefs

- **Morning Brief** — 8:00am daily
- **Evening Brief** — 6:00pm daily
- **Weekly Review** — Sunday 5:00pm

Architecture: Claude Code runs automatically (headless) to generate the brief,
then a Python script sends it via Gmail SMTP.

## Context

The following files are auto-loaded every session:
@context/bio.md
@context/professional.md
@context/contacts.md
@systems/email-triage.md
@systems/meeting-prep.md
@active/priorities.md
@active/projects.md
▶
context/ — Who You Are
Bio, contacts, calendar rhythms. Gives Bubs the context to understand your world.
The context folder contains static-ish information about you, your team, and your calendar. These files change infrequently — maybe once a quarter when your org changes or someone new joins.
bio.md — sample
# [Your Name]

## Role
- President, [Company]
- Oversees ~800 employees across Product, Engineering, Marketing

## Values
- Ownership & initiative: don't wait to be told
- Intellectual honesty: tell the truth even when uncomfortable
- Speed & bias for action: move fast and iterate
- Craft & excellence: care about the quality of the work

## Communication Style
- Lead with the point — never bury the lead
- Short narrative over bullets
- Always come with a POV — don't ask "what do you think?"

## Pet Peeves
- Burying the lead
- Lack of preparation
- Asking without a point of view
professional-contacts.md — sample
## Direct Reports

- **[Name]** — CPO. Runs product across all products.
- **[Name]** — CTO.
- **[Name]** — SVP Marketing (including SDRs).
- **[Name]** — Operations lead. Acts as mini Chief of Staff.
  Organizes the Weekly Team Meeting (highest priority weekly meeting).
- **[Name]** — EA. Helps primarily with scheduling.

## Key People

- **[Name]** — Head of Strategy. One of the most important people.
  Sharp, critical thinker who stress-tests assumptions.
  Treat messages from this person with high priority.
calendar-rhythms.md — sample
## Highest Priority Meetings

1. **Weekly Team Meeting** (Tuesdays) — The most important weekly meeting.
2. **Bi-Weekly ELT Meeting** (Wednesdays) — Full executive leadership team.
3. **Board Check-In** (every few weeks) — Board-level investor meeting.

## Weekly - Monday
- 1:1 with CFO, 8:30-9:00am
- 1:1 with SVP Marketing, 9:05-10:00am
- Forecast calls (EMEA, US)

## Personal / Protected Time
- School drop off: weekday mornings ~8:30-9:00am
- Meetings preferred between 9:00am and 6:00pm
▶
systems/ — Operating Procedures
The runbooks that tell Bubs how to do things. These are the most refined files in the system.
System files are executable procedures. They evolved through real failures — each rule exists because something went wrong without it. They also have declared dependencies: changing one system file requires updating all downstream files that reference it.
email-triage.md — sample (excerpt)
# Email Triage System

> **Depended on by:** morning-brief.md, evening-brief.md, weekly-review.md

## Priority Tiers

### Tier 1 — Respond Now
**Senders:** CEO, board members, customers/prospects.

**Signals that auto-elevate to Tier 1 (regardless of sender):**
- Outlook HIGH importance flag
- Sent directly TO you with an explicit action request
- Escalation language: "refusing to pay," "threatening to leave,"
  "churn risk," "cancel," "security incident"
- Field team escalating a customer issue (any employee raising a
  customer problem gets Tier 1 regardless of title)

### Tier 4 — Ignore / Archive
Marketing emails, vendor outreach, system notifications, spam.

## Search Methodology — Never Miss a Tier 1

1. **Inbox folder pull (PRIMARY)** — pull the most recent ~50 messages
   chronologically. No search query needed. Always do this first.
2. **Mandatory second pull** — wildcard search to reach ~100 messages.
   50 messages is not enough for a noisy inbox.
3. **Check coverage and paginate** — keep pulling until you've reached
   back to the last triage point.
4. **Targeted sender searches (SAFETY NET)** — search for key senders
   to catch emails outside the Inbox folder.
Why this matters: This search methodology evolved from three real misses. Once, a major account escalation was invisible because the sender wasn't in any priority tier and the email was buried beyond the top 50. Another time, Bubs told the executive to reply to an "unanswered" email — but he'd already replied via Teams DM, which keyword search missed. Every rule here exists because something broke without it.
meeting-prep.md — key concept
Meeting prep scales with the stakes. A 1:1 with a direct report gets a light touch. A board meeting or CMO-level customer meeting gets a full dossier days in advance.
## Critical Rule: Always Investigate External Meetings

Any meeting with external attendees requires Bubs to pull the email
and Teams thread before summarizing. Never describe an external
meeting at face value from the calendar invite alone. Always:

1. Search email for the full thread — understand the backstory
2. Check for attached agendas, decks, or context docs
3. Search Teams for internal discussion about the company/person
4. Surface the real stakes

The calendar subject line often undersells the importance. A meeting
called "Acme CMP Connect" could actually be a CEO-level marketing
transformation deal worth hundreds of thousands.
evening-brief.md — key concept
The evening brief is the heavy-lifting session. It covers: loose ends from today, tomorrow's calendar with full meeting prep, priority messages (email + Teams), pipeline numbers, advance prep radar for high-stakes meetings 1-2 weeks out, transcript review for action items, and a "one thing to watch" for tomorrow. The morning brief is just a quick refresh of this.
▶
active/ — Living State
Priorities, projects, and prep queue. These change constantly and represent what's happening right now.
These files are the "working memory" of the system. They're updated after key meetings, decisions, or status changes. The projects file uses a tiered structure to manage context window limits.
priorities.md — sample
# Current Priorities

*Last updated: 2026-03-06*

## Professional

1. **Customer Onboarding Recovery** — Top priority.
   Significant number of customers need activation. [Owner] has execution
   but you own board reporting and strategic air cover.
2. **Enterprise Deal Execution** — Partner recommendation due next week.
   POC locked. Large deal with board-level visibility.
3. **AI Model Migration** — Quality stabilization gated on this.
   High agent success rate required before autonomous features ship.
projects.md — tiered structure
The projects index is always loaded (~10K chars). It has enough detail for Tier 1 projects that Bubs can discuss them in any session. Tier 2-3 projects have brief summaries and link to deep-dive files in active/projects/ that Bubs pulls on demand.
## Tier 1 — You Own

### Enterprise Deal — Marketing Transformation
- **Status:** POC kicked off. CMO-level sponsor confirmed aligned.
  Next: Monday call to finalize scope.
- **Champion:** [Name] (Director, MarTech Strategy)
- **Open action items:**
  1. Monday call — finalize POC scope and architecture
  2. Partner recommendation — still open
  3. Forward access link to full team — still pending
- **Deep dive:** active/projects/deal-details.md

---

## Tier 2 — Frequent Updates

### Brand Refresh — Agency Partnership
- **Status:** Active. Workshop scheduled. Messaging doc
  needs review before the session.
- **Deep dive:** active/projects/brand-refresh.md
prep-queue.md — sample
Queued talking points and prep items for upcoming meetings. Bubs checks this at the start of every session and during every brief.
## Monday — Biweekly with CPO and CTO (3:30pm)

**Talking point: Customer Retention & Platform Reputation**
- CEO flagged both in recent ELT discussion
- Questions to cover:
  - What's the retention story? Who owns it?
  - What's the plan to rebuild partner confidence?

**Talking point: Product Quality & Roadmap Alignment**
- Several customer escalations tied to product gaps
- Are we sequencing the right features?
▶
Domain Knowledge Files (optional)
Strategy docs, product briefs, competitive positioning. Loaded every session to give Bubs deep domain expertise.
If your role has a core domain (a key product, a strategic initiative, a business unit), you can give Bubs deep expertise by including strategy and product docs. These are loaded every session so Bubs can discuss strategy with real depth — not generic advice, but grounded in your actual competitive landscape, moat analysis, and roadmap.
In Bubs' case, this includes a strategy overview, product strategy (platform vs. applications), competitive landscape, and detailed briefs on upcoming product launches. These files are ~15K tokens total — a meaningful context investment, but worth it when 75% of the executive's time is spent on this initiative.
▶
Auto-Memory — Institutional Knowledge
Claude Code's built-in memory system captures patterns, technical notes, and lessons across sessions.
Claude Code has a persistent memory directory (~/.claude/projects/{project}/memory/) that survives across sessions. Bubs uses this for operational knowledge that emerges over time: API quirks, data source recipes, people notes, technical workarounds.
The key distinction: CLAUDE.md and context files are designed knowledge (you write them intentionally). Memory is discovered knowledge (Bubs writes it when it learns something useful). Both are essential.
# Bubs Memory

## Email MCP — Critical Usage Notes (learned 2026-03-03)
- **Primary inbox pull:** Use `read_resource` with URI `mail:///folders/Inbox`
  to get the most recent ~50 messages chronologically. This is the ONLY
  reliable way to see all recent emails. Always do this FIRST.
- **Search requires non-empty query:** An empty string returns nothing.
  Always use `query: "*"` for broad sweeps.
- **Pagination:** The ~50 message inbox pull has a hard cap. After pulling,
  check the oldest message timestamp. If the window doesn't reach back
  far enough, run supplemental wildcard searches. Repeat until coverage.

## People Notes
- **[Name]** — Technical guru. Male (not female). Don't use "she/her."

## Analytics Lookup (set up 2026-03-02)
- App ID: [redacted]
- Dashboard ID: [redacted]
- To look up any account's usage: just grep the cached CSV. No API needed.

06 Automated Operations

Bubs runs on a daily schedule without any human interaction. Claude Code's headless mode (runs automatically in the background, no human present) executes the same system files with the same connections, just without anyone at the keyboard. macOS launchd (a built-in Mac scheduler, like setting an alarm clock for your computer) triggers each job at the right time.

Daily Flow
8:00am
Morning Brief
→
9am-6pm
Interactive Sessions
→
5:30pm
Transcript Digest
→
6:00pm
Evening Brief
Sunday 5pm
Weekly Review
•
Every 15m
Email Monitor
•
Every 1h
Catch-Up Script
Transcript Digest (5:30pm)
Pulls meeting transcripts from Teams for every recorded meeting that day. Summarizes each into a structured digest: decisions, action items, project updates. Writes to a local file that the evening brief reads 30 minutes later. Budget: $15/run.
Evening Brief (6:00pm)
The heavy-lifting session. Reads the transcript digest, runs full email and Teams triage, preps tomorrow's meetings, checks pipeline metrics, scans 1-2 weeks ahead for high-stakes meetings needing advance prep. Sends via Gmail. Budget: $10/run.
Morning Brief (8:00am)
Quick refresh. Overnight messages, today's schedule reminder, carried-forward items from last night, pipeline numbers, and one key thing to know. 60-second read. Budget: $4/run.
Weekly Review (Sunday 5:00pm)
Past week recap, metrics pulse, message cleanup, next week preview, priorities check, projects update. Sets up Monday. Budget: $10/run.
Email Monitor (every 15 min)
Checks Bubs' Gmail for new messages. Forwards them to the executive's work email with a [Bubs Mail] subject prefix. Pure Python (IMAP/SMTP) — no AI cost. Ensures Bubs' email conversations never go unanswered.
Catch-Up Script (hourly)
Checks if any brief failed or was missed (laptop was asleep). Re-triggers during the valid window. Transcript digest: 5-6pm. Morning: 7am-12pm. Evening: 6-10pm. Prevents missed briefs without requiring the laptop to be awake at the exact scheduled time.
How it works under the hood: Each brief is a small script that sends a prompt to Claude Code in headless mode (running automatically, no human present). Claude loads the same files and connections as a live conversation. The output is captured and emailed via Gmail. Total daily cost at full operation is roughly $30-40 in API-equivalent value, covered by a Claude Max subscription.

07 The Triage Engine

Email and Teams triage is the most operationally complex part of the system. A noisy inbox (200+ emails/day including retail promotions, political emails, newsletters) combined with an unreliable search API forced the development of a layered methodology.

Priority Tiers

Tier 1 — Respond Now
CEO, board members, customers, anyone escalating a customer issue. Also: HIGH importance flag, direct action requests, escalation language ("threatening to leave," "churn risk"). Same-day response required.
Tier 2 — Respond Today
Direct reports needing input, key project leaders, anything related to the core strategic initiative, meeting prep materials, internal asks with deadlines this week.
Tier 3 — Batch Process
FYI threads, internal announcements, meeting recaps, non-urgent reports. Handle when convenient.
Tier 4 — Ignore
Marketing emails, vendor outreach, automated notifications, spam, retail promotions. Skip entirely.

Search Methodology (evolved from real failures)

1
Inbox folder pull (primary)
Pull the most recent ~50 messages chronologically. No search query — every email, regardless of sender or subject. This is the foundation.
2
Mandatory second pull
Wildcard search to extend coverage to ~100 messages. 50 isn't enough for a noisy inbox — a critical escalation was once buried at position 60.
3
Paginate until covered
Check if the oldest message reaches back to the last triage point. If not, keep pulling. On heavy days or after weekends, this might take 3-4 pulls.
4
Targeted sender searches (safety net)
Search specifically for CEO, board members, and key direct reports. Catches emails that may have been routed outside the Inbox folder by rules or Focused Inbox.

Teams: Direct Pull + Broad Sweep

Teams keyword search is unreliable for conversational messages ("got it," "agreed," "will do"). The system uses two complementary methods:

Direct pull from priority chats: For each important conversation (CEO DMs, leadership group chats, key project threads), pull the 20 most recent messages directly using the chat ID. This catches everything regardless of keywords.

Wildcard broad sweep: Search across all chats with a wildcard query and time filter, paginating until the full window is covered. A typical overnight window generates 100-200+ messages.

Cross-reference rule: Before reporting an email as "unanswered," check the Teams DM with that person too. People respond in whichever channel is natural.

08 Design Principles

These principles emerged from weeks of daily use. Each one exists because the system broke without it.

▶
Codify, don't just do
When Bubs figures out a good pattern — a search technique, a triage rule, a prep format — it writes it down in the relevant system file. The next session gets it for free. Without this, Bubs forgets and you re-teach the same lesson every conversation. The system should get smarter over time, not just in the moment.
▶
Propagate, don't just update
System files have dependencies (declared at the top of each file). If you change the email triage methodology, the morning brief, evening brief, and weekly review all reference it — they need to be updated too. A methodology change that only lands in one file is a bug. This is the equivalent of keeping your codebase's interfaces consistent.
▶
Context budget is real
Every file loaded into every session costs context tokens. The design challenge is: what does Bubs need to know always vs. on demand? Bio, contacts, calendar, systems, priorities, and the project index are always loaded (~40K tokens). Project deep dives, data files, and prep materials are pulled when relevant. Getting this wrong means Bubs either lacks critical context or wastes tokens on information it doesn't need for the current task.
▶
System files are runbooks, not documentation
The morning brief system file isn't a description of what a morning brief should look like — it's a step-by-step procedure that Bubs executes. "Run the full email triage protocol: inbox folder pull first, then mandatory second pull, then check coverage, then targeted sender searches." Specific, sequential, executable. Vague system files produce vague output.
▶
Every rule was earned
The email triage system has a rule: "If an employee is raising a customer issue, treat it as Tier 1 regardless of their title." That rule exists because a major account escalation was invisible for three consecutive briefs — the sender wasn't in any priority tier. Every rule in every system file has a story like this. Don't add rules preemptively; add them when something breaks.
▶
Personality is a feature
Bubs has a defined personality: warm, direct, opinionated. It pushes back when something doesn't make sense. It leads with a recommendation, not options. This isn't cosmetic — it changes the quality of the output. A system that just presents information is less useful than one that has a point of view. "Good week for pipeline but you dropped the ball on replying to [Customer]" is more useful than a neutral status report.
▶
Cross-reference before declaring something missed
People respond in whichever channel is natural. An email might be acknowledged via Teams DM. Before telling you "this email is unanswered," check the Teams thread with that person too. Bubs learned this the hard way: it kept flagging an "urgent unanswered email" that had already been acknowledged via a Teams message saying "got it."

09 MCP Integrations

MCP (Model Context Protocol) is an open standard that lets AI models connect to external systems — read emails, search calendars, query databases, pull analytics. Bubs uses MCP servers to reach into the tools where work actually happens. Without these, Bubs would be limited to whatever you paste into the conversation.

Each MCP server gives Bubs a set of capabilities. Here's what's connected and what each one enables.

▶
Microsoft 365 (Outlook + Calendar + SharePoint)
Core
Email, calendar, Teams messages, and document access. The most heavily used integration.
Email (Outlook)
  • Read inbox — pull the most recent messages chronologically from any folder (Inbox, Sent, etc.)
  • Search email — query by sender, subject, date range, keywords, or wildcards
  • Read full messages — open any email to read the complete body, attachments list, and headers
Used in: every morning brief, evening brief, weekly review, and ad-hoc triage session. Bubs processes 100-200+ emails per triage run.
Calendar
  • Search events — find meetings by subject, date range, or attendees
  • Read event details — pull full event body (agenda, Teams join link, attendee list, location)
Used in: every brief (tomorrow's schedule), meeting prep (extracting Teams join URLs for transcript retrieval), advance prep radar (scanning 1-2 weeks ahead).
Teams Chat
  • Search messages — keyword and wildcard search across all DMs and group chats
  • Read chat threads — pull recent messages from specific chats by chat ID
  • Read meeting transcripts — pull full transcripts from recorded Teams meetings
Used in: every triage session (direct pull from priority chats + broad sweep), transcript digest (5:30pm daily), cross-referencing before flagging "unanswered" emails.
SharePoint
  • Search files — find documents across SharePoint sites
  • Browse folders — navigate shared drives and document libraries
Used in: finding shared documents, onboarding trackers, and account materials that live on SharePoint rather than email.
▶
Gmail
Core
Bubs' own email account for sending briefs and correspondence.

Bubs has its own Gmail address (bubs.shaf@gmail.com). This gives Bubs an identity — it can send emails, receive replies, and maintain its own correspondence threads separate from the executive's work email.

Via MCP
  • Read messages — search and read Bubs' own inbox
  • Create drafts — draft emails for review
  • List labels — organize and filter incoming mail
Via SMTP (Python script)
  • Send email — send briefs and ad-hoc emails from Bubs' address
  • Forward monitoring — every 15 minutes, checks for new incoming emails and forwards them to the executive's work inbox with a [Bubs Mail] prefix
Used in: all automated briefs (morning, evening, weekly), ad-hoc email sending on behalf of the executive, and email monitoring loop. The Gmail MCP handles reading; SMTP handles sending because the MCP doesn't have a send tool.
▶
Salesforce
Data
CRM data — accounts, opportunities, deal history, team assignments.
  • Run SOQL queries — query any Salesforce object (Account, Opportunity, Contact, etc.) with full SQL-like flexibility
  • Account lookups — pull deal history, ARR, contract terms, products purchased, renewal dates
  • Team assignments — find the AE, CSM, and account team for any customer
  • Pipeline data — query open opportunities, stages, close dates, and amounts
Used in: account deep dives (pulling deal history, ARR, products), onboarding analysis (cross-referencing Opal customers), and answering ad-hoc questions about customers and deals. Bubs also maintains a cached CSV of all customer accounts that it refreshes monthly.
Key learning: Salesforce opportunities often represent multi-year contracts. Bubs learned to always divide by contract term to report annual ARR, not total contract value. The renewal opportunity amount is a reliable proxy for true annual ARR.
▶
ClickUp
Data
Project management — onboarding project status, task assignments, and team tracking.
  • Search — find projects, tasks, and folders by account name or keyword
  • Read tasks — pull task status, assignees, hours scoped, and comments
  • Browse hierarchy — navigate workspace → space → folder → list → task
  • Create/update tasks — add comments, update status, create new tasks
Used in: onboarding status checks (all customer onboarding projects live in ClickUp), account deep dives (who's assigned, what's the current phase, what's blocking), and the board-mandated onboarding recovery initiative tracking.
▶
Coda
Data
Living docs — product roadmaps, meeting notes, sprint planning, and strategy docs.
  • Read pages — pull content from any Coda doc page
  • List/read tables — query structured data in Coda tables (rows, columns, filters)
  • Browse docs — list pages and navigate doc structure
Used in: pulling the latest product roadmap (monthly updates), reading meeting notes from PM standups and cross-product weeklies, checking sprint planning status, and accessing the full unabridged strategy docs. Bubs queries Coda in real-time rather than caching locally because this content changes frequently.
▶
Optimizely Analytics
Analytics
Internal product analytics — pipeline metrics, usage data, adoption dashboards.
  • Find dashboards — discover analytics dashboards by name or topic
  • Analyze explorations — run saved analytics queries and get results (pipeline, bookings, usage)
  • Create explorations — build custom analytics queries (e.g., experimentation usage grouped by account)
  • Find metrics/events — discover available data dimensions and measures
Used in: every morning and evening brief (pipeline pulse — pipe generated this quarter, open pipe with next quarter close date), account-level experimentation usage lookups, and ad-hoc business questions. Bubs maintains a cached CSV of experimentation usage by account for instant lookups without API calls.
Key learning: The analytics API has a 5,000-row limit. When querying usage by account, weekly or monthly time grains exceeded this limit and silently truncated results. Switching to quarterly grain kept results under the cap while still providing accurate data. This kind of operational knowledge lives in Bubs' memory so it doesn't repeat the mistake.
▶
iMessage
Channel
Text Bubs directly from your phone. Real-time two-way messaging.

Bubs is reachable via iMessage. The executive can text Bubs from their phone and get a reply in the same thread — no need to open a laptop, launch a terminal, or start a session. It works through a self-chat: the executive texts their own number, and Bubs (running in an interactive Claude Code session) sees the message and replies.

Capabilities
  • Receive messages — inbound texts arrive in the active session as structured channel events
  • Reply in-thread — Bubs responds directly in the iMessage conversation
  • Send attachments — can attach files (images, PDFs) to replies
How it works
  • Uses the iMessage plugin for Claude Code — reads the local chat.db database on macOS
  • Access-controlled: only allowlisted phone numbers can reach Bubs
  • Works in interactive sessions only (not headless automation)
Used for: quick questions on the go, asking Bubs to look something up, kicking off a task from your phone, or just checking in. Complements the Gmail-based Process Inbox (which handles async, longer-form communication in headless mode) with a real-time, conversational channel.
Why this matters: Most AI assistant setups require sitting at a computer. iMessage turns Bubs into something you can reach from anywhere — in a cab, between meetings, on a walk. The barrier to asking Bubs a question drops to zero.
How MCP works with Claude Code: MCP servers are configured in Claude Code's settings file. When a session starts (interactive or headless), Claude Code connects to each configured MCP server and makes its tools available. Bubs can then call these tools naturally during conversation — "pull my latest emails" triggers the O365 MCP, "check the pipeline" triggers Optimizely Analytics. No custom code required to wire them together; the intelligence is in the system files that tell Bubs when and how to use each tool.

10 Build Your Own

ShafOS is an open-source kit that lets you build your own AI Chief of Staff in about 20 minutes. It includes battle-tested templates for every file in the system — email triage, meeting prep, project tracking, daily briefings — plus a bootstrap prompt that interviews you and generates a fully personalized setup.

How it works
1. Clone the repo and copy the templates into a new project directory. ▶ what does this mean?

"Clone the repo" means downloading the ShafOS files from GitHub to your computer. Open your terminal (on Mac: search for "Terminal" in Spotlight) and paste this:

git clone https://github.com/shafqat/shafos.git

This creates a shafos folder on your computer with all the template files.

"New project directory" means creating a fresh folder where YOUR assistant will live. The ShafOS folder is the starter kit — your folder is the real thing. Run this:

mkdir ~/my-chief-of-staff && cp -r shafos/templates ~/my-chief-of-staff/

That creates a folder called my-chief-of-staff in your home directory and copies the templates into it. You can name it whatever you want.

Don't have git installed? You can also download the repo as a ZIP from the GitHub page (green "Code" button → "Download ZIP").

2. Open Claude Code and paste the bootstrap prompt.
3. Answer the interview. The prompt asks about your role, priorities, tools, contacts, and communication style — then generates every file personalized to you.
4. Start using it. Try "Run my morning brief" or "What should I know before my next meeting?"
What's in the kit
Context files

Who you are, your role, your contacts, your calendar rhythms, personal context. The knowledge base that makes every session deeply informed.

System files

Email triage rules, morning/evening brief formats, weekly review structure, meeting prep methodology. The playbooks that encode hard-won operational patterns.

Active files

Priorities, projects, and a prep queue. The working state that keeps your assistant tracking everything — so nothing falls through the cracks.

Requires Claude Code. Works best with MCP integrations (Outlook, Gmail, Teams, Salesforce), but the core system works in interactive sessions without them.

Optimizely employees: There's a custom version pre-wired to our tech stack (Outlook, Teams, Salesforce, Coda, ClickUp, Analytics) that gets you running account deep dives, email triage, and meeting prep in 20 minutes. Reach out to Shafqat for access.