Pre-commit & CI
VibeXP gates every commit on the same checks CI runs. Installing and respecting the pre-commit hooks is mandatory — it is the fastest way to keep your PR green.
Install the hooks
Section titled “Install the hooks”Do this once per clone:
pre-commit installYou need pre-commit on your machine (pipx install pre-commit or
brew install pre-commit). If it is missing, install it before committing.
What the hooks gate
Section titled “What the hooks gate”The hooks are configured in .pre-commit-config.yaml. They run only against the
relevant files (backend hooks on backend/, frontend hooks on frontend/).
Backend (Go)
Section titled “Backend (Go)”- gofmt check — code must be
gofmt -sclean. - golangci-lint — the full linter suite.
- go vulnerability check —
govulncheck. - go security scan —
gosec. - OpenAPI validation — validates the spec when
openapi.yaml,paths/, orschemas/change. - Block
os.Getenv— config must go through the config package, notos.Getenv.
Frontend (TypeScript / React)
Section titled “Frontend (TypeScript / React)”- lint-staged (format & autofix), eslint, type-check (
tsc), test (Vitest), and build. - security scan, dependency audit (on lockfile changes), and a complexity check.
Repo-wide & policy hooks
Section titled “Repo-wide & policy hooks”- gitleaks — secret detection.
- trailing-whitespace, end-of-file-fixer, check-yaml, check-json, check-added-large-files, check-merge-conflict, check-case-conflict.
- no-commit-to-branch — blocks direct commits to
main. - Block
nolintcomments (backend) and blockeslint-disable(frontend) — suppressions are not allowed outside the documented exceptions.
What CI runs
Section titled “What CI runs”CI runs the same make targets you run locally, so a clean local run is the
best predictor of a green build.
ci-backend.yml
Section titled “ci-backend.yml”download-deps -> format -> build -> test + lint + OpenAPI validation(go mod download, gofmt check, go build, go test -race, golangci-lint,
and OpenAPI spec validation.) The go-version in this workflow must stay in sync
with GO_VERSION (1.25.11) in the Makefile.
ci-frontend.yml
Section titled “ci-frontend.yml”install -> lint -> type-check -> test -> buildReleases
Section titled “Releases”The two components are released independently via prefixed git tags. Creating a GitHub Release with the matching tag builds and publishes the container image:
| Release tag | Image built |
|---|---|
backend-vX.Y.Z | ghcr.io/vibexp/backend:X.Y.Z (+ :latest) |
frontend-vX.Y.Z | ghcr.io/vibexp/frontend:X.Y.Z (+ :latest) |
These are handled by release-backend.yml and release-frontend.yml.
SHA-pinned actions
Section titled “SHA-pinned actions”Every external GitHub Action referenced with uses: must be pinned to a full
40-character commit SHA, with the human-readable version in a trailing comment.
Mutable tag references (@v4, @main) are rejected.
# correct- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# rejected- uses: actions/checkout@v6Internal reusable workflows referenced by path (uses: ./.github/...) are
exempt.