From e07cf0164f9f92c12f89b197293871dd11a5feef Mon Sep 17 00:00:00 2001 From: moilanik Date: Thu, 12 Mar 2026 14:51:04 +0200 Subject: [PATCH] docs(git): require fenced code block output for commit messages - enforce one code block with only message content for copy/paste - disallow prose or labels outside the code block - add explicit correct and wrong output examples --- .ai/instructions/skills/git.instructions.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.ai/instructions/skills/git.instructions.md b/.ai/instructions/skills/git.instructions.md index 03c359a..1687ce4 100644 --- a/.ai/instructions/skills/git.instructions.md +++ b/.ai/instructions/skills/git.instructions.md @@ -46,7 +46,24 @@ When the user asks for a commit message: 1. **Run `git diff --staged` or `git diff`** — read what actually changed 2. **Documentation check** — scan the changed files and ask: does any `docs/` or `README.md` need updating based on these changes? If yes, flag it clearly before writing the message. Do not block the commit — just surface it. -3. **Write the commit message only** — one short subject line, optionally a blank line and brief body if the change needs context. Output just the message text in a code block. Do NOT wrap it in a `git commit` command. +3. **Write the commit message only** — one short subject line, optionally a blank line and brief body if the change needs context. Output must be only the message text inside one fenced code block. Do NOT wrap it in a `git commit` command. + +**Output format is mandatory for copy/paste:** +- Always use one fenced code block (prefer `text` language tag) +- Put only commit message content inside the block +- Do not add prose before or after the block +- Do not add labels like "Suggested message:" outside the block + +Correct: +```text +fix(scope): concise subject + +optional body line +``` + +Wrong: +- `Suggested commit message: fix(scope): concise subject` +- Plain text without a fenced block Format: ```