You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/agents/subagent-announce.ts
+16-2Lines changed: 16 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1087,10 +1087,24 @@ function buildAnnounceReplyInstruction(params: {
1087
1087
if(params.requesterIsSubagent){
1088
1088
return`Convert this completion into a concise internal orchestration update for your parent agent in your own words. Keep this internal context private (don't mention system/log/stats/session details or announce type). If this result is duplicate or no update is needed, reply ONLY: ${SILENT_REPLY_TOKEN}.`;
1089
1089
}
1090
+
// After delivering to the user, check the project plan and continue or gate.
1091
+
constcontinuationInstruction=
1092
+
` After delivering, check if your active project workspace contains a PROJECT-PLAN.md.`+
1093
+
` If it does, read the Active Workstreams section to identify the next step.`+
1094
+
` If the next step is marked [GATE]: append a gate entry to GATE_CHECKPOINTS.md, tell the user you are waiting for their go-ahead before proceeding, and stop.`+
1095
+
` If the next step has no [GATE] marker: tell the user you are proceeding to it and start it now.`+
1096
+
` If there is no PROJECT-PLAN.md or no clear next action in Active Workstreams: stop normally.`+
1097
+
` When a milestone stage changes, update WORKBOARD.md.`;
1090
1098
if(params.expectsCompletionMessage){
1091
-
return`A completed ${params.announceType} is ready for user delivery. Convert the result above into your normal assistant voice and send that user-facing update now. Keep this internal context private (don't mention system/log/stats/session details or announce type).`;
1099
+
return(
1100
+
`A completed ${params.announceType} is ready for user delivery. Convert the result above into your normal assistant voice and send that user-facing update now. Keep this internal context private (don't mention system/log/stats/session details or announce type).`+
1101
+
continuationInstruction
1102
+
);
1092
1103
}
1093
-
return`A completed ${params.announceType} is ready for user delivery. Convert the result above into your normal assistant voice and send that user-facing update now. Keep this internal context private (don't mention system/log/stats/session details or announce type), and do not copy the internal event text verbatim. Reply ONLY: ${SILENT_REPLY_TOKEN} if this exact result was already delivered to the user in this same turn.`;
1104
+
return(
1105
+
`A completed ${params.announceType} is ready for user delivery. Convert the result above into your normal assistant voice and send that user-facing update now. Keep this internal context private (don't mention system/log/stats/session details or announce type), and do not copy the internal event text verbatim. Reply ONLY: ${SILENT_REPLY_TOKEN} if this exact result was already delivered to the user in this same turn.`+
0 commit comments