Under the hood
How Progris works
Every feature on this site, the chat, the recaps, the graph, the discussions, is built around a single idea: the system physically cannot show you text you have not reached. Here is the whole machine, end to end.
The core idea
One number rules everything
When a book is processed, its text is cut into small passages and every passage gets a permanent position: 1, 2, 3, and so on to the last page. Your bookmark (the chapter you say you have reached) converts to a maximum position. Everything the AI is allowed to see must satisfy one database condition: position at or below your bookmark. Not a guideline for the model. A WHERE clause.
Ingestion
What happens when a book is uploaded
Processing runs in a background worker, so the site stays fast while a book cooks. A few minutes later the book flips to ready and every downstream feature can use it.
Parse
EPUB or PDF is unpacked into chapters, with titles, order and the cover image.
Normalize and chunk
Text is cleaned and cut into overlapping passages a few hundred words long.
Stamp positions
Each passage is stamped with its chapter and a global position. This stamp is what makes spoiler math possible.
Embed
Every passage becomes a 1536-dimension vector, a numeric fingerprint of its meaning.
Store
Passages and vectors land in Postgres (pgvector), side by side, so one query can filter both.
Chapter summaries are not made here. They are generated lazily the first time someone who finished a chapter asks for a recap, then cached for everyone else.
Asking
What happens when you ask a question
A question never goes straight to the model. It goes through a short pipeline that decides what kind of question it is, gathers only legal material, and hands the model a sealed briefing.
Classify
A fast model labels the message: question, recap, theory, character, glossary or chat. It also notes any chapters you named, like recap chapter 19.
Retrieve
Vector similarity plus keyword search find matching passages. If you named a chapter, that chapter is fetched directly. Both run inside the bookmark filter.
Pack
The best passages, chapter summaries and your saved memories are packed into a budget-limited briefing.
Answer
The model streams an answer from that briefing alone, with the passages it used cited as sources.
A recap wants chapter summaries plus the pages near your bookmark. A theory wants the model to react without confirming anything ahead. A glossary lookup wants precise passages. One pipeline, different fuel per intent.
Every answer carries a badge like spoiler-safe, chapters 1 to 20. That is not decoration. It reports the exact range the retrieval layer was permitted to search for that specific answer.
Spoiler defense
Three locks between you and a spoiler
Most AI apps ask the model nicely to avoid spoilers. Progris does not trust the model at all. The model cannot leak chapter 25 because chapter 25 never reaches it. Three independent layers enforce that, and any one of them alone would be enough.
The vector search is filtered
Similarity search runs with the bookmark condition inside the SQL itself. Passages past your position are never candidates, no matter how well they match.
The database re-checks every hit
Results are loaded back through a second query that applies the same condition again. If the index and the database ever disagreed, the row would simply not come back, and the mismatch is logged loudly.
The app validates in process
Before anything is packed for the model, each passage is checked one more time in application code. A bug in either layer above still cannot get text past this gate.
This design is tested with an automated red team: a battery of adversarial prompts (role-play tricks, fake system messages, begging) is fired at a reader parked early in the book, and the run fails if a single future fact leaks.
The graph
A graph that grows with your bookmark
As chapters get read, a background worker extracts characters, places, objects and their relationships from each chapter, one chapter at a time. Everything it learns is stamped with the chapter where it was learned, and the graph you see is filtered by those stamps.
Names are chapter-stamped too
ch 2
a strange noise
first hint
ch 9
the alien
first contact
ch 12
Rocky
named at last
A reader at chapter 10 sees a node called the alien. A reader at chapter 14 sees Rocky, plus the full naming history. Same node, two truthful views. The chapter slider on the graph page replays this evolution.
Try it: the Scranton branch, mapped
Hover anything. Then move your position back and watch the future get sealed.
Hover a node or a line to inspect it.
New at Season 4: Jim Halpert finally dating Pam Beesly
You are caught up. Slide back to Season 1 and watch Roy reappear.
A miniature of the real thing, using a show everyone knows instead of your current book. Slide back to Season 1: Pam is engaged to Roy and Jim just lingers at reception. Slide forward and the graph quietly rewrites itself, exactly like your book graph does as your bookmark moves.
After extraction, the graph is tidied: duplicate entities are merged (the protagonist and Ryland Grace become one node with both names in history), relationships whose supporting quote does not hold up are pruned, and obvious membership links stated in descriptions are added back.
Optionally, a web-search model cross-checks the finished graph against public knowledge of the book. It is deliberately advisory: it can merge obvious alias spellings and flag suspicious links for review, but it is never allowed to delete anything the text itself supports.
Continuity
Recaps, memory, and coming back
The assistant is built for people who read in bursts. Put a book down for a week and it meets you where you left off.
Chapter summaries
Each finished chapter gets a cached summary. Recaps are stitched from these plus the raw pages nearest your bookmark, so they are fast and specific.
Previously on
Away for a few days? Your next chat opens with a short, energizing recap of where the story stands and what you were last theorizing about.
Durable memories
Explanations you were given, terms you asked about and preferences you stated are saved as memories and quietly fed into future answers.
Reading together
Clubs and discussions play by the same rule
The social layer inherits the bookmark math instead of reinventing it. Nobody can spoil you in a club chat or a forum thread, because the same position filter sits underneath.
The club assistant answers as if everyone were at Hala's position, the minimum of all member bookmarks. When she catches up, the whole club's window moves forward, and members get an email nudge.
visible to you at chapter 8
The xenonite reveal broke my brain.
reveals chapter 17, blurred until you get there
Every post is scanned on submit and tagged with the chapter its content reveals, based on what the text says rather than what the author claims. Posts past your bookmark stay blurred until you reach that chapter.
See it hold up yourself
Join, set your bookmark honestly, then try your hardest to make it spoil you.