@specdest/devkit 0.2.1 → 0.3.0

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 (138) hide show
  1. package/README.md +15 -20
  2. package/package.json +4 -4
  3. package/src/canonical-project-operations.js +157 -0
  4. package/src/canonical-project.js +50 -0
  5. package/src/canonical-source.js +114 -0
  6. package/src/cli.js +2 -2
  7. package/src/git-catalog.js +105 -0
  8. package/src/index.js +6 -2
  9. package/src/project-operations.js +69 -9
  10. package/src/remote-installer.js +462 -0
  11. package/src/sync-core.js +26 -10
  12. package/catalog/README.md +0 -11
  13. package/catalog/modules/backend-convex/manifest.json +0 -14
  14. package/catalog/modules/backend-convex-expo/manifest.json +0 -11
  15. package/catalog/modules/backend-supabase/manifest.json +0 -15
  16. package/catalog/modules/backend-supabase-expo/manifest.json +0 -11
  17. package/catalog/modules/checker-runtime/config.ts +0 -25
  18. package/catalog/modules/checker-runtime/fs.ts +0 -48
  19. package/catalog/modules/checker-runtime/manifest.json +0 -28
  20. package/catalog/modules/checker-runtime/runtime.ts +0 -79
  21. package/catalog/modules/devflow/.agents/skills/devflow/SKILL.md +0 -33
  22. package/catalog/modules/devflow/.devflow.json +0 -10
  23. package/catalog/modules/devflow/manifest.json +0 -35
  24. package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/SKILL.md +0 -85
  25. package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/activeScenario.mjs +0 -130
  26. package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/checkLocalEnvironment.mjs +0 -7
  27. package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/completeActiveScenario.mjs +0 -36
  28. package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/createActiveScenario.mjs +0 -143
  29. package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/localEnvironment.mjs +0 -43
  30. package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/prompt.mjs +0 -25
  31. package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/runActiveScenario.mjs +0 -66
  32. package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/runAuthoringScenario.mjs +0 -146
  33. package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/seed.mjs +0 -56
  34. package/catalog/modules/e2e-playwright/.agents/skills/e2e-playwright/scripts/seedActiveScenario.mjs +0 -6
  35. package/catalog/modules/e2e-playwright/docs/e2e-playwright/README.md +0 -103
  36. package/catalog/modules/e2e-playwright/manifest.json +0 -206
  37. package/catalog/modules/e2e-playwright/playwright.e2e.config.ts +0 -39
  38. package/catalog/modules/e2e-playwright/tests/e2e/support/e2ePlaywrightFlow.ts +0 -107
  39. package/catalog/modules/e2e-playwright/tests/e2e/support/fixtures.ts +0 -27
  40. package/catalog/modules/local-log/AGENTS.local-log.md +0 -13
  41. package/catalog/modules/local-log/docs/features/local-logging/README.md +0 -70
  42. package/catalog/modules/local-log/manifest.json +0 -39
  43. package/catalog/modules/local-log/tmp/logs/.gitignore +0 -2
  44. package/catalog/modules/local-log/tools/local-log/README.md +0 -47
  45. package/catalog/modules/local-log/tools/local-log/local-log.mjs +0 -241
  46. package/catalog/modules/stack-common-vite/manifest.json +0 -16
  47. package/catalog/modules/stack-expo-convex/manifest.json +0 -31
  48. package/catalog/modules/stack-expo-supabase/manifest.json +0 -44
  49. package/catalog/modules/stack-vite-convex/manifest.json +0 -32
  50. package/catalog/modules/stack-vite-supabase/manifest.json +0 -45
  51. package/catalog/rules/abac-permissions-convex/SKILL.md +0 -17
  52. package/catalog/rules/abac-permissions-convex/check.ts +0 -87
  53. package/catalog/rules/abac-permissions-convex/manifest.json +0 -33
  54. package/catalog/rules/abac-permissions-supabase/SKILL.md +0 -17
  55. package/catalog/rules/abac-permissions-supabase/check.ts +0 -87
  56. package/catalog/rules/abac-permissions-supabase/manifest.json +0 -33
  57. package/catalog/rules/convex-multi-presentation/SKILL.md +0 -47
  58. package/catalog/rules/convex-multi-presentation/check.ts +0 -205
  59. package/catalog/rules/convex-multi-presentation/manifest.json +0 -47
  60. package/catalog/rules/convex-multi-presentation/policy.ts +0 -261
  61. package/catalog/rules/design-rules/SKILL.md +0 -12
  62. package/catalog/rules/design-rules/check.ts +0 -84
  63. package/catalog/rules/design-rules/config.json +0 -5
  64. package/catalog/rules/design-rules/manifest.json +0 -38
  65. package/catalog/rules/e2e-test-rules/SKILL.md +0 -46
  66. package/catalog/rules/e2e-test-rules/check.ts +0 -145
  67. package/catalog/rules/e2e-test-rules/config.json +0 -32
  68. package/catalog/rules/e2e-test-rules/manifest.json +0 -38
  69. package/catalog/rules/error-handling-rules/SKILL.md +0 -21
  70. package/catalog/rules/error-handling-rules/check.ts +0 -73
  71. package/catalog/rules/error-handling-rules/manifest.json +0 -33
  72. package/catalog/rules/layers-and-contracts/SKILL.md +0 -36
  73. package/catalog/rules/layers-and-contracts/check.ts +0 -266
  74. package/catalog/rules/layers-and-contracts/manifest.json +0 -33
  75. package/catalog/rules/layers-and-contracts-convex/SKILL.md +0 -49
  76. package/catalog/rules/layers-and-contracts-convex/check.ts +0 -289
  77. package/catalog/rules/layers-and-contracts-convex/manifest.json +0 -38
  78. package/catalog/rules/layers-and-contracts-convex/policy.ts +0 -68
  79. package/catalog/rules/layers-and-contracts-supabase/SKILL.md +0 -52
  80. package/catalog/rules/layers-and-contracts-supabase/check.ts +0 -371
  81. package/catalog/rules/layers-and-contracts-supabase/manifest.json +0 -38
  82. package/catalog/rules/layers-and-contracts-supabase/policy.ts +0 -68
  83. package/catalog/rules/module-size-rules/SKILL.md +0 -5
  84. package/catalog/rules/module-size-rules/check.ts +0 -144
  85. package/catalog/rules/module-size-rules/config.json +0 -6
  86. package/catalog/rules/module-size-rules/manifest.json +0 -38
  87. package/catalog/rules/module-size-rules-convex/SKILL.md +0 -5
  88. package/catalog/rules/module-size-rules-convex/check.ts +0 -146
  89. package/catalog/rules/module-size-rules-convex/config.json +0 -6
  90. package/catalog/rules/module-size-rules-convex/manifest.json +0 -38
  91. package/catalog/rules/module-size-rules-supabase/SKILL.md +0 -5
  92. package/catalog/rules/module-size-rules-supabase/check.ts +0 -146
  93. package/catalog/rules/module-size-rules-supabase/config.json +0 -12
  94. package/catalog/rules/module-size-rules-supabase/manifest.json +0 -38
  95. package/catalog/rules/mutation-command-rules/SKILL.md +0 -15
  96. package/catalog/rules/mutation-command-rules/check.ts +0 -30
  97. package/catalog/rules/mutation-command-rules/config.json +0 -19
  98. package/catalog/rules/mutation-command-rules/manifest.json +0 -38
  99. package/catalog/rules/nearby-contracts/SKILL.md +0 -18
  100. package/catalog/rules/nearby-contracts/check.ts +0 -138
  101. package/catalog/rules/nearby-contracts/config.json +0 -10
  102. package/catalog/rules/nearby-contracts/manifest.json +0 -38
  103. package/catalog/rules/no-raw-click-buttons/SKILL.md +0 -5
  104. package/catalog/rules/no-raw-click-buttons/check.ts +0 -37
  105. package/catalog/rules/no-raw-click-buttons/manifest.json +0 -33
  106. package/catalog/rules/public-api-export-barrels/SKILL.md +0 -45
  107. package/catalog/rules/public-api-export-barrels/check.ts +0 -73
  108. package/catalog/rules/public-api-export-barrels/config.json +0 -4
  109. package/catalog/rules/public-api-export-barrels/manifest.json +0 -38
  110. package/catalog/rules/route-tree-fresh/SKILL.md +0 -16
  111. package/catalog/rules/route-tree-fresh/check.ts +0 -66
  112. package/catalog/rules/route-tree-fresh/manifest.json +0 -33
  113. package/catalog/rules/strict-typescript/SKILL.md +0 -3
  114. package/catalog/rules/strict-typescript/check.ts +0 -119
  115. package/catalog/rules/strict-typescript/manifest.json +0 -33
  116. package/catalog/rules/supabase-contracts/SKILL.md +0 -3
  117. package/catalog/rules/supabase-contracts/check.ts +0 -172
  118. package/catalog/rules/supabase-contracts/manifest.json +0 -33
  119. package/catalog/rules/supabase-declarative-schema/SKILL.md +0 -30
  120. package/catalog/rules/supabase-declarative-schema/check.ts +0 -262
  121. package/catalog/rules/supabase-declarative-schema/config.json +0 -8
  122. package/catalog/rules/supabase-declarative-schema/manifest.json +0 -38
  123. package/catalog/rules/tanstack-form-rules/SKILL.md +0 -11
  124. package/catalog/rules/tanstack-form-rules/check.ts +0 -58
  125. package/catalog/rules/tanstack-form-rules/manifest.json +0 -33
  126. package/catalog/rules/unit-test-rules/SKILL.md +0 -55
  127. package/catalog/rules/unit-test-rules/check.ts +0 -132
  128. package/catalog/rules/unit-test-rules/config.json +0 -22
  129. package/catalog/rules/unit-test-rules/manifest.json +0 -38
  130. package/catalog/rules/unit-test-rules-convex/SKILL.md +0 -41
  131. package/catalog/rules/unit-test-rules-convex/check.ts +0 -418
  132. package/catalog/rules/unit-test-rules-convex/manifest.json +0 -33
  133. package/catalog/rules/unit-test-rules-supabase/SKILL.md +0 -40
  134. package/catalog/rules/unit-test-rules-supabase/check.ts +0 -492
  135. package/catalog/rules/unit-test-rules-supabase/manifest.json +0 -33
  136. package/catalog/rules/workstation-controller-rules/SKILL.md +0 -22
  137. package/catalog/rules/workstation-controller-rules/check.ts +0 -108
  138. package/catalog/rules/workstation-controller-rules/manifest.json +0 -33
@@ -1,66 +0,0 @@
1
- import { existsSync } from "node:fs";
2
- import { spawn } from "node:child_process";
3
- import path from "node:path";
4
- import { assertLocalEnvironment } from "./localEnvironment.mjs";
5
- import { seedScenario } from "./seed.mjs";
6
- import {
7
- getRequiredActiveScenario,
8
- repoRoot,
9
- requireFile,
10
- toRepoRelative,
11
- } from "./activeScenario.mjs";
12
-
13
- const scenario = await getRequiredActiveScenario();
14
-
15
- requireFile(
16
- scenario.seedPath,
17
- `Missing seed: ${toRepoRelative(scenario.seedPath)}. Create seed.mjs first.`,
18
- );
19
- requireFile(
20
- scenario.flowScriptPath,
21
- `Missing flow script: ${toRepoRelative(scenario.flowScriptPath)}. Create flow.script.ts first.`,
22
- );
23
-
24
- if (!existsSync(scenario.specPath)) {
25
- console.error(`Missing active scenario spec: ${toRepoRelative(scenario.specPath)}`);
26
- console.error("Create the spec before running the active scenario.");
27
- process.exit(2);
28
- }
29
-
30
- await assertLocalEnvironment({ requireFrontend: true });
31
-
32
- if (process.env.E2E_PLAYWRIGHT_SKIP_SEED !== "1") {
33
- console.log("Seeding active E2E scenario before run.");
34
- await seedScenario(scenario);
35
- }
36
-
37
- const playwrightBin = path.join(
38
- repoRoot,
39
- "node_modules",
40
- ".bin",
41
- process.platform === "win32" ? "playwright.cmd" : "playwright",
42
- );
43
- const specPath = toRepoRelative(scenario.specPath);
44
- const args = ["test", "--config", "playwright.e2e.config.ts", specPath];
45
-
46
- console.log(`Running active E2E scenario: ${scenario.id}`);
47
- console.log(`Spec: ${specPath}`);
48
- console.log("Using local Playwright. No backend mocking is installed by this template.");
49
- console.log("");
50
-
51
- const child = spawn(playwrightBin, args, {
52
- cwd: repoRoot,
53
- env: {
54
- ...process.env,
55
- E2E_PLAYWRIGHT_ACTIVE_SCENARIO_ID: scenario.id,
56
- },
57
- stdio: "inherit",
58
- });
59
-
60
- child.on("exit", (code, signal) => {
61
- if (signal) {
62
- console.error(`Active E2E scenario runner exited by signal ${signal}`);
63
- process.exit(1);
64
- }
65
- process.exit(code ?? 1);
66
- });
@@ -1,146 +0,0 @@
1
- import { existsSync } from "node:fs";
2
- import { spawn } from "node:child_process";
3
- import path from "node:path";
4
- import { assertLocalEnvironment } from "./localEnvironment.mjs";
5
- import { seedScenario } from "./seed.mjs";
6
- import {
7
- getRequiredActiveScenario,
8
- repoRoot,
9
- requireFile,
10
- toRepoRelative,
11
- } from "./activeScenario.mjs";
12
-
13
- const scenario = await getRequiredActiveScenario();
14
- const options = parseOptions(process.argv.slice(2));
15
-
16
- requireFile(
17
- scenario.seedPath,
18
- `Missing seed: ${toRepoRelative(scenario.seedPath)}. Create seed.mjs first.`,
19
- );
20
- requireFile(
21
- scenario.flowScriptPath,
22
- `Missing flow script: ${toRepoRelative(scenario.flowScriptPath)}. Create flow.script.ts first.`,
23
- );
24
-
25
- if (!existsSync(scenario.specPath)) {
26
- console.error(`Missing active scenario spec: ${toRepoRelative(scenario.specPath)}`);
27
- console.error("Create the spec before running authoring mode.");
28
- process.exit(2);
29
- }
30
-
31
- await assertLocalEnvironment({ requireFrontend: true });
32
-
33
- if (!options.skipSeed) {
34
- console.log("Seeding active E2E scenario before authoring run.");
35
- await seedScenario(scenario);
36
- }
37
-
38
- const playwrightBin = path.join(
39
- repoRoot,
40
- "node_modules",
41
- ".bin",
42
- process.platform === "win32" ? "playwright.cmd" : "playwright",
43
- );
44
- const specPath = toRepoRelative(scenario.specPath);
45
- const args = ["test", "--config", "playwright.e2e.config.ts", specPath];
46
-
47
- if (options.debug) args.push("--debug");
48
- else if (options.headed) args.push("--headed");
49
-
50
- console.log(`Running active E2E scenario in authoring mode: ${scenario.id}`);
51
- console.log(`Spec: ${specPath}`);
52
- if (options.until) console.log(`Until step: ${options.until}`);
53
- if (options.pauseAfter) console.log(`Pause after step: ${options.pauseAfter}`);
54
- console.log("Using local Playwright. No backend mocking is installed by this template.");
55
- console.log("");
56
-
57
- const child = spawn(playwrightBin, args, {
58
- cwd: repoRoot,
59
- env: {
60
- ...process.env,
61
- E2E_PLAYWRIGHT_ACTIVE_SCENARIO_ID: scenario.id,
62
- E2E_PLAYWRIGHT_TRACE_STEPS: "1",
63
- E2E_PLAYWRIGHT_UNTIL_STEP: options.until ?? "",
64
- E2E_PLAYWRIGHT_PAUSE_AFTER_STEP: options.pauseAfter ?? "",
65
- },
66
- stdio: "inherit",
67
- });
68
-
69
- child.on("exit", (code, signal) => {
70
- if (signal) {
71
- console.error(`Active E2E authoring runner exited by signal ${signal}`);
72
- process.exit(1);
73
- }
74
- process.exit(code ?? 1);
75
- });
76
-
77
- function parseOptions(args) {
78
- let until;
79
- let pauseAfter;
80
- let debug = false;
81
- let headed = true;
82
- let skipSeed = process.env.E2E_PLAYWRIGHT_SKIP_SEED === "1";
83
-
84
- for (let index = 0; index < args.length; index += 1) {
85
- const arg = args[index];
86
- if (!arg || arg === "--") continue;
87
-
88
- if (arg === "--until") {
89
- const parsed = readValueArgs(args, index, arg);
90
- until = parsed.value;
91
- index = parsed.nextIndex;
92
- continue;
93
- }
94
- if (arg.startsWith("--until=")) {
95
- until = arg.slice("--until=".length);
96
- continue;
97
- }
98
- if (arg === "--pause-after") {
99
- const parsed = readValueArgs(args, index, arg);
100
- pauseAfter = parsed.value;
101
- debug = true;
102
- index = parsed.nextIndex;
103
- continue;
104
- }
105
- if (arg.startsWith("--pause-after=")) {
106
- pauseAfter = arg.slice("--pause-after=".length);
107
- debug = true;
108
- continue;
109
- }
110
- if (arg === "--debug") {
111
- debug = true;
112
- continue;
113
- }
114
- if (arg === "--headed") {
115
- headed = true;
116
- continue;
117
- }
118
- if (arg === "--headless") {
119
- headed = false;
120
- continue;
121
- }
122
- if (arg === "--skip-seed") {
123
- skipSeed = true;
124
- continue;
125
- }
126
-
127
- throw new Error(`Unknown authoring option: ${arg}`);
128
- }
129
-
130
- return { until, pauseAfter, debug, headed, skipSeed };
131
- }
132
-
133
- function readValueArgs(args, index, flag) {
134
- const values = [];
135
- let cursor = index + 1;
136
-
137
- while (cursor < args.length) {
138
- const value = args[cursor];
139
- if (!value || value.startsWith("--")) break;
140
- values.push(value);
141
- cursor += 1;
142
- }
143
-
144
- if (values.length === 0) throw new Error(`${flag} requires a value.`);
145
- return { value: values.join(" "), nextIndex: cursor - 1 };
146
- }
@@ -1,56 +0,0 @@
1
- import { spawnSync } from "node:child_process";
2
- import { pathToFileURL } from "node:url";
3
- import { assertLocalEnvironment } from "./localEnvironment.mjs";
4
- import { getRequiredActiveScenario, repoRoot, toRepoRelative } from "./activeScenario.mjs";
5
-
6
- export async function seedScenario(scenario) {
7
- await assertLocalEnvironment({ requireFrontend: false });
8
- const moduleUrl = pathToFileURL(scenario.seedPath).href;
9
- const seedModule = await import(moduleUrl);
10
-
11
- if (typeof seedModule.seedScenario !== "function") {
12
- throw new Error(`${toRepoRelative(scenario.seedPath)} must export seedScenario(context).`);
13
- }
14
-
15
- const context = {
16
- projectRoot: repoRoot,
17
- scenario,
18
- now: new Date("2030-01-01T00:00:00.000Z").toISOString(),
19
- env: { ...process.env },
20
- executeCommand,
21
- };
22
-
23
- await seedModule.seedScenario(context);
24
- if (typeof seedModule.verifySeed === "function") await seedModule.verifySeed(context);
25
- }
26
-
27
- export async function seedActiveScenario() {
28
- await seedScenario(await getRequiredActiveScenario());
29
- }
30
-
31
- async function executeCommand(command, args = [], options = {}) {
32
- const result = spawnSync(command, args, {
33
- cwd: options.cwd ?? repoRoot,
34
- encoding: "utf8",
35
- env: { ...process.env, ...(options.env ?? {}) },
36
- stdio: ["ignore", "pipe", "pipe"],
37
- maxBuffer: 1024 * 1024 * 32,
38
- });
39
-
40
- if (result.status === 0) {
41
- return {
42
- stdout: result.stdout ?? "",
43
- stderr: result.stderr ?? "",
44
- };
45
- }
46
-
47
- throw new Error(
48
- [
49
- `Command failed: ${command} ${args.join(" ")}`,
50
- result.stdout ? `stdout:\n${result.stdout}` : "",
51
- result.stderr ? `stderr:\n${result.stderr}` : "",
52
- ]
53
- .filter(Boolean)
54
- .join("\n"),
55
- );
56
- }
@@ -1,6 +0,0 @@
1
- import { seedActiveScenario } from "./seed.mjs";
2
- import { getRequiredActiveScenario, toRepoRelative } from "./activeScenario.mjs";
3
-
4
- const scenario = await getRequiredActiveScenario();
5
- await seedActiveScenario();
6
- console.log(`Seeded active E2E scenario: ${toRepoRelative(scenario.root)}`);
@@ -1,103 +0,0 @@
1
- # E2E Playwright
2
-
3
- This template installs a generic Playwright E2E authoring flow for Vite/web projects.
4
-
5
- ## Commands
6
-
7
- When the target project uses `package-scripts.yml` or `package-scripts.yaml`:
8
-
9
- ```bash
10
- nps "e2e.playwright.0CreateActiveScenario -- <scenario-id>"
11
- nps e2e.playwright.1CheckLocal
12
- nps e2e.playwright.2SeedActiveScenario
13
- nps e2e.playwright.5RunAuthoring
14
- nps "e2e.playwright.5RunAuthoring -- --until <step-name>"
15
- nps "e2e.playwright.5RunAuthoring -- --pause-after <step-name>"
16
- nps e2e.playwright.3RunActiveScenario
17
- nps "e2e.playwright.4CompleteActiveScenario -- <scenario-id>"
18
- ```
19
-
20
- Without package-scripts/NPS:
21
-
22
- ```bash
23
- npm run e2e:create -- <scenario-id>
24
- npm run e2e:check-local
25
- npm run e2e:seed
26
- npm run e2e:author
27
- npm run e2e:run
28
- npm run e2e:complete -- <scenario-id>
29
- ```
30
-
31
- ## Local service boundary
32
-
33
- The template only permits local browser targets:
34
-
35
- ```txt
36
- localhost
37
- 127.0.0.1
38
- ::1
39
- ```
40
-
41
- Set the app URL with:
42
-
43
- ```bash
44
- E2E_BASE_URL=http://127.0.0.1:5173
45
- ```
46
-
47
- Override the Playwright web server command with:
48
-
49
- ```bash
50
- E2E_WEB_SERVER_COMMAND="pnpm dev -- --host 127.0.0.1 --port 5173"
51
- ```
52
-
53
- Do not point this flow at production services.
54
-
55
- ## Scenario folders
56
-
57
- Active scenario:
58
-
59
- ```txt
60
- tests/e2e/_active/<scenario-id>/
61
- ```
62
-
63
- Completed scenario:
64
-
65
- ```txt
66
- tests/e2e/scenarios/<scenario-id>/
67
- ```
68
-
69
- Generated files:
70
-
71
- ```txt
72
- intent.md
73
- authoring.md
74
- start-url.txt
75
- seed.mjs
76
- flow.script.ts
77
- specs/<scenario-id>.spec.ts
78
- artifacts/
79
- ```
80
-
81
- ## Authoring loop
82
-
83
- ```txt
84
- 1. Write rough business intent in intent.md.
85
- 2. Add deterministic project-owned data setup in seed.mjs.
86
- 3. Write named Playwright steps in flow.script.ts.
87
- 4. Run authoring mode with --until or --pause-after.
88
- 5. Fix one step at a time.
89
- 6. Remove exploratory pauses/noise.
90
- 7. Run clean verification from seed and step 0.
91
- 8. Complete the scenario.
92
- ```
93
-
94
- ## Seed hook
95
-
96
- `seed.mjs` is intentionally project-specific. It receives:
97
-
98
- ```js
99
- export async function seedScenario({ projectRoot, scenario, now, executeCommand }) {}
100
- export async function verifySeed({ projectRoot, scenario, now, executeCommand }) {}
101
- ```
102
-
103
- Use this to call project-owned seed scripts, local database tools, or fixture setup commands. The template does not own database schema, auth, routes, or business data.
@@ -1,206 +0,0 @@
1
- {
2
- "id": "e2e-playwright",
3
- "kind": "module",
4
- "version": "1.0.1",
5
- "artifacts": [
6
- {
7
- "kind": "managed-file",
8
- "path": ".agents/skills/e2e-playwright/SKILL.md",
9
- "source": ".agents/skills/e2e-playwright/SKILL.md"
10
- },
11
- {
12
- "kind": "managed-file",
13
- "path": ".agents/skills/e2e-playwright/scripts/activeScenario.mjs",
14
- "source": ".agents/skills/e2e-playwright/scripts/activeScenario.mjs"
15
- },
16
- {
17
- "kind": "managed-file",
18
- "path": ".agents/skills/e2e-playwright/scripts/checkLocalEnvironment.mjs",
19
- "source": ".agents/skills/e2e-playwright/scripts/checkLocalEnvironment.mjs"
20
- },
21
- {
22
- "kind": "managed-file",
23
- "path": ".agents/skills/e2e-playwright/scripts/completeActiveScenario.mjs",
24
- "source": ".agents/skills/e2e-playwright/scripts/completeActiveScenario.mjs"
25
- },
26
- {
27
- "kind": "managed-file",
28
- "path": ".agents/skills/e2e-playwright/scripts/createActiveScenario.mjs",
29
- "source": ".agents/skills/e2e-playwright/scripts/createActiveScenario.mjs"
30
- },
31
- {
32
- "kind": "managed-file",
33
- "path": ".agents/skills/e2e-playwright/scripts/localEnvironment.mjs",
34
- "source": ".agents/skills/e2e-playwright/scripts/localEnvironment.mjs"
35
- },
36
- {
37
- "kind": "managed-file",
38
- "path": ".agents/skills/e2e-playwright/scripts/prompt.mjs",
39
- "source": ".agents/skills/e2e-playwright/scripts/prompt.mjs"
40
- },
41
- {
42
- "kind": "managed-file",
43
- "path": ".agents/skills/e2e-playwright/scripts/runActiveScenario.mjs",
44
- "source": ".agents/skills/e2e-playwright/scripts/runActiveScenario.mjs"
45
- },
46
- {
47
- "kind": "managed-file",
48
- "path": ".agents/skills/e2e-playwright/scripts/runAuthoringScenario.mjs",
49
- "source": ".agents/skills/e2e-playwright/scripts/runAuthoringScenario.mjs"
50
- },
51
- {
52
- "kind": "managed-file",
53
- "path": ".agents/skills/e2e-playwright/scripts/seed.mjs",
54
- "source": ".agents/skills/e2e-playwright/scripts/seed.mjs"
55
- },
56
- {
57
- "kind": "managed-file",
58
- "path": ".agents/skills/e2e-playwright/scripts/seedActiveScenario.mjs",
59
- "source": ".agents/skills/e2e-playwright/scripts/seedActiveScenario.mjs"
60
- },
61
- {
62
- "kind": "managed-file",
63
- "path": "docs/e2e-playwright/README.md",
64
- "source": "docs/e2e-playwright/README.md"
65
- },
66
- {
67
- "kind": "scaffold",
68
- "path": "playwright.e2e.config.ts",
69
- "source": "playwright.e2e.config.ts"
70
- },
71
- {
72
- "kind": "managed-file",
73
- "path": "tests/e2e/support/e2ePlaywrightFlow.ts",
74
- "source": "tests/e2e/support/e2ePlaywrightFlow.ts"
75
- },
76
- {
77
- "kind": "managed-file",
78
- "path": "tests/e2e/support/fixtures.ts",
79
- "source": "tests/e2e/support/fixtures.ts"
80
- },
81
- {
82
- "kind": "shared-json-field",
83
- "path": "package.json",
84
- "fieldPath": [
85
- "scripts",
86
- "start:local"
87
- ],
88
- "value": "vite --host 127.0.0.1 --port 5173 --strictPort"
89
- },
90
- {
91
- "kind": "shared-json-field",
92
- "path": "package.json",
93
- "fieldPath": [
94
- "scripts",
95
- "test:e2e"
96
- ],
97
- "value": "playwright test --config playwright.e2e.config.ts"
98
- },
99
- {
100
- "kind": "shared-json-field",
101
- "path": "package.json",
102
- "fieldPath": [
103
- "scripts",
104
- "test:e2e:ui"
105
- ],
106
- "value": "playwright test --config playwright.e2e.config.ts --ui"
107
- },
108
- {
109
- "kind": "shared-json-field",
110
- "path": "package.json",
111
- "fieldPath": [
112
- "scripts",
113
- "test:e2e:report"
114
- ],
115
- "value": "playwright show-report playwright-report/e2e"
116
- },
117
- {
118
- "kind": "shared-json-field",
119
- "path": "package.json",
120
- "fieldPath": [
121
- "scripts",
122
- "e2e:create"
123
- ],
124
- "value": "node .agents/skills/e2e-playwright/scripts/createActiveScenario.mjs"
125
- },
126
- {
127
- "kind": "shared-json-field",
128
- "path": "package.json",
129
- "fieldPath": [
130
- "scripts",
131
- "e2e:check-local"
132
- ],
133
- "value": "node .agents/skills/e2e-playwright/scripts/checkLocalEnvironment.mjs"
134
- },
135
- {
136
- "kind": "shared-json-field",
137
- "path": "package.json",
138
- "fieldPath": [
139
- "scripts",
140
- "e2e:seed"
141
- ],
142
- "value": "node .agents/skills/e2e-playwright/scripts/seedActiveScenario.mjs"
143
- },
144
- {
145
- "kind": "shared-json-field",
146
- "path": "package.json",
147
- "fieldPath": [
148
- "scripts",
149
- "e2e:run"
150
- ],
151
- "value": "node .agents/skills/e2e-playwright/scripts/runActiveScenario.mjs"
152
- },
153
- {
154
- "kind": "shared-json-field",
155
- "path": "package.json",
156
- "fieldPath": [
157
- "scripts",
158
- "e2e:author"
159
- ],
160
- "value": "node .agents/skills/e2e-playwright/scripts/runAuthoringScenario.mjs"
161
- },
162
- {
163
- "kind": "shared-json-field",
164
- "path": "package.json",
165
- "fieldPath": [
166
- "scripts",
167
- "e2e:complete"
168
- ],
169
- "value": "node .agents/skills/e2e-playwright/scripts/completeActiveScenario.mjs"
170
- },
171
- {
172
- "kind": "shared-json-field",
173
- "path": "package.json",
174
- "fieldPath": [
175
- "devDependencies",
176
- "@playwright/test"
177
- ],
178
- "value": "^1.57.0"
179
- },
180
- {
181
- "kind": "shared-json-field",
182
- "path": "package.json",
183
- "fieldPath": [
184
- "devDependencies",
185
- "@types/node"
186
- ],
187
- "value": "^25.9.4"
188
- },
189
- {
190
- "kind": "shared-json-field",
191
- "path": "package.json",
192
- "fieldPath": [
193
- "devDependencies",
194
- "playwright"
195
- ],
196
- "value": "^1.57.0"
197
- },
198
- {
199
- "kind": "shared-markdown-section",
200
- "path": "AGENTS.md",
201
- "heading": "## E2E Playwright authoring",
202
- "body": "Use `.agents/skills/e2e-playwright/SKILL.md` for local Playwright E2E scenario authoring. Keep app-specific selectors, routes, auth, seed data, and business flows in project scenarios. Never target production URLs."
203
- }
204
- ],
205
- "obsolete": []
206
- }
@@ -1,39 +0,0 @@
1
- import { defineConfig, devices } from "@playwright/test";
2
- import { existsSync } from "node:fs";
3
-
4
- const baseURL = process.env["E2E_BASE_URL"] ?? "http://127.0.0.1:5173";
5
- const hasPackageScripts = existsSync("package-scripts.yml") || existsSync("package-scripts.yaml");
6
- const webServerCommand =
7
- process.env["E2E_WEB_SERVER_COMMAND"] ??
8
- (hasPackageScripts ? "nps start.local" : "npm run start:local");
9
- const isActiveScenarioRun = Boolean(process.env["E2E_PLAYWRIGHT_ACTIVE_SCENARIO_ID"]);
10
-
11
- export default defineConfig({
12
- testDir: "./tests/e2e",
13
- testIgnore: isActiveScenarioRun ? [] : ["**/_active/**"],
14
- timeout: 60_000,
15
- expect: { timeout: 10_000 },
16
- fullyParallel: false,
17
- workers: 1,
18
- outputDir: "test-results/playwright-artifacts",
19
- reporter: [
20
- ["list"],
21
- ["html", { outputFolder: "playwright-report/e2e", open: "never" }],
22
- ["json", { outputFile: "test-results/e2e-report.json" }],
23
- ],
24
- use: {
25
- baseURL,
26
- trace: "retain-on-failure",
27
- screenshot: "only-on-failure",
28
- video: "retain-on-failure",
29
- actionTimeout: 10_000,
30
- navigationTimeout: 30_000,
31
- },
32
- projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"], channel: undefined } }],
33
- webServer: {
34
- command: webServerCommand,
35
- url: baseURL,
36
- reuseExistingServer: !process.env["CI"],
37
- timeout: 120_000,
38
- },
39
- });