specweave 1.0.239 → 1.0.241

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 (161) hide show
  1. package/CLAUDE.md +31 -30
  2. package/README.md +1 -1
  3. package/bin/specweave.js +16 -0
  4. package/dist/plugins/specweave-ado/lib/ado-permission-gate.d.ts.map +1 -1
  5. package/dist/plugins/specweave-ado/lib/ado-permission-gate.js +17 -2
  6. package/dist/plugins/specweave-ado/lib/ado-permission-gate.js.map +1 -1
  7. package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts +7 -0
  8. package/dist/plugins/specweave-github/lib/github-feature-sync.d.ts.map +1 -1
  9. package/dist/plugins/specweave-github/lib/github-feature-sync.js +53 -0
  10. package/dist/plugins/specweave-github/lib/github-feature-sync.js.map +1 -1
  11. package/dist/plugins/specweave-jira/lib/jira-permission-gate.d.ts.map +1 -1
  12. package/dist/plugins/specweave-jira/lib/jira-permission-gate.js +17 -2
  13. package/dist/plugins/specweave-jira/lib/jira-permission-gate.js.map +1 -1
  14. package/dist/plugins/specweave-testing/lib/playwright-cli-detector.d.ts +1 -0
  15. package/dist/plugins/specweave-testing/lib/playwright-cli-detector.d.ts.map +1 -1
  16. package/dist/plugins/specweave-testing/lib/playwright-cli-detector.js +7 -3
  17. package/dist/plugins/specweave-testing/lib/playwright-cli-detector.js.map +1 -1
  18. package/dist/plugins/specweave-testing/lib/playwright-cli-runner.d.ts.map +1 -1
  19. package/dist/plugins/specweave-testing/lib/playwright-cli-runner.js +27 -19
  20. package/dist/plugins/specweave-testing/lib/playwright-cli-runner.js.map +1 -1
  21. package/dist/plugins/specweave-testing/lib/playwright-routing.d.ts +8 -0
  22. package/dist/plugins/specweave-testing/lib/playwright-routing.d.ts.map +1 -1
  23. package/dist/plugins/specweave-testing/lib/playwright-routing.js +10 -7
  24. package/dist/plugins/specweave-testing/lib/playwright-routing.js.map +1 -1
  25. package/dist/src/adapters/agents-md-generator.js +1 -1
  26. package/dist/src/adapters/agents-md-generator.js.map +1 -1
  27. package/dist/src/adapters/claude/README.md +1 -1
  28. package/dist/src/adapters/claude-md-generator.js +1 -1
  29. package/dist/src/adapters/claude-md-generator.js.map +1 -1
  30. package/dist/src/cli/commands/init.d.ts.map +1 -1
  31. package/dist/src/cli/commands/init.js +10 -1
  32. package/dist/src/cli/commands/init.js.map +1 -1
  33. package/dist/src/cli/commands/refresh-marketplace.d.ts.map +1 -1
  34. package/dist/src/cli/commands/refresh-marketplace.js +7 -67
  35. package/dist/src/cli/commands/refresh-marketplace.js.map +1 -1
  36. package/dist/src/cli/commands/team.d.ts +20 -0
  37. package/dist/src/cli/commands/team.d.ts.map +1 -0
  38. package/dist/src/cli/commands/team.js +101 -0
  39. package/dist/src/cli/commands/team.js.map +1 -0
  40. package/dist/src/cli/helpers/init/claude-settings-env.d.ts +16 -0
  41. package/dist/src/cli/helpers/init/claude-settings-env.d.ts.map +1 -0
  42. package/dist/src/cli/helpers/init/claude-settings-env.js +44 -0
  43. package/dist/src/cli/helpers/init/claude-settings-env.js.map +1 -0
  44. package/dist/src/cli/helpers/init/plugin-installer.d.ts.map +1 -1
  45. package/dist/src/cli/helpers/init/plugin-installer.js +9 -13
  46. package/dist/src/cli/helpers/init/plugin-installer.js.map +1 -1
  47. package/dist/src/cli/helpers/issue-tracker/index.d.ts.map +1 -1
  48. package/dist/src/cli/helpers/issue-tracker/index.js +12 -6
  49. package/dist/src/cli/helpers/issue-tracker/index.js.map +1 -1
  50. package/dist/src/cli/helpers/issue-tracker/types.d.ts +2 -0
  51. package/dist/src/cli/helpers/issue-tracker/types.d.ts.map +1 -1
  52. package/dist/src/cli/helpers/issue-tracker/types.js.map +1 -1
  53. package/dist/src/core/increment/discipline-checker.js +1 -1
  54. package/dist/src/core/increment/discipline-checker.js.map +1 -1
  55. package/dist/src/core/increment/status-commands.d.ts.map +1 -1
  56. package/dist/src/core/increment/status-commands.js +7 -0
  57. package/dist/src/core/increment/status-commands.js.map +1 -1
  58. package/dist/src/core/lazy-loading/llm-plugin-detector.d.ts +2 -2
  59. package/dist/src/core/lazy-loading/llm-plugin-detector.d.ts.map +1 -1
  60. package/dist/src/core/lazy-loading/llm-plugin-detector.js +63 -25
  61. package/dist/src/core/lazy-loading/llm-plugin-detector.js.map +1 -1
  62. package/dist/src/core/reflection/reflect-handler.js +2 -2
  63. package/dist/src/core/reflection/reflect-handler.js.map +1 -1
  64. package/dist/src/core/session/handoff-context.js +2 -2
  65. package/dist/src/core/session/handoff-context.js.map +1 -1
  66. package/dist/src/sync/ado-reconciler.d.ts.map +1 -1
  67. package/dist/src/sync/ado-reconciler.js +21 -2
  68. package/dist/src/sync/ado-reconciler.js.map +1 -1
  69. package/dist/src/sync/engine.d.ts.map +1 -1
  70. package/dist/src/sync/engine.js +2 -0
  71. package/dist/src/sync/engine.js.map +1 -1
  72. package/dist/src/sync/github-reconciler.d.ts.map +1 -1
  73. package/dist/src/sync/github-reconciler.js +52 -26
  74. package/dist/src/sync/github-reconciler.js.map +1 -1
  75. package/dist/src/sync/jira-reconciler.d.ts.map +1 -1
  76. package/dist/src/sync/jira-reconciler.js +16 -3
  77. package/dist/src/sync/jira-reconciler.js.map +1 -1
  78. package/dist/src/sync/providers/ado.d.ts.map +1 -1
  79. package/dist/src/sync/providers/ado.js +4 -2
  80. package/dist/src/sync/providers/ado.js.map +1 -1
  81. package/dist/src/sync/providers/github.d.ts.map +1 -1
  82. package/dist/src/sync/providers/github.js +11 -0
  83. package/dist/src/sync/providers/github.js.map +1 -1
  84. package/dist/src/sync/providers/jira.d.ts.map +1 -1
  85. package/dist/src/sync/providers/jira.js +14 -2
  86. package/dist/src/sync/providers/jira.js.map +1 -1
  87. package/dist/src/sync/sync-coordinator.d.ts.map +1 -1
  88. package/dist/src/sync/sync-coordinator.js +31 -6
  89. package/dist/src/sync/sync-coordinator.js.map +1 -1
  90. package/dist/src/utils/auto-install.js +4 -4
  91. package/dist/src/utils/auto-install.js.map +1 -1
  92. package/package.json +2 -2
  93. package/plugins/FINAL-AUDIT-RECOMMENDATIONS.md +3 -3
  94. package/plugins/SKILLS-VS-AGENTS.md +1 -1
  95. package/plugins/specweave/PLUGIN.md +0 -2
  96. package/plugins/specweave/commands/export-skills.md +1 -1
  97. package/plugins/specweave/commands/role-orchestrator.md +1 -1
  98. package/plugins/specweave/hooks/log-decision.sh +6 -0
  99. package/plugins/specweave/hooks/stop-auto-v5.sh +17 -1
  100. package/plugins/specweave/hooks/stop-reflect.sh +16 -2
  101. package/plugins/specweave/hooks/stop-sync.sh +17 -9
  102. package/plugins/specweave/hooks/user-prompt-submit.sh +119 -35
  103. package/plugins/specweave/lib/vendor/sync/github-reconciler.js +52 -26
  104. package/plugins/specweave/lib/vendor/sync/github-reconciler.js.map +1 -1
  105. package/plugins/specweave/scripts/read-grill-context.sh +149 -0
  106. package/plugins/specweave/skills/code-review/SKILL.md +608 -0
  107. package/plugins/specweave/skills/done/SKILL.md +1 -1
  108. package/plugins/specweave/skills/grill/SKILL.md +91 -0
  109. package/plugins/specweave/skills/performance/SKILL.md +6 -0
  110. package/plugins/specweave/skills/security/SKILL.md +7 -0
  111. package/plugins/specweave/skills/security-patterns/SKILL.md +6 -0
  112. package/plugins/specweave/skills/tdd-orchestrator/SKILL.md +1 -1
  113. package/plugins/specweave/skills/team-build/SKILL.md +1 -1
  114. package/plugins/specweave/skills/team-orchestrate/SKILL.md +1 -1
  115. package/plugins/specweave/skills/tech-lead/SKILL.md +7 -0
  116. package/plugins/specweave-ado/lib/ado-permission-gate.js +18 -2
  117. package/plugins/specweave-ado/lib/ado-permission-gate.ts +19 -2
  118. package/plugins/specweave-frontend/skills/frontend/SKILL.md +138 -2
  119. package/plugins/specweave-frontend/skills/i18n-expert/SKILL.md +989 -0
  120. package/plugins/specweave-github/hooks/github-auto-create-handler.sh +23 -1
  121. package/plugins/specweave-github/lib/github-feature-sync.js +41 -0
  122. package/plugins/specweave-github/lib/github-feature-sync.ts +62 -0
  123. package/plugins/specweave-infrastructure/PLUGIN.md +2 -1
  124. package/plugins/specweave-infrastructure/skills/gcp-deep-dive/SKILL.md +1172 -0
  125. package/plugins/specweave-infrastructure/skills/observability/SKILL.md +6 -0
  126. package/plugins/specweave-infrastructure/skills/opentelemetry/SKILL.md +6 -0
  127. package/plugins/specweave-jira/lib/jira-permission-gate.js +18 -2
  128. package/plugins/specweave-jira/lib/jira-permission-gate.ts +19 -2
  129. package/plugins/specweave-mobile/PLUGIN.md +1 -2
  130. package/plugins/specweave-mobile/README.md +13 -12
  131. package/plugins/specweave-mobile/skills/capacitor-ionic/SKILL.md +4 -18
  132. package/plugins/specweave-mobile/skills/deep-linking-push/SKILL.md +4 -22
  133. package/plugins/specweave-mobile/skills/expo/SKILL.md +4 -24
  134. package/plugins/specweave-mobile/skills/mobile-testing/SKILL.md +4 -22
  135. package/plugins/specweave-mobile/skills/react-native-expert/SKILL.md +404 -47
  136. package/plugins/specweave-testing/PLUGIN.md +3 -11
  137. package/plugins/specweave-testing/lib/playwright-cli-detector.js +8 -3
  138. package/plugins/specweave-testing/lib/playwright-cli-detector.ts +8 -3
  139. package/plugins/specweave-testing/lib/playwright-cli-runner.js +25 -20
  140. package/plugins/specweave-testing/lib/playwright-cli-runner.ts +24 -19
  141. package/plugins/specweave-testing/lib/playwright-routing.js +1 -6
  142. package/plugins/specweave-testing/lib/playwright-routing.ts +11 -8
  143. package/plugins/specweave-testing/skills/accessibility-testing/SKILL.md +998 -0
  144. package/plugins/specweave-testing/skills/e2e-testing/SKILL.md +29 -28
  145. package/plugins/specweave-testing/skills/mutation-testing/SKILL.md +769 -0
  146. package/plugins/specweave-testing/skills/performance-testing/SKILL.md +961 -0
  147. package/plugins/specweave-testing/skills/qa-engineer/SKILL.md +2 -0
  148. package/plugins/specweave/.specweave/logs/decisions.jsonl +0 -12
  149. package/plugins/specweave/.specweave/logs/reflect/reflect.log +0 -8
  150. package/plugins/specweave/.specweave/logs/stop-auto.log +0 -6
  151. package/plugins/specweave/.specweave/logs/stop-sync.log +0 -10
  152. package/plugins/specweave/.specweave/state/dashboard.json +0 -43
  153. package/plugins/specweave/skills/infrastructure/SKILL.md +0 -86
  154. package/plugins/specweave/skills/qa-lead/SKILL.md +0 -77
  155. package/plugins/specweave-mobile/skills/mobile-architect/SKILL.md +0 -30
  156. package/plugins/specweave-testing/commands/e2e-setup.md +0 -1103
  157. package/plugins/specweave-testing/commands/test-coverage.md +0 -983
  158. package/plugins/specweave-testing/commands/test-generate.md +0 -1160
  159. package/plugins/specweave-testing/commands/test-init.md +0 -413
  160. package/plugins/specweave-testing/commands/ui-automate.md +0 -182
  161. package/plugins/specweave-testing/commands/ui-inspect.md +0 -82
