Skip to content

feat(attribution): run the attribution audit across several repositories via the target-scope contract - #17536

Merged
melodic-automation-lanes[bot] merged 4 commits into
mainfrom
work-resolve-issue/issue-17237-44612885367-1
Nov 20, 2026
Merged

melodic-automation-lanes[bot] merged 4 commits into
mainfrom
work-resolve-issue/issue-17237-44612885367-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #17237

Summary

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

/attribution:audit now accepts the target-scope contract's forms (--repo, --repos-from, --owner, --fleet, --skip, or the same request in words) through a new "Several repositories" section. The section cites the contract's sections by name and states only what differs for this skill: which tree each bundled script is anchored at (CLAUDE_PROJECT_DIR=<tree>), per-repository config read through list-corpus.sh --show-config, absolute and relative path handling for each script, a per-repository findings file and --branch, a sweep ledger per repository worktree, and in-estate copies. With no target form the skill is unchanged: the only edits to the existing flow are a router row and one sentence in step 1, each conditional on a target form. Design choice, based on reference/dispositions.md "Fix eligibility" and reference/source-fetch.md: an in-estate copy names the owning repository's file as its source and pointer target but stays report-only, because a read from a repository tree is not the identity-checked live fetch that fingerprint-confirmed requires. Eval case for the PR body: no eval case exercises the target forms. Every existing plugins/attribution/evals/audit-* case loads the changed SKILL.md, so each one reads the changed text, but none covers the new section. scripts/cross-plugin-source-registry.txt needed no edit: its existing reference/target-scope.md line and the docs/contracts/target-scope/README.md -&gt; plugins/*/reference/target-scope.md cluster glob already register the new copy.

Not verified

  • docs/skill-cheat-sheet.md was not regenerated with node scripts/generate-cheatsheet.mjs: the lane cannot run node. The one row was hand-edited to match the new argument-hint; the PR's CI drift check confirms it
  • tidy skipped: the change touches the shared path scripts/ (scripts/shared-copies.txt) and spans more than one area (plugins/attribution, docs/contracts, docs/skill-cheat-sheet.md, scripts)
  • build and test steps skipped: the change is markdown and a registry line, and the attribution script test suites are left to the PR's CI
  • check-affected could not run comment-hygiene (fetch failed), size-check (script missing in the lane) or typos (not installed); these are left to the PR's CI
  • no eval case exercises the new target forms; existing audit evals read the changed SKILL.md but not the multi-repository path

Fix

  • plugins/attribution/skills/audit/SKILL.md: argument-hint gains [--repo <repo> ...]; an Action router row for the target forms; a pointer in Audit flow step 1; a new "Several repositories" section citing reference/target-scope.md
  • plugins/attribution/reference/target-scope.md: new generated copy of docs/contracts/target-scope/README.md (scripts/sync-shared-copies.sh)
  • scripts/shared-copies.txt: registers the attribution copy at its alphabetical place, between architecture and bugs
  • docs/contracts/target-scope/adopters/attribution.md: new adopter file listing /attribution:audit
  • docs/skill-cheat-sheet.md: /attribution:audit row's argument-hint column updated to match the frontmatter (hand-edited, since node is not runnable in this lane)
  • .changes/attribution/work-resolve-issue-issue-17237-44612885367-1-d7928f7c.md: minor changelog fragment

Verification

The runner ran each check from the base copy against 93166e0:

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

The run reports:

  • sync-shared-copies (generate): generated plugins/attribution/reference/target-scope.md, exit 0
  • sync-shared-copies --check: all 989 registered copies match their canonical sources, exit 0 (rerun after the registry reorder)
  • check-changelog-fragments: all 18 fragments valid
  • check-changed-skills: plugins/attribution/skills/audit PASS, 0 errors, 6 warnings (pre-existing description and body size warnings, plus a body-grew warning, 285 -> 340 lines)
  • check-affected: 14 passed, 9 skipped (typos not installed; comment-hygiene and size-check could not run here; validate-plugins subchecks and changed-skills skipped by design)
  • fresh-context review subagent over the whole diff: 1 high, 4 medium and 6 low findings, all confirmed against the scripts and dispositions.md and fixed. Fixes: the in-estate copy is now report-only with the disposition chosen as usual; config is read per repository; path handling for check-stamps,…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44612885367

Left out: the items under Not verified.

Related

#17237

Lane-Activity: work-resolve-issue/resolve-issue
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 93166e07813d0806e6eb6b84010abaf77640d873. 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-refine/fix-docs
Model rung 0
Leg base
Run job failure
Activity step skipped
Commits pushed none (read lane)
Run 44629550483

Failed GitHub API calls

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

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #17536

I found no security issues. I read all 6 changed files in full in .claude-lane/pr.diff. None of them matches a trusted-path glob.

What the change does: /attribution:audit can now run over several repositories. It accepts the target-scope contract's forms: --repo, --repos-from, --owner, --fleet and --skip. The changes are:

  • plugins/attribution/skills/audit/SKILL.md: a new argument-hint, an action-router row, one sentence in step 1, and a new "Several repositories" section.
  • plugins/attribution/reference/target-scope.md: a new generated copy of docs/contracts/target-scope/README.md.
  • scripts/shared-copies.txt: one new registry line.
  • An adopter doc, a cheat-sheet row and a changelog fragment.

