# Docpipe

**Convert documents into exactly the representation a model — or a human — needs.**

Docpipe is a local, deterministic desktop app (and CLI) that turns PDFs, Markdown, and HTML
into:

- **Clean Markdown** with source maps back to page/bbox provenance
- **Prompt bundles** — task-ready context with an exact-token factsheet
- **RAG packages** — chunks, hierarchy metadata, assets
- **Token-light ingest packages** — sharp text for exact facts, dense visual pages for
  gist-safe bulk, recoverable originals for everything imaged

One rule drives everything: *convert to a source-mapped IR first, then choose the cheapest
safe representation per block.* Exact-risk content (IDs, hashes, numbers, clauses) never
gets silently rasterized.

## Principles

- **Local-first.** The deterministic core makes zero network calls.
- **Deterministic.** Same input + same config ⇒ byte-identical output, verified in CI.
- **Honest.** Lossy modes are opt-in, gated per model on measured accuracy, and always
  paired with factsheets and rehydration handles.

## Project state

Wave 0 complete. This repo contains the build plan plus the foundry outputs future lanes
consume: a pinned Rust workspace, canonical IR schemas, and a deterministic fixture corpus.

| Doc | What |
|---|---|
| [docs/DECISIONS.md](docs/DECISIONS.md) | Locked stack and design decisions |
| [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | Rust workspace architecture |
| [docs/GUI-SPEC.md](docs/GUI-SPEC.md) | Tauri desktop app specification |
| [docs/SKILL-ADAPTER.md](docs/SKILL-ADAPTER.md) | Docpipe as a harness skill: agent-mode CLI + Claude Code/Codex adapters |
| [docs/ADOPTION.md](docs/ADOPTION.md) | Install friction audit + adoption architecture (one-liner, self-emitting skill, MCP) |
| [docs/context-calls/README.md](docs/context-calls/README.md) | Diagramming context pack for customer education and current architecture capture |
| [docs/DISTRIBUTION.md](docs/DISTRIBUTION.md) | Packaging, signing, auto-update, CI/CD |
| [docs/KEY-CEREMONY.md](docs/KEY-CEREMONY.md) | Signing/update key runbook (G5 entry requirement) |
| [docs/EVAL-PLAN.md](docs/EVAL-PLAN.md) | Metrics, fixtures, model capability gating |
| [conveyor/CONVEYOR.md](conveyor/CONVEYOR.md) | The milestone conveyor belt (waves → lanes → gates) |
| [docs/HANDOFF.md](docs/HANDOFF.md) | Original combined research handoff |
| [schemas/](schemas/) | Frozen Wave 0 JSON Schemas emitted from `docpipe-ir` |
| [fixtures/](fixtures/) | Wave 0 fixture corpus and checksum manifest |

Built as a conveyor: an orchestrator cuts scoped dispatch packets, a parallel Codex
workforce implements them, and mechanical gates (build, tests, determinism, acceptance
thresholds) decide what ships.
