diff --git a/packages/cloud-agents/evals/router/prompts/routing.ts b/packages/cloud-agents/evals/router/prompts/routing.ts index ead22a48..904284ee 100644 --- a/packages/cloud-agents/evals/router/prompts/routing.ts +++ b/packages/cloud-agents/evals/router/prompts/routing.ts @@ -149,7 +149,7 @@ Respond with a single JSON object containing exactly these fields: - "workspaceValue" (string): Name of the chosen environment. - "reasoning" (string): Brief explanation of your workspace decision. - "confidence" (number): Confidence in the workspace choice from 0 to 1. -- "kickoffMessage" (string or null): Full short user-facing kickoff sentence (about 8-18 words). Naturally include the chosen environment name, and naturally include the model display name when requestedModelId is a real model. Vary wording; no "Getting started on your task in…" boilerplate every time. No emojis, markdown, quotes, mentions, or trailing period. +- "kickoffMessage" (string or null): Full short user-facing kickoff sentence (about 8-18 words). Naturally include the chosen environment name, and naturally include the model display name when requestedModelId is a real model. Vary wording; no "Getting started on your task in…" boilerplate every time. No emojis, markdown, quotes, or mentions. - "needsExternalLookup" (boolean): Whether an external reference must be fetched before routing, per the external lookup rules. - "externalReference" (string or null): The exact external reference to fetch when needsExternalLookup is true, otherwise null. - "requestedModelId" (string or null): The model id the user explicitly requested from the Available Models list, or the literal "${NO_MODEL_MENTIONED_VALUE}" when the user does not name a model. diff --git a/packages/cloud-agents/src/server/router/prompts/routing-prompt.ts b/packages/cloud-agents/src/server/router/prompts/routing-prompt.ts index f63da3f4..50aa7227 100644 --- a/packages/cloud-agents/src/server/router/prompts/routing-prompt.ts +++ b/packages/cloud-agents/src/server/router/prompts/routing-prompt.ts @@ -54,7 +54,7 @@ Also always set \`kickoffMessage\` to the full short user-facing kickoff for cha - "Checking mobile login redirects in Payments with Opus 4.8" - "Digging into the flaky checkout email race in Full Stack" - The environment and model names in the sentence must match the Available lists exactly (same spelling/casing as shown). -- Do not include emojis, markdown, quotes, @-mentions, Slack markup, or a trailing period. +- Do not include emojis, markdown, quotes, @-mentions, or Slack markup. - Do not invent environment or model names that are not in the provided lists. - Always produce a non-empty kickoffMessage for real routed tasks. Keep routing justification in \`reasoning\`; keep the spoken kickoff in \`kickoffMessage\`.`; diff --git a/packages/cloud-agents/src/server/router/routing-resolution.ts b/packages/cloud-agents/src/server/router/routing-resolution.ts index 260b78d4..ebf32d35 100644 --- a/packages/cloud-agents/src/server/router/routing-resolution.ts +++ b/packages/cloud-agents/src/server/router/routing-resolution.ts @@ -47,7 +47,7 @@ export const workspaceResponseSchema = z.object({ .string() .nullable() .describe( - 'Full short user-facing kickoff sentence posted in chat (about 8-18 words). Naturally include the exact chosen environment name, and when requestedModelId is a real model also naturally include that model display name from the Available Models list. Vary the wording; do not always use "Getting started on your task in…". No emojis, markdown, quotes, mentions, or trailing period. Always provide a non-empty value for real routed tasks.', + 'Full short user-facing kickoff sentence posted in chat (about 8-18 words). Naturally include the exact chosen environment name, and when requestedModelId is a real model also naturally include that model display name from the Available Models list. Vary the wording; do not always use "Getting started on your task in…". No emojis, markdown, quotes, or mentions. Always provide a non-empty value for real routed tasks.', ) .optional() .default(null), diff --git a/packages/communication/src/__tests__/chat-messages.test.ts b/packages/communication/src/__tests__/chat-messages.test.ts index 76529ff9..2b09caa9 100644 --- a/packages/communication/src/__tests__/chat-messages.test.ts +++ b/packages/communication/src/__tests__/chat-messages.test.ts @@ -112,10 +112,10 @@ describe('chat message copy builders', () => { workspaceDisplayName: 'App', freeformKickoffEnabled: true, kickoffMessage: - 'Checking login redirects in App with Anthropic Claude Fable 5', + 'Checking login redirects in App with Anthropic Claude Fable 5.', modelDisplayName: 'Anthropic Claude Fable 5', }), - ).toBe('Checking login redirects in App with Anthropic Claude Fable 5'); + ).toBe('Checking login redirects in App with Anthropic Claude Fable 5.'); // Flag off (default): free-form is ignored in favor of the template. expect( diff --git a/packages/communication/src/chat-messages.ts b/packages/communication/src/chat-messages.ts index f081e97f..5511b66c 100644 --- a/packages/communication/src/chat-messages.ts +++ b/packages/communication/src/chat-messages.ts @@ -167,7 +167,6 @@ export function normalizeKickoffMessage( // mentions or special link markup when inserted into a section block. text = text.replace(SLACK_CONTROL_TOKEN_PATTERN, ' ').replace(/[<>]/g, ' '); text = text.replace(/\s+/g, ' ').trim(); - text = text.replace(/\.+$/, '').trim(); if (!text) { return undefined;