Skip to content

Add book summary pipeline step#81

Merged
nicpottier merged 5 commits intomainfrom
nicpottier/book-summary-step
Feb 19, 2026
Merged

Add book summary pipeline step#81
nicpottier merged 5 commits intomainfrom
nicpottier/book-summary-step

Conversation

@nicpottier
Copy link
Contributor

Adds a new "book-summary" step after text classification that aggregates all page text and generates a brief narrative summary (country/region, grade level, language, themes) via LLM. The summary displays under book metadata on the Extract view and is persisted as a "book-summary" node.

Refactors step mapping into a single source of truth (step-mapping.ts) to prevent future sync issues. All StepName entries are now validated at compile-time with satisfies, and new tests ensure exhaustiveness. This catches bugs like missing mappings that would previously silently drop SSE progress events.

Changes:

  • New pipeline step, prompt, and types for book summary
  • Backend step runner integration
  • Frontend display in BookBanner with sub-step tracking
  • Centralized step mapping with compile-time validation and runtime tests

All tests pass (570 total).

Adds a new "book-summary" step after text classification that aggregates unpruned text from all pages and generates a brief narrative summary (country/region, grade level, language, themes) via LLM. Summary displays under the book metadata on the Extract view and persists as a "book-summary" node.

Refactors step mapping into a single source of truth (step-mapping.ts) to prevent future sync issues. All StepName entries are now validated at compile-time and tested for exhaustiveness, catching bugs like missing step mappings that would previously silently drop SSE progress events.
@nicpottier nicpottier merged commit 22af9bd into main Feb 19, 2026
@nicpottier nicpottier deleted the nicpottier/book-summary-step branch February 19, 2026 18:41
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