Skip to content

fix(docs-hygiene): resolve extract-ssot verify spoke's script path through skill-dir - #11733

Closed
melodic-automation-lanes[bot] wants to merge 2 commits into
mainfrom
work-resolve-issue/issue-11724-41246963914-1
Closed

melodic-automation-lanes[bot] wants to merge 2 commits into
mainfrom
work-resolve-issue/issue-11724-41246963914-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #11724

Summary

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

extract-ssot's verify action ran emit-verify-facts.sh through a literal ${CLAUDE_SKILL_DIR}. Claude Code substitutes that token only in SKILL.md content, never in a spoke read through the Read tool, and the Bash tool's environment does not carry the variable, so the command pointed at /scripts/emit-verify-facts.sh. The spoke now writes <skill-dir>/scripts/emit-verify-facts.sh, and SKILL.md gains a ## Spoke paths section that defines <skill-dir> as ${CLAUDE_SKILL_DIR}. The section follows the convention in plugins/context7/skills/lookup/SKILL.md:64-76, with its scope narrowed to actions/, the only directory that uses the placeholder.

Not verified

  • Same defect outside this issue's scope: plugins/docs-hygiene/skills/audit-noise/context/persist-findings.md:52 names emit-findings.sh through a literal ${CLAUDE_SKILL_DIR} in a spoke file. Left for a follow-up issue.
  • plugins/docs-hygiene/scripts/allowed-tools-pairing.test.sh not run here (the lane runs only its named wrappers); it covers only audit-noise and audit-progressive-disclosure, so extract-ssot is outside it. Left to the PR's CI.
  • check-affected skipped typos (not installed), the validate-plugins sub-checks that run code from the checked tree, and changed-skills; its CI-only checks (lychee-offline, portability-lint, purged-em-dashes and others) are left to the PR's CI.
  • tidy: the ai-slop deterministic detector (detect.sh) and digest-guard did not run because the lane allows no script outside its named wrappers; only the rubric read ran.
  • new-changelog-fragment refused on the detached HEAD ('HEAD is not on a branch'); the fragment was written by hand in the existing format and passes check-changelog-fragments.
  • Untracked dotfiles in the checkout root (.bashrc, .bash_profile, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc) were not created by this run and are not part of the change.

