All selected work

Case 01 / Document Context

Independent software

Prepare documents for AI without losing their source.

Document Context converts local files to structured Markdown and source-linked chunks. Its CLI, MCP server, and UI provide a document-preparation layer for AI workflows.

Local software / reviewed artifact

In 30 seconds

The decision behind the work.

Inspect the example
  1. Problem

    Extracted text can lose the section, page context, and source identity a reviewer needs to trace an answer.

  2. My contribution

    I built the local CLI, MCP service, UI, converter routing, and source-linked output artifacts.

  3. Critical decision

    Keep source identity and section context attached to each chunk.

  4. Demonstrated evidence

    A real local run on a fictional Markdown standard: manifest, source hash, 11 chunks, and three reviewed excerpts. The browser replays a snapshot.

Source lineage / real local artifact
SourceFictional Markdown
TransformPassthrough backend
ManifestSHA-256 retained
11 chunksSource + section + page
chunk / 0009Evidence rulespage:2
Reviewed CLI output11 chunks
Sourcefictional-expense-review-standard.mdSHA-256 22611878d966…
Generated chunk / 0009Evidence rulesFictional Expense Review Standard / Evidence rules

Source identity and section path stay attached to the converted text.

Real CLI output; invented source; static browser replay.

CASE EXCERPTA source-linked handoff.

Conversion is useful only if the output retains enough context for a reviewer to trace a chunk back to its source.

Excerpt from a reviewed local CLI artifact using a newly written fictional source. Explore the full artifact below.
Domain
Document AI / data preparation
My role
Designed and built the local converter, routing, artifacts, and source lineage.
Maturity
Prototype
Evidence
Tested artifact
What this case demonstrates

A real CLI run produces a manifest and 11 source-linked chunks from a fictional Markdown standard; integration tests check the fixture. Retrieval quality has not been measured.

Disclosure Independently owned software. The displayed source and walkthrough are fictional; no client material is shown.

Generated artifact / reviewed snapshot

Follow the source into each chunk.

LOCAL CLI ARTIFACT
Explore the conversion flow

From source file to traceable context.

Walk through a reviewed local CLI result, then inspect how its manifest and chunks retain source identity.

DOCUMENT CONTEXT · SAMPLE WORKSPACECLI ARTIFACT
  1. 01Inspect sourceWAITING
  2. 02Normalize textWAITING
  3. 03Build chunksWAITING

Ready to inspect the sample output.

01 / FICTIONAL SOURCEfictional-expense-review-standard.md

Newly written Markdown fixture. The local conversion CLI used the passthrough backend with the rag profile and a 150-token estimated body budget.

SHA-25622611878d9669c399c9f64f76514448c959e947bd7a1410dc70cc874ca13f642
Inspect the sample conversion response
Request shape
POST /demo/convert · fictional-expense-review-standard.md
Response
11 chunks · passthrough backend · source hash retained
Execution
Reviewed snapshot from a local CLI run; the browser makes no conversion or API call
02 / CHUNK MANIFEST

11 generated chunks; select one of three reviewed examples.

03 / CHUNK 0002

Purpose and scope

Section path
Fictional Expense Review Standard / Purpose and scope
Source reference
page:1
Estimated body tokens
109 / 150

“Automated checks identify gaps; they do not approve or reject a claim. A reviewer may request evidence, escalate the case, or approve it after considering the complete record and writing a rationale.”

Excerpt from a generated chunk; local file paths and timestamps are intentionally omitted from this public-facing snapshot.

Artifact / reviewed CLI output

The source travels with the chunk.

This excerpt is from the local conversion run on the fictional standard. The filename, source hash, section, and available page reference remain inspectable beside the text.

sample-chunk.jsonjson
{  "source": "fictional-expense-review-standard.md",  "source_sha256": "22611878d9669c399c9f64f76514448c959e947bd7a1410dc70cc874ca13f642",  "backend": "passthrough",  "chunk_id": "0009",  "section_path": "Fictional Expense Review Standard / Evidence rules",  "source_ref": "page:2",  "text": "P-03, business purpose: every record needs a non-blank business purpose. A non-blank purpose does not establish that the expense is appropriate; it only makes the stated reason available for review."}

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.

DECISION TO SUPPORT

Can this chunk be traced?

Expose source identity, section path, and available page references beside the prepared text.

POC BOUNDARY

Use a fictional standard.

Run one newly written Markdown policy through the real local CLI. No client files, network service, or model call.

EXIT CRITERIA

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.

01 / ADAPTERS

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.

02 / ARTIFACTS

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.

03 / LOCAL CONTROL

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.

IMPLEMENTED SYSTEM FLOW

Document processing pipeline.

The orchestration layer sits between existing parsers and an AI application. It prepares artifacts; it does not run retrieval or generate answers.

  1. 01

    Request

    A local CLI, MCP, or browser request names a file and profile.

  2. 02

    Inspect

    Allowed-root checks, type detection, and a source SHA-256 establish the input.

  3. 03

    Route

    Installed converter adapters are tried in order; failures and fallback are recorded.

  4. 04

    Normalize

    A profile shapes the converter output into structured Markdown.

  5. 05

    Chunk

    Optional section-aware chunks carry source identity and available page context.

  6. 06

    Emit

    Markdown, a manifest, stats, and any warnings are written locally.

Evidence carried forward. The manifest records the chosen backend and warnings; generated chunks carry the source hash and section or page markers where available.

Boundary to review. The portfolio shows a static artifact snapshot. The source tool runs locally, and optional third-party converters may have their own network or model behavior.

WHAT THIS DOES AND DOES NOT PROVE

What this example verifies.

The checked-in integration test verifies this fixture’s hash, backend, chunk budget, and page references; the derivative project’s test suite passes. The example does not measure retrieval quality, prove all page references are accurate for arbitrary formats, or establish production security. Public source release remains separate from this site while repository history and asset review continue.

Open the artifact inspector

Decision notebook

The tradeoff I made.

A useful document handoff includes the evidence needed to question it. Conversion success alone does not prove retrieval quality.

Alternative considered
Pass a single extracted text blob to the downstream application.
Decision and tradeoff
Source-linked chunks require extra metadata and converter-specific handling, but preserve the context a reviewer can inspect.

Evidence limits

  • Retrieval usefulness has not been measured.
  • The passthrough fixture does not establish PDF or Office extraction quality.
  • Allowed-root checks are not a completed production security audit.
Next case / Fictional design conceptAI Use Case Studio

Make an AI use case reviewable before build.