@storybook/cli 10.4.0-alpha.16 → 10.4.0-alpha.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/dist/_node-chunks/{block-dependencies-versions-S3TJGYC2.js → block-dependencies-versions-QNRY6J2G.js} +11 -11
  2. package/dist/_node-chunks/{block-experimental-addon-test-WWZCXLB2.js → block-experimental-addon-test-PVMAM5F5.js} +9 -9
  3. package/dist/_node-chunks/{block-major-version-JNM4ZAKB.js → block-major-version-B4U62UGS.js} +9 -9
  4. package/dist/_node-chunks/{block-node-version-HDPTJUPH.js → block-node-version-7C63VYY4.js} +9 -9
  5. package/dist/_node-chunks/{block-webpack5-frameworks-TETWAJLZ.js → block-webpack5-frameworks-RODOEXCR.js} +11 -11
  6. package/dist/_node-chunks/{optimized-tests-MJI5NXQA.js → chunk-3VND4UGR.js} +25 -16
  7. package/dist/_node-chunks/chunk-4IHT72QP.js +11 -0
  8. package/dist/_node-chunks/{chunk-UKVJ7RQN.js → chunk-7GFZ5XLA.js} +7 -7
  9. package/dist/_node-chunks/{chunk-NDN75UAD.js → chunk-DZENT53U.js} +7 -7
  10. package/dist/_node-chunks/{chunk-QBNIQBHH.js → chunk-E7VJSF4M.js} +6 -6
  11. package/dist/_node-chunks/{chunk-TZ336D6R.js → chunk-F7HPRHMF.js} +6 -6
  12. package/dist/_node-chunks/{chunk-QQ7E4GEX.js → chunk-NMHZMXV5.js} +15 -15
  13. package/dist/_node-chunks/{chunk-7BQI2DK6.js → chunk-QRIT645X.js} +6 -6
  14. package/dist/_node-chunks/{chunk-7H4XHFS5.js → chunk-XXTFAID7.js} +120 -9
  15. package/dist/_node-chunks/{globby-5IGUGWE7.js → globby-V7VJJXY6.js} +8 -8
  16. package/dist/_node-chunks/{monorepo-4B4ULRGC.js → monorepo-TKU4OK5Y.js} +25 -16
  17. package/dist/_node-chunks/monorepo-optimized-tests-relaxed-limits-no-story-deletion-XF53WCEF.js +119 -0
  18. package/dist/_node-chunks/optimized-tests-PTOYROOU.js +20 -0
  19. package/dist/_node-chunks/{p-limit-VO6RWWBJ.js → p-limit-G7HGHMQY.js} +7 -7
  20. package/dist/_node-chunks/{chunk-JYLYIY6L.js → pattern-copy-play-Y43OOQWS.js} +11 -11
  21. package/dist/_node-chunks/{relaxed-limits-MKAIPGR2.js → relaxed-limits-IFYEA3SD.js} +25 -16
  22. package/dist/_node-chunks/{run-EJWCFREQ.js → run-7AY5NI5G.js} +645 -260
  23. package/dist/_node-chunks/{setup-PUNMMEGI.js → setup-N65V6RFL.js} +8 -8
  24. package/dist/bin/index.js +7 -7
  25. package/package.json +5 -4
  26. package/dist/_node-chunks/chunk-TSPB5MCI.js +0 -11
  27. package/dist/_node-chunks/pattern-copy-play-JNOATHUQ.js +0 -20
@@ -1,21 +1,21 @@
1
- import CJS_COMPAT_NODE_URL_sgh3w93ap7c from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_sgh3w93ap7c from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_sgh3w93ap7c from "node:module";
1
+ import CJS_COMPAT_NODE_URL_x95a390k9yf from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_x95a390k9yf from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_x95a390k9yf from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_sgh3w93ap7c.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_sgh3w93ap7c.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_sgh3w93ap7c.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_x95a390k9yf.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_x95a390k9yf.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_x95a390k9yf.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  findOutdatedPackage
14
- } from "./chunk-QQ7E4GEX.js";
15
- import "./chunk-UKVJ7RQN.js";
16
- import "./chunk-TSPB5MCI.js";
17
- import "./chunk-NDN75UAD.js";
18
- import "./chunk-TZ336D6R.js";
14
+ } from "./chunk-NMHZMXV5.js";
15
+ import "./chunk-7GFZ5XLA.js";
16
+ import "./chunk-4IHT72QP.js";
17
+ import "./chunk-DZENT53U.js";
18
+ import "./chunk-F7HPRHMF.js";
19
19
 
20
20
  // src/autoblock/block-dependencies-versions.ts
21
21
  import { dedent } from "ts-dedent";
@@ -1,21 +1,21 @@
1
- import CJS_COMPAT_NODE_URL_sgh3w93ap7c from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_sgh3w93ap7c from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_sgh3w93ap7c from "node:module";
1
+ import CJS_COMPAT_NODE_URL_x95a390k9yf from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_x95a390k9yf from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_x95a390k9yf from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_sgh3w93ap7c.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_sgh3w93ap7c.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_sgh3w93ap7c.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_x95a390k9yf.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_x95a390k9yf.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_x95a390k9yf.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
- import "./chunk-TSPB5MCI.js";
12
+ import "./chunk-4IHT72QP.js";
13
13
  import {
14
14
  require_semver
15
- } from "./chunk-NDN75UAD.js";
15
+ } from "./chunk-DZENT53U.js";
16
16
  import {
17
17
  __toESM
18
- } from "./chunk-TZ336D6R.js";
18
+ } from "./chunk-F7HPRHMF.js";
19
19
 
20
20
  // src/autoblock/block-experimental-addon-test.ts
21
21
  var import_semver = __toESM(require_semver(), 1);
@@ -1,21 +1,21 @@
1
- import CJS_COMPAT_NODE_URL_sgh3w93ap7c from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_sgh3w93ap7c from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_sgh3w93ap7c from "node:module";
1
+ import CJS_COMPAT_NODE_URL_x95a390k9yf from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_x95a390k9yf from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_x95a390k9yf from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_sgh3w93ap7c.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_sgh3w93ap7c.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_sgh3w93ap7c.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_x95a390k9yf.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_x95a390k9yf.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_x95a390k9yf.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
- import "./chunk-TSPB5MCI.js";
12
+ import "./chunk-4IHT72QP.js";
13
13
  import {
14
14
  require_semver
15
- } from "./chunk-NDN75UAD.js";
15
+ } from "./chunk-DZENT53U.js";
16
16
  import {
17
17
  __toESM
18
- } from "./chunk-TZ336D6R.js";
18
+ } from "./chunk-F7HPRHMF.js";
19
19
 
20
20
  // src/autoblock/block-major-version.ts
21
21
  var import_semver = __toESM(require_semver(), 1);
@@ -1,21 +1,21 @@
1
- import CJS_COMPAT_NODE_URL_sgh3w93ap7c from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_sgh3w93ap7c from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_sgh3w93ap7c from "node:module";
1
+ import CJS_COMPAT_NODE_URL_x95a390k9yf from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_x95a390k9yf from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_x95a390k9yf from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_sgh3w93ap7c.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_sgh3w93ap7c.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_sgh3w93ap7c.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_x95a390k9yf.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_x95a390k9yf.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_x95a390k9yf.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
- import "./chunk-TSPB5MCI.js";
12
+ import "./chunk-4IHT72QP.js";
13
13
  import {
14
14
  require_semver
15
- } from "./chunk-NDN75UAD.js";
15
+ } from "./chunk-DZENT53U.js";
16
16
  import {
17
17
  __toESM
18
- } from "./chunk-TZ336D6R.js";
18
+ } from "./chunk-F7HPRHMF.js";
19
19
 
