Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions plugins/tend-ci-runner/skills/review-reviewers/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,11 @@ if [ -z "$GIST_ID" ]; then
fi
GIST_ID=$(basename "$GIST_URL")
# First time this month for this target — announce the gist on the tracking issue
gh issue comment "$TRACKING_NUMBER" \
--body "Evidence gist for \`$TARGET\`: $GIST_URL"
# printf, not an inline --body: the backticks are literal inside single
# quotes, so nothing needs escaping and bash can't run the span.
printf 'Evidence gist for `%s`: %s\n' "$TARGET" "$GIST_URL" \
> /tmp/gist-announce.md
gh issue comment "$TRACKING_NUMBER" --body-file /tmp/gist-announce.md
else
GIST_URL="https://gist.github.com/$GIST_ID"
fi
Expand Down
2 changes: 1 addition & 1 deletion plugins/tend-ci-runner/skills/running-in-ci/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ If `EXISTING` is greater than 0, **do not post** — another run already handled

## Comment Formatting

**Compose bodies with the Write tool, then post with `--body-file`.** The composed file is reviewable before it ships, quoting and escaping are non-issues, and line wrapping is just file content. The bot writes to `/tmp/` constantly — one more file is cheap. For one-line bodies, `--body "…"` is fine.
**Compose bodies with the Write tool, then post with `--body-file`.** The composed file is reviewable before it ships, quoting and escaping are non-issues, and line wrapping is just file content. The bot writes to `/tmp/` constantly — one more file is cheap. `--body "…"` is fine only for a one-line body containing no backtick, `$`, or `\`. Inside double quotes bash runs a backticked span as a command and substitutes its output, so a markdown inline-code span is silently deleted from the posted comment: `` --body "`some-check` now passes" `` ships as ` now passes`. Inline code appears in nearly every body the bot writes, and single-quoting instead breaks on any apostrophe, so reach for `--body-file` whenever the text is anything but plain prose.

```bash
# After writing /tmp/comment-body.md with the Write tool:
Expand Down
25 changes: 21 additions & 4 deletions plugins/tend-ci-runner/skills/triage/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ Step 3's duplicate check catches identical fixes. It misses the *same root cause

Closes #$ARGUMENTS"
git push -u origin fix/issue-$ARGUMENTS
gh pr create --title "fix: <description>" --body "## Problem
```
Compose the body with the Write tool at `/tmp/pr-body.md` — the fill-ins below are freeform prose that routinely carries markdown inline code, which bash executes inside a double-quoted `--body`:

```markdown
## Problem
[What the issue reported and the root cause]

## Solution
Expand All @@ -124,7 +128,11 @@ Step 3's duplicate check catches identical fixes. It misses the *same root cause
[How the fix was verified — mention the reproduction test]

---
Closes #$ARGUMENTS — automated triage"
Closes #$ARGUMENTS — automated triage
```

```bash
gh pr create --title "fix: <description>" --body-file /tmp/pr-body.md
```
4. Wait for CI per **CI Monitoring** in `/tend-ci-runner:running-in-ci`.

Expand All @@ -137,11 +145,20 @@ git checkout -b repro/issue-$ARGUMENTS
git add -A
git commit -m "test: add reproduction for #$ARGUMENTS"
git push -u origin repro/issue-$ARGUMENTS
gh pr create --title "test: reproduction for #$ARGUMENTS" --body "## Context
```

Compose the body with the Write tool at `/tmp/pr-body.md`:

```markdown
## Context
Adds a failing test that reproduces #$ARGUMENTS. The fix is not yet included — this PR captures the reproduction so a maintainer can investigate.

---
Automated triage for #$ARGUMENTS"
Automated triage for #$ARGUMENTS
```

```bash
gh pr create --title "test: reproduction for #$ARGUMENTS" --body-file /tmp/pr-body.md
```

Note the PR number for the comment.
Expand Down
9 changes: 6 additions & 3 deletions plugins/tend-ci-runner/skills/weekly/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ If no dependency PRs are open, note "0 dependency PRs to process" and continue t
if [ "$LAST_APPROVAL_SHA" = "$HEAD_SHA" ]; then
echo "Already approved on this commit; skipping."
else
# Compose a one-line review body naming the package, bump type, and what you
# checked — e.g. "ruff 0.13 → 0.14 (patch), CI green, no API changes".
gh pr review <number> --approve --body "$REVIEW_BODY"
# Use the Write tool to compose /tmp/review-body.md — one line naming the
# package, bump type, and what you checked, e.g. "ruff 0.13 → 0.14 (patch),
# CI green, no API changes". Write it to a file rather than an inline
# --body: a package name written as inline code puts a backtick in a
# double-quoted argument, and bash runs the span as a command.
gh pr review <number> --approve --body-file /tmp/review-body.md
fi
```
4. If CI is failing, comment with the failure summary and skip
Expand Down
Loading