gitcad / docs / adr / 0004

ADR-0004: Text is source, geometry is a build artifact

Status: accepted

Context

Git fails for CAD today for one reason: files are opaque binary blobs — no diff,

no blame, no meaningful merge. We want git as the genuine backbone (versioning,

branching, PRs, rollback), not a blob store.

Decision

JSON today; a friendlier surface syntax may layer on later). It diffs, blames,

branches, and merges like code. Document.dumps() is byte-stable for equal

documents — a hard requirement, enforced by an invariant test.

by building the model against a kernel. They are content-addressed via

Storage.put_artifact, cached, and never committed as source.

added/removed features, before/after renders in a PR.

Consequences

text. Kernel swaps use shadow-run: build old vs new behind the seam, diff the

resulting geometry, cut over when divergence is acceptable.

the API signature is unchanged; detected by hashing corpus geometry in CI.