Skip to content

Commit 452ebc9

Browse files
committed
ai(rules[AGENTS]) add heredoc pattern for multi-line git commits
why: Ensure proper formatting of why/what sections in commit messages. what: - Add example using cat <<EOF style for multi-line commits
1 parent c1fd8ef commit 452ebc9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

AGENTS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,18 @@ what:
244244
- Update GitURL.to_url() to include port if specified
245245
- Add tests for the new functionality
246246
```
247+
For multi-line commits, use heredoc to preserve formatting:
248+
```bash
249+
git commit -m "$(cat <<'EOF'
250+
feat(Component[method]) add feature description
251+
252+
why: Explanation of the change.
253+
what:
254+
- First change
255+
- Second change
256+
EOF
257+
)"
258+
```
247259

248260
## Debugging Tips
249261

0 commit comments

Comments
 (0)