Goal
Add a shimmer-owned README helper that can refresh the local session pulse snapshot used by README.tsx.
The README wants to show local machine session topology as a deliberate snapshot, not as build-time nondeterminism. The useful numbers are:
- recorded sessions in the local sessions corpus
- live session processes
- branch tips in the session forest
Why tips, not branches
A branch tip is a terminal session head: a session node with no child sessions. That answers the operational question: "how many resumable/current conversation heads exist?"
Counting "branches" is ambiguous and overcounts history: it could mean fork events, root-to-leaf paths, named continuations, or internal split segments. A long linear continuation chain should still count as one tip; a singleton session with no children is also one tip.
Current findings
Read-only probes on Or's machine on 2026-06-23:
sessions query --limit 10000 --sql 'select count(*) from sessions' --format json
# recorded sessions: 659
sessions ps --json
# live session processes: 0
For branch tips, current sessions query does not expose structured session-to-session edges. The only path found today is parsing the fork notice text emitted by sessions copy:
with fork_edges as (
select
session_id as child_session_id,
substr(
text_excerpt,
instr(text_excerpt, 'forked from ') + length('forked from '),
36
) as parent_session_id
from messages
where text_excerpt like '[Session Fork Notice]%'
and instr(text_excerpt, 'forked from ') > 0
)
select
(select count(*) from sessions) as recorded_sessions,
(select count(*) from fork_edges) as fork_edges,
(select count(*) from sessions s where not exists (
select 1 from fork_edges e where e.parent_session_id = s.session_id
)) as branch_tips;
That returned:
recorded_sessions: 659
fork_edges: 3
branch_tips: 657
Proposed shimmer work
Add a task group such as:
shimmer readme sessions-pulse
# or
shimmer readme:sessions-pulse --json
It should:
- Use
sessions query --limit <large> for recorded session count.
- Use
sessions ps --json for live process count.
- Count branch tips from a structured edge source if available.
- Until
sessions query exposes session edges, either:
- use the fork-notice SQL parser with a clear caveat, or
- block on / coordinate a
sessions enhancement that projects sourceSessionId / fork edges into SQL.
- Print a README.tsx snippet or JSON payload that makes refreshing the manual snapshot easy.
- Include BATS coverage with a mocked
sessions binary; tests must not depend on Or-machine session history.
Acceptance
README.tsx documents the refresh command in comments.
README.md includes a manual snapshot with recorded sessions, branch tips, live processes, capture date, and source.
- README generation stays deterministic in CI; no build-time calls to
sessions.
- The helper has tests and handles missing
sessions / jq with clear errors.
Goal
Add a shimmer-owned README helper that can refresh the local session pulse snapshot used by
README.tsx.The README wants to show local machine session topology as a deliberate snapshot, not as build-time nondeterminism. The useful numbers are:
Why tips, not branches
A branch tip is a terminal session head: a session node with no child sessions. That answers the operational question: "how many resumable/current conversation heads exist?"
Counting "branches" is ambiguous and overcounts history: it could mean fork events, root-to-leaf paths, named continuations, or internal split segments. A long linear continuation chain should still count as one tip; a singleton session with no children is also one tip.
Current findings
Read-only probes on Or's machine on 2026-06-23:
For branch tips, current
sessions querydoes not expose structured session-to-session edges. The only path found today is parsing the fork notice text emitted bysessions copy:That returned:
Proposed shimmer work
Add a task group such as:
shimmer readme sessions-pulse # or shimmer readme:sessions-pulse --jsonIt should:
sessions query --limit <large>for recorded session count.sessions ps --jsonfor live process count.sessions queryexposes session edges, either:sessionsenhancement that projectssourceSessionId/ fork edges into SQL.sessionsbinary; tests must not depend on Or-machine session history.Acceptance
README.tsxdocuments the refresh command in comments.README.mdincludes a manual snapshot with recorded sessions, branch tips, live processes, capture date, and source.sessions.sessions/jqwith clear errors.