20
20
  // src/autoblock/block-node-version.ts
21
21
  var import_semver = __toESM(require_semver(), 1);
@@ -1,21 +1,21 @@
1
- import CJS_COMPAT_NODE_URL_sgh3w93ap7c from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_sgh3w93ap7c from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_sgh3w93ap7c from "node:module";
1
+ import CJS_COMPAT_NODE_URL_x95a390k9yf from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_x95a390k9yf from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_x95a390k9yf from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_sgh3w93ap7c.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_sgh3w93ap7c.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_sgh3w93ap7c.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_x95a390k9yf.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_x95a390k9yf.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_x95a390k9yf.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  findOutdatedPackage
14
- } from "./chunk-QQ7E4GEX.js";
15
- import "./chunk-UKVJ7RQN.js";
16
- import "./chunk-TSPB5MCI.js";
17
- import "./chunk-NDN75UAD.js";
18
- import "./chunk-TZ336D6R.js";
14
+ } from "./chunk-NMHZMXV5.js";
15
+ import "./chunk-7GFZ5XLA.js";
16
+ import "./chunk-4IHT72QP.js";
17
+ import "./chunk-DZENT53U.js";
18
+ import "./chunk-F7HPRHMF.js";
19
19
 
20
20
  // src/autoblock/block-webpack5-frameworks.ts
21
21
  var minimalVersionsMap = {
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_sgh3w93ap7c from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_sgh3w93ap7c from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_sgh3w93ap7c from "node:module";
1
+ import CJS_COMPAT_NODE_URL_x95a390k9yf from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_x95a390k9yf from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_x95a390k9yf from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_sgh3w93ap7c.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_sgh3w93ap7c.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_sgh3w93ap7c.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_x95a390k9yf.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_x95a390k9yf.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_x95a390k9yf.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -14,10 +14,12 @@ import {
14
14
  buildPortalStep,
15
15
  buildSharedPreviewStep,
16
16
  cleanupStep,
17
+ cssCheckDOD,
17
18
  discoveryStepStrict,
18
19
  editOverWriteRule,
19
20
  ext,
20
21
  interactionPlayStep,
22
+ listDOD,
21
23
  listRules,
22
24
  listSteps,
23
25
  mswStep,
@@ -26,25 +28,29 @@ import {
26
28
  packageManagerRule,
27
29
  preferSharedFixesRule,
28
30
  readBudgetRule,
31
+ sharedPreviewDOD,
32
+ storyTagsV1DOD,
29
33
  toolsVsShellRule,
34
+ typeCheckPassesStrictDOD,
30
35
  verifyStep,
36
+ vitestPassesStrictDOD,
31
37
  writeStoriesStep
32
- } from "./chunk-7H4XHFS5.js";
38
+ } from "./chunk-XXTFAID7.js";
33
39
  import {
34
40
  getDocsMarkdownUrl
35
- } from "./chunk-QBNIQBHH.js";
36
- import "./chunk-TZ336D6R.js";
41
+ } from "./chunk-E7VJSF4M.js";
37
42
 
38
43
  // src/ai/setup-prompts/optimized-tests.ts
39
44
  import { dedent } from "ts-dedent";
