feat(session-handoff): use entire CLI machine-readable export surface (#24) · Entire
feat(session-handoff): use entire CLI machine-readable export surface (#24)
17a1dac→main·
alishakawaguchi·2mo ago·3 files·+79 added/-62 removed
* 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>.jsonwithentire 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
--jsonand iterates--raw-transcript --session-index Nso 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
* 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 --jsoninstead 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
* chore: bump version to 0.4.0
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
Co-authored-by: Claude Opus 4.7 (1M context) noreply@anthropic.com
Sessions
Transcript data is unavailable for this checkpoint.
Changes
3
Mgemini-extension.json+1/-1
Mpackage.json+1/-1
skills/session-handoff
MSKILL.md+77/-60
1
2
3
4
4
5
{
"name": "entire",
"description": "Cross-agent skills and commands powered by Entire.",
"version": "0.3.0"
"version": "0.4.0"
}
Mgemini-extension.json+1/-1
1
2
3
3
4
5
6
{
"name": "skills",
"version": "0.3.0",
"version": "0.4.0",
"type": "module",
"main": ".opencode/plugins/entire.js"
}
Mpackage.json+1/-1
10 unmodified lines
11
12
13
14
15
16
17
14
15
16
17
18
22
23
24
25
19
20
21
27
22
23
29
24
25
31
26
27
28
29
30
34
35
31
37
32
33
39
34
35
41
36
37
38
39
40
44
45
41
47
48
49
50
51
52
53
54
55
56
57
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
60
57
58
62
59
60
64
61
62
66
63
64
65
66
67
68
69
70
69
71
72
73
72
74
75
76
75
76
77
78
79
80
81
79
82
83
81
82
83
84
85
86
84
85
88
86
87
90
88
89
92
90
91
94
92
93
94
95
96
97
98
96
99
100
101
102
103
104
105
106
107
100
101
102
108
109
110
105
111
112
113
108
114
115
110
116
117
112
118
119
114
120
121
122
123
116
124
125
118
126
127
128
129
130
120
131
132
133
134
135
136
137
10 unmodified lines
`Entire Session Handoff:`
followed by a blank line, then the content. The header applies to the full compaction-summary flow, including the "Unanswered Question" branch (which is still a successful run — the skill summarized the transcript and surfaced the question).
- Apply the header to the **first response of the invocation only.** Do not re-print it on follow-up turns within the same invocation (e.g. after the user answers the surfaced unanswered question).
- Do **not** include the header on error or early-exit responses (e.g. no `.git/entire-sessions/` directory, no sessions found after filtering, transcript file missing at the path the session JSON points to). The header's presence should signal that the skill ran and produced real output.
followed by a blank line, then the content. Apply the header to the **first response of the invocation only** — not on follow-up turns and not on error / early-exit responses (no sessions found, transcript missing). Its presence signals the skill ran and produced real output. The "Unanswered Question" branch still gets the header.