Skip to content

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

fix(delegation): draft a reply when a contact proposes a time (#559)

Rufus0413f78fc947
diff --git a/packages/core/openexecutive/delegation/inbox_classifier.py b/packages/core/openexecutive/delegation/inbox_classifier.py
index 3623673f..0bd5431e 100644
--- a/packages/core/openexecutive/delegation/inbox_classifier.py
+++ b/packages/core/openexecutive/delegation/inbox_classifier.py
@@ -93,7 +93,8 @@ something of by name, exactly as written ("Good morning, Brennan" gives \
when it names nobody. Never include the sender's own name or names that only \
appear in the signature or a quoted message.
- asked_of_them: true only when the email asks this person themselves: it \
-names or greets them, or they are its only addressee. False when it is \
+names or greets them, they are its only addressee, or they are the only one \
+in To and it answers <their_last_email>. False when it is \
addressed to someone else by name ("Brennan: ..."), when it asks a group \
without naming them, or when they are only copied (Cc).
- confidence: how sure you are that needs_reply and kind are right, from 0 to 1.
@@ -103,8 +104,11 @@ wrote in the thread before the email: read the email as an answer to it. \
When they asked to meet or talk and the email says when the sender is free, \
or that they are free, without a time being settled, it is scheduling and \
needs_reply is true: they can offer times. That holds even when the sender \
-says they will check with someone or come back with times. When the email \
-settles what they asked and leaves nothing for them to do, it needs no reply.
+says they will check with someone or come back with times. A time the \
+sender proposes is not settled until this person accepts it: "would \
+Thursday at 11 suit?" waits on their yes, so it is scheduling and needs_reply \
+is true. When the email settles what they asked and leaves nothing for them \
+to do (it accepts a time they offered), it needs no reply.
When unsure, say needs_reply false."""
diff --git a/packages/core/openexecutive/evals/_scenarios/delegation_inbox_015.yaml b/packages/core/openexecutive/evals/_scenarios/delegation_inbox_015.yaml
new file mode 100644
index 00000000..61f0e6c0
--- /dev/null
+++ b/packages/core/openexecutive/evals/_scenarios/delegation_inbox_015.yaml
@@ -0,0 +1,35 @@
+id: delegation_inbox_015
+domain: delegation
+type: inbox
+description: "Inbox watcher: the person asks to move a meeting and a contact answers with a time of their own (\"would Thursday at 11 suit?\"), copying a colleague. The time waits on the person's yes, so a reply is drafted."
+inbox:
+ person:
+ full_name: Olivia Owner
+ relation: correspondent
+ expect: draft
+ thread:
+ id: t-budget-review-move
+ subject: "RE: Q3 budget review"
+ messages:
+ - from: "Olivia Owner <[email protected]>"
+ text: |
+ Hi Dana,
+
+ Something came up for Monday. Could we push the budget review to
+ Thursday? Tell me what time suits you.
+
+ Olivia
+ - from: "Dana Park <[email protected]>"
+ text: |
+ No problem. Would Thursday at 11 suit?
+
+ Dana
+quality_criteria:
+ accepts_or_answers_the_proposed_time: true
+ promises_nothing_new: true
+ brief: true