Skip to content

refactor(planning): wayfind reads the container label from the convention home - #11942

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

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

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Refs: #11882

Summary

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

/planning:wayfind no longer runs jq over the root JSON binding. A new skill-local script, skills/wayfind/scripts/container-label.sh, reads tracker.config.container_label from <home>/work-items.yaml. It uses planning's own generated copies of the convention-home resolver and the YAML subset parser, keeps the work-map default, and keeps the stop on a non-string value. SKILL.md's pre-computed context, tracker-mechanics.md and prerequisites.json now point at it. Why this design: the seam's reader (lib/binding.sh, merged in #11925 for #11872) has no public verb or script another plugin can call, and a plugin cannot name another plugin's install path. #11925 itself followed the repository's shared-copy pattern of the same resolver and parser, so the script repeats that reader's YAML rules (home resolution, default home docs/conventions, empty-sequence marking, non-string rejection) on planning's copies.

Remaining work

  • While the seam's legacy JSON fallback lasts, a repository bound only by the root JSON file with a remapped container_label still gets work-map from wayfind. The done-when bars planning from naming that file, and the seam offers no public reader another plugin can call. Closing this gap needs either

Not verified

  • container-label.test.sh was not executed: this lane runs no interpreter or test runner; left to the PR's CI
  • bash plugins/skill-quality/scripts/check-skill.sh plugins/planning/skills/wayfind (an issue done-when item) did not run: check-affected skips changed-skills because it runs the checked tree's own code, and the lane cannot run it directly; left to the PR's CI
  • The two new .sh files were written without the executable bit (the lane has no chmod). SKILL.md and the test call them through bash, so nothing depends on the bit, but a repository exec-bit rule may still flag them in CI
  • review-venue.txt was absent, so a local fresh-context subagent did the review
  • verify: no build or test ran here; CI runs the suites

Fix

  • plugins/planning/skills/wayfind/scripts/container-label.sh: new; resolves the convention home, parses <home>/work-items.yaml, prints the label or work-map, and prints one ERROR: line (exit 1) for a broken pointer, an unparsable file, a mapping/sequence/empty-sequence value, or a quote or contr
  • plugins/planning/skills/wayfind/scripts/container-label.test.sh: new black-box test: no file, no key, remap, empty, mapping, sequence, empty sequence, control character, broken pointer, quote, unparsable file, bound home over default home, usage error
  • plugins/planning/skills/wayfind/SKILL.md: the container-label pre-computed line runs the script in place of the jq one-liner
  • plugins/planning/skills/wayfind/context/tracker-mechanics.md: the 'Resolve the container label' section runs the script and describes its read and its ERROR cases, replacing the jq snippet
  • plugins/planning/prerequisites.json: jq no longer lists skill:wayfind, and its degrade text drops the wayfind clause
  • .changes/planning/work-resolve-issue-issue-11882-c4a8e2d6.md: patch fragment for planning

Verification

The runner ran each check from the base copy against 8f66b6b:

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

