Quick Reference: For commands, see CLAUDE.md
This document provides detailed explanations for verification workflows that must run before committing any code changes in the monorepo.
This applies to ALL changes: code modifications, refactoring, bug fixes, new features, or any other changes. No exceptions.
For normal code changes (bug fixes, features, refactoring), run this workflow BEFORE committing:
# Navigate to the service directory where changes were made
cd bin-<service-name>
# Run the verification workflow (NO dependency updates)
go mod tidy && \
go mod vendor && \
go generate ./... && \
go test ./... && \
golangci-lint run -v --timeout 5mWhat this does:
go mod tidy- Cleans up go.mod and go.sum filesgo mod vendor- Vendors dependencies for local builds (vendor is NOT committed to git; Dockerfiles regenerate it during build)go generate ./...- Regenerates mocks and generated codego test ./...- Runs all tests to ensure nothing brokegolangci-lint run -v --timeout 5m- Lints code for quality issues
This runs AFTER making changes but BEFORE git commit.
Only when specifically updating dependencies, run this workflow:
# Navigate to the service directory
cd bin-<service-name>
# Run the full update workflow (WITH dependency updates)
go get -u ./... && \
go mod tidy && \
go mod vendor && \
go generate ./... && \
go test ./... && \
golangci-lint run -v --timeout 5mWhy separate workflows?
go get -u ./...updates ALL dependencies to latest versions- Mixing dependency updates with feature changes makes PR review harder
- Dependency updates should be separate commits/PRs when possible
- For regular code changes, only update dependencies if needed
Both workflows are MANDATORY before committing - Do not skip any step. The monorepo's interdependencies require this to maintain consistency and catch issues early.
Repo-wide doc structure (root CLAUDE.md line cap, per-category README presence) is enforced by scripts/check-docs.sh. Three invocation points:
# Manual
make lint-docs
# Hook (automatic during AI work sessions)
# Wired in .claude/settings.json → PostToolUse → check-docs-size.sh; fires on
# Write|Edit of root CLAUDE.md or root docs/* and runs the script in advisory
# mode (warns rather than blocking).
# CI (follow-up enhancement, not yet wired)Run make lint-docs after any edit to root CLAUDE.md or any file under root docs/ to confirm the cap and per-category README invariants still hold.