40
45
  function instructions(projectInfo) {
41
- let { configDir, language, packageManager, packageManagerName } = projectInfo, tsx = ext(language, !0), ts = ext(language, !1), docsUrl = (path) => getDocsMarkdownUrl(path, projectInfo), mswInstall = packageManager.getInstallCommand(
46
+ let { configDir, language, needsUserOnboarding, packageManager, packageManagerName } = projectInfo, tsx = ext(language, !0), ts = ext(language, !1), docsUrl = (path) => getDocsMarkdownUrl(path, projectInfo), mswInstall = packageManager.getInstallCommand(
42
47
  ["msw", "msw-storybook-addon", "mockdate"],
43
48
  !0
44
49
  ), ctx = {
45
50
  configDir,
46
51
  docsUrl,
47
52
  mswInstall,
53
+ needsUserOnboarding,
48
54
  packageManager,
49
55
  packageManagerName,
50
56
  tsx,
@@ -83,12 +89,14 @@ function instructions(projectInfo) {
83
89
  )}
84
90
 
85
91
  ## Done when
86
-
87
- - **Exactly one \`CssCheck\` story exists** somewhere in the new stories, asserting a concrete computed style value read from the component's source (added at the end of Step 5).
88
- - Every story file you wrote that vitest confirmed passing has had \`'needs-work'\` stripped, leaving \`tags: ['ai-generated']\`. Anything still failing keeps \`['ai-generated', 'needs-work']\`.
89
- - \`npx vitest --project storybook run\` passes for the new files.
90
- - The project's TypeScript check passes for changed files.
91
- - The shared preview is strong enough that stories don't need per-story fetch/provider workarounds.
92
+
93
+ ${listDOD([
94
+ cssCheckDOD(ctx),
95
+ storyTagsV1DOD(ctx),
96
+ vitestPassesStrictDOD(ctx),
97
+ typeCheckPassesStrictDOD(ctx),
98
+ sharedPreviewDOD(ctx)
99
+ ])}
92
100
 
93
101
  ## Reference (only fetch if stuck)
94
102
 
@@ -101,6 +109,7 @@ function instructions(projectInfo) {
101
109
  Append \`?codeOnly=true\` to any docs URL for code-only snippets. Don't fetch unless a specific question can't be answered from this prompt.
102
110
  `;
103
111
  }
112
+
104
113
  export {
105
114
  instructions
106
115
  };
@@ -0,0 +1,11 @@
1
+ import CJS_COMPAT_NODE_URL_x95a390k9yf from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_x95a390k9yf from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_x95a390k9yf from "node:module";
4
+
5
+ var __filename = CJS_COMPAT_NODE_URL_x95a390k9yf.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_x95a390k9yf.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_x95a390k9yf.createRequire(import.meta.url);
8
+
9
+ // ------------------------------------------------------------
10
+ // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
+ // ------------------------------------------------------------
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_sgh3w93ap7c from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_sgh3w93ap7c from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_sgh3w93ap7c from "node:module";
1
+ import CJS_COMPAT_NODE_URL_x95a390k9yf from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_x95a390k9yf from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_x95a390k9yf from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_sgh3w93ap7c.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_sgh3w93ap7c.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_sgh3w93ap7c.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_x95a390k9yf.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_x95a390k9yf.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_x95a390k9yf.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -13,7 +13,7 @@ import {
13
13
  __commonJS,
14
14
  __require,
15
15
  __toESM
16
- } from "./chunk-TZ336D6R.js";
16
+ } from "./chunk-F7HPRHMF.js";
17
17
 
18
18
  // ../../../node_modules/fast-glob/out/utils/array.js
