Skip to content

Route setup skills through a decision tree so existing Storybooks skip story generation - #364

Open
kasperpeulen wants to merge 7 commits into
mainfrom
kasper/vibrant-margulis-bc7aba
Open

Route setup skills through a decision tree so existing Storybooks skip story generation#364
kasperpeulen wants to merge 7 commits into
mainfrom
kasper/vibrant-margulis-bc7aba

Conversation

@kasperpeulen

@kasperpeulen kasperpeulen commented Jul 14, 2026

Copy link
Copy Markdown
Member

Problem

"Set up Storybook for Codex" is the plugin's default prompt, and it currently always ends in npx storybook ai setup — the full "configure preview, add MSW, write up to 10 stories" plan. On a project that already has a working Storybook with its own stories this is slow, expensive, and unnecessary — and that is the out-of-box experience for nearly all early plugin users.

Change

The setup skill (codex plugin) and storybook-setup skill (claude plugin) become an explicit decision tree:

  1. Storybook missing → init first
  2. Storybook older than 10.5 → upgrade first
  3. Ensure @storybook/addon-mcp
  4. Existing user-written stories (beyond the storybook init boilerplate) → no story generation, no storybook ai setup: route to the stories skill, which starts and shows Storybook. Explicit user requests for new stories still pass through.
  5. No user stories → ensure @storybook/addon-vitest (the printed ai setup plan silently assumes its vitest --project storybook verify loop works), then run npx storybook ai setup as before.

The gate applies after an upgrade too, so an outdated Storybook with existing stories no longer funnels into the full generation flow.

Evals

The lifecycle (82x) evals now cover the decision tree's story gate on both plugin experiments:

  • New 824-setup-existing-storybook-with-stories: current Storybook with user-written stories in src/components, setup prompt → asserts no storybook ai setup, story files and their exports stay exactly as seeded, @storybook/addon-mcp installed and registered, Storybook boots.
  • 823-setup-outdated-storybook strengthened: same gate assertions after the existing upgrade-routing assertions. Its seeded story moved from stories/ to src/components/ so it cannot be mistaken for the init example stories the skill tells agents to disregard.
  • 820-init-no-storybook strengthened: now also asserts the positive branch — on a story-less fresh init the tree must ensure @storybook/addon-vitest and run storybook ai setup.

The ai-setup assertions are token-aware (findStorybookAiSetupInvocations in shell-parse.ts): help calls or commands that merely mention the text don't count as invocations, and a correct agent that greps for the command text doesn't false-fail the negative gate.

Both story-gate fixtures seed a story for every component in src/components: an early local run showed Opus (defensibly) covering a story-less component through the stories skill on the shared "preview the components in src/components" prompt, so with full coverage seeded, any new story file is a genuine gate violation.

Local EVAL_ONLY validation, one experiment at a time: all three evals pass on cc-plugin-opus-high and on codex-plugin-gpt-5.5-medium.

Scope

PR 1 of 3 — works with currently released Storybook, no monorepo dependency. Follow-ups: a lightweight storybook ai simple-setup command in storybookjs/storybook (one simple story + self-healing loop), then switching these skills' default path to it.

Verification

  • pnpm vitest run --project=@storybook/claude-code-plugin --project=@storybook/codex-plugin — 9 tests pass (incl. claude plugin validate)
  • pnpm --filter @storybook/codex-plugin validate:marketplace — pass
  • pnpm format:check — pass
  • pnpm --dir agent-eval typecheck + vitest run lib/ (77 tests, incl. new detector and story-scan tests) — pass
  • EVAL_EXTRA_EVALS=1 pnpm --dir agent-eval eval:dry — 824 is picked up on both plugin experiments

Summary by CodeRabbit

  • Documentation

    • Updated Storybook skill instructions across init/setup/upgrade to use a clearer decision tree, add explicit addon/version checks, and better explain when story generation is skipped (when user-written stories already exist).
    • Simplified upgrade guidance to require Storybook 10.5+ with a link to the official upgrade guide.
    • Refreshed agent-eval run instructions and the vite-app template description.
  • Tests

    • Expanded evaluation coverage for Storybook “story gate” behavior and upgraded decision-tree routing.
    • Strengthened detection and assertions around “storybook ai setup” invocations and story-file preservation.

…p story generation

