on this page ▾
[ ARCHITECTURE ] 0001 ARCHITECTURE BASELINE

ADR 0001 — Architecture baseline#

Status: accepted (2026-12-04)

Context#

ResearchVC must version research state (files, experiments, datasets, claims, graph) with Git-level reliability, work offline, and layer cloud collaboration and AI on top.

Decisions#

  1. Python for the engine, CLI, SDK and API. Researchers live in Python; one language for engine and server lets the server reuse the exact same object parsing and hashing code, which removes a whole class of cross-implementation hash mismatches.
  2. Own object format, not Git objects. Git trees cannot carry typed research objects, graph snapshots or provenance. We keep Git interoperability by referencing Git commits (code_refs) rather than by storing research data inside Git.
  3. Blob id = SHA-256 of raw bytes; structured object id = SHA-256 of a canonical JSON envelope. A blob id therefore equals the familiar sha256sum of the file, which makes dataset manifests and external checksum verification trivial. See docs/protocol/object-model.md.
  4. Flat manifests (sorted path → entry) instead of hierarchical trees. Simpler diff, merge and checkout. Cost: a commit that touches one file in a 1M-file repo re-writes the whole manifest. Accepted for v1; manifests are versioned (schema_version) so a sharded manifest can be introduced later with an explicit migration.
  5. SQLite index (.rvc/index.db) for staging, stat cache, and the staged research graph. SQLite gives transactional updates and crash safety for free.
  6. Postgres-backed job queue (SELECT … FOR UPDATE SKIP LOCKED) instead of Celery. Jobs need durability and transactional enqueue alongside the data they process; a Postgres queue gives both with zero extra infrastructure. Redis is used for rate limiting and caching only and is optional (in-memory fallback in development).
  7. No graph database. Adjacency tables + recursive CTEs (spec §10.5).
  8. Built-in local auth + optional external JWT (Supabase-compatible). The product must be deployable without paid services; Supabase/OIDC is supported through JWT verification configuration.
  9. AI is off by default. External providers require ai.enabled = true and ai.allow_external = true per project. Local providers (Ollama) need only the first.
  10. License. Engine/CLI/SDK/parsers are intended for Apache-2.0. The hosted apps are also placed under Apache-2.0 for now; a different license for hosted components is a business decision that is explicitly not made here (flagged in README).

docs/adr/0001-architecture-baseline.md