19
19
  var require_array = __commonJS({
@@ -1,17 +1,17 @@
1
- import CJS_COMPAT_NODE_URL_sgh3w93ap7c from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_sgh3w93ap7c from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_sgh3w93ap7c from "node:module";
1
+ import CJS_COMPAT_NODE_URL_x95a390k9yf from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_x95a390k9yf from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_x95a390k9yf from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_sgh3w93ap7c.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_sgh3w93ap7c.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_sgh3w93ap7c.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_x95a390k9yf.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_x95a390k9yf.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_x95a390k9yf.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
11
11
  // ------------------------------------------------------------
12
12
  import {
13
13
  __commonJS
14
- } from "./chunk-TZ336D6R.js";
14
+ } from "./chunk-F7HPRHMF.js";
15
15
 
16
16
  // ../../../node_modules/semver/internal/constants.js
17
17
  var require_constants = __commonJS({
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_sgh3w93ap7c from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_sgh3w93ap7c from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_sgh3w93ap7c from "node:module";
1
+ import CJS_COMPAT_NODE_URL_x95a390k9yf from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_x95a390k9yf from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_x95a390k9yf from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_sgh3w93ap7c.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_sgh3w93ap7c.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_sgh3w93ap7c.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_x95a390k9yf.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_x95a390k9yf.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_x95a390k9yf.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_sgh3w93ap7c from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_sgh3w93ap7c from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_sgh3w93ap7c from "node:module";
1
+ import CJS_COMPAT_NODE_URL_x95a390k9yf from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_x95a390k9yf from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_x95a390k9yf from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_sgh3w93ap7c.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_sgh3w93ap7c.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_sgh3w93ap7c.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_x95a390k9yf.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_x95a390k9yf.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_x95a390k9yf.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_sgh3w93ap7c from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_sgh3w93ap7c from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_sgh3w93ap7c from "node:module";
1
+ import CJS_COMPAT_NODE_URL_x95a390k9yf from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_x95a390k9yf from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_x95a390k9yf from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_sgh3w93ap7c.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_sgh3w93ap7c.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_sgh3w93ap7c.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_x95a390k9yf.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_x95a390k9yf.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_x95a390k9yf.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -12,14 +12,14 @@ var require = CJS_COMPAT_NODE_MODULE_sgh3w93ap7c.createRequire(import.meta.url);
12
12
  import {
13
13
  globby,
14
14
  globbySync
15
- } from "./chunk-UKVJ7RQN.js";
15
+ } from "./chunk-7GFZ5XLA.js";
16
16
  import {
17
17
  require_semver
18
- } from "./chunk-NDN75UAD.js";
18
+ } from "./chunk-DZENT53U.js";
19
19
  import {
20
20
  __commonJS,
21
21
  __toESM
22
- } from "./chunk-TZ336D6R.js";
22
+ } from "./chunk-F7HPRHMF.js";
23
23
 
24
24
  // ../../../node_modules/picocolors/picocolors.js
25
25
  var require_picocolors = __commonJS({
@@ -123,11 +123,11 @@ var import_picocolors2 = __toESM(require_picocolors(), 1), import_semver = __toE
123
123
  // src/autoblock/index.ts
124
124
  var blockers = () => [
125
125
  // add/remove blockers here
126
- import("./block-dependencies-versions-S3TJGYC2.js"),
127
- import("./block-node-version-HDPTJUPH.js"),
128
- import("./block-webpack5-frameworks-TETWAJLZ.js"),
129
- import("./block-major-version-JNM4ZAKB.js"),
130
- import("./block-experimental-addon-test-WWZCXLB2.js")
126
+ import("./block-dependencies-versions-QNRY6J2G.js"),
127
+ import("./block-node-version-7C63VYY4.js"),
128
+ import("./block-webpack5-frameworks-RODOEXCR.js"),
129
+ import("./block-major-version-B4U62UGS.js"),
130
+ import("./block-experimental-addon-test-PVMAM5F5.js")
131
131
  ], autoblock = async (options, list = blockers()) => list.length === 0 ? null : await Promise.all(
132
132
  list.map(async (i) => {
133
133
  let blocker = (await i).blocker;
@@ -351,7 +351,7 @@ var processProject = async ({
351
351
  };
352
352
  }
353
353
  }, collectProjects = async (options, configDirs, onProjectScanStart) => {
354
- let { default: pLimit } = await import("./p-limit-VO6RWWBJ.js"), currentCLIVersion = versions.storybook, limit = pLimit(5), projectPromises = configDirs.map(
354
+ let { default: pLimit } = await import("./p-limit-G7HGHMQY.js"), currentCLIVersion = versions.storybook, limit = pLimit(5), projectPromises = configDirs.map(
355
355
  (configDir) => limit(
356
356
  () => processProject({
357
357
  configDir,
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_sgh3w93ap7c from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_sgh3w93ap7c from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_sgh3w93ap7c from "node:module";
1
+ import CJS_COMPAT_NODE_URL_x95a390k9yf from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_x95a390k9yf from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_x95a390k9yf from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_sgh3w93ap7c.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_sgh3w93ap7c.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_sgh3w93ap7c.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_x95a390k9yf.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_x95a390k9yf.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_x95a390k9yf.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_sgh3w93ap7c from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_sgh3w93ap7c from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_sgh3w93ap7c from "node:module";
1
+ import CJS_COMPAT_NODE_URL_x95a390k9yf from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_x95a390k9yf from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_x95a390k9yf from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_sgh3w93ap7c.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_sgh3w93ap7c.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_sgh3w93ap7c.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_x95a390k9yf.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_x95a390k9yf.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_x95a390k9yf.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -33,6 +33,12 @@ ${step.body}`).join(`
33
33
  `)}
34
34
  `;
35
35
  }
36
+ function listDOD(dods) {
37
+ return dedent`
38
+ ${dods.filter(Boolean).map((s) => `- ${s}`).join(`
39
+ `)}
40
+ `;
41
+ }
36
42
 
37
43
  // src/ai/setup-prompts/partials/steps.ts
38
44
  import { dedent as dedent3 } from "ts-dedent";
@@ -272,10 +278,32 @@ function verifyStep(projectInfo, { packageManager, tsx }) {
272
278
  **After a file passes**, edit its meta and remove \`'needs-work'\` so its tags become \`['ai-generated']\`. Files you couldn't fix keep \`['ai-generated', 'needs-work']\` — move on, don't loop forever.`
273
279
  };
274
280
  }
275
- function cleanupStep(projectInfo, ctx) {
281
+ function verifyWithAllowedFailureStep(projectInfo, { packageManager, tsx }) {
282
+ return {
283
+ title: "Verify in one batch, then iterate only on failures",
284
+ body: dedent3`**Read this rule once before running anything:** the first vitest invocation must run **all** the new stories together. No single-file runs before the batch.
285
+
286
+ \`\`\`bash
287
+ npx vitest --project storybook run
288
+ \`\`\`
289
+
290
+ Then run the project's TypeScript check (use the script from \`package.json\` — typically \`tsc --noEmit\` or \`${packageManager.getRunCommand("typecheck")}\`). Read the raw output once; don't pipe it through repeated \`grep\`/\`head\` invocations to slice it.
291
+
292
+ For each failure:
293
+
294
+ 1. Read the error.
295
+ 2. If multiple stories share the failure, fix the shared preview setup, not the stories.
296
+ 3. In subsequent runs, re-run Vitest **only for the affected file(s)**: \`npx vitest --project storybook run path/to/Foo.stories.${tsx}\`.
297
+ 4. Fix any TypeScript issues needed for story files to pass, then re-run TS and Vitest only for those files. Repeat until files pass, or until you have tried 5 times.
298
+ 5. If a story file still fails after those retries, leave the file tagged \`'needs-work'\` and move on — do not keep chasing project-wide TS errors caused by preserved \`'needs-work'\` files.
299
+ 6. When you keep failing on a story, play function, etc., do not substitute it for easier content that contributes less to codebase understanding.
300
+ **After a file passes**, edit its meta and remove \`'needs-work'\` so its tags become \`['ai-generated']\`. Files you couldn't fix keep \`['ai-generated', 'needs-work']\` — move on, don't loop forever.`
301
+ };
302
+ }
303
+ function cleanupStep({ needsUserOnboarding }, ctx) {
276
304
  return {
277
305
  title: "Clean up",
278
- body: "Before finishing, remove debug code, broad mocks added during diagnosis, unused deps, and eval artifacts."
306
+ body: `Before finishing, remove debug code, broad mocks added during diagnosis, unused deps, and eval artifacts. ${needsUserOnboarding ? "You must preserve the components, CSS, stories and MDX docs initially created by Storybook, as they are required for user onboarding in the UI." : "Delete the components, CSS, stories and MDX docs initially created by Storybook only if you managed to write successful stories."}`
279
307
  };
280
308
  }
281
309
  function monorepoStep(projectInfo, ctx) {
@@ -389,6 +417,51 @@ function writeStoriesStep(projectInfo, { tsx }) {
389
417
  `
390
418
  };
391
419
  }
420
+ function writeStoriesWithAllowedFailuresStep(projectInfo, { tsx }) {
421
+ return {
422
+ title: "Write up to 10 story files (in one batch)",
423
+ body: dedent3`
424
+
425
+ This step has **two required deliverables**:
426
+
427
+ a. Up to 10 colocated \`*.stories.${tsx}\` files for meaningful targets in the codebase.
428
+ b. **Exactly one \`CssCheck\` story** added to one of those files (spec below). This step is not complete without it.
429
+
430
+ **Substep a — pick targets and write the files.** Pick ~10 meaningful targets from the real codebase (low-level reusable → page components). Skip subcomponents, hooks, contexts, helpers, and \`App\` itself when real page components exist.
431
+
432
+ Each story file: ~3 exports for typical components, up to ~10 when warranted by real usage. Copy JSX patterns from real pages/routes/tests.
433
+
434
+ **Tag every new story file with \`['ai-generated', 'needs-work']\` from the start.** You will remove \`'needs-work'\` only after vitest confirms the file passes, and you will leave the tag if the file is not fully functional at the end of your self-healing loop.
435
+
436
+ ${getStoryExample(projectInfo)}
437
+
438
+ Story rules:
439
+
440
+ - Start every meta with \`tags: ['ai-generated', 'needs-work']\`.
441
+ - Show all imports explicitly.
442
+ - Don't add a custom \`title\`.
443
+ - Don't build large story-specific harnesses — fix preview instead.
444
+ - Don't create new app components.
445
+
446
+ **Substep b — add the single \`CssCheck\` story.** Before you finish this step, pick **one** visually distinctive component from the files you just wrote and add a \`CssCheck\` export to that file. Exactly **one** \`CssCheck\` across the whole project — not one per file. This step is not complete until the story exists.
447
+
448
+ Why it's mandatory: \`toBeVisible\` passes on an unstyled component. A concrete \`getComputedStyle\` value is the only proof that the shared preview actually loaded the app's CSS — without it, you have no idea whether your stories are rendering correctly.
449
+
450
+ How: read a real styling value from the component's source (e.g. a hex color in styled-components, a Tailwind class like \`bg-blue-600\`, a CSS variable from the theme), and assert the resolved \`getComputedStyle\` value:
451
+
452
+ \`\`\`${tsx}
453
+ export const CssCheck: Story = {
454
+ args: { children: 'Submit' },
455
+ play: async ({ canvas }) => {
456
+ const button = canvas.getByRole('button', { name: /submit/i });
457
+ // PrimaryButton uses bg-blue-600 — fails if Tailwind / global CSS did not load.
458
+ await expect(getComputedStyle(button).backgroundColor).toBe('rgb(37, 99, 235)');
459
+ },
460
+ };
461
+ \`\`\`
462
+ `
463
+ };
464
+ }
392
465
  function interactionPlayStep(projectInfo, { tsx }) {
393
466
  return {
394
467
  title: "Add `play` functions only where they prove something non-trivial",
@@ -500,19 +573,49 @@ function noPolishRule(ctx) {
500
573
  return dedent4`**Stop when the success criteria are met** — don't keep polishing.`;
501
574
  }
502
575
 
576
+ // src/ai/setup-prompts/partials/dod.ts
577
+ import { dedent as dedent5 } from "ts-dedent";
578
+ function cssCheckDOD(ctx) {
579
+ return dedent5`**Exactly one \`CssCheck\` story exists** somewhere in the new stories, asserting a concrete computed style value read from the component's source.`;
580
+ }
581
+ function storyTagsV1DOD(ctx) {
582
+ return dedent5`Every story file you wrote that vitest confirmed passing has had \`'needs-work'\` stripped, leaving \`tags: ['ai-generated']\`. Anything still failing keeps \`['ai-generated', 'needs-work']\`.`;
583
+ }
584
+ function storyTagsV2DOD(ctx) {
585
+ return dedent5`Every story file that passes vitest tests has had \`'needs-work'\` stripped, leaving \`tags: ['ai-generated']\`. Story files with vitest failures keep \`['ai-generated', 'needs-work']\`.`;
586
+ }
587
+ function vitestPassesStrictDOD(ctx) {
588
+ return dedent5`\`npx vitest --project storybook run\` passes for the new files.`;
589
+ }
590
+ function vitestPassesWhenExpectedDOD(ctx) {
591
+ return dedent5`\`npx vitest --project storybook run\` passes for the new files that don't have \`'needs-work'\` in their tags. Files with \`'needs-work'\` may still fail.`;
592
+ }
593
+ function typeCheckPassesStrictDOD(ctx) {
594
+ return dedent5`The project's TypeScript check passes for changed files.`;
595
+ }
596
+ function typeCheckPassesWhenExpectedDOD(ctx) {
597
+ return dedent5`The project's TypeScript check passes for the new files that don't have \`'needs-work'\` in their tags. Files with \`'needs-work'\` may still fail.`;
598
+ }
599
+ function sharedPreviewDOD(ctx) {
600
+ return dedent5`The shared preview is strong enough that stories don't need per-story fetch/provider workarounds.`;
601
+ }
602
+
503
603
  export {
504
604
  ext,
505
605
  listRules,
506
606
  listSteps,
607
+ listDOD,
507
608
  discoveryStepStrict,
508
609
  discoveryStepRelaxed,
509
610
  verifyStep,
611
+ verifyWithAllowedFailureStep,
510
612
  cleanupStep,
511
613
  monorepoStep,
512
614
  buildSharedPreviewStep,
513
615
  buildPortalStep,
514
616
  mswStep,
515
617
  writeStoriesStep,
618
+ writeStoriesWithAllowedFailuresStep,
516
619
  interactionPlayStep,
517
620
  toolsVsShellRule,
518
621
  nodeModuleReadsRule,
@@ -523,5 +626,13 @@ export {
523
626
  readBudgetRule,
524
627
  readBudgetRuleRelaxed,
525
628
  preferSharedFixesRule,
526
- noPolishRule
629
+ noPolishRule,
630
+ cssCheckDOD,
631
+ storyTagsV1DOD,
632
+ storyTagsV2DOD,
633
+ vitestPassesStrictDOD,
634
+ vitestPassesWhenExpectedDOD,
635
+ typeCheckPassesStrictDOD,
636
+ typeCheckPassesWhenExpectedDOD,
637
+ sharedPreviewDOD
527
638
  };
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_sgh3w93ap7c from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_sgh3w93ap7c from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_sgh3w93ap7c from "node:module";
1
+ import CJS_COMPAT_NODE_URL_x95a390k9yf from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_x95a390k9yf from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_x95a390k9yf from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_sgh3w93ap7c.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_sgh3w93ap7c.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_sgh3w93ap7c.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_x95a390k9yf.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_x95a390k9yf.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_x95a390k9yf.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -21,8 +21,8 @@ import {
21
21
  isGitIgnoredSync,
22
22
  isIgnoredByIgnoreFiles,
23
23
  isIgnoredByIgnoreFilesSync
24
- } from "./chunk-UKVJ7RQN.js";
25
- import "./chunk-TZ336D6R.js";
24
+ } from "./chunk-7GFZ5XLA.js";
25
+ import "./chunk-F7HPRHMF.js";
26
26
  export {
27
27
  convertPathToPattern,
28
28
  generateGlobTasks,