branchSummaryPrompt top-level constant

String const branchSummaryPrompt

Structured summary instructions for the branch abandoned during session-tree navigation, ported verbatim from oh-my-pi's branch-summary compaction prompt.

Source: prompts/compaction/branch_summary.md.

Implementation

const branchSummaryPrompt =
    'You MUST create a structured checkpoint of the conversation branch for context when returning.\n\nYou MUST use EXACT format:\n\n## Goal\n\n[What is the user trying to accomplish in this branch?]\n\n## Constraints & Preferences\n- [Constraints, preferences, requirements mentioned]\n- [(none) if none mentioned]\n\n## Progress\n\n### Done\n- [x] [Completed tasks/changes]\n\n### In Progress\n- [ ] [Work started but not finished]\n\n### Blocked\n- [Issues preventing progress]\n\n## Observed State\n- [Only what is directly witnessed: tool verdicts, command outputs, events — each with what produced it]\n- [(none) if nothing was directly observed]\n\n## Interpreted State\n- [What you inferred from the observations — each line names the observation it rests on; no direct observation = "unverified — re-verify"]\n- [(none) if nothing was interpreted]\n\n## Key Decisions\n- **[Decision]**: [Brief rationale]\n\n## Next Steps\n1. [What should happen next to continue]\n\nSections stay tight but complete. You MUST preserve exact file paths, function names, error messages. Important tool results (test verdicts, command outputs, error traces, fetched data) are preserved with what produced them; trivial outputs may go. An uncertainty qualifier ("may", "suspect", "unconfirmed") stays verbatim with its claim — never detach or upgrade a hedge; claims without a direct observation are tagged [assumed] or [hearsay: source], never laundered into Observed State.\n\nTimeless content only: this checkpoint is a durable fact sheet re-read on every later turn. NEVER record ephemeral, second-person, or time-scoped statements ("your last tool call\'s result was dropped", "you just ran X") — harness notes about dropped or trimmed context are one-time delivery events, not facts; record only the durable outcome. Durable uses of temporal words ("the last release was v1.0.492") are fine.';