From fca580e928783d9351c2d37e976b87ba9588cb2f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 10 Mar 2026 03:12:44 -0300 Subject: [PATCH] [docs] Clarify commit message formatting Add a note to AGENTS.md to avoid passing literal \n sequences in commit bodies when using shell commands. Testing: not run (documentation-only change) Assisted-by: OpenAI Codex --- AGENTS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 809056fac..8ba04ef44 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -93,6 +93,8 @@ For API work: - Before any commit, run the entire test suite with `meson test -C build`. - Use descriptive commit messages with consistent bracketed subsystem prefixes such as `[subset]`, `[raster]`, `[util]`, or `[meson]`. - Wrap commit message bodies to about 70 columns. +- When passing commit bodies through the shell, use real newlines, not literal + `\n` escapes. Prefer `$'...'` quoting or a temporary commit message file. - Explain root cause, fix, and testing in the commit body when testing was actually performed or is relevant. - When relevant, link issues or PRs with trailers such as `Fixes:`. - Always include an `Assisted-by:` trailer on commits you write through the agent.