🔌Services & Utilities/pipeline
Compaction: Detailed Analysis (Base)
src/services/compact/prompt.ts
Prompt Engineering Insight
Requires a private <analysis> scratchpad before the public <summary>, forcing chronological reconstruction and explicit coverage checks—chain-of-thought containment that keeps reasoning structured and auditable.
Techniques Used
chain-of-thoughtxml-tagsstep-by-step
prompt
Before providing your final summary, wrap your analysis in <analysis> tags to organize your thoughts and ensure you've covered all necessary points. In your analysis process:
- 1. Chronologically analyze each message and section of the conversation. For each section thoroughly identify:
- The user's explicit requests and intents
- Your approach to addressing the user's requests
- Key decisions, technical concepts and code patterns
- Specific details like:
- file names
- full code snippets
- function signatures
- file edits
- Errors that you ran into and how you fixed them
- Pay special attention to specific user feedback that you received, especially if the user told you to do something differently.
- 2. Double-check for technical accuracy and completeness, addressing each required element thoroughly.
Tags
compactsummarization
Appears in use cases
This prompt is a step in curated flows that show how pieces of Claude Code connect for real tasks.