Repository navigation
Conversation
- CLAUDE.md gains a "Skill precedence" section documenting how consuming repos overlay tend's bundled skills with a `running-tend` skill. - running-in-ci moves the precedence rule to the top and links back to it from the Conduct section, replacing the duplicated statement. - running-in-ci adds a "Learning from Feedback" section: when a maintainer corrects the bot, it proposes a standalone PR against the consuming repo's `running-tend` skill so the lesson applies to future runs in that repo. Dedup by target file path, not title (conventions vary per repo). Maintainer-gated, open-and-exit. Co-Authored-By: Claude <[email protected]>
tend-agent
approved these changes
Apr 18, 2026
2 of 3 tasks
max-sixty
added a commit
that referenced
this pull request
Apr 22, 2026
## Summary Upstreams the fix from worktrunk PR [max-sixty/worktrunk#2386](max-sixty/worktrunk#2386) into the bundled notifications skill. Step 4a of the dedup check currently finds *completed* bot activity (comments, reviews, timeline cross-references). It does not see a dedicated workflow that is still running. `tend-mention` sessions that involve real implementation routinely run past the 10-minute freshness gate — when the notifications bot proceeds, it re-implements in-progress work. Evidence (from worktrunk, finding in #2386): - Run [24742688091](https://github.com/max-sixty/worktrunk/actions/runs/24742688091) — ~79 min, ~$25, 279 turns. Re-implemented [PR #2361](max-sixty/worktrunk#2361) while tend-mention was still pushing; last-step dedup caught the collision and cleaned up, but the session cost had already been incurred. - Run [24519963858](https://github.com/max-sixty/worktrunk/actions/runs/24519963858) — ~16 min, ~$9, 168 turns. Same pattern on PR #2263 / issue #2261. ## Change Adds an **In-flight check** sub-step to step 4a of `plugins/tend-ci-runner/skills/notifications/SKILL.md`, sitting between the freshness gate and the dedup check. It queries `actions/runs?status=in_progress`, filters to `tend-*` runs, excludes `$GITHUB_RUN_ID`, and matches on `display_title` (the workflow_run payload does not expose the triggering issue number for `issue_comment` / `pull_request_review` events without an extra API call per run). On hit, skip without marking read — same disposition as the freshness gate. The two bash-tool caveats from the overlay are preserved inline: `gh api --jq` does not accept `--arg`/`--argjson`, and the Bash tool's bang rewriting can still bite outside heredocs, so the jq uses `(X) | not` rather than the not-equal operator. ## Why this lives in tend, not as a per-repo overlay The precedence rule codified in CLAUDE.md ("Skill precedence: repo > bundled") and in `running-in-ci/SKILL.md` ([#306](#306)) says overlays are for repo-specific policy/convention/taste. This fix is generic: any tend consumer whose `tend-mention` runs can exceed 10 minutes will hit the same race. That makes it a bundled-skill defect, not an overlay. ## Follow-up on worktrunk Once this lands, [worktrunk#2386](max-sixty/worktrunk#2386) is redundant — the bundled skill now covers what its overlay added. A human should close #2386 and revert the overlay section it added to `.claude/skills/running-tend/SKILL.md`. I have not touched worktrunk. ## Test plan - [x] `pre-commit run --all-files` passes - [x] jq query verified against worktrunk's `actions/runs?status=in_progress` (returns 0 when no concurrent tend run matches the subject title, which is the current state) - [ ] Next time a same-repo mention triggers a long `tend-mention` run, verify a concurrent notifications run sees `IN_PROGRESS > 0` and exits cleanly > _This was written by Claude Code on behalf of @max-sixty_ --------- Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two improvements inspired by OpenClaw's skill architecture:
1. Make
repo > bundledprecedence explicitThe overlay pattern already exists — consuming repos add a
running-tendskill at.claude/skills/running-tend/SKILL.mdthat overlays tend's bundled skills — but the precedence rule was stated piecemeal acrossrunning-in-ciandaction.yaml. This PR lifts it to a single, authoritative statement in two places:CLAUDE.mdgains a "Skill precedence: repo > bundled" section for developers working on tend.running-in-ci/SKILL.mdmoves the precedence rule to the top of the file (from a midway mention under Conduct) and phrases it as a universal rule applying to all skills.2. Learn from feedback
New "Learning from Feedback" section in
running-in-ci/SKILL.md: when a maintainer corrects the bot's behavior during a run, the bot proposes a standalone PR against the consuming repo'srunning-tendskill — not against tend itself. This isolates learning per-repo and keeps tend's bundled skills stable.Guardrails:
Test plan
uv run pytest— 163 passed).claude/skills/running-tend/SKILL.md