Skip to content

feat(instruction-placement): run audit, delta, check and realign across several repositories via the target-scope contract - #17419

Merged
melodic-automation-lanes[bot] merged 7 commits into
mainfrom
work-resolve-issue/issue-17238-44482936900-1
Nov 19, 2026
Merged

melodic-automation-lanes[bot] merged 7 commits into
mainfrom
work-resolve-issue/issue-17238-44482936900-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #17238

Summary

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

The four instruction-placement skills accept the target-scope contract's forms (--repo, --repos-from, --owner, --fleet, --skip) through a new generated copy, reference/target-scope.md. Each skill cites the contract's sections and states only what differs for it. With no target form, each skill behaves as before. Design choice, following the docs-naming adopters: the findings artifact and spine baseline are checkout-local and keyed by branch, so per repository the audit, delta and realign all work in one worktree on the branch instruction-placement/realign. The audit reuses that worktree or creates it from origin/HEAD, which keeps each repository's state (artifact, baseline, suppression surface) in that repository. check gates each other repository's origin/HEAD in a throwaway detached worktree, returns one verdict per repository and exits non-zero if any fails. realign applies one repository's findings at a time and leaves them uncommitted for that repository's own PR. The audit's cross-repository signal (one rule repeated in several repositories' always-loaded files) is a report-only row naming the machine layer or the standards repository as a single home. It is not a finding, because the plugin's hard rule forbids moving content across the user/project boundary. Eval case: no eval case in plugins/instruction-placement/evals runs with a target form, so none reads the changed multi-repository text; the existing audit/delta/check/realign cases exercise the unchanged single-repository default. The PR body should say so.

Not verified

  • node scripts/generate-cheatsheet.mjs was not run: this lane cannot run node. The four argument-hint cells in docs/skill-cheat-sheet.md were edited by hand to the exact text the generator emits (codeCell with | escaped), and the review confirmed them; CI's cheat-sheet freshness check should verify it
  • tidy skipped: the change is 17 files, over the 10-file cutoff, spans more than one area and touches scripts/shared-copies.txt, a listed shared path
  • check-affected skipped typos (not installed), comment-hygiene (fetch denied), size-check (script missing in the lane) and the checked-tree-code validate-plugins steps; left to the PR's CI
  • Review note not acted on: none of the four skills' allowed-tools grants git worktree list/add/remove or git fetch, so an unattended multi-repository run may prompt. The docs-naming adopters have the same gap; this is a follow-up, not a change to the single-repository default
  • Review note kept as designed: the audit reuses an existing instruction-placement/realign worktree without bringing it up to origin/HEAD, so earlier decisions survive (same as the docs-naming precedent). This departs from the contract's 'Read state' rule for that case
  • Eval suites and test runners were not run here (no target-form eval exists); left to the PR's CI

Fix

  • plugins/instruction-placement/skills/audit/SKILL.md: argument-hint and Arguments line gain [--repo <repo> ...]; new 'Over several repositories' section (per-repository worktree on instruction-placement/realign, quote check once, owner/name IP-<n> ids, merged ranking, report-only…
  • plugins/instruction-placement/skills/delta/SKILL.md: argument-hint and Arguments line gain [--repo <repo> ...]; new 'Over several repositories' section keeping one baseline and artifact per repository in the audit's worktree, branch identity from that worktree, per-repository counts
  • plugins/instruction-placement/skills/check/SKILL.md: argument-hint and Arguments line gain [--repo <repo> ...]; new 'Over several repositories' subsection (throwaway detached worktree at origin/HEAD, per-repository index target and verdict, one exit code); Read-only hard rule allows that…
  • plugins/instruction-placement/skills/realign/SKILL.md: argument-hint and Arguments line gain [--repo <repo> ...]; new 'Over several repositories' section (owner/name IP-<n> acceptances, apply in the audit's worktree, one repository at a time, decline entry in that worktree);…
  • plugins/instruction-placement/reference/target-scope.md: new generated copy of the target-scope contract
  • scripts/shared-copies.txt: registers the new copy (scripts/cross-plugin-source-registry.txt already covers plugins/*/reference/target-scope.md by glob, so it needed no change)
  • docs/contracts/target-scope/README.md: Adopters table lists the four instruction-placement skills
  • plugins/architecture/reference/target-scope.md, plugins/coupling/reference/target-scope.md, plugins/docs-naming/reference/target-scope.md, plugins/improvement/reference/target-scope.md: regenerated with the new Adopters rows
  • docs/skill-cheat-sheet.md: argument-hint cells for audit, check, delta and realign updated to the new frontmatter values
  • .changes/instruction-placement/work-resolve-issue-issue-17238-44482936900-1-04b3a71b.md: minor fragment for the new target forms and shipped copy
  • .changes/architecture/..., .changes/coupling/..., .changes/docs-naming/..., .changes/improvement/... (work-resolve-issue-issue-17238-*): patch fragments for the regenerated copies

Verification

The runner ran each check from the base copy against 1fad5fa:

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

The run reports:

  • sync-shared-copies (regenerate): generated the five target-scope copies, exit 0
  • sync-shared-copies --check: all 970 registered copies match their canonical sources, exit 0
  • check-changelog-fragments: all 25 fragments valid
  • check-changed-skills: 4 skills checked, 0 failed (warnings only: description length, body size, body growth, and the Next-section warnings for delta and realign, which predate this change)
  • check-affected: 14 passed, 9 skipped over 17 changed files
  • fresh-context review subagent over the whole diff: 5 findings fixed (branch identity for delta and realign, audit read-only hard rule, the repeated-rule row's home, boundary and sync-copy exclusion, and --root wording that wrongly covered quote-check.sh); the cheat-sheet cells were confirmed to…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44482936900

Left out: the items under Not verified.

Related

#17238

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 44486130793

Failed GitHub API calls

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

@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 239454aded52a5f9bf9f5df917983fae7523c9fa. No person needs to act: a lane clears this reason, and the next scheduled run judges it again.

pr-merge's gate refuses its verifier verdict (verify:missing)

@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 44490780491

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/apply-conflict-patch
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44490780491

Failed GitHub API calls

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

@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped resolve-conflicts on this pull request: the lane could not resolve every conflict. The lane sets no label: the run ends in a failing pr-unblock/conflict status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=17419 -f activity=resolve-conflicts

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44490780491

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 44504422937

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/apply-conflict-patch
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44504422937

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/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44504422937

Failed GitHub API calls

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

kyle-sexton and others added 2 commits November 19, 2026 09:58
…o adopters.md

Main (#17398) moved the target-scope Adopters table into
docs/contracts/target-scope/adopters.md. The four instruction-placement
rows land there; the README and every plugin copy take main's text, the
instruction-placement copy is regenerated to match, and the four
fragments that announced the other plugins' copy edits are dropped since
those copies no longer change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KeBVgbERyakZ33T4AetfRj
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: no security issues found

This review was blocking only. The lane already reviewed an earlier head (b04e328), so this pass reports only CRITICAL and IMPORTANT findings. It found none.

The pull request lets the four instruction-placement skills (audit, delta, check, realign) run over several repositories through the target-scope forms (--repo, --repos-from, --owner, --fleet, --skip). The pull request also adds:

  • a generated copy of the contract at plugins/instruction-placement/reference/target-scope.md;
  • an adopters file;
  • updated cheat-sheet cells;
  • a changelog fragment;
  • an entry in scripts/shared-copies.txt.

I read every hunk of all 9 changed files in .claude-lane/pr.diff. None of them matches a trusted-path glob.

What I checked:

  • Narrowed "Read-only" rules.

    • In audit/SKILL.md, a multi-repository run may now add the instruction-placement/realign worktree and branch in each repository.
    • In check/SKILL.md, it may now add a throwaway detached worktree at origin/HEAD, then remove it.

    I judged both by what breaks without the old rule. Both actions are local and can be undone. Neither publishes anything, touches secrets or edits a tracked file. These rules stay unchanged:

    • the ban on editing instruction files;
    • the hard-deny on demoting safety content;
    • realign's per-item human gate;
    • realign leaving its edits uncommitted for each repository's own pull request.

    The protected-class register was not needed to clear these, because no removed rule's action now goes unchecked.

  • Tool grants. No allowed-tools list changes. In the frontmatter, only the argument-hint lines change.

  • Declines in realign. The team-layer rule now writes to the selected worktree's .claude/instruction-placement.md. It still never writes ~/.claude/** or the personal .local.md override.

  • Plugin manifests. No plugin.json or marketplace.json changes, so no manifest lines apply.

  • Untrusted text. The multi-repository flow reads the owner's own local clones at origin/HEAD. It does not read pull request or issue text. It adds no path for untrusted text to reach a lane that holds credentials, and the PR context has no directives aimed at this lane.

  • Prior findings. The earlier post was a summary with 0 findings, so nothing carries over.

  • Spend. No cost-relevant changes.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review: PR #17419, instruction-placement adopts the target-scope contract (blocking only)

I found nothing that blocks this PR. I read every hunk of all 9 changed files.

This lane already reviewed an earlier head (b04e328), so this review reports only blocking findings.

What changed since the last review. After the latest merge from main, the Adopters list lives in one file per plugin under docs/contracts/target-scope/adopters/. This PR now adds its own file, docs/contracts/target-scope/adopters/instruction-placement.md, with the four /instruction-placement:* rows. It follows the same layout as the other adopter files, such as coupling.md. The contract asks each adopter to add its own file rather than edit a shared table, and this does that.

Checks I made by reading the files

  • Generated copy. plugins/instruction-placement/reference/target-scope.md has the two-line generator header and then matches the canonical docs/contracts/target-scope/README.md at this head. The README is 119 lines and the copy is 121, and the new "Adopters" and "Plugin-shipped copies" sections are the same in both. I could not run sync-shared-copies.sh --check. The author says it passed; I have not verified that.
  • Registry line. scripts/shared-copies.txt registers the new copy in alphabetical order, as the contract asks.
  • Cheat sheet and skills. The four cheat-sheet cells match each skill's new argument-hint. They were edited by hand rather than regenerated, so CI's freshness check is left to confirm them. Each skill cites the contract's sections and keeps the default with no target form unchanged.

Closing issue #17238. The "Done when" items look met, as in the earlier reviews. The PR body says no eval case reads the multi-repository text, which the issue allows.

PR body is out of date (not counted as a finding). The "Fix" section still lists things this diff no longer contains:

  • an edit to the README's Adopters table;
  • regenerated copies in the architecture, coupling, docs-naming and improvement plugins;
  • patch fragments for those four plugins.

Loosened checks. Loosened-check verdict: fail. That is the default, because the prompt had no verdict or patterns line. Patterns: 0. No changed line loosens a check. The prompt had no decision-record line, so I did not check the citation requirement.

There are no embedded instructions in the PR context or the prior-findings file. There is no cost exposure: the change is skill text and docs only.

Verifier dropped 0 of 0 candidates.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 5592334618bc20e123f8bda3d5945312f63209e1, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=5592334618bc20e123f8bda3d5945312f63209e1 rubric=10.4.0 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 19, 2026
@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 skipped
Commits pushed none (read lane)
Run 44563698079

Failed GitHub API calls

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

Resolve the target-scope adopters.md conflict by keeping both sides' rows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 19, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head ec0758c73f8d4717ff65eb459123fd1d7d162411, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=ec0758c73f8d4717ff65eb459123fd1d7d162411 rubric=10.4.0 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 19, 2026
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 239454a
Run 44578711729

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/report-escalation
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44593054450

Failed GitHub API calls

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

…sue-17238-44482936900-1

# Conflicts:
#	docs/contracts/target-scope/adopters.md
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 3167f046f072c3ae334192fc4a3872a05d0dde04, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=3167f046f072c3ae334192fc4a3872a05d0dde04 rubric=10.4.0 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 3a119c0 Nov 19, 2026
53 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-17238-44482936900-1 branch November 19, 2026 19:30
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 3a119c0a4077fda9d9bda9cbd4a644ede7ca95f0; later checks count it verified from this comment.

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(instruction-placement): run audit, delta, check and realign across several repositories via the target-scope contract

1 participant