feat(claudecode): surface aiTitle + idle recap in the chat markdown#239
Open
huangruizhe wants to merge 1 commit into
Open
feat(claudecode): surface aiTitle + idle recap in the chat markdown#239huangruizhe wants to merge 1 commit into
huangruizhe wants to merge 1 commit into
Conversation
Two already-generated artifacts SpecStory drops today, exposed as content: - aiTitle — Claude's stable session title (the `ai-title` record). It has no uuid so the parser drops it; read the latest from the .jsonl (cheap scan) into SessionData.Title and render a `**Title:**` metadata line right after the session-id comment. Blank/omitted when absent. Filenames unchanged. - /recap — the idle "away_summary" (type=system, subtype=away_summary) the user saw on screen. It survives parsing (has uuid) but was never rendered; emit it as a `_**Recap (ts)**_` block where it occurred. Other system records stay hidden. Tests: latest-aiTitle-wins + blank-when-absent, title header present/absent, away_summary rendered (compact_boundary not), recap header format. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opt-in/quality-of-life feature — surfaces two artifacts Claude Code already generates but SpecStory currently drops. Opening for discussion; may be more useful as a personal preference than a default.
aiTitle as header metadata
Claude generates a stable session title (
ai-titlerecord'saiTitle), but it has no uuid so the parser drops it, and filenames are fixed at time-zero from the first message (often uninformative). This reads the latestaiTitlefrom the.jsonl(cheap scan — the title line is tiny), exposes it asSessionData.Title, and renders a**Title:**line right after the session-id comment. Blank/omitted when absent; filenames unchanged (purely additive metadata)./recap (idle away_summary) rendered
The idle "away summary" (
type:system, subtype:away_summary) is shown to the user on screen and already survives parsing (it has a uuid), but is never rendered. This emits it as a_**Recap (ts)**_block where it occurred. Other system records (e.g.compact_boundary) stay hidden.Testing
Unit tests: latest-aiTitle-wins + blank-when-absent, title header present/absent, away_summary rendered (compact_boundary not), recap header format.
gofmt/goimportsclean,golangci-lint run ./...→ 0 issues,go test ./...green.🤖 Generated with Claude Code