feat: Session handoff skill for context preservation - #10
Merged
Conversation
…oss compaction Captures session state (goals, decisions, modified files, next steps) to docs/handoffs/ before compaction and restores it afterward. Supports automatic triggering via PreCompact/PostCompact hooks (Claude Code) and experimental.session.compacting/session.compacted events (OpenCode), plus manual invocation via three new skills: handoff, handoff-resume, and handoff-list. Codex gets manual-only support (no compaction hooks). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Bump version across all 6 manifest files. Add Cross-Agent Handoff section to the handoff skill documenting use cases: agent-to-agent, agent-to-human, human-to-agent, and cross-session handoffs. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a complete handoff system that captures session state before context compaction and restores it afterward, enabling seamless session continuity across agents and tools.
What's included
superpowers-ruby:handoff(create),superpowers-ruby:handoff-resume(restore),superpowers-ruby:handoff-list(browse)hooks/handoff-create(mechanical capture of git state, plan files, modified files) andhooks/handoff-restore(restore + archive consumed handoffs)PreCompact/PostCompactfor Claude Code,experimental.session.compacting/session.compactedfor OpenCode. Codex gets manual-only support (no compaction hooks available).How it works
Manual flow:
/superpowers-ruby:handoffcreates a full LLM-enriched handoff./superpowers-ruby:handoff-resumein a new session reads and restores it.Handoff document structure
Sections: Goal, Current State, Key Decisions, Modified Files, Failed Approaches, Files to Read, Next Steps, Open Questions
Archival
Consumed handoffs get
restored: true+restored_atin frontmatter and move todocs/handoffs/_archive/.Version bump
Bumped to 6.3.0 across all 6 manifest files. Backfilled missing 6.2.0 CHANGELOG entry.
Test plan
hooks/handoff-create --trigger compact— verify doc created indocs/handoffs/with correct frontmatter and mechanical sectionshooks/handoff-restore— verify JSON output withadditionalContext, file marked restored, moved to_archive//superpowers-ruby:handoffmanually — verify all sections filled by LLM/superpowers-ruby:handoff-resumein fresh session — verify context restored/superpowers-ruby:handoff-list— verify table outputhooks/hooks.jsonhas validPreCompactandPostCompactentries.opencode/plugins/superpowers.jshasexperimental.session.compactingandsession.compactedhandlers🤖 Generated with Claude Code