@teevee98/synapse-hub 3.9.1 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/.agents/rules/git-push-protocol.md +1 -1
  2. package/.agents/rules/mandatory-playwright-live.md +21 -5
  3. package/.agents/rules/mobile_appium_rules.md +14 -39
  4. package/.agents/rules/security_testing_rules.md +24 -0
  5. package/.agents/rules/stack-auto-router.md +24 -0
  6. package/.agents/rules/systematic-debugging.md +9 -8
  7. package/.agents/skills/{playwright-webapp-testing → 01-web-automation/playwright-webapp-testing}/SKILL.md +18 -1
  8. package/.agents/skills/05-security-and-compliance/wcag-audit-patterns/SKILL.md +116 -0
  9. package/.agents/skills/{db-state-verifier-and-seeder → 07-data-and-state/db-state-verifier-and-seeder}/SKILL.md +9 -4
  10. package/.agents/workflows/generate_manual_testcases_rbt.md +1 -1
  11. package/AGENTS.md +2 -1
  12. package/Dockerfile +14 -6
  13. package/README.en.md +2 -2
  14. package/README.md +2 -2
  15. package/agentskills.json +16 -2
  16. package/docs/ARCHITECTURE.en.md +1 -1
  17. package/docs/ARCHITECTURE.md +1 -1
  18. package/package.json +1 -1
  19. package/plugin.json +1 -1
  20. package/scripts/install_global_plugin.ps1 +19 -2
  21. package/scripts/install_global_plugin.sh +21 -2
  22. package/skills_manifest.json +514 -511
  23. package/synapse.config.json +1 -1
  24. package/tools/TOOL_CATALOG.json +1 -1
  25. package/tools/__init__.py +1 -1
  26. package/tools/ast_cache.py +173 -0
  27. package/tools/browser_helpers.js +2 -2
  28. package/tools/build_consolidated_report.py +1 -1
  29. package/tools/cache_resolver.py +11 -6
  30. package/tools/cli.py +16 -3
  31. package/tools/core/file_lock.py +106 -8
  32. package/tools/core/process_supervisor.py +65 -11
  33. package/tools/core/telemetry.py +32 -3
  34. package/tools/dashboard_generator.py +6 -6
  35. package/tools/db_sandbox.py +53 -10
  36. package/tools/git_pre_commit_guard.py +6 -4
  37. package/tools/infer_linter.py +2 -2
  38. package/tools/lint_ai_docs.py +19 -5
  39. package/tools/mcp_docx_server.py +1 -1
  40. package/tools/mcp_excel_server.py +1 -1
  41. package/tools/mcp_server.py +1 -1
  42. package/tools/package_release.py +29 -5
  43. package/tools/pinpoint_failure.py +14 -2
  44. package/tools/reversible_sandbox.py +85 -7
  45. package/tools/rules_router.py +373 -0
  46. package/tools/ui_server.py +1 -1
  47. package/tools/update_sentinel.py +3 -3
  48. package/tools/verify_all.py +43 -1
  49. package/tools/wcag_audit.py +1 -1
  50. package/tools/welcome_page.py +1 -1
  51. package/.agents/skills/wcag-audit-patterns/SKILL.md +0 -77
  52. /package/.agents/skills/{auth-session-and-cookie-manager → 01-web-automation/auth-session-and-cookie-manager}/SKILL.md +0 -0
  53. /package/.agents/skills/{auth-session-and-cookie-manager → 01-web-automation/auth-session-and-cookie-manager}/examples/multi_role_auth_matrix.md +0 -0
  54. /package/.agents/skills/{auth-session-and-cookie-manager → 01-web-automation/auth-session-and-cookie-manager}/examples/storage_state_sample.json +0 -0
  55. /package/.agents/skills/{bats-testing-patterns → 01-web-automation/bats-testing-patterns}/SKILL.md +0 -0
  56. /package/.agents/skills/{bats-testing-patterns → 01-web-automation/bats-testing-patterns}/examples/cli_runner_test.bats +0 -0
  57. /package/.agents/skills/{bats-testing-patterns → 01-web-automation/bats-testing-patterns}/resources/implementation-playbook.md +0 -0
  58. /package/.agents/skills/{clean-pom-crafter → 01-web-automation/clean-pom-crafter}/SKILL.md +0 -0
  59. /package/.agents/skills/{clean-pom-crafter → 01-web-automation/clean-pom-crafter}/examples/standard_test_case.groovy +0 -0
  60. /package/.agents/skills/{clean-pom-crafter → 01-web-automation/clean-pom-crafter}/references/pom_patterns.groovy +0 -0
  61. /package/.agents/skills/{e2e-testing-patterns → 01-web-automation/e2e-testing-patterns}/SKILL.md +0 -0
  62. /package/.agents/skills/{e2e-testing-patterns → 01-web-automation/e2e-testing-patterns}/examples/playwright_sharded_config.ts +0 -0
  63. /package/.agents/skills/{e2e-testing-patterns → 01-web-automation/e2e-testing-patterns}/resources/implementation-playbook.md +0 -0
  64. /package/.agents/skills/{katalon-cli-runner → 01-web-automation/katalon-cli-runner}/SKILL.md +0 -0
  65. /package/.agents/skills/{katalon-cli-runner → 01-web-automation/katalon-cli-runner}/examples/headless_kre_exec.sh +0 -0
  66. /package/.agents/skills/{katalon-cli-runner → 01-web-automation/katalon-cli-runner}/references/groovy-patterns.md +0 -0
  67. /package/.agents/skills/{katalon-cli-runner → 01-web-automation/katalon-cli-runner}/references/katalon-api.md +0 -0
  68. /package/.agents/skills/{katalon-cli-runner → 01-web-automation/katalon-cli-runner}/references/runner_commands.md +0 -0
  69. /package/.agents/skills/{lam-script-generator → 01-web-automation/lam-script-generator}/SKILL.md +0 -0
  70. /package/.agents/skills/{lam-script-generator → 01-web-automation/lam-script-generator}/examples/user_story_sample.md +0 -0
  71. /package/.agents/skills/{mobile-appium-som → 01-web-automation/mobile-appium-som}/SKILL.md +0 -0
  72. /package/.agents/skills/{mobile-appium-som → 01-web-automation/mobile-appium-som}/examples/BaseScreen.java +0 -0
  73. /package/.agents/skills/{mobile-appium-som → 01-web-automation/mobile-appium-som}/examples/LoginScreen.java +0 -0
  74. /package/.agents/skills/{mobile-appium-som → 01-web-automation/mobile-appium-som}/examples/TC_MobileLogin.java +0 -0
  75. /package/.agents/skills/{playwright-live-interaction → 01-web-automation/playwright-live-interaction}/SKILL.md +0 -0
  76. /package/.agents/skills/{playwright-live-interaction → 01-web-automation/playwright-live-interaction}/examples/live_probe_script.js +0 -0
  77. /package/.agents/skills/{playwright-live-interaction → 01-web-automation/playwright-live-interaction}/references/advanced_superpowers.md +0 -0
  78. /package/.agents/skills/{playwright-live-interaction → 01-web-automation/playwright-live-interaction}/references/compact_accessibility_snapshots.md +0 -0
  79. /package/.agents/skills/{playwright-live-interaction → 01-web-automation/playwright-live-interaction}/references/recipes.md +0 -0
  80. /package/.agents/skills/{playwright-live-interaction → 01-web-automation/playwright-live-interaction}/references/swarm_orchestration.md +0 -0
  81. /package/.agents/skills/{playwright-webapp-testing → 01-web-automation/playwright-webapp-testing}/examples/server_lifecycle_playwright.py +0 -0
  82. /package/.agents/skills/{web-agent-gym-benchmarking → 01-web-automation/web-agent-gym-benchmarking}/SKILL.md +0 -0
  83. /package/.agents/skills/{web-agent-gym-benchmarking → 01-web-automation/web-agent-gym-benchmarking}/examples/benchmark_report_sample.json +0 -0
  84. /package/.agents/skills/{web-agent-gym-benchmarking → 01-web-automation/web-agent-gym-benchmarking}/examples/enterprise_tasks_suite.json +0 -0
  85. /package/.agents/skills/{architecture-decision-records → 02-test-design/architecture-decision-records}/SKILL.md +0 -0
  86. /package/.agents/skills/{architecture-decision-records → 02-test-design/architecture-decision-records}/examples/0001-record-architecture-decisions.md +0 -0
  87. /package/.agents/skills/{gherkin-to-suite → 02-test-design/gherkin-to-suite}/SKILL.md +0 -0
  88. /package/.agents/skills/{gherkin-to-suite → 02-test-design/gherkin-to-suite}/examples/checkout.feature +0 -0
  89. /package/.agents/skills/{gherkin-to-suite → 02-test-design/gherkin-to-suite}/examples/suite_report_sample.json +0 -0
  90. /package/.agents/skills/{rbt-manual-testing → 02-test-design/rbt-manual-testing}/SKILL.md +0 -0
  91. /package/.agents/skills/{rbt-manual-testing → 02-test-design/rbt-manual-testing}/examples/checkout_rbt_manual_suite.md +0 -0
  92. /package/.agents/skills/{rbt-manual-testing → 02-test-design/rbt-manual-testing}/references/field_validation_checklist.md +0 -0
  93. /package/.agents/skills/{review-spec → 02-test-design/review-spec}/SKILL.md +0 -0
  94. /package/.agents/skills/{review-spec → 02-test-design/review-spec}/examples/pocock_grilling_decision_rubric.md +0 -0
  95. /package/.agents/skills/{review-spec → 02-test-design/review-spec}/examples/sample_spec_review.md +0 -0
  96. /package/.agents/skills/{tot-exploratory-testing → 02-test-design/tot-exploratory-testing}/SKILL.md +0 -0
  97. /package/.agents/skills/{tot-exploratory-testing → 02-test-design/tot-exploratory-testing}/examples/payment_gateway_tot_tree.json +0 -0
  98. /package/.agents/skills/{tot-exploratory-testing → 02-test-design/tot-exploratory-testing}/examples/tot_graph_sample.json +0 -0
  99. /package/.agents/skills/{api-network-mocking-interception → 03-api-and-contracts/api-network-mocking-interception}/SKILL.md +0 -0
  100. /package/.agents/skills/{api-network-mocking-interception → 03-api-and-contracts/api-network-mocking-interception}/examples/network_route_stub.json +0 -0
  101. /package/.agents/skills/{api-spec-to-e2e-matrix → 03-api-and-contracts/api-spec-to-e2e-matrix}/SKILL.md +0 -0
  102. /package/.agents/skills/{api-spec-to-e2e-matrix → 03-api-and-contracts/api-spec-to-e2e-matrix}/examples/sample_openapi.json +0 -0
  103. /package/.agents/skills/{consumer-driven-contract-testing → 03-api-and-contracts/consumer-driven-contract-testing}/SKILL.md +0 -0
  104. /package/.agents/skills/{consumer-driven-contract-testing → 03-api-and-contracts/consumer-driven-contract-testing}/examples/order_service_pact.json +0 -0
  105. /package/.agents/skills/{backend-load-and-stress-patterns → 04-performance-and-load/backend-load-and-stress-patterns}/SKILL.md +0 -0
  106. /package/.agents/skills/{backend-load-and-stress-patterns → 04-performance-and-load/backend-load-and-stress-patterns}/examples/k6_load_test_sample.js +0 -0
  107. /package/.agents/skills/{backend-load-and-stress-patterns → 04-performance-and-load/backend-load-and-stress-patterns}/references/k6_load_template.js +0 -0
  108. /package/.agents/skills/{lean-impact-scoreboard → 04-performance-and-load/lean-impact-scoreboard}/SKILL.md +0 -0
  109. /package/.agents/skills/{lean-impact-scoreboard → 04-performance-and-load/lean-impact-scoreboard}/examples/sample_benchmark_gain.md +0 -0
  110. /package/.agents/skills/{lean-impact-scoreboard → 04-performance-and-load/lean-impact-scoreboard}/examples/sample_scoreboard.md +0 -0
  111. /package/.agents/skills/{web-vitals-and-performance-profiler → 04-performance-and-load/web-vitals-and-performance-profiler}/SKILL.md +0 -0
  112. /package/.agents/skills/{web-vitals-and-performance-profiler → 04-performance-and-load/web-vitals-and-performance-profiler}/examples/cwv_budget_policy.json +0 -0
  113. /package/.agents/skills/{web-vitals-and-performance-profiler → 04-performance-and-load/web-vitals-and-performance-profiler}/examples/playwright_cwv_profiler_fixture.ts +0 -0
  114. /package/.agents/skills/{security-dast-sentinel → 05-security-and-compliance/security-dast-sentinel}/SKILL.md +0 -0
  115. /package/.agents/skills/{security-dast-sentinel → 05-security-and-compliance/security-dast-sentinel}/examples/dast_scan_config.json +0 -0
  116. /package/.agents/skills/{security-dast-sentinel → 05-security-and-compliance/security-dast-sentinel}/references/AI-AND-LLM.md +0 -0
  117. /package/.agents/skills/{security-dast-sentinel → 05-security-and-compliance/security-dast-sentinel}/references/ATTACK-CLASSES.md +0 -0
  118. /package/.agents/skills/{security-dast-sentinel → 05-security-and-compliance/security-dast-sentinel}/references/dast_recipes.ts +0 -0
  119. /package/.agents/skills/{skillspector-security-guard → 05-security-and-compliance/skillspector-security-guard}/SKILL.md +0 -0
  120. /package/.agents/skills/{skillspector-security-guard → 05-security-and-compliance/skillspector-security-guard}/examples/audit_threat_vectors_report.json +0 -0
  121. /package/.agents/skills/{skillspector-security-guard → 05-security-and-compliance/skillspector-security-guard}/examples/safe_mcp_config.json +0 -0
  122. /package/.agents/skills/{wcag-audit-patterns → 05-security-and-compliance/wcag-audit-patterns}/examples/wcag_compliance_checklist.json +0 -0
  123. /package/.agents/skills/{wcag-audit-patterns → 05-security-and-compliance/wcag-audit-patterns}/resources/implementation-playbook.md +0 -0
  124. /package/.agents/skills/{agentless-qa-repair → 06-healing-and-resilience/agentless-qa-repair}/SKILL.md +0 -0
  125. /package/.agents/skills/{agentless-qa-repair → 06-healing-and-resilience/agentless-qa-repair}/examples/healing_report_sample.json +0 -0
  126. /package/.agents/skills/{agentless-qa-repair → 06-healing-and-resilience/agentless-qa-repair}/examples/three_phase_repair_workflow.md +0 -0
  127. /package/.agents/skills/{antigravity-test-sentinel → 06-healing-and-resilience/antigravity-test-sentinel}/SKILL.md +0 -0
  128. /package/.agents/skills/{antigravity-test-sentinel → 06-healing-and-resilience/antigravity-test-sentinel}/examples/dod_gate_policy.json +0 -0
  129. /package/.agents/skills/{antigravity-test-sentinel → 06-healing-and-resilience/antigravity-test-sentinel}/examples/sprint_dod_enforcement.md +0 -0
  130. /package/.agents/skills/{failure-autopsy-and-healing → 06-healing-and-resilience/failure-autopsy-and-healing}/SKILL.md +0 -0
  131. /package/.agents/skills/{failure-autopsy-and-healing → 06-healing-and-resilience/failure-autopsy-and-healing}/examples/closed_loop_healing_walkthrough.md +0 -0
  132. /package/.agents/skills/{failure-autopsy-and-healing → 06-healing-and-resilience/failure-autopsy-and-healing}/examples/sample_junit_failure.xml +0 -0
  133. /package/.agents/skills/{failure-autopsy-and-healing → 06-healing-and-resilience/failure-autopsy-and-healing}/references/healing_matrix.md +0 -0
  134. /package/.agents/skills/{failure-autopsy-and-healing → 06-healing-and-resilience/failure-autopsy-and-healing}/references/qa_investigation_protocol.md +0 -0
  135. /package/.agents/skills/{failure-autopsy-and-healing → 06-healing-and-resilience/failure-autopsy-and-healing}/scripts/triage_failures.sh +0 -0
  136. /package/.agents/skills/{flaky-test-sentinel-and-quarantine → 06-healing-and-resilience/flaky-test-sentinel-and-quarantine}/SKILL.md +0 -0
  137. /package/.agents/skills/{flaky-test-sentinel-and-quarantine → 06-healing-and-resilience/flaky-test-sentinel-and-quarantine}/examples/quarantine_registry.json +0 -0
  138. /package/.agents/skills/{self-healing-locator → 06-healing-and-resilience/self-healing-locator}/SKILL.md +0 -0
  139. /package/.agents/skills/{self-healing-locator → 06-healing-and-resilience/self-healing-locator}/examples/aom_diff_sample.json +0 -0
  140. /package/.agents/skills/{systematic-debugging → 06-healing-and-resilience/systematic-debugging}/SKILL.md +0 -0
  141. /package/.agents/skills/{systematic-debugging → 06-healing-and-resilience/systematic-debugging}/examples/four_phase_case.md +0 -0
  142. /package/.agents/skills/{test-driven-development → 06-healing-and-resilience/test-driven-development}/SKILL.md +0 -0
  143. /package/.agents/skills/{test-driven-development → 06-healing-and-resilience/test-driven-development}/examples/red_green_refactor_qa.md +0 -0
  144. /package/.agents/skills/{verification-before-completion → 06-healing-and-resilience/verification-before-completion}/SKILL.md +0 -0
  145. /package/.agents/skills/{verification-before-completion → 06-healing-and-resilience/verification-before-completion}/examples/evidence_log_example.md +0 -0
  146. /package/.agents/skills/{visual-regression-sentinel → 06-healing-and-resilience/visual-regression-sentinel}/SKILL.md +0 -0
  147. /package/.agents/skills/{visual-regression-sentinel → 06-healing-and-resilience/visual-regression-sentinel}/examples/visual_mask_rules.json +0 -0
  148. /package/.agents/skills/{db-state-verifier-and-seeder → 07-data-and-state/db-state-verifier-and-seeder}/examples/db_fixture_seed.json +0 -0
  149. /package/.agents/skills/{file-and-report-validator → 07-data-and-state/file-and-report-validator}/SKILL.md +0 -0
  150. /package/.agents/skills/{file-and-report-validator → 07-data-and-state/file-and-report-validator}/examples/sample_export_schema.json +0 -0
  151. /package/.agents/skills/{synthetic-test-data-generator → 07-data-and-state/synthetic-test-data-generator}/SKILL.md +0 -0
  152. /package/.agents/skills/{synthetic-test-data-generator → 07-data-and-state/synthetic-test-data-generator}/examples/idempotent_data_recipe.json +0 -0
  153. /package/.agents/skills/{code-refactoring-refactor-clean → 08-code-quality/code-refactoring-refactor-clean}/SKILL.md +0 -0
  154. /package/.agents/skills/{code-refactoring-refactor-clean → 08-code-quality/code-refactoring-refactor-clean}/examples/refactored_page_sample.groovy +0 -0
  155. /package/.agents/skills/{code-refactoring-refactor-clean → 08-code-quality/code-refactoring-refactor-clean}/examples/refactored_playwright_pom.ts +0 -0
  156. /package/.agents/skills/{code-refactoring-refactor-clean → 08-code-quality/code-refactoring-refactor-clean}/resources/implementation-playbook.md +0 -0
  157. /package/.agents/skills/{graphify-impact-analyzer → 08-code-quality/graphify-impact-analyzer}/SKILL.md +0 -0
  158. /package/.agents/skills/{graphify-impact-analyzer → 08-code-quality/graphify-impact-analyzer}/examples/dependency_blast_radius.json +0 -0
  159. /package/.agents/skills/{lean-code-ladder → 08-code-quality/lean-code-ladder}/SKILL.md +0 -0
  160. /package/.agents/skills/{lean-code-ladder → 08-code-quality/lean-code-ladder}/examples/ladder_walkthrough.md +0 -0
  161. /package/.agents/skills/{repo-quality-audit → 08-code-quality/repo-quality-audit}/SKILL.md +0 -0
  162. /package/.agents/skills/{repo-quality-audit → 08-code-quality/repo-quality-audit}/examples/sample_audit_walkthrough.md +0 -0
  163. /package/.agents/skills/{repo-quality-audit → 08-code-quality/repo-quality-audit}/examples/sample_repo_audit.md +0 -0
  164. /package/.agents/skills/{senior-code-review → 08-code-quality/senior-code-review}/SKILL.md +0 -0
  165. /package/.agents/skills/{senior-code-review → 08-code-quality/senior-code-review}/examples/sample_review_walkthrough.md +0 -0
  166. /package/.agents/skills/{surgical-coding-principles → 08-code-quality/surgical-coding-principles}/SKILL.md +0 -0
  167. /package/.agents/skills/{surgical-coding-principles → 08-code-quality/surgical-coding-principles}/examples/surgical_vs_scope_creep.md +0 -0
  168. /package/.agents/skills/{technical-debt-harvester → 08-code-quality/technical-debt-harvester}/SKILL.md +0 -0
  169. /package/.agents/skills/{technical-debt-harvester → 08-code-quality/technical-debt-harvester}/examples/sample_debt_ledger.md +0 -0
  170. /package/.agents/skills/{technical-debt-harvester → 08-code-quality/technical-debt-harvester}/examples/sample_ledger_output.md +0 -0
  171. /package/.agents/skills/{github-actions-templates → 09-ci-and-devops/github-actions-templates}/SKILL.md +0 -0
  172. /package/.agents/skills/{github-actions-templates → 09-ci-and-devops/github-actions-templates}/examples/matrix_test_pipeline.yml +0 -0
  173. /package/.agents/skills/{actor-qa-swarm → 10-agent-orchestration/actor-qa-swarm}/SKILL.md +0 -0
  174. /package/.agents/skills/{actor-qa-swarm → 10-agent-orchestration/actor-qa-swarm}/examples/broker_sharding_sample.json +0 -0
  175. /package/.agents/skills/{agent-orchestration-multi-agent-optimize → 10-agent-orchestration/agent-orchestration-multi-agent-optimize}/SKILL.md +0 -0
  176. /package/.agents/skills/{agent-orchestration-multi-agent-optimize → 10-agent-orchestration/agent-orchestration-multi-agent-optimize}/examples/swarm_workload_config.json +0 -0
  177. /package/.agents/skills/{event-stream-qa-orchestrator → 10-agent-orchestration/event-stream-qa-orchestrator}/SKILL.md +0 -0
  178. /package/.agents/skills/{event-stream-qa-orchestrator → 10-agent-orchestration/event-stream-qa-orchestrator}/examples/timeline_sample.jsonl +0 -0
  179. /package/.agents/skills/{persistent-planning-files → 10-agent-orchestration/persistent-planning-files}/SKILL.md +0 -0
  180. /package/.agents/skills/{persistent-planning-files → 10-agent-orchestration/persistent-planning-files}/examples/task_plan_example.md +0 -0
  181. /package/.agents/skills/{qa-memory-os → 10-agent-orchestration/qa-memory-os}/SKILL.md +0 -0
  182. /package/.agents/skills/{qa-memory-os → 10-agent-orchestration/qa-memory-os}/examples/archival_memory_sample.json +0 -0
  183. /package/.agents/skills/{meta-prompt-crafter → 11-ai-and-prompting/meta-prompt-crafter}/SKILL.md +0 -0
  184. /package/.agents/skills/{meta-prompt-crafter → 11-ai-and-prompting/meta-prompt-crafter}/examples/qa_prompt_template.md +0 -0
  185. /package/.agents/skills/{mipro-prompt-compiler → 11-ai-and-prompting/mipro-prompt-compiler}/SKILL.md +0 -0
  186. /package/.agents/skills/{mipro-prompt-compiler → 11-ai-and-prompting/mipro-prompt-compiler}/examples/compiled_module_sample.json +0 -0
  187. /package/.agents/skills/{mipro-prompt-compiler → 11-ai-and-prompting/mipro-prompt-compiler}/examples/dspy_assertion_optimizer_case.md +0 -0
  188. /package/.agents/skills/{qa-aci-interface → 11-ai-and-prompting/qa-aci-interface}/SKILL.md +0 -0
  189. /package/.agents/skills/{qa-aci-interface → 11-ai-and-prompting/qa-aci-interface}/examples/surgical_code_window_walkthrough.md +0 -0
  190. /package/.agents/skills/{qa-aci-interface → 11-ai-and-prompting/qa-aci-interface}/examples/surgical_edit_sample.json +0 -0
  191. /package/.agents/skills/{token-and-context-optimizer → 11-ai-and-prompting/token-and-context-optimizer}/SKILL.md +0 -0
  192. /package/.agents/skills/{token-and-context-optimizer → 11-ai-and-prompting/token-and-context-optimizer}/examples/distilled_log_sample.txt +0 -0
  193. /package/.agents/skills/{token-and-context-optimizer → 11-ai-and-prompting/token-and-context-optimizer}/references/context_engineering_guide.md +0 -0
@@ -10,7 +10,7 @@ When mounted alongside a target project and the user requests *"push"*, *"push c
10
10
 
11
11
  > ⚠️ **Scope Isolation Invariant:** Only push to the target project. Absolutely never push or stage changes to the Hub repo (`Synapse-Hub` / `agent-skills`) unless the user explicitly requests *"push hub"* or *"push synapse-hub"*.
12
12
 
13
- 1. **Pre-Push Gate (DoD Verification):** Run verification before committing (`python tools/verify_all.py` or test runner). Never push unverified code or failing tests.
13
+ 1. **Pre-Push Gate (DoD Verification):** Run verification before committing (if `tools/verify_all.py` exists, execute it; otherwise, execute target project native test runner `npm test`, `pytest`, `mvn test`). Never push unverified code or failing tests.
14
14
  2. **Selective Staging:** Stage specifically changed project files (`git add <files>`). Never stage temporary artifacts (`Screenshots/`, `Reports/`, `*.log`). Avoid blind `git add -A` on target projects.
15
15
  3. **Conventional Commit:** Create structured semantic commits: `git commit -m "<type>(<scope>): <summary>"`.
16
16
  4. **User Confirmation Required:** Always ask user confirmation before running `git push origin <branch>`.
@@ -1,10 +1,12 @@
1
1
  ---
