THE PROBLEM
Plain text loses context.
AI workflows often start with PDFs, spreadsheets, slides, and other documents. Turning them into a single text blob can lose structure and make it hard to trace a response back to its source. Document Context explores a local preparation layer: inspect, convert, normalize, chunk, and emit artifacts that carry source identity.
ILLUSTRATIVE DISCOVERY BRIEF
Define conversion criteria.
This brief is a portfolio framing, not a record of client discovery. The imagined users are an AI application team preparing retrieval inputs, a reviewer checking provenance, and an operator who wants to keep documents local.
Can this chunk be traced?
Expose source identity, section path, and available page references beside the prepared text.
Use a fictional standard.
Run one newly written Markdown policy through the real local CLI. No client files, network service, or model call.
Inspect the artifacts.
Confirm the source hash, selected backend, chunk budget, and page context in generated output and tests.
A real deployment would also need format-by-format quality checks, security review, privacy handling, and an evaluation of retrieval usefulness.
ARCHITECTURE DECISIONS
Routing and source lineage.
Route to existing converters.
The system does not claim to parse every format itself. It selects installed tools such as MarkItDown, Docling, PyMuPDF4LLM, Pandoc, or openpyxl, then normalizes their output. Backend availability and quality vary by file type.
Include source metadata with chunks.
Conversions can emit Markdown, stats, a manifest, and chunks with source SHA-256, section path, and page context where markers exist. The manifest records the selected backend and warnings.
Keep document processing local by default.
The CLI and MCP server are designed for local files and allowed-root path checks. That boundary reduces remote exposure; it is not a claim of a completed security audit.
REPRODUCIBLE EXAMPLE
Inspect the generated artifact.
The inspector above is a static, reviewed snapshot from a real local CLI run—not a browser converter. The source is a newly written fictional expense standard. In this run, Markdown used the passthrough backend, produced 11 chunks, and reported no conversion warnings. It does not demonstrate PDF or Office extraction quality.