Switch the no-stories setup path to npx storybook ai simple-setup - #365
kasperpeulen wants to merge 5 commits into
Conversation
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.
|
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. |
…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.
Stacked on #364 (base is its branch; retarget to
mainonce it merges).What changed
Setup skills (
packages/claude-plugin/skills/storybook-setup/SKILL.mdand its codex twinpackages/codex-plugin/plugins/storybook/skills/setup/SKILL.md) — the decision tree is now strictly forward-only, 8 steps:npx storybook ai simple-setupinstead ofnpx 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 aStyleCheckstory that asserts the app's global CSS actually loads), runs therun-story-testsself-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.simple-setup.npx storybook ai setup.@storybook/addon-vitest(install if missing) so the printed instructions always include therun-story-testsself-heal loop rather than falling back to visual-only verification.Version floor 10.5 → 10.5.2 —
simple-setupfirst 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) expectsnpx storybook ai simple-setup, the negative gate (823/824) rejects bothai setupandai 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:xvs/x); the stories twins keep their intentional platform-specific divergence.Do not merge yet
main).npx storybook ai simple-setuponly exists from Storybook 10.5.2 — that CLI change lands via a separate storybookjs/storybook PR. This PR must not merge before 10.5.2 is released.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 typecheckclean.pnpm --filter @storybook/codex-plugin validate:marketplaceandpnpm format:check— passed.gpt-5.6-solatxhigh); 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.