Skip to content

0002. Private source repository, public OSS sync, and cloud switch

  • Status: Accepted
  • Date: 2026-11-07

Customer.lite will ship as an open-source self-hosted edition and a managed service. Keeping one codebase avoids drift, but cloud-only code and private operating rules must not leak into the public repository.

  • This private repository is the source of truth. A public repository is created later and receives squashed sync commits.
  • Billing code lives in core. The environment variable CUSTOMER_LITE_CLOUD switches between cloud and self-hosted behaviour.
  • Cloud-only marketing, analytics, and operations code plugs in only through explicit extension points that have no-op defaults in core. No core module imports cloud-only code; only the composition root selects it.
  • Private paths (AGENTS.cloud.md, cloud/ including cloud/AGENTS.md, docs/cloud/) are excluded from the sync. AGENTS.md is identical in both repositories; repository-wide cloud rules go in AGENTS.cloud.md and rules for code under cloud/ go in cloud/AGENTS.md.
  • No secrets or operator-specific values in code or history. Configuration comes from environment variables and Cloudflare secrets.
  • Every public file must be safe to publish, including AGENTS.md, skills, and ADRs.
  • A history leak cannot be fixed by deleting the file later, so secret scanning (gitleaks) runs in pre-commit and CI once code exists.
  • Open: sync tooling, public repository creation date, license (AGPL-3.0 intended) and CLA.