fix(onboarding): task-first carve-out on the default profile-build directive
#123987 added the "do the task first" carve-out only to PLAIN_INTRO_NOTE, which is used only when onboarding.profile_build is "off". The default is "ask", so a fresh default install still received profile_build_directive, which opens with "After a one-sentence introduction ... OFFER" and lets the intro/profile offer replace a real first-message task. Factor the carve-out into TASK_FIRST_CLAUSE and lead both first-contact notes with it. The consent-gated profile-build steps are unchanged.
This commit is contained in:
@@ -119,12 +119,20 @@ def profile_build_mode(config: Mapping[str, Any]) -> str:
|
||||
return "off" if isinstance(mode, str) and mode.strip().lower() == "off" else "ask"
|
||||
|
||||
|
||||
# Shared by both first-contact notes so a real first-message task is never
|
||||
# replaced by the intro (plain or profile-build offer).
|
||||
TASK_FIRST_CLAUSE = (
|
||||
"If this message is itself a real request or task, DO THE TASK FIRST -- call "
|
||||
"whatever tools it needs -- and only then, in the closing sentences of that same "
|
||||
"reply, do what this note asks. Never let this note replace or skip work the user "
|
||||
"actually asked for. "
|
||||
)
|
||||
|
||||
PLAIN_INTRO_NOTE = (
|
||||
"[System note: This is the user's very first message ever. "
|
||||
"If this message is itself a real request or task, DO THE TASK FIRST -- call "
|
||||
"whatever tools it needs -- and only then, in the same reply, add one brief "
|
||||
"closing sentence introducing yourself and mentioning that /help shows available "
|
||||
"commands. Never let this note replace or skip work the user actually asked for. "
|
||||
+ TASK_FIRST_CLAUSE
|
||||
+ "What this note asks: one brief sentence introducing yourself and mentioning "
|
||||
"that /help shows available commands. "
|
||||
"If the message truly carries no request (e.g. just a greeting), briefly "
|
||||
"introduce yourself and mention that /help shows available commands, in one or "
|
||||
"two sentences.]"
|
||||
@@ -170,7 +178,8 @@ def profile_build_directive() -> str:
|
||||
"""
|
||||
return (
|
||||
"\n\n"
|
||||
"[System note: This is the user's very first message ever. After a one-sentence introduction (mention /help "
|
||||
"[System note: This is the user's very first message ever. " + TASK_FIRST_CLAUSE
|
||||
+ "What this note asks: after a one-sentence introduction (mention /help "
|
||||
"shows commands), OFFER — do not assume — to build a short profile of them so you can be more useful, and "
|
||||
"explain they can decline or do it later. If and ONLY IF they accept:\n"
|
||||
" 1. Ask for whatever they're comfortable sharing (name, what they do, how they like you to work). "
|
||||
|
||||
Reference in New Issue
Block a user