What I checked:

  • Tool grants: allowed-tools is unchanged. The new section runs scripts with a CLAUDE_PROJECT_DIR=<tree> prefix, and the skill's grants don't cover that form. The section says such calls may prompt, so the change adds no permission.
  • Instruction surface: the change adds rules and removes none, so the instruction register didn't need checking. This line is unchanged: "audit never edits. Mutation rides only the explicit fix or sweep argument". Writes stay per repository: fix and sweep each get their own worktree and pull request, and a scratch worktree is never edited.
  • Fix gate: copies found in other in-scope repositories are report-only and never reach fingerprint-confirmed. That keeps the fix-eligibility gate from reference/dispositions.md, so the gate is not widened.
  • Untrusted input: the extra repositories are the user's own local clones, found through ghq or the user's own selection. The change adds no new way for untrusted text to reach a credentialed CI lane. The per-repository AGENTS.md rule comes from the existing contract, copied here unchanged.
  • Manifests and trust controls: no plugin.json or marketplace.json changed. No workflow, action, trust control, merge hold or kill switch was touched.
  • Embedded text: the PR context has no text addressed to this lane.
  • Spend: none beyond prepaid usage. A multi-repository run starts one subagent per repository, and only when the user asks for it.

Earlier review: the change is the same as at the earlier reviewed head (14f8e9b). That review reported no findings, so there is nothing to carry over.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review: no findings

This PR lets /attribution:audit run across several repositories through the shared target-scope contract. I read every hunk of all 6 changed files in .claude-lane/pr.diff. The head is a merge from main. An earlier review of this PR found nothing, and none of this lane's earlier findings are still open.

What I checked against the repository at head (read from source, not run):

  • --show-config. list-corpus.sh supports --show-config (plugins/attribution/skills/audit/scripts/list-corpus.sh:4,65,79). The new "Config per repository" bullet tells the reader to use it.
  • Config root. plugins/attribution/lib/config-root.sh reads CLAUDE_PROJECT_DIR, else the git top level. This matches the "Anchor every script at the repository's tree" bullet.
  • Generated copy. plugins/attribution/reference/target-scope.md is the 2-line GENERATED header followed by the canonical docs/contracts/target-scope/README.md, which has 119 lines at head. I compared the copy's tail, the "Adopters" and "Plugin-shipped copies" sections, line by line with the canonical file and they match.
  • Registries. scripts/cross-plugin-source-registry.txt already covers the new copy, through its reference/target-scope.md line (L58) and the docs/contracts/target-scope/README.md -> plugins/*/reference/target-scope.md cluster glob (L62). The new scripts/shared-copies.txt line sits in alphabetical order, between architecture and bugs.
  • Cheat sheet. The docs/skill-cheat-sheet.md:254 row matches the new frontmatter argument-hint.

Closing issue #17237, criterion by criterion:

  • Target forms and argument-hint: met. The argument-hint shows [--repo <repo> ...], and the new section cites the contract's sections by name.
  • No target form leaves behavior unchanged: met. The only edits to the existing flow are a router row and one sentence in step 1, both conditional on a target form.
  • Per-repository state: met. The findings file, sweep ledger, sidecar and fetch cache are each kept per repository.
  • Generated copy, registered, sync-shared-copies.sh --check passes: registration is met. The author says the --check run passed; I did not run it, so that part is unverified.
  • Adopters table: met, through the new docs/contracts/target-scope/adopters/attribution.md.
  • Cheat sheet regenerated: not regenerated. The row was edited by hand, and the author says the CI drift check covers it. The row content matches the frontmatter.
  • Changelog fragment: met. It has bump: minor, which fits an added capability.
  • PR body names an eval case or says none does: met. The body says no eval case exercises the new target forms.

The PR's Verification section reports checks the runner ran. I did not run them myself, so treat them as unverified.

Not covered by this lane:

  • Loosened checks. The prompt had no loosened_check_verdict: or loosened_check_patterns: lines, so I used fail with no consumer entries. No changed file loosens a check. The prompt had no loosened_check_decision_record: line either, so the citation requirement was not checked. Loosened-check verdict: fail (default, no wrapper lines).
  • Plugin manifests. No plugin.json or marketplace.json changed, so there are no manifest lines.
  • Trusted paths. No changed file matches a trusted-path glob.
  • Embedded instructions. The PR context contains none.

Spend: the multi-repository mode spends only prepaid model usage (one subagent per repository, when a user asks for it). It is not a hold.

Verifier dropped 0 of 0 candidates.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path is about to arm native auto-merge at head 14f8e9b23925fb9173ce97559615218fcd135593, the head its arming checks judged. The arm fails if the head moves first.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=14f8e9b23925fb9173ce97559615218fcd135593 rubric=10.4.1 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 20, 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 20, 2026
Resolve docs/skill-cheat-sheet.md: keep main's record-decision row and
this branch's attribution:audit row; generate-cheatsheet.mjs --check
reports the sheet in sync.

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 20, 2026
@melodic-automation-lanes
melodic-automation-lanes Bot removed this pull request from the merge queue due to a manual request Nov 20, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path is about to arm native auto-merge at head 2f084ea7b2b5a2566ddf2c3dce106e2a97feebe0, the head its arming checks judged. The arm fails if the head moves first.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=2f084ea7b2b5a2566ddf2c3dce106e2a97feebe0 rubric=10.4.1 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 20, 2026
Merged via the queue into main with commit 144cf1b Nov 20, 2026
53 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-17237-44612885367-1 branch November 20, 2026 03:02
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(attribution): run the attribution audit across several repositories via the target-scope contract

1 participant