2
- trigger: always_on
3
- description: Mandatory rules for Autonomous Multi-Agent Swarm, Pure Headless Playwright Live interaction (1920x1080), and Zero-Second Auth.
2
+ trigger: on_demand
3
+ description: Rules for Autonomous Multi-Agent Swarm, Pure Headless Playwright Live interaction (1920x1080), Web-First Assertions, and Zero-Second Auth. Activated strictly when Web Playwright or browser automation suites are mounted.
4
4
  ---
5
5
 
6
6
  # Mandatory Playwright Live Interaction & Swarm Protocols
7
7
 
8
+ > ⚠️ **Contextual Activation Scope:** This rule is activated ONLY when `playwright.config.*` exists or when running Web / Browser E2E automation. For pure API, Mobile Appium, or Performance tests, strictly adhere to their respective rules (`stack-auto-router.md`, `mobile_appium_rules.md`, `performance_testing_rules.md`) and do not apply browser session/viewport constraints.
9
+
8
10
  1. **Autonomous Swarm FSM (5 Stages):**
9
11
  - Main AI acts as **Lead QA Orchestrator**, coordinating specialized subagents:
10
12
  * **`test-designer`:** Transforms requirements into risk-based test matrices (AI-RBT), 15-field validation checklists, and 12-column Excel test suites.
@@ -15,11 +17,25 @@ description: Mandatory rules for Autonomous Multi-Agent Swarm, Pure Headless Pla
15
17
  * **`perf-engineer`:** Orchestrates JMeter, k6, Locust load profiles, real-time telemetry streaming, and APM bottleneck correlation.
16
18
  * **`failure-analyst`:** Diagnoses crashes via logs, `Screenshots/FAILED_*.png`, and Allure reports.
17
19
  * **`quality-gatekeeper`:** Sentinel enforcing 10 Quality Gates DoD, 100% UTF-8 No BOM, and zero bypasses.
20
+
18
21
  2. **Anti-Redundancy Protocol:**
19
- - Single sign-on via Zero-Second Auth (`session.json`); never re-enter login forms.
22
+ - Single sign-on via Zero-Second Auth (`session.json` / `storageState`); never re-enter login forms.
20
23
  - Live Explorer emits JSON Data Contract -> Code Crafter consumes to codify. Zero redundant DOM rescanning.
21
24
  - Targeted re-tests only on failed cases; never re-run entire suites for single-case bug fixes.
22
25
  - Deep RCA only on actual FAILED cases; immediately accept PASSED runs.
23
- 3. **Mandatory Pure Headless Mode:**
26
+
27
+ 3. **Mandatory Pure Headless Mode & Resolution Standard:**
24
28
  - All flow discovery, live probing, and bug fixing **MUST RUN IN PURE HEADLESS MODE** (`viewport: { width: 1920, height: 1080 }`). Never open GUI browser windows to steal user focus.
25
- 4. **5 Superpowers:** Zero-Second Auth, Direct API Seeding, Accessibility Tree (AOM), Multi-Context Dual Role, Route Mocking.
29
+
30
+ 4. **Native Playwright Assertions & Zero-Sleep Standard:**
31
+ - **Web-First Assertions Only:** Always utilize native auto-retrying matchers: `await expect(locator).toBeVisible()`, `await expect(locator).toBeEnabled()`, `await expect(locator).toHaveText(...)`.
32
+ - **Zero Static Sleeps (AGENTS.md Rule 1.4):** Static delays (`page.waitForTimeout`, `time.sleep`, `Thread.sleep`) are strictly prohibited in test scripts. Synchronize via locator auto-waiting or `page.waitForLoadState('networkidle')`.
33
+ - **Clean POM Locator Hierarchy:** Page Classes must prioritize semantic locators:
34
+ 1. User-facing ARIA role (`page.getByRole(...)`)
35
+ 2. Semantic test identifier (`page.getByTestId(...)`)
36
+ 3. Form label / placeholder (`page.getByLabel(...)`, `page.getByPlaceholder(...)`)
37
+ 4. Text content (`page.getByText(...)`)
38
+ 5. Resilient CSS selector
39
+ 6. Raw XPath (strictly encapsulated in Page Class; never in test scripts).
40
+
41
+ 5. **5 Superpowers:** Zero-Second Auth (`storageState`), Direct API Seeding, Accessibility Tree (AOM), Multi-Context Dual Role, Route Mocking (`page.route`).
@@ -1,43 +1,18 @@
1
- ---
2
- trigger: on_demand
3
- description: Mobile Automation standards, Screen Object Model (SOM), and Appium driver invariants for iOS/Android suites.
4
- status: upcoming_extension
5
- ---
1
+ # Mobile Automation Rules — Appium iOS & Android (Full Standard)
6
2
 
7
- # Mobile Automation Standards & Appium Rules (Enterprise Extension)
3
+ > Nâng cấp hoàn chỉnh từ bản `upcoming_extension` trong Synapse-Hub cho UIAutomator2 (Android) và XCUITest (iOS).
8
4
 
9
- > **Status:** Upcoming extension module for Appium / Mobile SOM architectures. Activated when mobile drivers or native iOS/Android test suites are mounted.
10
- > **Scope:** Applies to Mobile Automation using Appium, UIAutomator2 (Android), and XCUITest (iOS).
11
- > **Objective:** Deliver resilient, independent, flake-free mobile suites supporting parallel multi-device execution.
5
+ ## 1. Screen Object Model (SOM)
6
+ * Đóng gói 100% locator và thao tác màn hình vào `screens/` (tối đa 1 `BaseScreen`). Tuyệt đối không viết selector trực tiếp trong `tests/`.
7
+ * Tách biệt locator theo nền tảng khi cây UI khác nhau (`locators/ios/` và `locators/android/`).
12
8
 
13
- ---
9
+ ## 2. Mobile Locator Hierarchy (Strict)
10
+ 1. **Accessibility ID (Ưu tiên 1 — Đa nền tảng):** `~accessibilityId` (iOS `accessibilityIdentifier` / Android `content-desc`).
11
+ 2. **iOS Native (Ưu tiên 2 cho iOS):** `-ios predicate string` (vd: `label == "Login" AND visible == 1`) hoặc `-ios class chain`.
12
+ 3. **Android Native (Ưu tiên 3 cho Android):** `id` / `resource-id` (`new UiSelector().resourceId(...)`).
13
+ 4. **Cấm tuyệt đối:** XPath chứa chỉ số index (`//XCUIElementTypeCell[3]`, `//android.widget.TextView[2]`) và tọa độ cứng `tap(x, y)`.
14
14
 
15
- ## 1. Native Locator Priority Hierarchy
16
- 1. **Accessibility ID / Content-Desc** (Top priority, cross-platform): `driver.findElement(AppiumBy.accessibilityId("btn_login"))`
17
- 2. **Resource-ID (Android Native):** `driver.findElement(AppiumBy.id("com.app:id/username"))`
18
- 3. **iOS Predicate String (iOS Native):** `driver.findElement(AppiumBy.iOSNsPredicateString("label == 'Sign In' AND visible == 1"))`
19
- 4. **iOS Class Chain:** `driver.findElement(AppiumBy.iOSClassChain("**/XCUIElementTypeButton[`label == 'Submit'`]"))`
20
- 5. **Dynamic XPath (Last Resort):** Relative XPath with attributes only. Absolute structural XPath is **FORBIDDEN**.
21
-
22
- ---
23
-
24
- ## 2. Strict Anti-Patterns & Prohibitions
25
- - ❌ **FORBIDDEN:** Absolute hierarchy XPath (e.g., `//android.widget.FrameLayout[1]/.../Button[1]`).
26
- - ❌ **FORBIDDEN:** Static delays (`Thread.sleep()`).
27
- - ❌ **FORBIDDEN:** Interacting with off-screen elements without scrolling into view first.
28
- - ❌ **FORBIDDEN:** Hardcoded device identifiers (UDID, device name must come from environment/profiles).
29
-
30
- ---
31
-
32
- ## 3. Screen Object Model (SOM) & Synchronization
33
- - Screen classes end with `Screen` suffix (e.g., `LoginScreen.java`) extending `BaseScreen`.
34
- - Encapsulate locators in Screen classes; test scripts call business actions only.
35
- - **Smart Waits:** Always use `WebDriverWait` with explicit `Duration.ofSeconds(N)`.
36
- - **Smart Scroll:** Use `UiScrollable(...).scrollIntoView(...)` or native iOS scroll gestures.
37
-
38
- ---
39
-
40
- ## 4. Mobile Lifecycle & Driver Invariants
41
- - **Permissions:** Auto-grant system permissions via capabilities (`autoGrantPermissions: true`).
42
- - **Resilience:** Validate backgrounding (`driver.runAppInBackground(...)`) and hide virtual keyboard before actions.
43
- - **Driver Isolation:** Screen classes speak intent; platform drivers (UIAutomator2/XCUITest) encapsulate mechanics. Capabilities reside in profiles, never in scripts. Always explicitly quit sessions.
15
+ ## 3. Stability, Alerts & Context Switching
16
+ * **Capabilities:** Khai báo rõ `automationName`, `newCommandTimeout`, và chiến lược `noReset`/`fullReset` để đảm bảo test độc lập.
17
+ * **System Alerts & Keyboard:** Chủ động xử lý hộp thoại quyền hệ điều hành (Location, Camera, Notification) và gọi `hideKeyboard()` trước khi tương tác phần tử bị che.
18
+ * **Smart Scroll & WebView:** Dùng cuộn động có điều kiện dừng khi tìm phần tử ngoài màn hình. Khi thao tác Hybrid/WebView, kiểm tra `getContexts()` và quay lại `NATIVE_APP` ngay sau khi xong.
@@ -0,0 +1,24 @@
1
+ # Security & Pentest Testing Invariants (5-Layer Safety Gate)
2
+
3
+ > Rule chốt chặn bắt buộc khi thực thi `security-dast-sentinel` hoặc `skillspector-security-guard` trong Synapse-Hub.
4
+
5
+ ## 1. Layer 1 — Scope & Production Blocklist (Allowlist Gate)
6
+ * Mọi script DAST/Fuzzing/Pentest (Burp Suite, OWASP ZAP, Nuclei, Python) bắt buộc đọc `TARGET_BASE_URL` và kiểm tra khớp với `ALLOWED_PENTEST_HOSTS` trong cấu hình môi trường.
7
+ * **Từ chối thực thi ngay** nếu URL mục tiêu thuộc môi trường Production (`prod`, tên miền chính thức chưa nằm trong `ALLOWED_PENTEST_HOSTS`).
8
+ * Bắt buộc hỏi xác nhận người dùng trước khi chạy bất kỳ lệnh quét chủ động (Active Scan / Fuzzing) nào.
9
+
10
+ ## 2. Layer 2 — Rate-Limit & Concurrency Cap
11
+ * Giới hạn cứng tốc độ gửi request trong script tự động: tối đa `5–10 req/s` và tối đa `3–5` luồng song song (trừ bài test Rate-Limit có xác nhận riêng).
12
+ * Bắt buộc đặt `timeout <= 10s` cho mọi HTTP request và tự ngắt script nếu gặp `5xx` hoặc `429` liên tiếp vượt ngưỡng.
13
+
14
+ ## 3. Layer 3 — Non-Destructive PoC & Account Isolation
15
+ * Chỉ dùng payload chứng minh lỗ hổng vô hại (SQLi đọc an toàn, canary string, time-delay nhỏ). Cấm tuyệt đối payload xóa/sửa dữ liệu (`DROP`, `DELETE`, `UPDATE` không điều kiện) hoặc gây DoS.
16
+ * Kiểm thử phân quyền chéo (BOLA/IDOR) chỉ được sử dụng cặp tài khoản test cô lập (`PENTEST_USER_A`, `PENTEST_USER_B`), không chạm dữ liệu người dùng thật.
17
+
18
+ ## 4. Layer 4 — Script Secret Protection & SAST Check
19
+ * Cấm hardcode Token, Session Cookie, API Key mục tiêu trong script pentest; phải nạp từ `.env` (đã khai báo trong `.gitignore`).
20
+ * Kết hợp rà soát nhanh lỗ hổng cấu hình tĩnh (`CORS *`, thiếu CSP/HSTS, lộ secret) trên mã nguồn nếu có quyền đọc repo.
21
+
22
+ ## 5. Layer 5 — Sanitized Evidence Standard
23
+ * Mọi lỗ hổng báo cáo phải kèm đủ: Severity (Critical/High/Medium/Low), cặp HTTP Request/Response (hoặc lệnh `curl`) tái hiện được ngay, và hướng dẫn vá lỗi.
24
+ * Bắt buộc che mờ (mask) JWT, Cookie, Password, PII trước khi ghi log hoặc xuất báo cáo.
@@ -0,0 +1,24 @@
1
+ # Context-Aware Stack Router & Token-Minimal Loader (Boost B2)
2
+
3
+ > Bổ sung vào `.agents/rules/` của Synapse-Hub để giảm tối đa tiêu thụ token (~4.000 tokens/turn) và dùng chung được cho mọi dự án.
4
+
5
+ ## 1. Lazy-Loading Rule & Skill (Chỉ nạp thứ dự án cần)
6
+ Khi bắt đầu phiên làm việc, AI Agent **chỉ quét thư mục gốc tối đa 2 cấp** (hoặc chạy tự động qua `python tools/rules_router.py` / `agent-qa rules-router`) và chỉ đọc đúng nhóm rule/skill khớp với dự án hiện tại (KHÔNG nạp toàn bộ 53 skill hay rule của nền tảng khác):
7
+
8
+ * **Web / API (`playwright.config.*`, `cypress.config.*`, `openapi.*`, `pytest`, `jest`):** Chỉ nạp `mandatory-playwright-live.md` (nếu dùng Playwright) + `clean-pom-crafter` + `api-network-mocking-interception`.
9
+ * **Mobile (`appium`, `*.xcodeproj`, `build.gradle`):** Chỉ nạp `mobile_appium_rules.md` + `clean-pom-crafter` (theo chuẩn SOM). Bỏ qua `mandatory-playwright-live.md`.
10
+ * **Performance (`k6`, `*.jmx`, `locustfile.py`):** Chỉ nạp `performance_testing_rules.md` + `backend-load-and-stress-patterns`.
11
+ * **Security (`burp`, `zap`, `nuclei`, pentest/DAST):** Chỉ nạp `security_testing_rules.md` + `security-dast-sentinel` + `skillspector-security-guard`.
12
+
13
+ ## 2. Token-Minimal Progressive Router (`tools/rules_router.py`)
14
+ AI Agent có thể kích hoạt bộ định tuyến tự động để kiểm tra và nhận cấu hình tối giản:
15
+ ```bash
16
+ python tools/rules_router.py --summary
17
+ # Output: [RULES-ROUTER] Stacks: playwright,git | Rules: 5 | Saved: 2,635 tokens/turn (40.5%)
18
+ ```
19
+
20
+ ## 3. Adaptive Verification (Fast Mode vs Full Gate)
21
+ * **Fast Mode (Sửa nhanh / viết 1–2 test case):** Kiểm tra tĩnh (0 sleep cứng, 0 secret, có `assert`) và chạy lệnh test gốc cho **đúng tệp vừa sửa** đạt `Exit Code 0`.
22
+ * **Full Gate (Chốt PR / Release):**
23
+ * Nếu dự án có `tools/verify_all.py` (môi trường Synapse-Hub đầy đủ): chạy `python3 tools/verify_all.py`.
24
+ * Nếu là dự án bên ngoài không có `tools/verify_all.py`: chạy toàn bộ test suite bằng lệnh gốc trong `package.json` / `pyproject.toml` / `Makefile` và quét rò rỉ secret.
@@ -9,14 +9,15 @@ description: Enforce rigorous engineering discipline, systematic debugging witho
9
9
  - **Evidence Before Action:** Never modify code on assumption. Ground every fix in concrete evidence: failing line & stack trace, screenshot (`Screenshots/FAILED_*.png`), or live DOM state.
10
10
  - **Surgical Code Preservation:** Touch only the minimal lines required. Never rewrite working methods speculatively.
11
11
 
12
- ## 2. Verification-First & Definition of Done
13
- - **Mandatory Verification Gate:** Any claim that a task, fix, or refactoring is complete MUST be verified by running:
14
- ```bash
15
- python3 tools/verify_all.py
16
- ```
17
- All 10 Quality Gates must return `PASS`. If any gate fails, the task is NOT complete.
18
- - **Targeted Re-Test:** Check impacted test cases via `python3 tools/test_impact.py --git-diff`.
19
- - **Sync Knowledge & Artifacts:** Run `python3 tools/repo_map.py` if Page Classes or helpers change; run `graphify update .` if `graphify-out/` exists.
12
+ ## 2. Verification-First & Definition of Done (Adaptive)
13
+ - **Fast-Track (Quick Fixes):**
14
+ - **Applicability:** Changes under 15 lines of code, UI locator/selector updates, adding 1 single test case, or trivial doc/comment fixes.
15
+ - **Validation:** Perform static checks (0 static sleeps, 0 leaked credentials, contains explicit assertions) and run test suite for the **impacted file only** with exit code 0. Bypasses 10 Quality Gates and mutation testing.
16
+ - **Full-Gate (Major Features, Refactoring & Release):**
17
+ - **In Hub Repository / Equipped Target (with `tools/`):** Run `python3 tools/verify_all.py`. All 10 Quality Gates must return `PASS`.
18
+ - **In External Target Projects (without `tools/`):** Graceful fallback: run native test command defined in project (`npm test`, `pytest`, `mvn test`) and verify zero secret leaks. Never invoke missing `tools/` scripts.
19
+ - **Targeted Re-Test:** Check impacted test cases via native runner or `python3 tools/test_impact.py --git-diff` (if `tools/` exists).
20
+ - **Sync Knowledge & Artifacts:** Run `python3 tools/repo_map.py` if `tools/repo_map.py` exists; run `graphify update .` if `graphify-out/` exists.
20
21
 
21
22
  ## 3. Situational Tool Autonomy (Zero-Command Invariant)
22
23
  Autonomously trigger tools on-demand per `AGENTS.md` Section 3.4 (Setup: `setup_project.py`/`analyze_project.py`; Quality: `verify_all.py`/`infer_linter.py`/`micro_mutator.py`; Healing: `pinpoint_failure.py`/`auto_heal_reflexion.py`/`reversible_sandbox.py`; Context: `distill_log.py`/`safety_firewall.py`). Never expect user to memorize CLI syntax.
@@ -27,7 +27,7 @@ flowchart LR
27
27
 
28
28
  - **Headless mode, 1920x1080 Full HD viewport** — mandatory per `AGENTS.md` Section 2.
29
29
  - Chromium first; multi-browser coverage is governed by `e2e-testing-patterns`.
30
- - Launch pattern:
30
+ - Launch pattern (Python):
31
31
 
32
32
  ```python
33
33
  from playwright.sync_api import sync_playwright
@@ -43,6 +43,23 @@ with sync_playwright() as p:
43
43
  browser.close()
44
44
  ```
45
45
 
46
+ - Launch pattern (TypeScript / Playwright Test):
47
+
48
+ ```typescript
49
+ import { test, expect } from '@playwright/test';
50
+ import { LoginPage } from './pages/LoginPage';
51
+
52
+ test.use({ viewport: { width: 1920, height: 1080 } }); // Mandatory 1920x1080 headless baseline
53
+
54
+ test('TC-101 User Authentication Flow', async ({ page }) => {
55
+ const loginPage = new LoginPage(page);
56
+ await loginPage.navigate();
57
+ await loginPage.login('admin@example.com', 'securePass123!');
58
+ // Web-first auto-retrying assertion (Clean POM)
59
+ await expect(page.getByRole('heading', { name: 'Dashboard' })).toBeVisible();
60
+ });
61
+ ```
62
+
46
63
  ## 3. Decision Tree: Static vs Dynamic
47
64
 
48
65
  ```
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: wcag-audit-patterns
3
+ description: "Audit WCAG 2.2 accessibility (A/AA), keyboard navigation, and ARIA roles. Use when auditing accessibility against WCAG 2.2 A/AA criteria."
4
+ ---
5
+
6
+ # WCAG 2.2 Accessibility Audit Patterns
7
+
8
+ Engineering standards for automated, continuous Web Content Accessibility Guidelines (WCAG 2.2 Level A and AA) auditing across enterprise web applications.
9
+
10
+ ---
11
+
12
+ ## 1. Core WCAG 2.2 Success Criteria Matrix
13
+
14
+ | Criterion | Rule Code | Level | Requirement & Automated Assertion |
15
+ | :--- | :--- | :--- | :--- |
16
+ | **Non-text Content** | WCAG 1.1.1 | Level A | All `<img>` tags must possess non-empty `alt` attributes or `aria-hidden="true"` if decorative. |
17
+ | **Info and Relationships**| WCAG 1.3.1 | Level A | Form controls `<input>`, `<select>` must link to `<label>` via `id/for` or `aria-label`. |
18
+ | **Heading Structure** | WCAG 1.3.1 | Level A | Headings must not skip levels (e.g. `<h1>` followed immediately by `<h3>`). |
19
+ | **Contrast (Minimum)** | WCAG 1.4.3 | Level AA | Normal text contrast ratio $\ge 4.5:1$; Large text ($\ge 18\text{pt}$ or bold $14\text{pt}$) $\ge 3:1$. |
20
+ | **Keyboard Navigable** | WCAG 2.1.1 | Level A | All interactive elements must be focusable via `Tab` with visible focus indicators. |
21
+ | **No Keyboard Trap** | WCAG 2.1.2 | Level A | Focus must not become permanently trapped in modal dialogs; `Esc` key must exit. |
22
+ | **Focus Not Obscured** | WCAG 2.4.11 | Level AA | Focused element must not be completely hidden by sticky banners, footers, or overlays (WCAG 2.2). |
23
+ | **Target Size (Minimum)**| WCAG 2.5.8 | Level AA | Interactive targets must meet $24 \times 24\text{px}$ minimum bounding box or sufficient spacing (WCAG 2.2). |
24
+ | **Consistent Help** | WCAG 3.2.6 | Level A | Help options (chat, FAQ, phone) must reside in identical relative layout order across pages (WCAG 2.2). |
25
+ | **Redundant Entry** | WCAG 3.3.7 | Level A | Multi-step workflows must auto-populate or allow selection of previously entered data (WCAG 2.2). |
26
+ | **Accessible Auth** | WCAG 3.3.8 | Level AA | Login must support password managers / paste / passkeys without cognitive puzzles (WCAG 2.2). |
27
+
28
+ ---
29
+
30
+ ## 2. Playwright Automated Accessibility Testing Patterns
31
+
32
+ ### Pattern A: Integrating `@axe-core/playwright` for Comprehensive Audits
33
+ ```typescript
34
+ import { test, expect } from '@playwright/test';
35
+ import AxeBuilder from '@axe-core/playwright';
36
+
37
+ test('verify WCAG 2.2 Level AA compliance on dashboard', async ({ page }) => {
38
+ await page.goto('/dashboard');
39
+ await page.waitForLoadState('networkidle');
40
+
41
+ const accessibilityScanResults = await new AxeBuilder({ page })
42
+ .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22aa'])
43
+ .exclude('.legacy-third-party-widget') // Explicitly scoped exclusion
44
+ .analyze();
45
+
46
+ expect(accessibilityScanResults.violations).toEqual([]);
47
+ });
48
+ ```
49
+
50
+ ### Pattern B: Modal Keyboard Focus Trap and Escape Verification
51
+ ```typescript
52
+ test('modal dialog traps keyboard focus and closes on Escape', async ({ page }) => {
53
+ await page.goto('/settings');
54
+ await page.getByRole('button', { name: 'Edit Profile' }).click();
55
+
56
+ const modal = page.getByRole('dialog', { name: 'Edit Profile' });
57
+ await expect(modal).toBeVisible();
58
+
59
+ // Verify focus shifts into modal
60
+ await expect(modal.getByRole('textbox', { name: 'Username' })).toBeFocused();
61
+
62
+ // Press Escape and verify focus returns to trigger
63
+ await page.keyboard.press('Escape');
64
+ await expect(modal).toBeHidden();
65
+ await expect(page.getByRole('button', { name: 'Edit Profile' })).toBeFocused();
66
+ });
67
+ ```
68
+
69
+ ### Pattern C: WCAG 2.5.8 Target Size ($24 \times 24\text{px}$) Assertion
70
+ ```typescript
71
+ test('all interactive buttons satisfy WCAG 2.5.8 24x24px target size', async ({ page }) => {
72
+ await page.goto('/checkout');
73
+ const buttons = page.locator('button, a.btn, input[type="submit"]');
74
+ const count = await buttons.count();
75
+
76
+ for (let i = 0; i < count; i++) {
77
+ const btn = buttons.nth(i);
78
+ if (await btn.isVisible()) {
79
+ const box = await btn.boundingBox();
80
+ expect(box, `Button #${i} must have layout box`).not.toBeNull();
81
+ if (box) {
82
+ expect(box.width, `Button #${i} width ${box.width}px < 24px`).toBeGreaterThanOrEqual(24);
83
+ expect(box.height, `Button #${i} height ${box.height}px < 24px`).toBeGreaterThanOrEqual(24);
84
+ }
85
+ }
86
+ }
87
+ });
88
+ ```
89
+
90
+ ### Pattern D: Playwright Native Accessibility Object Model (AOM) Snapshot
91
+ ```python
92
+ # Python Playwright AOM Snapshot Assertion
93
+ def test_accessible_tree_structure(page):
94
+ page.goto("/login")
95
+ snapshot = page.accessibility.snapshot()
96
+ assert snapshot is not None
97
+ # Ensure form role with named fields exists
98
+ assert any(node.get("role") == "button" and "Sign In" in node.get("name", "") for node in snapshot.get("children", []))
99
+ ```
100
+
101
+ ---
102
+
103
+ ## 3. Automated CLI Auditing via Tooling
104
+
105
+ Synapse Hub provides automated accessibility auditing via `tools/wcag_audit.py`:
106
+
107
+ ```bash
108
+ # Audit a local HTML snapshot or directory
109
+ python tools/wcag_audit.py path/to/page.html -o docs/wcag_audit_report.md
110
+
111
+ # Audit a live application URL directly via CDP/Playwright
112
+ python tools/wcag_audit.py https://staging.example.com --url -o docs/wcag_audit_report.md
113
+
114
+ # CLI integration via agent-qa
115
+ agent-qa wcag-audit path/to/page.html
116
+ ```
@@ -106,18 +106,23 @@ python tools/db_sandbox.py rollback-test --db-path "path/to/db.sqlite"
106
106
  ```
107
107
  *Guarantees zero leftover records: state is automatically rolled back to pristine baseline upon test completion.*
108
108
 
109
- ### 2. Ephemeral Snapshot & Instant Restore (< 0.5s)
109
+ ### 2. Ephemeral Snapshot & Instant Restore (< 0.5s) [DESTRUCTIVE]
110
+ > ⚠️ **Warning [DESTRUCTIVE]:** Database restore drops existing tables/objects and repopulates from snapshot (e.g. `pg_restore --clean --if-exists`). Zero-pollution guarantee is conditional upon isolated sandbox containers and valid snapshots; never execute against staging or production databases. Requires explicit `--confirm` (or setting `SYNAPSE_FORCE_RESTORE=1`).
110
111
  ```bash
111
112
  # Before test suite runs: capture pristine database baseline
112
113
  python tools/db_sandbox.py snapshot --id pristine_baseline
113
114
 
114
- # After suite execution: instantly restore clean database
115
- python tools/db_sandbox.py restore --id pristine_baseline
115
+ # After suite execution: restore clean database (requires explicit --confirm)
116
+ python tools/db_sandbox.py restore --id pristine_baseline --confirm
116
117
  ```
117
118
 
118
119
  ### 3. Taint Pollution Audit & Cascading Purge
119
- Scan all tables for orphan records carrying test prefixes (`AUTO_`, `TEST_`) and purge them cleanly:
120
+ Scan all tables for orphan records carrying test prefixes (`AUTO_`, `TEST_`). By default, `audit` runs in **safe dry-run preview** mode:
120
121
  ```bash
122
+ # Preview orphan records without deleting (safe default):
121
123
  python tools/db_sandbox.py audit
124
+
125
+ # Explicitly apply destructive purge:
126
+ python tools/db_sandbox.py audit --apply
122
127
  ```
123
128
 
@@ -6,7 +6,7 @@ skills:
6
6
 
7
7
  # /generate_manual_testcases_rbt — 6-Stage AI-RBT Manual Test Generation
8
8
 
9
- Execute the structured 6-stage **AI-Driven Risk-Based Testing (AI-RBT)** pipeline defined in `.agents/skills/rbt-manual-testing/SKILL.md`.
9
+ Execute the structured 6-stage **AI-Driven Risk-Based Testing (AI-RBT)** pipeline defined in `.agents/skills/02-test-design/rbt-manual-testing/SKILL.md`.
10
10
 
11
11
  ## Execution Rules & Pipeline Checkpoints
12
12
 
package/AGENTS.md CHANGED
@@ -73,7 +73,8 @@ You are a lazy senior developer. The best code is the code never written. Solve
73
73
  - Optimizing assertions against surviving mutants -> Run `tools/textgrad_mutation_optimizer.py`.
74
74
  - User asks to push / release hub ("push lên", "push hub") -> Autonomously bump version based on changes via `tools/bump_version.py <patch|minor|major>` then run `tools/hub_publisher.py` (Push main + Tag + Release + Packages + NPM).
75
75
  - Task progress & compaction anchoring -> Autonomously run `tools/project_state.py`.
76
- - Before completing code tasks -> Autonomously run `tools/verify_all.py` (10 Quality Gates DoD).
76
+ - Before completing code tasks -> Autonomously run `tools/verify_all.py` (10 Quality Gates DoD). For quick fixes (< 15 lines of code), apply Fast-Track mode; for external target repos lacking `tools/`, gracefully fallback to native test runners (`npm test`, `pytest`, `mvn test`) per `.agents/rules/stack-auto-router.md` and `.agents/rules/systematic-debugging.md`.
77
+ - Context-aware stack routing -> Strictly adhere to `.agents/rules/stack-auto-router.md` (Web/Mobile/Perf/Security scope) and 5-layer pentest safety gate (`.agents/rules/security_testing_rules.md`).
77
78
 
78
79
  ---
79
80
 
package/Dockerfile CHANGED
@@ -6,7 +6,7 @@
6
6
  # Provides complete runtimes for Python 3.12, Node.js 20, OpenJDK Headless,
7
7
  # Chromium Headless & Playwright dependencies, and Synapse-Hub CLI.
8
8
 
9
- FROM python:3.12-slim-bookworm
9
+ FROM python:3.12-slim-bookworm@sha256:935c3c5b12357a7e10caa9c1e6ca5692344d97cf229832ef584be2cec9fc03df
10
10
 
11
11
  LABEL org.opencontainers.image.title="Synapse-Hub Enterprise QA" \
12
12
  org.opencontainers.image.description="Enterprise AI Agent Intelligence Hub & Autonomous Test Quality Gate" \
@@ -65,15 +65,23 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
65
65
  WORKDIR /opt/synapse-hub
66
66
  COPY . /opt/synapse-hub
67
67
 
68
- # Install Python requirements and global npm package CLI
69
- RUN pip install --no-cache-dir -r requirements.txt \
70
- && ( [ ! -f requirements-extras.txt ] || pip install --no-cache-dir -r requirements-extras.txt ) \
68
+ # Create dedicated non-root service user and group (synapse: UID 10001, GID 10001)
69
+ RUN groupadd -g 10001 synapse \
70
+ && useradd -u 10001 -g synapse -s /bin/bash -m synapse
71
+
72
+ # Install hermetic Python requirements and global npm package CLI
73
+ RUN pip install --no-cache-dir -r requirements.lock \
71
74
  && pip install --no-cache-dir -e . \
72
75
  && npm install -g . \
73
76
  && chmod +x bin/agent-qa.js
74
77
 
75
- # Setup workspace directory for mounting target test suites with non-root CI support
76
- RUN mkdir -p /workspace && chmod 777 /workspace
78
+ # Setup workspace directory and set ownership on /workspace and /opt/synapse-hub
79
+ RUN mkdir -p /workspace \
80
+ && chown -R synapse:synapse /opt/synapse-hub /workspace \
81
+ && chmod 777 /workspace
82
+
83
+ # Switch to non-root user
84
+ USER synapse
77
85
  WORKDIR /workspace
78
86
 
79
87
  # Default Entrypoint & Command
package/README.en.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  > **Core Mission:** A standalone linter and guardrail engine (zero external dependencies for core engine & DoD gates) safeguarding automated test suites when AI writes code — Automatically catching "fake-pass" tests (0 assertions, tautologies), eliminating fixed sleeps, compressing 95% of CI/CD log noise, and enforcing Clean POM architecture.
8
8
  > **Author:** Thế Vị ([@TeeVee98](https://github.com/TeeVee98)) | **License:** MIT License
9
- > **Version:** `v3.9.1` | **Scale:** 53 Standardized QA Skills, 9 Specialized AI Agents, 10 DoD Quality Gates.
9
+ > **Version:** `v4.0.0` | **Scale:** 53 Standardized QA Skills, 9 Specialized AI Agents, 10 DoD Quality Gates.
10
10
 
11
11
  [![npm version](https://img.shields.io/npm/v/@teevee98/synapse-hub.svg?style=flat-square&color=blue)](https://www.npmjs.com/package/@teevee98/synapse-hub)
12
12
  [![node version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg?style=flat-square)](https://nodejs.org)
@@ -154,7 +154,7 @@ Every test code change must satisfy all 10 Quality Gates before pull request mer
154
154
  # Pre-commit hook (.pre-commit-config.yaml):
155
155
  repos:
156
156
  - repo: https://github.com/TeeVee98/Synapse-Hub
157
- rev: v3.9.1
157
+ rev: v4.0.0
158
158
  hooks:
159
159
  - id: synapse-lint
160
160
  - id: synapse-verify
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  > **Định vị cốt lõi:** Bộ Linter & Guardrails độc lập (zero external dependencies cho core engine & DoD gates) bảo vệ độ tin cậy của test suite khi AI viết code — Tự động bắt test "pass ảo" (0 assert, tautology), loại bỏ hoàn toàn sleep cố định, nén 95% log CI/CD, và chuẩn hóa cấu trúc Clean POM.
8
8
  > **Tác giả:** Thế Vị ([@TeeVee98](https://github.com/TeeVee98)) | **Giấy phép:** MIT License
9
- > **Phiên bản:** `v3.9.1` | **Quy mô:** 53 Kỹ năng QA, 9 Vai trò AI Agent, 10 Cổng kiểm định DoD.
9
+ > **Phiên bản:** `v4.0.0` | **Quy mô:** 53 Kỹ năng QA, 9 Vai trò AI Agent, 10 Cổng kiểm định DoD.
10
10
 
11
11
  [![npm version](https://img.shields.io/npm/v/@teevee98/synapse-hub.svg?style=flat-square&color=blue)](https://www.npmjs.com/package/@teevee98/synapse-hub)
12
12
  [![node version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg?style=flat-square)](https://nodejs.org)
@@ -154,7 +154,7 @@ Mọi thay đổi mã nguồn kiểm thử đều được kiểm chứng qua 10
154
154
  # Pre-commit hook (.pre-commit-config.yaml):
155
155
  repos:
156
156
  - repo: https://github.com/TeeVee98/Synapse-Hub
157
- rev: v3.9.1
157
+ rev: v4.0.0
158
158
  hooks:
159
159
  - id: synapse-lint
160
160
  - id: synapse-verify
package/agentskills.json CHANGED
@@ -1,12 +1,26 @@
1
1
  {
2
2
  "$schema": "https://agentskills.io/schema/v1.json",
3
3
  "name": "Synapse-Hub",
4
- "version": "3.9.1",
5
- "description": "Enterprise QA & Test Automation AI Skills Ecosystem adhering to Clean POM Flat Architecture.",
4
+ "version": "4.0.0",
5
+ "description": "Enterprise QA & Test Automation AI Skills Ecosystem — 53 skills organised across 11 Domain Packages adhering to Clean POM Flat Architecture.",
6
6
  "author": "Thế Vị (@TeeVee98)",
7
7
  "repository": "https://github.com/TeeVee98/Synapse-Hub",
8
8
  "license": "MIT",
9
9
  "skillsRoot": ".agents/skills",
10
+ "domainsRoot": ".agents/skills",
11
+ "domains": {
12
+ "01-web-automation": "01-web-automation",
13
+ "02-test-design": "02-test-design",
14
+ "03-api-and-contracts": "03-api-and-contracts",
15
+ "04-performance-and-load": "04-performance-and-load",
16
+ "05-security-and-compliance": "05-security-and-compliance",
17
+ "06-healing-and-resilience": "06-healing-and-resilience",
18
+ "07-data-and-state": "07-data-and-state",
19
+ "08-code-quality": "08-code-quality",
20
+ "09-ci-and-devops": "09-ci-and-devops",
21
+ "10-agent-orchestration": "10-agent-orchestration",
22
+ "11-ai-and-prompting": "11-ai-and-prompting"
23
+ },
10
24
  "standards": [
11
25
  "Clean-POM-Flat-Architecture",
12
26
  "100%-UTF8-No-BOM",
@@ -3,7 +3,7 @@
3
3
  [🇻🇳 Tiếng Việt](ARCHITECTURE.md) | [🇬🇧 English Edition](ARCHITECTURE.en.md)
4
4
 
5
5
  > **Scope:** Enterprise Multi-Agent QA Hub
6
- > **Version:** `3.9.1` | **Status:** Active / Production Standard
6
+ > **Version:** `4.0.0` | **Status:** Active / Production Standard
7
7
 
8
8
  ---
9
9
 
@@ -3,7 +3,7 @@
3
3
  [🇻🇳 Tiếng Việt](ARCHITECTURE.md) | [🇬🇧 English Edition](ARCHITECTURE.en.md)
4
4
 
5
5
  > **Phạm vi:** Enterprise Multi-Agent QA Hub
6
- > **Version:** `3.9.1` | **Trạng thái:** Hoạt động / Tiêu chuẩn Sản xuất
6
+ > **Version:** `4.0.0` | **Trạng thái:** Hoạt động / Tiêu chuẩn Sản xuất
7
7
  > **Tác giả:** Thế Vị (@TeeVee98) | **Giấy phép:** MIT License
8
8
 
9
9
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teevee98/synapse-hub",
3
- "version": "3.9.1",
3
+ "version": "4.0.0",
4
4
  "description": "Enterprise AI Agent Intelligence Hub & Autonomous Skill Network",
5
5
  "publishConfig": {
6
6
  "access": "public"
package/plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "synapse-hub",
3
3
  "displayName": "Synapse Hub Enterprise QA",
4
- "version": "3.9.1",
4
+ "version": "4.0.0",
5
5
  "description": "Enterprise AI Agent Intelligence Hub & Autonomous Skill Network for Quality Engineering, Clean POM, and Automated Testing.",
6
6
  "author": {
7
7
  "name": "TeeVee98",
@@ -14,6 +14,23 @@ Write-Host "`n==================================================================
14
14
  Write-Host " SYNAPSE-HUB: ANTIGRAVITY GLOBAL PLUGIN 1-CLICK INSTALLER " -ForegroundColor Cyan
15
15
  Write-Host "======================================================================`n" -ForegroundColor Cyan
16
16
 
17
+ # Preflight Validation Guard
18
+ Write-Host "[Preflight] Checking repository integrity..." -ForegroundColor Yellow
19
+ $RequiredPaths = @(
20
+ "$RepoRoot\.agents\skills",
21
+ "$RepoRoot\.agents\agents",
22
+ "$RepoRoot\tools"
23
+ )
24
+ foreach ($p in $RequiredPaths) {
25
+ if (-not (Test-Path $p)) {
26
+ Write-Error "❌ [PREFLIGHT FAILED] Mandatory source path missing: $p"
27
+ exit 1
28
+ }
29
+ }
30
+ $SkillsCount = (Get-ChildItem -Path "$RepoRoot\.agents\skills" -Directory).Count
31
+ $AgentsCount = (Get-ChildItem -Path "$RepoRoot\.agents\agents" -File -Filter "*.md").Count
32
+ Write-Host " [OK] Verified source integrity: $SkillsCount skills, $AgentsCount agent profiles.`n" -ForegroundColor Green
33
+
17
34
  $PluginsDir = "$HOME\.gemini\config\plugins"
18
35
  $TargetPluginDir = "$PluginsDir\synapse-hub"
19
36
 
@@ -87,8 +104,8 @@ Write-Host "`n==================================================================
87
104
  Write-Host " 🎉 SUCCESS: Synapse-Hub is now installed as a GLOBAL PLUGIN! " -ForegroundColor Green
88
105
  Write-Host "======================================================================" -ForegroundColor Cyan
89
106
  Write-Host "• Location : $TargetPluginDir" -ForegroundColor White
90
- Write-Host "• Skills : 53 Standardized QA Skills" -ForegroundColor White
91
- Write-Host "• Agents : 9 Swarm Subagent Profiles" -ForegroundColor White
107
+ Write-Host "• Skills : $SkillsCount Standardized QA Skills" -ForegroundColor White
108
+ Write-Host "• Agents : $AgentsCount Swarm Subagent Profiles" -ForegroundColor White
92
109
  Write-Host "`n👉 Antigravity will now automatically load Synapse-Hub across ALL projects" -ForegroundColor Yellow
93
110
  Write-Host " without needing to add Synapse-Hub as a workspace folder!" -ForegroundColor Yellow
94
111
  Write-Host "======================================================================`n" -ForegroundColor Cyan
@@ -14,6 +14,25 @@ echo " SYNAPSE-HUB: ANTIGRAVITY GLOBAL PLUGIN 1-CLICK INSTALLER "
14
14
  echo "======================================================================"
15
15
  echo ""
16
16
 
17
+ # Preflight Validation Guard
18
+ echo "[Preflight] Checking repository integrity..."
19
+ if [ ! -d "$REPO_ROOT/.agents/skills" ]; then
20
+ echo "❌ [PREFLIGHT FAILED] Missing .agents/skills directory in $REPO_ROOT"
21
+ exit 1
22
+ fi
23
+ if [ ! -d "$REPO_ROOT/.agents/agents" ]; then
24
+ echo "❌ [PREFLIGHT FAILED] Missing .agents/agents directory in $REPO_ROOT"
25
+ exit 1
26
+ fi
27
+ if [ ! -d "$REPO_ROOT/tools" ]; then
28
+ echo "❌ [PREFLIGHT FAILED] Missing tools directory in $REPO_ROOT"
29
+ exit 1
30
+ fi
31
+
32
+ SKILLS_COUNT=$(find "$REPO_ROOT/.agents/skills" -mindepth 1 -maxdepth 1 -type d | wc -l | tr -d ' ')
33
+ AGENTS_COUNT=$(find "$REPO_ROOT/.agents/agents" -mindepth 1 -maxdepth 1 -type f -name "*.md" | wc -l | tr -d ' ')
34
+ echo " [OK] Verified source integrity: $SKILLS_COUNT skills, $AGENTS_COUNT agent profiles."
35
+
17
36
  PLUGINS_DIR="$HOME/.gemini/config/plugins"
18
37
  TARGET_PLUGIN_DIR="$PLUGINS_DIR/synapse-hub"
19
38
 
@@ -40,8 +59,8 @@ echo "======================================================================"
40
59
  echo " 🎉 SUCCESS: Synapse-Hub is now installed as a GLOBAL PLUGIN! "
41
60
  echo "======================================================================"
42
61
  echo "• Location : $TARGET_PLUGIN_DIR"
43
- echo "• Skills : 53 Standardized QA Skills"
44
- echo "• Agents : 9 Swarm Subagent Profiles"
62
+ echo "• Skills : $SKILLS_COUNT Standardized QA Skills"
63
+ echo "• Agents : $AGENTS_COUNT Swarm Subagent Profiles"
45
64
  echo ""
46
65
  echo "👉 Antigravity will now automatically load Synapse-Hub across ALL projects"
47
66
  echo " without needing to add Synapse-Hub as a workspace folder!"