Skip to content

refactor(playbooks): simplify the boris, repo-sweep and skill-authoring scripts - #14783

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14698-42645349535-1
Nov 9, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14698-42645349535-1

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes #14698

Summary

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

Simplified six of the nine listed playbooks scripts with no behavior change. Each change keeps the same output, exit codes and function names. In the two update.sh scripts: the cleanup function becomes an inline trap, the --help check is now one test instead of a two-pass case, and boris's version-report branches are merged into one if/elif/else. Boris's 26 manual-next-steps log calls became one heredoc. In repo-sweep: catalog.sh prints its TSV with print and OFS, history.sh computes one substring once and moves a duplicated truncation out of both branches, render.sh drops an unused FS assignment, and tick.sh writes its usage text as one heredoc. guard.sh, skill-version.sh and state.sh were reviewed and left unchanged because nothing in them could be shortened without changing behavior or moving code across files, which the issue rules out of scope.

Not verified

  • The plugin's *.test.sh suites (update.test.sh x2 and the repo-sweep tests) could not be run directly in this lane, which runs only the named wrappers. check-affected's output does not say which of them it covered. Left to the PR's CI.
  • shellcheck was not run on the edited scripts: no wrapper for it is available in this lane. Left to the PR's CI.
  • cant-fail-scan was not run: it scans test files, and this diff changes none.
  • tidy: passes 1-3 (code) ran and found nothing further to change. Passes 4-5 (markdown writing rules and ai-slop) were skipped for the changelog fragment, whose body text the issue fixes exactly.
  • guard.sh, skill-version.sh and state.sh: reviewed and left unchanged. The remaining duplication is shared with other files (the done-line regex in state.sh/tick.sh/history.sh, the update.sh helpers), and the issue reserves cross-file dedupe for the sub-epic's restructuring pass.
  • ci-status green is checked on the PR

Fix

  • plugins/playbooks/skills/boris/scripts/update.sh: inline EXIT trap in place of cleanup(); run_check version report merged into one if/elif/else with a ${local_ver:-<unset> ...} default; the manual-next-steps log lines became one unquoted heredoc with the same text; the -h/--help case became…
  • plugins/playbooks/skills/skill-authoring/scripts/update.sh: inline EXIT trap in place of cleanup(); the -h/--help case became an if test
  • plugins/playbooks/skills/repo-sweep/scripts/catalog.sh: TSV rows printed with print and the already-set OFS in place of an 8-field printf
  • plugins/playbooks/skills/repo-sweep/scripts/history.sh: : &gt;"$tmp/partial" hoisted above the gh if/else in place of one copy per branch; the PR-body awk computes the line tail once
  • plugins/playbooks/skills/repo-sweep/scripts/render.sh: removed an unused FS assignment (getline into a variable does not split, and split names its separator)
  • plugins/playbooks/skills/repo-sweep/scripts/tick.sh: usage() writes the same text from one heredoc in place of seven printf calls
  • .changes/playbooks/work-resolve-issue-issue-14698-42645349535-1-47139e50.md: new patch fragment, ### Changed, 'Internal simplification, no behavior change.'

Verification

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

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

The run reports:

  • check-changelog-fragments: all 1 fragment valid (run before and after tidy)
  • check-changed-skills: boris, repo-sweep and skill-authoring PASS, 0 errors; the warnings are pre-existing SKILL.md findings this diff does not touch (run before and after tidy)
  • check-affected: 13 passed, 6 skipped over 7 changed files (run before and after tidy)
  • fresh-context review subagent: no behavior change found in any edited file; it confirmed that the boris test's sed range still lists all 16 reference/*.md buckets and that the sourced helper names are unchanged
  • git-read diff --unified=0 HEAD: the heredoc text in boris update.sh and tick.sh matches the removed log/printf strings line for line, and the old : &gt;"$tmp/partial" came before the jq|awk pipeline, so hoisting it is equivalent
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42645349535

Left out: the items under Not verified.

Related

#14698

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

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

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

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

Security review: PR #14783 (head e0238fb)

I found no security issues. I read every hunk of all 7 changed files. None of them matches a trusted-path glob, and the diff touches no trust control, merge hold, plugin manifest or standing instruction.

