fix: trim identity prompt — remove jargon, tighten directive

Follow-up to PR #70238. Remove 'free-response channel' and
'authorization' jargon from the model-facing prompt. Collapse the
triple-negative 'do not ask / do not reject / do not stay silent'
into a single directive. ~70 tokens vs ~175 in the contributor's
version, same semantics.
This commit is contained in:
kshitijk4poor 2026-07-31 17:45:40 +05:30 committed by kshitij
parent b24c915168
commit 1789e06ed8
2 changed files with 11 additions and 13 deletions

View file

@ -3936,16 +3936,14 @@ class SlackAdapter(BasePlatformAdapter):
return ""
return (
f"You are connected to this Slack workspace as the bot "
f'"@{name}". The Slack adapter already applied authorization, mention, '
f"and channel-routing rules before delivering this message. Treat every "
f"delivered turn as intentionally routed to you, including a message "
f"accepted from a free-response channel or active thread. Your own routing "
f'mention "@{name}" may have been removed from the model-visible text. '
f"Do not ask for another mention, reject the message, or stay silent solely "
f'because "@{name}" is absent. In messages, each line is prefixed with the '
f"sender's name, and visible mentions are shown as @DisplayName; a mention "
f"of any other participant is not a mention of you, even if their name is "
f"similar."
f'"@{name}". The adapter already applied mention and channel '
f"routing; treat every delivered turn as intentionally routed to "
f'you. Your routing mention "@{name}" may have been stripped from '
f'the visible text — do not reject or ignore a message solely '
f'because "@{name}" is absent. In messages, each line is prefixed '
f"with the sender's name, and visible mentions are shown as "
f"@DisplayName; a mention of any other participant is not a "
f"mention of you, even if their name is similar."
)
async def _resolve_user_is_bot(

View file

@ -1887,9 +1887,9 @@ class TestMessageRouting:
assert msg_event.text == "Hi"
assert "@WorkspaceBot" in prompt
assert "already applied" in prompt
assert "may have been removed" in prompt
assert "Do not ask for another mention" in prompt
assert "free-response channel or active thread" in prompt
assert "may have been stripped" in prompt
assert "do not reject or ignore" in prompt
assert "intentionally routed" in prompt
assert "not a mention of you" in prompt
assert "Only treat a message as directed" not in prompt