Repository navigation
Conversation
Sonnet treated USER:/ASSISTANT: transcript entries as a conversation to continue, producing ~700 char in-character responses instead of structured summaries. Three changes prevent this: - System prompt reframed as "SUMMARISATION TOOL" with explicit anti-roleplay instructions - Transcript wrapped in <transcript> XML tags to create a clear data boundary between instructions and input data - Closing instruction added: "Produce the structured summary now"
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical bug where Claude Sonnet was treating the conversation transcript as an ongoing conversation to continue rather than data to analyze, resulting in ~700 character in-character responses instead of comprehensive structured summaries. The fix implements three defensive measures: reframing the system prompt as a "SUMMARISATION TOOL" with explicit anti-roleplay instructions, wrapping the transcript in XML tags to create a clear data boundary, and adding a closing instruction to produce the summary.
Changes:
- Updated system and user prompts with anti-roleplay instructions and explicit section requirements
- Wrapped transcript input in
<transcript>XML tags instead of using bare text after a separator - Version bumped to 0.2.1 with corresponding CHANGELOG entries
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/compactor.mjs | Updated PROMPT and SYSTEM_PROMPT with anti-roleplay instructions; wrapped transcript in XML tags; added closing instruction; removed section numbering |
| package.json | Version bump from 0.2.0 to 0.2.1 |
| .claude-plugin/plugin.json | Version sync from 0.1.1 to 0.2.1 to match package.json |
| CHANGELOG.md | Added comprehensive 0.2.1 release notes documenting the bug fix and changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
System prompt now uses generic format instructions when a custom prompt file is active, avoiding conflict between hardcoded heading names in the system prompt and different sections in the user's custom prompt.
Sonnet treated
USER:/ASSISTANT:transcript entries as aconversation to continue, producing ~700 char in-character
responses instead of structured summaries. Both retry attempts
failed validation, leaving sessions unresumable.
Root cause: The system prompt and input framing were too
weak — Sonnet couldn't distinguish between "here is a
conversation to summarise" and "here is a conversation to
continue".
Changes
explicit anti-roleplay instructions. Conditional: uses
generic format instructions when
SEAMLESS_PROMPT_FILEis active to avoid heading conflicts with custom prompts.
<transcript>XML tags createsa clear data boundary between instructions and input.
"Produce the structured summary now."
removed (
### 1.→##), explicit "include ALL sixsections" rule, 2000 char minimum target.
Test plan
db080aef—produced 15,735 chars valid output (was 676/716 chars)
transcript (326 entries)