@@ -1,21 +1,24 @@
1
- import { execSync } from "child_process";
1
+ import { execFileSync } from "child_process";
2
2
  class PlaywrightCliRunner {
3
3
  constructor(config = {}) {
4
4
  this.config = {
5
5
  headed: config.headed ?? false,
6
6
  browser: config.browser ?? "chrome",
7
- session: config.session,
8
7
  timeout: config.timeout ?? 3e4,
9
- ...config
8
+ session: config.session
10
9
  };
11
10
  }
12
- exec(command) {
13
- const sessionFlag = this.config.session ? `-s=${this.config.session} ` : "";
14
- const fullCommand = `playwright-cli ${sessionFlag}${command}`;
11
+ exec(args) {
12
+ const fullArgs = [];
13
+ if (this.config.session) {
14
+ fullArgs.push(`-s=${this.config.session}`);
15
+ }
16
+ fullArgs.push(...args);
15
17
  try {
16
- const output = execSync(fullCommand, {
18
+ const output = execFileSync("playwright-cli", fullArgs, {
17
19
  encoding: "utf-8",
18
- timeout: this.config.timeout
20
+ timeout: this.config.timeout,
21
+ maxBuffer: 1024 * 1024
19
22
  }).trim();
20
23
  return { ok: true, output };
21
24
  } catch (e) {
@@ -23,34 +26,36 @@ class PlaywrightCliRunner {
23
26
  }
24
27
  }
25
28
  open(url) {
26
- const headedFlag = this.config.headed ? " --headed" : "";
27
- const urlPart = url ? ` ${url}` : "";
28
- return this.exec(`open${urlPart}${headedFlag}`);
29
+ const args = ["open"];
30
+ if (url) args.push(url);
31
+ if (this.config.headed) args.push("--headed");
32
+ return this.exec(args);
29
33
  }
30
34
  navigate(url) {
31
- return this.exec(`goto ${url}`);
35
+ return this.exec(["goto", url]);
32
36
  }
33
37
  snapshot() {
34
- return this.exec("snapshot");
38
+ return this.exec(["snapshot"]);
35
39
  }
36
40
  screenshot(filename) {
37
- const flag = filename ? ` --filename ${filename}` : "";
38
- return this.exec(`screenshot${flag}`);
41
+ const args = ["screenshot"];
42
+ if (filename) args.push("--filename", filename);
43
+ return this.exec(args);
39
44
  }
40
45
  close() {
41
- return this.exec("close");
46
+ return this.exec(["close"]);
42
47
  }
43
48
  click(ref) {
44
- return this.exec(`click ${ref}`);
49
+ return this.exec(["click", ref]);
45
50
  }
46
51
  type(text) {
47
- return this.exec(`type "${text}"`);
52
+ return this.exec(["type", text]);
48
53
  }
49
54
  fill(ref, text) {
50
- return this.exec(`fill ${ref} "${text}"`);
55
+ return this.exec(["fill", ref, text]);
51
56
  }
52
57
  evaluate(fn) {
53
- return this.exec(`eval "${fn}"`);
58
+ return this.exec(["eval", fn]);
54
59
  }
55
60
  }
56
61
  export {
@@ -1,4 +1,4 @@
1
- import { execSync } from 'child_process';
1
+ import { execFileSync } from 'child_process';
2
2
 
3
3
  export interface CliRunnerConfig {
4
4
  headed?: boolean;
@@ -19,19 +19,22 @@ export class PlaywrightCliRunner {
19
19
  this.config = {
20
20
  headed: config.headed ?? false,
21
21
  browser: config.browser ?? 'chrome',
22
- session: config.session,
23
22
  timeout: config.timeout ?? 30_000,
24
- ...config,
23
+ session: config.session,
25
24
  };
26
25
  }
27
26
 
28
- private exec(command: string): CliResult {
29
- const sessionFlag = this.config.session ? `-s=${this.config.session} ` : '';
30
- const fullCommand = `playwright-cli ${sessionFlag}${command}`;
27
+ private exec(args: string[]): CliResult {
28
+ const fullArgs: string[] = [];
29
+ if (this.config.session) {
30
+ fullArgs.push(`-s=${this.config.session}`);
31
+ }
32
+ fullArgs.push(...args);
31
33
  try {
32
- const output = execSync(fullCommand, {
34
+ const output = execFileSync('playwright-cli', fullArgs, {
33
35
  encoding: 'utf-8',
34
36
  timeout: this.config.timeout,
37
+ maxBuffer: 1024 * 1024,
35
38
  }).trim();
36
39
  return { ok: true, output };
37
40
  } catch (e: unknown) {
@@ -40,41 +43,43 @@ export class PlaywrightCliRunner {
40
43
  }
41
44
 
42
45
  open(url?: string): CliResult {
43
- const headedFlag = this.config.headed ? ' --headed' : '';
44
- const urlPart = url ? ` ${url}` : '';
45
- return this.exec(`open${urlPart}${headedFlag}`);
46
+ const args = ['open'];
47
+ if (url) args.push(url);
48
+ if (this.config.headed) args.push('--headed');
49
+ return this.exec(args);
46
50
  }
47
51
 
48
52
  navigate(url: string): CliResult {
49
- return this.exec(`goto ${url}`);
53
+ return this.exec(['goto', url]);
50
54
  }
51
55
 
52
56
  snapshot(): CliResult {
53
- return this.exec('snapshot');
57
+ return this.exec(['snapshot']);
54
58
  }
55
59
 
56
60
  screenshot(filename?: string): CliResult {
57
- const flag = filename ? ` --filename ${filename}` : '';
58
- return this.exec(`screenshot${flag}`);
61
+ const args = ['screenshot'];
62
+ if (filename) args.push('--filename', filename);
63
+ return this.exec(args);
59
64
  }
60
65
 
61
66
  close(): CliResult {
62
- return this.exec('close');
67
+ return this.exec(['close']);
63
68
  }
64
69
 
65
70
  click(ref: string): CliResult {
66
- return this.exec(`click ${ref}`);
71
+ return this.exec(['click', ref]);
67
72
  }
68
73
 
69
74
  type(text: string): CliResult {
70
- return this.exec(`type "${text}"`);
75
+ return this.exec(['type', text]);
71
76
  }
72
77
 
73
78
  fill(ref: string, text: string): CliResult {
74
- return this.exec(`fill ${ref} "${text}"`);
79
+ return this.exec(['fill', ref, text]);
75
80
  }
76
81
 
77
82
  evaluate(fn: string): CliResult {
78
- return this.exec(`eval "${fn}"`);
83
+ return this.exec(['eval', fn]);
79
84
  }
80
85
  }
@@ -1,15 +1,10 @@
1
1
  import { detectPlaywrightCli } from "./playwright-cli-detector.js";
2
- const MCP_PREFERRED_TASKS = /* @__PURE__ */ new Set([
3
- "ui-inspect",
4
- "page-exploration",
5
- "self-healing-test"
6
- ]);
7
2
  function resolvePlaywrightMode(task, config = {}) {
8
3
  const { preferCli = true } = config;
9
4
  if (!preferCli) return "mcp";
10
5
  const detection = detectPlaywrightCli({ useCache: true });
11
6
  if (!detection.installed) return "mcp";
12
- return MCP_PREFERRED_TASKS.has(task) ? "mcp" : "cli";
7
+ return "cli";
13
8
  }
14
9
  export {
15
10
  resolvePlaywrightMode
@@ -13,26 +13,29 @@ export type TaskType =
13
13
  | 'self-healing-test';
14
14
 
15
15
  export interface RoutingConfig {
16
+ /** @deprecated CLI is now the only mode. MCP plugin removed from auto-install (0198). */
16
17
  preferCli?: boolean;
17
18
  }
18
19
 
19
- /** Tasks that benefit from MCP's rich DOM introspection */
20
- const MCP_PREFERRED_TASKS: ReadonlySet<TaskType> = new Set([
21
- 'ui-inspect',
22
- 'page-exploration',
23
- 'self-healing-test',
24
- ]);
25
-
20
+ /**
21
+ * Resolve Playwright mode for a given task.
22
+ *
23
+ * v1.0.240 (0198): CLI-only mode. All tasks route to CLI.
24
+ * MCP fallback only when CLI is not installed (graceful degradation).
25
+ * Users who want Playwright MCP can install it manually.
26
+ */
26
27
  export function resolvePlaywrightMode(
27
28
  task: TaskType,
28
29
  config: RoutingConfig = {},
29
30
  ): PlaywrightMode {
30
31
  const { preferCli = true } = config;
31
32
 
33
+ // Config override: allow forcing MCP if user explicitly installed Playwright MCP
32
34
  if (!preferCli) return 'mcp';
33
35
 
34
36
  const detection = detectPlaywrightCli({ useCache: true });
35
37
  if (!detection.installed) return 'mcp';
36
38
 
37
- return MCP_PREFERRED_TASKS.has(task) ? 'mcp' : 'cli';
39
+ // All tasks route to CLI — no MCP-preferred tasks
40
+ return 'cli';
38
41
  }