Commit
Create a well-structured git commit for the current changes.
Steps
- •Run
git statusandgit diff --stagedandgit diffto understand all changes - •Run
git log --oneline -5to match the existing commit message style - •Analyze the changes and categorize them:
- •
feat:— new functionality - •
fix:— bug fix - •
refactor:— code restructuring without behavior change - •
style:— formatting, whitespace (should be rare since Biome handles this) - •
docs:— documentation changes - •
chore:— build, config, dependencies
- •
- •Stage the relevant files with
git add <specific files>— never usegit add -Aorgit add . - •Do NOT stage
.env, credentials, or secrets — warn the user if these appear in the diff - •Write a commit message:
- •First line:
<type>: <imperative summary>(max 72 chars) - •Blank line, then body explaining why (not what) if the change isn't obvious
- •First line:
- •Create the commit
Rules
- •Always use conventional commit format
- •Message in English
- •Never amend a previous commit unless explicitly asked
- •Never use
--no-verify - •If
pnpm buildhasn't been run recently, run it first to catch type errors before committing