Thanks for helping make 2papi better. Short version: one spine step = one commit, tests green before you commit, and the enthusiast experience (30-second install, zero required config, zero telemetry) is a product feature — never break it.
cmd/gateway,internal/— the Go gateway (hot path on immutable snapshots; seeinternal/config,internal/router,internal/policy,internal/proxy).control-plane/— Next.js dashboard + operator API (PostgreSQL/Redis), migrations incontrol-plane/migrations/.docs/strategy-v3.md— product strategy (OSS + Enterprise primary, Cloud PLG);docs/build-spine-specs.md— specs for the build spine.CHANGELOG.md— decision journal, newest first.
No local Go required — everything runs through containers:
# Go tests (race detector)
docker run --rm -v "%cd%:/src" -w /src golang:1.22 go test -race ./...
# Full stack (postgres, redis, control-plane, gateway, fake upstreams)
docker compose up --build
# Control-plane full test suite against a disposable database
docker compose run --rm --no-deps \
-e DATABASE_URL=postgres://postgres:postgres@postgres:5432/papi_control_test \
-e TEST_DATABASE_URL=postgres://postgres:postgres@postgres:5432/papi_control_test \
-e ALLOW_PRIVATE_UPSTREAMS=false \
control-plane npm testCI (.github/workflows/ci.yml) runs exactly these: Go vet + -race,
the full control-plane suite with a Postgres service, and a Docker build.
- Tests green, then commit. Every behavior change ships with a test that fails without it.
- Conventional commits (
feat(mcp): …,fix(policy): …,migrations: …). Migrations are their own commit. - CHANGELOG line in the same commit as the change it describes.
- Enterprise features sleep without a license: gate them through
internal/edition/control-plane/lib/edition.tsand verify they fail closed in OSS mode (add a gate test). - Don't break the enthusiast DX: no new mandatory config, no telemetry, no startup dependencies beyond Postgres for the dashboard.
- Migrations are append-only SQL files numbered sequentially; they must
stay idempotent-safe under re-run (
IF NOT EXISTS). - Windows contributors: run Go tests through Docker (
golang:1.22), not a host toolchain.
See SECURITY.md. Never file public issues for vulnerabilities.
Open an issue with the problem first (what broke, what's slow, what's missing) before proposing a design. Keep RFCs small: one problem, one measurable outcome.