All Prompts/Services & Utilities/Compaction: Detailed Analysis (Partial)
🔌Services & Utilities/pipeline

Compaction: Detailed Analysis (Partial)

src/services/compact/prompt.ts

Prompt Engineering Insight

Same analysis-first pattern as the base variant but scoped to recent messages when earlier context is retained verbatim—teaches the model what slice of history to reason over.

Techniques Used

chain-of-thoughtxml-tagsscope-limiting
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. Analyze the recent messages chronologically. 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