0002. Private source repository, public OSS sync, and cloud switch
- Status: Accepted
- Date: 2026-11-07
Context
Section titled “Context”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.
Decision
Section titled “Decision”- 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_CLOUDswitches 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/includingcloud/AGENTS.md,docs/cloud/) are excluded from the sync.AGENTS.mdis identical in both repositories; repository-wide cloud rules go inAGENTS.cloud.mdand rules for code undercloud/go incloud/AGENTS.md. - No secrets or operator-specific values in code or history. Configuration comes from environment variables and Cloudflare secrets.
Consequences
Section titled “Consequences”- 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.