Skip to content

Visual testing cleanup: repoint workspace references to the retired Storybook control scripts #720

Description

@nathanacurtis

Parent: #588 — cleanup, after the suite lands.

Problem

Two Storybook control scripts were deleted from the test repo on 2026-10-07 because the CLI now carries both features: specs storybook dev spawns a library's own Storybook with --ci and infers the port the same way, and the server module carries the index-recovery logic that the second script existed for. All four library fixtures are scaffolded, so the replacement works everywhere.

Seven references to the deleted scripts remain in the workspace repo. Two of them are live:

  • The build-posture PreToolUse hook intercepts npm run storybook and tells the caller to use the deleted script instead. The redirect was the whole point of the hook — a raw storybook dev hits interactive prompts that exit silently when backgrounded, leaving a stale server holding the port — so the guard is still wanted; it just needs to name the command that exists.
  • The workspace CLAUDE.md Storybook section documents the deleted script as the canonical way to start Storybook.

Four are in skills that remain in active use — transform.qa.start, transform.fix, transform.vt, implement-role — and one is a comment in the QA teardown script. These skills are not legacy and are not superseded; they describe how the work is actually done, and they need updating once the commands in #588 land rather than retiring.

transform.vt is the one with real overlap: it drives the visual diffs through the test repo's npm scripts today, and every one of those invocations becomes a specs testing visual subcommand. It should be rewritten against the new surface, not deleted.

Potential solution(s)

  • Repoint the hook's message and the CLAUDE.md section at specs storybook dev.
  • Update the four skills to the new command surface — specs storybook dev for bringing Storybook up, and for transform.vt, the specs testing visual subcommands in place of the npm scripts. Keep the procedures; change the commands they run.
  • Drop the stale comment in the teardown script.

Acceptance criteria

  • No reference to either deleted script remains in the workspace repo.
  • The hook still refuses a raw storybook dev and names a command that exists.
  • CLAUDE.md documents the current way to bring Storybook up.
  • All four skills run clean against the shipped commands, with their procedures intact.

Case data

  • Territory: cli
  • Size: s

Notes

Sequencing: the hook and CLAUDE.md can be fixed now; the skills should be updated after #588's commands exist, since that is what they will be pointing at. The hook is the one that bites in the meantime — it denies the raw command and offers a replacement that is no longer there.

Activity

  1. self-assigned this
    on Oct 8, 2026
  2. nathanacurtis commented on Oct 8, 2026

    @nathanacurtis
    MemberAuthor

    Done, all four acceptance criteria:

    • Zero references to either deleted script remain in the workspace repo.
    • The PreToolUse hook now redirects raw storybook dev / npm run storybook to specs storybook dev (with the dev invocation spelled out), and exempts the CLI's own invocation — which the old pattern was accidentally catching.
    • The workspace CLAUDE.md Storybook section documents specs storybook dev, the one-port-at-a-time constraint included.
    • All four skills updated with procedures intact; transform.vt is rewritten against specs testing visual end to end — per-mode reports, self-scoping capture, the composition area-vs-meaning caution — and the stale teardown comment is gone.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

clispecs-cli commandstestingspecs-testing parity validation

Type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions