/commit — Quality-Gated Commit
Commit workflow that enforces quality gates before committing.
Steps
- •Run quality gates:
bash
pnpm turbo typecheck pnpm turbo build --filter=@q8/web
- •If quality gates fail, stop and report the errors. Do NOT commit.
- •If quality gates pass, show
git statusandgit diff --stagedto review changes. - •Stage the relevant files (prefer specific files over
git add -A). - •Generate a commit message following conventional commits:
- •
feat:new feature - •
fix:bug fix - •
refactor:code restructuring - •
docs:documentation - •
test:test changes - •
chore:maintenance
- •
- •Create the commit.
- •Show the result with
git log --oneline -1.
Rules
- •NEVER skip quality gates.
- •NEVER commit if typecheck fails.
- •NEVER use
git add -A— stage specific files. - •NEVER commit
.envfiles or secrets. - •Ask the user to confirm the commit message before committing.
- •If the user provides a message argument (e.g.,
/commit fix auth bug), use it as the basis for the commit message.