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
@@ -418,7 +418,29 @@ if [[ -f "$META_PATH" ]]; then
418
418
 
419
419
  if [[ -n "$UPDATED_META" ]]; then
420
420
  echo "$UPDATED_META" > "$META_PATH" 2>/dev/null
421
- log "Updated metadata.json with GitHub issue links"
421
+ log "Updated metadata.json with GitHub issue links (externalLinks format)"
422
+
423
+ # v1.0.240 FIX: Also write OLD format (metadata.github.issues[]) for reconciler compatibility
424
+ # The reconciler and closure flows read metadata.github.issues[], not externalLinks
425
+ OLD_FORMAT_JSON=$(echo "$CREATED_JSON" | jq '[to_entries[] | select(.value.issueNumber != null) | {
426
+ userStory: .key,
427
+ number: .value.issueNumber,
428
+ url: .value.issueUrl,
429
+ createdAt: (now | strftime("%Y-%m-%dT%H:%M:%SZ"))
430
+ }]' 2>/dev/null)
431
+
432
+ if [[ -n "$OLD_FORMAT_JSON" ]] && [[ "$OLD_FORMAT_JSON" != "[]" ]]; then
433
+ UPDATED_META_V2=$(jq --argjson old_issues "$OLD_FORMAT_JSON" '
434
+ if .github == null then .github = {} else . end |
435
+ .github.issues = ((.github.issues // []) + $old_issues | unique_by(.userStory)) |
436
+ .github.lastSync = (now | strftime("%Y-%m-%dT%H:%M:%SZ"))
437
+ ' "$META_PATH" 2>/dev/null)
438
+
439
+ if [[ -n "$UPDATED_META_V2" ]]; then
440
+ echo "$UPDATED_META_V2" > "$META_PATH" 2>/dev/null
441
+ log "Also backfilled old-format github.issues[] for reconciler"
442
+ fi
443
+ fi
422
444
  fi
423
445
  fi
424
446
 
@@ -137,6 +137,7 @@ const _GitHubFeatureSync = class _GitHubFeatureSync {
137
137
  console.log(` \u{1F6E1}\uFE0F Duplicates detected: ${result.duplicatesFound}, auto-closed: ${result.duplicatesClosed}`);
138
138
  }
139
139
  await this.updateUserStoryFrontmatter(userStory.filePath, issueNumber);
140
+ await this.backfillIncrementMetadata(featureId, userStory.id, issueNumber);
140
141
  await this.updateUserStoryIssue(issueNumber, issueContent, userStory.filePath);
141
142
  if (result.wasReused) {
142
143
  issuesUpdated++;
@@ -176,6 +177,46 @@ const _GitHubFeatureSync = class _GitHubFeatureSync {
176
177
  }
177
178
  return null;
178
179
  }
180
+ /**
181
+ * Backfill increment metadata.json with GitHub issue reference (v1.0.240)
182
+ *
183
+ * Writes in the old format (metadata.github.issues[]) that the reconciler
184
+ * and closure flows expect. Non-blocking — errors are logged but don't halt sync.
185
+ */
186
+ async backfillIncrementMetadata(featureId, userStoryId, issueNumber) {
187
+ try {
188
+ const featureNumMatch = featureId.match(/FS-0*(\d+)E?/i);
189
+ if (!featureNumMatch) return;
190
+ const num = parseInt(featureNumMatch[1], 10);
191
+ const paddedNum = String(num).padStart(4, "0");
192
+ const incrementsDir = path.join(this.projectRoot, ".specweave/increments");
193
+ if (!existsSync(incrementsDir)) return;
194
+ const entries = await readdir(incrementsDir);
195
+ const match = entries.find((e) => e.startsWith(paddedNum + "-"));
196
+ if (!match) return;
197
+ const metadataPath = path.join(incrementsDir, match, "metadata.json");
198
+ if (!existsSync(metadataPath)) return;
199
+ const metadata = JSON.parse(await readFile(metadataPath, "utf-8"));
200
+ if (!metadata.github) metadata.github = {};
201
+ if (!metadata.github.issues) metadata.github.issues = [];
202
+ const exists = metadata.github.issues.some(
203
+ (i) => i.userStory === userStoryId
204
+ );
205
+ if (!exists) {
206
+ metadata.github.issues.push({
207
+ userStory: userStoryId,
208
+ number: issueNumber,
209
+ url: `https://github.com/${this.client.getOwner()}/${this.client.getRepo()}/issues/${issueNumber}`,
210
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
211
+ });
212
+ metadata.github.lastSync = (/* @__PURE__ */ new Date()).toISOString();
213
+ await writeFile(metadataPath, JSON.stringify(metadata, null, 2) + "\n", "utf-8");
214
+ console.log(` \u{1F4DD} Backfilled metadata.json for ${userStoryId}`);
215
+ }
216
+ } catch (error) {
217
+ console.warn(` \u26A0\uFE0F Metadata backfill failed: ${error.message}`);
218
+ }
219
+ }
179
220
  /**
180
221
  * Parse FEATURE.md frontmatter
181
222
  */
@@ -255,6 +255,11 @@ export class GitHubFeatureSync {
255
255
  // Update User Story frontmatter with issue link
256
256
  await this.updateUserStoryFrontmatter(userStory.filePath, issueNumber);
257
257
 
258
+ // v1.0.240 FIX: Backfill increment metadata.json for reconciler compatibility
259
+ // Previously only US frontmatter was updated, leaving metadata.json empty.
260
+ // This caused reconciler and closure flows to miss these issues.
261
+ await this.backfillIncrementMetadata(featureId, userStory.id, issueNumber);
262
+
258
263
  // ✅ CRITICAL FIX (2025-11-24): Check completion for ALL issues (new AND reused)
259
264
  // BUG: Previously only checked completion for reused issues, not new ones
260
265
  // RESULT: New issues stayed OPEN even if status:complete
@@ -313,6 +318,63 @@ export class GitHubFeatureSync {
313
318
  return null;
314
319
  }
315
320
 
321
+ /**
322
+ * Backfill increment metadata.json with GitHub issue reference (v1.0.240)
323
+ *
324
+ * Writes in the old format (metadata.github.issues[]) that the reconciler
325
+ * and closure flows expect. Non-blocking — errors are logged but don't halt sync.
326
+ */
327
+ private async backfillIncrementMetadata(
328
+ featureId: string,
329
+ userStoryId: string,
330
+ issueNumber: number
331
+ ): Promise<void> {
332
+ try {
333
+ // Derive increment ID from feature ID (reverse of deriveFeatureId)
334
+ const featureNumMatch = featureId.match(/FS-0*(\d+)E?/i);
335
+ if (!featureNumMatch) return;
336
+
337
+ const num = parseInt(featureNumMatch[1], 10);
338
+ const paddedNum = String(num).padStart(4, '0');
339
+
340
+ // Find the increment directory
341
+ const incrementsDir = path.join(this.projectRoot, '.specweave/increments');
342
+ if (!existsSync(incrementsDir)) return;
343
+
344
+ const entries = await readdir(incrementsDir);
345
+ const match = entries.find(e => e.startsWith(paddedNum + '-'));
346
+ if (!match) return;
347
+
348
+ const metadataPath = path.join(incrementsDir, match, 'metadata.json');
349
+ if (!existsSync(metadataPath)) return;
350
+
351
+ const metadata = JSON.parse(await readFile(metadataPath, 'utf-8'));
352
+
353
+ // Write in OLD format for reconciler compatibility
354
+ if (!metadata.github) metadata.github = {};
355
+ if (!metadata.github.issues) metadata.github.issues = [];
356
+
357
+ const exists = metadata.github.issues.some(
358
+ (i: { userStory: string }) => i.userStory === userStoryId
359
+ );
360
+
361
+ if (!exists) {
362
+ metadata.github.issues.push({
363
+ userStory: userStoryId,
364
+ number: issueNumber,
365
+ url: `https://github.com/${this.client.getOwner()}/${this.client.getRepo()}/issues/${issueNumber}`,
366
+ createdAt: new Date().toISOString(),
367
+ });
368
+ metadata.github.lastSync = new Date().toISOString();
369
+ await writeFile(metadataPath, JSON.stringify(metadata, null, 2) + '\n', 'utf-8');
370
+ console.log(` 📝 Backfilled metadata.json for ${userStoryId}`);
371
+ }
372
+ } catch (error) {
373
+ // Non-blocking
374
+ console.warn(` ⚠️ Metadata backfill failed: ${(error as Error).message}`);
375
+ }
376
+ }
377
+
316
378
  /**
317
379
  * Parse FEATURE.md frontmatter
318
380
  */
@@ -6,7 +6,7 @@
6
6
 
7
7
  ## Description
8
8
 
9
- Comprehensive infrastructure, DevOps, and cloud platform expertise. Covers Terraform/OpenTofu, OpenTelemetry, GitHub Actions, DevSecOps, secret management, Azure (Bicep/AKS), and AWS (CDK/EKS/Lambda).
9
+ Comprehensive infrastructure, DevOps, and cloud platform expertise. Covers Terraform/OpenTofu, OpenTelemetry, GitHub Actions, DevSecOps, secret management, Azure (Bicep/AKS), AWS (CDK/EKS/Lambda), and GCP (GKE/Cloud Run/BigQuery).
10
10
 
11
11
  ## Skills
12
12
 
@@ -21,6 +21,7 @@ Comprehensive infrastructure, DevOps, and cloud platform expertise. Covers Terra
21
21
  | secret-management | Secret management with Vault, External Secrets Operator, SOPS, and cloud KMS |
22
22
  | azure-bicep-aks | Azure Bicep IaC and AKS cluster management with Managed Identity and Container Apps |
23
23
  | aws-deep-dive | AWS CDK, EKS, Lambda, VPC design, IAM least-privilege, and serverless patterns |
24
+ | gcp-deep-dive | GCP GKE, Cloud Run, Cloud Functions, VPC design, IAM, BigQuery, and Cloud Build CI/CD |
24
25
 
25
26
  ## Installation
26
27