Meta Summarize
Overview
Generate concise summaries from ag-ledger entries.
Workflow
- Parse optional arguments:
meta.summarize [scope] [lookup] [groupby].
scope:convo(default): summarize current conversation/session.workspace: summarize all sessions whose first event starts in the current workspace.all: summarize all sessions across all workspaces for the lookup window.
lookup:current_day(default): today from local00:00to now.day: last 24 hours.week: last 7 days.month: last 30 days.
groupby:none(default): no grouping; keep chronological output.session: group output by session id.workspace: group output by workspace path.
- Resolve query targets.
- For
convo, use$CODEX_THREAD_IDas session id (or ask for a session id if unavailable). - For
workspace, use the current working directory as workspace root. - For
all, no scope filter is applied; include all workspaces.
- Load events from ag-ledger using lookup time bounds.
- Run
ag-ledger filter --from ... --to ...and apply--sessionwhen scope isconvo. - For
workspace, include sessions that have asession start:entry in the lookup window and whose start workspace matches the workspace root. - For
all, include every event returned in the lookup window. - If
ag-ledgeris not onPATH, run/Users/kevinlin/code/skills/active/ag-ledger/scripts/ag-ledger.
- Produce output using this exact template:
### [short title of conversation]
- started: [time]
- session: [session id]
summary:
[summary in 1-3 sentences]
timeline:
- ... [pull from ledger]
Field Rules
- Set
startedto the first included event timestamp. - For
convo, setsessionto the conversation session id. - For
workspaceandall, setsessionto a concise multi-session label (single id or session count with sample ids). - Derive
short titlefrom the dominant task (forconvo) or workspace activity (forworkspace). - For
workspace, groupsummaryby workspace path (one grouped line per workspace). - For
workspace, grouptimelineby workspace path, then list chronological events within each workspace group. - For
all, applygroupbyto bothsummaryandtimeline:none: chronological timeline across all events.session: grouped by session id.workspace: grouped by workspace path.
- For
convo, writesummaryin 1-3 sentences based only on ledger events. - For
convo, writetimelineas chronological bullet points from the ledger. - If no entries exist in the selected scope/lookup window, state that explicitly.
Helper Script
Run python3 scripts/summarize_from_ledger.py [scope] [lookup] [groupby] to render the template.
Optional flags:
--session <session-id>: override session id forconvo.--workspace <path>: override workspace root forworkspace.