Lint, run tests, then create a semantic git commit for staged or unstaged changes
Create a git commit following these steps:
!git diff --stat HEAD
!git status --short
For any changed Python files in backend/:
cd backend && uv run ruff check --fix app/
For any changed TypeScript/TSX files in frontend/:
cd frontend && npm run lint -- --fix 2>/dev/null || true
If backend files changed:
cd backend && uv run pytest -x -q
If frontend files changed and a test script exists, run it. If no frontend tests are configured, skip silently.
Stop and report to the user if any step fails — do not proceed to commit.
Stage all tracked modifications (do not add untracked files unless the user explicitly listed them):
git add -u
If the user provided a message via $ARGUMENTS, use it as the commit subject. Otherwise, analyze the diff and write a commit message that:
feat:, fix:, refactor:, test:, chore:, docs:git commit -m "<message>"
Show the resulting git log --oneline -1 to confirm.