Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,10 @@ interface ChatReplySatisfactionState {
replyPurpose?: ChatReplyPurpose;
recordedAtMs?: number;
satisfiedTurnMessageTs?: string;
lastNonSlackWorkAfterSatisfactionAtMs?: number;
terminalSatisfiedTurnMessageTs?: string;
terminalSatisfiedAtMs?: number;
terminalSatisfactionTool?: 'send_chat_reply' | 'report_to_parent_session';
lastNonSlackWorkAfterTerminalAtMs?: number;
lastSilenceReminderAtMs?: number;
/** Failed chat delivery attempts since the last successful post this turn. */
deliveryFailureCount?: number;
lastDeliveryFailureAtMs?: number;
Expand Down Expand Up @@ -160,7 +158,6 @@ export function recordChatTurnStart(input: {
? {
initialAckReminderAtMs: undefined,
satisfiedTurnMessageTs: undefined,
lastNonSlackWorkAfterSatisfactionAtMs: undefined,
terminalSatisfiedTurnMessageTs: undefined,
terminalSatisfiedAtMs: undefined,
terminalSatisfactionTool: undefined,
Expand Down Expand Up @@ -315,7 +312,6 @@ export function recordChatReplySatisfaction(input: {
...(satisfiesCurrentTurn
? {
satisfiedTurnMessageTs: currentTurnMessageTs,
lastNonSlackWorkAfterSatisfactionAtMs: undefined,
}
: {}),
// A clarification reply is a terminal handoff like a closeout: the turn
Expand Down
8 changes: 4 additions & 4 deletions apps/worker/src/mcp/roomote-mcp-server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1600,8 +1600,8 @@ if (
? 'Use the optional suggestions parameter when the automation prompt explicitly asks for task suggestions, launchable follow-ups, or help taking concrete actions. Do not infer suggested-task intent from a request that only asks for a summary or action-item list. Suggestions are posted inside the originating conversation. Do not use suggestions for ordinary summary bullets, status updates, questions, speculative ideas, or work explicitly identified in the conversation as already underway. When suggestions are present, the tool automatically adds the surface-specific instruction for starting one; do not write a separate launch instruction. '
: '';
const chatReplyDescription = reportsToParentSession
? 'Session-internal: reports lifecycle information privately to the parent Session, which owns any user-visible reply. The report may be a complete engineering handoff and is never posted directly to the user. The kickoff already acknowledged the request, so do not send another generic ack. Use progress to pass concrete findings, blockers, meaningful work milestones, required input, or a brief note after roughly 10 minutes of silence. Describe the work itself without labeling the message as a progress update or using policy vocabulary such as phase transition, checkpoint, lifecycle, or user-facing. Use closeout for the final result or blocker and clarification when user input is needed. Ack and progress keep the coding task active.'
: `${chatReplySurfaceLabel}-visible: posts a lifecycle reply in the originating ${chatReplySurfaceLabel} thread. Choose the current ${chatReplySurfaceLabel} turn purpose before writing: ack, progress, closeout, or clarification. Use ack for the first visible response when work will continue; use progress only when the message adds new decision-useful state or prevents a 10-minute silence gap; use closeout for the answer, result, blocker, or handoff; use clarification for lightweight non-secret questions. Use closeout to finish a turn with an outcome; a clarification also ends the turn when the next step depends on the user's answer — do not follow it with a separate "waiting on your answer" message. Ack and progress keep the ${chatReplySurfaceLabel} turn open. Use it again on later ${chatReplySurfaceLabel} turns when they need another direct reply; an earlier thread reply does not count as the reply for the current turn. For routine successful closeouts, focus on the shipped change and any blocker or delivery outcome that changes the user's next step; do not include exact validation commands, passed-check ledgers, or proof-applicability narration unless the user asked or that detail materially changes what they should do next. ${chatReplyMarkdownGuidance}${chatReplySourceLinkingGuidance}${chatReplyEmailCadenceGuidance}${chatReplySuggestionGuidance}Write the message so its content clearly matches the selected purpose.`;
? 'Session-internal: reports lifecycle information privately to the parent Session, which owns any user-visible reply. The report may be a complete engineering handoff and is never posted directly to the user. The kickoff already acknowledged the request, so do not send another generic ack. Use progress to pass concrete findings, blockers, meaningful work milestones, or required input. Describe the work itself without labeling the message as a progress update or using policy vocabulary such as phase transition, checkpoint, lifecycle, or user-facing. Use closeout for the final result or blocker and clarification when user input is needed. Ack and progress keep the coding task active.'
: `${chatReplySurfaceLabel}-visible: posts a lifecycle reply in the originating ${chatReplySurfaceLabel} thread. Choose the current ${chatReplySurfaceLabel} turn purpose before writing: ack, progress, closeout, or clarification. Use ack for the first visible response when work will continue; use progress only when the message adds new decision-useful state; use closeout for the answer, result, blocker, or handoff; use clarification for lightweight non-secret questions. Use closeout to finish a turn with an outcome; a clarification also ends the turn when the next step depends on the user's answer — do not follow it with a separate "waiting on your answer" message. Ack and progress keep the ${chatReplySurfaceLabel} turn open. Use it again on later ${chatReplySurfaceLabel} turns when they need another direct reply; an earlier thread reply does not count as the reply for the current turn. For routine successful closeouts, focus on the shipped change and any blocker or delivery outcome that changes the user's next step; do not include exact validation commands, passed-check ledgers, or proof-applicability narration unless the user asked or that detail materially changes what they should do next. ${chatReplyMarkdownGuidance}${chatReplySourceLinkingGuidance}${chatReplyEmailCadenceGuidance}${chatReplySuggestionGuidance}Write the message so its content clearly matches the selected purpose.`;
roomoteMcpServer.registerTool(
lifecycleToolName,
{
Expand All @@ -1614,8 +1614,8 @@ if (
.enum(['ack', 'progress', 'closeout', 'clarification'])
.describe(
reportsToParentSession
? 'The lifecycle purpose of this private report to the parent Session. The kickoff already acknowledged the request, so avoid another generic ack. Use progress for concrete findings, blockers, meaningful work milestones, required input, or a brief update after roughly 10 minutes of silence. Use closeout for the final result or blocker and clarification when user input is needed.'
: `The lifecycle purpose for this ${chatReplySurfaceLabel}-visible reply. Choose ack for the first visible response before work that will not post to ${chatReplySurfaceLabel}, progress for new useful state or silence prevention, closeout for the final answer/result/blocker/handoff, or clarification for a lightweight question. Use closeout before final task completion.`,
? 'The lifecycle purpose of this private report to the parent Session. The kickoff already acknowledged the request, so avoid another generic ack. Use progress for concrete findings, blockers, meaningful work milestones, or required input. Use closeout for the final result or blocker and clarification when user input is needed.'
: `The lifecycle purpose for this ${chatReplySurfaceLabel}-visible reply. Choose ack for the first visible response before work that will not post to ${chatReplySurfaceLabel}, progress for new useful state, closeout for the final answer/result/blocker/handoff, or clarification for a lightweight question. Use closeout before final task completion.`,
),
message: nonEmptyStringSchema.describe(
(reportsToParentSession
Expand Down
Loading
Loading