Skip to content

feat(harness-memory): run the memory audit across several repositories via the target-scope contract - #17362

Merged
melodic-automation-lanes[bot] merged 9 commits into
mainfrom
work-resolve-issue/issue-17246-44447262620-1
Nov 19, 2026
Merged

melodic-automation-lanes[bot] merged 9 commits into
mainfrom
work-resolve-issue/issue-17246-44447262620-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #17246

Summary

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

/harness-memory:audit now accepts the target-scope contract's forms for audit, report and fix. It does this through a new 'Target scope' section that cites the contract's sections by name and states only what differs for this skill, and its argument-hint shows [--repo <repo> ...]. With no target form nothing changes. What differs for this skill: each pass runs from the clone's root and reads its working tree, since CLAUDE.local.md is untracked, auto memory is keyed to the clone path and the scripts resolve from cwd. User-scope files are audited in every pass because path-scoped rules and currency checks depend on the project. A rule repeated across repositories' CLAUDE.md, AGENTS.md or .claude/rules/ is a candidate for user scope or the standards repository. Reports stay under each clone's state key (state-key.sh --root from a worktree). fix runs in the main session, one repository at a time, because each fix needs approval; tracked files change in one worktree and one PR per repository. Eval case: none exercises the new Target scope section. Every audit case (for example audit-two-repos-keyed-apart) loads the changed SKILL.md, but none passes a target form.

Not verified

  • docs/skill-cheat-sheet.md was edited by hand, not regenerated with node scripts/generate-cheatsheet.mjs: the lane runs no interpreter. The edited row matches the new argument-hint and the format other adopters use; a regeneration on the PR should produce no further diff.
  • scripts/cross-plugin-source-registry.txt not edited: its existing 'reference/target-scope.md' entry and the 'docs/contracts/target-scope/README.md -> plugins/*/reference/target-scope.md' cluster line already cover the new harness-memory copy by glob.
  • tidy skipped: the change spans several areas (plugins/harness-memory, plugins/architecture, plugins/coupling, plugins/improvement, docs/contracts, docs/skill-cheat-sheet.md) and touches scripts/shared-copies.txt under the shared path scripts/.
  • Eval runs, markdownlint, typos, comment-hygiene and size-check did not run here (offline or not installed); left to the PR's CI.
  • Untracked dotfiles at the checkout root (.bashrc, .bash_profile, .gitconfig, .profile, .zshrc, .zprofile, .ripgreprc, .mcp.json, .idea, .vscode) were not created by this change; they look like sandbox mount stubs and are not part of the patch.

Fix

  • plugins/harness-memory/skills/audit/SKILL.md: argument-hint and Arguments line show [--repo <repo> ...]; new '## Target scope' section citing reference/target-scope.md and stating only what differs for this skill
  • plugins/harness-memory/reference/target-scope.md: new generated copy of docs/contracts/target-scope/README.md
  • scripts/shared-copies.txt: registers the harness-memory copy
  • docs/contracts/target-scope/README.md: Adopters table lists /harness-memory:audit
  • plugins/architecture/reference/target-scope.md, plugins/coupling/reference/target-scope.md, plugins/improvement/reference/target-scope.md: regenerated with the new Adopters row
  • docs/skill-cheat-sheet.md: harness-memory:audit row shows the new argument hint
  • .changes/harness-memory/work-resolve-issue-issue-17246-44447262620-1-0f563c6a.md: minor fragment for the new target forms and shipped copy
  • .changes/architecture/..., .changes/coupling/..., .changes/improvement/... (work-resolve-issue-issue-17246-*): patch fragments for the regenerated copies

Verification

The runner ran each check from the base copy against c2b878f:

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

