This turns the SOP into mechanical execution.
Nx usage
create-nx-workspacenx graphproject.json for global commands (setup, dev, test)Rule: no handwritten structure until Nx exists
Nx usage
domain, application, infra, ui)Rule: architecture violations fail lint, not review
Nx usage
nx run-commands targets:
infra:upinfra:downinfra:resetinfra:flags-up (start Flipt binary)infra:flags-down (stop Flipt)infra:flags-check (validate features.yaml)Rule: infra is treated like code
Nx usage
libs/observability lib containing:
infra:otel-up (start OTel Collector)infra:otel-down (stop OTel Collector)infra:otel-validate (validate config)Stack: OpenTelemetry SDK → OTel Collector → OpenObserve + Vanta
Rule: apps don’t roll their own telemetry; all signals via OTel
Nx usage
contracts libTargets:
contracts:generatecontracts:checkRule: contracts are source of truth
Nx usage
Custom generators:
nx g bounded-contextnx g adapternx g api-surfaceRule: if you repeat structure twice, make a generator
Nx usage
@nx/vite plugin infers test target from vite.config.tsnx test <project> — Vitest unit/integrationnx affected -t test — Only test changed projectsnx e2e <app>-e2e — Playwright E2Ejust test-python (pytest)| Stack: Vitest 3.x | Playwright 1.49.x | pytest 8.x | Testcontainers | MSW |
Rule: test scope matches change scope; integration tests use Testcontainers
Nx usage
Rule: slices cross layers, not projects
Nx usage
libs/config (OpenFeature client)nx affected:*infra:flags-check to validate features.yamlRule: shipping ≠ enabling
Nx usage
Rule: hardening is continuous, not a phase at the end