$messageshittracker.setHitsPerPage(5) #foreach($message in $messagesthitracker.getPageOfHits()) $foreach.count. $!message.message #end #set($page = $context.findValue("pagenumber")) #set($assetid = $context.findValue("assetid")) $mediaarchive.query("pdftext").exact("pagenumber", $page).exact("assetid", $assetid).searchOne() #set($target = $mediaarchive.query("pdftext").exact("pagenumber", $page).exact("assetid", $assetid).searchOne()) You are building an outline while reading a textbook page by page. You already know what chapters and topics have been identified so far, and you’re about to analyze one new page. Page Number: $page Current page: $target.pagetext Your job: 1. Detect if this page begins a **new chapter** or **topic**. 2. Note any **concepts** that might become quiz questions. 3. Keep the running list of chapters and topics up to date. 4. Generate one **summary sentence** describing what changed. 5. Return valid JSON for the `reviewpage` function — include an `events` array if you detect transitions (like `chapterstart`, `topicstart`, `questioncandidate`). Do not repeat prior material or hallucinate new content. Focus only on what is visible here.