synapse-hub 2.2.4 → 2.4.1

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 (312) hide show
  1. package/.agents/agents/failure-analyst.md +11 -0
  2. package/.agents/agents/live-explorer.md +28 -0
  3. package/.agents/agents/orchestrator.md +23 -4
  4. package/.agents/agents/pom-crafter.md +15 -0
  5. package/.agents/agents/quality-gatekeeper.md +20 -4
  6. package/.agents/agents/test-runner.md +12 -0
  7. package/.agents/rules/communication-style.md +40 -0
  8. package/.agents/rules/context-engineering.md +23 -0
  9. package/.agents/rules/git-push-protocol.md +10 -16
  10. package/.agents/rules/graphify.md +14 -14
  11. package/.agents/rules/mandatory-playwright-live.md +29 -29
  12. package/.agents/rules/mobile_appium_rules.md +132 -0
  13. package/.agents/rules/performance_testing_rules.md +74 -0
  14. package/.agents/rules/systematic-debugging.md +6 -6
  15. package/.agents/skills/agent-orchestration-multi-agent-optimize/SKILL.md +64 -215
  16. package/.agents/skills/agent-orchestration-multi-agent-optimize/examples/swarm_workload_config.json +12 -0
  17. package/.agents/skills/antigravity-test-sentinel/SKILL.md +3 -3
  18. package/.agents/skills/antigravity-test-sentinel/examples/dod_gate_policy.json +11 -0
  19. package/.agents/skills/api-network-mocking-interception/SKILL.md +1 -1
  20. package/.agents/skills/api-network-mocking-interception/examples/network_route_stub.json +9 -0
  21. package/.agents/skills/api-spec-to-e2e-matrix/SKILL.md +9 -9
  22. package/.agents/skills/api-spec-to-e2e-matrix/examples/sample_openapi.json +19 -0
  23. package/.agents/skills/architecture-decision-records/SKILL.md +35 -412
  24. package/.agents/skills/architecture-decision-records/examples/0001-record-architecture-decisions.md +12 -0
  25. package/.agents/skills/auth-session-and-cookie-manager/SKILL.md +1 -1
  26. package/.agents/skills/auth-session-and-cookie-manager/examples/storage_state_sample.json +11 -0
  27. package/.agents/skills/backend-load-and-stress-patterns/SKILL.md +80 -186
  28. package/.agents/skills/backend-load-and-stress-patterns/examples/k6_load_test_sample.js +13 -0
  29. package/.agents/skills/bats-testing-patterns/SKILL.md +1 -1
  30. package/.agents/skills/bats-testing-patterns/examples/cli_runner_test.bats +6 -0
  31. package/.agents/skills/bats-testing-patterns/resources/implementation-playbook.md +614 -614
  32. package/.agents/skills/clean-pom-crafter/SKILL.md +21 -3
  33. package/.agents/skills/clean-pom-crafter/examples/standard_test_case.groovy +28 -28
  34. package/.agents/skills/clean-pom-crafter/references/pom_patterns.groovy +138 -138
  35. package/.agents/skills/code-refactoring-refactor-clean/SKILL.md +2 -2
  36. package/.agents/skills/code-refactoring-refactor-clean/examples/refactored_page_sample.groovy +9 -0
  37. package/.agents/skills/db-state-verifier-and-seeder/SKILL.md +5 -5
  38. package/.agents/skills/db-state-verifier-and-seeder/examples/db_fixture_seed.json +12 -0
  39. package/.agents/skills/e2e-testing-patterns/SKILL.md +1 -1
  40. package/.agents/skills/e2e-testing-patterns/examples/playwright_sharded_config.ts +12 -0
  41. package/.agents/skills/e2e-testing-patterns/resources/implementation-playbook.md +522 -522
  42. package/.agents/skills/failure-autopsy-and-healing/SKILL.md +17 -3
  43. package/.agents/skills/failure-autopsy-and-healing/examples/sample_junit_failure.xml +8 -0
  44. package/.agents/skills/failure-autopsy-and-healing/references/healing_matrix.md +64 -64
  45. package/.agents/skills/failure-autopsy-and-healing/references/qa_investigation_protocol.md +56 -56
  46. package/.agents/skills/failure-autopsy-and-healing/scripts/triage_failures.sh +98 -98
  47. package/.agents/skills/file-and-report-validator/SKILL.md +1 -1
  48. package/.agents/skills/file-and-report-validator/examples/sample_export_schema.json +14 -0
  49. package/.agents/skills/flaky-test-sentinel-and-quarantine/SKILL.md +3 -3
  50. package/.agents/skills/flaky-test-sentinel-and-quarantine/examples/quarantine_registry.json +11 -0
  51. package/.agents/skills/gherkin-to-suite/SKILL.md +103 -0
  52. package/.agents/skills/gherkin-to-suite/examples/checkout.feature +39 -0
  53. package/.agents/skills/gherkin-to-suite/examples/suite_report_sample.json +334 -0
  54. package/.agents/skills/github-actions-templates/SKILL.md +47 -304
  55. package/.agents/skills/github-actions-templates/examples/matrix_test_pipeline.yml +8 -0
  56. package/.agents/skills/graphify-impact-analyzer/SKILL.md +6 -6
  57. package/.agents/skills/graphify-impact-analyzer/examples/dependency_blast_radius.json +8 -0
  58. package/.agents/skills/katalon-cli-runner/SKILL.md +2 -2
  59. package/.agents/skills/katalon-cli-runner/examples/headless_kre_exec.sh +3 -0
  60. package/.agents/skills/katalon-cli-runner/references/groovy-patterns.md +209 -209
  61. package/.agents/skills/katalon-cli-runner/references/katalon-api.md +155 -155
  62. package/.agents/skills/katalon-cli-runner/references/runner_commands.md +67 -67
  63. package/.agents/skills/lam-script-generator/SKILL.md +42 -1
  64. package/.agents/skills/lam-script-generator/examples/user_story_sample.md +8 -0
  65. package/.agents/skills/lean-code-ladder/SKILL.md +83 -0
  66. package/.agents/skills/lean-code-ladder/examples/ladder_walkthrough.md +37 -0
  67. package/.agents/skills/meta-prompt-crafter/SKILL.md +107 -0
  68. package/.agents/skills/meta-prompt-crafter/examples/qa_prompt_template.md +35 -0
  69. package/.agents/skills/persistent-planning-files/SKILL.md +108 -0
  70. package/.agents/skills/persistent-planning-files/examples/task_plan_example.md +56 -0
  71. package/.agents/skills/playwright-live-interaction/SKILL.md +49 -1
  72. package/.agents/skills/playwright-live-interaction/examples/live_probe_script.js +5 -0
  73. package/.agents/skills/playwright-live-interaction/references/advanced_superpowers.md +160 -160
  74. package/.agents/skills/playwright-live-interaction/references/compact_accessibility_snapshots.md +75 -75
  75. package/.agents/skills/playwright-live-interaction/references/recipes.md +388 -388
  76. package/.agents/skills/playwright-live-interaction/references/swarm_orchestration.md +134 -134
  77. package/.agents/skills/playwright-webapp-testing/SKILL.md +93 -0
  78. package/.agents/skills/playwright-webapp-testing/examples/server_lifecycle_playwright.py +63 -0
  79. package/.agents/skills/rbt-manual-testing/SKILL.md +150 -0
  80. package/.agents/skills/rbt-manual-testing/examples/checkout_rbt_manual_suite.md +25 -0
  81. package/.agents/skills/security-dast-sentinel/SKILL.md +54 -135
  82. package/.agents/skills/security-dast-sentinel/examples/dast_scan_config.json +10 -0
  83. package/.agents/skills/self-healing-locator/SKILL.md +24 -10
  84. package/.agents/skills/self-healing-locator/examples/aom_diff_sample.json +16 -0
  85. package/.agents/skills/skillspector-security-guard/SKILL.md +32 -90
  86. package/.agents/skills/skillspector-security-guard/examples/safe_mcp_config.json +12 -0
  87. package/.agents/skills/surgical-coding-principles/SKILL.md +89 -0
  88. package/.agents/skills/surgical-coding-principles/examples/surgical_vs_scope_creep.md +46 -0
  89. package/.agents/skills/synthetic-test-data-generator/SKILL.md +3 -3
  90. package/.agents/skills/synthetic-test-data-generator/examples/idempotent_data_recipe.json +9 -0
  91. package/.agents/skills/systematic-debugging/SKILL.md +100 -0
  92. package/.agents/skills/systematic-debugging/examples/four_phase_case.md +44 -0
  93. package/.agents/skills/test-driven-development/SKILL.md +114 -0
  94. package/.agents/skills/test-driven-development/examples/red_green_refactor_qa.md +78 -0
  95. package/.agents/skills/token-and-context-optimizer/SKILL.md +1 -1
  96. package/.agents/skills/token-and-context-optimizer/examples/distilled_log_sample.txt +3 -0
  97. package/.agents/skills/verification-before-completion/SKILL.md +100 -0
  98. package/.agents/skills/verification-before-completion/examples/evidence_log_example.md +46 -0
  99. package/.agents/skills/visual-regression-sentinel/SKILL.md +21 -1
  100. package/.agents/skills/visual-regression-sentinel/examples/visual_mask_rules.json +9 -0
  101. package/.agents/skills/wcag-audit-patterns/SKILL.md +3 -3
  102. package/.agents/skills/wcag-audit-patterns/examples/wcag_compliance_checklist.json +10 -0
  103. package/.agents/skills/wcag-audit-patterns/resources/implementation-playbook.md +541 -541
  104. package/.agents/skills/web-vitals-and-performance-profiler/SKILL.md +1 -1
  105. package/.agents/skills/web-vitals-and-performance-profiler/examples/cwv_budget_policy.json +6 -0
  106. package/.agents/templates/completion_report.md +57 -57
  107. package/.agents/workflows/analyze_requirement_document.md +18 -0
  108. package/.agents/workflows/export_testcases_excel.md +32 -0
  109. package/.agents/workflows/generate_combinatorial_test_data.md +28 -0
  110. package/.agents/workflows/generate_cross_module_test_plan.md +37 -0
  111. package/.agents/workflows/generate_manual_testcases_rbt.md +56 -0
  112. package/.agents/workflows/generate_requirements_from_website.md +25 -0
  113. package/.agents/workflows/generate_testcases_from_requirements.md +21 -0
  114. package/.agents/workflows/graphify.md +10 -10
  115. package/.agents/workflows/verify.md +2 -2
  116. package/.cursor/rules/language.mdc +7 -7
  117. package/.cursor/rules/synapse-qa.mdc +23 -0
  118. package/.cursorrules +7 -0
  119. package/.pre-commit-hooks.yaml +14 -0
  120. package/.windsurfrules +7 -0
  121. package/AGENTS.md +54 -15
  122. package/CLAUDE.md +35 -12
  123. package/LICENSE +30 -0
  124. package/NOTICE +180 -0
  125. package/README.en.md +331 -0
  126. package/README.md +252 -515
  127. package/action.yml +51 -0
  128. package/benchmarks/qa_eval/README.md +71 -0
  129. package/benchmarks/qa_eval/build_dataset.py +677 -0
  130. package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-06_api_contract_drift.json +22 -0
  131. package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-07_api_contract_drift.json +22 -0
  132. package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-08_api_contract_drift.json +22 -0
  133. package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-09_api_contract_drift.json +22 -0
  134. package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-10_api_contract_drift.json +22 -0
  135. package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-21_fake_pass_tautology.json +21 -0
  136. package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-22_fake_pass_tautology.json +21 -0
  137. package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-23_fake_pass_tautology.json +21 -0
  138. package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-24_fake_pass_tautology.json +21 -0
  139. package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-25_fake_pass_tautology.json +21 -0
  140. package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-01_locator_drift.json +23 -0
  141. package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-02_locator_drift.json +23 -0
  142. package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-03_locator_drift.json +23 -0
  143. package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-04_locator_drift.json +23 -0
  144. package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-05_locator_drift.json +23 -0
  145. package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-16_stale_and_mutation.json +22 -0
  146. package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-17_stale_and_mutation.json +22 -0
  147. package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-18_stale_and_mutation.json +22 -0
  148. package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-19_stale_and_mutation.json +22 -0
  149. package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-20_stale_and_mutation.json +23 -0
  150. package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-11_timing_and_race.json +22 -0
  151. package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-12_timing_and_race.json +22 -0
  152. package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-13_timing_and_race.json +22 -0
  153. package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-14_timing_and_race.json +22 -0
  154. package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-15_timing_and_race.json +22 -0
  155. package/benchmarks/qa_eval/eval_runner.py +418 -0
  156. package/benchmarks/qa_eval/reports/AB_METHODOLOGY_REPORT.md +83 -0
  157. package/benchmarks/qa_eval/reports/BENCHMARK_REPORT.md +69 -0
  158. package/benchmarks/qa_eval/reports/eval_results.json +105 -0
  159. package/bin/agent-qa.js +16 -4
  160. package/docs/ARCHITECTURE.md +107 -0
  161. package/docs/CI_CD_INTEGRATION.md +94 -0
  162. package/docs/CLI_REFERENCE.md +157 -0
  163. package/docs/CONTRIBUTING.md +91 -0
  164. package/docs/PLUGIN_DEVELOPMENT_GUIDE.md +126 -0
  165. package/docs/TOKEN_QUOTA_PLAYBOOK.md +41 -0
  166. package/docs/adopted-ecosystem-tools.md +87 -0
  167. package/docs/schemas/synapse.config.schema.json +64 -0
  168. package/examples/cypress-ecommerce-suite/README.md +45 -0
  169. package/examples/cypress-ecommerce-suite/cypress/e2e/checkout.cy.js +17 -0
  170. package/examples/cypress-ecommerce-suite/cypress/pages/BasePage.js +29 -0
  171. package/examples/cypress-ecommerce-suite/cypress/pages/CartPage.js +51 -0
  172. package/examples/cypress-ecommerce-suite/cypress.config.js +13 -0
  173. package/examples/cypress-ecommerce-suite/package.json +13 -0
  174. package/examples/katalon-suite/Keywords/pages/BasePage.groovy +19 -0
  175. package/examples/katalon-suite/Keywords/pages/DashboardPage.groovy +29 -0
  176. package/examples/katalon-suite/Keywords/pages/LoginPage.groovy +45 -0
  177. package/examples/katalon-suite/Profiles/default.glbl +12 -0
  178. package/examples/katalon-suite/README.md +18 -0
  179. package/examples/katalon-suite/Scripts/Auth/TC_LoginSuccess/Script1234567890.groovy +12 -0
  180. package/examples/katalon-suite/Scripts/Dashboard/TC_ViewSummary/Script1234567891.groovy +15 -0
  181. package/examples/katalon-suite/katalon_suite.prj +21 -0
  182. package/examples/playwright-crm-suite/README.md +40 -0
  183. package/examples/playwright-crm-suite/package.json +14 -0
  184. package/examples/playwright-crm-suite/pages/BasePage.ts +37 -0
  185. package/examples/playwright-crm-suite/pages/CustomerPage.ts +57 -0
  186. package/examples/playwright-crm-suite/pages/LoginPage.ts +32 -0
  187. package/examples/playwright-crm-suite/playwright.config.ts +27 -0
  188. package/examples/playwright-crm-suite/tests/auth.spec.ts +22 -0
  189. package/examples/playwright-crm-suite/tests/customers.spec.ts +33 -0
  190. package/examples/plugins/sample-custom-plugin/README.md +14 -0
  191. package/examples/plugins/sample-custom-plugin/plugin.json +16 -0
  192. package/examples/plugins/sample-custom-plugin/skills/custom-security-headers-audit/SKILL.md +29 -0
  193. package/examples/plugins/sample-custom-plugin/skills/custom-security-headers-audit/examples/audit_fixture.json +8 -0
  194. package/examples/plugins/sample-custom-plugin/tools/custom_security_headers.py +125 -0
  195. package/examples/practices/README.md +22 -0
  196. package/examples/practices/requirements/crm/requirements_contracts.md +292 -0
  197. package/examples/practices/requirements/crm/requirements_customers.md +462 -0
  198. package/examples/practices/requirements/crm/requirements_login.md +202 -0
  199. package/examples/practices/requirements/crm/requirements_projects.md +396 -0
  200. package/examples/practices/requirements/crm/requirements_tasks.md +343 -0
  201. package/examples/practices/requirements/ecommerce/requirements_category_brand.txt +402 -0
  202. package/examples/practices/requirements/jira/KAN-5/KAN-1/2026-04-03_04-28-27.png +0 -0
  203. package/examples/practices/requirements/jira/KAN-5/KAN-1/KAN-1_requirement.md +52 -0
  204. package/examples/practices/requirements/jira/KAN-5/KAN-4/2026-04-03_04-28-19.png +0 -0
  205. package/examples/practices/requirements/jira/KAN-5/KAN-4/2026-04-03_04-28-57.png +0 -0
  206. package/examples/practices/requirements/jira/KAN-5/KAN-4/KAN-4_requirement.md +119 -0
  207. package/examples/practices/requirements/jira/KAN-5/KAN-5_overview.md +9 -0
  208. package/examples/practices/requirements/jira/KAN-5/KAN-6/2026-04-03_05-58-08.png +0 -0
  209. package/examples/practices/requirements/jira/KAN-5/KAN-6/2026-04-03_05-58-23.png +0 -0
  210. package/examples/practices/requirements/jira/KAN-5/KAN-6/KAN-6_requirement.md +32 -0
  211. package/examples/practices/testcases/api/book_management_api_test_cases.md +144 -0
  212. package/examples/practices/testcases/api/user_management_api_test_cases.md +139 -0
  213. package/examples/practices/testcases/crm/test_cases_crm_login.md +148 -0
  214. package/examples/practices/testcases/crm/test_cases_customers.md +156 -0
  215. package/examples/pytest-api-suite/README.md +45 -0
  216. package/examples/pytest-api-suite/conftest.py +31 -0
  217. package/examples/pytest-api-suite/pages/user_api_client.py +36 -0
  218. package/examples/pytest-api-suite/requirements.txt +2 -0
  219. package/examples/pytest-api-suite/tests/test_user_api.py +44 -0
  220. package/examples/selenium-suite/README.md +18 -0
  221. package/examples/selenium-suite/pages/base_page.py +27 -0
  222. package/examples/selenium-suite/pages/login_page.py +29 -0
  223. package/examples/selenium-suite/pages/order_page.py +25 -0
  224. package/examples/selenium-suite/pytest.ini +6 -0
  225. package/examples/selenium-suite/requirements.txt +2 -0
  226. package/examples/selenium-suite/tests/test_login.py +10 -0
  227. package/examples/selenium-suite/tests/test_order.py +10 -0
  228. package/package.json +27 -12
  229. package/scripts/generate_skill_examples.py +244 -0
  230. package/scripts/install.ps1 +112 -0
  231. package/scripts/install_global_plugin.ps1 +94 -0
  232. package/scripts/install_global_plugin.sh +49 -0
  233. package/scripts/lint_skills.ps1 +57 -0
  234. package/scripts/package_dist.py +323 -0
  235. package/scripts/setup.sh +59 -0
  236. package/scripts/update_hub.ps1 +19 -0
  237. package/scripts/update_hub.sh +15 -0
  238. package/skills_manifest.json +209 -6
  239. package/synapse.config.json +30 -0
  240. package/templates/PROJECT_AI_GUIDE_TEMPLATE.md +7 -7
  241. package/templates/PROJECT_STATE_TEMPLATE.md +1 -1
  242. package/templates/ai_bridges/CLAUDE.md +33 -16
  243. package/templates/ai_bridges/copilot-instructions.md +14 -21
  244. package/templates/ai_bridges/cursor_synapse_qa.mdc +17 -20
  245. package/templates/ai_bridges/windsurfrules +21 -21
  246. package/templates/ci/github-actions-synapse.yml +71 -4
  247. package/templates/welcome.html.tmpl +1674 -0
  248. package/tools/.infer_baseline.json +1102 -0
  249. package/tools/TOOLS_RUNBOOK.md +98 -131
  250. package/tools/__init__.py +26 -0
  251. package/tools/agent_canary.py +501 -501
  252. package/tools/analyze_project.py +31 -17
  253. package/tools/api_fuzzer.py +278 -6
  254. package/tools/author_integrity.py +6 -6
  255. package/tools/auto_heal.py +1 -1
  256. package/tools/browser_helpers.js +105 -7
  257. package/tools/bug_reporter.py +31 -1
  258. package/tools/bump_version.py +30 -3
  259. package/tools/cache_resolver.py +248 -14
  260. package/tools/check_env.py +55 -14
  261. package/tools/check_version_sync.py +171 -0
  262. package/tools/ci_healing_hook.py +1 -1
  263. package/tools/cli.py +454 -42
  264. package/tools/count_tokens.py +1257 -0
  265. package/tools/dashboard_generator.py +2638 -0
  266. package/tools/db_sandbox.py +198 -20
  267. package/tools/e2e_flow_prober.ps1 +12 -64
  268. package/tools/e2e_flow_prober.py +99 -0
  269. package/tools/e2e_flow_prober.sh +4 -0
  270. package/tools/flaky_detector.py +4 -3
  271. package/tools/generate_allure_report.ps1 +12 -29
  272. package/tools/generate_allure_report.py +77 -0
  273. package/tools/generate_allure_report.sh +4 -0
  274. package/tools/generate_jmx_plan.py +257 -58
  275. package/tools/generate_test_reports.ps1 +12 -134
  276. package/tools/generate_test_reports.py +133 -0
  277. package/tools/generate_test_reports.sh +4 -0
  278. package/tools/gherkin_suite.py +758 -0
  279. package/tools/git_pre_commit_guard.py +12 -6
  280. package/tools/goldfish_review.py +366 -0
  281. package/tools/heal_pr_automator.py +1 -1
  282. package/tools/heuristic_locator_matcher.py +170 -21
  283. package/tools/infer_linter.py +612 -70
  284. package/tools/lint_ai_docs.py +64 -0
  285. package/tools/matrix_sharder.py +1 -1
  286. package/tools/mcp_excel_server.ps1 +12 -250
  287. package/tools/mcp_excel_server.py +249 -0
  288. package/tools/mcp_excel_server.sh +4 -0
  289. package/tools/mcp_server.py +368 -144
  290. package/tools/md_to_xlsx.py +307 -0
  291. package/tools/micro_mutator.py +302 -69
  292. package/tools/omni_transpiler.py +2 -2
  293. package/tools/output_formatter.py +128 -0
  294. package/tools/pinpoint_failure.py +88 -88
  295. package/tools/project_state.py +2 -2
  296. package/tools/repo_map.py +1 -1
  297. package/tools/safety_firewall.py +196 -45
  298. package/tools/setup_project.py +295 -31
  299. package/tools/skillspector.py +31 -0
  300. package/tools/spec_drift_sentinel.py +439 -0
  301. package/tools/sync_agent_rules.py +248 -0
  302. package/tools/telemetry_correlator.py +45 -0
  303. package/tools/test_impact.py +51 -12
  304. package/tools/tms_sync_bridge.py +21 -5
  305. package/tools/universal_ir.py +3 -0
  306. package/tools/update_sentinel.py +87 -15
  307. package/tools/verify_all.ps1 +13 -0
  308. package/tools/verify_all.py +479 -85
  309. package/tools/visual_diff_canvas.py +1 -0
  310. package/tools/visual_som_helper.py +1 -1
  311. package/tools/watch_mode.py +305 -0
  312. package/tools/welcome_page.py +291 -0
@@ -0,0 +1,126 @@
1
+ # 3rd-Party Plugin Development Guide — Synapse Hub
2
+
3
+ > **Specification Version:** 2.2.4
4
+ > **Hub Core Provenance:** Thế Vị (@TeeVee998) — [Synapse Hub](https://github.com/TeeVee998/Synapse-Hub)
5
+
6
+ ---
7
+
8
+ ## 1. Overview
9
+
10
+ Synapse Hub provides a decoupled, modular architecture enabling 3rd-party teams and community contributors to extend the Hub with specialized QA skills, runner adapters, or domain-specific security linters.
11
+
12
+ Every 3rd-party plugin is an independent package registered via `plugin.json` and vetted by the built-in **SkillSpector Security Sentinel** (`tools/skillspector.py`).
13
+
14
+ ---
15
+
16
+ ## 2. Plugin Structure & File Conventions
17
+
18
+ A standard Synapse Hub plugin adheres to the following directory layout:
19
+
20
+ ```text
21
+ my-custom-plugin/
22
+ ├── plugin.json # Mandatory plugin manifest
23
+ ├── README.md # Plugin documentation & quickstart
24
+ ├── skills/ # Packaged AI skills (one folder per skill)
25
+ │ └── custom-security-audit/
26
+ │ ├── SKILL.md # Standardized YAML frontmatter + prompt
27
+ │ └── examples/
28
+ │ └── audit_sample.json # Demonstrable example fixture
29
+ └── tools/ # Executable CLI tools (Python 3.9+)
30
+ └── custom_auditor.py # Deterministic, standalone tool
31
+ ```
32
+
33
+ ---
34
+
35
+ ## 3. Plugin Manifest Specification (`plugin.json`)
36
+
37
+ The root `plugin.json` declares identity, capabilities, and dependencies:
38
+
39
+ ```json
40
+ {
41
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
42
+ "name": "sample-custom-plugin",
43
+ "version": "1.0.0",
44
+ "description": "3rd-party plugin extending Synapse Hub with custom HTTP security header auditing.",
45
+ "author": "Community Contributor",
46
+ "license": "MIT",
47
+ "repository": "https://github.com/example/sample-custom-plugin",
48
+ "skills": [
49
+ "custom-security-headers-audit"
50
+ ],
51
+ "tools": [
52
+ "tools/custom_security_headers.py"
53
+ ],
54
+ "minHubVersion": "2.2.0"
55
+ }
56
+ ```
57
+
58
+ ### Manifest Fields:
59
+ - `name` *(string, required)*: Unique kebab-case identifier.
60
+ - `version` *(string, required)*: Semantic versioning (`x.y.z`).
61
+ - `description` *(string, required)*: Concise summary of provided capabilities.
62
+ - `skills` *(array of strings)*: List of skill folder names inside `skills/`.
63
+ - `tools` *(array of strings)*: Relative file paths to executable scripts in `tools/`.
64
+ - `minHubVersion` *(string)*: Minimum compatible Synapse Hub core version.
65
+
66
+ ---
67
+
68
+ ## 4. Skill Authoring Standard (`SKILL.md`)
69
+
70
+ Each skill must contain valid YAML frontmatter followed by clear, token-optimized instructions:
71
+
72
+ ```markdown
73
+ ---
74
+ name: custom-security-headers-audit
75
+ description: Audits web applications for missing or misconfigured HTTP security headers (CSP, HSTS, X-Frame-Options).
76
+ version: 1.0.0
77
+ category: security_and_compliance
78
+ ---
79
+
80
+ # Custom Security Headers Audit Skill
81
+
82
+ ## Purpose
83
+ Inspects target endpoint response headers and reports compliance against OWASP ASVS Section 14.
84
+
85
+ ## Quick CLI Execution
86
+ ```bash
87
+ python tools/custom_security_headers.py https://staging.example.com --json report.json
88
+ ```
89
+ ```
90
+
91
+ ### Skill Invariants:
92
+ 1. **Token Ceiling:** Every `SKILL.md` must be $\le 1.500$ tokens (enforced by `scripts/lint_skills.ps1`).
93
+ 2. **100% UTF-8 No BOM:** Zero BOM bytes (`0xEF, 0xBB, 0xBF`).
94
+ 3. **Evidence-First:** Must reference deterministic tools rather than guessing.
95
+
96
+ ---
97
+
98
+ ## 5. Security & Safety Invariants (DoD Compliance)
99
+
100
+ All 3rd-party tools and scripts must adhere to Synapse Hub's safety rules:
101
+
102
+ 1. **Zero `shell=True` Policy:** Never invoke `subprocess.Popen` or `subprocess.run` with `shell=True`. Always pass structured lists:
103
+ ```python
104
+ # Correct:
105
+ subprocess.run(["curl", "-I", url], capture_output=True, check=True)
106
+ # FORBIDDEN (will be rejected by Gatekeeper):
107
+ subprocess.run(f"curl -I {url}", shell=True)
108
+ ```
109
+ 2. **Environment Allowlist Guard:** Any tool performing destructive modifications or fuzzing must verify staging allowlists (`SYNAPSE_ALLOW_PROD_FUZZ=1`).
110
+ 3. **No Hardcoded Credentials:** Never store plaintext secrets or passwords.
111
+
112
+ ---
113
+
114
+ ## 6. Vetting & Verification Pipeline
115
+
116
+ Before distributing or publishing a plugin, run the Hub's verification sentinels:
117
+
118
+ ```bash
119
+ # 1. Run SkillSpector Security Scan (Must report 0 High/Critical warnings)
120
+ python tools/skillspector.py --target path/to/my-custom-plugin
121
+
122
+ # 2. Run Quality Gates Linting
123
+ python tools/verify_all.py --target path/to/my-custom-plugin
124
+ ```
125
+
126
+ Once passed, the plugin can be mounted directly into the Antigravity Plugin directory (`~/.gemini/config/plugins/`) or integrated via `skills_manifest.json`.
@@ -0,0 +1,41 @@
1
+ # Enterprise Token & Context Engineering Playbook (AI QA Hub)
2
+
3
+ > **Objective:** Maximize AI Agent performance, eliminate context rot, and optimize token quota across the automated test engineering lifecycle.
4
+
5
+ ---
6
+
7
+ ## 1. AI Model Allocation Matrix
8
+
9
+ Avoid depleting high-tier model quotas by applying the **"Right Task - Right Model"** strategy:
10
+
11
+ | AI Model Tier | Capability & Relative Cost | Recommended QA Workloads | Token Consumption |
12
+ | :--- | :--- | :--- | :--- |
13
+ | **Claude Sonnet / Opus / GPT-4o** | ⭐⭐⭐ High | • Complex logic, nested Shadow DOM / iFrames<br>• Race conditions & complex async synchronization<br>• Flaky test root-cause autopsy & Clean POM refactoring | 🔴 Expensive (Use selectively) |
14
+ | **Gemini Pro / Claude 3.5 Sonnet** | ⭐⭐ Balanced | • Everyday POM code generation, assertions, locator updates<br>• User Story to automated test transpilation<br>• Unit tests, REST API stubs & mock routes | 🟡 Moderate |
15
+ | **Gemini Flash / Claude Haiku** | ⭐ High-Speed & Low-Cost | • Parsing multi-thousand-line CI/CD logs (`distill_log.py`)<br>• Generating synthetic test data (JSON/CSV rows)<br>• Compact AOM extraction & DOM structure filtering<br>• Summaries, documentation, commit messages | 🟢 Ultra-economical |
16
+
17
+ ---
18
+
19
+ ## 2. Operational Mode Strategy
20
+
21
+ - **Planning Mode:**
22
+ - Bootstrap new test automation frameworks from scratch.
23
+ - Architect multi-tier Page Object Model hierarchies for large modules.
24
+ - Analyze complex End-to-End user journeys traversing multiple microservices.
25
+ - **Fast / Chat Mode:**
26
+ - Add individual test cases to existing Page Classes.
27
+ - Heal single selectors after UI builds.
28
+ - Debug and re-run isolated test scripts.
29
+
30
+ ---
31
+
32
+ ## 3. Context Window Invariants (Zero Context Rot)
33
+
34
+ 1. **Progressive Disclosure (Never Load Large Files Whole):**
35
+ - Never load classes over 500 lines into the active conversation prompt.
36
+ - Query `tools/repo_map.txt` for method signatures first (~500 tokens). Micro-read targeted 20-50 line slices (`StartLine`, `EndLine`).
37
+ 2. **Log Distillation (`distill_log.py`):**
38
+ - Never dump thousands of lines of raw build/runner output.
39
+ - Run `python3 tools/distill_log.py <path_to_log>` to filter out 95% noise, extracting only the exact failure line and last 3 HTTP requests.
40
+ 3. **Compaction State Anchoring (`project_state.py`):**
41
+ - Antigravity automatically triggers Context Compaction near the ~135k token threshold. Ensure active test run statuses and defect IDs are persisted to `PROJECT_STATE.md` on disk to avoid lossy state compression.
@@ -0,0 +1,87 @@
1
+ # Adopted Ecosystem Tools Guide
2
+
3
+ Companion guide to the seven skills adopted from the open-source Claude ecosystem (see `NOTICE`, entries 16-21). The items below are **external tools that are recommended but NOT copied into this repository** — they run outside the hub, so this page records only vetted install/config snippets and the token-discipline rules that apply when using them.
4
+
5
+ > **Rule:** any tool here is activated on-demand only (Zero-Command Autoproactivity, `AGENTS.md` Section 3). Never install or run one blindly, and never paste API keys into committed files (Gate 6).
6
+
7
+ ## 1. github-mcp (github/github-mcp-server) — MIT
8
+
9
+ Official MCP server exposing GitHub (issues, PRs, Actions, security) to agents. Primary hub use: `orchestrator` / `failure-analyst` filing bug tickets and reading CI failures.
10
+
11
+ ```bash
12
+ # Local via Docker, read-only, minimal toolsets (token discipline)
13
+ claude mcp add github \
14
+ -e GITHUB_PERSONAL_ACCESS_TOKEN \
15
+ -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN \
16
+ ghcr.io/github/github-mcp-server \
17
+ --read-only --toolsets "repos,issues,pull_requests,actions"
18
+ ```
19
+
20
+ - Use a minimum-scope PAT; prefer the `--read-only` flag for agent sessions.
21
+ - Enable only the toolsets a task needs — every loaded toolset costs context.
22
+
23
+ ## 2. playwright-mcp (microsoft/playwright-mcp) — Apache-2.0
24
+
25
+ Browser control over the accessibility tree (~78 tools). Primary hub use: `live-explorer` fallback when scripted helpers are not enough.
26
+
27
+ ```bash
28
+ claude mcp add playwright -- npx @playwright/mcp@latest \
29
+ --headless --caps "testing,network"
30
+ ```
31
+
32
+ - Enable capability flags selectively (`--caps`); the full surface is a context hog.
33
+ - Snapshot mode is the main token cost: prefer `browser_find`/targeted probes over full-page snapshots, and disable snapshots for pure action sequences.
34
+ - The hub's `playwright-live-interaction` skill and `tools/browser_helpers.js` remain the default; MCP is the agentic-loop complement (long stateful browser sessions).
35
+
36
+ ## 3. cc-switch (farion1231/cc-switch) — MIT
37
+
38
+ Desktop app managing provider/API configs for many AI coding tools at once.
39
+
40
+ - Relevant hub fit: its Skills-sync panel targets `~/.agents/skills`, matching this hub's layout; its usage dashboard tracks quota/token consumption per provider — useful against the manual telemetry footer.
41
+ - Install from the project releases; run fully local. Cloud sync (WebDAV/S3) is optional and off by default.
42
+
43
+ ## 4. claude-hud (jarrodwatts/claude-hud) — MIT
44
+
45
+ Statusline HUD showing context usage, 5h/7-day quota, cache hit rate, and cost.
46
+
47
+ ```bash
48
+ /plugin marketplace add jarrodwatts/claude-hud
49
+ /claude-hud:setup
50
+ ```
51
+
52
+ - Automates the observation half of the hub's telemetry footer (quota, cache hit, token totals) without touching prompts or model behavior.
53
+
54
+ ## 5. repomix (yamadashy/repomix) — MIT
55
+
56
+ Packs a repository into one AI-friendly file with per-file token counts.
57
+
58
+ ```bash
59
+ npx repomix --compress # tree-sitter skeleton pack, fewer tokens
60
+ ```
61
+
62
+ - Hub use: onboarding artifacts for subagents, external audits. Secretlint integration aligns with Gate 6 (credential security).
63
+ - Run from the target project root; output is generated locally (`repomix-output.xml`), and `tools/repo_map.*` remains the hub's own compressed alternative.
64
+
65
+ ## 6. graphify (Graphify-Labs/graphify) — Apache-2.0
66
+
67
+ Builds a queryable knowledge graph of a directory (tree-sitter AST, ~40 languages including Groovy).
68
+
69
+ - Hub use: maps Katalon `.groovy` suites and `tools/*.py` the hub's own AST tooling does not cover end-to-end; `graph.json` feeds blast-radius analysis alongside `tools/test_impact.py` and the `graphify-impact-analyzer` skill.
70
+ - Fully local for code (no LLM calls); run `graphify install` to register the skill with your agent host.
71
+
72
+ ## 7. firecrawl (firecrawl/firecrawl) — AGPL-3.0
73
+
74
+ Web scraping/search API returning LLM-ready markdown. Recommended via **cloud tier + API key**, not self-host (the AGPL monorepo stack is heavy and license-incompatible to embed in this MIT repo — same policy as NOTICE entry 3).
75
+
76
+ ```bash
77
+ npx firecrawl-mcp # with FIRECRAWL_API_KEY set in the environment
78
+ ```
79
+
80
+ - Hub use: Stage 1 Discovery data gathering for `live-explorer` when the target data lives outside the browser under test.
81
+
82
+ ## 8. claude-code-router (musistudio/claude-code-router) — MIT
83
+
84
+ Local model gateway (default `127.0.0.1:3456`) with routing, retry, failover, and per-request token/cost logs.
85
+
86
+ - **Security note:** it is a man-in-the-middle for API keys — run strictly local, never expose the port, and audit its config before pointing production credentials at it.
87
+ - Hub use: route mechanical subagent work to cheaper models while keeping strong models for synthesis/review; its request logs match the hub telemetry fields (token in/out, cost).
@@ -0,0 +1,64 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "SynapseHubConfig",
4
+ "description": "Configuration schema for Synapse Hub Enterprise QA Sentinel",
5
+ "type": "object",
6
+ "properties": {
7
+ "$schema": {
8
+ "type": "string",
9
+ "description": "URI of the JSON schema specification"
10
+ },
11
+ "version": {
12
+ "type": "string",
13
+ "description": "Synapse Hub release semver"
14
+ },
15
+ "quality_gates": {
16
+ "type": "object",
17
+ "description": "Definition-of-Done Quality Gate configuration",
18
+ "properties": {
19
+ "mutation_min_score": {
20
+ "type": "number",
21
+ "minimum": 0,
22
+ "maximum": 100,
23
+ "default": 80,
24
+ "description": "Minimum acceptable assertion sensitivity score"
25
+ },
26
+ "gates": {
27
+ "type": "object",
28
+ "properties": {
29
+ "gate_0_author_integrity": { "type": "boolean" },
30
+ "gate_1_bom_check": { "type": "boolean" },
31
+ "gate_2_path_portability": { "type": "boolean" },
32
+ "gate_3_clean_pom": { "type": "boolean" },
33
+ "gate_4_ai_docs_lint": { "type": "boolean" },
34
+ "gate_5_cleanup_blacklist": { "type": "boolean" },
35
+ "gate_6_credential_security": { "type": "boolean" },
36
+ "gate_7_infer_linter": { "type": "boolean" },
37
+ "gate_8_micro_mutator": { "type": "boolean" }
38
+ },
39
+ "additionalProperties": false
40
+ }
41
+ },
42
+ "required": ["mutation_min_score", "gates"]
43
+ },
44
+ "infer_linter": {
45
+ "type": "object",
46
+ "description": "Static defect and fake-pass AST linter configuration",
47
+ "properties": {
48
+ "enabled": { "type": "boolean", "default": true },
49
+ "strict": { "type": "boolean", "default": true },
50
+ "format": { "type": "string", "enum": ["text", "json", "junit"], "default": "text" },
51
+ "exclude_paths": {
52
+ "type": "array",
53
+ "items": { "type": "string" }
54
+ },
55
+ "disabled_rules": {
56
+ "type": "array",
57
+ "items": { "type": "string" }
58
+ }
59
+ },
60
+ "required": ["enabled"]
61
+ }
62
+ },
63
+ "required": ["version", "quality_gates"]
64
+ }
@@ -0,0 +1,45 @@
1
+ # 🌲 Cypress JavaScript Reference Suite (Clean POM & Synapse Guardrails)
2
+
3
+ This directory provides a production-grade **Cypress (JavaScript)** reference suite demonstrating the Clean Page Object Model (POM) and Flat Architecture standards enforced by **Synapse Hub**.
4
+
5
+ ---
6
+
7
+ ## 🌟 End-to-End Testing Lifecycle (Story ➔ Test Cases ➔ Script ➔ Report)
8
+
9
+ ```mermaid
10
+ flowchart LR
11
+ Story["1. User Story<br/>(E-Commerce Checkout)"] --> Matrix["2. Test Case Matrix<br/>(Equivalence & Boundary)"]
12
+ Matrix --> POM["3. Clean POM Pages<br/>(CartPage, CheckoutPage)"]
13
+ POM --> Spec["4. Cypress Spec<br/>(checkout.cy.js)"]
14
+ Spec --> Report["5. JUnit / Mochawesome<br/>(DoD Verified)"]
15
+ ```
16
+
17
+ ### 1. User Story & Acceptance Criteria
18
+ - **Story:** *As a customer, I want to review my shopping cart and apply a valid discount coupon so that my total price updates before placing an order.*
19
+ - **Acceptance Criteria (AC):**
20
+ - AC1: Cart must show items, quantities, and price breakdown.
21
+ - AC2: Valid coupon code (e.g. `SAVE20`) deducts 20% from subtotal.
22
+ - AC3: Invalid coupon code displays red error toast: *"Mã giảm giá không hợp lệ"*.
23
+ - AC4: Empty cart checkout button must remain disabled.
24
+
25
+ ### 2. Key Architectural Patterns Enforced
26
+ - **Zero Raw Selectors in Specs:** `cypress/e2e/checkout.cy.js` calls only semantic methods on `CartPage` and `CheckoutPage`.
27
+ - **Resilient ARIA Locators:** Page objects use `cy.findByRole`, `cy.findByLabel`, or scoped semantic CSS.
28
+ - **Dynamic Idempotency:** Uses `BasePage.uniqueCode('ORDER_')` for order identifiers.
29
+ - **Smart Synchronization:** Replaces static `cy.wait(5000)` with network route assertions and spinner detachment.
30
+
31
+ ---
32
+
33
+ ## 🚀 How to Run & Verify
34
+
35
+ ```bash
36
+ # 1. Run Synapse AST Test Linter (Zero-token verification)
37
+ npx synapse-hub lint ./cypress/e2e
38
+
39
+ # 2. Verify 9 Quality Gates DoD
40
+ npx synapse-hub verify
41
+
42
+ # 3. Run Headless Cypress
43
+ npm install
44
+ npx cypress run --spec "cypress/e2e/checkout.cy.js"
45
+ ```
@@ -0,0 +1,17 @@
1
+ const cartPage = require('../pages/CartPage');
2
+
3
+ describe('E-Commerce Cart & Discount Coupon Validation', () => {
4
+ beforeEach(() => {
5
+ cartPage.openCart();
6
+ });
7
+
8
+ it('TC-ECOM-01: Successfully apply 20% discount coupon to cart', () => {
9
+ cartPage.applyCoupon('SAVE20');
10
+ cartPage.verifyDiscountApplied('-20%');
11
+ });
12
+
13
+ it('TC-ECOM-02: Display error when applying invalid or expired coupon', () => {
14
+ cartPage.applyCoupon('EXPIRED_COUPON_999');
15
+ cartPage.verifyCouponError('Mã giảm giá không hợp lệ');
16
+ });
17
+ });
@@ -0,0 +1,29 @@
1
+ /**
2
+ * BasePage — Universal Cypress Base Page Object
3
+ * Enforces dynamic idempotency, smart waiting, and common interactions.
4
+ */
5
+ class BasePage {
6
+ /**
7
+ * Generates dynamic unique identifier for test data isolation.
8
+ */
9
+ static uniqueCode(prefix = 'AUTO_') {
10
+ return `${prefix}${Date.now()}_${Math.floor(Math.random() * 1000)}`;
11
+ }
12
+
13
+ /**
14
+ * Waits for loading spinner/overlay detachment.
15
+ */
16
+ waitForSpinnerDetached() {
17
+ cy.get('.spinner-overlay, .loading-backdrop', { timeout: 10000 }).should('not.exist');
18
+ }
19
+
20
+ /**
21
+ * Navigates to a relative path.
22
+ */
23
+ navigate(path = '/') {
24
+ cy.visit(path);
25
+ this.waitForSpinnerDetached();
26
+ }
27
+ }
28
+
29
+ module.exports = BasePage;
@@ -0,0 +1,51 @@
1
+ const BasePage = require('./BasePage');
2
+
3
+ class CartPage extends BasePage {
4
+ // Encapsulated locators
5
+ get couponInput() {
6
+ return cy.get('input[name="couponCode"]');
7
+ }
8
+
9
+ get applyCouponButton() {
10
+ return cy.contains('button', 'Áp dụng');
11
+ }
12
+
13
+ get discountBadge() {
14
+ return cy.get('[data-testid="discount-amount"]');
15
+ }
16
+
17
+ get errorMessageToast() {
18
+ return cy.get('.toast-error, .notification-error');
19
+ }
20
+
21
+ get checkoutButton() {
22
+ return cy.contains('button', 'Tiến hành đặt hàng');
23
+ }
24
+
25
+ // Business Action Methods
26
+ openCart() {
27
+ this.navigate('/cart');
28
+ }
29
+
30
+ applyCoupon(couponCode) {
31
+ this.couponInput.clear().type(couponCode);
32
+ this.applyCouponButton.click();
33
+ this.waitForSpinnerDetached();
34
+ }
35
+
36
+ proceedToCheckout() {
37
+ this.checkoutButton.click();
38
+ this.waitForSpinnerDetached();
39
+ }
40
+
41
+ // Verification Methods
42
+ verifyDiscountApplied(expectedDiscount) {
43
+ this.discountBadge.should('be.visible').and('contain.text', expectedDiscount);
44
+ }
45
+
46
+ verifyCouponError(expectedError) {
47
+ this.errorMessageToast.should('be.visible').and('contain.text', expectedError);
48
+ }
49
+ }
50
+
51
+ module.exports = new CartPage();
@@ -0,0 +1,13 @@
1
+ const { defineConfig } = require('cypress');
2
+
3
+ module.exports = defineConfig({
4
+ e2e: {
5
+ baseUrl: 'https://staging-shop.example.com',
6
+ specPattern: 'cypress/e2e/**/*.cy.js',
7
+ supportFile: false,
8
+ viewportWidth: 1920,
9
+ viewportHeight: 1080,
10
+ video: false,
11
+ screenshotOnRunFailure: true,
12
+ },
13
+ });
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "cypress-ecommerce-suite",
3
+ "version": "1.0.0",
4
+ "description": "Production Cypress Clean POM Reference Suite for Synapse-Hub",
5
+ "scripts": {
6
+ "test": "cypress run",
7
+ "test:open": "cypress open",
8
+ "lint:synapse": "npx synapse-hub lint ./cypress/e2e"
9
+ },
10
+ "devDependencies": {
11
+ "cypress": "^13.6.0"
12
+ }
13
+ }
@@ -0,0 +1,19 @@
1
+ package pages
2
+
3
+ import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
4
+ import com.kms.katalon.core.model.FailureHandling
5
+
6
+ /**
7
+ * BasePage encapsulating reusable Clean POM operations and smart synchronization.
8
+ */
9
+ public class BasePage {
10
+
11
+ public static String uniqueCode(String prefix = "AUTO_") {
12
+ return prefix + System.currentTimeMillis()
13
+ }
14
+
15
+ public void waitForReady(int timeoutSec = 10) {
16
+ // Smart wait: wait for page document state without static Thread.sleep
17
+ WebUI.waitForPageLoad(timeoutSec, FailureHandling.OPTIONAL)
18
+ }
19
+ }
@@ -0,0 +1,29 @@
1
+ package pages
2
+
3
+ import com.kms.katalon.core.testobject.TestObject
4
+ import com.kms.katalon.core.testobject.ConditionType
5
+ import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
6
+
7
+ /**
8
+ * DashboardPage displaying business KPIs and metrics.
9
+ */
10
+ public class DashboardPage extends BasePage {
11
+
12
+ private TestObject headerDashboard = makeTestObject("//h1[contains(text(), 'Dashboard')]")
13
+ private TestObject cardActiveUsers = makeTestObject("//div[@data-testid='card-active-users']")
14
+
15
+ private static TestObject makeTestObject(String xpath) {
16
+ TestObject to = new TestObject()
17
+ to.addProperty("xpath", ConditionType.EQUALS, xpath)
18
+ return to
19
+ }
20
+
21
+ public boolean isDashboardLoaded() {
22
+ waitForReady()
23
+ return WebUI.verifyElementPresent(headerDashboard, 10)
24
+ }
25
+
26
+ public String getActiveUsersCount() {
27
+ return WebUI.getText(cardActiveUsers)
28
+ }
29
+ }
@@ -0,0 +1,45 @@
1
+ package pages
2
+
3
+ import com.kms.katalon.core.testobject.TestObject
4
+ import com.kms.katalon.core.testobject.ConditionType
5
+ import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
6
+
7
+ /**
8
+ * LoginPage adhering strictly to Clean POM Flat Architecture.
9
+ * Encapsulates all DOM selectors and interaction methods.
10
+ */
11
+ public class LoginPage extends BasePage {
12
+
13
+ private TestObject txtUsername = makeTestObject("//input[@id='username']")
14
+ private TestObject txtPassword = makeTestObject("//input[@id='password']")
15
+ private TestObject btnLogin = makeTestObject("//button[@id='btn-login']")
16
+ private TestObject msgSuccess = makeTestObject("//div[contains(@class, 'alert-success')]")
17
+
18
+ private static TestObject makeTestObject(String xpath) {
19
+ TestObject to = new TestObject()
20
+ to.addProperty("xpath", ConditionType.EQUALS, xpath)
21
+ return to
22
+ }
23
+
24
+ public LoginPage navigate(String url) {
25
+ WebUI.openBrowser("")
26
+ WebUI.navigateToUrl(url)
27
+ waitForReady()
28
+ return this
29
+ }
30
+
31
+ public LoginPage enterCredentials(String username, String password) {
32
+ WebUI.setText(txtUsername, username)
33
+ WebUI.setText(txtPassword, password)
34
+ return this
35
+ }
36
+
37
+ public void submitLogin() {
38
+ WebUI.click(btnLogin)
39
+ waitForReady()
40
+ }
41
+
42
+ public boolean isLoginSuccessful() {
43
+ return WebUI.verifyElementPresent(msgSuccess, 10)
44
+ }
45
+ }
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <GlobalVariableEntities>
3
+ <description></description>
4
+ <name>default</name>
5
+ <tag></tag>
6
+ <defaultProfile>true</defaultProfile>
7
+ <GlobalVariableEntity>
8
+ <description>Base application URL</description>
9
+ <initValue>'https://app.enterprise-demo.com'</initValue>
10
+ <name>BASE_URL</name>
11
+ </GlobalVariableEntity>
12
+ </GlobalVariableEntities>
@@ -0,0 +1,18 @@
1
+ # Katalon Studio Clean POM Reference Suite
2
+
3
+ Enterprise Katalon Studio web automation project adhering to Synapse Hub Clean POM & Flat Architecture standards.
4
+
5
+ ## Architecture Guidelines Enforced:
6
+ 1. **Flat Architecture:** All Page Classes reside in `Keywords/pages/` extending `BasePage`.
7
+ 2. **Zero-Locator Scripts:** Test scripts in `Scripts/` contain only business method calls. Zero raw XPaths or CSS selectors.
8
+ 3. **Smart Wait:** Prohibits static `Thread.sleep`. Uses dynamic smart waits.
9
+ 4. **Idempotent Data:** Dynamic `BasePage.uniqueCode("AUTO_")` with timestamps.
10
+
11
+ ## Validation via Synapse Hub:
12
+ ```bash
13
+ # Validate Clean POM and 9 Quality Gates DoD:
14
+ npx synapse-hub verify --mode target
15
+
16
+ # Run AST Linter:
17
+ npx synapse-hub lint
18
+ ```
@@ -0,0 +1,12 @@
1
+ import pages.LoginPage
2
+ import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
3
+
4
+ // Clean POM Test Script: Zero raw XPaths/CSS selectors
5
+ LoginPage loginPage = new LoginPage()
6
+
7
+ loginPage.navigate("https://app.enterprise-demo.com/login")
8
+ .enterCredentials("qa_automation_user", "SecurePass123!")
9
+ .submitLogin()
10
+
11
+ assert loginPage.isLoginSuccessful() == true
12
+ WebUI.closeBrowser()
@@ -0,0 +1,15 @@
1
+ import pages.LoginPage
2
+ import pages.DashboardPage
3
+ import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
4
+
5
+ LoginPage loginPage = new LoginPage()
6
+ DashboardPage dashboardPage = new DashboardPage()
7
+
8
+ loginPage.navigate("https://app.enterprise-demo.com/login")
9
+ .enterCredentials("qa_lead", "LeadSecret2026!")
10
+ .submitLogin()
11
+
12
+ assert dashboardPage.isDashboardLoaded() == true
13
+ String userCount = dashboardPage.getActiveUsersCount()
14
+ assert userCount != null
15
+ WebUI.closeBrowser()