feat(session-handoff): use entire CLI machine-readable export surface (#24)

main

Commit

alishakawaguchi4mo ago
  • feat(session-handoff): use entire CLI machine-readable export surface

Rewrite the session handoff flow on top of the JSON / transcript flags added in entireio/cli#1144 (entire 0.6.2+):

  • Replace entire status + reading .git/entire-sessions/<id>.json with entire session list --json + entire session info <id> --transcript — the skill no longer reaches into Entire's internal storage layout.
  • Worktree filtering uses bidirectional path-prefix matching with a fallback to the unscoped list, so subdirectory invocation no longer hard-fails.
  • Checkpoint flow now enumerates sessions via --json and iterates --raw-transcript --session-index N so multi-session checkpoints no longer silently drop earlier sessions.
  • Trim duplicated rules, redundant pipelines, and storage-internals prose surfaced by /simplify and /codex:adversarial-review.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com Entire-Checkpoint: 80109082dc65

  • feat(session-handoff): canonical worktree path, self-handoff, bounded checkpoints, Gemini specifics, pick announcement

Six follow-ups surfaced by reviewing the flow end-to-end:

  • Resolve the canonical worktree path via entire session current --json instead of guessing with bidirectional cwd prefix-match. Prefix-match is now the fallback when no active session exists in the worktree.
  • Self-handoff: when the "drop self" filter empties the list, keep self and summarize the current session for compaction instead of refusing. The pick announcement flags it.
  • Cap multi-session checkpoint streaming at 8 sessions. Sort by timestamp descending and elide the oldest, noting the cap in the announcement.
  • Gemini CLI extraction: enumerate the four common message-array keys (messages/contents/history/turns) and the three content-payload shapes (parts[].text / content / text), with a concrete jq template to extract role + text chronologically.
  • Empty-section rule: skip summary sections with no genuine content rather than hallucinating filler. Examples: one-bug-fix sessions legitimately have only Task Overview + Current State + Next Steps.
  • Pick announcement: print one line before the summary (Handing off <agent> session — <turns> turns, last active <ago>, ID <short-id>.) so the user can catch a wrong pick early.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com Entire-Checkpoint: 78618657a89b

  • chore: bump version to 0.4.0

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com Entire-Checkpoint: 461b2ad0a096


Co-authored-by: Claude Opus 4.7 (1M context) noreply@anthropic.com

Checkpoints

look at https://github.com/entireio/cli/pull/1144 can we update handoff session to use the new cli updates

Claude Code
View session
Checkpoint 1

need to bump version

Claude CodeOpus 4.7[1m]
View session
Checkpoint 2