@teevee98/synapse-hub 4.3.1 → 4.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 (289) hide show
  1. package/.cursor/rules/agents.mdc +11 -11
  2. package/.cursor/rules/katalon.mdc +11 -0
  3. package/.cursor/rules/perf.mdc +10 -0
  4. package/.cursor/rules/playwright.mdc +10 -0
  5. package/.cursor/rules/pytest.mdc +10 -0
  6. package/.cursor/rules/synapse-qa.mdc +4 -2
  7. package/.cursorrules +3 -10
  8. package/.windsurfrules +3 -10
  9. package/AGENTS.md +4 -3
  10. package/CLAUDE.md +4 -5
  11. package/README.en.md +3 -3
  12. package/README.md +3 -3
  13. package/agentskills.json +15 -15
  14. package/{.agents/agents → ai-agents/personas}/api-engineer.md +9 -1
  15. package/{.agents/agents → ai-agents/personas}/failure-analyst.md +1 -1
  16. package/{.agents/agents → ai-agents/personas}/live-explorer.md +1 -1
  17. package/{.agents/agents → ai-agents/personas}/orchestrator.md +8 -15
  18. package/{.agents/agents → ai-agents/personas}/perf-engineer.md +11 -5
  19. package/{.agents/agents → ai-agents/personas}/pom-crafter.md +3 -9
  20. package/{.agents/agents → ai-agents/personas}/quality-gatekeeper.md +1 -1
  21. package/{.agents/agents → ai-agents/personas}/test-designer.md +2 -1
  22. package/{.agents/agents → ai-agents/personas}/test-runner.md +3 -4
  23. package/{.agents/rules → automation/playwright}/mandatory-playwright-live.md +5 -13
  24. package/{.agents/skills/01-web-automation → automation/playwright}/playwright-webapp-testing/SKILL.md +2 -0
  25. package/{.agents/skills/01-web-automation → automation/shared-utils}/clean-pom-crafter/SKILL.md +14 -3
  26. package/{.agents/skills/01-web-automation → automation/shared-utils}/e2e-testing-patterns/SKILL.md +12 -1
  27. package/{.agents/skills/01-web-automation → automation/shared-utils}/lam-script-generator/SKILL.md +2 -0
  28. package/docs/ARCHITECTURE.en.md +96 -3
  29. package/docs/ARCHITECTURE.md +87 -3
  30. package/docs/TOOL_CATALOG.md +17 -5
  31. package/docs/reports/AUDIT_REPORT.md +1038 -0
  32. package/docs/reports/PROJECT_HEALTH_REPORT.md +49 -0
  33. package/docs/reports/TECHNICAL_DEBT_LEDGER.md +22 -0
  34. package/package.json +8 -1
  35. package/plugin.json +1 -1
  36. package/{.agents/skills/02-test-design → requirement/spec-review}/review-spec/SKILL.md +8 -0
  37. package/scripts/install_global_plugin.ps1 +1 -1
  38. package/scripts/install_global_plugin.sh +1 -1
  39. package/skills_index.json +61 -0
  40. package/skills_manifest.json +88 -62
  41. package/{.agents/skills/08-code-quality → standards/coding-standards}/lean-code-ladder/SKILL.md +8 -1
  42. package/{.agents/skills/08-code-quality → standards/coding-standards}/surgical-coding-principles/SKILL.md +2 -0
  43. package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/mipro-prompt-compiler/SKILL.md +8 -0
  44. package/synapse.config.json +1 -1
  45. package/templates/ai_bridges/CLAUDE.md +4 -5
  46. package/templates/ai_bridges/copilot-instructions.md +1 -0
  47. package/templates/ai_bridges/cursor_synapse_qa.mdc +4 -2
  48. package/templates/ai_bridges/windsurfrules +3 -10
  49. package/templates/test-plan/performance-test-plan-template.md +106 -0
  50. package/{.agents/skills/02-test-design → test-design/manual-rbt}/rbt-manual-testing/SKILL.md +11 -5
  51. package/{.agents/skills/07-data-and-state → test-design/test-data}/file-and-report-validator/SKILL.md +8 -1
  52. package/{.agents/skills/07-data-and-state → test-design/test-data}/synthetic-test-data-generator/SKILL.md +4 -1
  53. package/testing/api-contracts/api_testing_rules.md +74 -0
  54. package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/agentless-qa-repair/SKILL.md +2 -0
  55. package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/failure-autopsy-and-healing/SKILL.md +5 -11
  56. package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/self-healing-locator/SKILL.md +2 -0
  57. package/testing/manual/manual-qa-and-rtm-bridge/SKILL.md +92 -0
  58. package/testing/manual/manual-qa-and-rtm-bridge/examples/sample_bug_and_rtm.json +38 -0
  59. package/{.agents/skills/04-performance-and-load → testing/performance}/backend-load-and-stress-patterns/SKILL.md +5 -2
  60. package/testing/performance/backend-load-and-stress-patterns/references/performance_test_plan_29119.md +106 -0
  61. package/{.agents/rules → testing/performance}/performance_testing_rules.md +27 -3
  62. package/{.agents/skills/04-performance-and-load → testing/performance}/web-vitals-and-performance-profiler/SKILL.md +75 -14
  63. package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/security-dast-sentinel/SKILL.md +13 -2
  64. package/{.agents/rules → testing/security-a11y}/security_testing_rules.md +19 -0
  65. package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/wcag-audit-patterns/SKILL.md +4 -1
  66. package/tools/.infer_baseline.json +44 -3
  67. package/tools/TOOLS_RUNBOOK.md +246 -4
  68. package/tools/TOOL_CATALOG.json +199 -19
  69. package/tools/TOOL_INDEX.json +160 -0
  70. package/tools/__init__.py +1 -1
  71. package/tools/ai_eval_sentinel.py +403 -0
  72. package/tools/assertion_optimizer.py +188 -0
  73. package/tools/asvs_auditor.py +410 -0
  74. package/tools/author_integrity.py +12 -1
  75. package/tools/benchmark_swarm_context.py +1 -1
  76. package/tools/browser_helpers.js +2 -2
  77. package/tools/catalogs/api_contract_testing.json +107 -0
  78. package/tools/catalogs/auxiliary_utilities.json +1536 -0
  79. package/tools/catalogs/benchmarking.json +23 -0
  80. package/tools/catalogs/ci_cd_packaging.json +46 -0
  81. package/tools/catalogs/code_generation_ast.json +70 -0
  82. package/tools/catalogs/failure_autopsy_healing.json +41 -0
  83. package/tools/catalogs/manual_testing_design.json +80 -0
  84. package/tools/catalogs/orchestration.json +25 -0
  85. package/tools/catalogs/performance_testing.json +71 -0
  86. package/tools/catalogs/quality_gates.json +65 -0
  87. package/tools/catalogs/sandboxing_isolation.json +42 -0
  88. package/tools/catalogs/security.json +72 -0
  89. package/tools/catalogs/setup_onboarding.json +26 -0
  90. package/tools/catalogs/testing_utilities.json +111 -0
  91. package/tools/chaos_resilience_probe.py +362 -0
  92. package/tools/check_env.py +16 -3
  93. package/tools/check_version_sync.py +114 -63
  94. package/tools/cldr_l10n_verifier.py +309 -0
  95. package/tools/cli.py +971 -3
  96. package/tools/core/circuit_breaker.py +106 -0
  97. package/tools/core/token_estimator.py +56 -7
  98. package/tools/cvss_calculator.py +412 -0
  99. package/tools/dashboard_generator.py +12 -12
  100. package/tools/etl_data_reconciler.py +460 -0
  101. package/tools/generate_jmx_plan.py +12 -4
  102. package/tools/generate_tool_catalog.py +60 -2
  103. package/tools/jtl_analyzer.py +23 -1
  104. package/tools/mcp_docx_server.py +1 -1
  105. package/tools/mcp_excel_server.py +1 -1
  106. package/tools/mcp_server.py +5 -1
  107. package/tools/mobile_resilience_sentinel.py +273 -0
  108. package/tools/observability_tester.py +235 -0
  109. package/tools/payment_interop_simulator.py +337 -0
  110. package/tools/pre_push_guard.py +306 -0
  111. package/tools/project_state.py +17 -10
  112. package/tools/regulatory_compliance.py +336 -0
  113. package/tools/reversible_sandbox.py +7 -2
  114. package/tools/rules_router.py +6 -4
  115. package/tools/runaway_stopper.py +19 -111
  116. package/tools/setup_project.py +1 -1
  117. package/tools/skill_canonical_digest.py +2 -2
  118. package/tools/skillspector.py +78 -10
  119. package/tools/sync_agent_rules.py +15 -27
  120. package/tools/sync_skills_manifest.py +38 -4
  121. package/tools/tmmi_auditor.py +179 -0
  122. package/tools/ui_server.py +1 -1
  123. package/tools/update_sentinel.py +4 -4
  124. package/tools/validate_host_interop.py +3 -1
  125. package/tools/validate_skills_schema.py +49 -2
  126. package/tools/vpat_exporter.py +428 -0
  127. package/tools/welcome_page.py +4 -4
  128. package/.agents/rules/stack-auto-router.md +0 -30
  129. package/.agents/skills/09-ci-and-devops/github-actions-templates/SKILL.md +0 -114
  130. package/.agents/skills/09-ci-and-devops/github-actions-templates/examples/matrix_test_pipeline.yml +0 -9
  131. package/.agents/skills/09-ci-and-devops/gitlab-ci-templates/SKILL.md +0 -123
  132. package/.agents/skills/09-ci-and-devops/gitlab-ci-templates/examples/sample_gitlab_ci.yml +0 -17
  133. package/.agents/skills/09-ci-and-devops/jenkins-pipeline-templates/SKILL.md +0 -133
  134. package/.agents/skills/09-ci-and-devops/jenkins-pipeline-templates/examples/Jenkinsfile.example +0 -21
  135. package/.cursor/rules/language.mdc +0 -7
  136. package/templates/ci/github-actions-synapse.yml +0 -95
  137. package/templates/ci/gitlab-ci-synapse.yml +0 -16
  138. package/tools/build_consolidated_report.py +0 -1643
  139. package/tools/create_mock_docx.py +0 -107
  140. /package/{.agents → ai-agents/hooks}/hooks.json +0 -0
  141. /package/{.agents → ai-agents}/hooks/session_start.py +0 -0
  142. /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/actor-qa-swarm/SKILL.md +0 -0
  143. /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/actor-qa-swarm/examples/broker_sharding_sample.json +0 -0
  144. /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/agent-orchestration-multi-agent-optimize/SKILL.md +0 -0
  145. /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/agent-orchestration-multi-agent-optimize/examples/swarm_workload_config.json +0 -0
  146. /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/event-stream-qa-orchestrator/SKILL.md +0 -0
  147. /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/event-stream-qa-orchestrator/examples/timeline_sample.jsonl +0 -0
  148. /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/persistent-planning-files/SKILL.md +0 -0
  149. /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/persistent-planning-files/examples/task_plan_example.md +0 -0
  150. /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/qa-memory-os/SKILL.md +0 -0
  151. /package/{.agents/skills/10-agent-orchestration → ai-agents/orchestration}/qa-memory-os/examples/archival_memory_sample.json +0 -0
  152. /package/{.agents → ai-agents}/workflows/graphify.md +0 -0
  153. /package/{.agents → ai-agents}/workflows/test-impact.md +0 -0
  154. /package/{.agents → ai-agents}/workflows/verify.md +0 -0
  155. /package/{.agents/rules → automation/cypress}/cypress_rules.md +0 -0
  156. /package/{.agents/skills/01-web-automation → automation/katalon}/katalon-cli-runner/SKILL.md +0 -0
  157. /package/{.agents/skills/01-web-automation → automation/katalon}/katalon-cli-runner/examples/headless_kre_exec.sh +0 -0
  158. /package/{.agents/skills/01-web-automation → automation/katalon}/katalon-cli-runner/references/groovy-patterns.md +0 -0
  159. /package/{.agents/skills/01-web-automation → automation/katalon}/katalon-cli-runner/references/katalon-api.md +0 -0
  160. /package/{.agents/skills/01-web-automation → automation/katalon}/katalon-cli-runner/references/runner_commands.md +0 -0
  161. /package/{.agents/skills/01-web-automation → automation/mobile}/mobile-appium-som/SKILL.md +0 -0
  162. /package/{.agents/skills/01-web-automation → automation/mobile}/mobile-appium-som/examples/BaseScreen.java +0 -0
  163. /package/{.agents/skills/01-web-automation → automation/mobile}/mobile-appium-som/examples/LoginScreen.java +0 -0
  164. /package/{.agents/skills/01-web-automation → automation/mobile}/mobile-appium-som/examples/TC_MobileLogin.java +0 -0
  165. /package/{.agents/skills/01-web-automation → automation/mobile}/mobile-maestro-detox-patterns/SKILL.md +0 -0
  166. /package/{.agents/skills/01-web-automation → automation/mobile}/mobile-maestro-detox-patterns/examples/sample_flow.yaml +0 -0
  167. /package/{.agents/rules → automation/mobile}/mobile_appium_rules.md +0 -0
  168. /package/{.agents/skills/01-web-automation → automation/playwright}/playwright-live-interaction/SKILL.md +0 -0
  169. /package/{.agents/skills/01-web-automation → automation/playwright}/playwright-live-interaction/examples/live_probe_script.js +0 -0
  170. /package/{.agents/skills/01-web-automation → automation/playwright}/playwright-live-interaction/references/advanced_superpowers.md +0 -0
  171. /package/{.agents/skills/01-web-automation → automation/playwright}/playwright-live-interaction/references/compact_accessibility_snapshots.md +0 -0
  172. /package/{.agents/skills/01-web-automation → automation/playwright}/playwright-live-interaction/references/recipes.md +0 -0
  173. /package/{.agents/skills/01-web-automation → automation/playwright}/playwright-live-interaction/references/swarm_orchestration.md +0 -0
  174. /package/{.agents/skills/01-web-automation → automation/playwright}/playwright-webapp-testing/examples/server_lifecycle_playwright.py +0 -0
  175. /package/{.agents/skills/01-web-automation → automation/shared-utils}/auth-session-and-cookie-manager/SKILL.md +0 -0
  176. /package/{.agents/skills/01-web-automation → automation/shared-utils}/auth-session-and-cookie-manager/examples/multi_role_auth_matrix.md +0 -0
  177. /package/{.agents/skills/01-web-automation → automation/shared-utils}/auth-session-and-cookie-manager/examples/storage_state_sample.json +0 -0
  178. /package/{.agents/skills/01-web-automation → automation/shared-utils}/bats-testing-patterns/SKILL.md +0 -0
  179. /package/{.agents/skills/01-web-automation → automation/shared-utils}/bats-testing-patterns/examples/cli_runner_test.bats +0 -0
  180. /package/{.agents/skills/01-web-automation → automation/shared-utils}/bats-testing-patterns/resources/implementation-playbook.md +0 -0
  181. /package/{.agents/skills/01-web-automation → automation/shared-utils}/clean-pom-crafter/examples/standard_test_case.groovy +0 -0
  182. /package/{.agents/skills/01-web-automation → automation/shared-utils}/clean-pom-crafter/references/pom_patterns.groovy +0 -0
  183. /package/{.agents/skills/01-web-automation → automation/shared-utils}/e2e-testing-patterns/examples/playwright_sharded_config.ts +0 -0
  184. /package/{.agents/skills/01-web-automation → automation/shared-utils}/e2e-testing-patterns/resources/implementation-playbook.md +0 -0
  185. /package/{.agents/skills/01-web-automation → automation/shared-utils}/lam-script-generator/examples/user_story_sample.md +0 -0
  186. /package/{.agents/skills/03-api-and-contracts → requirement/spec-review}/api-spec-to-e2e-matrix/SKILL.md +0 -0
  187. /package/{.agents/skills/03-api-and-contracts → requirement/spec-review}/api-spec-to-e2e-matrix/examples/sample_openapi.json +0 -0
  188. /package/{.agents/skills/02-test-design → requirement/spec-review}/architecture-decision-records/SKILL.md +0 -0
  189. /package/{.agents/skills/02-test-design → requirement/spec-review}/architecture-decision-records/examples/0001-record-architecture-decisions.md +0 -0
  190. /package/{.agents/skills/02-test-design → requirement/spec-review}/review-spec/examples/pocock_grilling_decision_rubric.md +0 -0
  191. /package/{.agents/skills/02-test-design → requirement/spec-review}/review-spec/examples/sample_spec_review.md +0 -0
  192. /package/{.agents → requirement}/workflows/analyze_requirement_document.md +0 -0
  193. /package/{.agents → requirement}/workflows/generate_requirements_from_website.md +0 -0
  194. /package/{.agents/rules → standards/coding-standards}/author-integrity-guard.md +0 -0
  195. /package/{.agents/skills/08-code-quality → standards/coding-standards}/code-refactoring-refactor-clean/SKILL.md +0 -0
  196. /package/{.agents/skills/08-code-quality → standards/coding-standards}/code-refactoring-refactor-clean/examples/refactored_page_sample.groovy +0 -0
  197. /package/{.agents/skills/08-code-quality → standards/coding-standards}/code-refactoring-refactor-clean/examples/refactored_playwright_pom.ts +0 -0
  198. /package/{.agents/skills/08-code-quality → standards/coding-standards}/code-refactoring-refactor-clean/resources/implementation-playbook.md +0 -0
  199. /package/{.agents/rules → standards/coding-standards}/communication-style.md +0 -0
  200. /package/{.agents/rules → standards/coding-standards}/git-push-protocol.md +0 -0
  201. /package/{.agents/skills/08-code-quality → standards/coding-standards}/graphify-impact-analyzer/SKILL.md +0 -0
  202. /package/{.agents/skills/08-code-quality → standards/coding-standards}/graphify-impact-analyzer/examples/dependency_blast_radius.json +0 -0
  203. /package/{.agents/skills/08-code-quality → standards/coding-standards}/lean-code-ladder/examples/ladder_walkthrough.md +0 -0
  204. /package/{.agents/skills/08-code-quality → standards/coding-standards}/repo-quality-audit/SKILL.md +0 -0
  205. /package/{.agents/skills/08-code-quality → standards/coding-standards}/repo-quality-audit/examples/sample_audit_walkthrough.md +0 -0
  206. /package/{.agents/skills/08-code-quality → standards/coding-standards}/repo-quality-audit/examples/sample_repo_audit.md +0 -0
  207. /package/{.agents/skills/08-code-quality → standards/coding-standards}/senior-code-review/SKILL.md +0 -0
  208. /package/{.agents/skills/08-code-quality → standards/coding-standards}/senior-code-review/examples/sample_review_walkthrough.md +0 -0
  209. /package/{.agents/skills/08-code-quality → standards/coding-standards}/surgical-coding-principles/examples/surgical_vs_scope_creep.md +0 -0
  210. /package/{.agents/skills/08-code-quality → standards/coding-standards}/technical-debt-harvester/SKILL.md +0 -0
  211. /package/{.agents/skills/08-code-quality → standards/coding-standards}/technical-debt-harvester/examples/sample_debt_ledger.md +0 -0
  212. /package/{.agents/skills/08-code-quality → standards/coding-standards}/technical-debt-harvester/examples/sample_ledger_output.md +0 -0
  213. /package/{.agents/rules → standards/context-ai}/context-engineering.md +0 -0
  214. /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/meta-prompt-crafter/SKILL.md +0 -0
  215. /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/meta-prompt-crafter/examples/qa_prompt_template.md +0 -0
  216. /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/mipro-prompt-compiler/examples/compiled_module_sample.json +0 -0
  217. /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/mipro-prompt-compiler/examples/dspy_assertion_optimizer_case.md +0 -0
  218. /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/qa-aci-interface/SKILL.md +0 -0
  219. /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/qa-aci-interface/examples/surgical_code_window_walkthrough.md +0 -0
  220. /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/qa-aci-interface/examples/surgical_edit_sample.json +0 -0
  221. /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/token-and-context-optimizer/SKILL.md +0 -0
  222. /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/token-and-context-optimizer/examples/distilled_log_sample.txt +0 -0
  223. /package/{.agents/skills/11-ai-and-prompting → standards/context-ai}/token-and-context-optimizer/references/context_engineering_guide.md +0 -0
  224. /package/{.agents/rules → standards/qa-process}/graphify.md +0 -0
  225. /package/{.agents/rules → standards/qa-process}/lessons-learned.md +0 -0
  226. /package/{.agents/rules → standards/qa-process}/skill-precedence.md +0 -0
  227. /package/{.agents/rules → standards/quality-gates}/systematic-debugging.md +0 -0
  228. /package/{.agents/templates → templates/test-report}/completion_report.md +0 -0
  229. /package/{.agents/skills/02-test-design → test-design/bdd-gherkin}/gherkin-to-suite/SKILL.md +0 -0
  230. /package/{.agents/skills/02-test-design → test-design/bdd-gherkin}/gherkin-to-suite/examples/checkout.feature +0 -0
  231. /package/{.agents/skills/02-test-design → test-design/bdd-gherkin}/gherkin-to-suite/examples/suite_report_sample.json +0 -0
  232. /package/{.agents → test-design/bdd-gherkin}/workflows/generate_cross_module_test_plan.md +0 -0
  233. /package/{.agents → test-design/bdd-gherkin}/workflows/generate_testcases_from_requirements.md +0 -0
  234. /package/{.agents/skills/02-test-design → test-design/exploratory}/tot-exploratory-testing/SKILL.md +0 -0
  235. /package/{.agents/skills/02-test-design → test-design/exploratory}/tot-exploratory-testing/examples/payment_gateway_tot_tree.json +0 -0
  236. /package/{.agents/skills/02-test-design → test-design/exploratory}/tot-exploratory-testing/examples/tot_graph_sample.json +0 -0
  237. /package/{.agents/skills/02-test-design → test-design/manual-rbt}/rbt-manual-testing/examples/checkout_rbt_manual_suite.md +0 -0
  238. /package/{.agents/skills/02-test-design → test-design/manual-rbt}/rbt-manual-testing/references/field_validation_checklist.md +0 -0
  239. /package/{.agents → test-design/manual-rbt}/workflows/export_testcases_excel.md +0 -0
  240. /package/{.agents → test-design/manual-rbt}/workflows/generate_manual_testcases_rbt.md +0 -0
  241. /package/{.agents/skills/07-data-and-state → test-design/test-data}/db-state-verifier-and-seeder/SKILL.md +0 -0
  242. /package/{.agents/skills/07-data-and-state → test-design/test-data}/db-state-verifier-and-seeder/examples/db_fixture_seed.json +0 -0
  243. /package/{.agents/skills/07-data-and-state → test-design/test-data}/file-and-report-validator/examples/sample_export_schema.json +0 -0
  244. /package/{.agents/skills/07-data-and-state → test-design/test-data}/synthetic-test-data-generator/examples/idempotent_data_recipe.json +0 -0
  245. /package/{.agents → test-design/test-data}/workflows/generate_combinatorial_test_data.md +0 -0
  246. /package/{.agents/skills/03-api-and-contracts → testing/api-contracts}/api-network-mocking-interception/SKILL.md +0 -0
  247. /package/{.agents/skills/03-api-and-contracts → testing/api-contracts}/api-network-mocking-interception/examples/network_route_stub.json +0 -0
  248. /package/{.agents/skills/03-api-and-contracts → testing/api-contracts}/consumer-driven-contract-testing/SKILL.md +0 -0
  249. /package/{.agents/skills/03-api-and-contracts → testing/api-contracts}/consumer-driven-contract-testing/examples/order_service_pact.json +0 -0
  250. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/agentless-qa-repair/examples/healing_report_sample.json +0 -0
  251. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/agentless-qa-repair/examples/three_phase_repair_workflow.md +0 -0
  252. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/antigravity-test-sentinel/SKILL.md +0 -0
  253. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/antigravity-test-sentinel/examples/dod_gate_policy.json +0 -0
  254. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/antigravity-test-sentinel/examples/sprint_dod_enforcement.md +0 -0
  255. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/failure-autopsy-and-healing/examples/closed_loop_healing_walkthrough.md +0 -0
  256. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/failure-autopsy-and-healing/examples/sample_junit_failure.xml +0 -0
  257. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/failure-autopsy-and-healing/references/healing_matrix.md +0 -0
  258. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/failure-autopsy-and-healing/references/qa_investigation_protocol.md +0 -0
  259. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/failure-autopsy-and-healing/scripts/triage_failures.sh +0 -0
  260. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/flaky-test-sentinel-and-quarantine/SKILL.md +0 -0
  261. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/flaky-test-sentinel-and-quarantine/examples/quarantine_registry.json +0 -0
  262. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/self-healing-locator/examples/aom_diff_sample.json +0 -0
  263. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/systematic-debugging/SKILL.md +0 -0
  264. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/systematic-debugging/examples/four_phase_case.md +0 -0
  265. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/test-driven-development/SKILL.md +0 -0
  266. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/test-driven-development/examples/red_green_refactor_qa.md +0 -0
  267. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/verification-before-completion/SKILL.md +0 -0
  268. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/verification-before-completion/examples/evidence_log_example.md +0 -0
  269. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/visual-regression-sentinel/SKILL.md +0 -0
  270. /package/{.agents/skills/06-healing-and-resilience → testing/healing-resilience}/visual-regression-sentinel/examples/visual_mask_rules.json +0 -0
  271. /package/{.agents/skills/04-performance-and-load → testing/performance}/backend-load-and-stress-patterns/examples/k6_load_test_sample.js +0 -0
  272. /package/{.agents/skills/04-performance-and-load → testing/performance}/backend-load-and-stress-patterns/references/k6_load_template.js +0 -0
  273. /package/{.agents/skills/04-performance-and-load → testing/performance}/lean-impact-scoreboard/SKILL.md +0 -0
  274. /package/{.agents/skills/04-performance-and-load → testing/performance}/lean-impact-scoreboard/examples/sample_benchmark_gain.md +0 -0
  275. /package/{.agents/skills/04-performance-and-load → testing/performance}/lean-impact-scoreboard/examples/sample_scoreboard.md +0 -0
  276. /package/{.agents/skills/04-performance-and-load → testing/performance}/web-vitals-and-performance-profiler/examples/cwv_budget_policy.json +0 -0
  277. /package/{.agents/skills/04-performance-and-load → testing/performance}/web-vitals-and-performance-profiler/examples/playwright_cwv_profiler_fixture.ts +0 -0
  278. /package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/security-dast-sentinel/examples/dast_scan_config.json +0 -0
  279. /package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/security-dast-sentinel/references/AI-AND-LLM.md +0 -0
  280. /package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/security-dast-sentinel/references/ATTACK-CLASSES.md +0 -0
  281. /package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/security-dast-sentinel/references/dast_recipes.ts +0 -0
  282. /package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/skillspector-security-guard/SKILL.md +0 -0
  283. /package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/skillspector-security-guard/examples/audit_threat_vectors_report.json +0 -0
  284. /package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/skillspector-security-guard/examples/safe_mcp_config.json +0 -0
  285. /package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/wcag-audit-patterns/examples/wcag_compliance_checklist.json +0 -0
  286. /package/{.agents/skills/05-security-and-compliance → testing/security-a11y}/wcag-audit-patterns/resources/implementation-playbook.md +0 -0
  287. /package/{.agents/skills/01-web-automation → tools/benchmarks-tests}/web-agent-gym-benchmarking/SKILL.md +0 -0
  288. /package/{.agents/skills/01-web-automation → tools/benchmarks-tests}/web-agent-gym-benchmarking/examples/benchmark_report_sample.json +0 -0
  289. /package/{.agents/skills/01-web-automation → tools/benchmarks-tests}/web-agent-gym-benchmarking/examples/enterprise_tasks_suite.json +0 -0
@@ -14,7 +14,7 @@ Supports Dual-Mode:
14
14
  1. TARGET PROJECT MODE: Displays target project test suites, POM PageClasses,
15
15
  automation tech stack (Playwright/Katalon/Pytest/Cypress), in-project 10 Gates DoD,
16
16
  and active AI skill profile.
17
- 2. HUB ECOSYSTEM MODE: Displays central Synapse-Hub catalog (51 skills),
17
+ 2. HUB ECOSYSTEM MODE: Displays central Synapse-Hub catalog (57 skills),
18
18
  self-healing benchmark (25 challenges), and platform governance.
19
19
 
20
20
  Features:
@@ -1033,7 +1033,7 @@ def _get_target_gates() -> List[Dict[str, str]]:
1033
1033
  "id": "Gate 2",
1034
1034
  "name_vi": "Đường Dẫn Linh Hoạt (Path Portability)",
1035
1035
  "name_en": "Path Portability",
1036
- "desc_vi": "Không gắn cứng đường dẫn máy tính cá nhân (/Users/..., C:\\...), chạy mượt trên mọi môi trường",
1036
+ "desc_vi": "Không gắn cứng đường dẫn máy tính cá nhân tuyệt đối, chạy mượt trên mọi môi trường",
1037
1037
  "desc_en": "Zero machine-specific absolute paths in project test sources",
1038
1038
  "status": "PASS",
1039
1039
  },
@@ -1350,7 +1350,7 @@ def _build_target_translations(
1350
1350
  "th_step_status": "Trạng Thái",
1351
1351
  "th_step_details": "Chi Tiết Kỹ Thuật (OTel & AST)",
1352
1352
 
1353
- "footer_text": "Báo cáo được khởi tạo tự động bởi Synapse-Hub v4.3.1 • Bản quyền © Thế Vị (@TeeVee98) • Chuẩn Clean POM & Kiểm Thử Tự Chủ",
1353
+ "footer_text": "Báo cáo được khởi tạo tự động bởi Synapse-Hub v4.4.1 • Bản quyền © Thế Vị (@TeeVee98) • Chuẩn Clean POM & Kiểm Thử Tự Chủ",
1354
1354
  }
1355
1355
 
1356
1356
  translations_en = {
@@ -1428,7 +1428,7 @@ def _build_target_translations(
1428
1428
  "th_step_status": "Status",
1429
1429
  "th_step_details": "Technical Details (OTel & AST)",
1430
1430
 
1431
- "footer_text": "Generated automatically by Synapse-Hub v4.3.1 • Copyright © Thế Vị (@TeeVee98) • Clean POM & Autonomous Testing",
1431
+ "footer_text": "Generated automatically by Synapse-Hub v4.4.1 • Copyright © Thế Vị (@TeeVee98) • Clean POM & Autonomous Testing",
1432
1432
  }
1433
1433
 
1434
1434
  _inject_gate_translations(translations_vi, translations_en, gates)
@@ -1734,7 +1734,7 @@ def _get_hub_gates() -> List[Dict[str, str]]:
1734
1734
  "id": "Gate 2",
1735
1735
  "name_vi": "Đường Dẫn Linh Hoạt (Path Portability)",
1736
1736
  "name_en": "Path Portability",
1737
- "desc_vi": "Không gắn cứng đường dẫn máy tính cá nhân (/Users/..., C:\\...), chạy mượt trên mọi môi trường",
1737
+ "desc_vi": "Không gắn cứng đường dẫn máy tính cá nhân tuyệt đối, chạy mượt trên mọi môi trường",
1738
1738
  "desc_en": "Zero absolute machine paths across repository",
1739
1739
  "status": "PASS",
1740
1740
  },
@@ -1911,13 +1911,13 @@ def _build_hub_translations(
1911
1911
  now_str: str,
1912
1912
  bench: Dict[str, Any],
1913
1913
  gates: List[Dict[str, str]],
1914
- total_skills: int = 56,
1914
+ total_skills: int = 57,
1915
1915
  skills: Optional[List[Dict[str, Any]]] = None,
1916
1916
  ) -> Tuple[Dict[str, str], Dict[str, str]]:
1917
1917
  """Builds bilingual dictionaries for Hub Dashboard."""
1918
1918
  translations_vi = {
1919
1919
  "header_title": "Bảng Điều Hành Chất Lượng Doanh Nghiệp",
1920
- "header_subtitle": "Synapse-Hub v4.3.1 • Hệ Sinh Thái Kiểm Thử AI Agent Tự Chủ",
1920
+ "header_subtitle": "Synapse-Hub v4.4.1 • Hệ Sinh Thái Kiểm Thử AI Agent Tự Chủ",
1921
1921
  "nav_welcome": "Giới Thiệu",
1922
1922
  "meta_mode": "🏷️ Chế độ: <strong>HỆ SINH THÁI QA HUB</strong>",
1923
1923
  "meta_gen": f"🕒 Khởi tạo: <strong>{now_str}</strong>",
@@ -1987,12 +1987,12 @@ def _build_hub_translations(
1987
1987
  "th_sk_ver": "Phiên Bản",
1988
1988
  "th_sk_cap": "Khả Năng Nghiệp Vụ Cốt Lõi",
1989
1989
 
1990
- "footer_text": "Bảng Điều Hành Chất Lượng Doanh Nghiệp &bull; Synapse-Hub v4.3.1 &bull; Bản quyền &copy; Thế Vị (@TeeVee98) &bull; Hệ Thống Kiểm Thử AI Agent Tự Chủ",
1990
+ "footer_text": "Bảng Điều Hành Chất Lượng Doanh Nghiệp &bull; Synapse-Hub v4.4.1 &bull; Bản quyền &copy; Thế Vị (@TeeVee98) &bull; Hệ Thống Kiểm Thử AI Agent Tự Chủ",
1991
1991
  }
1992
1992
 
1993
1993
  translations_en = {
1994
1994
  "header_title": "Enterprise QA Executive Dashboard",
1995
- "header_subtitle": "Synapse-Hub v4.3.1 &bull; Autonomous AI Agent Testing Ecosystem",
1995
+ "header_subtitle": "Synapse-Hub v4.4.1 &bull; Autonomous AI Agent Testing Ecosystem",
1996
1996
  "nav_welcome": "Welcome",
1997
1997
  "meta_mode": "🏷️ Mode: <strong>QA HUB ECOSYSTEM</strong>",
1998
1998
  "meta_gen": f"🕒 Generated: <strong>{now_str}</strong>",
@@ -2062,7 +2062,7 @@ def _build_hub_translations(
2062
2062
  "th_sk_ver": "Version",
2063
2063
  "th_sk_cap": "Core Capabilities",
2064
2064
 
2065
- "footer_text": "Enterprise QA Executive Dashboard &bull; Synapse-Hub v4.3.1 &bull; Copyright &copy; Thế Vị (@TeeVee98) &bull; Autonomous AI Agent Testing Ecosystem",
2065
+ "footer_text": "Enterprise QA Executive Dashboard &bull; Synapse-Hub v4.4.1 &bull; Copyright &copy; Thế Vị (@TeeVee98) &bull; Autonomous AI Agent Testing Ecosystem",
2066
2066
  }
2067
2067
 
2068
2068
  _inject_gate_translations(translations_vi, translations_en, gates)
@@ -2208,7 +2208,7 @@ def _render_hub_content(
2208
2208
  </div>
2209
2209
  {timeline_section_html}
2210
2210
 
2211
- <!-- 51 Specialized Skills Catalog -->
2211
+ <!-- 57 Specialized Skills Catalog -->
2212
2212
  <div class="section-header">
2213
2213
  <h2 data-i18n="sec_skills_title">{t['sec_skills_title']}</h2>
2214
2214
  <span class="section-badge" data-i18n="sec_skills_badge">{t['sec_skills_badge']}</span>
@@ -2258,7 +2258,7 @@ def generate_hub_html(
2258
2258
  now_str = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
2259
2259
  total_skills = manifest.get("totalSkills", len(manifest.get("skills", [])))
2260
2260
  if total_skills == 0:
2261
- total_skills = 56
2261
+ total_skills = 57
2262
2262
  skills = manifest.get("skills", [])
2263
2263
 
2264
2264
  gates = _get_hub_gates()
@@ -0,0 +1,460 @@
1
+ #!/usr/bin/env python3
2
+ # SPDX-FileCopyrightText: Copyright (c) 2026 Thế Vị (@TeeVee98). All rights reserved.
3
+ # SPDX-License-Identifier: MIT
4
+ # Project: Synapse-Hub (https://github.com/TeeVee98/Synapse-Hub)
5
+
6
+ """
7
+ tools/etl_data_reconciler.py — Enterprise Data Quality & ETL Reconciliation Engine
8
+ -----------------------------------------------------------------------------------
9
+ Implements standards for Data Quality & Migration Verification:
10
+ 1. ISO/IEC 25012 Data Quality Model: Evaluates 5 core inherent characteristics:
11
+ - Accuracy (syntactic & semantic conformance)
12
+ - Completeness (record count, null/empty ratio)
13
+ - Consistency (uniqueness, referential and cross-field logic)
14
+ - Currentness / Freshness (timestamp SLA vs threshold)
15
+ - Validity (domain range & enum conformance)
16
+ 2. DAMA-DMBOK ETL & Migration Reconciliation:
17
+ - Row count comparison (Source vs Target)
18
+ - Key delta detection (Dropped rows vs Ghost/Orphaned rows)
19
+ - Column value hash & cell-level difference analysis
20
+ - Numeric aggregation parity (SUM, AVG, MIN, MAX comparison)
21
+ - Schema drift & data truncation detection
22
+
23
+ Usage:
24
+ python tools/etl_data_reconciler.py --quality-audit data.json
25
+ python tools/etl_data_reconciler.py --reconcile --source source.json --target target.json --key id
26
+ python tools/etl_data_reconciler.py --reconcile --source source.csv --target target.csv --key id --gate
27
+ """
28
+
29
+ import os
30
+ import sys
31
+ import json
32
+ import csv
33
+ import hashlib
34
+ import argparse
35
+ from datetime import datetime, timezone
36
+ from typing import Dict, List, Any, Optional
37
+
38
+ # Enforce UTF-8 stdout encoding for Windows console compatibility
39
+ if hasattr(sys.stdout, "reconfigure"):
40
+ try:
41
+ sys.stdout.reconfigure(encoding="utf-8")
42
+ sys.stderr.reconfigure(encoding="utf-8")
43
+ except Exception:
44
+ pass
45
+
46
+
47
+ # ==============================================================================
48
+ # DATA INGESTION HELPERS
49
+ # ==============================================================================
50
+
51
+ def load_dataset(file_path: str) -> List[Dict[str, Any]]:
52
+ """Loads a dataset from JSON or CSV file into a list of row dicts."""
53
+ if not os.path.exists(file_path):
54
+ raise FileNotFoundError(f"Dataset file not found: {file_path}")
55
+
56
+ ext = os.path.splitext(file_path)[1].lower()
57
+ if ext == ".json":
58
+ with open(file_path, "r", encoding="utf-8", errors="ignore") as f:
59
+ data = json.load(f)
60
+ if isinstance(data, list):
61
+ return data
62
+ elif isinstance(data, dict):
63
+ # Search for first list in dict
64
+ for v in data.values():
65
+ if isinstance(v, list) and v and isinstance(v[0], dict):
66
+ return v
67
+ return [data]
68
+ elif ext in (".csv", ".tsv"):
69
+ delimiter = "\t" if ext == ".tsv" else ","
70
+ rows = []
71
+ with open(file_path, "r", encoding="utf-8", errors="ignore") as f:
72
+ reader = csv.DictReader(f, delimiter=delimiter)
73
+ for row in reader:
74
+ rows.append(dict(row))
75
+ return rows
76
+ else:
77
+ raise ValueError(f"Unsupported file format '{ext}'. Expected .json or .csv.")
78
+
79
+
80
+ def compute_row_hash(row: Dict[str, Any], excluded_keys: Optional[List[str]] = None) -> str:
81
+ """Computes a deterministic SHA-256 hash of a normalized row dictionary."""
82
+ excluded = set(excluded_keys or [])
83
+ canonical = {k: str(row[k]).strip() for k in sorted(row.keys()) if k not in excluded}
84
+ serialized = json.dumps(canonical, sort_keys=True, ensure_ascii=False)
85
+ return hashlib.sha256(serialized.encode("utf-8")).hexdigest()
86
+
87
+
88
+ # ==============================================================================
89
+ # ISO/IEC 25012 DATA QUALITY EVALUATOR
90
+ # ==============================================================================
91
+
92
+ def evaluate_iso_25012_quality(
93
+ rows: List[Dict[str, Any]],
94
+ schema_spec: Optional[Dict[str, Any]] = None,
95
+ max_freshness_hours: float = 24.0,
96
+ timestamp_col: Optional[str] = None,
97
+ ) -> Dict[str, Any]:
98
+ """
99
+ Evaluates dataset against ISO/IEC 25012 Inherent Data Quality characteristics.
100
+ Returns quantitative scores (0.0 to 100.0%) and detailed violation lists.
101
+ """
102
+ if not rows:
103
+ return {
104
+ "standard": "ISO/IEC 25012",
105
+ "overall_score": 0.0,
106
+ "total_rows": 0,
107
+ "characteristics": {},
108
+ "verdict": "FAIL_EMPTY_DATASET",
109
+ }
110
+
111
+ total_rows = len(rows)
112
+ all_columns = list(rows[0].keys())
113
+ schema = schema_spec or {}
114
+
115
+ # 1. COMPLETENESS: Ratio of non-null, non-empty cells
116
+ total_cells = total_rows * len(all_columns)
117
+ null_cells = 0
118
+ null_per_col = {col: 0 for col in all_columns}
119
+
120
+ for r in rows:
121
+ for col in all_columns:
122
+ val = r.get(col)
123
+ if val is None or str(val).strip() in ("", "NULL", "null", "None", "NaN"):
124
+ null_cells += 1
125
+ null_per_col[col] += 1
126
+
127
+ completeness_score = round(((total_cells - null_cells) / total_cells) * 100, 2)
128
+
129
+ # 2. CONSISTENCY: Uniqueness & Cross-field logic
130
+ # Check duplicate primary keys or full rows
131
+ seen_hashes = set()
132
+ duplicate_rows = 0
133
+ for r in rows:
134
+ h = compute_row_hash(r)
135
+ if h in seen_hashes:
136
+ duplicate_rows += 1
137
+ seen_hashes.add(h)
138
+
139
+ consistency_score = round(max(0.0, ((total_rows - duplicate_rows) / total_rows) * 100), 2)
140
+
141
+ # 3. ACCURACY & VALIDITY: Type & Schema conformance
142
+ invalid_cells = 0
143
+ validity_errors = []
144
+
145
+ for idx, r in enumerate(rows):
146
+ for col, col_rules in schema.items():
147
+ if col not in r:
148
+ continue
149
+ val = r[col]
150
+ if val is None or str(val).strip() == "":
151
+ continue
152
+
153
+ expected_type = col_rules.get("type")
154
+ if expected_type == "int":
155
+ try:
156
+ int(val)
157
+ except ValueError:
158
+ invalid_cells += 1
159
+ validity_errors.append({"row": idx, "col": col, "val": val, "expected": "int"})
160
+ elif expected_type == "float":
161
+ try:
162
+ float(val)
163
+ except ValueError:
164
+ invalid_cells += 1
165
+ validity_errors.append({"row": idx, "col": col, "val": val, "expected": "float"})
166
+
167
+ allowed_enums = col_rules.get("enum")
168
+ if allowed_enums and str(val).strip() not in allowed_enums:
169
+ invalid_cells += 1
170
+ validity_errors.append({"row": idx, "col": col, "val": val, "allowed": allowed_enums})
171
+
172
+ accuracy_score = round(max(0.0, ((total_cells - invalid_cells) / total_cells) * 100), 2)
173
+
174
+ # 4. CURRENTNESS / FRESHNESS: Timestamp SLA
175
+ currentness_score = 100.0
176
+ freshness_details = "Not evaluated (no timestamp column specified)"
177
+ ts_key = timestamp_col
178
+ if not ts_key:
179
+ for candidate in ("created_at", "updated_at", "timestamp", "date", "created_date"):
180
+ if candidate in all_columns:
181
+ ts_key = candidate
182
+ break
183
+
184
+ if ts_key:
185
+ newest_ts: Optional[datetime] = None
186
+ for r in rows:
187
+ raw_ts = r.get(ts_key)
188
+ if raw_ts:
189
+ try:
190
+ dt = datetime.fromisoformat(str(raw_ts).replace("Z", "+00:00"))
191
+ if newest_ts is None or dt > newest_ts:
192
+ newest_ts = dt
193
+ except Exception:
194
+ pass
195
+
196
+ if newest_ts:
197
+ now = datetime.now(timezone.utc)
198
+ if newest_ts.tzinfo is None:
199
+ newest_ts = newest_ts.replace(tzinfo=timezone.utc)
200
+ hours_old = max(0.0, (now - newest_ts).total_seconds() / 3600.0)
201
+ if hours_old > max_freshness_hours:
202
+ decay = min(100.0, (hours_old - max_freshness_hours) * 2.0)
203
+ currentness_score = round(max(0.0, 100.0 - decay), 2)
204
+ freshness_details = f"Latest record age: {round(hours_old, 1)} hrs (SLA: <= {max_freshness_hours} hrs)"
205
+
206
+ # Overall Composite Score
207
+ weights = {"completeness": 0.30, "accuracy": 0.30, "consistency": 0.25, "currentness": 0.15}
208
+ overall_score = round(
209
+ (weights["completeness"] * completeness_score)
210
+ + (weights["accuracy"] * accuracy_score)
211
+ + (weights["consistency"] * consistency_score)
212
+ + (weights["currentness"] * currentness_score),
213
+ 2,
214
+ )
215
+
216
+ return {
217
+ "standard": "ISO/IEC 25012 Data Quality Model",
218
+ "overall_score": overall_score,
219
+ "total_rows": total_rows,
220
+ "total_columns": len(all_columns),
221
+ "characteristics": {
222
+ "completeness": {"score": completeness_score, "null_cells": null_cells, "null_by_column": null_per_col},
223
+ "consistency": {"score": consistency_score, "duplicate_rows": duplicate_rows},
224
+ "accuracy_and_validity": {"score": accuracy_score, "invalid_cells": invalid_cells, "sample_errors": validity_errors[:5]},
225
+ "currentness": {"score": currentness_score, "details": freshness_details},
226
+ },
227
+ "verdict": "PASS" if overall_score >= 85.0 else "FAIL_QUALITY_BELOW_SLA",
228
+ }
229
+
230
+
231
+ # ==============================================================================
232
+ # DAMA-DMBOK ETL RECONCILIATION & DATA MIGRATION DIFF ENGINE
233
+ # ==============================================================================
234
+
235
+ def reconcile_etl_datasets(
236
+ source_rows: List[Dict[str, Any]],
237
+ target_rows: List[Dict[str, Any]],
238
+ primary_key: str,
239
+ numeric_columns: Optional[List[str]] = None,
240
+ tolerance: float = 1e-4,
241
+ ) -> Dict[str, Any]:
242
+ """
243
+ Performs comprehensive DAMA-DMBOK Source vs Target ETL reconciliation:
244
+ 1. Row Count Parity
245
+ 2. Key Delta (Dropped vs Ghost records)
246
+ 3. Row Value Drift & Cell Differences
247
+ 4. Aggregate Financial / Numeric Parity (SUM, AVG)
248
+ 5. Schema Drift
249
+ """
250
+ source_count = len(source_rows)
251
+ target_count = len(target_rows)
252
+
253
+ # 1. Schema Drift Check
254
+ source_cols = set(source_rows[0].keys()) if source_rows else set()
255
+ target_cols = set(target_rows[0].keys()) if target_rows else set()
256
+ missing_in_target_cols = list(source_cols - target_cols)
257
+ extra_in_target_cols = list(target_cols - source_cols)
258
+
259
+ # 2. Key Mapping & Delta Analysis
260
+ source_map: Dict[str, Dict[str, Any]] = {}
261
+ for r in source_rows:
262
+ k = str(r.get(primary_key, "")).strip()
263
+ if k:
264
+ source_map[k] = r
265
+
266
+ target_map: Dict[str, Dict[str, Any]] = {}
267
+ for r in target_rows:
268
+ k = str(r.get(primary_key, "")).strip()
269
+ if k:
270
+ target_map[k] = r
271
+
272
+ source_keys = set(source_map.keys())
273
+ target_keys = set(target_map.keys())
274
+
275
+ dropped_keys = list(source_keys - target_keys)
276
+ ghost_keys = list(target_keys - source_keys)
277
+ common_keys = source_keys.intersection(target_keys)
278
+
279
+ # 3. Value Drift / Cell Differences across common records
280
+ mutated_records = []
281
+ for k in sorted(common_keys):
282
+ s_row = source_map[k]
283
+ t_row = target_map[k]
284
+ diffs = {}
285
+ for col in source_cols.intersection(target_cols):
286
+ s_val = str(s_row.get(col, "")).strip()
287
+ t_val = str(t_row.get(col, "")).strip()
288
+ if s_val != t_val:
289
+ diffs[col] = {"source": s_val, "target": t_val}
290
+
291
+ if diffs:
292
+ mutated_records.append({
293
+ "key": k,
294
+ "differences_count": len(diffs),
295
+ "differences": diffs,
296
+ })
297
+
298
+ # 4. Numeric Aggregation Parity (e.g. Total Revenue, Quantities)
299
+ agg_parity = {}
300
+ if numeric_columns:
301
+ for num_col in numeric_columns:
302
+ if num_col in source_cols and num_col in target_cols:
303
+ s_vals = []
304
+ for r in source_rows:
305
+ try:
306
+ s_vals.append(float(r[num_col]))
307
+ except (ValueError, TypeError):
308
+ pass
309
+
310
+ t_vals = []
311
+ for r in target_rows:
312
+ try:
313
+ t_vals.append(float(r[num_col]))
314
+ except (ValueError, TypeError):
315
+ pass
316
+
317
+ s_sum = round(sum(s_vals), 4)
318
+ t_sum = round(sum(t_vals), 4)
319
+ diff = round(abs(s_sum - t_sum), 4)
320
+ is_equal = diff <= tolerance
321
+
322
+ agg_parity[num_col] = {
323
+ "source_sum": s_sum,
324
+ "target_sum": t_sum,
325
+ "difference": diff,
326
+ "is_balanced": is_equal,
327
+ }
328
+
329
+ # Reconciliation Verdict
330
+ is_reconciled = (
331
+ (source_count == target_count)
332
+ and (len(dropped_keys) == 0)
333
+ and (len(ghost_keys) == 0)
334
+ and (len(mutated_records) == 0)
335
+ and all(agg["is_balanced"] for agg in agg_parity.values())
336
+ )
337
+
338
+ return {
339
+ "standard": "DAMA-DMBOK Data Reconciliation & Migration Framework",
340
+ "is_reconciled": is_reconciled,
341
+ "primary_key": primary_key,
342
+ "row_counts": {
343
+ "source": source_count,
344
+ "target": target_count,
345
+ "variance": target_count - source_count,
346
+ },
347
+ "key_deltas": {
348
+ "dropped_in_target_count": len(dropped_keys),
349
+ "dropped_sample": dropped_keys[:5],
350
+ "ghost_in_target_count": len(ghost_keys),
351
+ "ghost_sample": ghost_keys[:5],
352
+ },
353
+ "data_mutations": {
354
+ "mutated_records_count": len(mutated_records),
355
+ "sample_mutations": mutated_records[:3],
356
+ },
357
+ "schema_drift": {
358
+ "missing_in_target_columns": missing_in_target_cols,
359
+ "extra_in_target_columns": extra_in_target_cols,
360
+ },
361
+ "numeric_aggregation_parity": agg_parity,
362
+ }
363
+
364
+
365
+ # ==============================================================================
366
+ # CLI HANDLER
367
+ # ==============================================================================
368
+
369
+ def main():
370
+ parser = argparse.ArgumentParser(
371
+ description="Synapse Hub Data Quality (ISO 25012) & ETL Reconciliation (DAMA-DMBOK) Engine",
372
+ formatter_class=argparse.RawDescriptionHelpFormatter,
373
+ )
374
+ parser.add_argument("--quality-audit", help="Path to JSON/CSV dataset to audit for ISO 25012 data quality")
375
+ parser.add_argument("--reconcile", action="store_true", help="Execute DAMA-DMBOK source vs target reconciliation")
376
+ parser.add_argument("--source", help="Path to Source dataset (JSON or CSV)")
377
+ parser.add_argument("--target", help="Path to Target dataset (JSON or CSV)")
378
+ parser.add_argument("--key", default="id", help="Primary Key column name for reconciliation (default: 'id')")
379
+ parser.add_argument("--num-cols", help="Comma-separated numeric columns to verify aggregation parity")
380
+ parser.add_argument("--gate", action="store_true", help="Quality Gate: Exit code 1 if reconciliation or quality fails")
381
+ parser.add_argument("--json", action="store_true", help="Output results in JSON format")
382
+
383
+ args = parser.parse_args()
384
+
385
+ if args.quality_audit:
386
+ try:
387
+ rows = load_dataset(args.quality_audit)
388
+ res = evaluate_iso_25012_quality(rows)
389
+ except Exception as e:
390
+ print(f"❌ Error loading dataset: {e}", file=sys.stderr)
391
+ return 2
392
+
393
+ if args.json:
394
+ print(json.dumps(res, indent=2, ensure_ascii=False))
395
+ else:
396
+ c = res["characteristics"]
397
+ print("=" * 72)
398
+ print(" SYNAPSE HUB — ISO/IEC 25012 DATA QUALITY SCORECARD")
399
+ print("=" * 72)
400
+ print(f" Target File : {args.quality_audit}")
401
+ print(f" Total Rows / Cols : {res['total_rows']} rows / {res['total_columns']} cols")
402
+ print(f" Overall Quality Score: \033[1m{res['overall_score']}%\033[0m ({res['verdict']})")
403
+ print("-" * 72)
404
+ print(f" - Completeness : {c['completeness']['score']}% ({c['completeness']['null_cells']} nulls)")
405
+ print(f" - Consistency : {c['consistency']['score']}% ({c['consistency']['duplicate_rows']} duplicates)")
406
+ print(f" - Accuracy & Validity: {c['accuracy_and_validity']['score']}%")
407
+ print(f" - Currentness SLA : {c['currentness']['score']}% ({c['currentness']['details']})")
408
+ print("=" * 72)
409
+
410
+ if args.gate and res["overall_score"] < 85.0:
411
+ print("🚨 Quality Gate Failed: ISO 25012 quality score below 85.0% SLA threshold!", file=sys.stderr)
412
+ return 1
413
+ return 0
414
+
415
+ if args.reconcile:
416
+ if not args.source or not args.target:
417
+ print("❌ Error: Both --source and --target datasets are required for reconciliation.", file=sys.stderr)
418
+ return 2
419
+
420
+ try:
421
+ s_rows = load_dataset(args.source)
422
+ t_rows = load_dataset(args.target)
423
+ except Exception as e:
424
+ print(f"❌ Error loading datasets: {e}", file=sys.stderr)
425
+ return 2
426
+
427
+ num_cols = [c.strip() for c in args.num_cols.split(",")] if args.num_cols else None
428
+ res = reconcile_etl_datasets(s_rows, t_rows, primary_key=args.key, numeric_columns=num_cols)
429
+
430
+ if args.json:
431
+ print(json.dumps(res, indent=2, ensure_ascii=False))
432
+ else:
433
+ status = "\033[92m[RECONCILED]\033[0m" if res["is_reconciled"] else "\033[91m[DISCREPANCY DETECTED]\033[0m"
434
+ print("=" * 74)
435
+ print(" SYNAPSE HUB — DAMA-DMBOK ETL & DATA MIGRATION RECONCILIATION")
436
+ print("=" * 74)
437
+ print(f" Reconciliation Status: {status}")
438
+ print(f" Source vs Target Rows: {res['row_counts']['source']} vs {res['row_counts']['target']} (Variance: {res['row_counts']['variance']})")
439
+ print(f" Dropped Records (Loss): {res['key_deltas']['dropped_in_target_count']}")
440
+ print(f" Ghost Records (Orphan): {res['key_deltas']['ghost_in_target_count']}")
441
+ print(f" Mutated Value Records : {res['data_mutations']['mutated_records_count']}")
442
+ if res["numeric_aggregation_parity"]:
443
+ print("-" * 74)
444
+ print(" Numeric Financial / Metric Balance:")
445
+ for col, bal in res["numeric_aggregation_parity"].items():
446
+ b_str = "\033[92mBALANCED\033[0m" if bal["is_balanced"] else "\033[91mUNBALANCED\033[0m"
447
+ print(f" - {col}: Src={bal['source_sum']} | Tgt={bal['target_sum']} | Diff={bal['difference']} -> {b_str}")
448
+ print("=" * 74)
449
+
450
+ if args.gate and not res["is_reconciled"]:
451
+ print("🚨 Quality Gate Failed: Data discrepancy detected during ETL reconciliation!", file=sys.stderr)
452
+ return 1
453
+ return 0
454
+
455
+ parser.print_help()
456
+ return 2
457
+
458
+
459
+ if __name__ == "__main__":
460
+ sys.exit(main())
@@ -71,14 +71,14 @@ def compute_workload_stages(workload_profile: str, vus: int, ramp_up: int, durat
71
71
  (threads, ramp, hold, delay) so staged load works on vanilla JMeter 5.x
72
72
  without plugins. Linear/soak return a single stage (behavior unchanged).
73
73
  """
74
- if workload_profile == "step":
75
- step_count = 4
74
+ if workload_profile in ("step", "scalability"):
75
+ step_count = 5 if workload_profile == "scalability" else 4
76
76
  per_step = max(1, (vus + step_count - 1) // step_count)
77
77
  window_ramp = max(1, min(10, ramp_up))
78
78
  window_hold = max(30, duration // step_count)
79
79
  stages = []
80
80
  for i in range(step_count):
81
- threads = min(per_step * (i + 1), vus)
81
+ threads = min(per_step * (i + 1), int(vus * 1.25) if workload_profile == "scalability" else vus)
82
82
  stages.append({"threads": threads, "ramp": window_ramp,
83
83
  "hold": window_hold, "delay": i * (window_ramp + window_hold)})
84
84
  return stages
@@ -247,6 +247,11 @@ def build_jmx_xml(
247
247
  ' <stringProp name="Header.name">X-CSRF-Token</stringProp>',
248
248
  ' <stringProp name="Header.value">${CSRF_TOKEN}</stringProp>',
249
249
  ' </elementProp>',
250
+ ' <!-- W3C Trace Context & OpenTelemetry Distributed Tracing (APM Standard) -->',
251
+ ' <elementProp name="" elementType="Header">',
252
+ ' <stringProp name="Header.name">traceparent</stringProp>',
253
+ ' <stringProp name="Header.value">00-${__UUID()}-0000000000000001-01</stringProp>',
254
+ ' </elementProp>',
250
255
  ' </collectionProp>',
251
256
  ' </HeaderManager>',
252
257
  ' <hashTree/>',
@@ -506,6 +511,9 @@ def build_jmx_xml(
506
511
  'sampler.getHeaderManager().add(new org.apache.jmeter.protocol.http.control.Header("X-Signature", signature))',
507
512
  'sampler.getHeaderManager().add(new org.apache.jmeter.protocol.http.control.Header("X-Timestamp", timestamp))',
508
513
  'sampler.getHeaderManager().add(new org.apache.jmeter.protocol.http.control.Header("X-Correlation-ID", "CORR-" + UUID.randomUUID().toString()))',
514
+ 'String traceId = UUID.randomUUID().toString().replace("-", "")',
515
+ 'String spanId = UUID.randomUUID().toString().replace("-", "").substring(0, 16)',
516
+ 'sampler.getHeaderManager().add(new org.apache.jmeter.protocol.http.control.Header("traceparent", "00-" + traceId + "-" + spanId + "-01"))',
509
517
  ']]></stringProp>',
510
518
  ' </JSR223PreProcessor>',
511
519
  ' <hashTree/>'
@@ -1149,7 +1157,7 @@ def main():
1149
1157
  parser.add_argument("--csv-vars", default="username,password,entity_id", help="Comma-separated variable names for CSV Data Set.")
1150
1158
  parser.add_argument("--group-transactions", action="store_true", help="Wrap endpoints in Transaction Controllers to measure end-to-end flow SLA.")
1151
1159
  parser.add_argument("--weighted-mix", help="Traffic shaping weight mix, e.g. '70,20,10' or '70:Browse,20:Cart,10:Checkout'.")
1152
- parser.add_argument("--workload", choices=["linear", "step", "spike", "soak"], default="linear", help="Workload profile shape.")
1160
+ parser.add_argument("--workload", choices=["linear", "step", "spike", "soak", "scalability"], default="linear", help="Workload profile shape.")
1153
1161
  parser.add_argument("--jsr223-hmac", action="store_true", help="Inject JSR223 Groovy PreProcessor for HMAC-SHA256 payload signatures.")
1154
1162
  parser.add_argument("--influxdb-url", help="InfluxDB HTTP metrics endpoint for live Grafana APM dashboard streaming.")
1155
1163
  parser.add_argument("--perfmon-server", help="PerfMon Server Agent host:port (e.g. 192.168.1.100:4444) for hardware telemetry.")