Skip to content
This repository was archived by the owner on Sep 7, 2026. It is now read-only.

Switch the no-stories setup path to npx storybook ai simple-setup - #365

Draft
kasperpeulen wants to merge 5 commits into
kasper/vibrant-margulis-bc7abafrom
kasper/simple-setup-in-skills
Draft

kasperpeulen wants to merge 5 commits into
kasper/vibrant-margulis-bc7abafrom
kasper/simple-setup-in-skills

Conversation

@kasperpeulen

@kasperpeulen kasperpeulen commented Jul 14, 2026

Copy link
Copy Markdown
Member

Stacked on #364 (base is its branch; retarget to main once it merges).

What changed

Setup skills (packages/claude-plugin/skills/storybook-setup/SKILL.md and its codex twin packages/codex-plugin/plugins/storybook/skills/setup/SKILL.md) — the decision tree is now strictly forward-only, 8 steps:

  • The default no-user-stories path runs npx storybook ai simple-setup instead of npx storybook ai setup. The new command prints a prompt that writes one story file for one simple component (default story, a couple of variants, and a StyleCheck story that asserts the app's global CSS actually loads), runs the run-story-tests self-heal loop, and ends by offering to build out stories for more components. The skill relays that offer to the user when showing the result.
  • An explicit bulk request is gated before story detection (step 4), so it goes straight to the bulk build-out on any project — including one without stories — instead of falling through to simple-setup.
  • Bulk build-out is the terminal step (step 8), reached from the explicit-request gate or from a yes on the offer. It stays on npx storybook ai setup.
  • Both generation paths ensure @storybook/addon-vitest (install if missing) so the printed instructions always include the run-story-tests self-heal loop rather than falling back to visual-only verification.

Version floor 10.5 → 10.5.2simple-setup first ships in Storybook 10.5.2, so the minimum moves in the setup/upgrade/stories skills of both plugins, both plugin READMEs, and the version-floor assertions of evals 821–823.

Evals — the story-gate matchers now know simple-setup: eval 820 (fresh init, no stories) expects npx storybook ai simple-setup, the negative gate (823/824) rejects both ai setup and ai simple-setup, and the token-aware matcher takes an optional subcommand filter (with unit tests).

Twin guard — a new test keeps the setup/init/upgrade skill bodies identical across the two plugins modulo skill references ($storybook:x vs /x); the stories twins keep their intentional platform-specific divergence.

Do not merge yet

Verification

  • pnpm vitest run --project=@storybook/claude-code-plugin --project=@storybook/codex-plugin — 21/21 passed.
  • pnpm vitest run agent-eval/lib/test-utils.test.ts — 35/35 passed; pnpm --filter agent-eval typecheck clean.
  • pnpm --filter @storybook/codex-plugin validate:marketplace and pnpm format:check — passed.
  • Two independent reviews (Claude quality-review agent + Codex CLI, gpt-5.6-sol at xhigh); all actionable findings addressed: the forward-only tree rewrite, the explicit-bulk gate, the README/eval version alignment, and the twin-body guard all came out of those reviews.

No changeset: both plugins are in the changeset ignore list.

The default no-user-stories path now runs the new simple-setup command,
which writes one story file plus a StyleCheck and ends by offering to
build out more components; the skill relays that offer to the user.
Bulk build-out (an explicit user request, or a yes on the offer) stays
on npx storybook ai setup. Both paths ensure @storybook/addon-vitest so
the run-story-tests self-heal loop always runs. The minimum Storybook
version is raised to 10.5.2 everywhere, since simple-setup first ships
in that release.
@changeset-bot

changeset-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0f3b3e9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jul 14, 2026

Copy link
Copy Markdown
npx https://pkg.pr.new/storybookjs/mcp/@storybook/addon-mcp@365
npx https://pkg.pr.new/storybookjs/mcp/@storybook/mcp@365

commit: 0f3b3e9

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.66%. Comparing base (1da212c) to head (0f3b3e9).
⚠️ Report is 1 commits behind head on kasper/vibrant-margulis-bc7aba.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@                       Coverage Diff                       @@
##           kasper/vibrant-margulis-bc7aba     #365   +/-   ##
===============================================================
  Coverage                           79.66%   79.66%           
===============================================================
  Files                                  50       50           
  Lines                                2095     2095           
  Branches                              624      624           
===============================================================
  Hits                                 1669     1669           
  Misses                                220      220           
  Partials                              206      206           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

…s bulk build-out

Review found the accept path required a backward jump (show in step 7,
then back to bulk in step 6) that a top-to-bottom reader would drop at
step 7's 'then stop'. Showing the result is now step 6, which relays the
simple-setup offer where the answer actually lands, and bulk build-out is
the terminal step 7. This also removes the double show/double vitest
ensure on the accept path.
…ion floors, guard twin bodies

An explicit bulk request on a project without stories previously fell
through to simple-setup; the bulk check is now its own step before story
detection. The plugin READMEs and the 821-823 eval version floors move
to 10.5.2 with the skills. A new test keeps the setup/init/upgrade twin
bodies identical across the two plugins modulo skill references.
…into kasper/simple-setup-in-skills

# Conflicts:
#	agent-eval/evals/823-setup-outdated-storybook/EVAL.ts
The no-user-stories path now runs npx storybook ai simple-setup, so
eval 820 expects that instead of the bulk setup run, the negative
story gate rejects both subcommands, and the token-aware matcher
takes an optional subcommand filter.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant