explain: enrich JSON summary and surface list truncation · Entire
Explain: Enrich JSON Summary and Surface List Truncation
cdd32fa → main ·
computermode · 2w ago · 6 files · +217 added / -27 removed
--jsonnow exports the full persisted session summary (friction, open_items, and categorized learnings), not just intent/outcome, so scripts and dashboards see what the prose view already renders- The prose branch list notes on stderr when checkpoints are hidden beyond the 100 cap, pointing at
--json --limit; wording stays honest ("more exist", never an exact remaining count) --generateon imported checkpoints now fails fast on metadata alone, before the transcript content load- Clearer no-Entire-trailer message distinguishing a found-but-untracked commit from a missing one
Sessions
7460467d8fa2 View transcript
Changes
6
- cmd/entire/cli
- Mcheckpoint_group.go +1/-1
- Mexplain.go +49/-15
- Mexplain_export.go +36/-5
- Mexplain_export_test.go +78
- Mexplain_test.go +47/-6
- integration_test
- Mimport_claude_test.go +6
65 unmodified lines
if checkDisabledGuard(cmd.Context(), cmd.OutOrStdout()) {
return nil
}
return runExplainBranchWithFilter(cmd.Context(), cmd.OutOrStdout(), noPagerFlag, sessionFlag)
return runExplainBranchWithFilter(cmd.Context(), cmd.OutOrStdout(), cmd.ErrOrStderr(), noPagerFlag, sessionFlag)
},
}
Mcmd/entire/cli/checkpoint_group.go +1/-1
121 unmodified lines
/* Further content omitted for clarity */
Mcmd/entire/cli/explain.go +49/-15
340 unmodified lines
/* Further content omitted for clarity */
// checkpointSessionSummary is the structure for summarizing session data.
type checkpointSessionSummary struct {
Intent string json:"intent,omitempty"
Outcome string json:"outcome,omitempty"
Intent string json:"intent,omitempty"
Outcome string json:"outcome,omitempty"
Learnings *checkpointSessionLearnings json:"learnings,omitempty"
Friction []string json:"friction,omitempty"
OpenItems []string json:"open_items,omitempty"
}
// checkpointSessionLearnings mirrors checkpoint.LearningsSummary but marks every field omitempty so empty categories drop out of the export instead of serializing as empty arrays.
type checkpointSessionLearnings struct {
Repo []string json:"repo,omitempty"
Code []checkpoint.CodeLearning json:"code,omitempty"
Workflow []string json:"workflow,omitempty"
}
// summaryToExportJSON projects the full persisted summary onto the export struct. func summaryToExportJSON(s *checkpoint.Summary) *checkpointSessionSummary { out := &checkpointSessionSummary{ Intent: s.Intent, Outcome: s.Outcome, Friction: s.Friction, OpenItems: s.OpenItems, } if hasAnyLearning(s.Learnings) { out.Learnings = &checkpointSessionLearnings{ Repo: s.Learnings.Repo, Code: s.Learnings.Code, Workflow: s.Learnings.Workflow, } } return out }