@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
@@ -480,14 +480,70 @@ def format_markdown_catalog(catalog: Dict[str, Any]) -> str:
480
480
  return "\n".join(md)
481
481
 
482
482
 
483
+ def generate_tool_index(catalog: Dict[str, Any]) -> Dict[str, Any]:
484
+ """Generates Tier-1 lightweight tool index grouped by owner_role (< 12 KB)."""
485
+ import re
486
+ personas = [
487
+ "orchestrator", "live-explorer", "pom-crafter", "test-runner",
488
+ "failure-analyst", "quality-gatekeeper", "api-engineer",
489
+ "perf-engineer", "test-designer"
490
+ ]
491
+ by_role: Dict[str, Dict[str, str]] = {p: {} for p in personas}
492
+ for t in catalog["tools"]:
493
+ role = t.get("owner_role", "orchestrator")
494
+ if role not in by_role:
495
+ by_role[role] = {}
496
+ desc = t.get("description", "").strip()
497
+ if "—" in desc:
498
+ desc = desc.split("—", 1)[1].strip()
499
+ desc = re.sub(r"\s+", " ", desc)
500
+ if len(desc) > 32:
501
+ desc = desc[:30] + ".."
502
+ cmd = t.get("command", "")
503
+ by_role[role][cmd] = desc
504
+ return by_role
505
+
506
+
507
+ def shard_catalogs(catalog: Dict[str, Any], catalogs_dir: str) -> int:
508
+ """Shards full schemas into per-category Tier-2 catalogs."""
509
+ import re
510
+ os.makedirs(catalogs_dir, exist_ok=True)
511
+ by_category: Dict[str, list] = {}
512
+ for t in catalog["tools"]:
513
+ cat = t.get("category", "Auxiliary Utilities")
514
+ by_category.setdefault(cat, []).append(t)
515
+
516
+ for cat, tools in by_category.items():
517
+ slug = re.sub(r"[^a-zA-Z0-9]+", "_", cat.strip()).lower().strip("_")
518
+ cat_file = os.path.join(catalogs_dir, f"{slug}.json")
519
+ payload = {
520
+ "category": cat,
521
+ "total_tools": len(tools),
522
+ "tools": tools
523
+ }
524
+ with open(cat_file, "w", encoding="utf-8") as f:
525
+ json.dump(payload, f, indent=2, ensure_ascii=False)
526
+ return len(by_category)
527
+
528
+
483
529
  def main() -> int:
484
530
  catalog = build_catalog()
485
531
 
486
- # Write JSON catalog
532
+ # Write Tier-2 Full JSON catalog
487
533
  json_path = os.path.join(TOOLS_DIR, "TOOL_CATALOG.json")
488
534
  with open(json_path, "w", encoding="utf-8") as f:
489
535
  json.dump(catalog, f, indent=2, ensure_ascii=False)
490
536
 
537
+ # Write Tier-1 Lightweight JSON index
538
+ index_path = os.path.join(TOOLS_DIR, "TOOL_INDEX.json")
539
+ tool_index = generate_tool_index(catalog)
540
+ with open(index_path, "w", encoding="utf-8") as f:
541
+ json.dump(tool_index, f, indent=2, ensure_ascii=False)
542
+
543
+ # Write Tier-2 Per-Category Sharded catalogs
544
+ catalogs_dir = os.path.join(TOOLS_DIR, "catalogs")
545
+ sharded_count = shard_catalogs(catalog, catalogs_dir)
546
+
491
547
  # Write Markdown catalog
492
548
  docs_dir = os.path.join(REPO_ROOT, "docs")
493
549
  os.makedirs(docs_dir, exist_ok=True)
@@ -501,7 +557,9 @@ def main() -> int:
501
557
  print(f" Indexed Tools : {catalog['total_tools']} tools")
502
558
  print(f" Stable Tools : {catalog['stable_count']} (Production Ready)")
503
559
  print(f" Experimental Tools : {catalog['experimental_count']}")
504
- print(f" JSON Catalog : {os.path.relpath(json_path, REPO_ROOT)}")
560
+ print(f" JSON Catalog (T2) : {os.path.relpath(json_path, REPO_ROOT)}")
561
+ print(f" JSON Index (T1) : {os.path.relpath(index_path, REPO_ROOT)}")
562
+ print(f" Sharded Catalogs : {sharded_count} files in {os.path.relpath(catalogs_dir, REPO_ROOT)}")
505
563
  print(f" Markdown Runbook : {os.path.relpath(md_path, REPO_ROOT)}")
506
564
  print("=" * 68)
507
565
  print("✅ Tool catalog synchronized successfully.")
@@ -69,6 +69,8 @@ class SamplerStats:
69
69
  self.samples: int = 0
70
70
  self.errors: int = 0
71
71
  self.elapsed_times: List[float] = []
72
+ self.success_elapsed_times: List[float] = []
73
+ self.failed_elapsed_times: List[float] = []
72
74
  self.total_bytes: int = 0
73
75
  self.start_time: Optional[int] = None
74
76
  self.end_time: Optional[int] = None
@@ -76,8 +78,11 @@ class SamplerStats:
76
78
 
77
79
  def add_sample(self, elapsed: float, success: bool, timestamp: int, bytes_recv: int, response_code: str):
78
80
  self.samples += 1
79
- if not success:
81
+ if success:
82
+ self.success_elapsed_times.append(elapsed)
83
+ else:
80
84
  self.errors += 1
85
+ self.failed_elapsed_times.append(elapsed)
81
86
  self.elapsed_times.append(elapsed)
82
87
  self.total_bytes += bytes_recv
83
88
 
@@ -103,6 +108,10 @@ class SamplerStats:
103
108
  "p90_ms": 0.0,
104
109
  "p95_ms": 0.0,
105
110
  "p99_ms": 0.0,
111
+ "p999_ms": 0.0,
112
+ "p95_success_ms": 0.0,
113
+ "p99_success_ms": 0.0,
114
+ "p95_failed_ms": 0.0,
106
115
  "throughput_tps": 0.0,
107
116
  "kb_per_sec": 0.0,
108
117
  "response_codes": self.response_codes,
@@ -118,6 +127,15 @@ class SamplerStats:
118
127
  p90 = calculate_percentile(sorted_times, 90.0)
119
128
  p95 = calculate_percentile(sorted_times, 95.0)
120
129
  p99 = calculate_percentile(sorted_times, 99.0)
130
+ p999 = calculate_percentile(sorted_times, 99.9)
131
+
132
+ # Google SRE Golden Signal: Disaggregate Latency by Success vs Failure
133
+ sorted_success = sorted(self.success_elapsed_times) if self.success_elapsed_times else []
134
+ p95_success = calculate_percentile(sorted_success, 95.0) if sorted_success else p95
135
+ p99_success = calculate_percentile(sorted_success, 99.0) if sorted_success else p99
136
+
137
+ sorted_failed = sorted(self.failed_elapsed_times) if self.failed_elapsed_times else []
138
+ p95_failed = calculate_percentile(sorted_failed, 95.0) if sorted_failed else 0.0
121
139
 
122
140
  error_rate = (self.errors / count) * 100.0 if count > 0 else 0.0
123
141
 
@@ -141,6 +159,10 @@ class SamplerStats:
141
159
  "p90_ms": round(p90, 2),
142
160
  "p95_ms": round(p95, 2),
143
161
  "p99_ms": round(p99, 2),
162
+ "p999_ms": round(p999, 2),
163
+ "p95_success_ms": round(p95_success, 2),
164
+ "p99_success_ms": round(p99_success, 2),
165
+ "p95_failed_ms": round(p95_failed, 2),
144
166
  "throughput_tps": round(tps, 2),
145
167
  "kb_per_sec": round(kb_sec, 2),
146
168
  "response_codes": self.response_codes,
@@ -60,7 +60,7 @@ if hasattr(sys.stdout, 'reconfigure'):
60
60
  except Exception:
61
61
  pass
62
62
 
63
- SERVER_VERSION = "4.3.1"
63
+ SERVER_VERSION = "4.4.1"
64
64
  MAX_DOCX_SIZE = 50 * 1024 * 1024 # 50 MB
65
65
  MAX_UNCOMPRESSED_SIZE = 200 * 1024 * 1024 # 200 MB
66
66
  MAX_RATIO = 100 # 100:1 compression ratio limit
@@ -55,7 +55,7 @@ if hasattr(sys.stdout, 'reconfigure'):
55
55
  except Exception:
56
56
  pass
57
57
 
58
- SERVER_VERSION = "4.3.1"
58
+ SERVER_VERSION = "4.4.1"
59
59
  MAX_XLSX_SIZE = 50 * 1024 * 1024 # 50 MB
60
60
  MAX_UNCOMPRESSED_SIZE = 200 * 1024 * 1024 # 200 MB
61
61
  MAX_RATIO = 100 # 100:1 compression ratio limit
@@ -50,7 +50,7 @@ import gherkin_suite
50
50
  import api_fuzzer
51
51
 
52
52
  SERVER_NAME = "enterprise-agent-qa"
53
- SERVER_VERSION = "4.3.1"
53
+ SERVER_VERSION = "4.4.1"
54
54
 
55
55
  MCP_TOOLS = [
56
56
  {
@@ -813,4 +813,8 @@ def run_stdio_server():
813
813
 
814
814
 
815
815
  if __name__ == "__main__":
816
+ if any(arg in sys.argv[1:] for arg in ("--help", "-h", "-v", "--version")):
817
+ print("Synapse Hub Enterprise Model Context Protocol (FastMCP) JSON-RPC Stdio Server.")
818
+ print("Usage: python tools/mcp_server.py (Accepts JSON-RPC 2.0 frames over stdin/stdout)")
819
+ sys.exit(0)
816
820
  run_stdio_server()
@@ -0,0 +1,273 @@
1
+ #!/usr/bin/env python3
2
+ # SPDX-FileCopyrightText: © 2026 Thế Vị (@TeeVee98) <https://github.com/TeeVee98/Synapse-Hub>
3
+ # SPDX-License-Identifier: MIT
4
+ # -*- coding: utf-8 -*-
5
+
6
+ """
7
+ tools/mobile_resilience_sentinel.py — Mobile Hardware Interrupts, MASVS & HIG Sentinel
8
+ ------------------------------------------------------------------------------------
9
+ Enterprise Mobile QA Sentinel implementing:
10
+ 1. Hardware & Physical Interruption Simulation:
11
+ - Incoming phone call, SMS broadcast, low-battery warning, network drop/toggle.
12
+ 2. OWASP MASVS (Mobile Application Security Verification Standard) Audit:
13
+ - MASVS-STORAGE, MASVS-NETWORK, MASVS-RESILIENCE (Cleartext traffic, backup, debuggable).
14
+ 3. Apple HIG & Google Material Design Tap Target Size Compliance:
15
+ - iOS HIG: Minimum 44x44 pt.
16
+ - Android Material: Minimum 48x48 dp.
17
+
18
+ Usage:
19
+ python tools/mobile_resilience_sentinel.py --sample
20
+ python tools/mobile_resilience_sentinel.py --audit-manifest path/to/AndroidManifest.xml
21
+ python tools/mobile_resilience_sentinel.py --audit-plist path/to/Info.plist
22
+ python tools/mobile_resilience_sentinel.py --simulate-interrupt call --phone 0987654321
23
+ """
24
+
25
+ import sys
26
+ import argparse
27
+ from typing import Dict, List, Any
28
+
29
+ # Enforce UTF-8 stdout encoding for Windows console compatibility
30
+ if hasattr(sys.stdout, "reconfigure"):
31
+ try:
32
+ sys.stdout.reconfigure(encoding="utf-8")
33
+ sys.stderr.reconfigure(encoding="utf-8")
34
+ except Exception:
35
+ pass
36
+
37
+
38
+ class MobileInterruptSimulator:
39
+ """Generates and executes ADB/iOS device interrupt commands."""
40
+
41
+ @staticmethod
42
+ def get_interrupt_commands(interrupt_type: str, **kwargs) -> List[str]:
43
+ """
44
+ Returns CLI commands to trigger physical device interruptions.
45
+ Supported types: 'incoming_call', 'sms', 'battery_low', 'network_drop', 'background_app'
46
+ """
47
+ phone = kwargs.get("phone", "0901234567")
48
+ msg = kwargs.get("message", "Synapse QA Emergency Alert")
49
+ level = kwargs.get("battery_level", 5)
50
+
51
+ if interrupt_type == "incoming_call":
52
+ return [
53
+ f"adb emu gsm call {phone}",
54
+ ]
55
+ elif interrupt_type == "sms":
56
+ return [
57
+ f"adb emu sms send {phone} \"{msg}\"",
58
+ ]
59
+ elif interrupt_type == "battery_low":
60
+ return [
61
+ "adb shell dumpsys battery unplug",
62
+ f"adb shell dumpsys battery set level {level}",
63
+ ]
64
+ elif interrupt_type == "battery_reset":
65
+ return [
66
+ "adb shell dumpsys battery reset",
67
+ ]
68
+ elif interrupt_type == "network_drop":
69
+ return [
70
+ "adb shell svc wifi disable",
71
+ "adb shell svc data disable",
72
+ ]
73
+ elif interrupt_type == "network_restore":
74
+ return [
75
+ "adb shell svc wifi enable",
76
+ "adb shell svc data enable",
77
+ ]
78
+ elif interrupt_type == "background_app":
79
+ return [
80
+ "adb shell input keyevent 3", # KEYCODE_HOME
81
+ ]
82
+ else:
83
+ return []
84
+
85
+
86
+ class OWASPMASVSAuditor:
87
+ """Audits Mobile Manifests against OWASP MASVS Baseline Standards."""
88
+
89
+ @staticmethod
90
+ def audit_android_manifest(manifest_content: str) -> Dict[str, Any]:
91
+ """
92
+ Evaluates AndroidManifest.xml against OWASP MASVS controls:
93
+ - MASVS-RESILIENCE: android:debuggable must be false.
94
+ - MASVS-STORAGE: android:allowBackup must be false.
95
+ - MASVS-NETWORK: android:usesCleartextTraffic must be false.
96
+ """
97
+ findings = []
98
+
99
+ # 1. Debuggable check
100
+ if 'android:debuggable="true"' in manifest_content:
101
+ findings.append({
102
+ "rule": "MASVS-RESILIENCE-1",
103
+ "severity": "CRITICAL",
104
+ "description": "Application has android:debuggable='true'. Attackers can attach debugger in production.",
105
+ "pass": False,
106
+ })
107
+ else:
108
+ findings.append({
109
+ "rule": "MASVS-RESILIENCE-1",
110
+ "severity": "CRITICAL",
111
+ "description": "Application debuggable flag disabled.",
112
+ "pass": True,
113
+ })
114
+
115
+ # 2. AllowBackup check
116
+ if 'android:allowBackup="true"' in manifest_content or "android:allowBackup" not in manifest_content:
117
+ findings.append({
118
+ "rule": "MASVS-STORAGE-2",
119
+ "severity": "HIGH",
120
+ "description": "android:allowBackup is enabled or omitted (default true). App data can be extracted via ADB backup.",
121
+ "pass": False,
122
+ })
123
+ else:
124
+ findings.append({
125
+ "rule": "MASVS-STORAGE-2",
126
+ "severity": "HIGH",
127
+ "description": "android:allowBackup='false' properly configured.",
128
+ "pass": True,
129
+ })
130
+
131
+ # 3. Cleartext Traffic check
132
+ if 'android:usesCleartextTraffic="true"' in manifest_content:
133
+ findings.append({
134
+ "rule": "MASVS-NETWORK-1",
135
+ "severity": "HIGH",
136
+ "description": "android:usesCleartextTraffic='true' allows unencrypted HTTP transit.",
137
+ "pass": False,
138
+ })
139
+ else:
140
+ findings.append({
141
+ "rule": "MASVS-NETWORK-1",
142
+ "severity": "HIGH",
143
+ "description": "Cleartext traffic disallowed (HTTPS enforced).",
144
+ "pass": True,
145
+ })
146
+
147
+ failed_count = sum(1 for f in findings if not f["pass"])
148
+ return {
149
+ "platform": "Android",
150
+ "findings": findings,
151
+ "failed_count": failed_count,
152
+ "status": "PASSED" if failed_count == 0 else "FAILED",
153
+ }
154
+
155
+ @staticmethod
156
+ def audit_ios_plist(plist_content: str) -> Dict[str, Any]:
157
+ """
158
+ Evaluates iOS Info.plist against OWASP MASVS controls:
159
+ - MASVS-NETWORK: NSAppTransportSecurity / NSAllowsArbitraryLoads must not be true.
160
+ """
161
+ findings = []
162
+
163
+ # 1. ATS Arbitrary Loads check
164
+ if "<key>NSAllowsArbitraryLoads</key>" in plist_content and "<true/>" in plist_content:
165
+ findings.append({
166
+ "rule": "MASVS-NETWORK-1",
167
+ "severity": "HIGH",
168
+ "description": "NSAllowsArbitraryLoads is set to true. App Transport Security (ATS) is disabled.",
169
+ "pass": False,
170
+ })
171
+ else:
172
+ findings.append({
173
+ "rule": "MASVS-NETWORK-1",
174
+ "severity": "HIGH",
175
+ "description": "App Transport Security (ATS) enforced without arbitrary HTTP exemptions.",
176
+ "pass": True,
177
+ })
178
+
179
+ failed_count = sum(1 for f in findings if not f["pass"])
180
+ return {
181
+ "platform": "iOS",
182
+ "findings": findings,
183
+ "failed_count": failed_count,
184
+ "status": "PASSED" if failed_count == 0 else "FAILED",
185
+ }
186
+
187
+
188
+ class DesignGuidelinesAuditor:
189
+ """Audits Mobile Tap Target Sizes against Apple HIG and Google Material Design."""
190
+
191
+ APPLE_MIN_SIZE_PT = 44.0
192
+ GOOGLE_MIN_SIZE_DP = 48.0
193
+
194
+ @classmethod
195
+ def evaluate_tap_target(cls, width: float, height: float, platform: str = "android") -> Dict[str, Any]:
196
+ """
197
+ Evaluates whether a mobile touch target complies with physical touch guidelines.
198
+ """
199
+ platform_lower = platform.lower()
200
+ if "ios" in platform_lower:
201
+ target_min = cls.APPLE_MIN_SIZE_PT
202
+ standard_name = "Apple Human Interface Guidelines (HIG)"
203
+ unit = "pt"
204
+ else:
205
+ target_min = cls.GOOGLE_MIN_SIZE_DP
206
+ standard_name = "Google Material Design Guidelines"
207
+ unit = "dp"
208
+
209
+ passed = (width >= target_min) and (height >= target_min)
210
+ return {
211
+ "platform": platform,
212
+ "standard": standard_name,
213
+ "measured_dimensions": f"{width}x{height} {unit}",
214
+ "required_minimum": f"{target_min}x{target_min} {unit}",
215
+ "passed": passed,
216
+ "recommendation": "Compliant" if passed else f"Increase element hit area to at least {target_min}x{target_min} {unit} to prevent user tap misses.",
217
+ }
218
+
219
+
220
+ def main():
221
+ parser = argparse.ArgumentParser(description="Mobile Resilience & Compliance Sentinel")
222
+ parser.add_argument("--sample", action="store_true", help="Run full self-verification sample")
223
+ parser.add_argument("--audit-manifest", help="Path to AndroidManifest.xml")
224
+ parser.add_argument("--audit-plist", help="Path to Info.plist")
225
+ args = parser.parse_args()
226
+
227
+ print("======================================================================")
228
+ print(" MOBILE RESILIENCE, MASVS & HIG SENTINEL")
229
+ print("======================================================================")
230
+
231
+ # 1. Hardware Interrupts Simulation
232
+ print("\n[1] Generating Physical Hardware Interrupt Commands...")
233
+ call_cmds = MobileInterruptSimulator.get_interrupt_commands("incoming_call", phone="0912345678")
234
+ sms_cmds = MobileInterruptSimulator.get_interrupt_commands("sms", phone="0912345678", message="Test OTP: 987654")
235
+ bat_cmds = MobileInterruptSimulator.get_interrupt_commands("battery_low", battery_level=3)
236
+ net_cmds = MobileInterruptSimulator.get_interrupt_commands("network_drop")
237
+
238
+ print(f" -> Incoming Call Command : {call_cmds[0]}")
239
+ print(f" -> Incoming SMS Command : {sms_cmds[0]}")
240
+ print(f" -> Low Battery Command : {bat_cmds[1]}")
241
+ print(f" -> Network Cut Command : {net_cmds[0]}")
242
+
243
+ # 2. OWASP MASVS Audit
244
+ print("\n[2] Executing OWASP MASVS Manifest Security Audit...")
245
+ sample_manifest = """
246
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
247
+ <application
248
+ android:debuggable="false"
249
+ android:allowBackup="false"
250
+ android:usesCleartextTraffic="false">
251
+ </application>
252
+ </manifest>
253
+ """
254
+ res_masvs = OWASPMASVSAuditor.audit_android_manifest(sample_manifest)
255
+ print(f" -> Android MASVS Status: {'🟢 PASSED' if res_masvs['status'] == 'PASSED' else '🔴 FAILED'}")
256
+ for f in res_masvs["findings"]:
257
+ print(f" - [{f['rule']}] {'✅' if f['pass'] else '❌'} {f['description']}")
258
+
259
+ # 3. Apple HIG & Google Material Design Tap Target Audit
260
+ print("\n[3] Auditing Apple HIG & Google Material Design Tap Targets...")
261
+ android_tap = DesignGuidelinesAuditor.evaluate_tap_target(width=50.0, height=50.0, platform="android")
262
+ ios_tap = DesignGuidelinesAuditor.evaluate_tap_target(width=40.0, height=44.0, platform="ios")
263
+
264
+ print(f" -> Android Target (50x50 dp) : {'✅ PASS' if android_tap['passed'] else '❌ FAIL'} ({android_tap['standard']})")
265
+ print(f" -> iOS Target (40x44 pt) : {'✅ PASS' if ios_tap['passed'] else '❌ FAIL'} ({ios_tap['recommendation']})")
266
+
267
+ print("\n======================================================================")
268
+ print(" MOBILE RESILIENCE SENTINEL VERIFIED (OWASP MASVS & HIG COMPLIANT)")
269
+ print("======================================================================")
270
+
271
+
272
+ if __name__ == "__main__":
273
+ main()