Skip to content

fix: clarify single-page toc detection#264

Open
Bortlesboat wants to merge 1 commit into
VectifyAI:mainfrom
Bortlesboat:codex/single-page-toc-guard
Open

fix: clarify single-page toc detection#264
Bortlesboat wants to merge 1 commit into
VectifyAI:mainfrom
Bortlesboat:codex/single-page-toc-guard

Conversation

@Bortlesboat

Copy link
Copy Markdown

Summary

  • clarify the single-page TOC detector prompt so structured document content is not treated as a table of contents just because it has numbered sections
  • call out that a true table of contents should reference content elsewhere in the document
  • add a regression test that captures the prompt sent to the detector

Verification

  • RED: python -m pytest tests/test_toc_detector.py -q failed before the prompt guidance was added
  • GREEN: python -m pytest tests/test_toc_detector.py -q
  • python -m compileall -q pageindex tests
  • git diff --check -- pageindex/page_index.py tests/test_toc_detector.py

Closes #203

@Bortlesboat Bortlesboat marked this pull request as ready for review June 20, 2026 16: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.

Single-page documents incorrectly identified as TOC, skipping all content

1 participant