Skip to content

Commit 32db9c4

Browse files
committed
ai(rules[AGENTS]): allow optional blank line above 'what:' in commit body
why: the commit-message format documented as "why: ... what: ..." reads tightly when the why-block is one line, but visually collapses when why runs to multiple paragraphs and the eye loses the boundary between explanation and change-list. A blank line between the two sections fixes that without changing the structure or any tooling that parses the keys. what: - AGENTS.md: insert a blank line in the format template between the why: and what: sections, and add a one-paragraph note that the blank line is optional and useful for multi-line why-blocks - Update the two worked examples (config[merge] and the heredoc Component[method] template) to show the blank line for consistency
1 parent 1ddb204 commit 32db9c4

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,11 +603,16 @@ Format commit messages as:
603603
Scope(type[detail]): concise description
604604
605605
why: Explanation of necessity or impact.
606+
606607
what:
607608
- Specific technical changes made
608609
- Focused on a single topic
609610
```
610611

612+
The blank line between the `why:` block and the `what:` block is
613+
optional — useful when the `why:` body runs to multiple lines and the
614+
two sections benefit from visual separation.
615+
611616
Common commit types:
612617
- **feat**: New features or enhancements
613618
- **fix**: Bug fixes
@@ -627,6 +632,7 @@ Example:
627632
config(feat[merge]): Add deep-merge support for theme options
628633
629634
why: Enable per-project theme overrides without replacing entire dict
635+
630636
what:
631637
- Add deep_merge() helper for nested dict merging
632638
- Update merge_sphinx_config() to deep-merge theme_options
@@ -638,6 +644,7 @@ git commit -m "$(cat <<'EOF'
638644
feat(Component[method]) add feature description
639645
640646
why: Explanation of the change.
647+
641648
what:
642649
- First change
643650
- Second change

0 commit comments

Comments
 (0)