docs: add project README, CONTRIBUTING guide, and per-package READMEs
yin+1: Claude Opus 4.6
b8ca6f2
Rewrite the top-level README with:
- Quick start (uv sync + download weights + run bench CLI)
- Architecture diagram with implemented/stub status table
- MVP benchmark results on OmniDocBench-100
- Key data structures (RouterDecision, ExtractedDoc, QualityScore)
- Design principles, CLI reference, output format spec
Add CONTRIBUTING.md covering:
- Dev environment setup
- Project structure overview
- Code conventions (naming, immutability, error handling)
- Feature extractor parity rules (124-column contract)
- How to add a new parser backend
- Commit message conventions
Add per-package READMEs for all 7 workspace packages explaining
each one's role, usage, and scope.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat(core): implement shared data contracts
pdfsys bootstrap
1f63780
Stateless design following datatrove/FinePDFs philosophy — no central
manifest, no status flow, no locks. State is implicit in the presence
of output files on disk.
Public surface:
- types.py RegionType (4 values), Backend (4 values), PdfRecord
- layout.py BBox (normalized [0,1]), LayoutRegion, LayoutPage,
LayoutDocument with has_complex_content property
- extract.py Segment, ExtractedDoc, merge_segments_to_markdown
- serde.py generic dataclass <-> JSON (stdlib only, tolerant
of unknown fields for forward schema evolution)
- cache.py LayoutCache: two-level sharded, atomic writes via
tmp+rename, keyed by (sha256, layout_model_tag)
- config.py PdfsysConfig with per-stage sub-configs
Zero external dependencies: stdlib only. All types frozen+slots for
immutability. RegionType deliberately coarse (TEXT/IMAGE/TABLE/FORMULA)
since we extract text, not reconstruct document structure.
Smoke-tested: 9/9 checks pass — BBox validation, Lay…
chore: bootstrap pdfsys workspace with 7 package skeletons