Skip to content

[problem] wr-retrospective: two consumer-repo monorepo assumptions left after the 0.27.3 shim fix #453

Description

@tompahoward

Description

Two surfaces in wr-retrospective still assume the plugin's own packages/ monorepo layout, so they give the wrong answer in a repo that consumes the plugin rather than develops it. These are what is left after 0.27.3 shipped the three missing bin/ shims reported in #362.

1. check-readme-jtbd-currency treats "no plugin packages here" as a parse error. Invoked the way run-retro Step 2b invokes it, with no argument, <packages-dir> defaults to ./packages, which does not exist in a consumer repo, so the script prints check-readme-jtbd-currency: packages dir not found: packages to stderr and exits 2. That exit is documented, and run-retro's Step 2b interpretation branch 3 catches it and fails open, so nothing breaks. The problem is that the answer is wrong rather than that it is unhandled: a repo with no plugin packages has no plugin READMEs that could have drifted, and the true verdict is TOTAL packages=0 drift_instances=0, which the pass could then report as clean. Instead every retro in a consumer repo logs a failure line for a check that had nothing to find.

The script's own header says both things. Line 17 reads "Exit code is always 0 -- the script is advisory". The "Exit codes:" block then reads, at line 44, "0 = always (advisory only -- count is signal, not failure)", and at line 45, "2 = parse error (packages-dir missing or unreadable)". The run-retro SKILL carries the same pair, at line 177 and line 183. Whichever half is intended, the two halves disagree, and a reader of either file cannot tell which behaviour to expect.

2. The analyze-context Step 0 guard names a repo-relative path. Step 0 runs test -x packages/retrospective/scripts/measure-context-budget.sh and instructs the reader to halt with "verify the wr-retrospective plugin is installed and up to date" when it fails. Outside the source monorepo that test always fails, so the guard's verdict is always wrong. It is inert rather than harmful only because Step 1 measures through the wr-retrospective-measure-context-budget shim a few lines later and succeeds. The same file states the rule Step 0 breaks: line 48 reads "ADR-049 -- never invoke the canonical script via repo-relative path; the path does not resolve in adopter trees."

Symptoms

  • wr-retrospective-check-readme-jtbd-currency in a repo with no packages/ directory: exit 2, stderr check-readme-jtbd-currency: packages dir not found: packages. Every retro logs JTBD currency advisory failed: ... for a check with nothing to find.
  • Pointing the same command at a directory that exists but holds no package subdirectories with READMEs: exit 0 and no output at all. The TOTAL line Step 2b parses is suppressed when total_packages is 0, so neither invocation yields the clean verdict.
  • analyze-context Step 0's test -x packages/retrospective/scripts/measure-context-budget.sh returns non-zero on every invocation outside the source monorepo, while command -v wr-retrospective-measure-context-budget resolves fine.

Workaround

Both already fail open in practice. Step 2b's interpretation branch 3 absorbs the exit 2, and the Step 0 guard is contradicted by Step 1 before it can do any harm. No action is needed to keep a retro running; the cost is a recurring failure line and a guard that trains its reader to ignore it.

Affected plugin or component

@windyroad/retrospective. Files: scripts/check-readme-jtbd-currency.sh (the missing-directory branch and the suppressed TOTAL line), and skills/analyze-context/SKILL.md Step 0.

Frequency

Every retro and every deep context analysis run in any repo that consumes the plugin rather than develops it.

Versions

  • Local plugin: @windyroad/retrospective@0.27.5 (highest cached; shims resolve highest-version-wins per ADR-080)
  • Upstream package: @windyroad/retrospective@0.27.5
  • Claude Code CLI: 2.1.245
  • Node: v24.16.0
  • OS: Darwin 25.3.0 arm64

Evidence

Observed in a consumer repo with no packages/ directory, against 0.27.5:

$ wr-retrospective-check-readme-jtbd-currency; echo "exit=$?"
check-readme-jtbd-currency: packages dir not found: packages
exit=2

$ wr-retrospective-check-readme-jtbd-currency "$PWD"; echo "exit=$?"
exit=0
$ sed -n '35p' ~/.claude/plugins/cache/windyroad/wr-retrospective/0.27.5/skills/analyze-context/SKILL.md
test -x packages/retrospective/scripts/measure-context-budget.sh

The same session confirmed the three sites from #362 are working here: wr-retrospective-check-briefing-budgets, wr-retrospective-check-ask-hygiene and wr-retrospective-check-tickets-deferred-cause all resolve and exit 0, and run-retro names the shims for the first two at lines 359 and 301.

Suggested shape for both:

  1. In check-readme-jtbd-currency.sh, make the missing-directory branch emit TOTAL packages=0 drift_instances=0 and exit 0, and emit the same line when the directory exists but yields no packages. An empty inventory is a real answer rather than a parse failure. Keeping exit 2 for a directory that exists but cannot be read would preserve the distinction line 45 is reaching for, and would let lines 17 and 44 and the SKILL's line 177 stop contradicting it.
  2. In skills/analyze-context/SKILL.md Step 0, replace test -x packages/retrospective/scripts/measure-context-budget.sh with command -v wr-retrospective-measure-context-budget, matching the shim Step 1 already calls and the rule line 48 already states.

Additional context

Related to #362, which reported the three missing bin/ shims and is still open. Those shims ship from 0.27.3 onward, so this report covers only what is left rather than restating that one.

Cross-reference

Reported from https://github.com/windyroad/windyroad, where this is tracked as P130 in docs/problems/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions