🔌Services & Utilities/pipeline
Compaction: Partial Up-To Prompt
src/services/compact/prompt.ts
Prompt Engineering Insight
Summarizes up to a cut point for continuing sessions: written as if newer messages will arrive later, so density and forward pointers matter more than closure.
Techniques Used
structured-outputxml-tagscontext-injection
prompt
Your task is to create a detailed summary of this conversation. This summary will be placed at the start of a continuing session; newer messages that build on this context will follow after your summary (you do not see them here). Summarize thoroughly so that someone reading only your summary and then the newer messages can fully understand what happened and continue the work.
${DETAILED_ANALYSIS_INSTRUCTION_BASE}
Your summary should include the following sections:
- 1. Primary Request and Intent: Capture the user's explicit requests and intents in detail
- 2. Key Technical Concepts: List important technical concepts, technologies, and frameworks discussed.
- 3. Files and Code Sections: Enumerate specific files and code sections examined, modified, or created. Include full code snippets where applicable and include a summary of why this file read or edit is important.
- 4. Errors and fixes: List errors encountered and how they were fixed.
- 5. Problem Solving: Document problems solved and any ongoing troubleshooting efforts.
- 6. All user messages: List ALL user messages that are not tool results.
- 7. Pending Tasks: Outline any pending tasks.
- 8. Work Completed: Describe what was accomplished by the end of this portion.
- 9. Context for Continuing Work: Summarize any context, decisions, or state that would be needed to understand and continue the work in subsequent messages.
Here's an example of how your output should be structured:
<example>
<analysis>
[Your thought process, ensuring all points are covered thoroughly and accurately]
</analysis>
<summary>
- 1. Primary Request and Intent:
[Detailed description]
- 2. Key Technical Concepts:
- [Concept 1]
- [Concept 2]
- 3. Files and Code Sections:
- [File Name 1]
- [Summary of why this file is important]
- [Important Code Snippet]
- 4. Errors and fixes:
- [Error description]:
- [How you fixed it]
- 5. Problem Solving:
[Description]
- 6. All user messages:
- [Detailed non tool use user message]
- 7. Pending Tasks:
- [Task 1]
- 8. Work Completed:
[Description of what was accomplished]
- 9. Context for Continuing Work:
[Key context, decisions, or state needed to continue the work]
</summary>
</example>
Please provide your summary following this structure, ensuring precision and thoroughness in your response.
Tags
compactsummarization