Files
dotfiles/pi/.pi/agent/prompts/p-commit.md
T
2026-07-27 08:46:32 +02:00

19 lines
1.1 KiB
Markdown

---
description: Generate a conventional commit message and optional PR description from current changes
argument-hint: "[diff, file list, or 'auto' to use git status]"
subagent: true
fork: true
---
Generate a commit message for: $@
Structure your answer as:
1. **Type & scope** — one of: feat, fix, refactor, perf, test, docs, build, ci, chore, style; scope is the affected module/subsystem
2. **Subject** — imperative mood, ≤72 chars, no trailing period, no emoji
3. **Body** — wrapped at 72 cols, explain *why* not *what*. Use bullet points for multiple distinct changes.
4. **Footer**`BREAKING CHANGE: …` if applicable; `Refs: #123` for linked issues
5. **PR description** (if the change is non-trivial) — Summary, Motivation, Changes, Test plan, Risks
Format the final message in a single fenced block ready to copy. If the change spans multiple logical commits, propose a split with one subject per commit and the file groups that belong in each.
Read the diff before writing — never invent files, symbols, or behavior. If `git status` is empty or the diff is unclear, ask before fabricating.