What I checked:

  • boris/scripts/update.sh
    • The manual-next-steps text is now an unquoted heredoc. It expands only $VENDOR_FILE and ${upstream_ver}, the same variables the old double-quoted log calls expanded.
    • upstream_ver comes from outside the repository, but its value goes into the heredoc as plain text. It is not re-parsed, so a $() or a backtick inside it does not run. That is the same exposure as before the change.
    • The heredoc's literal text contains no backticks and no $(.
    • The NOTE: line warning that vendor/upstream-skill.md is untrusted third-party data is kept word for word.
    • The new ${local_ver:-<unset> (...)} default sits inside double quotes, so the < and the parentheses are plain text.
  • Both update.sh scripts
    • The cleanup trap is now trap 'rm -rf "$TMPDIR_RUN"' EXIT. Because of the single quotes, $TMPDIR_RUN is read and quoted when the trap fires, which matches the old cleanup() function. TMPDIR_RUN is set by mktemp -d and is not reassigned in the changed code.
    • The -h/--help check changed from a case to an if test. The control flow is the same.
  • repo-sweep scripts
    • catalog.sh: print with OFS="\t" gives the same TSV as the old printf, and it is no longer a printf format string.
    • history.sh: the : >"$tmp/partial" line moved above the if, and the awk script now computes tail once. Same behaviour, and the isCrossRepository filter on PR bodies is unchanged.
    • render.sh: removed an FS assignment nothing used.
    • tick.sh: the usage text is now a quoted heredoc (<<'EOF'), so nothing in it expands.
  • .changes/ fragment: changelog text only.

The PR description contains no text telling the lane to pass the PR, skip a check or drop a finding. The change uses no extra API credit or subscription usage beyond normal CI.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

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

Code review: no findings

I read every hunk of all 7 changed files. None of them is on a trusted path. Each edit was checked against the head file to confirm behavior stays the same, which is what #14698 requires.

  • boris/scripts/update.sh, skill-authoring/scripts/update.sh
    • EXIT trap: the inline trap does the same thing as the old cleanup(), and nothing in the plugin calls cleanup by name.
    • run_check: the merged if/elif/else prints the same lines in the same order (local, upstream, then the drift or match message) and sets drift the same way.
    • Manual-steps heredoc: it is unquoted, so "$VENDOR_FILE" and ${upstream_ver} still expand. The text has no backticks or backslashes that would change it. The test at update.test.sh:173 still uses sed -n '/Integrate new tips/,/Update SKILL.md/p', and that range still finds both of its marker lines.
    • --help check: the if test matches the same inputs as the old case pattern.
  • repo-sweep/scripts/catalog.sh: OFS="\t" is already set when print runs. Every field comes from trim()/substr(), so each one is a string and OFMT never changes how a value prints.
  • repo-sweep/scripts/history.sh: clearing $tmp/partial once, before the if/else, is equivalent to clearing it in each branch. tail is worked out after the only sub() that changes $0, so it holds the same value as both old substr calls.
  • repo-sweep/scripts/render.sh: the removed FS = "\t" was inside END, after all input was read. getline l doesn't split fields and split names its own separator, so the line had no effect.
  • repo-sweep/scripts/tick.sh: the quoted heredoc writes the same usage text to stderr.
  • Changelog fragment: bump: patch, then ### Changed and the exact line the issue asks for.

Closing issue #14698, acceptance criteria:

  • Behavior unchanged: met, from reading the code. The existing update.test.sh and catalog.test.sh suites cover the changed paths. I did not run them.
  • Only listed files and fragments changed: met.
  • Within 400 lines and 15 files: met (6 scripts plus 1 fragment, about 120 changed lines).
  • Fragment from the script with the required body: met.
  • ci-status green: the PR author says so; I did not check it.

The author's test, shellcheck and check-affected results are also author-claimed and unverified. This lane had no shell, so I ran nothing.

No embedded instructions in the PR context. No plugin manifest changed. No paved-path concerns.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for e0238fb

The verifier passed this head. The capture artifact holds the capture summary, which says whether the capture ran, and any screenshot or video that passed the mask check; this comment uploads no file.

Capture artifact: pr-capture-14783-e0238fb2821373ce66981f1c25f4406d3cf981cf, expires on 2026-12-09.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit 804cbfc Nov 9, 2026
64 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14698-42645349535-1 branch November 9, 2026 20:59
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 5, survived 2, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 71%; mutation score 71%.

File Killed Survived Timeout No coverage Invalid Not run
plugins/playbooks/skills/boris/scripts/update.sh 2 0 0 0 0 0
plugins/playbooks/skills/repo-sweep/scripts/catalog.sh 1 0 0 0 0 0
plugins/playbooks/skills/repo-sweep/scripts/history.sh 1 1 0 0 0 0
plugins/playbooks/skills/repo-sweep/scripts/tick.sh 0 1 0 0 0 0
plugins/playbooks/skills/skill-authoring/scripts/update.sh 1 0 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/playbooks/skills/repo-sweep/scripts/history.sh:44 LCR productive input-gap
plugins/playbooks/skills/repo-sweep/scripts/tick.sh:32 other productive no-assertion

The run's summary has the full report.

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.

Simplify the boris, repo-sweep and skill-authoring playbooks plugin code

0 participants