The run reports:

  • check-changelog-fragments: all 120 fragments valid (run before and after tidy and review)
  • check-affected: 12 passed, 6 skipped over 6 changed files; the first run failed shellcheck (SC2249 missing default case, SC2016 literal backticks), fixed and re-run clean, and re-run clean again after the tidy and review fixes
  • Grep for '.work-item-tracker' over plugins/planning outside CHANGELOG.md: no match
  • ai-slop detect.sh on tracker-mechanics.md and the fragment: 0 findings
  • fresh-context review subagent: one medium finding (an empty flow sequence was accepted where the seam rejects it) and low findings (root anchor differed from the seam's, missing tests, an unused variable); all fixed
  • read https: //github.com/melodic-software/claude-code-plugins/issues /7578: the parent lists #11882 as blocked on #11872
  • read https: //github.com/melodic-software/claude-code-plugins/issues /11872: the seam binding reader moves to <home>/work-items.yaml with a JSON fallback; closed as completed
  • read https: //github.com/melodic-software/claude-code-plugins/pull /11925: merged; the seam resolves the home with a generated copy of resolve-convention-home.sh and parses with the yaml-subset.awk copy; names no consumer outside work-items
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/41313115723

Left out: the items under Not verified.

Related

#11882

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

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

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

Security review: PR #11942 (no security issues found)

I read every hunk in all 6 changed files. None of them matches a trusted-path glob, none is a plugin manifest (plugin.json / marketplace.json), and none is a trust control, merge hold or kill switch.

What changed: /planning:wayfind used to get its container label with a jq one-liner over .work-item-tracker.json. It now gets it from a new script, plugins/planning/skills/wayfind/scripts/container-label.sh. The script finds the convention home with planning's own lib/resolve-convention-home.sh, then parses <home>/work-items.yaml with skills/setup/scripts/yaml-subset.awk. I confirmed both files exist in the tree.

What I checked:

  • Where the input comes from: the script reads only the repository's own work-items.yaml and its convention-home pointer. Both are files in the working tree, not text from an outside author. The script parses them with awk and never runs anything it reads (no eval, no source).
  • Paths: the YAML path is built as $root/$home/work-items.yaml. $home comes from the existing resolver, and a broken pointer (exit 3) stops the script with an ERROR: line.
  • Label injection: the label is copied into single-quoted action arguments, so the script still rejects a quote or control character (container-label.sh:214-217). The old pre-computed line in SKILL.md had no such check, so this path now validates more strictly than before. A label containing $() or backticks stays inert inside single quotes.
  • Wrong-type values: a mapping, a sequence or an empty sequence under the key stops the script with an ERROR: line instead of quietly falling back to the default. That matches the seam's rule.
  • Instruction-surface lens: tracker-mechanics.md and SKILL.md keep the rule "on an ERROR line, stop and report instead of creating anything" (tracker-mechanics.md:93). The script now does the type and quote checks the removed snippet did, so no guardrail is lost.
  • Embedded text: the PR context has no instruction aimed at the review lane.

The pull request spends nothing billable. Its CI runs one new shell test.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

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

Code review: PR #11942 (wayfind reads the container label from the convention home)

I found no blocking or advisory issues. I read every hunk of all 6 changed files. None of them matches a trusted-path glob.

What I checked

  • container-label.sh against the seam's reader. I compared the new script with binding.sh. These rules match the seam:
    • The project root comes from CLAUDE_PROJECT_DIR, else the git toplevel.
    • Resolver exit 0 uses the bound home and exit 1 uses docs/conventions; exit 3 is a hard error.
    • Empty flow sequences are marked with the same \002[] marker and the same awk lead regex.
    • A mapping or sequence under the key is rejected. In the parser these show up as key.<n> or key.<sub> records, so the KEY. prefix check catches both.
    • An absent or empty key gives work-map.
  • Parser behaviour. I checked the planning copy of yaml-subset.awk:
    • Its error\t<line>\t<msg> output and exit 1 match how the script handles a parse failure.
    • Its \t unescaping means the control-character test case really does produce a tab, which the script then rejects.
  • SKILL.md. The !bash "${CLAUDE_PLUGIN_ROOT}/…"`` pre-computed context form is already used by 10 other SKILL.md files. An ERROR: line goes to stdout, so it still reaches the context with `2>/dev/null || true`.
  • jq references. Nothing under plugins/planning/skills/wayfind uses jq or .work-item-tracker.json any more. So dropping skill:wayfind from the jq prerequisite and its degrade text is correct.
  • File modes. The diff shows both new scripts as mode 100755. The PR body's "Not verified" note says the executable bit is missing; that note is out of date.
  • Tests. container-label.test.sh covers every case the script's header lists: default, remap, empty value, mapping, sequence, empty sequence, control character, quote, unparsable file, broken pointer, bound home over the default home, and a usage error. I did not run it because this lane has no shell. The author also says it was not run, so it is unverified and left to CI.
  • Changelog fragment. bump: patch fits a refactor of an internal read path with the same output and default.
  • Path-scoped rules. skill-bodies-state-current-rules.md and cost-claims.md match the skill files. The changed text restates no volatile upstream specifics and makes no cost claims.

Notes (not counted as findings)

  • Known gap a person may want to weigh. A repository still bound only by the legacy root .work-item-tracker.json with a remapped container_label will now get work-map from wayfind. The seam keeps reading the remap from the JSON fallback (wit_find_binding). That causes exactly the mismatch tracker-mechanics.md warns about: maps created under one label, with the seam's frontier exclusion keyed to another. The PR states this in the changelog fragment and under "Remaining work", as a deliberate scope limit (planning must not name the legacy file). I'm noting it for awareness rather than as a defect in this diff.
  • Truncated PR description. The PR body's "Remaining work" bullet stops mid-sentence ("Closing this gap needs either"), so the follow-up options it meant to list are missing.
  • No closing issue. The PR context has only Refs: #11882 and no closing-issue section, so I had no acceptance criteria to check.
  • Not independently verified. All verification the author reports (check-affected, shellcheck, fragment check) is the author's claim; I did not confirm it.
  • Spend. None; the change adds no API, Actions or billing usage.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 8f66b6b2081d7806a6376c28c705495656b8bf80.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 1, 2026
Merged via the queue into main with commit 77aa3db Nov 1, 2026
43 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-11882-41313115723-1 branch November 1, 2026 14:36
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 77aa3dbe87cd570f5394554a1139c9688eb4e6bb; 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.

0 participants