Engineering

How the platform behind our projects works.

One monorepo holds the applications, the infrastructure that runs them, the pipelines that ship them and the guardrails that keep agents honest. Here is how the pieces fit.

01 · Build

One build graph for every language.

vitruvian-core is a Bazel workspace on Bzlmod with Aspect rulesets. Go, TypeScript, Python, Kotlin and Swift build and test from the same graph, mostly on hermetic, version-pinned toolchains, so a green build on a laptop means the same thing as a green build in CI.

  • One version per dependency per ecosystem, enforced across the repo.
  • Gazelle generates BUILD files from source, so the graph follows the code.
  • A presubmit planner tests only what a change can affect.
  • Remote cache and execution are available, never required.
  • Every tool is a bazel run target, so agents and people use the same entry points.
  • Expiring version-pin exceptions: canonical versions live in one file (.nvmrc, go.work, .bazelversion); any pin requires an owner and a review_by date enforced by //tools/conformance:check.
02 · Infrastructure

Everything as code. No click-ops.

Cloud projects, deploy identities, DNS and even this repository's own GitHub settings are Pulumi programs written in Go. The homelab cluster reconciles from git through Argo CD. If it is not in a commit, it does not exist.

  • Pulumi in Go for Google Cloud, GitHub and Cloudflare, applied only by CI.
  • Argo CD app-of-apps for the K3s platform: Cilium, Envoy Gateway, Zitadel, CloudNativePG, MinIO.
  • Observability as code: Prometheus, Thanos, Grafana, Loki, Tempo and OpenTelemetry.
  • An enterprise GCP foundation built from our own Pulumi library.
  • Three mutation paths, no fourth: state changes only through Pulumi IaC, Argo CD GitOps, or a GitHub Actions pipeline—never imperative CLI one-offs.
03 · Delivery

Keyless deploys, through one gate.

Every change lands through the merge queue, which tests it against the latest main. Deploys authenticate with Workload Identity Federation, so there are no service-account keys to leak, and each app deploys into its own project behind its own GitHub Environment.

  • Squash-only main behind a merge queue. Agents do not push to main or merge around the queue; the maintainer's break-glass raises an alert.
  • Expand, deploy, contract: Squawk (migration-safety) blocks backward-incompatible SQL on pull requests so blue-green rollouts never break live revisions.
  • Per-app GCP projects and deploy identities, scoped to one service each.
  • Post-merge verification: work is not done until the pipelines on main are green.
  • Secrets never in git: Secret Manager at runtime, sealed-secrets in the cluster.
04 · Distribution

Edit once, mirror out.

The monorepo is the single source of truth. Copybara exports each project to its own public repository on every merge, one way. Outside contributions come back as labelled pull requests that are imported for review here, so history never forks.

  • Ten standalone repositories kept in sync automatically.
  • release-please versions each component from its conventional commits; CLIs install from our Homebrew tap.
  • This website is one of them: edited in the monorepo, published by its mirror.
05 · Agents

AI agents as accountable teammates.

A team of specialist agents (build, infrastructure, cluster operations, application code, testing, security, documentation) works in the repo every day. Each acts under its own GitHub App, follows the same rules as a person, and is stopped by guardrails when it tries a shortcut.

  • One GitHub App per agent, so authorship and approvals are real.
  • One-hour installation tokens minted on demand; private keys stay in the vault.
  • A shared, vendor-neutral AGENTS.md read by every coding tool we use.
  • Guardrails from real incidents, each with a test that proves it fires.
06 · Principles

Rules that keep the repository honest.

Every rule in our engineering standard pairs a one-line why with a mechanical check in CI. If a convention cannot be enforced automatically, we rewrite the workflow until it can.

§2.14 · Triggers

The pipeline is the only trigger

Nothing waits on a laptop keystroke. Builds, Pulumi applies, GitOps syncs and mirrors fire from git merges; local Bazel wrappers exist for preview and break-glass only.

§2.15 · Rollouts

Expand, deploy, contract

Additive, backward-compatible schema and infrastructure changes land before traffic shifts. Destructive _contract migrations are blocked until the old revision drains.

§2.19 · Ratchets

Every fix ships with its guard

A bug fix without a regression test or lint rule is one dependency bump away from returning. Every guard must fail against the broken state before it lands.

§2.12 · Versions

One canonical version; pins expire

Tool versions are declared once (.bazelversion, go.work, .nvmrc). Any temporary exception carries an owner and a review_by date enforced by CI.

§2.17 · Identity

Chained trust anchors

Pipelines federate GitHub OIDC into Google Cloud and identity providers rather than hand-carrying static keys across environments.

§2.16 · Autonomy

Humans only for roots and risk

Agents hold the same tools as maintainers. A person is required only for net-new roots of trust, irreversible teardowns, or licensing and policy decisions.

07 · Archetypes

Category dictates hosting and release.

There is no per-app bike-shedding over runtimes or deployment scripts. Once you know what kind of artifact you are building, its stack, hosting target and release train are already decided.

Archetype Canonical stack Runtime target Delivery & promotion Examples
SaaS web service Node 22, TypeScript, OCI / Docker GCP Cloud Run (per-app project) WIF → Artifact Registry → Pulumi blue/green vitruvian-tabs, oauth-user-inspector
CLI / developer tool Go (rules_go) Developer machine Copybara → release-please → GoReleaser + Homebrew tap vitruvian-devx, vitruvian-homelab
Native & mobile client Swift (macOS), Kotlin (Android), MV3 User Mac, Android or browser Notarized Universal DMG, Homebrew Cask, signed APK vitruvian-atrium, vitruvian-code, vitruvian-remote
Agent / MCP service Node 22, TypeScript (ts_project) Local stdio or daemon Copybara mirror + org-scoped npm package (npx) vitruvian-slack-mcp, vitruvian-code
Platform service Helm + Sealed Secrets 5-node K3s cluster Git merge → Argo CD app-of-apps (selfHeal) Cilium, Envoy Gateway, Zitadel, Thanos
IaC / shared tooling Pulumi in Go, Starlark, Bash Cloud control planes & CI graph bazel run //tools/pulumi:* preview → CI apply repo-config, dev-local, watch-pr

Read the full Application Development Guiding Principles

Stack

What we reach for.

Languages

  • Go
  • TypeScript
  • Python
  • Kotlin
  • Swift
  • C++

Build and ship

  • Bazel
  • GitHub Actions
  • Copybara
  • GoReleaser
  • release-please

Cloud and cluster

  • Google Cloud
  • Cloud Run
  • K3s
  • Cilium
  • Argo CD
  • Cloudflare

Agents

  • MCP
  • GitHub Apps
  • Backstage
  • OpenTelemetry