Skip to content

skills: route bundled-skill defects via permission-request issue - #324

Merged
max-sixty merged 2 commits into
mainfrom
repo-specific
Apr 23, 2026
Merged

max-sixty merged 2 commits into
mainfrom
repo-specific

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Summary

PR #322 relied on a precedence rule that CLAUDE.md stated but the skills didn't fully cover: bundled-skill defects should go to tend (not to per-repo overlays), but the rule didn't say how a bot should do that across a trust boundary. This PR codifies the routing. When a correction identifies a gap in a bundled skill (same root cause would fire in every consumer), the bot opens a permission-request issue in the consuming repo; on maintainer approval, the bot files the same issue in tend. The maintainer, not the bot, authorizes cross-repo filings — consuming repos may be private.

Changes

  • plugins/tend-ci-runner/skills/running-in-ci/SKILL.md — new "Bundled-skill defects: ask permission to file in tend" subsection under "Learning from Feedback," with signals and what to include in the request.
  • plugins/tend-ci-runner/skills/review-runs/SKILL.md — Step 6 exception covering the same routing when findings come from run review rather than interactive feedback.
  • CLAUDE.md — consolidated to development directions. Dropped the "Skill precedence: repo > bundled" section (product-runtime content that now lives in the skills). Added "Skill design: bundled for everyone, overlay for one" — a directive for developers writing skills in this repo about what belongs in each tier.

Test plan

  • pre-commit run --all-files
  • Next time a bundled-skill defect surfaces autonomously, verify the bot opens a permission-request issue in the consuming repo rather than patching the overlay or filing directly against tend.

When a correction identifies a gap in a bundled skill — the same root cause
would fire in every tend consumer — the bot opens an issue in the consuming
repo asking for permission to file in tend. On maintainer approval, the bot
files the tend issue. The maintainer, not the bot, authorizes cross-repo
filings: consuming repos may be private.

Also consolidates CLAUDE.md to development directions only: drops the
product-runtime "Skill precedence: repo > bundled" section (now lives in the
skills) and adds a short "Skill design" directive for developers writing
skills in this repo.

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 58eb623 into main Apr 23, 2026
5 checks passed
@max-sixty
max-sixty deleted the repo-specific branch April 23, 2026 01:04
max-sixty pushed a commit that referenced this pull request Apr 25, 2026
)

## Summary

Update the `running-in-ci` "How to propose" recipe so a bot updating
`.claude/skills/` can actually write to disk. The current recipe (`cd
.claude && mv /tmp/... SKILL.md`) satisfies the Claude Code harness
write-guard
([anthropics/claude-code#37157](anthropics/claude-code#37157))
but fails the read-only bind-mount the sandbox places on `.claude/`.
Mirror the pattern `review-runs` already documents: do the edit, commit,
and push from a git worktree under `$TMPDIR`. Both restrictions are now
explained inline so a future reader knows why the worktree is mandatory.

## Why

`worktrunk-bot` hit this in worktrunk run
[24926120125](https://github.com/max-sixty/worktrunk/actions/runs/24926120125)
(a `tend-mention` session triggered by an explicit maintainer
instruction to update repo skill guidance). The bot followed the bundled
recipe, hit `mv: ... Read-only file system`, retried with `cp` (same
error), retried with `touch` (same error), then ad-libbed `git
hash-object -w` plus `git update-index --cacheinfo` to write the blob
and stage it directly to the index — a workaround that left the working
tree showing the file as modified after the fact. ~7 wasted bash cycles
before producing [worktrunk PR
#2415](max-sixty/worktrunk#2415).

`worktrunk-bot` followed the new bundled-skill-defect flow (introduced
in #324 yesterday) and opened permission-request issue
[max-sixty/worktrunk#2416](max-sixty/worktrunk#2416)
on the consumer side. This PR is the corresponding tend-side fix
surfaced by `review-reviewers` rather than waiting on the permission
round-trip — the diagnosis is unambiguous and the fix is small.

## What changes

The "Draft a minimal edit" step (step 3 of "How to propose"):

- Drops the `cd .claude && mv /tmp/... SKILL.md` recipe that fails on
the read-only mount.
- Adds the same prose `review-runs` already carries explaining (a) the
read-only bind-mount of `.claude/` and (b) the harness write-guard from
claude-code#37157, so a reader sees both barriers and why a worktree
clears both.
- Replaces the recipe with the `git worktree add "$TMPDIR/skill-fix"`
pattern, parameterised on `<topic>-$GITHUB_RUN_ID` for the branch name.
- Keeps the existing TODO referencing claude-code#37157.

The frontmatter snippet is moved up so the recipe sits at the bottom of
step 3 with no interleaving.

## Test plan

- [x] Eaten own dogfood: this PR's branch was authored from a worktree
at `$TMPDIR/skill-fix` using exactly the recipe being landed; commit and
push worked end-to-end. Worktree under `$TMPDIR` is writable, no
`Read-only file system` errors.
- [ ] CI on this PR passes (actionlint, ruff, typos, uv-lock).
- [ ] Visual diff vs `review-runs` SKILL.md prose to confirm the two
skills now agree on the recipe shape.

Independent of [#327](#327)
(different concern in the same file: external-tool verification, lines
~498 — no overlap with this edit at lines ~568).

---------

Co-authored-by: continuous-bot <[email protected]>
Co-authored-by: tend-agent <[email protected]>
Co-authored-by: Claude Opus 4.7 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants