Skip to content

feat(improvement): run find and improve across several repositories via the target-scope contract - #17292

Merged
kyle-sexton merged 3 commits into
mainfrom
work-resolve-issue/issue-17229-44405784313-1
Nov 19, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
work-resolve-issue/issue-17229-44405784313-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #17229

Summary

Opened by the work-resolve-issue lane. The run's own summary:

/improvement:find and /improvement:improve now accept the target-scope contract's forms (--repo, --repos-from, --owner, --fleet, --skip, or the same request in words) by citing the plugin-shipped copy reference/target-scope.md by section, and run once per repository with the root anchored. find replaces its 'one repo per invocation, fleet-wide sweeps out of scope' line (reversed by the owner's 2026-11-18 decision quoted in the issue) and ranks all repositories' candidates on one scale, keeping each repository's report, dismissed memory and findings files under its own state key and memory root and filing each candidate in its own repository's tracker. improve gets a 'Several repositories' section: Step 1 runs once before the fan-out, Steps 2 to 4 run per repository with no asks inside, and each repository gets at most one worktree and one small PR. With no target form both skills read as before. The contract's Adopters table lists both skills; the copy is generated by sync-shared-copies.sh and registered in scripts/shared-copies.txt. scripts/cross-plugin-source-registry.txt already covered it through its existing reference/target-scope.md line and the plugins/*/reference/target-scope.md cluster glob, so it needed no edit. Eval case: none of the improvement plugin's eval cases reads the changed multi-repository text (grep of plugins/improvement/evals for repo-path, fleet, --repo and 'several repositories' matched nothing).

Not verified

  • docs/skill-cheat-sheet.md was edited by hand to match the generator's row format, because this lane cannot run node scripts/generate-cheatsheet.mjs; CI's cheat-sheet drift check confirms it
  • Tidy skipped: the change spans 11 files and several areas (over the 10-file and 1-area cutoffs) and touches the shared path scripts/
  • Review finding not applied: the improve description still says 'one small PR'. Left as is to keep the trigger description stable; the body states one PR per repository
  • check-affected skipped typos (not installed), comment-hygiene (fetch failed offline) and the validate-plugins steps that run checked-tree code; markdownlint and lychee run only in CI
  • No commit made: the runner's instructions leave every change uncommitted for the patch job, and no commit tool was provided

Fix

  • plugins/improvement/skills/find/SKILL.md: argument-hint adds [--repo <repo> ...]; the 'Repo as parameter' bullet becomes 'Repositories', which cites target-scope.md 'Resolving repositories', 'Fan-out', 'Merging findings' and 'Writes stay per repository', keeps the git -C <root>…
  • plugins/improvement/skills/improve/SKILL.md: argument-hint adds [--repo <repo> ...]; Arguments table row for the target forms; new 'Several repositories' section (Step 1 once, Steps 2 to 4 per repository with no asks, one worktree and one PR per repository, throttle and overflow per…
  • plugins/improvement/reference/target-scope.md: new generated copy of the contract
  • scripts/shared-copies.txt: registers the improvement copy
  • docs/contracts/target-scope/README.md: Adopters table lists /improvement:find and /improvement:improve
  • plugins/architecture/reference/target-scope.md: regenerated copy (Adopters rows)
  • plugins/coupling/reference/target-scope.md: regenerated copy (Adopters rows)
  • docs/skill-cheat-sheet.md: the two improvement rows show the new argument-hints
  • .changes/improvement/work-resolve-issue-issue-17229-44405784313-1-675d41f8.md: minor fragment
  • .changes/architecture/work-resolve-issue-issue-17229-44405784313-1-4a27845e.md: patch fragment for the regenerated copy
  • .changes/coupling/work-resolve-issue-issue-17229-44405784313-1-67f3d30f.md: patch fragment for the regenerated copy

Verification

The runner ran each check from the base copy against 127343d:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • sync-shared-copies (generate): regenerated the architecture, coupling and improvement copies, exit 0
  • sync-shared-copies --check: all 963 registered copies match their canonical sources, exit 0
  • check-changelog-fragments: all 9 fragments valid
  • check-changed-skills: find and improve PASS, 0 errors (size warnings only: description length, body length, find above the 5000-token router cap, which it already exceeded before this change)
  • check-affected: 14 passed, 8 skipped, 0 failed over 11 changed files
  • fresh-context review subagent: six findings (unnamed contract sections, asks inside fan-out, skills invoked outside the target root, cross-repo filing, hand-off dropping the repository, wording); the first five were fixed and the checks run again
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44405784313

Left out: the items under Not verified.

Related

#17229

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/fix-docs
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none (read lane)
Run 44408337168

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/resolve-conflicts
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none (read lane)
Run 44416489592

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

Lane-Activity: pr-unblock/resolve-conflicts
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/apply-conflict-patch
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed cc9b287
Run 44416489592

Failed GitHub API calls

Method Path Status
GET /repos/{repo}/git/ref/tags/* 404

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-security-review: 1 inline finding(s) on cc9b287d42afbb0a8629b465907ecd7ebc3ac631; the summary is in this lane's pull request comment.

claude-lane: claude-security-review

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed b40e50016edfa65097ae53cb2fda597a5c8ec821: read 20 of 20 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #17292, incremental (cc9b287..b40e500)

I read every hunk of the incremental diff for all 19 files in scope. One sample file, imp-repos-ready-flip-stays-draft/samples/no-ask-tool.json, is an identical copy. It is an eval grader sample at an eval path, so its path doesn't change what it does. The review was blocking only, since this lane already reviewed an earlier head.

What changed

  • plugins/improvement/skills/improve/SKILL.md
    • In a run across several repositories, Step 1 now shares only the focus and any explicit target. Each repository works out its own recent-files fallback and its own shallow-clone stop (git -C <root> log origin/HEAD ... and git -C <root> rev-parse --is-shallow-repository).
    • The rule "each ask takes its recommended default" now has one exception: Step 4's ready flip. That step leaves the PR as a draft unless the user's request authorized the flip, the same as Unattended mode.
    • This closes my earlier SUGGESTION. That thread is already resolved with an owner reply, and the fix adds a guard rather than removing one.
  • Two new eval cases plus their fixtures and samples: imp-repos-no-target-own-recent-files and imp-repos-ready-flip-stays-draft.
    • The fixture seed-invoice-with-peer-ledger.sh only does local work: it clones a seeded repository into peer/, adds peer/ to .git/info/exclude, and runs rm -rf "${workspace:?}/peer/seed". The :? stops it if workspace is empty, and the path is fixed. No network, no secrets, no input from outside.
    • The grader regexes and JSON samples are data only.
  • The changelog fragment only changed wording.

Trust controls and instruction surface. No trusted path or trust control is touched: nothing in the trusted-actor list, the token broker, the kill switch, the merge holds, .github/actions/ or any manifest. No standing instruction was deleted or softened. The only skill-text change adds a guardrail of the agent-authority / external-publication kind.

Embedded text. The PR context and the settled-thread replies contain no instructions aimed at this lane.

Spend. The two new eval cases (max_turns 25 and 15) use prepaid API or subscription credits when the eval lane runs. That is not a billed resource, so it's no hold.

No security issues found in this change.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-review: 1 inline finding(s) on cc9b287d42afbb0a8629b465907ecd7ebc3ac631; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed b40e50016edfa65097ae53cb2fda597a5c8ec821: read 20 of 20 changed file(s); 0 finding(s), 0 as inline comments.

Incremental code review: PR #17292, cc9b287d..b40e5001

I read the whole incremental diff: all 19 files on the to-read list. imp-repos-ready-flip-stays-draft/samples/no-ask-tool.json is an exact copy of the no-target case's no-ask-tool.json. At its path it is only grader sample data, so the path doesn't change what it does. This lane already reviewed an earlier head, so this review reports blocking findings only.

What changed

  • No target given, several repositories. In plugins/improvement/skills/improve/SKILL.md, the "Several repositories" Step 1 bullet now shares only the focus and any explicit target. With no target, each repository's run takes its own recent files and runs its own shallow-clone check (git -C <root> log origin/HEAD … and git -C <root> rev-parse --is-shallow-repository). Both no-arguments paragraphs in Step 1 point back to that bullet. This fixes my earlier inline finding.
  • Ready flip. The ready flip now leaves the PR as a draft unless the user's request authorized it, the same as in Unattended mode. This answers the settled ready-flip thread.
  • Two new eval cases cover the fixes:
    • imp-repos-no-target-own-recent-files uses a new fixture that seeds invoice-service as the invoking repository and ledger-cli as a separate clone at peer/ledger-cli. The clone comes from a local bare repository, so origin/HEAD exists. The fixture commits are made at scaffold time, so the 30-day window finds them. The two repositories share no file name, so the graders that check which repository's file was picked can tell them apart.
    • imp-repos-ready-flip-stays-draft follows the plugin's existing prompt.md narration pattern.
  • Changelog fragment. It now describes both behaviors and stays a minor bump.

Blocking findings: none.

Prior findings

  • My earlier inline finding (Step 1's fallback picked files from the invoking repository) is fixed in the skill text, and its thread is resolved.
  • My earlier advisory point (no test could fail on the closing issue's per-repository criteria) is advisory, so this blocking-only review doesn't restate it. The new evals now cover the no-target and ready-flip paths.

Verification: I ran nothing. The author's statement that validate-cases.py passes over the plugin evals is their claim, and I have not checked it.

Spend: the two new eval cases (25 and 15 turns at most) use prepaid API credit when the eval lane runs them. That is not a hold.

No .claude-plugin manifest changed, so there are no manifest lines. No hold class applies.

Loosened-check verdict: fail (the default: the prompt had no loosened_check_verdict: or loosened_check_patterns: line); patterns: 0. No changed line loosens a check. The prompt had no loosened_check_decision_record: line, so I did not check the citation requirement.

Verifier dropped 0 of 0 candidates.

…ository

In a several-repositories improve run, Step 4's ready flip now leaves
each PR a draft unless the user's request authorized the flip, as in
Unattended mode, instead of taking an undefined recommended default.

With no explicit target, Step 1 no longer builds the recent-files list
or runs the shallow-clone stop in the invoking repository. Each
repository's run applies both to itself with git -C <root>.

Two eval cases cover the halves: imp-repos-no-target-own-recent-files
and imp-repos-ready-flip-stays-draft, each with samples that reject the
pre-fix behavior.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 25c09b4 Nov 19, 2026
61 checks passed
@kyle-sexton
kyle-sexton deleted the work-resolve-issue/issue-17229-44405784313-1 branch November 19, 2026 01:24
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.

feat(improvement): run find and improve across several repositories via the target-scope contract

1 participant