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
refactor: deduplicate compaction prompt between system and user messages
Move the authoritative structured summary template into the system prompt
(compaction.txt) and simplify the inline defaultPrompt in compaction.ts to
a short user-side reminder. This eliminates the duplicated section headings
and template structure that existed in both places.
@@ -241,34 +242,11 @@ import { SessionCompactionPolicy } from "./compaction-policy"
241
242
{sessionID: input.sessionID},
242
243
{context: [],prompt: undefined},
243
244
)
244
-
constdefaultPrompt=`Provide a detailed prompt for continuing our conversation above.
245
-
Focus on information that would be helpful for continuing the conversation, including what we did, what we're doing, which files we're working on, and what we're going to do next.
246
-
The summary that you construct will be used so that another agent can read it and continue the work.
247
-
Do not call any tools. Respond only with the summary text.
248
-
249
-
When constructing the summary, try to stick to this template:
250
-
---
251
-
## Goal
252
-
253
-
[What goal(s) is the user trying to accomplish?]
254
-
255
-
## Instructions
256
-
257
-
- [What important instructions did the user give you that are relevant]
258
-
- [If there is a plan or spec, include information about it so next agent can continue using it]
259
-
260
-
## Discoveries
261
-
262
-
[What notable things were learned during this conversation that would be useful for the next agent to know when continuing the work]
263
-
264
-
## Accomplished
265
-
266
-
[What work has been completed, what work is still in progress, and what work is left?]
267
-
268
-
## Relevant files / directories
269
-
270
-
[Construct a structured list of relevant files that have been read, edited, or created that pertain to the task at hand. If all the files in a directory are relevant, include the path to the directory.]
271
-
---`
245
+
constdefaultPrompt=[
246
+
"Summarize the conversation for another agent continuing this work.",
247
+
"Focus on goals, constraints, discoveries, progress, relevant files, and unresolved issues.",
0 commit comments