@storybook/cli 10.4.0-alpha.15 → 10.4.0-alpha.17
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.
- package/dist/_node-chunks/{block-dependencies-versions-3JQG5RZL.js → block-dependencies-versions-2FTSXOV4.js} +11 -11
- package/dist/_node-chunks/{block-experimental-addon-test-DYNRVKQS.js → block-experimental-addon-test-MBAWHIVX.js} +9 -9
- package/dist/_node-chunks/{block-major-version-WUJ2IYKH.js → block-major-version-GLL4GDWB.js} +9 -9
- package/dist/_node-chunks/{block-node-version-ML6OV5FZ.js → block-node-version-RVJJJ4XR.js} +9 -9
- package/dist/_node-chunks/{block-webpack5-frameworks-IY3NOB6J.js → block-webpack5-frameworks-XEU7EO2R.js} +11 -11
- package/dist/_node-chunks/{chunk-522W525H.js → chunk-34WT6WHN.js} +6 -6
- package/dist/_node-chunks/{chunk-MNTUL4IJ.js → chunk-3FXXXDDK.js} +7 -7
- package/dist/_node-chunks/chunk-6HOHNSVJ.js +810 -0
- package/dist/_node-chunks/{chunk-TQZC6S4H.js → chunk-C2UHYVPK.js} +7 -7
- package/dist/_node-chunks/{chunk-KMODVRZU.js → chunk-CXC2V53L.js} +15 -15
- package/dist/_node-chunks/chunk-INX3KICK.js +20 -0
- package/dist/_node-chunks/chunk-JNFHA3R2.js +23 -0
- package/dist/_node-chunks/chunk-RXAW6T4J.js +527 -0
- package/dist/_node-chunks/chunk-SIZ5DHPZ.js +11 -0
- package/dist/_node-chunks/{globby-PFUJPJPH.js → globby-N46UCCVS.js} +8 -8
- package/dist/_node-chunks/monorepo-TVSJOSCW.js +111 -0
- package/dist/_node-chunks/optimized-tests-V6WOQ2XH.js +107 -0
- package/dist/_node-chunks/{p-limit-FVG52ILT.js → p-limit-BGPAPMNJ.js} +7 -7
- package/dist/_node-chunks/pattern-copy-play-6YIEGMCW.js +20 -0
- package/dist/_node-chunks/relaxed-limits-YQA6Y4DQ.js +107 -0
- package/dist/_node-chunks/{run-KUMQEGOH.js → run-IPZ5VOW3.js} +357 -1042
- package/dist/_node-chunks/{setup-VZ6IVNC4.js → setup-HAYJDL6K.js} +10 -10
- package/dist/bin/index.js +7 -7
- package/package.json +4 -4
- package/dist/_node-chunks/chunk-WSXOTENG.js +0 -11
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_cy5uq3ou7e from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_cy5uq3ou7e from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_cy5uq3ou7e from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_cy5uq3ou7e.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_cy5uq3ou7e.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_cy5uq3ou7e.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-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-C2UHYVPK.js";
|
|
25
|
+
import "./chunk-34WT6WHN.js";
|
|
26
26
|
export {
|
|
27
27
|
convertPathToPattern,
|
|
28
28
|
generateGlobTasks,
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_cy5uq3ou7e from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_cy5uq3ou7e from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_cy5uq3ou7e from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_cy5uq3ou7e.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_cy5uq3ou7e.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_cy5uq3ou7e.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
batchTestsRule,
|
|
14
|
+
buildPortalStep,
|
|
15
|
+
buildSharedPreviewStep,
|
|
16
|
+
cleanupStep,
|
|
17
|
+
discoveryStepStrict,
|
|
18
|
+
editOverWriteRule,
|
|
19
|
+
ext,
|
|
20
|
+
interactionPlayStep,
|
|
21
|
+
listRules,
|
|
22
|
+
listSteps,
|
|
23
|
+
monorepoRule,
|
|
24
|
+
monorepoStep,
|
|
25
|
+
mswStep,
|
|
26
|
+
noPolishRule,
|
|
27
|
+
nodeModuleReadsRule,
|
|
28
|
+
packageManagerRule,
|
|
29
|
+
preferSharedFixesRule,
|
|
30
|
+
readBudgetRule,
|
|
31
|
+
toolsVsShellRule,
|
|
32
|
+
verifyStep,
|
|
33
|
+
writeStoriesStep
|
|
34
|
+
} from "./chunk-RXAW6T4J.js";
|
|
35
|
+
import {
|
|
36
|
+
getDocsMarkdownUrl
|
|
37
|
+
} from "./chunk-JNFHA3R2.js";
|
|
38
|
+
import "./chunk-34WT6WHN.js";
|
|
39
|
+
|
|
40
|
+
// src/ai/setup-prompts/monorepo.ts
|
|
41
|
+
import { dedent } from "ts-dedent";
|
|
42
|
+
function instructions(projectInfo) {
|
|
43
|
+
let { configDir, language, needsUserOnboarding, packageManager, packageManagerName } = projectInfo, tsx = ext(language, !0), ts = ext(language, !1), docsUrl = (path) => getDocsMarkdownUrl(path, projectInfo), mswInstall = packageManager.getInstallCommand(
|
|
44
|
+
["msw", "msw-storybook-addon", "mockdate"],
|
|
45
|
+
!0
|
|
46
|
+
), ctx = {
|
|
47
|
+
configDir,
|
|
48
|
+
docsUrl,
|
|
49
|
+
mswInstall,
|
|
50
|
+
needsUserOnboarding,
|
|
51
|
+
packageManager,
|
|
52
|
+
packageManagerName,
|
|
53
|
+
tsx,
|
|
54
|
+
ts
|
|
55
|
+
};
|
|
56
|
+
return dedent`
|
|
57
|
+
Your goal is to make Storybook fully functional in this project: configure \`${configDir}/preview.${tsx}\` with the right decorators, add MSW for data, and write up to 10 colocated \`*.stories.${tsx}\` files. Add \`play\` functions only where they prove something non-trivial.
|
|
58
|
+
|
|
59
|
+
## Rules of engagement (follow strictly — these are time budgets, not suggestions)
|
|
60
|
+
|
|
61
|
+
${listRules([
|
|
62
|
+
toolsVsShellRule(ctx),
|
|
63
|
+
nodeModuleReadsRule(ctx),
|
|
64
|
+
monorepoRule(ctx),
|
|
65
|
+
readBudgetRule(ctx),
|
|
66
|
+
editOverWriteRule(ctx),
|
|
67
|
+
batchTestsRule(ctx),
|
|
68
|
+
packageManagerRule(ctx),
|
|
69
|
+
preferSharedFixesRule(ctx),
|
|
70
|
+
noPolishRule(ctx)
|
|
71
|
+
])}
|
|
72
|
+
|
|
73
|
+
## Plan (do not skip steps, but keep each step lean)
|
|
74
|
+
|
|
75
|
+
${listSteps(
|
|
76
|
+
[
|
|
77
|
+
discoveryStepStrict(projectInfo, ctx),
|
|
78
|
+
monorepoStep(projectInfo, ctx),
|
|
79
|
+
buildSharedPreviewStep(projectInfo, ctx),
|
|
80
|
+
buildPortalStep(projectInfo, ctx),
|
|
81
|
+
mswStep(projectInfo, ctx),
|
|
82
|
+
writeStoriesStep(projectInfo, ctx),
|
|
83
|
+
interactionPlayStep(projectInfo, ctx),
|
|
84
|
+
verifyStep(projectInfo, ctx),
|
|
85
|
+
cleanupStep(projectInfo, ctx)
|
|
86
|
+
],
|
|
87
|
+
{ level: 3 }
|
|
88
|
+
)}
|
|
89
|
+
|
|
90
|
+
## Done when
|
|
91
|
+
|
|
92
|
+
- **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).
|
|
93
|
+
- 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']\`.
|
|
94
|
+
- \`npx vitest --project storybook run\` passes for the new files.
|
|
95
|
+
- The project's TypeScript check passes for changed files.
|
|
96
|
+
- The shared preview is strong enough that stories don't need per-story fetch/provider workarounds.
|
|
97
|
+
|
|
98
|
+
## Reference (only fetch if stuck)
|
|
99
|
+
|
|
100
|
+
- Docs index: https://storybook.js.org/llms.txt
|
|
101
|
+
- Writing stories: ${docsUrl("writing-stories")}
|
|
102
|
+
- Decorators: ${docsUrl("writing-stories/decorators")}
|
|
103
|
+
- Play functions: ${docsUrl("writing-stories/play-function")}
|
|
104
|
+
- Vitest integration: ${docsUrl("writing-tests/vitest-plugin")}
|
|
105
|
+
|
|
106
|
+
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.
|
|
107
|
+
`;
|
|
108
|
+
}
|
|
109
|
+
export {
|
|
110
|
+
instructions
|
|
111
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_cy5uq3ou7e from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_cy5uq3ou7e from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_cy5uq3ou7e from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_cy5uq3ou7e.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_cy5uq3ou7e.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_cy5uq3ou7e.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
batchTestsRule,
|
|
14
|
+
buildPortalStep,
|
|
15
|
+
buildSharedPreviewStep,
|
|
16
|
+
cleanupStep,
|
|
17
|
+
discoveryStepStrict,
|
|
18
|
+
editOverWriteRule,
|
|
19
|
+
ext,
|
|
20
|
+
interactionPlayStep,
|
|
21
|
+
listRules,
|
|
22
|
+
listSteps,
|
|
23
|
+
mswStep,
|
|
24
|
+
noPolishRule,
|
|
25
|
+
nodeModuleReadsRule,
|
|
26
|
+
packageManagerRule,
|
|
27
|
+
preferSharedFixesRule,
|
|
28
|
+
readBudgetRule,
|
|
29
|
+
toolsVsShellRule,
|
|
30
|
+
verifyStep,
|
|
31
|
+
writeStoriesStep
|
|
32
|
+
} from "./chunk-RXAW6T4J.js";
|
|
33
|
+
import {
|
|
34
|
+
getDocsMarkdownUrl
|
|
35
|
+
} from "./chunk-JNFHA3R2.js";
|
|
36
|
+
import "./chunk-34WT6WHN.js";
|
|
37
|
+
|
|
38
|
+
// src/ai/setup-prompts/optimized-tests.ts
|
|
39
|
+
import { dedent } from "ts-dedent";
|
|
40
|
+
function instructions(projectInfo) {
|
|
41
|
+
let { configDir, language, needsUserOnboarding, packageManager, packageManagerName } = projectInfo, tsx = ext(language, !0), ts = ext(language, !1), docsUrl = (path) => getDocsMarkdownUrl(path, projectInfo), mswInstall = packageManager.getInstallCommand(
|
|
42
|
+
["msw", "msw-storybook-addon", "mockdate"],
|
|
43
|
+
!0
|
|
44
|
+
), ctx = {
|
|
45
|
+
configDir,
|
|
46
|
+
docsUrl,
|
|
47
|
+
mswInstall,
|
|
48
|
+
needsUserOnboarding,
|
|
49
|
+
packageManager,
|
|
50
|
+
packageManagerName,
|
|
51
|
+
tsx,
|
|
52
|
+
ts
|
|
53
|
+
};
|
|
54
|
+
return dedent`
|
|
55
|
+
Your goal is to make Storybook fully functional in this project: configure \`${configDir}/preview.${tsx}\` with the right decorators, add MSW for data, and write up to 10 colocated \`*.stories.${tsx}\` files. Add \`play\` functions only where they prove something non-trivial.
|
|
56
|
+
|
|
57
|
+
## Rules of engagement (follow strictly — these are time budgets, not suggestions)
|
|
58
|
+
|
|
59
|
+
${listRules([
|
|
60
|
+
toolsVsShellRule(ctx),
|
|
61
|
+
nodeModuleReadsRule(ctx),
|
|
62
|
+
readBudgetRule(ctx),
|
|
63
|
+
editOverWriteRule(ctx),
|
|
64
|
+
batchTestsRule(ctx),
|
|
65
|
+
packageManagerRule(ctx),
|
|
66
|
+
preferSharedFixesRule(ctx),
|
|
67
|
+
noPolishRule(ctx)
|
|
68
|
+
])}
|
|
69
|
+
|
|
70
|
+
## Plan (do not skip steps, but keep each step lean)
|
|
71
|
+
|
|
72
|
+
${listSteps(
|
|
73
|
+
[
|
|
74
|
+
discoveryStepStrict(projectInfo, ctx),
|
|
75
|
+
buildSharedPreviewStep(projectInfo, ctx),
|
|
76
|
+
buildPortalStep(projectInfo, ctx),
|
|
77
|
+
mswStep(projectInfo, ctx),
|
|
78
|
+
writeStoriesStep(projectInfo, ctx),
|
|
79
|
+
interactionPlayStep(projectInfo, ctx),
|
|
80
|
+
verifyStep(projectInfo, ctx),
|
|
81
|
+
cleanupStep(projectInfo, ctx)
|
|
82
|
+
],
|
|
83
|
+
{ level: 3 }
|
|
84
|
+
)}
|
|
85
|
+
|
|
86
|
+
## Done when
|
|
87
|
+
|
|
88
|
+
- **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).
|
|
89
|
+
- 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']\`.
|
|
90
|
+
- \`npx vitest --project storybook run\` passes for the new files.
|
|
91
|
+
- The project's TypeScript check passes for changed files.
|
|
92
|
+
- The shared preview is strong enough that stories don't need per-story fetch/provider workarounds.
|
|
93
|
+
|
|
94
|
+
## Reference (only fetch if stuck)
|
|
95
|
+
|
|
96
|
+
- Docs index: https://storybook.js.org/llms.txt
|
|
97
|
+
- Writing stories: ${docsUrl("writing-stories")}
|
|
98
|
+
- Decorators: ${docsUrl("writing-stories/decorators")}
|
|
99
|
+
- Play functions: ${docsUrl("writing-stories/play-function")}
|
|
100
|
+
- Vitest integration: ${docsUrl("writing-tests/vitest-plugin")}
|
|
101
|
+
|
|
102
|
+
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.
|
|
103
|
+
`;
|
|
104
|
+
}
|
|
105
|
+
export {
|
|
106
|
+
instructions
|
|
107
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_cy5uq3ou7e from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_cy5uq3ou7e from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_cy5uq3ou7e from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_cy5uq3ou7e.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_cy5uq3ou7e.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_cy5uq3ou7e.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-
|
|
12
|
+
import "./chunk-34WT6WHN.js";
|
|
13
13
|
|
|
14
14
|
// ../../../node_modules/yocto-queue/index.js
|
|
15
15
|
var Node = class {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_cy5uq3ou7e from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_cy5uq3ou7e from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_cy5uq3ou7e from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_cy5uq3ou7e.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_cy5uq3ou7e.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_cy5uq3ou7e.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
instructions
|
|
14
|
+
} from "./chunk-6HOHNSVJ.js";
|
|
15
|
+
import "./chunk-JNFHA3R2.js";
|
|
16
|
+
import "./chunk-INX3KICK.js";
|
|
17
|
+
import "./chunk-34WT6WHN.js";
|
|
18
|
+
export {
|
|
19
|
+
instructions
|
|
20
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_cy5uq3ou7e from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_cy5uq3ou7e from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_cy5uq3ou7e from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_cy5uq3ou7e.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_cy5uq3ou7e.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_cy5uq3ou7e.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
batchTestsRule,
|
|
14
|
+
buildPortalStep,
|
|
15
|
+
buildSharedPreviewStep,
|
|
16
|
+
cleanupStep,
|
|
17
|
+
discoveryStepRelaxed,
|
|
18
|
+
editOverWriteRule,
|
|
19
|
+
ext,
|
|
20
|
+
interactionPlayStep,
|
|
21
|
+
listRules,
|
|
22
|
+
listSteps,
|
|
23
|
+
mswStep,
|
|
24
|
+
noPolishRule,
|
|
25
|
+
nodeModuleReadsRule,
|
|
26
|
+
packageManagerRule,
|
|
27
|
+
preferSharedFixesRule,
|
|
28
|
+
readBudgetRuleRelaxed,
|
|
29
|
+
toolsVsShellRule,
|
|
30
|
+
verifyStep,
|
|
31
|
+
writeStoriesStep
|
|
32
|
+
} from "./chunk-RXAW6T4J.js";
|
|
33
|
+
import {
|
|
34
|
+
getDocsMarkdownUrl
|
|
35
|
+
} from "./chunk-JNFHA3R2.js";
|
|
36
|
+
import "./chunk-34WT6WHN.js";
|
|
37
|
+
|
|
38
|
+
// src/ai/setup-prompts/relaxed-limits.ts
|
|
39
|
+
import { dedent } from "ts-dedent";
|
|
40
|
+
function instructions(projectInfo) {
|
|
41
|
+
let { configDir, language, needsUserOnboarding, packageManager, packageManagerName } = projectInfo, tsx = ext(language, !0), ts = ext(language, !1), docsUrl = (path) => getDocsMarkdownUrl(path, projectInfo), mswInstall = packageManager.getInstallCommand(
|
|
42
|
+
["msw", "msw-storybook-addon", "mockdate"],
|
|
43
|
+
!0
|
|
44
|
+
), ctx = {
|
|
45
|
+
configDir,
|
|
46
|
+
docsUrl,
|
|
47
|
+
mswInstall,
|
|
48
|
+
needsUserOnboarding,
|
|
49
|
+
packageManager,
|
|
50
|
+
packageManagerName,
|
|
51
|
+
tsx,
|
|
52
|
+
ts
|
|
53
|
+
};
|
|
54
|
+
return dedent`
|
|
55
|
+
Your goal is to make Storybook fully functional in this project: configure \`${configDir}/preview.${tsx}\` with the right decorators, add MSW for data, and write up to 10 colocated \`*.stories.${tsx}\` files. Add \`play\` functions only where they prove something non-trivial.
|
|
56
|
+
|
|
57
|
+
## Rules of engagement (follow strictly — these are time budgets, not suggestions)
|
|
58
|
+
|
|
59
|
+
${listRules([
|
|
60
|
+
toolsVsShellRule(ctx),
|
|
61
|
+
nodeModuleReadsRule(ctx),
|
|
62
|
+
readBudgetRuleRelaxed(ctx),
|
|
63
|
+
editOverWriteRule(ctx),
|
|
64
|
+
batchTestsRule(ctx),
|
|
65
|
+
packageManagerRule(ctx),
|
|
66
|
+
preferSharedFixesRule(ctx),
|
|
67
|
+
noPolishRule(ctx)
|
|
68
|
+
])}
|
|
69
|
+
|
|
70
|
+
## Plan (do not skip steps, but keep each step lean)
|
|
71
|
+
|
|
72
|
+
${listSteps(
|
|
73
|
+
[
|
|
74
|
+
discoveryStepRelaxed(projectInfo, ctx),
|
|
75
|
+
buildSharedPreviewStep(projectInfo, ctx),
|
|
76
|
+
buildPortalStep(projectInfo, ctx),
|
|
77
|
+
mswStep(projectInfo, ctx),
|
|
78
|
+
writeStoriesStep(projectInfo, ctx),
|
|
79
|
+
interactionPlayStep(projectInfo, ctx),
|
|
80
|
+
verifyStep(projectInfo, ctx),
|
|
81
|
+
cleanupStep(projectInfo, ctx)
|
|
82
|
+
],
|
|
83
|
+
{ level: 3 }
|
|
84
|
+
)}
|
|
85
|
+
|
|
86
|
+
## Done when
|
|
87
|
+
|
|
88
|
+
- **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).
|
|
89
|
+
- 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']\`.
|
|
90
|
+
- \`npx vitest --project storybook run\` passes for the new files.
|
|
91
|
+
- The project's TypeScript check passes for changed files.
|
|
92
|
+
- The shared preview is strong enough that stories don't need per-story fetch/provider workarounds.
|
|
93
|
+
|
|
94
|
+
## Reference (only fetch if stuck)
|
|
95
|
+
|
|
96
|
+
- Docs index: https://storybook.js.org/llms.txt
|
|
97
|
+
- Writing stories: ${docsUrl("writing-stories")}
|
|
98
|
+
- Decorators: ${docsUrl("writing-stories/decorators")}
|
|
99
|
+
- Play functions: ${docsUrl("writing-stories/play-function")}
|
|
100
|
+
- Vitest integration: ${docsUrl("writing-tests/vitest-plugin")}
|
|
101
|
+
|
|
102
|
+
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.
|
|
103
|
+
`;
|
|
104
|
+
}
|
|
105
|
+
export {
|
|
106
|
+
instructions
|
|
107
|
+
};
|