APP_CSS = """ """ HERO_HTML = """
Agent 5 · Document Intelligence

What did this document say — and can every extracted item be traced back to the source?

Long documents become useful only when people can turn them into structured work products without losing the connection to the original text. This agent parses a document, creates page-aware chunks, extracts lightweight structured intelligence, preserves source lineage, supports search, and exports an auditable record.

""" WHY_IT_MATTERS_HTML = """
The business problem Analysts often re-read documents, copy facts into spreadsheets, and lose track of which page supported a conclusion.
""" CONTROL_BOUNDARY_HTML = """
What this agent does Converts selectable PDF/TXT text into structured, searchable, source-linked outputs using transparent local rules.
What this agent does not claim It does not prove that the document is true, perform OCR on scanned pages, or replace expert review of consequential documents.
""" PIPELINE_HTML = """
1 · Parse
Read selectable PDF or plain-text content and record extraction notes.
2 · Structure
Create validated metadata, page-aware chunks, and lightweight summary fields.
3 · Preserve lineage
Attach extracted facts, dates, entities, risks, and actions to their source page and chunk.
4 · Search
Search the original document chunks rather than searching only a rewritten summary.
5 · Export
Produce structured JSON/CSV records that preserve the extraction and source references.
""" LIMITS_MARKDOWN = """ ### Interpretation boundary The structured findings are **extractions from the supplied document**, not independent verification that the document is correct. - Summary generation uses transparent deterministic rules, not a hosted LLM. - Source lineage means an extracted item can be traced back to the page/chunk where it appeared. - Source lineage does **not** mean the source statement is true. - Scanned PDFs without selectable text may require OCR and are intentionally reported as a limitation rather than silently guessed. - Tables, complex layouts, nuanced entity resolution, and multi-document comparison remain production-upgrade opportunities. - High-stakes legal, medical, financial, compliance, or client documents should receive expert review. """ ARCHITECTURE_MARKDOWN = """ ### Engineering architecture ```text PDF / TXT ↓ Deterministic text extraction ↓ Page-aware normalized text ↓ Overlapping document chunks ↓ Transparent structured extraction ├─ executive summary ├─ key facts ├─ entities ├─ dates ├─ risks └─ action items ↓ Source-lineage mapping ├─ page number └─ chunk ID ↓ Validated Pydantic report ├─ search ├─ JSON export └─ CSV export ``` **Control principle:** parsing and extraction are deterministic application logic. The system does not ask an LLM to invent structure or provenance. """