Skip to main content

Quilt Context Lake

Deterministic context automation in Python: collect source material, normalize it, index it, reconcile changes and publish approved snapshots. Agents can invoke the same commands as people. Model enrichment is optional and explicit.

Install

Python 3.10 or newer:

uv tool install quilt-context-lake
qcl --help

Until the first PyPI release, install from GitHub instead:

uv tool install 'git+https://github.com/quiltdata/context-lake.git'

Install quilt-context-lake; type qcl. Installing does not add a skill or start a model. The Python import is context_lake.

Optional dependencies are separated by operation:

uv tool install 'quilt-context-lake[s3,formats,quilt,models]'

Use only the extras you need: s3 for AWS inventory/extraction, formats for PDF/Parquet/XLSX extraction, quilt for Quilt publication, models for Bedrock adapters. Local email conversion, Fathom export, transcript indexing and snapshot reconciliation use the standard library. Quote/schema validation uses jsonschema.

Automate context updates

Start with a directory of source documents or normalized connector exports:

# Deterministic plan; no writes, credentials or model calls.
qcl sync ./source ./lake --source-id team-documents

# Write an immutable content-addressed revision and promote CURRENT.json.
qcl sync ./source ./lake --source-id team-documents --apply

The plan reports added, changed and removed paths. Repeating the same input produces the same revision hash. Modified/deleted files appear in the new snapshot; previous snapshots retain the originals. No modification times or current dates enter the content manifest. Empty directories are not materialized.

SOURCE.json marks an owned output directory so an interrupted first apply can be retried safely. Snapshots live in lake/revisions/<sha256>/files/, with a provenance manifest containing source identity, logical paths, sizes and SHA-256 hashes. CURRENT.json is atomically promoted after copying and checking the new revision. A failed copy leaves the previous pointer intact. An unchanged verified snapshot is reused without allocating a staging copy or rewriting its pointer. The source is never written. Source/output trees must be separate; symlinks and unmanaged nonempty destinations are rejected. Use one writer per output directory; multi-process coordination is not implemented. Storage cleanup and retention policies are not yet automated.

Source adapters and operations

Command Operation Network / model use
email Saved Gmail MIME thread JSON → faithful Markdown Offline; no model
fathom Approved recording IDs or saved transcript → Markdown API only when IDs are fetched; no model
index Transcript metadata, terms and themes → INDEX.md Offline; no model
backfill Repair explicitly selected empty transcript placeholders Explicit Fathom reads; no model
survey S3 inventory, file-kind grouping and optional price estimate S3 reads; no model
extract Source excerpts and bounded table samples → CSV S3 reads; no model
sync File-hash plan and immutable snapshots Offline; no model
publish Approved local/S3 CSV plan → Quilt packages Dry run by default; --yes writes
verify Check enriched row schemas and exact source quotes Offline; no model
enrich Optional model descriptions for extracted rows Explicit billed model calls

Each command has --help. Examples:

qcl email --input /work/threads.json --output-dir /work/gmail
qcl fathom --recording-id 123 --output-dir /work/fathom
qcl index --package-dir /work/fathom --output-dir /work/fathom
qcl survey s3://YOUR-BUCKET/approved/ --objects /work/objects.txt
qcl extract /work/objects.txt /work/inputs.csv
qcl publish /work/plan.csv --registry s3://YOUR-TARGET

Fathom accepts downloaded transcript text offline. Fetching recording IDs uses FATHOM_API_KEY from the environment. AWS operations use the standard credential chain. Offline converters never load credential files. Approve source scope and publication targets before running network operations. An agent skill is an optional interface; the package owns behavior, validation and automation.

Fidelity and current boundaries

Email conversion takes full Gmail thread objects (single, array, or threads envelope), not snippets or raw RFC email. It preserves supplied message IDs, routing/reply/date headers and plain text. HTML-only messages yield explicitly marked derived text. Attachments are listed, not fetched; exports cannot prove completeness beyond the messages supplied. Explicit truncation markers fail.

Fathom import and indexing preserve timestamped source links and support quoted meeting titles. Backfill is scoped to an explicit package directory, with preview, pacing and destination checks. Source objects are never overwritten by import.

Sync currently reconciles local files. It does not automatically poll connectors, remove quoted email history or extract attachments. Run source adapters first, then sync their outputs. Scheduling belongs to the caller (CI or a scheduler). Enrichment is never a prerequisite for a context snapshot.

Python API

from context_lake.sync import plan, apply
from context_lake.email_threads_to_markdown import convert

manifest, changes = plan("./source", "./lake", source_id="team-documents")
# Inspect changes, then apply explicitly:
result = apply("./source", "./lake", source_id="team-documents")

Development

uv venv
. .venv/bin/activate
uv pip install -e '.[dev,s3,formats,quilt,models]'
pytest -q
ruff check src tests
uv build
tests/wheel_smoke.sh

CI tests Python 3.10/3.13, builds wheel/sdist, installs the wheel in an isolated core-only environment, and runs a deterministic workflow outside the checkout.

Releasing

Set the same version in pyproject.toml and src/context_lake/__init__.py, merge to main, then push a matching tag:

git tag v0.1.0
git push origin v0.1.0

The release workflow checks that the tag matches both versions, builds and tests the wheel, and publishes to PyPI with uv publish through trusted publishing in the pypi environment. No API token is stored in GitHub. Tests use synthetic data and emulated S3; no live credentials or model calls. MIT licensed. Interfaces are preview quality; provenance/fidelity tests are retained while the package API evolves.

Extraction limits apply to complete output excerpts, including VCF column headers. DOCX XML has a separate 30 MB expanded-member limit and bounded read; oversize members fail rather than expanding unbounded compressed input. Transcript and index writes refuse symbolic/hard-linked destinations. Publication logs must be outside every local source directory and must not alias a plan/README input, so repeated publishes cannot ingest logs or modify approved inputs.

Metadata

Release files for quilt-context-lake 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quilt-context-lake 0.2.0
File Size Uploaded Provenance Actions
quilt_context_lake-0.2.0.tar.gz 73.1 kB Without provenance Details for quilt_context_lake-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for quilt-context-lake 0.2.0
File Interpreter ABI Platform Actions
quilt_context_lake-0.2.0-py3-none-any.whl Python 3 none any Details for quilt_context_lake-0.2.0-py3-none-any.whl

Total release size: 138.8 kB

Release files / quilt_context_lake-0.2.0.tar.gz

Download URL quilt_context_lake-0.2.0.tar.gz
Size 73.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5b03076b4dfea6ba401aa1fc8a2e3429071689fb65f46206d0a561a89ef8328b
BLAKE2b-256 checksum
How to use checksums
584cb774220b7a87e2b35c1044f2af5a4815d450dd72982e720544947722184c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / quilt_context_lake-0.2.0-py3-none-any.whl

Download URL quilt_context_lake-0.2.0-py3-none-any.whl
Size 65.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a43f669d2b1545e72ac792eef3424aa3e99c5142a479ad3b61830a80f077f240
BLAKE2b-256 checksum
How to use checksums
f6b7a751a4a794f0e7b8a5579179be44dd5ec2b19a089dd7502620f57b4f78bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for quilt-context-lake 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page