'Set up Storybook for Codex' (the plugin's default prompt) currently always
runs 'npx storybook ai setup', which prints the full write-up-to-10-stories
plan even when the project already has a working Storybook with its own
stories — slow and expensive for exactly the users the plugin targets first.

The setup skill is now a decision tree: init/upgrade when needed, ensure
addon-mcp, and gate on user-written stories. Projects with existing
non-example stories route to the stories skill (start and show Storybook)
instead of story generation; only story-less projects get 'storybook ai
setup', with addon-vitest ensured first since the printed plan silently
assumes it.
@changeset-bot

changeset-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 77eb7c4

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

@netlify

netlify Bot commented Jul 14, 2026

Copy link
Copy Markdown

Deploy Preview for storybook-mcp-self-host-example canceled.

Name Link
🔨 Latest commit 77eb7c4
🔍 Latest deploy log https://app.netlify.com/projects/storybook-mcp-self-host-example/deploys/6a566116b7764e0008479c13

@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@364
npx https://pkg.pr.new/storybookjs/mcp/@storybook/mcp@364

commit: 77eb7c4

@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 (e4f90aa) to head (77eb7c4).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #364   +/-   ##
=======================================
  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.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Storybook skills now use explicit decision trees for initialization, upgrades, addon installation, and story generation. Agent evaluations and shared utilities verify these branches, preserve existing stories, validate addons, and detect genuine Storybook AI setup commands. Plugin tests cover Claude/Codex skill pairs.

Changes

Storybook skill guidance

Layer / File(s) Summary
Setup prerequisites and story branching
packages/claude-plugin/skills/storybook-setup/SKILL.md, packages/codex-plugin/plugins/storybook/skills/setup/SKILL.md
Setup instructions route missing or outdated Storybook to initialization or upgrade skills, install required addons, and branch based on existing user-written stories.
Storybook version requirements
packages/claude-plugin/skills/stories/SKILL.md, packages/claude-plugin/skills/storybook-upgrade/SKILL.md, packages/codex-plugin/plugins/storybook/skills/stories/SKILL.md, packages/codex-plugin/plugins/storybook/skills/upgrade/SKILL.md
Story and upgrade guidance requires Storybook 10.5 or later and removes prerelease fallback instructions.
Skill description parity tests
packages/claude-plugin/plugin.test.ts
Parameterized tests cover stories and setup skill pairs for listing budgets and matching Claude/Codex descriptions.

Agent evaluation harness

Layer / File(s) Summary
Setup decision-tree evaluations
agent-eval/evals/820-init-no-storybook/EVAL.ts, agent-eval/evals/823-setup-outdated-storybook/*, agent-eval/evals/824-setup-existing-storybook-with-stories/*
Evaluations verify setup routing, addon installation, AI setup behavior, story-file preservation, unchanged story exports, and successful Storybook startup.
Shared evaluation assertions and shell detection
agent-eval/lib/test-utils.ts, agent-eval/lib/test-utils.test.ts, agent-eval/lib/shell-parse.ts
Utilities discover story files, validate dependencies and addons, compare story exports, and detect valid storybook ai setup invocations across shell wrappers and chains.
Lifecycle registration and experiment documentation
agent-eval/lib/experiment.ts, agent-eval/README.md
The existing-story setup evaluation is added to lifecycle selection, and experiment cost and template-layer documentation are updated.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Eval
  participant SetupSkill
  participant StorybookAddons
  participant StoryFiles
  participant StorybookAI
  Eval->>SetupSkill: execute setup scenario
  SetupSkill->>StorybookAddons: install and register addon-mcp
  SetupSkill->>StoryFiles: inspect existing story globs and files
  SetupSkill->>StorybookAI: run AI setup when no user stories exist
  Eval->>StoryFiles: verify files and exports
Loading

Possibly related issues

Possibly related PRs

  • storybookjs/mcp#300: Modifies the related Storybook stories skill instructions.
  • storybookjs/mcp#309: Modifies related Storybook skill guidance and Claude/Codex plugin description assertions.
  • storybookjs/mcp#344: Modifies Storybook prerequisite and version logic around the 10.5 requirement.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


Comment @coderabbitai help to get the list of available commands.

- Give the init skill sole ownership of the continuation (it already
  re-invokes setup), instead of setup claiming a resume point.
- Detect user stories via the 'stories' globs in .storybook/main.* rather
  than assuming the *.stories.* naming convention.
- Narrow the step-4 exception to bulk generation; single-component story
  requests route through the stories skill.
- Soften hardcoded paths (custom config dirs, init boilerplate locations).
- Extend plugin.test.ts so the setup skill twins share the stories skill's
  description-budget and cross-plugin-identical guarantees.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/claude-plugin/skills/storybook-setup/SKILL.md`:
- Line 8: Update the Storybook setup detection in
packages/claude-plugin/skills/storybook-setup/SKILL.md at line 8 and
packages/codex-plugin/plugins/storybook/skills/setup/SKILL.md at line 8 to
invoke the respective initialization command when either the Storybook
dependency or the Storybook configuration directory is missing, rather than only
when both are absent. Preserve the existing command-specific behavior and
handoff details.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 29fccdbf-8a1c-4abb-9636-bf59b0b88229

📥 Commits

Reviewing files that changed from the base of the PR and between 84740ec and 5fe7120.

📒 Files selected for processing (2)
  • packages/claude-plugin/skills/storybook-setup/SKILL.md
  • packages/codex-plugin/plugins/storybook/skills/setup/SKILL.md

Run `npx storybook ai setup` from the project root (or the Storybook package in a monorepo).

**Follow the printed Markdown precisely.** Do not substitute your own plan.
1. **Storybook missing?** No Storybook dependency in `package.json` and no Storybook config directory (usually `.storybook/`) → invoke `/storybook-init` first; it installs Storybook plus `@storybook/addon-mcp` and then hands control back to this skill.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Initialize incomplete Storybook setups, not only entirely absent ones.

  • packages/claude-plugin/skills/storybook-setup/SKILL.md#L8-L8: trigger /storybook-init when either the Storybook dependency or config is missing.
  • packages/codex-plugin/plugins/storybook/skills/setup/SKILL.md#L8-L8: trigger $storybook:init when either the Storybook dependency or config is missing.
🧰 Tools
🪛 SkillSpector (2.3.11)

[warning] 10: [RP1] null: npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Remediation: Pin the version: npx @scope/server@1.2.3

(MCP Rug Pull (RP1))


[warning] 11: [RP1] null: npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Remediation: Pin the version: npx @scope/server@1.2.3

(MCP Rug Pull (RP1))


[warning] 12: [RP1] null: npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Remediation: Pin the version: npx @scope/server@1.2.3

(MCP Rug Pull (RP1))


[warning] 12: [RP1] null: npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Remediation: Pin the version: npx @scope/server@1.2.3

(MCP Rug Pull (RP1))

📍 Affects 2 files
  • packages/claude-plugin/skills/storybook-setup/SKILL.md#L8-L8 (this comment)
  • packages/codex-plugin/plugins/storybook/skills/setup/SKILL.md#L8-L8
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/claude-plugin/skills/storybook-setup/SKILL.md` at line 8, Update the
Storybook setup detection in
packages/claude-plugin/skills/storybook-setup/SKILL.md at line 8 and
packages/codex-plugin/plugins/storybook/skills/setup/SKILL.md at line 8 to
invoke the respective initialization command when either the Storybook
dependency or the Storybook configuration directory is missing, rather than only
when both are absent. Preserve the existing command-specific behavior and
handoff details.

New eval 824 pins the core behavior: a setup request against a current
Storybook that already has a user-written story must not run story
generation — the agent ensures @storybook/addon-mcp and Storybook still
boots, while the story files and their exports stay exactly as seeded.

Eval 823 gets the same story-gate assertions after its upgrade routing,
with its seeded story moved to src/components so it cannot be mistaken
for the init example stories the skill tells agents to ignore. Eval 820
now also asserts the positive branch: on a story-less fresh init the
tree must ensure @storybook/addon-vitest and run `storybook ai setup`.

The ai-setup assertions are token-aware (findStorybookAiSetupInvocations
in shell-parse): a help call or a command that merely mentions the text
does not count, and a correct agent that greps for the command does not
false-fail.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@agent-eval/evals/820-init-no-storybook/EVAL.ts`:
- Around line 34-37: Annotate the `scripts` variable in the package.json
validation block with `Record<string, unknown>` so `scripts.storybook` is valid
under strict TypeScript, while preserving the existing record-check and
empty-object fallback behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 70afc782-9192-47a9-9e18-10a9cf0c5897

📥 Commits

Reviewing files that changed from the base of the PR and between 5fe7120 and 1da212c.

📒 Files selected for processing (14)
  • agent-eval/README.md
  • agent-eval/evals/820-init-no-storybook/EVAL.ts
  • agent-eval/evals/823-setup-outdated-storybook/EVAL.ts
  • agent-eval/evals/823-setup-outdated-storybook/src/components/Button.stories.tsx
  • agent-eval/evals/824-setup-existing-storybook-with-stories/.storybook/main.ts
  • agent-eval/evals/824-setup-existing-storybook-with-stories/.storybook/preview.ts
  • agent-eval/evals/824-setup-existing-storybook-with-stories/EVAL.ts
  • agent-eval/evals/824-setup-existing-storybook-with-stories/PROMPT.md
  • agent-eval/evals/824-setup-existing-storybook-with-stories/package.json
  • agent-eval/evals/824-setup-existing-storybook-with-stories/src/components/Button.stories.tsx
  • agent-eval/lib/experiment.ts
  • agent-eval/lib/shell-parse.ts
  • agent-eval/lib/test-utils.test.ts
  • agent-eval/lib/test-utils.ts

Comment on lines +34 to 37

const packageJson = parseJson(readFileSync('package.json', 'utf8'));
if (!isRecord(packageJson)) {
expect.fail('Expected package.json to contain a JSON object');
}

const dependencies = {
...(isRecord(packageJson.dependencies) ? packageJson.dependencies : {}),
...(isRecord(packageJson.devDependencies) ? packageJson.devDependencies : {}),
};
expect(dependencies.storybook, 'Expected a storybook dependency').toBeTypeOf('string');
expect(
dependencies['@storybook/addon-mcp'],
'Expected the @storybook/addon-mcp dependency (skill step 2: npx storybook add @storybook/addon-mcp)',
).toBeTypeOf('string');

const scripts = isRecord(packageJson.scripts) ? packageJson.scripts : {};
const scripts = isRecord(packageJson) && isRecord(packageJson.scripts) ? packageJson.scripts : {};
expect(scripts.storybook, 'Expected a storybook script').toBeTypeOf('string');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

git ls-files 'agent-eval/evals/820-init-no-storybook/EVAL.ts'
echo '---'
cat -n agent-eval/evals/820-init-no-storybook/EVAL.ts | sed -n '1,120p'

Repository: storybookjs/mcp

Length of output: 2586


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
print("hello")
PY

Repository: storybookjs/mcp

Length of output: 159


Annotate scripts so scripts.storybook typechecks. The fallback {} leaves scripts as Record<string, unknown> | {}, so the property access can fail under strict TypeScript. Add an explicit Record<string, unknown> annotation.

🛠️ Proposed fix
-	const scripts = isRecord(packageJson) && isRecord(packageJson.scripts) ? packageJson.scripts : {};
+	const scripts: Record<string, unknown> = isRecord(packageJson) && isRecord(packageJson.scripts)
+		? packageJson.scripts
+		: {};
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const packageJson = parseJson(readFileSync('package.json', 'utf8'));
if (!isRecord(packageJson)) {
expect.fail('Expected package.json to contain a JSON object');
}
const dependencies = {
...(isRecord(packageJson.dependencies) ? packageJson.dependencies : {}),
...(isRecord(packageJson.devDependencies) ? packageJson.devDependencies : {}),
};
expect(dependencies.storybook, 'Expected a storybook dependency').toBeTypeOf('string');
expect(
dependencies['@storybook/addon-mcp'],
'Expected the @storybook/addon-mcp dependency (skill step 2: npx storybook add @storybook/addon-mcp)',
).toBeTypeOf('string');
const scripts = isRecord(packageJson.scripts) ? packageJson.scripts : {};
const scripts = isRecord(packageJson) && isRecord(packageJson.scripts) ? packageJson.scripts : {};
expect(scripts.storybook, 'Expected a storybook script').toBeTypeOf('string');
const packageJson = parseJson(readFileSync('package.json', 'utf8'));
const scripts: Record<string, unknown> = isRecord(packageJson) && isRecord(packageJson.scripts)
? packageJson.scripts
: {};
expect(scripts.storybook, 'Expected a storybook script').toBeTypeOf('string');
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@agent-eval/evals/820-init-no-storybook/EVAL.ts` around lines 34 - 37,
Annotate the `scripts` variable in the package.json validation block with
`Record<string, unknown>` so `scripts.storybook` is valid under strict
TypeScript, while preserving the existing record-check and empty-object fallback
behavior.

Source: Coding guidelines

Local run iteration 1 (cc-plugin-opus-high): 820 and 824 passed; 823
failed because Opus covered the then-storyless Tag component through the
stories skill — a defensible reading of the shared prompt's 'preview the
components in src/components', not a gate violation. Seeding stories for
both components in 823 and 824 removes the ambiguity: any new story file
is now a genuine violation. Iteration 2 re-run: both evals pass.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@agent-eval/evals/823-setup-outdated-storybook/src/components/Tag.stories.tsx`:
- Line 2: Update the local Tag imports in both Tag.stories.tsx files to include
the component’s explicit file extension, preserving the existing import and
story behavior.
- Around line 4-13: Rename the module-level meta constant to META in both
agent-eval/evals/823-setup-outdated-storybook/src/components/Tag.stories.tsx
lines 4-13 and
agent-eval/evals/824-setup-existing-storybook-with-stories/src/components/Tag.stories.tsx
lines 4-13, updating the type Story reference in each file to use META while
preserving the story metadata.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9e7762c2-f06b-4e9c-84cf-2d9197eeea41

📥 Commits

Reviewing files that changed from the base of the PR and between 1da212c and 77eb7c4.

📒 Files selected for processing (4)
  • agent-eval/evals/823-setup-outdated-storybook/EVAL.ts
  • agent-eval/evals/823-setup-outdated-storybook/src/components/Tag.stories.tsx
  • agent-eval/evals/824-setup-existing-storybook-with-stories/EVAL.ts
  • agent-eval/evals/824-setup-existing-storybook-with-stories/src/components/Tag.stories.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • agent-eval/evals/823-setup-outdated-storybook/EVAL.ts
  • agent-eval/evals/824-setup-existing-storybook-with-stories/EVAL.ts

@@ -0,0 +1,27 @@
import type { Meta, StoryObj } from '@storybook/react';
import Tag from './Tag';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add explicit extensions to both local imports.

Both story files violate the ESM import-extension requirement.

  • agent-eval/evals/823-setup-outdated-storybook/src/components/Tag.stories.tsx#L2-L2: import Tag using its explicit extension.
  • agent-eval/evals/824-setup-existing-storybook-with-stories/src/components/Tag.stories.tsx#L2-L2: import Tag using its explicit extension.
📍 Affects 2 files
  • agent-eval/evals/823-setup-outdated-storybook/src/components/Tag.stories.tsx#L2-L2 (this comment)
  • agent-eval/evals/824-setup-existing-storybook-with-stories/src/components/Tag.stories.tsx#L2-L2
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@agent-eval/evals/823-setup-outdated-storybook/src/components/Tag.stories.tsx`
at line 2, Update the local Tag imports in both Tag.stories.tsx files to include
the component’s explicit file extension, preserving the existing import and
story behavior.

Source: Coding guidelines

Comment on lines +4 to +13
const meta = {
title: 'Components/Tag',
component: Tag,
args: {
label: 'New',
},
} satisfies Meta<typeof Tag>;

export default meta;
type Story = StoryObj<typeof meta>;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Rename both module constants to SCREAMING_SNAKE_CASE.

Both files declare the module-level constant as meta, contrary to the naming guideline.

  • agent-eval/evals/823-setup-outdated-storybook/src/components/Tag.stories.tsx#L4-L13: rename meta to META and update its references.
  • agent-eval/evals/824-setup-existing-storybook-with-stories/src/components/Tag.stories.tsx#L4-L13: rename meta to META and update its references.
📍 Affects 2 files
  • agent-eval/evals/823-setup-outdated-storybook/src/components/Tag.stories.tsx#L4-L13 (this comment)
  • agent-eval/evals/824-setup-existing-storybook-with-stories/src/components/Tag.stories.tsx#L4-L13
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@agent-eval/evals/823-setup-outdated-storybook/src/components/Tag.stories.tsx`
around lines 4 - 13, Rename the module-level meta constant to META in both
agent-eval/evals/823-setup-outdated-storybook/src/components/Tag.stories.tsx
lines 4-13 and
agent-eval/evals/824-setup-existing-storybook-with-stories/src/components/Tag.stories.tsx
lines 4-13, updating the type Story reference in each file to use META while
preserving the story metadata.

Source: Coding guidelines

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.

1 participant