Calendar Conflict Defender.
Meeting requests get auto-scheduled around your deep work. Conflicts come back with a draft decline and a counter-time. The agent reads your calendar, sees the protected blocks you already drew, and answers the invite the way you would, before you've opened the laptop. One Calendar connector, a written preference list, and a slash command that fires on every new invite.
- Deep work that actually holds the blocks you drew on your calendar stop getting paved over. The agent treats them as fixed walls when it processes new invites.
- A draft decline plus a counter-time when a request collides with a protected block, the agent writes the decline in your voice and offers a real alternative slot pulled from your live availability.
- Less calendar babysitting you stop hand-checking every invite. The defender runs first, queues a reply for your review, and only escalates the calls that genuinely need you.
Build this with Claude.
Hand the build off to Claude with the prompt below. Claude reads the guides, writes the preferences file, scaffolds the slash command, and walks you through testing on a real invite. Pause between steps and confirm each one before moving on.
How this fits in the OS.
Your CLAUDE.md from Stage 01, your Google Calendar MCP (Claude Desktop calls these connectors) from Stage 02, and the slash-command and scheduling patterns from Stage 05. If you've already shipped the Morning Brief, every prerequisite is in place.
One Calendar connector, a deep-work preferences block in your CLAUDE.md, a slash command (/defend-calendar), and a cron or Task Scheduler entry that fires every 15 minutes during your working hours.
The pattern transfers. Once an agent can read your calendar and reply on your behalf with a human gate, the same shape applies to your inbox, your Slack DMs, and any other channel where requests for your time arrive.
What you'll build.
A small, focused agent that watches for new calendar invites and answers them the way you would. When a request lands on a slot you'd accept anyway, it queues a clean accept. When the request collides with a deep work block, it drafts a decline in your voice and offers a real counter-time pulled from your live availability. Nothing leaves your outbox without you seeing it first.
This is honestly synthesized, not pulled from a fixed blueprint. The Calendar connector exposes the primitives (read events, find availability, detect conflicts, create events). The preferences live in your CLAUDE.md so future sessions inherit them. The slash command stitches the two together. The cron wakes the loop.
The Calendar connector can already answer "do I have any conflicts between 2pm and 5pm on Friday?" and can create an event titled Deep Work tomorrow at 9am. The defender is the wrapper that turns those primitives into a standing behavior: every new invite gets evaluated, and the agent's first move is to protect what's already on your calendar before it considers anything else.
What changes for you.
The artifact is small. The shift in how the day feels is larger. Three changes, roughly in order of how soon you'll notice them:
- The deep work blocks stop being aspirational. They're protected by something that doesn't get tired or polite. The agent treats a Tuesday morning maker block the same way it treats a doctor's appointment.
- You stop being the calendar's secretary. Most invites resolve cleanly without you touching them. The ones that need you arrive pre-framed with a one-line explanation, not as a fresh problem to solve from zero.
- Counter-times stop being awkward. The agent always pairs a decline with a real alternative slot. The other party gets a path forward in the same reply, not a dead end. Friction drops on both sides.
Before you start.
Three things specific to this build
- Your Google Calendar connector is wired and green. You set this up in Stage 02. Run
/mcpin Claude Code. Google Calendar should show green. If it's red or missing, jump back to MCP Servers and finish that pass before continuing. - Your deep work blocks are already on the calendar. The defender protects what it can see. If your maker time isn't on the calendar as recurring events, put it there before you start. Block names like Deep Work, Maker Time, Writing Block, or whatever you call yours are fine; consistency matters more than the label.
- The agent has write scope on your calendar. The Stage 02 install includes the calendar scope by default. If you scoped it read-only on purpose, you'll need to re-authorize before the agent can draft a reply or block a counter-time slot.
Zero new spend. The Calendar connector is free. The cron runs on your computer. No new services to sign up for.
The build.
Six steps. Preferences first, because the slash command reads them. Dry run before the schedule, because you don't want a half-tuned agent firing replies on a real invite. Schedule last.
The agent does most of the mechanical work. The parts that need you are the parts only you can answer: what your protected blocks actually are, who is allowed to override them, and whether the agent's first dry-run reply sounds like you.
Confirm the Calendar connector is alive
2 minFive seconds of checking now beats a confusing failure later. The defender starts with empty inputs if the connector is down, and the rest of the build wastes your time.
/mcp
Google Calendar should show green. While you're here, ask Claude to test the connector with a live read:
Using my Google Calendar connector, what's on my calendar for the rest of this week? List the events with times in my local timezone, and flag any that look like deep work blocks.
guides/08-connecting-your-world.md. The command is claude mcp add google-calendar; the same OAuth credentials you used for Gmail cover it.
Write your deep-work preferences into CLAUDE.md
10 minThis is the file the agent reads at every session start. The defender behaves the way you described here, not the way it guesses. Be specific. Vague preferences produce vague replies.
Ask Claude to add a clearly labeled ## Calendar Defender Preferences section to your CLAUDE.md. The section should cover, at minimum:
- Protected blocks. Days, times, and the names you use on the calendar (Deep Work, Maker Time, whatever). Be explicit about timezones if you travel.
- Hard versus soft conflicts. A hard conflict means the agent declines and counter-offers without checking with you. A soft conflict means the agent escalates and asks. Most people start with everything soft, then promote to hard once they trust the dry runs.
- Override list. Named people, domains, or meeting titles that can land on a protected block anyway (your spouse, your co-founder, a specific client). Keep this list short.
- Counter-time rules. How far out the agent is allowed to push (same week only, within two weeks, no limit), and which slots count as polite alternatives (you probably don't want it offering 7am to a vendor cold-pitch).
- Voice notes. Two or three lines on how your declines should read. Brief and warm, or terse and businesslike, or somewhere between. The dry run in Step 04 is where you tune this further.
Open my CLAUDE.md and add a new section titled ## Calendar Defender Preferences. Ask me one question at a time to fill it in: protected blocks, hard versus soft conflicts, override list, counter-time rules, and voice notes for declines. Show me the final section before writing the file so I can edit it in place.
Scaffold the slash command
10 minThe slash command is the loop. On invocation, it pulls the most recent batch of unread invites, evaluates each one against your preferences and your live calendar, and produces one of three outcomes per invite: clean accept, draft decline plus counter-time, or escalate to you.
Scaffold a slash command at configs/commands/defend-calendar.md. The command, when invoked, should:
1. Read the ## Calendar Defender Preferences section from my CLAUDE.md.
2. Use the Google Calendar connector to pull any invite that landed since the last run (or all unprocessed invites on first run).
3. For each invite, check the proposed time against my live calendar via the connector's conflict check. Then compare against my preferences (hard versus soft conflicts, override list, counter-time rules).
4. Produce one outcome per invite: clean accept (queued as a draft, not auto-sent), draft decline plus one counter-time pulled from my real availability, or escalate to me with a one-line reason.
5. Write a single-line audit row per invite to a local log file so I can see what the agent did and why.
Show me the command spec before writing it. Walk me through the logic for one example invite from each outcome so I can confirm the decision tree matches what I want.
The agent does this for you. You're describing the behavior in plain English; the agent is composing the slash command spec, picking the connector calls, and laying out the audit log structure.
Dry-run on a real invite
10 minDon't use a synthetic test invite. Pick a real one from the last week, one that touched (or should have touched) a deep work block. Paste in the title, the proposed time, the organizer, and a line about what you actually did with it. Then watch the agent decide.
Run /defend-calendar against this single invite, no other invites, and do not send anything. Just show me the outcome and the reasoning.
Invite title: [paste the real title]
Proposed time: [paste the real time, with timezone]
Organizer: [name and domain or company]
What I actually did with it last week: [accept, decline, ignore, counter]
I want to see four things: the outcome the agent picked, the reasoning in one paragraph, the draft reply text (if a decline or counter-time), and the audit log row.
Three things to look for in the dry run:
- Does the outcome match what you'd have done? If not, the preferences in Step 02 need tightening. Go back and fix them; this is what dry runs are for.
- Does the reply sound like you? If the decline reads stiff or chipper in a way you'd never write, add or rewrite the voice notes in your CLAUDE.md.
- Is the counter-time actually polite? If the agent offered the other party 7am for what should be a midday meeting, your counter-time rules need a floor and a ceiling.
Run the dry-run on three or four invites before you move on. The agent gets noticeably better between the first and the third pass, because each tuning round of the preferences propagates to the next run.
Wire the schedule
8 minThe defender doesn't need to fire constantly. Every 15 minutes during your working hours is enough. New invites don't generally need a sub-minute response; they need a same-day one.
Wire /defend-calendar on a cron that fires every 15 minutes from 7am to 7pm on weekdays in my local timezone. On Windows, use Git Bash plus Task Scheduler; on macOS, use cron. Show me the schedule entry, confirm the next fire time, and give me the one-line kill switch I can run from my phone (or from any terminal) to stop the schedule cold if something goes sideways.
Cross-reference: the Heartbeats and Crons card has the framing on why a 15-minute interval is the right shape here, and when you'd reach for a heartbeat instead. The defender is a cron pattern (fixed schedule), not a heartbeat (poll on event change).
caffeinate while plugged in.
Watch one full day
~1 day, mostly passiveLeave the defender running for one full working day. Don't tune anything mid-day. At the end of the day, open the audit log and ask Claude to walk you through every decision: which invites it accepted cleanly, which it drafted a decline for, which it escalated, and which it would have done differently if your preferences were tighter.
Pull today's /defend-calendar audit log. For each invite the agent processed, show me: the outcome, the reasoning, and (if a draft reply was queued) whether I sent it as-is, edited it, or scrapped it. Then propose three concrete edits to my ## Calendar Defender Preferences section in CLAUDE.md based on the gaps you noticed.
That's the loop. Run the day, read the log, tighten the preferences, repeat. After three or four days the defender stops surprising you, and the deep work blocks start holding without you noticing the agent at all.
When it works.
You'll know the defender is real when you see these signals over the first week:
- Your deep work blocks survive a full week. Not because nobody tried to book over them, but because the agent quietly declined and offered alternatives before you saw the request.
- The first invite of the morning is already resolved. You open your computer and the draft reply (or the clean accept) is waiting in your queue. Most days, two or three are.
- Counter-times actually get accepted. The other party takes the alternative slot without a back-and-forth, because the slot was real and polite.
- You stop hand-checking the calendar tab. The audit log is the new place you look, not the calendar itself. That's the shift.
- The escalations make sense. When the agent does ask you, it's because the invite was genuinely ambiguous, not because the agent was confused. If most escalations look obvious in hindsight, your preferences are too loose; tighten them.
If you get stuck.
Common failure modes, ranked by how often they bite people on a first build:
- The connector has read scope but not write. Most common gotcha. The agent can see the invite and detect the conflict, but it can't queue a draft reply or block a counter-time slot. Re-authorize the Google Calendar connector with the calendar write scope and re-run
/mcpto confirm green. - Timezones drift. Your computer is in one zone, the organizer is in another, and the calendar event stores a third. The agent compares the wrong numbers and either declines a clean slot or accepts a real conflict. Fix: pin your default timezone in the
## Calendar Defender Preferencessection, and tell the agent to convert every proposed time to your local zone before evaluating it. - Owner versus attendee confusion. The Calendar connector behaves differently for invites you're hosting versus invites you're receiving. The defender should only counter-propose on invites you're receiving. For invites you're hosting, escalate to you (declining your own event to yourself is a weird shape). Add an explicit rule in your preferences: "If I'm the organizer, always escalate."
- The override list is too broad. If you put a whole domain on the override list (your client's company, say), every cold pitch from that domain lands on your deep work. Override by named person, not by domain, unless you've actually thought it through.
- The agent counter-offers slots you'd never take. 7am to a vendor pitch, 6pm Friday to a colleague. Your counter-time rules need a floor and a ceiling per invite type. Easiest fix: add explicit hour ranges per category (external pitches in 10am-4pm, internal one-on-ones anytime in working hours).
- The agent auto-sent a reply. If this happens, the slash command spec lost the human-gate clause. Open
configs/commands/defend-calendar.mdand confirm the language explicitly says "queue as draft, never auto-send." Then re-test on a dry run before scheduling again.
Still stuck? Post the invite shape, the agent's decision, and what you expected, in the workshop Slack. Someone in the cohort has probably hit the same edge.
Where to go next.
The defender is one shape of "agent reads a request and replies on your behalf with a human gate." Three natural next moves on the shelf:
A sibling card, Email Reply Queue, applies the same shape (read incoming requests, draft replies with a human gate, escalate the ambiguous ones) to your inbox. It will land on the shelf in the next wave.