Fix

  • plugins/docs-hygiene/skills/extract-ssot/actions/verify.md: line 78 runs bash "<skill-dir>/scripts/emit-verify-facts.sh" --phrase ... in place of the unexpanded ${CLAUDE_SKILL_DIR} token.
  • plugins/docs-hygiene/skills/extract-ssot/SKILL.md: new ## Spoke paths section stating that the actions/ files write the skill directory as <skill-dir>, which is ${CLAUDE_SKILL_DIR}, to be substituted before running a command and never passed to Bash as a ${...} token; includes a pointer, an as
  • .changes/docs-hygiene/fix-11724-extract-ssot-skill-dir-3c8e41b7.md: new patch changelog fragment (### Fixed) worded after plugins/context7/CHANGELOG.md:131.

Verification

The runner ran each check from the base copy against 364ce44:

  • scripts/check-changelog-fragments.sh --check: passed

The run reports:

  • read https: //code.claude.com/docs/en/plugins/manifest-reference#where-each-variable-resolves: for skill, command and agent content, ${...} resolves anywhere in the Markdown body; the variables are not present in the environment of commands Claude runs through the Bash tool, in the main session or a
  • Grep for CLAUDE_SKILL_DIR under plugins/docs-hygiene/skills/extract-ssot: the only match is SKILL.md:245, inside SKILL.md content where substitution happens; actions/ and context/ have none.
  • Confirmed plugins/docs-hygiene/skills/extract-ssot/scripts/emit-verify-facts.sh exists, so the resolved path points at a real script (fresh-context review read it).
  • .lane/checks/bin/check-changelog-fragments: 'All 10 changelog fragment(s) under .changes/ are valid.' (run before and after tidy and the review fix)
  • .lane/checks/bin/check-affected: '11 passed, 7 skipped over 3 changed files' (run before and after tidy and the review fix)
  • Fresh-context review subagent: no blocking findings; one confirmed wording finding (the section named context/ files, which use no placeholder), fixed by narrowing the scope to actions/.
  • code-tidying:tidy-diff over the 3 changed hunks: all markdown; write-for-agents, write-for-humans and an ai-slop rubric read produced no edits.
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41246963914

Left out: the items under Not verified.

Related

#11724

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

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review: PR #11733

No security issues found.

I read every hunk of both changed files in .claude-lane/pr.diff, and the surrounding ## Spoke paths section of plugins/docs-hygiene/skills/extract-ssot/SKILL.md at head.

  • .changes/docs-hygiene/fix-11724-extract-ssot-skill-dir-3c8e41b7.md: a new changelog fragment with prose only. No security surface.
  • plugins/docs-hygiene/skills/extract-ssot/SKILL.md (L249-L255): adds a Pointer / As of / Recheck trigger block under the existing ## Spoke paths section. The link goes to the official code.claude.com docs. Nothing here deletes, narrows or softens a standing instruction. The rule just above it, "never hand a ${…} token from those files to the Bash tool" (L245-L247), is unchanged, so the instruction-surface lens has nothing to check. The change adds no tool grant, allowed-tools entry, command, or manifest field.

Other checks:

  • No changed file matches a trusted-path glob, and none is a trust control, a merge hold, a plugin manifest or a workflow.
  • The PR context says actions/verify.md was edited, but this diff does not contain that file (that change is probably already on the base). Either way it is a documentation path fix with no security effect.
  • The PR context contains no embedded instructions aimed at the review lane.
  • Spend: none.

critical-findings: 0

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review: PR #11733

Scope: I read every hunk of both changed files: .changes/docs-hygiene/fix-11724-extract-ssot-skill-dir-3c8e41b7.md and plugins/docs-hygiene/skills/extract-ssot/SKILL.md. Neither file matches a trusted-path glob.

Main already fixed #11724

At head, the change this PR's description lists is already on the base branch. It is not in this diff:

  • actions/verify.md:78 already reads bash "<skill-dir>/scripts/emit-verify-facts.sh". See verify.md#L78.
  • The ## Spoke paths section is already in SKILL.md, worded for both actions/ and context/. The PR body says the scope was narrowed to actions/, but main's wording stayed. See SKILL.md#L243-L247.
  • Main also already has a changelog fragment for this fix: fix-11724-extract-ssot-spoke-path-0a43634f.md.

After the merge of main, this PR adds only two things: the Pointer / As of / Recheck trigger block under ## Spoke paths, and a second changelog fragment. The PR title, body, and "Closes #11724" still describe the full fix.

Findings

  1. Duplicate changelog fragment for a fix that already shipped (inline comment on the fragment). The fragment describes changes this diff no longer makes. With main's fragment, docs-hygiene's next release would list the same fix twice.

The rest of the diff

The pointer block in SKILL.md is accurate and follows the pointer, as-of and recheck-trigger form. I have no finding on it. It could ship alone with a fragment that describes only that addition, or under a ### Changed entry. Or the PR could close as superseded. That choice belongs to the author.

Closing issue #11724

The issue's fix is met at head: the spoke uses <skill-dir>, and SKILL.md defines it. Main's change made both edits, not this diff. No test in the repository checks that spoke files avoid a literal ${CLAUDE_SKILL_DIR}. The PR body itself names a second spoke with the same defect (audit-noise/context/persist-findings.md:52), and I did not check that file. The author's verification claims (fragment check passed, check-affected 11 passed) are author-claimed and unverified. I ran no checks.

No embedded instructions in the PR context.

critical-findings: 1

Findings not posted inline (their lines are not in the diff):

  • .changes/docs-hygiene/fix-11724-extract-ssot-skill-dir-3c8e41b7.md:13 (RIGHT): This fragment describes a fix main already shipped, and main has its own fragment for it.

After the merge of main, this diff does not change actions/verify.md, and it does not add the ## Spoke paths section. Both are already on the base branch: verify.md:78 reads <skill-dir>/scripts/emit-verify-facts.sh, and SKILL.md:243-247 holds the section. This diff only adds the Pointer / As of / Recheck trigger block under that section.

Main also carries .changes/docs-hygiene/fix-11724-extract-ssot-spoke-path-0a43634f.md (bump: patch, "give extract-ssot's verify spoke a resolvable script path"). If both fragments ship, the next docs-hygiene release lists the #11724 fix twice. This entry also claims the release adds a ## Spoke paths section, but this release does not add one.

Fix: delete this fragment and close the PR as superseded by the change already on main. To keep the pointer block, reword this fragment to cover only that addition, for example a ### Changed entry: "extract-ssot's ## Spoke paths section links the docs table on where each ${…} reference resolves, with an as-of date and a recheck trigger." Also update the PR title and body, since "Closes #11724" is already satisfied by main.

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

claude-lane: claude-review


```bash
bash "${CLAUDE_SKILL_DIR}/scripts/emit-verify-facts.sh" --phrase "<discriminating phrase>"
bash "<skill-dir>/scripts/emit-verify-facts.sh" --phrase "<discriminating phrase>"

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.

Advisory: no check would catch this bug if it came back. The closing issue's fix is met, but nothing in the repo fails if a spoke goes back to a literal ${CLAUDE_SKILL_DIR}.

The nearest guard is scripts/check-spoke-plugin-root.sh. It has two gaps:

  • It looks only for ${CLAUDE_PLUGIN_ROOT}, not ${CLAUDE_SKILL_DIR}.
  • It scans only context/, reference/ and references/. It never scans actions/, where this spoke lives.

To see it: change line 78 back to bash "${CLAUDE_SKILL_DIR}/scripts/emit-verify-facts.sh" ... and run the check. It stays green.

The PR body names the same defect in audit-noise/context/persist-findings.md:52. That suggests the gap is a pattern rather than a one-off. Two options:

  • Widen the check to cover ${CLAUDE_SKILL_DIR} and the actions/ directory, with a baseline entry for persist-findings.md.
  • Open a follow-up issue for that check alongside the audit-noise one.

claude-lane: claude-review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

pr-unblock / address-feedback: UNCERTAIN, left open

Evidence: scripts/check-spoke-plugin-root.sh:60, scripts/check-spoke-plugin-root.sh:67, plugins/docs-hygiene/skills/audit-noise/context/persist-findings.md:52

The gap is real. scripts/check-spoke-plugin-root.sh searches only the context, reference and references directories (line 60). It greps only for the plugin-root token, never the skill-dir token (line 67). So a spoke under actions/ that went back to the literal skill-dir variable would pass. The line this PR fixed (verify.md:78) now reads <skill-dir> as intended. The problem is wider than the review says: besides docs-hygiene audit-noise persist-findings.md:52, the literal skill-dir token is also in harness-config audit-instructions persist-findings.md:54, ai-slop audit persist-findings.md:32 and :98, and attribution audit persist-findings.md:56. Widening the check means editing scripts/check-spoke-plugin-root.sh and its baseline. Both are outside this thread's editable scope (check-paths refused the script), and the change touches shared CI gating with a multi-plugin baseline, which is more than one scoped change. Leaving this open for a person to decide: either widen the check here or open a follow-up issue.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

melodic-automation-lanes Bot commented Oct 31, 2026 •

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 nothing will resolve it. The lane sets no label: 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=11733 -f activity=address-feedback

@melodic-automation-lanes

melodic-automation-lanes Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 7e09189dcd8034f88fc6295b0cbedfaf6040e1ba. The lanes clear this reason on their own; the next scheduled run judges it again.

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

Lane-Activity: pr-unblock/resolve-conflicts

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.

The pr-verify verifier failed head 7e09189dcd8034f88fc6295b0cbedfaf6040e1ba. What it wrote, as data:

What it wrote (23 lines)
Summary: Issue #11724 asks for three things: extract-ssot's actions/verify.md should run
  `<skill-dir>/scripts/emit-verify-facts.sh` instead of using a literal `${CLAUDE_SKILL_DIR}`,
  SKILL.md should gain a `## Spoke paths` section, and a changelog entry should record the fix. The
  judged diff (base 60b4096 to head 7e09189) does not touch actions/verify.md. Its SKILL.md change
  only adds a Pointer / As of / Recheck trigger block below placeholder text that is already at
  base. It also adds a changelog fragment describing a verify.md fix and a new Spoke paths section,
  and this diff makes neither change. Nothing in the diff shows that the core done-when items are
  met, and the changelog would claim work this pull request does not ship.
- plugins/docs-hygiene/skills/extract-ssot/actions/verify.md: the diff does not change this file, so
  it does not show the done-when items 'verify.md no longer contains ${CLAUDE_SKILL_DIR}' and 'line
  ~78 runs <skill-dir>/scripts/emit-verify-facts.sh' being met. The PR body says this file was
  changed at 364ce442, but that change is not in the base-to-head diff of 7e09189. Either restore
  the verify.md change on the branch, or, if base already fixed it, say so in the PR body and drop
  the changelog claims (see the next note).
- The PR body and the bot review thread raise the same literal-token defect in other spokes
  (audit-noise persist-findings.md:52 and others) and a gap in scripts/check-spoke-plugin-root.sh.
  Both are outside #11724's scope and are left for a follow-up. I found no text that tries to steer
  the reviewer.
- .changes/docs-hygiene/fix-11724-extract-ssot-skill-dir-3c8e41b7.md:13: the fragment says verify.md
  'now reads <skill-dir>/scripts/emit-verify-facts.sh' and that 'SKILL.md gains a `## Spoke paths`
  section', but this diff does neither. If base already shipped the fix with its own changelog
  entry, delete this fragment so the release notes do not record it twice. Otherwise, add the
  missing verify.md and section changes so the fragment is accurate.

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.

The pr-verify verifier failed head 7e09189dcd8034f88fc6295b0cbedfaf6040e1ba. What it wrote about this file, as data:

- plugins/docs-hygiene/skills/extract-ssot/SKILL.md:246: the context lines show that base already
  has the `<skill-dir>` placeholder text ('The `actions/` and `context/` files write this skill's
  directory as `<skill-dir>`...'). The PR body says its fix narrowed this wording to actions/ only,
  but the head still names context/. So the branch looks rebased or reset onto a base that already
  carries a fix, and the branch's own section change is gone. Reconcile the branch with base before
  the next round.
- plugins/docs-hygiene/skills/extract-ssot/SKILL.md:249-255: the added Pointer / As of 2026-10-31 /
  Recheck trigger block is not asked for by the issue. It is harmless prose, but it should be listed
  as extra work. It also overlaps the `## Recheck triggers` table that follows it, so consider
  moving the trigger into that table.

@kyle-sexton

Copy link
Copy Markdown
Member

Superseded by #11749, which merged the #11724 fix (extract-ssot actions/verify.md:78 now runs /scripts/emit-verify-facts.sh on main). This branch's remaining diff is a duplicate changelog fragment and an unrequested pointer block, as pr-verify noted at 7e09189. The spoke-check gap from the advisory thread is tracked separately.

@kyle-sexton kyle-sexton closed this Nov 1, 2026
@github-actions
github-actions Bot deleted the work-resolve-issue/issue-11724-41246963914-1 branch November 4, 2026 06:29
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.

fix(docs-hygiene): extract-ssot verify spoke uses an unexpanded ${CLAUDE_SKILL_DIR}

1 participant