Skip to content

AI-powered virtual executive team — a single coherent executive persona backed by 8 specialist agents (FastAPI + Next.js).

feat(ui): show who writes and who sends on What it may do (#496)

Rufus3f1d22f1d9e0
diff --git a/packages/core/openexecutive/guide/prebuilt/delegate.json b/packages/core/openexecutive/guide/prebuilt/delegate.json
index d984ea88..e09cba9e 100644
--- a/packages/core/openexecutive/guide/prebuilt/delegate.json
+++ b/packages/core/openexecutive/guide/prebuilt/delegate.json
@@ -1,7 +1,7 @@
{
"section_id": "delegate",
"title": "Delegate",
- "markdown": "**What it is:** The place where you decide what the Executive may do without asking you. **Delegate** is in the main menu. It has four tabs: **What it may do**, **Act as me**, **Handle it for me** and **Take the lead**. Clicking **Delegate** opens **What it may do**.\n\n**What it does:**\n\n- **What it may do** lists everything that can go out without asking you, who it goes out as, and the setting that allows it. It only reads. Nothing on it changes a setting.\n- **Act as me** lets the Executive write email drafts *as you*, from your own Gmail or Outlook mailbox. You send them. It can also write first replies to mail in your inbox that needs you.\n- **Handle it for me** lets it send some of those replies, and some follow-ups, on its own from your mailbox.\n- **Take the lead** (the owner only) lets the Executive act in its own name on what it finds, without waiting to be asked.\n- Normally the Executive writes only as itself, from its own email account. Nothing goes out as you unless you set it up here.\n\n**How to use:**\n\n1. Click **Delegate** in the sidebar. (On a phone, open the menu with the button at the top left.)\n2. Read **What it may do** to see what goes out on its own today.\n3. Open **Act as me**, connect your mailbox, and pick what it writes as you.\n4. If you want replies sent for you, open **Handle it for me** and pick how much it sends on its own.\n5. If you are the owner, open **Take the lead** to let the Executive act in its own name.\n\n**What it may do:**\n\n- Three pills: **As you**, **As the Executive** and **Departments**. The number on each pill is how many things go out without asking.\n- **As you** covers your own mailbox: emails you ask for in chat, inbox replies, what Handle it for me sends, what is in training, what it has learned and your own rules.\n- **As the Executive** covers Take the lead, its Always asks first switches, the company's rules and meetings. Only the owner sees this pill.\n- **Departments** shows each department's authority level and what that level covers.\n- Each row has **What**, **Then** and **Why**. The dot by **Then** shows what happens: green goes out, amber waits for you, red always waits, grey is drafts only or off. **Why** links to the tab or page where the setting lives.\n- While the Executive is paused, a note at the top says nothing runs on its own, with a **Resume** link.\n- Someone who is not on the People list sees \"Only people on the team can see this.\"\n\n**Act as me:**\n\n- Who can use it: the owner. Team members can use it once the owner turns on **Let team members use it** (under **Advanced** on this tab). That switch shows only when the install allows it. Anyone else sees \"Act as me isn't available to you here.\"\n- Each person connects their own mailbox and turns it on for themselves. What it reads in your mail, the drafts it writes and your reply cards are yours alone. The owner sees only each team member's name, how many drafts they had written and sent in the last 30 days, and whether inbox replies are on. A conversation in which it read someone's mail can be opened only by that person.\n- **Your mailbox**: until it is connected, the card shows the command to run on a computer with a browser (one for Gmail and, where the install supports it, one for Outlook). Sign in as yourself, put the file it writes where the API reads it, then click **Check again**. Once connected it shows \"Connected to\" your address. It won't connect the Executive's own address as yours.\n- **What it writes as you**: \"Nothing goes out until you send it.\" Pick one:\n - **Off**: the Executive only writes as itself.\n - **When I ask**: ask in chat, \"reply to Dana as me: yes to the 5th\", and the draft waits in your Gmail or Outlook Drafts.\n - **For my inbox too**: it also writes a first reply to mail that needs you, and puts it on Home.\n- You can't move up from **Off** until your mailbox is connected. Moving down asks first, says what stops, and saves when you click **Move down**. Moving to **When I ask** stops inbox replies. Moving to **Off** stops everything it writes as you and turns **Read my calendar** off. Either one also stops Handle it for me if it was sending.\n- **Learn from my edits** (a checkbox once you are above **Off**): when you change a draft before sending, tick **Do it like this next time** and it learns how you write to that person. Nothing more is sent.\n- **Read my calendar**: a switch. On, it reads your own calendar when you ask about your day or week in chat. It never changes your calendar. It stays off while **What it writes as you** is at **Off**. If your mailbox sign-in doesn't include your calendar, the card shows a command to run once to add it.\n- **Suggested actions**: meeting invites and messages your mail calls for. **Always ask** brings each one to you as a card, every time. **In training** also brings each one as a card; tap **Approve + allow** and it does that kind, with those people, on its own next time.\n- **What it's learned**: what it learned from your edits (drafts) and your approvals (suggested actions). Each item says when, how many times it has been used since, and an example. **Remove** forgets it, and it asks you again.\n- **Advanced** (closed by default) holds **How I write**, **AI line on drafts you send** (shown only when the install adds an AI line to mail) and, for the owner, **Let team members use it**.\n\n**Asking in chat:**\n\n- Ask in the web app (signed in), in a direct message to the Executive on Slack or Discord, or in a private Telegram chat: \"reply to Dana as me: yes to the 5th.\"\n- It saves a draft in your own Drafts and shows a card, \"Drafted an email as you to Dana — in your Drafts\". Asking in chat never sends anything.\n- It does not write as you in a shared channel or thread, on Google Chat, from an email, from a scheduled job or in anyone else's conversation.\n- If it isn't sure about something, it asks you instead of guessing.\n- There is a daily limit on drafts written as one person (50 a day unless the install changes it).\n\n**For my inbox too:**\n\n- About every five minutes it looks at new mail in your inbox. For mail that needs a personal reply from you (a question, a request, a meeting to arrange, an introduction or a follow-up), it writes a first reply and puts it at the top of **Needs you** on Home.\n- It only looks at mail that arrives after you turn it on. It leaves out newsletters, notifications, mailing lists, automatic mail, mail you are not in To or Cc on, mail you've already answered and anything that doesn't need you. Mail you answer within ten minutes never gets a draft.\n- The first reply only acknowledges. It repeats only what you've already said in the thread, commits you to nothing and lists what's left for you to decide. Someone you've never written to gets a short holding reply.\n- Under the picker you see how it is doing (for example, that your mailbox needs connecting again) and when it last looked. Click **Check now** to look straight away.\n- **Also save inbox replies in my Gmail Drafts** (or Outlook): off by default, so replies wait on their cards only. Tick it to keep each reply in your Drafts too.\n- On each card on Home: **Send** asks you to confirm who it goes to, then **Send now**. **Send + allow** (in training) sends it and lets replies to that person go on their own from then on. **Edit** changes the words on the card. **Open in Gmail** opens it when it is in your Drafts. **Dismiss** removes the card.\n- Limits: at most 5 drafts a check and 20 a day unless the install changes it, 2 a day per sender (1 for a stranger), and never more than 25 cards open. A card closes when the draft is sent or deleted in your mailbox, when you reply yourself, or after 7 days.\n\n**How I write (under Advanced):**\n\n- Shows your style as a few sentences, with where it came from (\"Learned from N of your sent emails\", or \"Set by you\") and whether it is locked.\n- **Describe it in your own words**: write how you write, the way you'd tell a new assistant (up to 2,000 characters). Buttons add common phrases, such as \"Short and to the point\" or \"No emojis\". Click **Write my style**; it shows the new style with new lines marked **New** and a sample reply. Click **Save** to keep it or **Change it** to edit your words. Nothing changes until you save.\n- **Learn from my sent mail** (or **Learn again from my sent mail**): reads your recent sent emails once and describes how you write. It needs your mailbox connected and is hidden while the style is locked.\n- **Fine-tune details** opens the fields: **Length** (short, medium, long), **Tone** (casual, neutral, formal), a **Greeting** **To your team**, **To your contacts** and **To anyone else** ({first} becomes their first name), **Sign-off**, **Habits** and **Never** (one per line), your **Signature** and **Examples of your writing**.\n- **Save changes** saves the fields. **Lock** stops it being relearned from your mail (you can still edit it); **Unlock** undoes that. **Reset** starts over. **Remove examples** drops the examples.\n- **Signature**: with Gmail, your signature is added to every draft. **Refresh from Gmail** picks up a change you made in Gmail, **Don't add my signature** stops adding it, and **Add my Gmail signature** brings it back. Outlook doesn't share signatures with apps, so Outlook drafts end with your sign-off.\n- **AI line on drafts you send**: a checkbox for whether drafts you approve and send end with the install's AI line. Off unless the install starts it on. A change applies to the next reply it writes.\n\n**Handle it for me:**\n\n- It sends from your own mailbox, on its own, some of the replies Act as me writes for your inbox, and some follow-ups.\n- It needs **For my inbox too** on the Act as me tab. Until then the card says so and offers **Turn on For my inbox too**, or **Connect your mailbox in Act as me** if your mailbox isn't connected.\n- Someone who can't have Act as me sees that Handle it for me isn't available to them.\n- **What it sends on its own**: pick one:\n - **Off**: every reply waits for you to send.\n - **Easy ones**: only short replies to people you know, when it's very sure. Follow-ups are written for you and wait on Home.\n - **People I know**: replies to people you know. Strangers, links and amounts wait for you. Follow-ups go to your team and contacts when they haven't answered a question of yours in a few days.\n - **Most mail**: also strangers and longer replies, and links or amounts when it's very sure. Follow-ups go to anyone you wrote to who hasn't answered a question of yours in a few days.\n - **Everything** (the owner only): it decides what to send as you. Replies with a link, the topics that always wait and your rules still hold it back.\n- The sending steps need signed sign-ins on the server. Without them they are greyed out with \"Needs signed sign-ins on this server.\" Moving down asks first and saves when you click **Move down**.\n- **In training**: every reply comes to you first. Tap **Send + allow** on a card and it handles that person on its own from then on, within the step you picked. You can tick it at **Off** before moving up. **Train follow-ups too** (shown while in training) keeps follow-ups in training as well; untick it to let follow-ups go out while replies stay in training. **Everything** opens only once it's out of training, and training can't be turned on at **Everything**.\n- Money, contracts, legal, hiring, the press and passwords always wait for you. It never writes to anyone the email didn't go to. A reply that names the Executive waits too.\n- **Your rules** (at **Everything**): replies matching one wait for you, on top of the company's rules. Pick **A person**, **A company**, **Words** or **An amount**, type the value and click **Add rule**. **Remove** deletes one.\n- **What it sent** (while it is on): \"Sent N replies on its own today\", then each reply and follow-up from the last week: who it went to, the subject, **Still yours to answer** for questions it left for you, and **Open in your mailbox**.\n- **Who it's allowed to handle**: the people you allowed with **Send + allow**. **Remove** takes one off, and it asks you again.\n- **AI line on replies it sends** (under **Advanced**, when the install adds an AI line): on by default. Turning it off asks you to confirm with **Turn it off** or **Keep it on**.\n- Limits: 20 replies sent on its own a day unless the install changes it, and one a conversation. Past the limit, replies wait on cards.\n\n**Take the lead:**\n\n- The owner's alone. Anyone else sees \"Only the account owner can turn this on.\"\n- **Off**: when it looks over your day, it tells you what it would do, and you do it.\n- **In training**: everything it would do comes to you as a card on Home first. What you allow, it does on its own from then on.\n- **On**: it acts on what it finds while it looks over your day: it messages people, books meetings and starts workflows. Anything under **Always asks first** waits for a yes.\n- **In training** and **On** need signed sign-ins on the server.\n- **What it's learned**: the actions you allowed with **Approve + allow** on a card, or **Send + allow** on an Act as me reply. **Remove** takes one off. Something you approved unchanged three times shows as a suggestion with **Allow**.\n- **Always asks first**: a switch for each: **Money**, **Contracts and legal**, **Hiring and people decisions**, **Deleting, cancelling or sharing**, **Someone new** and **Big sends** (company-wide or department-wide, or more than five people). These wait for you, or for whoever approves that area, with a card on Home. **Meetings asked for in chat** is the last row: meetings you or a teammate ask it to book (in a team, Operations must also act on its own). A meeting it thinks of itself always waits. While Take the lead is off, only the meetings row applies.\n- Department levels don't hold what it does here. The switches and rules do.\n- **Company rules**: anything matching one always waits for a yes, for the Executive and for everyone's sending as themselves. Add them the same way as **Your rules**.\n- **Pause** on **Settings → Your Executive** stops everything on this tab. Anything you tap **Send** or **Approve** on still goes.\n\n**Example prompts:**\n\n- \"Reply to Dana as me: yes to the 5th, and ask her to send the deck first.\"\n- \"Write to the Acme team as me and push our call to Thursday.\"\n- \"What's on my calendar tomorrow?\" (with **Read my calendar** on)\n",
+ "markdown": "**What it is:** The place where you decide what the Executive may do without asking you. **Delegate** is in the main menu. It has four tabs: **What it may do**, **Act as me**, **Handle it for me** and **Take the lead**. Clicking **Delegate** opens **What it may do**.\n\n**What it does:**\n\n- **What it may do** lists everything that can go out without asking you, who it goes out as, and the setting that allows it. It only reads. Nothing on it changes a setting.\n- **Act as me** lets the Executive write email drafts *as you*, from your own Gmail or Outlook mailbox. You send them. It can also write first replies to mail in your inbox that needs you.\n- **Handle it for me** lets it send some of those replies, and some follow-ups, on its own from your mailbox.\n- **Take the lead** (the owner only) lets the Executive act in its own name on what it finds, without waiting to be asked.\n- Normally the Executive writes only as itself, from its own email account. Nothing goes out as you unless you set it up here.\n\n**How to use:**\n\n1. Click **Delegate** in the sidebar. (On a phone, open the menu with the button at the top left.)\n2. Read **What it may do** to see what goes out on its own today.\n3. Open **Act as me**, connect your mailbox, and pick what it writes as you.\n4. If you want replies sent for you, open **Handle it for me** and pick how much it sends on its own.\n5. If you are the owner, open **Take the lead** to let the Executive act in its own name.\n\n**What it may do:**\n\n- At the top, **Who writes and who sends** plays a short animation of mail moving between your inbox, the Executive, you and the person it goes to. On its own it plays one scene per tab. Tap any option of **What it writes as you**, **What it sends on its own** or **Take the lead** to see what that option does. Tapping an option there changes no setting. **Hide** folds the card away in this browser, and **Show who writes and who sends** brings it back.\n- Three pills: **As you**, **As the Executive** and **Departments**. The number on each pill is how many things go out without asking.\n- **As you** covers your own mailbox: emails you ask for in chat, inbox replies, what Handle it for me sends, what is in training, what it has learned and your own rules.\n- **As the Executive** covers Take the lead, its Always asks first switches, the company's rules and meetings. Only the owner sees this pill.\n- **Departments** shows each department's authority level and what that level covers.\n- Each row has **What**, **Then** and **Why**. The dot by **Then** shows what happens: green goes out, amber waits for you, red always waits, grey is drafts only or off. **Why** links to the tab or page where the setting lives.\n- While the Executive is paused, a note at the top says nothing runs on its own, with a **Resume** link.\n- Someone who is not on the People list sees \"Only people on the team can see this.\"\n\n**Act as me:**\n\n- Who can use it: the owner. Team members can use it once the owner turns on **Let team members use it** (under **Advanced** on this tab). That switch shows only when the install allows it. Anyone else sees \"Act as me isn't available to you here.\"\n- Each person connects their own mailbox and turns it on for themselves. What it reads in your mail, the drafts it writes and your reply cards are yours alone. The owner sees only each team member's name, how many drafts they had written and sent in the last 30 days, and whether inbox replies are on. A conversation in which it read someone's mail can be opened only by that person.\n- **Your mailbox**: until it is connected, the card shows the command to run on a computer with a browser (one for Gmail and, where the install supports it, one for Outlook). Sign in as yourself, put the file it writes where the API reads it, then click **Check again**. Once connected it shows \"Connected to\" your address. It won't connect the Executive's own address as yours.\n- **What it writes as you**: \"Nothing goes out until you send it.\" Pick one:\n - **Off**: the Executive only writes as itself.\n - **When I ask**: ask in chat, \"reply to Dana as me: yes to the 5th\", and the draft waits in your Gmail or Outlook Drafts.\n - **For my inbox too**: it also writes a first reply to mail that needs you, and puts it on Home.\n- You can't move up from **Off** until your mailbox is connected. Moving down asks first, says what stops, and saves when you click **Move down**. Moving to **When I ask** stops inbox replies. Moving to **Off** stops everything it writes as you and turns **Read my calendar** off. Either one also stops Handle it for me if it was sending.\n- **Learn from my edits** (a checkbox once you are above **Off**): when you change a draft before sending, tick **Do it like this next time** and it learns how you write to that person. Nothing more is sent.\n- **Read my calendar**: a switch. On, it reads your own calendar when you ask about your day or week in chat. It never changes your calendar. It stays off while **What it writes as you** is at **Off**. If your mailbox sign-in doesn't include your calendar, the card shows a command to run once to add it.\n- **Suggested actions**: meeting invites and messages your mail calls for. **Always ask** brings each one to you as a card, every time. **In training** also brings each one as a card; tap **Approve + allow** and it does that kind, with those people, on its own next time.\n- **What it's learned**: what it learned from your edits (drafts) and your approvals (suggested actions). Each item says when, how many times it has been used since, and an example. **Remove** forgets it, and it asks you again.\n- **Advanced** (closed by default) holds **How I write**, **AI line on drafts you send** (shown only when the install adds an AI line to mail) and, for the owner, **Let team members use it**.\n\n**Asking in chat:**\n\n- Ask in the web app (signed in), in a direct message to the Executive on Slack or Discord, or in a private Telegram chat: \"reply to Dana as me: yes to the 5th.\"\n- It saves a draft in your own Drafts and shows a card, \"Drafted an email as you to Dana — in your Drafts\". Asking in chat never sends anything.\n- It does not write as you in a shared channel or thread, on Google Chat, from an email, from a scheduled job or in anyone else's conversation.\n- If it isn't sure about something, it asks you instead of guessing.\n- There is a daily limit on drafts written as one person (50 a day unless the install changes it).\n\n**For my inbox too:**\n\n- About every five minutes it looks at new mail in your inbox. For mail that needs a personal reply from you (a question, a request, a meeting to arrange, an introduction or a follow-up), it writes a first reply and puts it at the top of **Needs you** on Home.\n- It only looks at mail that arrives after you turn it on. It leaves out newsletters, notifications, mailing lists, automatic mail, mail you are not in To or Cc on, mail you've already answered and anything that doesn't need you. Mail you answer within ten minutes never gets a draft.\n- The first reply only acknowledges. It repeats only what you've already said in the thread, commits you to nothing and lists what's left for you to decide. Someone you've never written to gets a short holding reply.\n- Under the picker you see how it is doing (for example, that your mailbox needs connecting again) and when it last looked. Click **Check now** to look straight away.\n- **Also save inbox replies in my Gmail Drafts** (or Outlook): off by default, so replies wait on their cards only. Tick it to keep each reply in your Drafts too.\n- On each card on Home: **Send** asks you to confirm who it goes to, then **Send now**. **Send + allow** (in training) sends it and lets replies to that person go on their own from then on. **Edit** changes the words on the card. **Open in Gmail** opens it when it is in your Drafts. **Dismiss** removes the card.\n- Limits: at most 5 drafts a check and 20 a day unless the install changes it, 2 a day per sender (1 for a stranger), and never more than 25 cards open. A card closes when the draft is sent or deleted in your mailbox, when you reply yourself, or after 7 days.\n\n**How I write (under Advanced):**\n\n- Shows your style as a few sentences, with where it came from (\"Learned from N of your sent emails\", or \"Set by you\") and whether it is locked.\n- **Describe it in your own words**: write how you write, the way you'd tell a new assistant (up to 2,000 characters). Buttons add common phrases, such as \"Short and to the point\" or \"No emojis\". Click **Write my style**; it shows the new style with new lines marked **New** and a sample reply. Click **Save** to keep it or **Change it** to edit your words. Nothing changes until you save.\n- **Learn from my sent mail** (or **Learn again from my sent mail**): reads your recent sent emails once and describes how you write. It needs your mailbox connected and is hidden while the style is locked.\n- **Fine-tune details** opens the fields: **Length** (short, medium, long), **Tone** (casual, neutral, formal), a **Greeting** **To your team**, **To your contacts** and **To anyone else** ({first} becomes their first name), **Sign-off**, **Habits** and **Never** (one per line), your **Signature** and **Examples of your writing**.\n- **Save changes** saves the fields. **Lock** stops it being relearned from your mail (you can still edit it); **Unlock** undoes that. **Reset** starts over. **Remove examples** drops the examples.\n- **Signature**: with Gmail, your signature is added to every draft. **Refresh from Gmail** picks up a change you made in Gmail, **Don't add my signature** stops adding it, and **Add my Gmail signature** brings it back. Outlook doesn't share signatures with apps, so Outlook drafts end with your sign-off.\n- **AI line on drafts you send**: a checkbox for whether drafts you approve and send end with the install's AI line. Off unless the install starts it on. A change applies to the next reply it writes.\n\n**Handle it for me:**\n\n- It sends from your own mailbox, on its own, some of the replies Act as me writes for your inbox, and some follow-ups.\n- It needs **For my inbox too** on the Act as me tab. Until then the card says so and offers **Turn on For my inbox too**, or **Connect your mailbox in Act as me** if your mailbox isn't connected.\n- Someone who can't have Act as me sees that Handle it for me isn't available to them.\n- **What it sends on its own**: pick one:\n - **Off**: every reply waits for you to send.\n - **Easy ones**: only short replies to people you know, when it's very sure. Follow-ups are written for you and wait on Home.\n - **People I know**: replies to people you know. Strangers, links and amounts wait for you. Follow-ups go to your team and contacts when they haven't answered a question of yours in a few days.\n - **Most mail**: also strangers and longer replies, and links or amounts when it's very sure. Follow-ups go to anyone you wrote to who hasn't answered a question of yours in a few days.\n - **Everything** (the owner only): it decides what to send as you. Replies with a link, the topics that always wait and your rules still hold it back.\n- The sending steps need signed sign-ins on the server. Without them they are greyed out with \"Needs signed sign-ins on this server.\" Moving down asks first and saves when you click **Move down**.\n- **In training**: every reply comes to you first. Tap **Send + allow** on a card and it handles that person on its own from then on, within the step you picked. You can tick it at **Off** before moving up. **Train follow-ups too** (shown while in training) keeps follow-ups in training as well; untick it to let follow-ups go out while replies stay in training. **Everything** opens only once it's out of training, and training can't be turned on at **Everything**.\n- Money, contracts, legal, hiring, the press and passwords always wait for you. It never writes to anyone the email didn't go to. A reply that names the Executive waits too.\n- **Your rules** (at **Everything**): replies matching one wait for you, on top of the company's rules. Pick **A person**, **A company**, **Words** or **An amount**, type the value and click **Add rule**. **Remove** deletes one.\n- **What it sent** (while it is on): \"Sent N replies on its own today\", then each reply and follow-up from the last week: who it went to, the subject, **Still yours to answer** for questions it left for you, and **Open in your mailbox**.\n- **Who it's allowed to handle**: the people you allowed with **Send + allow**. **Remove** takes one off, and it asks you again.\n- **AI line on replies it sends** (under **Advanced**, when the install adds an AI line): on by default. Turning it off asks you to confirm with **Turn it off** or **Keep it on**.\n- Limits: 20 replies sent on its own a day unless the install changes it, and one a conversation. Past the limit, replies wait on cards.\n\n**Take the lead:**\n\n- The owner's alone. Anyone else sees \"Only the account owner can turn this on.\"\n- **Off**: when it looks over your day, it tells you what it would do, and you do it.\n- **In training**: everything it would do comes to you as a card on Home first. What you allow, it does on its own from then on.\n- **On**: it acts on what it finds while it looks over your day: it messages people, books meetings and starts workflows. Anything under **Always asks first** waits for a yes.\n- **In training** and **On** need signed sign-ins on the server.\n- **What it's learned**: the actions you allowed with **Approve + allow** on a card, or **Send + allow** on an Act as me reply. **Remove** takes one off. Something you approved unchanged three times shows as a suggestion with **Allow**.\n- **Always asks first**: a switch for each: **Money**, **Contracts and legal**, **Hiring and people decisions**, **Deleting, cancelling or sharing**, **Someone new** and **Big sends** (company-wide or department-wide, or more than five people). These wait for you, or for whoever approves that area, with a card on Home. **Meetings asked for in chat** is the last row: meetings you or a teammate ask it to book (in a team, Operations must also act on its own). A meeting it thinks of itself always waits. While Take the lead is off, only the meetings row applies.\n- Department levels don't hold what it does here. The switches and rules do.\n- **Company rules**: anything matching one always waits for a yes, for the Executive and for everyone's sending as themselves. Add them the same way as **Your rules**.\n- **Pause** on **Settings → Your Executive** stops everything on this tab. Anything you tap **Send** or **Approve** on still goes.\n\n**Example prompts:**\n\n- \"Reply to Dana as me: yes to the 5th, and ask her to send the deck first.\"\n- \"Write to the Acme team as me and push our call to Thursday.\"\n- \"What's on my calendar tomorrow?\" (with **Read my calendar** on)\n",
"mermaid": null,
- "generated_at": "2026-10-15T21:00:00Z"
+ "generated_at": "2026-10-15T22:17:16Z"
}
diff --git a/packages/ui/scripts/whoSends.test.mjs b/packages/ui/scripts/whoSends.test.mjs
new file mode 100644
index 00000000..95da22b8
--- /dev/null
+++ b/packages/ui/scripts/whoSends.test.mjs
@@ -0,0 +1,46 @@
+import assert from "node:assert/strict";
+import test from "node:test";
+import { HANDLE_IT_MODES } from "../src/lib/reach.ts";
+import {
+ LEAD_OPTIONS,
+ SCENES,
+ SEND_OPTIONS,
+ TOUR,
+ WRITE_OPTIONS,
+ nextInTour,
+ sceneFor,
+ sceneKey,
+} from "../src/lib/whoSends.ts";
+
+test("every option has its own scene", () => {
+ const keys = [
+ ...WRITE_OPTIONS.map((o) => sceneKey("writes", o.value)),
+ ...SEND_OPTIONS.map((o) => sceneKey("sends", o.value)),
+ ...LEAD_OPTIONS.map((o) => sceneKey("lead", o.value)),
+ ];
+ assert.deepEqual([...keys].sort(), SCENES.map((s) => s.key).sort());
+ for (const s of SCENES) assert.ok(s.frames.length >= 2, `${s.key} has frames`);
+});
+
+test("the sending levels use the names Handle it for me shows", () => {
+ const levels = SEND_OPTIONS.filter((o) => o.value !== "off" && o.value !== "everything");
+ assert.deepEqual(levels, HANDLE_IT_MODES.map((m) => ({ value: m.mode, label: m.label })));
+});
+
+test("a scene lights the option it plays", () => {
+ for (const s of SCENES) {
+ const [group, value] = s.key.split(":");
+ const lit = { writes: s.writes, sends: s.sends, lead: s.lead }[group];
+ assert.equal(lit, value, s.key);
+ }
+});
+
+test("anything it sends on its own rides on For my inbox too", () => {
+ for (const s of SCENES.filter((x) => x.sends !== "off")) assert.equal(s.writes, "inbox", s.key);
+});
+
+test("the tour plays one scene per tab and loops", () => {
+ assert.deepEqual(TOUR.map((k) => sceneFor(k).tab), ["act", "handle", "lead"]);
+ assert.equal(nextInTour(TOUR[2]), TOUR[0]);
+ assert.equal(sceneFor("nope").key, SCENES[0].key);
+});
diff --git a/packages/ui/src/app/delegate/what-it-may-do/page.tsx b/packages/ui/src/app/delegate/what-it-may-do/page.tsx
index 563d5f00..b0c2ffa9 100644
--- a/packages/ui/src/app/delegate/what-it-may-do/page.tsx
+++ b/packages/ui/src/app/delegate/what-it-may-do/page.tsx
@@ -1,10 +1,12 @@
"use client";
import WhatItMayDoView from "@/components/delegate/WhatItMayDo";
+import WhoSendsCard from "@/components/delegate/WhoSendsCard";
// Delegate → What it may do: everything that goes out without asking, who it
// goes out as, and the setting that allows it. Read-only; each row links to
-// the tab where its setting lives.
+// the tab where its setting lives. Who writes and who sends, above the list,
+// plays what each option of the three tabs does.
export default function WhatItMayDoPage() {
return (
<main className="flex-1 min-h-0 overflow-y-auto">
@@ -13,6 +15,7 @@ export default function WhatItMayDoPage() {
<p className="mt-3 text-[15px] text-fg-muted leading-relaxed">
Everything that goes out without asking you, and the setting that allows it.
</p>
+ <WhoSendsCard />
<div className="mt-6">
<WhatItMayDoView />
</div>
diff --git a/packages/ui/src/components/delegate/WhoSendsCard.tsx b/packages/ui/src/components/delegate/WhoSendsCard.tsx
new file mode 100644
index 00000000..1998e38c
--- /dev/null
+++ b/packages/ui/src/components/delegate/WhoSendsCard.tsx
@@ -0,0 +1,343 @@
+"use client";
+
+import { useCallback, useEffect, useRef, useState, useSyncExternalStore } from "react";
+
+import {
+ LEAD_OPTIONS,
+ SEND_OPTIONS,
+ TAB_NAMES,
+ TOUR,
+ WRITE_OPTIONS,
+ nextInTour,
+ sceneFor,
+ sceneKey,
+ type Frame,
+ type Spot,
+ type Tab,
+} from "@/lib/whoSends";
+
+// Delegate → What it may do: "Who writes and who sends", a short animation of
+// mail moving between your inbox, the Executive, you and the person it goes
+// to. It plays one scene per tab in turn; tapping an option plays that
+// option's scene (lib/whoSends.ts). It changes no setting. Hide is
+// remembered in this browser.
+
+const HIDDEN_KEY = "oe.whoSends.hidden";
+const STEP_MS = 1500;
+const HOLD_MS = 1900;
+
+// The feature colours, as on FeatureName.
+const TONE: Record<Tab, { text: string; pill: string; ring: string; chip: string; lit: string }> = {
+ act: {
+ text: "text-indigo-700 dark:text-indigo-300",
+ pill: "bg-indigo-100 dark:bg-indigo-500/15",
+ ring: "border-indigo-400 ring-4 ring-indigo-500/15",
+ chip: "bg-indigo-200 dark:bg-indigo-300",
+ lit: "bg-indigo-600 border-indigo-600 text-white dark:bg-indigo-300 dark:border-indigo-300 dark:text-indigo-950",
+ },
+ handle: {
+ text: "text-emerald-700 dark:text-emerald-300",
+ pill: "bg-emerald-100 dark:bg-emerald-500/15",
+ ring: "border-emerald-400 ring-4 ring-emerald-500/15",
+ chip: "bg-emerald-200 dark:bg-emerald-300",
+ lit: "bg-emerald-600 border-emerald-600 text-white dark:bg-emerald-300 dark:border-emerald-300 dark:text-emerald-950",
+ },
+ lead: {
+ text: "text-orange-700 dark:text-orange-300",
+ pill: "bg-orange-100 dark:bg-orange-500/15",
+ ring: "border-orange-400 ring-4 ring-orange-500/15",
+ chip: "bg-orange-200 dark:bg-orange-300",
+ lit: "bg-orange-600 border-orange-600 text-white dark:bg-orange-300 dark:border-orange-300 dark:text-orange-950",
+ },
+};
+
+// Where each node sits, and where mail lands next to it, in % of the stage.
+const NODE_AT: Record<Spot, [number, number]> = { inbox: [15, 30], exec: [50, 30], you: [50, 76], to: [85, 30] };
+const CHIP_AT: Record<Spot, [number, number]> = { inbox: [15, 11], exec: [50, 8], you: [77, 76], to: [74, 11] };
+
+// Hide, kept in this browser. Read through useSyncExternalStore so the
+// server render (shown) and the first client render agree.
+const hiddenListeners = new Set<() => void>();
+let sessionHidden = false;
+
+function readHidden(): boolean {
+ try {
+ return window.localStorage.getItem(HIDDEN_KEY) === "1";
+ } catch {
+ return false;
+ }
+}
+
+function writeHidden(hidden: boolean): void {
+ try {
+ if (hidden) window.localStorage.setItem(HIDDEN_KEY, "1");
+ else window.localStorage.removeItem(HIDDEN_KEY);
+ } catch {
+ /* storage unavailable: Hide lasts until the page reloads */
+ sessionHidden = hidden;
+ }
+ hiddenListeners.forEach((fn) => fn());
+}
+
+function useHidden(): boolean {
+ return useSyncExternalStore(
+ (fn) => {
+ hiddenListeners.add(fn);
+ return () => hiddenListeners.delete(fn);
+ },
+ () => readHidden() || sessionHidden,
+ () => false,
+ );
+}
+
+const MOTION_QUERY = "(prefers-reduced-motion: reduce)";
+
+function useReducedMotion(): boolean {
+ return useSyncExternalStore(
+ (fn) => {
+ const q = window.matchMedia(MOTION_QUERY);
+ q.addEventListener("change", fn);
+ return () => q.removeEventListener("change", fn);
+ },
+ () => window.matchMedia(MOTION_QUERY).matches,
+ () => false,
+ );
+}
+
+function Node({ spot, label, frame, tone, round }: { spot: Spot; label: string; frame: Frame; tone: Tab; round?: boolean }) {
+ const [x, y] = NODE_AT[spot];
+ const on = frame.on?.includes(spot);
+ const dim = frame.dim?.includes(spot);
+ return (
+ <div
+ className={`absolute -translate-x-1/2 -translate-y-1/2 grid justify-items-center gap-[.35em] text-center transition-opacity duration-500 ${dim ? "opacity-35" : ""}`}
+ style={{ left: `${x}%`, top: `${y}%` }}
+ >
+ <div
+ className={`grid place-items-center border bg-surface-overlay font-semibold text-fg transition-all duration-500 ${
+ round ? "h-[6.6em] w-[6.6em] rounded-full font-display" : "h-[4.4em] w-[7.5em] rounded-[.8em]"
+ } ${on ? TONE[tone].ring : "border-line"}`}
+ >
+ {label}
+ </div>
+ <div className="min-h-[1.3em] whitespace-nowrap text-[.85em] text-fg-muted">{frame.caps?.[spot] ?? ""}</div>
+ </div>
+ );
+}
+
+function Options<T extends string>({
+ title,
+ group,
+ options,
+ current,
+ tone,
+ onPick,
+}: {
+ title: string;
+ group: "writes" | "sends" | "lead";
+ options: { value: T; label: string }[];
+ current: T;
+ tone: Tab;
+ onPick: (key: string) => void;
+}) {
+ return (
+ <div>
+ <h3 className="mb-2 text-xs font-medium uppercase tracking-wider text-fg-subtle">{title}</h3>
+ <div className="grid gap-1" style={{ gridTemplateColumns: `repeat(${options.length}, minmax(0, 1fr))` }}>
+ {options.map((o) => {
+ const lit = o.value === current;
+ return (
+ <button
+ key={o.value}
+ type="button"
+ aria-pressed={lit}
+ onClick={() => onPick(sceneKey(group, o.value))}
+ className={`min-w-0 rounded-lg border px-1 py-2 text-center text-xs leading-tight transition-colors sm:text-[13px] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-fg ${
+ lit ? `${TONE[tone].lit} font-semibold` : "border-line text-fg-muted hover:border-line-strong hover:text-fg"
+ }`}
+ >
+ {o.label}
+ </button>
+ );
+ })}
+ </div>
+ </div>
+ );
+}
+
+export default function WhoSendsCard() {
+ const hidden = useHidden();
+ const [key, setKey] = useState(TOUR[0]);
+ const [index, setIndex] = useState(0);
+ const [tour, setTour] = useState(true);
+ const [playing, setPlaying] = useState(true);
+ // Mail jumps (no glide) when a scene starts over.
+ const [jump, setJump] = useState(true);
+ const reduced = useReducedMotion();
+ const timer = useRef<ReturnType<typeof setTimeout> | null>(null);
+
+ const scene = sceneFor(key);
+ const last = scene.frames.length - 1;
+ const frame = scene.frames[reduced ? last : Math.min(index, last)];
+
+ const start = useCallback((next: string, asTour: boolean) => {
+ setKey(next);
+ setIndex(0);
+ setTour(asTour);
+ setJump(true);
+ setPlaying(true);
+ }, []);
+
+ useEffect(() => {
+ if (!jump) return;
+ const id = requestAnimationFrame(() => setJump(false));
+ return () => cancelAnimationFrame(id);
+ }, [jump]);
+
+ useEffect(() => {
+ if (hidden || reduced || !playing) return;
+ const wait = index === last ? HOLD_MS : STEP_MS;
+ timer.current = setTimeout(() => {
+ if (index < last) setIndex(index + 1);
+ else start(tour ? nextInTour(key) : key, tour);
+ }, wait);
+ return () => {
+ if (timer.current) clearTimeout(timer.current);
+ };
+ }, [hidden, reduced, playing, index, last, key, tour, start]);
+
+ const toggleHidden = (next: boolean) => writeHidden(next);
+
+ if (hidden) {
+ return (
+ <button
+ type="button"
+ onClick={() => toggleHidden(false)}
+ className="mt-6 text-sm font-medium text-accent underline-offset-2 hover:underline"
+ >
+ Show who writes and who sends
+ </button>
+ );
+ }
+
+ const tone = TONE[scene.tab];
+ const chip = frame.chip;
+ const [cx, cy] = chip ? CHIP_AT[chip.at] : CHIP_AT.inbox;
+
+ return (
+ <section aria-labelledby="who-sends-title" className="mt-6 rounded-2xl border border-line bg-surface-elevated p-4 sm:p-5">
+ <div className="flex items-start justify-between gap-3">
+ <div className="min-w-0">
+ <h2 id="who-sends-title" className="text-base font-semibold text-fg">
+ Who writes and who sends
+ </h2>
+ <p className="mt-1 text-sm leading-relaxed text-fg-muted">
+ Act as me writes as you, and you send. Handle it for me sends as you on its own. Take the lead sends in
+ the Executive&apos;s name.
+ </p>
+ </div>
+ <button
+ type="button"
+ onClick={() => toggleHidden(true)}
+ className="whitespace-nowrap text-sm font-medium text-fg-muted hover:text-fg"
+ >
+ Hide
+ </button>
+ </div>
+
+ <div className="@container mt-4">
+ <div
+ role="img"
+ aria-label={`${TAB_NAMES[scene.tab]}, ${scene.option}: ${scene.line}`}
+ className="relative aspect-[4/3] w-full overflow-hidden rounded-xl bg-surface-base text-[3.1cqw] @min-[520px]:aspect-[5/2] @min-[520px]:text-[1.9cqw]"
+ >
+ <svg aria-hidden viewBox="0 0 100 100" preserveAspectRatio="none" className="absolute inset-0 h-full w-full">
+ <g className="stroke-line-strong" strokeWidth="1.5" strokeDasharray="5 5">
+ <line x1="15" y1="30" x2="85" y2="30" vectorEffect="non-scaling-stroke" />
+ <line x1="50" y1="30" x2="50" y2="76" vectorEffect="non-scaling-stroke" />
+ <line x1="50" y1="76" x2="85" y2="30" vectorEffect="non-scaling-stroke" />
+ </g>
+ </svg>
+ <Node spot="inbox" label="Inbox" frame={{ ...frame, caps: { ...frame.caps, inbox: "Your mailbox" } }} tone={scene.tab} />
+ <Node spot="exec" label="Executive" frame={frame} tone={scene.tab} round />
+ <Node spot="you" label="You" frame={frame} tone={scene.tab} />
+ <Node spot="to" label={frame.to ?? "Dana"} frame={frame} tone={scene.tab} />
+
+ <div
+ aria-hidden
+ className={`absolute z-10 w-max max-w-[16em] -translate-x-1/2 -translate-y-1/2 rounded-[.6em] px-[.7em] py-[.45em] text-left text-[.9em] font-semibold leading-tight text-neutral-900 shadow-lg ${
+ chip?.tint ? tone.chip : "bg-white dark:bg-neutral-100"
+ } ${chip ? "opacity-100" : "opacity-0"} ${
+ jump ? "" : "transition-[left,top,opacity] duration-1000 ease-[cubic-bezier(.6,0,.3,1)]"
+ }`}
+ style={{ left: `${cx}%`, top: `${cy}%` }}
+ >
+ <span className="block text-[.82em] font-medium text-neutral-600">{chip?.from}</span>
+ {chip?.text}
+ </div>
+
+ {[
+ ["exec", frame.execSees, 56],
+ ["you", frame.youSays, 93],
+ ].map(([id, text, top]) => (
+ <div
+ key={id as string}
+ aria-hidden
+ className={`absolute z-20 -translate-x-1/2 -translate-y-1/2 whitespace-nowrap rounded-full border px-[.7em] py-[.35em] text-[.85em] font-semibold transition-opacity duration-500 ${tone.text} ${tone.pill} ${
+ text ? "opacity-100" : "opacity-0"
+ }`}
+ style={{ left: "50%", top: `${top}%`, borderColor: "currentColor" }}
+ >
+ {text}
+ </div>
+ ))}
+
+ <div
+ aria-hidden
+ className={`absolute bottom-[6%] right-[3%] w-[30%] rounded-[.7em] border border-line bg-surface-overlay px-[.7em] py-[.55em] text-[.82em] transition-opacity duration-500 ${
+ frame.sent ? "opacity-100" : "opacity-0"
+ }`}
+ >
+ <b className={`mb-[.2em] block font-display ${TONE.handle.text}`}>What it sent</b>
+ <span className="block text-fg">{frame.sent}</span>
+ </div>
+ </div>
+ </div>
+
+ <div className="mt-4 min-h-[4.5em]" aria-live="polite">
+ <span className={`inline-block rounded-full px-2.5 py-0.5 font-display text-[15px] font-bold ${tone.text} ${tone.pill}`}>
+ {TAB_NAMES[scene.tab]} · {scene.option}
+ </span>
+ <p className="mt-1.5 text-[15px] leading-relaxed text-fg">{scene.line}</p>
+ </div>
+
+ <div className="mt-3 space-y-3">
+ <Options title="What it writes as you (Act as me)" group="writes" options={WRITE_OPTIONS} current={scene.writes} tone="act" onPick={(k) => start(k, false)} />
+ <Options title="What it sends on its own (Handle it for me)" group="sends" options={SEND_OPTIONS} current={scene.sends} tone="handle" onPick={(k) => start(k, false)} />
+ <Options title="Take the lead (as the Executive)" group="lead" options={LEAD_OPTIONS} current={scene.lead} tone="lead" onPick={(k) => start(k, false)} />
+ </div>
+
+ <div className="mt-4 flex flex-wrap items-center gap-2">
+ {!reduced && (
+ <button
+ type="button"
+ onClick={() => setPlaying(!playing)}
+ className="rounded-lg border border-line px-3 py-1.5 text-sm font-medium text-fg hover:bg-surface-hover"
+ >
+ {playing ? "Pause" : "Play"}
+ </button>
+ )}
+ {!tour && (
+ <button
+ type="button"
+ onClick={() => start(TOUR[0], true)}
+ className="rounded-lg border border-line px-3 py-1.5 text-sm font-medium text-fg hover:bg-surface-hover"
+ >
+ Play all
+ </button>
+ )}
+ <span className="text-[13px] text-fg-muted">Tap an option to see what it does.</span>
+ </div>
+ </section>
+ );
+}
diff --git a/packages/ui/src/lib/whoSends.ts b/packages/ui/src/lib/whoSends.ts
new file mode 100644
index 00000000..03357766
--- /dev/null
+++ b/packages/ui/src/lib/whoSends.ts
@@ -0,0 +1,197 @@
+// The "Who writes and who sends" card on Delegate → What it may do: one
+// short scene per option of What it writes as you (Act as me), What it sends
+// on its own (Handle it for me) and Take the lead. Tapping an option plays
+// its scene; it changes no setting. Pure data; a test holds the option
+// labels to the ones the settings cards use (lib/reach.ts).
+
+import type { SendStep, WriteStep } from "@/lib/reach";
+
+export type Tab = "act" | "handle" | "lead";
+export type LeadStep = "off" | "training" | "on";
+export type Spot = "inbox" | "exec" | "you" | "to";
+
+export type Chip = { at: Spot; from: string; text: string; tint?: boolean };
+
+// One frame is the whole picture at that moment, so any frame can be shown
+// on its own (reduced motion shows the last one).
+export type Frame = {
+ chip?: Chip;
+ on?: Spot[];
+ dim?: Spot[];
+ caps?: Partial<Record<Spot, string>>;
+ youSays?: string;
+ execSees?: string;
+ to?: string;
+ sent?: string;
+};
+
+export type Scene = {
+ key: string;
+ tab: Tab;
+ option: string;
+ line: string;
+ writes: WriteStep;
+ sends: SendStep;
+ lead: LeadStep;
+ frames: Frame[];
+};
+
+export const WRITE_OPTIONS: { value: WriteStep; label: string }[] = [
+ { value: "off", label: "Off" },
+ { value: "when_asked", label: "When I ask" },
+ { value: "inbox", label: "For my inbox too" },
+];
+
+export const SEND_OPTIONS: { value: SendStep; label: string }[] = [
+ { value: "off", label: "Off" },
+ { value: "careful", label: "Easy ones" },
+ { value: "balanced", label: "People I know" },
+ { value: "bold", label: "Most mail" },
+ { value: "everything", label: "Everything" },
+];
+
+export const LEAD_OPTIONS: { value: LeadStep; label: string }[] = [
+ { value: "off", label: "Off" },
+ { value: "training", label: "In training" },
+ { value: "on", label: "On" },
+];
+
+export const TAB_NAMES: Record<Tab, string> = {
+ act: "Act as me",
+ handle: "Handle it for me",
+ lead: "Take the lead",
+};
+
+const mail = (from: string, text: string, at: Spot = "inbox", tint = false): Chip => ({ from, text, at, tint });
+
+// Mail it sends on its own: in, written, out, then listed in What it sent.
+function goes(who: string, asked: string, reply: string, to: string): Frame[] {
+ return [
+ { chip: mail(`From ${who}`, asked), on: ["inbox"], to },
+ { chip: mail("Reply as you", reply, "exec", true), on: ["exec"], dim: ["you"], caps: { exec: "Sends it on its own" }, to },
+ { chip: mail("From you", reply, "to", true), on: ["to"], dim: ["you"], caps: { to: "Gets it" }, to },
+ { on: ["you"], sent: `Replied to ${to} as you`, to },
+ ];
+}
+
+// Mail that waits: in, drafted, then on Home for you to send.
+function waits(who: string, asked: string, reply: string, why: string, to: string): Frame[] {
+ return [
+ { chip: mail(`From ${who}`, asked), on: ["inbox"], to },
+ { chip: mail("Draft as you", reply, "exec", true), on: ["exec"], caps: { exec: why }, to },
+ { chip: mail("Draft as you", reply, "you", true), on: ["you"], caps: { you: "On Home" }, youSays: "Waits for you", to },
+ ];
+}
+
+const late = "Sam's Q3 numbers are 3 days late";
+const ask = "Hi Sam, can you send the Q3 numbers?";
+
+export const SCENES: Scene[] = [
+ {
+ key: "writes:off", tab: "act", option: "Off", writes: "off", sends: "off", lead: "off",
+ line: "The Executive only writes as itself. You answer your own mail.",
+ frames: [
+ { chip: mail("From Dana", "Can we move to the 5th?"), on: ["inbox"] },
+ { chip: mail("From Dana", "Can we move to the 5th?", "you"), on: ["you"], dim: ["exec"], youSays: "You write the reply" },
+ { chip: mail("From you", "Yes, the 5th works.", "to"), on: ["to"], dim: ["exec"], caps: { to: "Gets it" } },
+ ],
+ },
+ {
+ key: "writes:when_asked", tab: "act", option: "When I ask", writes: "when_asked", sends: "off", lead: "off",
+ line: "Ask in chat, “reply to Dana as me: yes to the 5th”, and the draft waits in your Drafts.",
+ frames: [
+ { on: ["you"], dim: ["inbox"], youSays: "“Reply to Dana as me: yes to the 5th”" },
+ { chip: mail("Draft as you", "Yes, the 5th works.", "exec", true), on: ["exec"], dim: ["inbox"], caps: { exec: "Writes it in your voice" } },
+ { chip: mail("Draft as you", "Yes, the 5th works.", "you", true), on: ["you"], dim: ["inbox"], caps: { you: "In your Drafts" }, youSays: "You tap Send" },
+ { chip: mail("From you", "Yes, the 5th works.", "to", true), on: ["to"], dim: ["inbox"], caps: { to: "Gets it" } },
+ ],
+ },
+ {
+ key: "writes:inbox", tab: "act", option: "For my inbox too", writes: "inbox", sends: "off", lead: "off",
+ line: "It also writes a first reply to mail that needs you and puts it on Home. You tap Send.",
+ frames: [
+ { chip: mail("From Dana", "Can we move to the 5th?"), on: ["inbox"] },
+ { chip: mail("Draft as you", "Yes, the 5th works.", "exec", true), on: ["exec"], caps: { exec: "Writes a draft" } },
+ { chip: mail("Draft as you", "Yes, the 5th works.", "you", true), on: ["you"], caps: { you: "On Home" }, youSays: "You tap Send" },
+ { chip: mail("From you", "Yes, the 5th works.", "to", true), on: ["to"], caps: { to: "Gets it" } },
+ ],
+ },
+ {
+ key: "sends:off", tab: "handle", option: "Off", writes: "inbox", sends: "off", lead: "off",
+ line: "Every reply waits for you to send.",
+ frames: waits("Dana", "Thanks. See you Tuesday?", "Yes, see you Tuesday.", "Writes a draft", "Dana"),
+ },
+ {
+ key: "sends:careful", tab: "handle", option: "Easy ones", writes: "inbox", sends: "careful", lead: "off",
+ line: "Only short replies to people you know, when it's very sure.",
+ frames: [
+ ...goes("Dana, a contact", "Thanks. See you Tuesday?", "Yes, see you Tuesday.", "Dana"),
+ ...waits("Lee, a contact", "Can you send the deck and next year's price?", "Here's the deck. The price is…", "Longer reply: waits", "Lee"),
+ ],
+ },
+ {
+ key: "sends:balanced", tab: "handle", option: "People I know", writes: "inbox", sends: "balanced", lead: "off",
+ line: "Replies to people you know. Strangers, links and amounts wait for you.",
+ frames: [
+ ...goes("Lee, a contact", "Can we push the review to Friday?", "Friday works. I'll move the invite.", "Lee"),
+ ...waits("someone new", "Hi, are you the right person for partnerships?", "Yes, happy to talk.", "New sender: waits", "Alex"),
+ ],
+ },
+ {
+ key: "sends:bold", tab: "handle", option: "Most mail", writes: "inbox", sends: "bold", lead: "off",
+ line: "Also strangers and longer replies, and links or amounts when it's very sure.",
+ frames: [
+ ...goes("someone new", "Hi, are you the right person for partnerships?", "Yes, happy to talk. Does Thursday suit?", "Alex"),
+ ...waits("Lee, a contact", "Can you sign the updated contract?", "I'll review it and get back to you.", "Contracts always wait", "Lee"),
+ ],
+ },
+ {
+ key: "sends:everything", tab: "handle", option: "Everything", writes: "inbox", sends: "everything", lead: "off",
+ line: "It decides what to send as you. Replies with a link, the topics that always wait and your rules still hold it back.",
+ frames: [
+ ...goes("someone new", "Could you share your Q3 plan?", "Here's a summary of the plan.", "Alex"),
+ ...waits("Lee, a contact", "Where can I download the files?", "Here's the link: …", "Links always wait", "Lee"),
+ ],
+ },
+ {
+ key: "lead:off", tab: "lead", option: "Off", writes: "inbox", sends: "off", lead: "off",
+ line: "It doesn't act in its own name unless you ask.",
+ frames: [
+ { on: ["exec"], dim: ["inbox"], caps: { exec: "Notices something" }, execSees: late, to: "Sam" },
+ { on: ["you"], dim: ["inbox", "to"], caps: { you: "You decide what to do" }, to: "Sam" },
+ ],
+ },
+ {
+ key: "lead:training", tab: "lead", option: "In training", writes: "inbox", sends: "off", lead: "training",
+ line: "It acts in its own name, and people can see it's the Executive. In training, each action waits for your yes on Home.",
+ frames: [
+ { on: ["exec"], dim: ["inbox"], caps: { exec: "Notices something" }, execSees: late, to: "Sam" },
+ { chip: mail("From the Executive", ask, "exec", true), on: ["exec"], dim: ["inbox"], caps: { exec: "Writes in its own name" }, to: "Sam" },
+ { chip: mail("From the Executive", ask, "you", true), on: ["you"], dim: ["inbox"], caps: { you: "On Home" }, youSays: "Waits for your yes", to: "Sam" },
+ { chip: mail("From the Executive", ask, "to", true), on: ["to"], dim: ["inbox"], caps: { to: "Gets it" }, to: "Sam" },
+ ],
+ },
+ {
+ key: "lead:on", tab: "lead", option: "On", writes: "inbox", sends: "off", lead: "on",
+ line: "It acts in its own name without waiting to be asked. Always asks first and your company's rules still hold.",
+ frames: [
+ { on: ["exec"], dim: ["inbox"], caps: { exec: "Notices something" }, execSees: late, to: "Sam" },
+ { chip: mail("From the Executive", ask, "exec", true), on: ["exec"], dim: ["inbox", "you"], caps: { exec: "Writes in its own name" }, to: "Sam" },
+ { chip: mail("From the Executive", ask, "to", true), on: ["to"], dim: ["inbox", "you"], caps: { to: "Gets it" }, to: "Sam" },
+ ],
+ },
+];
+
+export const sceneKey = (group: "writes" | "sends" | "lead", value: string) => `${group}:${value}`;
+
+export function sceneFor(key: string): Scene {
+ return SCENES.find((s) => s.key === key) ?? SCENES[0];
+}
+
+// Played in turn when nothing has been tapped: one scene per tab.
+export const TOUR = ["writes:inbox", "sends:balanced", "lead:training"];
+
+export function nextInTour(key: string): string {
+ const i = TOUR.indexOf(key);
+ return TOUR[(i + 1) % TOUR.length];
+}