The run reports:

  • sync-shared-copies --check: all 967 registered copies match their canonical sources
  • check-changelog-fragments: all 9 fragments valid
  • check-changed-skills: harness-memory/skills/audit PASS, 0 errors, 4 warnings (description 444 chars over the 419 warn setting, which predates this change; body 222 lines over the 160 measured max; body grew 190 -> 222; no Gotchas surface)
  • check-affected: 14 passed, 9 skipped (typos not installed, comment-hygiene fetch failed offline, size-check script missing, checked-tree-code checks), the rest CI only
  • fresh-context review subagent over the diff: 3 medium and 4 low findings (fix in a worktree breaking the state key and memory lookups, per-fix approval vs the subagent fan-out, where user-scope findings live, the header describing the invoking repo, update taking a target, cross-repo bullet scope…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44447262620

Left out: the items under Not verified.

Related

#17246

Lane-Activity: work-resolve-issue/resolve-issue
@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 bb71902f576c7be85c44336c0322f98dea392f1d. 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 success
Activity step success
Commits pushed none (read lane)
Run 44461928805

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 a7a8f735e7be2c0a0694f6fc494a8010dd22059e: read 6 of 6 changed file(s); 0 finding(s), 0 as inline comments.

Security review (blocking only): no issues found

This lane already reviewed an earlier head of this pull request, so this review reports only CRITICAL and IMPORTANT findings. I read every hunk of all 6 changed files in the full diff and found neither.

What changed: /harness-memory:audit can now run across several repositories using the target-scope contract.

  • plugins/harness-memory/skills/audit/SKILL.md has a new argument hint and a new "Target scope" section.
  • plugins/harness-memory/reference/target-scope.md is a new copy generated from the contract.
  • scripts/shared-copies.txt registers that copy.
  • docs/contracts/target-scope/adopters/harness-memory.md is a new adopter file.
  • docs/skill-cheat-sheet.md shows the new argument hint.
  • .changes/harness-memory/... is a minor changelog fragment.

What I checked

  • Trusted paths: none of the 6 changed files matches a listed trusted-path glob.
  • Trust controls: the change touches no trusted-actor list, token request, kill switch, merge hold, workflow or action.
  • Instruction surface: the change removes, narrows or softens no rule. The new "Target scope" section only adds rules:
    • fix still waits for the user's approval on each fix, and works one repository at a time in the main session.
    • Tracked files change only in a worktree, with one pull request per repository.
    • Each finding is checked again on the worktree's copy before it is edited.
    • Read-only runs still write nothing to any repository.
  • Untrusted input:
    • Each pass reads instruction files from the user's own local clones, selected by the user's own arguments or their ghq list.
    • Reading a clone's working tree instead of origin/HEAD exposes nothing beyond what the user's own session in that clone already loads.
    • No outside author's text reaches a lane that holds credentials.
  • Plugin manifests: no plugin.json or marketplace.json is changed.
  • Embedded text: neither the PR description nor the settled threads contain text aimed at this lane.
  • Settled threads: both threads are about copy drift and a missing changelog fragment, not security, so neither applies here.
  • Prior findings: the only earlier post is a summary with no findings, so nothing carries over.

Spend: none.

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 3865df1f6d78f58237d08c898bb0ea6c305ad115; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review (blocking only): harness-memory audit across several repositories

I found no blocking problems. I read every hunk of all 6 changed files in the full diff.

Shipped copy

  • I read plugins/harness-memory/reference/target-scope.md and docs/contracts/target-scope/README.md at this head and compared them. The copy is the generated header followed by README lines 1-118, line for line, and that includes the new "Adopters" paragraph that points at docs/contracts/target-scope/adopters/. I did not run scripts/sync-shared-copies.sh --check.
  • The copy is registered in scripts/shared-copies.txt in its alphabetical place, between docs-naming and improvement.
  • The new docs/contracts/target-scope/adopters/harness-memory.md uses the same format as the other adopter files, for example adopters/coupling.md.
  • Both earlier settled threads stay settled: the one on copy drift and the one on the missing docs-naming fragment. The owner fixed both at a47dfb5, and nothing at this head brings either back.

Checked against closing issue #17246

  • Argument hint: argument-hint and the Arguments line show [--repo <repo> ...].
  • Contract citation: the new "Target scope" section cites the contract's sections by name and states only what differs for this skill.
  • Default unchanged: with no target form, the audit runs on this project as before.
  • Per-repository state: each repository's report stays under that clone's own state key. The cited --root flag exists in plugins/harness-memory/lib/state-key.sh (usage at L48-L50).
  • Changelog fragment: a bump: minor fragment is under .changes/harness-memory/.
  • Eval case: the PR body says no eval case passes a target form.
  • Cheat sheet: the author says the row was edited by hand, not regenerated with node scripts/generate-cheatsheet.mjs. I did not check whether regenerating would change anything.
  • scripts/cross-plugin-source-registry.txt: the author says an existing glob line already covers the new copy. I did not check this.

This review was blocking only, because the lane had already reviewed earlier heads.

Loosened-check verdict: fail. That is the default, because the prompt gave no verdict or pattern lines (patterns: 0). The citation requirement was not checked, because the prompt gave no decision-record line. The change is documentation plus a shipped reference copy, and it loosens no check.

Spend: none.

Verifier dropped 0 of 0 candidates.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/address-feedback
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none (read lane)
Run 44463092866

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-feedback-patch
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed e5192ab
Run 44463092866

Failed GitHub API calls

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on e5192ab.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/publish-feedback
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44463092866

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-review: 1 inline finding(s) on e5192ab9475253eaa245f3f1fc85b5b07c6ef1c8; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/address-feedback
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none (read lane)
Run 44465044832

Failed GitHub API calls

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 2 of max 4 on e5192ab.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/publish-feedback
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44465044832

Failed GitHub API calls

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

@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 19, 2026
@kyle-sexton

Copy link
Copy Markdown
Member

A session is reworking this PR: it adds the missing .changes/docs-naming/ patch fragment for the edit to plugins/docs-naming/reference/target-scope.md. The session set the do-not-merge label for the rework and removes it when done.

The branch edits the shared copy plugins/docs-naming/reference/target-scope.md
with no .changes/docs-naming/ fragment, so Check Plugins failed with
MISSING FRAGMENT.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 19, 2026
@melodic-automation-lanes melodic-automation-lanes Bot added the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 19, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped address-feedback on this pull request: the pull request has an unresolved review thread the lane does not take (a reviewer it does not act on, a review of an older head, or a thread it already answered), so no lane resolves it and a session builder takes it. The lane labels it needs-session for a session builder, who makes the change this lane cannot, and the run ends in a failing pr-unblock/address-feedback 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=17362 -f activity=address-feedback

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

Failed GitHub API calls

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=a47dfb5294366189c0117926f794cb6959294fa7 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
@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/apply-conflict-patch
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed none recorded
Run 44503916278

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 44503916278

Failed GitHub API calls

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

…rs.md

Main (#17398) moved the target-scope Adopters table into
docs/contracts/target-scope/adopters.md. The harness-memory:audit row
lands there; the README and every plugin copy take main's text, the
harness-memory 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
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=b729f56bb74ecf12c16d7a193f78a31097a94600 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/apply-conflict-patch
Model rung 0
Leg base
Run job success
Activity step skipped
Commits pushed none recorded
Run 44563692663

Failed GitHub API calls

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

@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
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=4de55951d5ddafec719727d7490a0bb00c17543b 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 bb71902
Run 44578705412

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 44593049094

Failed GitHub API calls

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=a7a8f735e7be2c0a0694f6fc494a8010dd22059e 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 5d9099d Nov 19, 2026
53 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-17246-44447262620-1 branch November 19, 2026 19:26
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 5d9099d77da800ab4cfbb73ec53e8f1cdf5edd3f; 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(harness-memory): run the memory audit across several repositories via the target-scope contract

1 participant