Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
fix: only respond to bot-engaged comments when genuinely helpful (#1169)
Maximilian Roos725fc52fb17c
diff --git a/.github/CLAUDE.md b/.github/CLAUDE.mdindex 1a2c5b15e..833a73f19 100644--- a/.github/CLAUDE.md+++ b/.github/CLAUDE.md@@ -134,7 +134,7 @@ The mention workflow runs for any user who includes `@worktrunk-bot` — the mer- Formal review submitted on a `worktrunk-bot`-authored PR, with body or non-approval → `claude-review` responds- `@worktrunk-bot` mentioned in an issue body → `claude-mention` responds- `@worktrunk-bot` mentioned in any comment (issue or PR) → `claude-mention` responds-- Any comment on a PR or issue that `worktrunk-bot` has engaged with (authored, reviewed, or commented on) → `claude-mention` responds (verify step confirms engagement via API)+- Any comment on a PR or issue that `worktrunk-bot` has engaged with (authored, reviewed, or commented on) → `claude-mention` runs (verify step confirms engagement via API), but the prompt instructs Claude to only respond if the comment needs bot input — otherwise exit silently- Editing a comment or issue body re-triggers the same response**Does not trigger:**diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yamlindex aab05ed30..d05de45c5 100644--- a/.github/workflows/ci.yaml+++ b/.github/workflows/ci.yaml@@ -66,6 +66,9 @@ jobs:uses: baptiste0928/cargo-install@v3with:crate: cargo-nextest+ # Pin: 0.9.129 requires rustc 1.91, we use 1.90 (rust-toolchain.toml).+ # The claude-renovate workflow checks weekly for compatible updates.+ version: "=0.9.128"- name: 💰 Cacheuses: Swatinem/rust-cache@v2diff --git a/.github/workflows/claude-mention.yaml b/.github/workflows/claude-mention.yamlindex 5e0bf8065..f61bcbc16 100644--- a/.github/workflows/claude-mention.yaml+++ b/.github/workflows/claude-mention.yaml@@ -181,14 +181,24 @@ jobs:# Always agent mode. The prompt tells Claude what happened; the# /running-in-ci skill instructs it to read full context via gh.+ #+ # Three prompt paths:+ # 1. Explicit @worktrunk-bot mention in a comment → always respond+ # 2. Comment on bot-engaged issue/PR (no mention) → only if helpful+ # 3. Issue opened/edited with @worktrunk-bot mention → always respondprompt: >-${{ github.event.comment.html_url- && format(- 'A user commented ({0}). Read the full issue or PR (description, diff, recent comments, CI status) and respond to their feedback. If they''re requesting changes, make the changes, commit, and push. If they''re asking a question, answer it.',- github.event.comment.html_url- )+ && (contains(github.event.comment.body, '@worktrunk-bot')+ && format(+ 'You were mentioned in a comment ({0}). Read the full issue or PR (description, diff, recent comments, CI status) and respond. If they''re requesting changes, make the changes, commit, and push. If they''re asking a question, answer it.',+ github.event.comment.html_url+ )+ || format(+ 'A user commented on an issue/PR where you previously participated ({0}). Read the full context (description, recent comments, CI status). Only respond if the comment is directed at you, asks a question you can help with, or requests changes you can make. If the conversation is between humans and doesn''t need your input, exit silently without commenting.',+ github.event.comment.html_url+ ))|| format(- 'An issue was opened or updated ({0}). Read it and respond.',+ 'An issue was opened or updated with a mention of you ({0}). Read it and respond.',github.event.issue.html_url) }}diff --git a/.github/workflows/claude-renovate.yaml b/.github/workflows/claude-renovate.yamlindex 412dbf84c..e71c856e1 100644--- a/.github/workflows/claude-renovate.yaml+++ b/.github/workflows/claude-renovate.yaml@@ -73,6 +73,12 @@ jobs:- We pin a specific nightly for cargo-udeps (check the actual version in ci.yaml)- Periodically update to a recent nightly that works with cargo-udeps+ 4. **Pinned cargo tool versions** (cargo-nextest, etc.):+ - Some tools are pinned with `version: "=X.Y.Z"` in ci.yaml because newer versions require a higher MSRV than our `rust-toolchain.toml`+ - Check if newer versions are now compatible with our pinned rustc version+ - To check: look up the tool's MSRV on crates.io or its repo and compare against the channel in `rust-toolchain.toml`+ - Only update the pin if the new version is compatible with our rustc+## How to check- Use `gh api` and web searches to find current versions