Skip to content

feat(node-summary): AI summaries with disk cache and LLM-gated invalidation - #45

Merged
SobshDev merged 1 commit into
mainfrom
feat/node-summary-ai
May 19, 2026
Merged

SobshDev merged 1 commit into
mainfrom
feat/node-summary-ai

Conversation

@SobshDev

Copy link
Copy Markdown
Owner

Summary

  • Clicking a code node streams an AI-generated overview into the existing summary sheet (uses the configured default Claude model).
  • Persists results to .graphy/summaries.json keyed by node id; second click on an unedited node is instant with no network call.
  • Fingerprint = SHA-256 of source + sorted caller/callee ids. Mismatch triggers a Haiku validator that judges whether the cached prose is still accurate — only regenerates when the validator says no, so whitespace and trivial refactors keep the cache.
  • Header / facts / callers / callees render live from the graph the whole time. A RefreshCw button forces a regenerate. No-key state points at settings.

Test plan

  • bun run dev, configure a Claude key, click a code node → header is instant; overview streams in; .graphy/summaries.json is created with an entry for that node id.
  • Re-click the same node → overview appears instantly, no Anthropic request.
  • Double-click → save a tiny whitespace-only edit → re-click for summary: brief "Checking cached summary…", then the same cached prose is reused.
  • Edit the function body meaningfully → re-click: cached prose is invalidated, fresh summary streams in.
  • Remove the Claude key → click a node: settings CTA shows, no network calls.
  • Click the Refresh icon → regenerates even when the cache would have been valid.

…ted invalidation

Clicking a code node now streams an AI-generated overview into the
summary sheet. Results are persisted to .graphy/summaries.json keyed
by node id and reused on subsequent clicks. When the node's source or
its caller/callee set has changed, a Haiku validator decides whether
the cached prose is still accurate before regenerating — cosmetic
edits keep the cache warm.

A Refresh button in the sheet header forces a fresh generation
bypassing cache and validator. With no Claude key configured, the
body shows a settings CTA instead of any network calls.
@SobshDev
SobshDev merged commit 2b752b4 into main May 19, 2026
@SobshDev
SobshDev deleted the feat/node-summary-ai branch May 19, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant