Skip to content

skills(triage): drop exclamation marks from comment templates - #361

Merged
max-sixty merged 2 commits into
mainfrom
skills/triage-templates-no-bang-25181717498
Apr 30, 2026
Merged

max-sixty merged 2 commits into
mainfrom
skills/triage-templates-no-bang-25181717498

Conversation

@tend-agent

Copy link
Copy Markdown
Collaborator

Symptom

Triage bot posted a comment on issue #360 opening with Thanks for the detailed write-up\! — a literal backslash-bang where the template intends an exclamation mark. The Bash tool rewrites every ! in a command string to \! before bash parses it, so any comment body posted via gh issue comment --body "..." (or <<EOF heredoc) that contains an exclamation mark ships visibly corrupted.

Why this slipped past the existing guidance

running-in-ci/SKILL.md already warns: "Use the Write tool for any comment body containing an exclamation mark, then pass the file to gh ... --body-file." But the triage skill's own templates (lines 172, 178, 184, 192, 198, 204, 210, 218) literally contain exclamation-mark greetings — "Thanks for reporting this!", "Thanks for the suggestion!", "Thanks for reaching out!" — so a bot following the template via the heredoc pattern recommended in the same skill at line 166 hits the rewrite. The trigger is in the template itself; the general warning fires too late.

Evidence

Two confirmed user-facing corruptions in posted issue comments since 2026-04-01, both matching the template opener pattern:

Scan recipe used:

gh api 'repos/max-sixty/tend/issues/comments?per_page=100&since=2026-04-01T00:00:00Z' \
  --paginate --jq '.[] | select(.user.login == "tend-agent")' \
  > /tmp/all-bot-comments.jsonl
grep -P '\\\\!' /tmp/all-bot-comments.jsonl

Three other matches in the #217 thread are intentional discussion of this same bug class (the issue was about the bash escape itself), not corruption.

Fix

Replace ! with . across all 8 templates in plugins/tend-ci-runner/skills/triage/SKILL.md, and add a short inline note explaining that the templates intentionally avoid exclamation marks. The note redirects future authors to the Write + --body-file path if they ever need an exclamation mark (e.g. quoting a user verbatim).

This is a structural fix at the trigger: removing the literal ! characters the bot copies prevents the failure regardless of which post-path the bot chooses (heredoc vs. --body-file). It does not depend on the bot remembering the general warning.

Gate assessment

  • Evidence level: High — 2 confirmed user-facing comment corruptions traceable to the same templates, plus 11+ cumulative bang-escape occurrences across other surfaces (full audit in the evidence gist).
  • Failure type: Structural at the trigger (templates supply the !); stochastic at the bot (whether the bot recalls running-in-ci's general warning when composing the body). Removing the trigger eliminates the failure mode.
  • Magnitude: Removal/simplification — Low evidence bar; passes both gates.

Evidence

Evidence gist for max-sixty/tend 2026-04

The Bash tool rewrites every literal exclamation mark in a command string to backslash-bang before bash parses the command, so comment bodies posted via gh issue comment with heredoc or --body strings render with visible "\\!" corruption. The triage templates' "Thanks for reporting this\!" / "Thanks for the suggestion\!" greetings were the trigger; running-in-ci's general "use Write + --body-file when the body contains \!" warning fires too late when the template itself contains the character. Replace each greeting's exclamation mark with a period and add a short inline note pointing future authors at Write + --body-file when they genuinely need to include one.
@tend-agent tend-agent added the claude-behavior Behavioral issues found by review-reviewers label Apr 30, 2026

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI lint is failing — the new explanatory note on line 168 contains `!` (bang immediately followed by backtick) twice, which the forbid bang-backtick in plugin skill files pre-commit hook rejects (refs #234, #243, #244). Inline suggestion below mirrors the prose form used in running-in-ci/SKILL.md:356 ("rewrites every exclamation mark to a literal backslash-bang") and keeps the example phrases inside double quotes, avoiding the poisoned sequence.

Will push the fix directly since this PR is bot-authored.

The note added in the prior commit contained `\!` (bang followed by
backtick) twice, tripping the forbid bang-backtick pre-commit hook.
Mirror the prose form used in running-in-ci/SKILL.md.

Co-Authored-By: Claude <[email protected]>
@max-sixty
max-sixty merged commit 2b50427 into main Apr 30, 2026
3 checks passed
@max-sixty
max-sixty deleted the skills/triage-templates-no-bang-25181717498 branch April 30, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-behavior Behavioral issues found by review-reviewers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants