@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
@@ -0,0 +1,306 @@
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
+ Pre-Push Quality & Anti-Hallucination Guard (Multi-Session Audit)
8
+ ---------------------------------------------------------------
9
+ Automatically intercepts git push events to perform multi-stage verification:
10
+ Stage 1: Multi-Session Transcript Audit (Audits the 3 most recent Antigravity sessions).
11
+ Stage 2: Adversarial Injection & Prompt Security Scan across recent session logs.
12
+ Stage 3: Repository Definition-of-Done Quality Gates (Zero BOM, Credential Leaks).
13
+ Stage 4: Automated Regression Test Execution (Pytest Exit Code 0).
14
+
15
+ Usage:
16
+ python tools/pre_push_guard.py [--sessions 3] [--strict] [--install-hook] [--skip-tests]
17
+ """
18
+
19
+ import os
20
+ import sys
21
+ import glob
22
+ import subprocess
23
+ import argparse
24
+ from typing import Dict, Any, List, Tuple, Optional
25
+
26
+ # Enforce UTF-8 stdout encoding
27
+ for stream in (sys.stdout, sys.stderr):
28
+ if hasattr(stream, 'reconfigure'):
29
+ try:
30
+ stream.reconfigure(encoding='utf-8', line_buffering=True)
31
+ except Exception:
32
+ pass
33
+
34
+ try:
35
+ from tools.ai_eval_sentinel import audit_agent_transcript, detect_adversarial_injection
36
+ from tools.verify_all import gate_1_bom_check, gate_6_credential_security
37
+ except ImportError:
38
+ # Handle direct script execution vs package import
39
+ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
40
+ from tools.ai_eval_sentinel import audit_agent_transcript, detect_adversarial_injection
41
+ from tools.verify_all import gate_1_bom_check, gate_6_credential_security
42
+
43
+
44
+ def resolve_brain_directory() -> str:
45
+ """Locate the Antigravity brain storage directory cross-platform."""
46
+ candidates = [
47
+ os.path.expanduser("~/.gemini/antigravity/brain"),
48
+ os.path.join(os.environ.get("USERPROFILE", ""), ".gemini", "antigravity", "brain"),
49
+ os.path.join(os.environ.get("HOME", ""), ".gemini", "antigravity", "brain"),
50
+ ]
51
+ for candidate in candidates:
52
+ if candidate and os.path.exists(candidate) and os.path.isdir(candidate):
53
+ return os.path.abspath(candidate)
54
+ return candidates[0]
55
+
56
+
57
+ def find_recent_sessions(limit: int = 3, brain_dir: Optional[str] = None) -> List[Dict[str, Any]]:
58
+ """Discover the N most recent Antigravity conversation sessions containing transcripts."""
59
+ target_dir = brain_dir or resolve_brain_directory()
60
+ if not os.path.exists(target_dir):
61
+ return []
62
+
63
+ sessions = []
64
+ for item in glob.glob(os.path.join(target_dir, "*")):
65
+ if not os.path.isdir(item):
66
+ continue
67
+ transcript_path = os.path.join(item, ".system_generated", "logs", "transcript.jsonl")
68
+ if os.path.exists(transcript_path) and os.path.getsize(transcript_path) > 0:
69
+ mtime = os.path.getmtime(transcript_path)
70
+ sessions.append({
71
+ "conversation_id": os.path.basename(item),
72
+ "directory": item,
73
+ "transcript_path": transcript_path,
74
+ "modified_time": mtime,
75
+ })
76
+
77
+ # Sort descending by modification time
78
+ sessions.sort(key=lambda s: float(s.get("modified_time", 0.0)), reverse=True)
79
+ return sessions[:limit]
80
+
81
+
82
+ def audit_recent_sessions(
83
+ sessions: List[Dict[str, Any]],
84
+ strict: bool = False,
85
+ min_faithfulness: float = 20.0
86
+ ) -> Dict[str, Any]:
87
+ """Audit the selected sessions for hallucinations, prompt injections, and evidence grounding."""
88
+ results = []
89
+ passed = True
90
+ total_injections = 0
91
+
92
+ for s in sessions:
93
+ audit_res = audit_agent_transcript(s["transcript_path"])
94
+ f_rate = audit_res.get("overall_faithfulness_rate", 0.0)
95
+ turns = audit_res.get("total_conversation_turns", 0)
96
+
97
+ # Check for adversarial prompt injection in user turns
98
+ injections_found = 0
99
+ for turn in audit_res.get("turns_evaluation", []):
100
+ prompt = turn.get("query_summary", "")
101
+ is_injected, _ = detect_adversarial_injection(prompt)
102
+ if is_injected:
103
+ injections_found += 1
104
+
105
+ total_injections += injections_found
106
+ session_passed = True
107
+ reasons = []
108
+
109
+ # Evaluation status classification
110
+ if injections_found > 0:
111
+ session_passed = False
112
+ reasons.append(f"{injections_found} adversarial prompt injection(s) detected")
113
+ status_label = "❌ INJECTION_DETECTED"
114
+ elif strict and f_rate < min_faithfulness:
115
+ session_passed = False
116
+ reasons.append(f"Faithfulness rate {f_rate:.1f}% below strict threshold {min_faithfulness}%")
117
+ status_label = "❌ FAIL (Strict Threshold)"
118
+ elif f_rate >= 60.0:
119
+ status_label = "✅ HIGH_GROUNDING"
120
+ elif f_rate >= 20.0:
121
+ status_label = "ℹ️ ADVISORY (Bilingual/Prose)"
122
+ else:
123
+ status_label = "⚠️ LOW_OVERLAP"
124
+
125
+ if not session_passed:
126
+ passed = False
127
+
128
+ results.append({
129
+ "conversation_id": s["conversation_id"],
130
+ "turns": turns,
131
+ "faithfulness_rate": f_rate,
132
+ "injections": injections_found,
133
+ "passed": session_passed,
134
+ "status_label": status_label,
135
+ "reasons": reasons,
136
+ "transcript_path": s["transcript_path"],
137
+ })
138
+
139
+ return {
140
+ "audited_count": len(sessions),
141
+ "all_passed": passed,
142
+ "total_injections": total_injections,
143
+ "sessions": results,
144
+ }
145
+
146
+
147
+ def verify_quality_gates(repo_root: Optional[str] = None) -> Tuple[bool, List[str]]:
148
+ """Execute Gate 1 (Zero BOM) and Gate 6 (Secret Scan) using canonical Synapse DoD verifiers."""
149
+ root = repo_root or os.getcwd()
150
+ issues = []
151
+
152
+ try:
153
+ g1_pass = gate_1_bom_check(root)
154
+ if not g1_pass:
155
+ issues.append("Gate 1 (Zero BOM) FAILED: Found BOM or encoding defects in repository.")
156
+ except Exception as e:
157
+ issues.append(f"Gate 1 check error: {e}")
158
+
159
+ try:
160
+ g6_pass = gate_6_credential_security(root, mode="hub")
161
+ if not g6_pass:
162
+ issues.append("Gate 6 (Credential Security) FAILED: Potential plaintext secrets detected.")
163
+ except Exception as e:
164
+ issues.append(f"Gate 6 check error: {e}")
165
+
166
+ return len(issues) == 0, issues
167
+
168
+
169
+ def run_regression_tests(repo_root: Optional[str] = None) -> Tuple[bool, str]:
170
+ """Execute pytest regression test suite."""
171
+ root = repo_root or os.getcwd()
172
+ cmd = [sys.executable, "-m", "pytest", "tests/test_cvss_calculator.py",
173
+ "tests/test_asvs_auditor.py", "tests/test_vpat_exporter.py",
174
+ "tests/test_regulatory_compliance.py", "tests/test_cldr_l10n_verifier.py",
175
+ "tests/test_ai_eval_sentinel.py", "tests/test_etl_data_reconciler.py",
176
+ "tests/test_tmmi_auditor.py", "tests/test_pre_push_guard.py", "-q"]
177
+ try:
178
+ proc = subprocess.run(
179
+ cmd,
180
+ cwd=root,
181
+ capture_output=True,
182
+ text=True,
183
+ timeout=60,
184
+ )
185
+ return proc.returncode == 0, proc.stdout or proc.stderr
186
+ except Exception as e:
187
+ return False, str(e)
188
+
189
+
190
+ def install_git_pre_push_hook(repo_root: Optional[str] = None, session_count: int = 3) -> Tuple[bool, str]:
191
+ """Install the pre-push hook script into .git/hooks/pre-push."""
192
+ root = repo_root or os.getcwd()
193
+ hooks_dir = os.path.join(root, ".git", "hooks")
194
+ if not os.path.exists(hooks_dir):
195
+ return False, f"Not a git repository or .git/hooks missing at: {hooks_dir}"
196
+
197
+ hook_path = os.path.join(hooks_dir, "pre-push")
198
+ hook_content = f"""#!/bin/sh
199
+ # Synapse Hub Automated Pre-Push Guard (Multi-Session Audit)
200
+ # Auto-generated by tools/pre_push_guard.py
201
+
202
+ echo "=========================================================================="
203
+ echo " 🛡️ SYNAPSE HUB — PRE-PUSH QUALITY GATE & AUDIT ({session_count} RECENT SESSIONS)"
204
+ echo "=========================================================================="
205
+
206
+ python tools/pre_push_guard.py --sessions {session_count}
207
+ EXIT_CODE=$?
208
+
209
+ if [ $EXIT_CODE -ne 0 ]; then
210
+ echo ""
211
+ echo "❌ [PRE-PUSH REJECTED] Automated verification failed! Push blocked."
212
+ echo " Please review the errors above and fix before pushing."
213
+ exit 1
214
+ fi
215
+
216
+ echo ""
217
+ echo "✅ [PRE-PUSH APPROVED] All {session_count} sessions audited & Quality Gates passed!"
218
+ exit 0
219
+ """
220
+ try:
221
+ with open(hook_path, "w", encoding="utf-8", newline="\n") as fp:
222
+ fp.write(hook_content)
223
+
224
+ # On POSIX / Git Bash, make it executable
225
+ try:
226
+ os.chmod(hook_path, 0o755)
227
+ except Exception:
228
+ pass
229
+
230
+ return True, hook_path
231
+ except Exception as e:
232
+ return False, str(e)
233
+
234
+
235
+ def main():
236
+ parser = argparse.ArgumentParser(description="Synapse Hub Pre-Push Multi-Session Audit & Quality Gate")
237
+ parser.add_argument("--sessions", "-n", type=int, default=3, help="Number of recent Antigravity sessions to audit (default: 3)")
238
+ parser.add_argument("--strict", action="store_true", help="Enforce strict faithfulness score thresholds")
239
+ parser.add_argument("--skip-tests", action="store_true", help="Skip running pytest regression suite")
240
+ parser.add_argument("--install-hook", action="store_true", help="Install this guard as the git pre-push hook")
241
+ args = parser.parse_args()
242
+
243
+ if args.install_hook:
244
+ ok, msg = install_git_pre_push_hook(session_count=args.sessions)
245
+ if ok:
246
+ print(f"✅ Git pre-push hook successfully installed at: {msg}")
247
+ sys.exit(0)
248
+ else:
249
+ print(f"❌ Failed to install git pre-push hook: {msg}", file=sys.stderr)
250
+ sys.exit(1)
251
+
252
+ print("=" * 74)
253
+ print(" 🛡️ SYNAPSE HUB — PRE-PUSH MULTI-SESSION AUDIT & QUALITY GATE")
254
+ print("=" * 74)
255
+
256
+ # Stage 1 & 2: Audit Recent Sessions
257
+ print(f"\n[Stage 1/3] Discovering & Auditing {args.sessions} Most Recent Sessions...")
258
+ sessions = find_recent_sessions(limit=args.sessions)
259
+ if not sessions:
260
+ print(" ⚠️ No Antigravity conversation sessions found. Proceeding with quality gates.")
261
+ else:
262
+ print(f" Found {len(sessions)} session(s):")
263
+ audit_res = audit_recent_sessions(sessions, strict=args.strict)
264
+ for idx, s in enumerate(audit_res["sessions"], 1):
265
+ short_id = s["conversation_id"][:12] + "..."
266
+ status = s.get("status_label", "✅ PASS" if s["passed"] else "⚠️ FLAGGED")
267
+ print(f" {idx}. Session [{short_id}] | Turns: {s['turns']} | Faithfulness: {s['faithfulness_rate']:.1f}% | Injections: {s['injections']} | {status}")
268
+ if s["reasons"]:
269
+ for r in s["reasons"]:
270
+ print(f" -> {r}")
271
+
272
+ if not audit_res["all_passed"]:
273
+ print(f"\n❌ [PRE-PUSH REJECTED] Session audit failed: {audit_res['total_injections']} injection(s) detected.", file=sys.stderr)
274
+ sys.exit(1)
275
+
276
+ # Stage 3: Quality Gates (Zero BOM, Credentials)
277
+ print("\n[Stage 2/3] Verifying Definition-of-Done Quality Gates...")
278
+ qg_ok, qg_issues = verify_quality_gates()
279
+ if not qg_ok:
280
+ for issue in qg_issues:
281
+ print(f" ❌ {issue}", file=sys.stderr)
282
+ print("\n❌ [PRE-PUSH REJECTED] Definition-of-Done Quality Gate violation.", file=sys.stderr)
283
+ sys.exit(1)
284
+ print(" ✅ Gate 1 (Zero BOM): PASS")
285
+ print(" ✅ Gate 6 (Credential Security): PASS")
286
+
287
+ # Stage 4: Automated Regression Tests
288
+ if not args.skip_tests:
289
+ print("\n[Stage 3/3] Running Automated Regression Test Suite...")
290
+ tests_ok, test_out = run_regression_tests()
291
+ if not tests_ok:
292
+ print(f" ❌ Regression tests failed:\n{test_out}", file=sys.stderr)
293
+ print("\n❌ [PRE-PUSH REJECTED] Test failures detected.", file=sys.stderr)
294
+ sys.exit(1)
295
+ print(f" ✅ Regression Suite: PASS ({test_out.strip()})")
296
+ else:
297
+ print("\n[Stage 3/3] Regression Test Suite: SKIPPED (--skip-tests)")
298
+
299
+ print("\n" + "=" * 74)
300
+ print(f" ✅ [PRE-PUSH APPROVED] All {len(sessions)} sessions & Quality Gates certified!")
301
+ print("=" * 74)
302
+ sys.exit(0)
303
+
304
+
305
+ if __name__ == "__main__":
306
+ main()
@@ -165,34 +165,41 @@ def read_state(target_dir):
165
165
  return f.read()
166
166
 
167
167
 
168
- if __name__ == "__main__":
169
- if len(sys.argv) > 1 and sys.argv[1] in ("-h", "--help"):
168
+ def main(argv=None):
169
+ if argv is None:
170
+ argv = sys.argv[1:]
171
+ if argv and argv[0] in ("-h", "--help"):
170
172
  print("Usage: python3 tools/project_state.py [status|init|update] [target_dir]")
171
173
  print("Initializes, verifies, or inspects the rolling-window PROJECT_STATE.md anchor.")
172
- sys.exit(0)
174
+ return 0
173
175
 
174
- arg1 = sys.argv[1] if len(sys.argv) > 1 else "status"
176
+ arg1 = argv[0] if argv else "status"
175
177
 
176
178
  if arg1 == "status":
177
- target = sys.argv[2] if len(sys.argv) > 2 else os.getcwd()
179
+ target = argv[1] if len(argv) > 1 else os.getcwd()
178
180
  state = read_state(target)
179
181
  if state is None:
180
182
  init_state(target)
181
183
  state = read_state(target)
182
184
  print(state)
183
- sys.exit(0)
185
+ return 0
184
186
  elif arg1 == "init":
185
- target = sys.argv[2] if len(sys.argv) > 2 else os.getcwd()
187
+ target = argv[1] if len(argv) > 1 else os.getcwd()
186
188
  sf = init_state(target)
187
189
  print(f"Project state anchor initialized at: {sf}")
188
- sys.exit(0)
190
+ return 0
189
191
  elif arg1 == "update":
190
- target = sys.argv[2] if len(sys.argv) > 2 else os.getcwd()
192
+ target = argv[1] if len(argv) > 1 else os.getcwd()
191
193
  sf = update_state(target)
192
194
  print(f"Project state anchor updated at: {sf}")
193
- sys.exit(0)
195
+ return 0
194
196
  else:
195
197
  # Default: treat argument as target_dir
196
198
  target = arg1
197
199
  sf = init_state(target)
198
200
  print(f"Project state anchor initialized at: {sf}")
201
+ return 0
202
+
203
+
204
+ if __name__ == "__main__":
205
+ sys.exit(main())