Pre-commit quality gate. Run before every commit to verify lint, types, tests, and commit message format. Use proactively before git commit.
Before committing, verify ALL of the following:
git diff --name-only --cached # staged files
git diff --name-only # unstaged changes
ruff check aggregator/ --fix
ruff format aggregator/ --check
mypy aggregator/ --strict
pytest tests/ -x --tb=short
All must pass with zero errors.
cd frontend && npm run lint
cd frontend && npm run build
Build must succeed. No lint errors.
Verify the commit message follows Conventional Commits:
<type>(<scope>): <description>
grep -rn "password\|secret\|token\|api.key" --include="*.py" --include="*.js" --include="*.jsx" $(git diff --name-only --cached) 2>/dev/null
Flag any matches for manual review.
If the change introduces new features, API endpoints, or NATS subjects:
docs/ updated?docs/CHANGELOG.md updated?docs/adr/?Output a pass/fail checklist:
Block the commit if any required check fails.