refactor(git-commits): retrofit to the ADR-0020 context contract

Description 724 -> 214 chars, body 1102 -> 343 words, Gotchas 12 -> 3.
Create, rewrite, and cherry-pick flows move to self-contained references/
files behind a dispatch table.

The audit caught that moving the secret scan into the create flow left the
amend/squash path with no check in its loaded context; it is now a gate
common to every flow. Also re-homes the interactive-rebase reflog warning
git-history dropped, since this skill owns rebase.
This commit is contained in:
2026-08-30 13:10:53 +00:00
parent bbc73008a3
commit f3b4860e14
16 changed files with 260 additions and 214 deletions

View File

@@ -10,7 +10,7 @@ Conventional Commits is a lightweight convention on top of commit messages that
## Message Format
```
```text
<type>[optional scope]: <description>
[optional body]
@@ -58,20 +58,20 @@ A `BREAKING CHANGE` footer or `!` on **any** type always triggers a MAJOR bump.
Two equivalent notations:
**`!` in header** (preferred — visible in `git log --oneline`):
```
```text
feat!: drop support for Node 6
feat(api)!: remove deprecated endpoint
```
**`BREAKING CHANGE` footer** (machine-readable body):
```
```text
feat: allow config to extend other configs
BREAKING CHANGE: `extends` key now used for extending config files
```
**Both together** (most explicit):
```
```text
feat!: drop support for Node 6
BREAKING CHANGE: use JavaScript features not available in Node 6.
@@ -85,7 +85,7 @@ Rules:
## Footer Token Rules
```
```text
<token>: <value>
<token> #<value> # for issue references
```
@@ -96,7 +96,7 @@ Rules:
- Blank line required before the footer block.
Valid footer examples:
```
```text
Reviewed-by: Z
Refs: #123
Co-authored-by: Alice <alice@example.com>
@@ -106,29 +106,29 @@ BREAKING CHANGE: the `--format` flag now requires a value
## Examples
Minimal — no body, no footer:
```
```text
docs: correct spelling of CHANGELOG
```
With scope:
```
```text
feat(lang): add Polish language
```
Breaking change via `!`:
```
```text
feat!: send an email to the customer when a product is shipped
```
Breaking change via footer:
```
```text
feat: allow provided config object to extend other configs
BREAKING CHANGE: `extends` key in config file is now used for extending other config files
```
Multi-paragraph body with multiple footers:
```
```text
fix: prevent racing of requests
Introduce a request id and a reference to latest request. Dismiss
@@ -142,7 +142,7 @@ Refs: #123
```
Revert:
```
```text
revert: let us never again speak of the noodle incident
Refs: 676104e, a215868