Session resume protocol and session repairs handling. Loaded when spellbook_session_init returns resume_available: true, or when session_init returns a repairs array. Triggers: 'resume', 'continue', 'where were we', session resume, session repairs.
التثبيت
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Session resume protocol and session repairs handling. Loaded when spellbook_session_init returns resume_available: true, or when session_init returns a repairs array. Triggers: 'resume', 'continue', 'where were we', session resume, session repairs.
Protocol for restoring prior session state (skill phase, todos, workflow) and handling session repairs from spellbook_session_init.
Did I execute the boot prompt immediately and announce restoration in the greeting, including any repair items?
Invariant Principles
Boot Prompt Executes Immediately - The resume boot prompt runs before any other user interaction; it is not optional or deferrable.
Continuation Intent Governs Action - The user's first message determines whether to resume, start fresh, or default to resume; never assume.
Corrupted State Is Announced, Not Silently Skipped - If todos or workflow state is malformed, inform the user explicitly rather than proceeding with partial data.
Session Resume Protocol
When spellbook_session_init returns resume_available: true, follow this protocol exactly.
Section 0 includes: skill invocation with --resume <phase> if active, Read() for planning docs, TodoWrite() for todo state, behavioral constraints from prior session
After Section 0, announce restoration in greeting
If resume_todos_corrupted: true: announce to user that todo state was malformed and requires manual restoration.
Continuation Detection
Pattern
Intent
Action
"continue", "resume", "where were we"
continue
Execute boot prompt
"start fresh", "new session", "clean slate"
fresh_start
Skip resume, return resume_available: false
"ok", "next", neutral message
neutral
Execute boot prompt (if session exists)
Session Repairs
When spellbook_session_init returns a repairs array, display each repair according to its severity:
Severity
Action
error
Display prominently. These may affect functionality.
warning
Display as informational. Suggest the fix command.
Example Greeting with Repairs
Welcome to spellbook-enhanced Claude.
Repairs needed:
(warnings surfaced by spellbook_session_init; suggest each entry's fix_command)