synapse-hub 2.4.3 → 2.6.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 (184) hide show
  1. package/.agents/agents/failure-analyst.md +13 -0
  2. package/.agents/agents/orchestrator.md +5 -2
  3. package/.agents/agents/pom-crafter.md +13 -0
  4. package/.agents/agents/quality-gatekeeper.md +21 -2
  5. package/.agents/agents/test-runner.md +11 -0
  6. package/.agents/rules/context-engineering.md +22 -102
  7. package/.agents/rules/mobile_appium_rules.md +19 -115
  8. package/.agents/rules/performance_testing_rules.md +18 -62
  9. package/.agents/rules/skill-precedence.md +24 -24
  10. package/.agents/rules/systematic-debugging.md +10 -27
  11. package/.agents/skills/lean-code-ladder/SKILL.md +12 -1
  12. package/.agents/skills/lean-impact-scoreboard/SKILL.md +48 -0
  13. package/.agents/skills/lean-impact-scoreboard/examples/sample_benchmark_gain.md +20 -0
  14. package/.agents/skills/lean-impact-scoreboard/examples/sample_scoreboard.md +15 -0
  15. package/.agents/skills/repo-quality-audit/SKILL.md +68 -0
  16. package/.agents/skills/repo-quality-audit/examples/sample_audit_walkthrough.md +15 -0
  17. package/.agents/skills/repo-quality-audit/examples/sample_repo_audit.md +33 -0
  18. package/.agents/skills/senior-code-review/SKILL.md +90 -0
  19. package/.agents/skills/senior-code-review/examples/sample_review_walkthrough.md +29 -0
  20. package/.agents/skills/technical-debt-harvester/SKILL.md +70 -0
  21. package/.agents/skills/technical-debt-harvester/examples/sample_debt_ledger.md +25 -0
  22. package/.agents/skills/technical-debt-harvester/examples/sample_ledger_output.md +20 -0
  23. package/.agents/skills/token-and-context-optimizer/references/context_engineering_guide.md +49 -0
  24. package/.cursor/rules/synapse-qa.mdc +4 -3
  25. package/.cursorrules +1 -0
  26. package/.windsurfrules +1 -0
  27. package/AGENTS.md +57 -180
  28. package/CLAUDE.md +5 -0
  29. package/NOTICE +40 -4
  30. package/README.en.md +33 -13
  31. package/README.md +36 -16
  32. package/bin/agent-qa.js +3 -2
  33. package/docs/ARCHITECTURE.md +39 -11
  34. package/docs/CLI_REFERENCE.md +15 -1
  35. package/docs/adopted-ecosystem-tools.md +9 -0
  36. package/docs/research/agent_skill_training_analysis.md +1357 -0
  37. package/package.json +1 -3
  38. package/skills_manifest.json +39 -3
  39. package/synapse.config.json +3 -2
  40. package/templates/ai_bridges/CLAUDE.md +5 -0
  41. package/templates/ai_bridges/copilot-instructions.md +2 -0
  42. package/templates/ai_bridges/cursor_synapse_qa.mdc +4 -3
  43. package/templates/ai_bridges/windsurfrules +1 -0
  44. package/templates/welcome.html.tmpl +34 -25
  45. package/tools/.infer_baseline.json +7 -1079
  46. package/tools/TOOLS_RUNBOOK.md +182 -13
  47. package/tools/__init__.py +1 -1
  48. package/tools/agent_canary.py +4 -4
  49. package/tools/analyze_project.py +2 -2
  50. package/tools/api_fuzzer.py +4 -4
  51. package/tools/auto_heal.py +14 -2
  52. package/tools/auto_heal_reflexion.py +172 -0
  53. package/tools/browser_helpers.js +57 -2
  54. package/tools/bump_version.py +30 -2
  55. package/tools/cache_resolver.py +6 -6
  56. package/tools/check_env.py +13 -7
  57. package/tools/cli.py +265 -197
  58. package/tools/count_tokens.py +7 -7
  59. package/tools/dashboard_generator.py +39 -23
  60. package/tools/db_sandbox.py +5 -5
  61. package/tools/debt_harvester.py +236 -0
  62. package/tools/distill_log.py +2 -2
  63. package/tools/dspy_qa_signatures.py +357 -0
  64. package/tools/flaky_detector.py +5 -5
  65. package/tools/generate_tc_from_story.py +2 -2
  66. package/tools/generate_test_reports.py +4 -4
  67. package/tools/git_pre_commit_guard.py +6 -6
  68. package/tools/infer_linter.py +12 -7
  69. package/tools/interview_story.py +117 -0
  70. package/tools/lint_ai_docs.py +3 -3
  71. package/tools/matrix_sharder.py +4 -4
  72. package/tools/mcp_excel_server.py +1 -1
  73. package/tools/mcp_server.py +3 -3
  74. package/tools/micro_mutator.py +6 -6
  75. package/tools/omni_transpiler.py +2 -2
  76. package/tools/output_formatter.py +37 -2
  77. package/tools/pinpoint_failure.py +4 -1
  78. package/tools/repo_map.py +2 -2
  79. package/tools/reversible_sandbox.py +157 -0
  80. package/tools/safety_firewall.py +30 -2
  81. package/tools/senior_code_review.py +341 -0
  82. package/tools/setup_project.py +9 -9
  83. package/tools/skill_collision_guard.py +231 -0
  84. package/tools/skill_vault.py +343 -0
  85. package/tools/skillspector.py +2 -2
  86. package/tools/synapse_qa_bench.py +190 -0
  87. package/tools/sync_agent_rules.py +14 -3
  88. package/tools/test_impact.py +4 -4
  89. package/tools/textgrad_mutation_optimizer.py +234 -0
  90. package/tools/tms_sync_bridge.py +2 -2
  91. package/tools/update_sentinel.py +17 -17
  92. package/tools/verify_all.py +47 -16
  93. package/tools/visual_som_helper.py +8 -8
  94. package/tools/watch_mode.py +7 -8
  95. package/tools/wcag_audit.py +5 -1
  96. package/tools/welcome_page.py +12 -12
  97. package/benchmarks/qa_eval/README.md +0 -71
  98. package/benchmarks/qa_eval/build_dataset.py +0 -677
  99. package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-06_api_contract_drift.json +0 -22
  100. package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-07_api_contract_drift.json +0 -22
  101. package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-08_api_contract_drift.json +0 -22
  102. package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-09_api_contract_drift.json +0 -22
  103. package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-10_api_contract_drift.json +0 -22
  104. package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-21_fake_pass_tautology.json +0 -21
  105. package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-22_fake_pass_tautology.json +0 -21
  106. package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-23_fake_pass_tautology.json +0 -21
  107. package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-24_fake_pass_tautology.json +0 -21
  108. package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-25_fake_pass_tautology.json +0 -21
  109. package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-01_locator_drift.json +0 -23
  110. package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-02_locator_drift.json +0 -23
  111. package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-03_locator_drift.json +0 -23
  112. package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-04_locator_drift.json +0 -23
  113. package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-05_locator_drift.json +0 -23
  114. package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-16_stale_and_mutation.json +0 -22
  115. package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-17_stale_and_mutation.json +0 -22
  116. package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-18_stale_and_mutation.json +0 -22
  117. package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-19_stale_and_mutation.json +0 -22
  118. package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-20_stale_and_mutation.json +0 -23
  119. package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-11_timing_and_race.json +0 -22
  120. package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-12_timing_and_race.json +0 -22
  121. package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-13_timing_and_race.json +0 -22
  122. package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-14_timing_and_race.json +0 -22
  123. package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-15_timing_and_race.json +0 -22
  124. package/benchmarks/qa_eval/eval_runner.py +0 -418
  125. package/examples/cypress-ecommerce-suite/README.md +0 -45
  126. package/examples/cypress-ecommerce-suite/cypress/e2e/checkout.cy.js +0 -17
  127. package/examples/cypress-ecommerce-suite/cypress/pages/BasePage.js +0 -29
  128. package/examples/cypress-ecommerce-suite/cypress/pages/CartPage.js +0 -51
  129. package/examples/cypress-ecommerce-suite/cypress.config.js +0 -13
  130. package/examples/cypress-ecommerce-suite/package.json +0 -13
  131. package/examples/katalon-suite/Keywords/pages/BasePage.groovy +0 -19
  132. package/examples/katalon-suite/Keywords/pages/DashboardPage.groovy +0 -29
  133. package/examples/katalon-suite/Keywords/pages/LoginPage.groovy +0 -45
  134. package/examples/katalon-suite/Profiles/default.glbl +0 -12
  135. package/examples/katalon-suite/README.md +0 -18
  136. package/examples/katalon-suite/Scripts/Auth/TC_LoginSuccess/Script1234567890.groovy +0 -12
  137. package/examples/katalon-suite/Scripts/Dashboard/TC_ViewSummary/Script1234567891.groovy +0 -15
  138. package/examples/katalon-suite/katalon_suite.prj +0 -21
  139. package/examples/playwright-crm-suite/README.md +0 -40
  140. package/examples/playwright-crm-suite/package.json +0 -14
  141. package/examples/playwright-crm-suite/pages/BasePage.ts +0 -37
  142. package/examples/playwright-crm-suite/pages/CustomerPage.ts +0 -57
  143. package/examples/playwright-crm-suite/pages/LoginPage.ts +0 -32
  144. package/examples/playwright-crm-suite/playwright.config.ts +0 -27
  145. package/examples/playwright-crm-suite/tests/auth.spec.ts +0 -22
  146. package/examples/playwright-crm-suite/tests/customers.spec.ts +0 -33
  147. package/examples/plugins/sample-custom-plugin/README.md +0 -14
  148. package/examples/plugins/sample-custom-plugin/plugin.json +0 -16
  149. package/examples/plugins/sample-custom-plugin/skills/custom-security-headers-audit/SKILL.md +0 -29
  150. package/examples/plugins/sample-custom-plugin/skills/custom-security-headers-audit/examples/audit_fixture.json +0 -8
  151. package/examples/plugins/sample-custom-plugin/tools/custom_security_headers.py +0 -125
  152. package/examples/practices/README.md +0 -22
  153. package/examples/practices/requirements/crm/requirements_contracts.md +0 -292
  154. package/examples/practices/requirements/crm/requirements_customers.md +0 -462
  155. package/examples/practices/requirements/crm/requirements_login.md +0 -202
  156. package/examples/practices/requirements/crm/requirements_projects.md +0 -396
  157. package/examples/practices/requirements/crm/requirements_tasks.md +0 -343
  158. package/examples/practices/requirements/ecommerce/requirements_category_brand.txt +0 -402
  159. package/examples/practices/requirements/jira/KAN-5/KAN-1/2026-04-03_04-28-27.png +0 -0
  160. package/examples/practices/requirements/jira/KAN-5/KAN-1/KAN-1_requirement.md +0 -52
  161. package/examples/practices/requirements/jira/KAN-5/KAN-4/2026-04-03_04-28-19.png +0 -0
  162. package/examples/practices/requirements/jira/KAN-5/KAN-4/2026-04-03_04-28-57.png +0 -0
  163. package/examples/practices/requirements/jira/KAN-5/KAN-4/KAN-4_requirement.md +0 -119
  164. package/examples/practices/requirements/jira/KAN-5/KAN-5_overview.md +0 -9
  165. package/examples/practices/requirements/jira/KAN-5/KAN-6/2026-04-03_05-58-08.png +0 -0
  166. package/examples/practices/requirements/jira/KAN-5/KAN-6/2026-04-03_05-58-23.png +0 -0
  167. package/examples/practices/requirements/jira/KAN-5/KAN-6/KAN-6_requirement.md +0 -32
  168. package/examples/practices/testcases/api/book_management_api_test_cases.md +0 -144
  169. package/examples/practices/testcases/api/user_management_api_test_cases.md +0 -139
  170. package/examples/practices/testcases/crm/test_cases_crm_login.md +0 -148
  171. package/examples/practices/testcases/crm/test_cases_customers.md +0 -156
  172. package/examples/pytest-api-suite/README.md +0 -45
  173. package/examples/pytest-api-suite/conftest.py +0 -31
  174. package/examples/pytest-api-suite/pages/user_api_client.py +0 -36
  175. package/examples/pytest-api-suite/requirements.txt +0 -2
  176. package/examples/pytest-api-suite/tests/test_user_api.py +0 -44
  177. package/examples/selenium-suite/README.md +0 -18
  178. package/examples/selenium-suite/pages/base_page.py +0 -27
  179. package/examples/selenium-suite/pages/login_page.py +0 -29
  180. package/examples/selenium-suite/pages/order_page.py +0 -25
  181. package/examples/selenium-suite/pytest.ini +0 -6
  182. package/examples/selenium-suite/requirements.txt +0 -2
  183. package/examples/selenium-suite/tests/test_login.py +0 -10
  184. package/examples/selenium-suite/tests/test_order.py +0 -10
@@ -17,7 +17,7 @@ Features:
17
17
  - Interactive tabs covering the 4 Core Pillars of QA Intelligence.
18
18
  - Interactive CLI Cheatsheet with 1-click clipboard copy.
19
19
  - Comparison matrix vs existing industry tools (ESLint, Stryker, Allure, Healenium).
20
- - 6 Subagent Swarm Profiles & 9 Quality Gates DoD showcase.
20
+ - 6 Subagent Swarm Profiles & 10 Quality Gates DoD showcase.
21
21
  - Automatic browser launching on setup, pull, or CLI dispatch.
22
22
  """
23
23
 
@@ -48,8 +48,8 @@ def get_hub_metadata() -> Dict[str, Any]:
48
48
  """Retrieves version and catalog count from skills_manifest.json."""
49
49
  manifest_path = os.path.join(HUB_ROOT, "skills_manifest.json")
50
50
  meta = {
51
- "version": "2.4.3",
52
- "totalSkills": 38,
51
+ "version": "2.6.0",
52
+ "totalSkills": 42,
53
53
  "author": "Thế Vị (@TeeVee998)",
54
54
  "repo": "https://github.com/TeeVee998/Synapse-Hub"
55
55
  }
@@ -60,7 +60,7 @@ def get_hub_metadata() -> Dict[str, Any]:
60
60
  meta["version"] = data.get("version", meta["version"])
61
61
  meta["totalSkills"] = data.get("totalSkills", meta["totalSkills"])
62
62
  except (OSError, json.JSONDecodeError):
63
- pass
63
+ return meta
64
64
  return meta
65
65
 
66
66
 
@@ -108,7 +108,7 @@ def generate_welcome_html(target_repo: Optional[str] = None, stack_info: Optiona
108
108
  template_str = tf.read()
109
109
  break
110
110
  except OSError:
111
- pass
111
+ continue
112
112
 
113
113
  if not template_str:
114
114
  return f"""<!DOCTYPE html>
@@ -116,7 +116,7 @@ def generate_welcome_html(target_repo: Optional[str] = None, stack_info: Optiona
116
116
  <body style="font-family:sans-serif;background:#0f172a;color:#f8fafc;padding:40px;text-align:center;">
117
117
  <h1>🛡️ Synapse Hub Enterprise QA v{meta.get('version', '2.4.0')}</h1>
118
118
  <p>{hero_pill_content}</p>
119
- <p>Total Standardized Skills: {meta.get('totalSkills', 38)}</p>
119
+ <p>Total Standardized Skills: {meta.get('totalSkills', 42)}</p>
120
120
  <p>Author: {meta.get('author', 'Thế Vị (@TeeVee998)')}</p>
121
121
  </body></html>"""
122
122
 
@@ -126,7 +126,7 @@ def generate_welcome_html(target_repo: Optional[str] = None, stack_info: Optiona
126
126
  .replace("__NOW_STR__", now_str)
127
127
  .replace("__VERSION__", str(meta.get("version", "2.4.0")))
128
128
  .replace("__AUTHOR__", str(meta.get("author", "Thế Vị (@TeeVee998)")))
129
- .replace("__TOTAL_SKILLS__", str(meta.get("totalSkills", 38)))
129
+ .replace("__TOTAL_SKILLS__", str(meta.get("totalSkills", 42)))
130
130
  .replace("__REPO__", str(meta.get("repo", "https://github.com/TeeVee998/Synapse-Hub")))
131
131
  )
132
132
  return rendered_html
@@ -175,7 +175,7 @@ def is_first_run(target_repo: Optional[str] = None) -> bool:
175
175
  if key in data:
176
176
  return False
177
177
  except (OSError, json.JSONDecodeError):
178
- pass
178
+ return True
179
179
 
180
180
  return True
181
181
 
@@ -192,8 +192,8 @@ def mark_first_run_completed(target_repo: Optional[str] = None):
192
192
  "shown_at": datetime.now().isoformat(),
193
193
  "repo": os.path.realpath(target_repo or HUB_ROOT)
194
194
  }, f, indent=2)
195
- except OSError:
196
- pass
195
+ except OSError as err:
196
+ sys.stderr.write(f"[WARN] Failed to write local marker: {err}\n")
197
197
 
198
198
  try:
199
199
  global_dir = os.path.expanduser("~/.agent_memory")
@@ -210,8 +210,8 @@ def mark_first_run_completed(target_repo: Optional[str] = None):
210
210
  data[key] = datetime.now().isoformat()
211
211
  with open(global_marker, "w", encoding="utf-8") as f:
212
212
  json.dump(data, f, indent=2)
213
- except OSError:
214
- pass
213
+ except OSError as err:
214
+ sys.stderr.write(f"[WARN] Failed to write global marker: {err}\n")
215
215
 
216
216
 
217
217
  def open_welcome_page(file_path: str) -> bool:
@@ -1,71 +0,0 @@
1
- # QA Agent Heuristic Regression Benchmark (25 Challenge Vectors)
2
-
3
- > **Synthetic Regression Harness for Deterministic Test-Healing Engines & Quality Sentinels**
4
- > Verifies self-healing locator cascades, API contract drift heuristics, timing barriers, and AST mutation sensitivity across 25 curated production failure vectors without calling external cloud LLMs.
5
-
6
- ---
7
-
8
- ## 1. Scope & Design Philosophy
9
-
10
- When building autonomous testing sentinels, rule patterns and heuristics must be rigorously guarded against regressions.
11
-
12
- This Benchmark Suite serves as a **deterministic, offline regression test harness** that validates:
13
- 1. **Heuristic Recovery Rate (%):** Verification that the hub's rule cascades correctly resolve known failure vectors.
14
- 2. **Harness Latency (MTTR):** Local rule evaluation latency in seconds (< 0.1s offline).
15
- 3. **AST Mutation Sensitivity:** Verification that assertion sensitivity catches injected syntactic mutants ($\ge 80\%$).
16
- 4. **Action Safety Firewall:** Assurance that suggested remedies comply with non-destructive action policies (`safety_firewall.py`).
17
-
18
- > ⚠️ **Important Methodology Note:**
19
- > This harness is an **internal synthetic benchmark**, not an end-to-end evaluation of live multi-turn LLM agents against cloud APIs. Challenges evaluate deterministic rule-based and heuristic matchers (`heuristic_locator_matcher.py`, `micro_mutator.py`, `safety_firewall.py`). Token counts are character-density heuristics and MTTR represents local processor execution time. Live agent benchmarking with multi-turn API telemetry is planned for future releases.
20
-
21
- ---
22
-
23
- ## 2. Failure Domains & Challenge Taxonomy
24
-
25
- The benchmark consists of 25 curated challenge vectors across 5 categories:
26
-
27
- | Domain | Challenges | Scenarios Covered |
28
- | :--- | :---: | :--- |
29
- | **`locator_drift`** | 5 | Dynamic CSS-in-JS hashes, nested Shadow DOM piercing, CTA text changes, `id` removal, `<a>` to `<button>` ARIA transformation. |
30
- | **`api_contract_drift`** | 5 | Integer to String type mutation, response field rename, nested object flattening, status code shifts (200 $\rightarrow$ 201), Bearer auth headers. |
31
- | **`timing_and_race`** | 5 | 3.5s network throttling, PrimeNG modal backdrop fading intercept, debounced search race, async SVG charts, infinite scroll lazy chunking. |
32
- | **`stale_and_mutation`** | 5 | WebSocket live ticker table re-renders, tab switch DOM detachments, table pagination stale indices, modal re-instantiation, i18n locale swaps. |
33
- | **`fake_pass_tautology`** | 5 | Swallowed HTTP 500 in empty catch blocks, zero-assertion smoke tests, tautological `assert true == true`, unawaited async assertions, unbounded relational checks. |
34
-
35
- ---
36
-
37
- ## 3. Running the Benchmark
38
-
39
- ### Run Complete Suite (All 25 Challenges):
40
- ```bash
41
- python benchmarks/qa_eval/eval_runner.py
42
- ```
43
-
44
- ### Run by Specific Category:
45
- ```bash
46
- # Evaluate only locator drift challenges
47
- python benchmarks/qa_eval/eval_runner.py --category locator_drift
48
-
49
- # Evaluate only API contract drift challenges
50
- python benchmarks/qa_eval/eval_runner.py --category api_contract_drift
51
-
52
- # Evaluate only timing and race conditions
53
- python benchmarks/qa_eval/eval_runner.py --category timing_and_race
54
- ```
55
-
56
- ### Output Formats:
57
- - **Terminal Summary:** Colorized table with resolution status, latency, and heuristic token footprints.
58
- - **Markdown Report:** Formatted executive report at `benchmarks/qa_eval/reports/BENCHMARK_REPORT.md`.
59
- - **JSON Telemetry:** Machine-readable metrics at `benchmarks/qa_eval/reports/eval_results.json`.
60
-
61
- ---
62
-
63
- ## 4. Current Harness Telemetry
64
-
65
- | Benchmark Metric | Harness Result | Validation Mechanism |
66
- | :--- | :---: | :--- |
67
- | **Deterministic Rule Resolution** | **100% (25/25)** | Verified via heuristic cascade & dataset expectations |
68
- | **Harness Evaluation MTTR** | **< 0.1s** | Local Python runtime execution |
69
- | **Heuristic Token Footprint** | **~75 tokens / vector** | Lexical character-to-token compression ratio |
70
- | **Mutation Score Gate** | **$\ge 80\%$** | Verified via `micro_mutator.py` |
71
- | **Action Safety Clearance** | **100% (Pass)** | Verified via `safety_firewall.py` non-destructive policy |