Workflow
- •
Check staging: Run
git status- •If nothing staged: use
git add <file>to stage specific relevant files
- •If nothing staged: use
- •
Analyze changes: Run
git diff --cached- •If multiple unrelated changes detected: split into separate commits by selectively adding files
- •
Create commit message:
- •
Use CONVENTIONAL COMMIT format:
text<type>[!]: <description> [optional body]
- •
Type: feat, fix, docs, style, refactor, perf, test, build, chore
- •
Description: <72 chars, use imperative mood
- •
Body:
- •Include only if necessary and format the body line-by-line using bullet points
- •CONSTRAINT: Do NOT add any "Generated with", "Co-Authored-By", or tool attribution text in the message body
- •
- •
Handle AI-generated trailer:
- •If
$ARGUMENTSequals "ai": add trailer via-m "AI-Generated-By: [Coding Tool Name]" - •If
$ARGUMENTSis empty or any other value: complete the commit without trailer
- •If