synapse-hub 2.2.3 → 2.4.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 (317) hide show
  1. package/.agents/agents/failure-analyst.md +11 -0
  2. package/.agents/agents/live-explorer.md +28 -0
  3. package/.agents/agents/orchestrator.md +20 -4
  4. package/.agents/agents/pom-crafter.md +12 -0
  5. package/.agents/agents/quality-gatekeeper.md +19 -4
  6. package/.agents/agents/test-runner.md +11 -0
  7. package/.agents/rules/communication-style.md +40 -0
  8. package/.agents/rules/context-engineering.md +23 -0
  9. package/.agents/rules/git-push-protocol.md +11 -17
  10. package/.agents/rules/graphify.md +14 -14
  11. package/.agents/rules/lessons-learned.md +3 -3
  12. package/.agents/rules/mandatory-playwright-live.md +29 -29
  13. package/.agents/rules/mobile_appium_rules.md +132 -0
  14. package/.agents/rules/performance_testing_rules.md +74 -0
  15. package/.agents/rules/skill-precedence.md +1 -1
  16. package/.agents/rules/systematic-debugging.md +6 -6
  17. package/.agents/skills/agent-orchestration-multi-agent-optimize/SKILL.md +64 -215
  18. package/.agents/skills/agent-orchestration-multi-agent-optimize/examples/swarm_workload_config.json +12 -0
  19. package/.agents/skills/antigravity-test-sentinel/SKILL.md +3 -3
  20. package/.agents/skills/antigravity-test-sentinel/examples/dod_gate_policy.json +11 -0
  21. package/.agents/skills/api-network-mocking-interception/SKILL.md +1 -1
  22. package/.agents/skills/api-network-mocking-interception/examples/network_route_stub.json +9 -0
  23. package/.agents/skills/api-spec-to-e2e-matrix/SKILL.md +9 -9
  24. package/.agents/skills/api-spec-to-e2e-matrix/examples/sample_openapi.json +19 -0
  25. package/.agents/skills/architecture-decision-records/SKILL.md +35 -412
  26. package/.agents/skills/architecture-decision-records/examples/0001-record-architecture-decisions.md +12 -0
  27. package/.agents/skills/auth-session-and-cookie-manager/SKILL.md +4 -1
  28. package/.agents/skills/auth-session-and-cookie-manager/examples/storage_state_sample.json +11 -0
  29. package/.agents/skills/backend-load-and-stress-patterns/SKILL.md +80 -186
  30. package/.agents/skills/backend-load-and-stress-patterns/examples/k6_load_test_sample.js +13 -0
  31. package/.agents/skills/bats-testing-patterns/SKILL.md +1 -1
  32. package/.agents/skills/bats-testing-patterns/examples/cli_runner_test.bats +6 -0
  33. package/.agents/skills/bats-testing-patterns/resources/implementation-playbook.md +614 -614
  34. package/.agents/skills/clean-pom-crafter/SKILL.md +21 -3
  35. package/.agents/skills/clean-pom-crafter/examples/standard_test_case.groovy +28 -28
  36. package/.agents/skills/clean-pom-crafter/references/pom_patterns.groovy +138 -138
  37. package/.agents/skills/code-refactoring-refactor-clean/SKILL.md +2 -2
  38. package/.agents/skills/code-refactoring-refactor-clean/examples/refactored_page_sample.groovy +9 -0
  39. package/.agents/skills/code-refactoring-refactor-clean/resources/implementation-playbook.md +9 -7
  40. package/.agents/skills/db-state-verifier-and-seeder/SKILL.md +5 -5
  41. package/.agents/skills/db-state-verifier-and-seeder/examples/db_fixture_seed.json +12 -0
  42. package/.agents/skills/e2e-testing-patterns/SKILL.md +1 -1
  43. package/.agents/skills/e2e-testing-patterns/examples/playwright_sharded_config.ts +12 -0
  44. package/.agents/skills/e2e-testing-patterns/resources/implementation-playbook.md +522 -522
  45. package/.agents/skills/failure-autopsy-and-healing/SKILL.md +17 -3
  46. package/.agents/skills/failure-autopsy-and-healing/examples/sample_junit_failure.xml +8 -0
  47. package/.agents/skills/failure-autopsy-and-healing/references/healing_matrix.md +64 -64
  48. package/.agents/skills/failure-autopsy-and-healing/references/qa_investigation_protocol.md +56 -56
  49. package/.agents/skills/failure-autopsy-and-healing/scripts/triage_failures.sh +98 -98
  50. package/.agents/skills/file-and-report-validator/SKILL.md +1 -1
  51. package/.agents/skills/file-and-report-validator/examples/sample_export_schema.json +14 -0
  52. package/.agents/skills/flaky-test-sentinel-and-quarantine/SKILL.md +3 -3
  53. package/.agents/skills/flaky-test-sentinel-and-quarantine/examples/quarantine_registry.json +11 -0
  54. package/.agents/skills/gherkin-to-suite/SKILL.md +103 -0
  55. package/.agents/skills/gherkin-to-suite/examples/checkout.feature +39 -0
  56. package/.agents/skills/gherkin-to-suite/examples/suite_report_sample.json +334 -0
  57. package/.agents/skills/github-actions-templates/SKILL.md +47 -304
  58. package/.agents/skills/github-actions-templates/examples/matrix_test_pipeline.yml +8 -0
  59. package/.agents/skills/graphify-impact-analyzer/SKILL.md +6 -6
  60. package/.agents/skills/graphify-impact-analyzer/examples/dependency_blast_radius.json +8 -0
  61. package/.agents/skills/katalon-cli-runner/SKILL.md +2 -2
  62. package/.agents/skills/katalon-cli-runner/examples/headless_kre_exec.sh +3 -0
  63. package/.agents/skills/katalon-cli-runner/references/groovy-patterns.md +209 -209
  64. package/.agents/skills/katalon-cli-runner/references/katalon-api.md +155 -155
  65. package/.agents/skills/katalon-cli-runner/references/runner_commands.md +67 -67
  66. package/.agents/skills/lam-script-generator/SKILL.md +42 -1
  67. package/.agents/skills/lam-script-generator/examples/user_story_sample.md +8 -0
  68. package/.agents/skills/lean-code-ladder/SKILL.md +83 -0
  69. package/.agents/skills/lean-code-ladder/examples/ladder_walkthrough.md +37 -0
  70. package/.agents/skills/meta-prompt-crafter/SKILL.md +107 -0
  71. package/.agents/skills/meta-prompt-crafter/examples/qa_prompt_template.md +35 -0
  72. package/.agents/skills/persistent-planning-files/SKILL.md +108 -0
  73. package/.agents/skills/persistent-planning-files/examples/task_plan_example.md +56 -0
  74. package/.agents/skills/playwright-live-interaction/SKILL.md +49 -1
  75. package/.agents/skills/playwright-live-interaction/examples/live_probe_script.js +5 -0
  76. package/.agents/skills/playwright-live-interaction/references/advanced_superpowers.md +160 -160
  77. package/.agents/skills/playwright-live-interaction/references/compact_accessibility_snapshots.md +75 -75
  78. package/.agents/skills/playwright-live-interaction/references/recipes.md +388 -388
  79. package/.agents/skills/playwright-live-interaction/references/swarm_orchestration.md +134 -134
  80. package/.agents/skills/playwright-webapp-testing/SKILL.md +93 -0
  81. package/.agents/skills/playwright-webapp-testing/examples/server_lifecycle_playwright.py +63 -0
  82. package/.agents/skills/rbt-manual-testing/SKILL.md +150 -0
  83. package/.agents/skills/rbt-manual-testing/examples/checkout_rbt_manual_suite.md +25 -0
  84. package/.agents/skills/security-dast-sentinel/SKILL.md +57 -135
  85. package/.agents/skills/security-dast-sentinel/examples/dast_scan_config.json +10 -0
  86. package/.agents/skills/self-healing-locator/SKILL.md +24 -10
  87. package/.agents/skills/self-healing-locator/examples/aom_diff_sample.json +16 -0
  88. package/.agents/skills/skillspector-security-guard/SKILL.md +32 -90
  89. package/.agents/skills/skillspector-security-guard/examples/safe_mcp_config.json +12 -0
  90. package/.agents/skills/surgical-coding-principles/SKILL.md +89 -0
  91. package/.agents/skills/surgical-coding-principles/examples/surgical_vs_scope_creep.md +46 -0
  92. package/.agents/skills/synthetic-test-data-generator/SKILL.md +3 -3
  93. package/.agents/skills/synthetic-test-data-generator/examples/idempotent_data_recipe.json +9 -0
  94. package/.agents/skills/systematic-debugging/SKILL.md +100 -0
  95. package/.agents/skills/systematic-debugging/examples/four_phase_case.md +44 -0
  96. package/.agents/skills/test-driven-development/SKILL.md +114 -0
  97. package/.agents/skills/test-driven-development/examples/red_green_refactor_qa.md +78 -0
  98. package/.agents/skills/token-and-context-optimizer/SKILL.md +1 -1
  99. package/.agents/skills/token-and-context-optimizer/examples/distilled_log_sample.txt +3 -0
  100. package/.agents/skills/verification-before-completion/SKILL.md +100 -0
  101. package/.agents/skills/verification-before-completion/examples/evidence_log_example.md +46 -0
  102. package/.agents/skills/visual-regression-sentinel/SKILL.md +21 -1
  103. package/.agents/skills/visual-regression-sentinel/examples/visual_mask_rules.json +9 -0
  104. package/.agents/skills/wcag-audit-patterns/SKILL.md +3 -3
  105. package/.agents/skills/wcag-audit-patterns/examples/wcag_compliance_checklist.json +10 -0
  106. package/.agents/skills/wcag-audit-patterns/resources/implementation-playbook.md +541 -541
  107. package/.agents/skills/web-vitals-and-performance-profiler/SKILL.md +1 -1
  108. package/.agents/skills/web-vitals-and-performance-profiler/examples/cwv_budget_policy.json +6 -0
  109. package/.agents/templates/completion_report.md +57 -57
  110. package/.agents/workflows/analyze_requirement_document.md +18 -0
  111. package/.agents/workflows/export_testcases_excel.md +32 -0
  112. package/.agents/workflows/generate_combinatorial_test_data.md +28 -0
  113. package/.agents/workflows/generate_cross_module_test_plan.md +37 -0
  114. package/.agents/workflows/generate_manual_testcases_rbt.md +56 -0
  115. package/.agents/workflows/generate_requirements_from_website.md +25 -0
  116. package/.agents/workflows/generate_testcases_from_requirements.md +21 -0
  117. package/.agents/workflows/graphify.md +10 -10
  118. package/.agents/workflows/verify.md +2 -2
  119. package/.cursor/rules/language.mdc +7 -7
  120. package/.cursor/rules/synapse-qa.mdc +23 -0
  121. package/.cursorrules +7 -0
  122. package/.pre-commit-hooks.yaml +14 -0
  123. package/.windsurfrules +7 -0
  124. package/AGENTS.md +54 -15
  125. package/CLAUDE.md +35 -12
  126. package/LICENSE +30 -0
  127. package/NOTICE +180 -0
  128. package/README.en.md +325 -0
  129. package/README.md +247 -512
  130. package/action.yml +51 -0
  131. package/benchmarks/qa_eval/README.md +71 -0
  132. package/benchmarks/qa_eval/build_dataset.py +677 -0
  133. package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-06_api_contract_drift.json +22 -0
  134. package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-07_api_contract_drift.json +22 -0
  135. package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-08_api_contract_drift.json +22 -0
  136. package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-09_api_contract_drift.json +22 -0
  137. package/benchmarks/qa_eval/dataset/api_contract_drift/qa-challenge-10_api_contract_drift.json +22 -0
  138. package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-21_fake_pass_tautology.json +21 -0
  139. package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-22_fake_pass_tautology.json +21 -0
  140. package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-23_fake_pass_tautology.json +21 -0
  141. package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-24_fake_pass_tautology.json +21 -0
  142. package/benchmarks/qa_eval/dataset/fake_pass_tautology/qa-challenge-25_fake_pass_tautology.json +21 -0
  143. package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-01_locator_drift.json +23 -0
  144. package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-02_locator_drift.json +23 -0
  145. package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-03_locator_drift.json +23 -0
  146. package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-04_locator_drift.json +23 -0
  147. package/benchmarks/qa_eval/dataset/locator_drift/qa-challenge-05_locator_drift.json +23 -0
  148. package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-16_stale_and_mutation.json +22 -0
  149. package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-17_stale_and_mutation.json +22 -0
  150. package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-18_stale_and_mutation.json +22 -0
  151. package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-19_stale_and_mutation.json +22 -0
  152. package/benchmarks/qa_eval/dataset/stale_and_mutation/qa-challenge-20_stale_and_mutation.json +23 -0
  153. package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-11_timing_and_race.json +22 -0
  154. package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-12_timing_and_race.json +22 -0
  155. package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-13_timing_and_race.json +22 -0
  156. package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-14_timing_and_race.json +22 -0
  157. package/benchmarks/qa_eval/dataset/timing_and_race/qa-challenge-15_timing_and_race.json +22 -0
  158. package/benchmarks/qa_eval/eval_runner.py +418 -0
  159. package/benchmarks/qa_eval/reports/AB_METHODOLOGY_REPORT.md +83 -0
  160. package/benchmarks/qa_eval/reports/BENCHMARK_REPORT.md +69 -0
  161. package/benchmarks/qa_eval/reports/eval_results.json +105 -0
  162. package/bin/agent-qa.js +10 -3
  163. package/docs/ARCHITECTURE.md +107 -0
  164. package/docs/CI_CD_INTEGRATION.md +94 -0
  165. package/docs/CLI_REFERENCE.md +157 -0
  166. package/docs/CONTRIBUTING.md +91 -0
  167. package/docs/PLUGIN_DEVELOPMENT_GUIDE.md +126 -0
  168. package/docs/TOKEN_QUOTA_PLAYBOOK.md +41 -0
  169. package/docs/adopted-ecosystem-tools.md +87 -0
  170. package/docs/schemas/synapse.config.schema.json +64 -0
  171. package/examples/cypress-ecommerce-suite/README.md +45 -0
  172. package/examples/cypress-ecommerce-suite/cypress/e2e/checkout.cy.js +17 -0
  173. package/examples/cypress-ecommerce-suite/cypress/pages/BasePage.js +29 -0
  174. package/examples/cypress-ecommerce-suite/cypress/pages/CartPage.js +51 -0
  175. package/examples/cypress-ecommerce-suite/cypress.config.js +13 -0
  176. package/examples/cypress-ecommerce-suite/package.json +13 -0
  177. package/examples/katalon-suite/Keywords/pages/BasePage.groovy +19 -0
  178. package/examples/katalon-suite/Keywords/pages/DashboardPage.groovy +29 -0
  179. package/examples/katalon-suite/Keywords/pages/LoginPage.groovy +45 -0
  180. package/examples/katalon-suite/Profiles/default.glbl +12 -0
  181. package/examples/katalon-suite/README.md +18 -0
  182. package/examples/katalon-suite/Scripts/Auth/TC_LoginSuccess/Script1234567890.groovy +12 -0
  183. package/examples/katalon-suite/Scripts/Dashboard/TC_ViewSummary/Script1234567891.groovy +15 -0
  184. package/examples/katalon-suite/katalon_suite.prj +21 -0
  185. package/examples/playwright-crm-suite/README.md +40 -0
  186. package/examples/playwright-crm-suite/package.json +14 -0
  187. package/examples/playwright-crm-suite/pages/BasePage.ts +37 -0
  188. package/examples/playwright-crm-suite/pages/CustomerPage.ts +57 -0
  189. package/examples/playwright-crm-suite/pages/LoginPage.ts +32 -0
  190. package/examples/playwright-crm-suite/playwright.config.ts +27 -0
  191. package/examples/playwright-crm-suite/tests/auth.spec.ts +22 -0
  192. package/examples/playwright-crm-suite/tests/customers.spec.ts +33 -0
  193. package/examples/plugins/sample-custom-plugin/README.md +14 -0
  194. package/examples/plugins/sample-custom-plugin/plugin.json +16 -0
  195. package/examples/plugins/sample-custom-plugin/skills/custom-security-headers-audit/SKILL.md +29 -0
  196. package/examples/plugins/sample-custom-plugin/skills/custom-security-headers-audit/examples/audit_fixture.json +8 -0
  197. package/examples/plugins/sample-custom-plugin/tools/custom_security_headers.py +125 -0
  198. package/examples/practices/README.md +22 -0
  199. package/examples/practices/requirements/crm/requirements_contracts.md +292 -0
  200. package/examples/practices/requirements/crm/requirements_customers.md +462 -0
  201. package/examples/practices/requirements/crm/requirements_login.md +202 -0
  202. package/examples/practices/requirements/crm/requirements_projects.md +396 -0
  203. package/examples/practices/requirements/crm/requirements_tasks.md +343 -0
  204. package/examples/practices/requirements/ecommerce/requirements_category_brand.txt +402 -0
  205. package/examples/practices/requirements/jira/KAN-5/KAN-1/2026-04-03_04-28-27.png +0 -0
  206. package/examples/practices/requirements/jira/KAN-5/KAN-1/KAN-1_requirement.md +52 -0
  207. package/examples/practices/requirements/jira/KAN-5/KAN-4/2026-04-03_04-28-19.png +0 -0
  208. package/examples/practices/requirements/jira/KAN-5/KAN-4/2026-04-03_04-28-57.png +0 -0
  209. package/examples/practices/requirements/jira/KAN-5/KAN-4/KAN-4_requirement.md +119 -0
  210. package/examples/practices/requirements/jira/KAN-5/KAN-5_overview.md +9 -0
  211. package/examples/practices/requirements/jira/KAN-5/KAN-6/2026-04-03_05-58-08.png +0 -0
  212. package/examples/practices/requirements/jira/KAN-5/KAN-6/2026-04-03_05-58-23.png +0 -0
  213. package/examples/practices/requirements/jira/KAN-5/KAN-6/KAN-6_requirement.md +32 -0
  214. package/examples/practices/testcases/api/book_management_api_test_cases.md +144 -0
  215. package/examples/practices/testcases/api/user_management_api_test_cases.md +139 -0
  216. package/examples/practices/testcases/crm/test_cases_crm_login.md +148 -0
  217. package/examples/practices/testcases/crm/test_cases_customers.md +156 -0
  218. package/examples/pytest-api-suite/README.md +45 -0
  219. package/examples/pytest-api-suite/conftest.py +31 -0
  220. package/examples/pytest-api-suite/pages/user_api_client.py +36 -0
  221. package/examples/pytest-api-suite/requirements.txt +2 -0
  222. package/examples/pytest-api-suite/tests/test_user_api.py +44 -0
  223. package/examples/selenium-suite/README.md +18 -0
  224. package/examples/selenium-suite/pages/base_page.py +27 -0
  225. package/examples/selenium-suite/pages/login_page.py +29 -0
  226. package/examples/selenium-suite/pages/order_page.py +25 -0
  227. package/examples/selenium-suite/pytest.ini +6 -0
  228. package/examples/selenium-suite/requirements.txt +2 -0
  229. package/examples/selenium-suite/tests/test_login.py +10 -0
  230. package/examples/selenium-suite/tests/test_order.py +10 -0
  231. package/package.json +22 -7
  232. package/scripts/generate_skill_examples.py +244 -0
  233. package/scripts/install.ps1 +112 -0
  234. package/scripts/install_global_plugin.ps1 +94 -0
  235. package/scripts/install_global_plugin.sh +49 -0
  236. package/scripts/lint_skills.ps1 +57 -0
  237. package/scripts/package_dist.py +323 -0
  238. package/scripts/setup.sh +59 -0
  239. package/scripts/update_hub.ps1 +19 -0
  240. package/scripts/update_hub.sh +15 -0
  241. package/skills_manifest.json +209 -6
  242. package/synapse.config.json +30 -0
  243. package/templates/PROJECT_AI_GUIDE_TEMPLATE.md +7 -7
  244. package/templates/PROJECT_STATE_TEMPLATE.md +1 -1
  245. package/templates/ai_bridges/CLAUDE.md +33 -16
  246. package/templates/ai_bridges/copilot-instructions.md +14 -21
  247. package/templates/ai_bridges/cursor_synapse_qa.mdc +17 -20
  248. package/templates/ai_bridges/windsurfrules +21 -21
  249. package/templates/ci/github-actions-synapse.yml +71 -4
  250. package/templates/welcome.html.tmpl +1674 -0
  251. package/tools/.infer_baseline.json +1102 -0
  252. package/tools/TOOLS_RUNBOOK.md +92 -130
  253. package/tools/__init__.py +26 -0
  254. package/tools/agent_canary.py +501 -501
  255. package/tools/analyze_project.py +31 -17
  256. package/tools/api_fuzzer.py +278 -6
  257. package/tools/author_integrity.py +6 -6
  258. package/tools/auto_heal.py +1 -1
  259. package/tools/browser_helpers.js +105 -7
  260. package/tools/bug_reporter.py +31 -1
  261. package/tools/bump_version.py +23 -3
  262. package/tools/cache_resolver.py +248 -14
  263. package/tools/check_env.py +55 -14
  264. package/tools/check_version_sync.py +153 -0
  265. package/tools/ci_healing_hook.py +1 -1
  266. package/tools/cli.py +263 -13
  267. package/tools/count_tokens.py +1257 -0
  268. package/tools/dashboard_generator.py +2638 -0
  269. package/tools/db_sandbox.py +198 -20
  270. package/tools/e2e_flow_prober.ps1 +12 -64
  271. package/tools/e2e_flow_prober.py +99 -0
  272. package/tools/e2e_flow_prober.sh +4 -0
  273. package/tools/export_postman_collection.py +29 -7
  274. package/tools/flaky_detector.py +4 -3
  275. package/tools/generate_allure_report.ps1 +12 -29
  276. package/tools/generate_allure_report.py +77 -0
  277. package/tools/generate_allure_report.sh +4 -0
  278. package/tools/generate_jmx_plan.py +299 -68
  279. package/tools/generate_test_reports.ps1 +12 -134
  280. package/tools/generate_test_reports.py +133 -0
  281. package/tools/generate_test_reports.sh +4 -0
  282. package/tools/gherkin_suite.py +758 -0
  283. package/tools/git_pre_commit_guard.py +12 -6
  284. package/tools/goldfish_review.py +366 -0
  285. package/tools/heal_pr_automator.py +1 -1
  286. package/tools/heuristic_locator_matcher.py +170 -21
  287. package/tools/infer_linter.py +612 -70
  288. package/tools/jtl_analyzer.py +1 -1
  289. package/tools/lint_ai_docs.py +64 -0
  290. package/tools/matrix_sharder.py +1 -1
  291. package/tools/mcp_excel_server.ps1 +12 -250
  292. package/tools/mcp_excel_server.py +249 -0
  293. package/tools/mcp_excel_server.sh +4 -0
  294. package/tools/mcp_server.py +368 -144
  295. package/tools/md_to_xlsx.py +307 -0
  296. package/tools/micro_mutator.py +300 -69
  297. package/tools/omni_transpiler.py +2 -2
  298. package/tools/output_formatter.py +128 -0
  299. package/tools/pinpoint_failure.py +88 -88
  300. package/tools/project_state.py +2 -2
  301. package/tools/repo_map.py +1 -1
  302. package/tools/safety_firewall.py +197 -33
  303. package/tools/setup_project.py +294 -30
  304. package/tools/skillspector.py +8 -8
  305. package/tools/spec_drift_sentinel.py +439 -0
  306. package/tools/sync_agent_rules.py +248 -0
  307. package/tools/telemetry_correlator.py +45 -0
  308. package/tools/test_impact.py +51 -12
  309. package/tools/tms_sync_bridge.py +21 -5
  310. package/tools/universal_ir.py +3 -0
  311. package/tools/update_sentinel.py +87 -15
  312. package/tools/verify_all.ps1 +13 -0
  313. package/tools/verify_all.py +463 -79
  314. package/tools/visual_diff_canvas.py +1 -0
  315. package/tools/visual_som_helper.py +1 -1
  316. package/tools/watch_mode.py +305 -0
  317. package/tools/welcome_page.py +291 -0
@@ -5,6 +5,7 @@ skills:
5
5
  - failure-autopsy-and-healing
6
6
  - self-healing-locator
7
7
  - file-and-report-validator
8
+ - systematic-debugging
8
9
  tools:
9
10
  - tools/auto_heal.py
10
11
  - tools/heal_pr_automator.py
@@ -45,3 +46,13 @@ tools:
45
46
  - `tools/ci_healing_hook.py`: Executes in-place self-healing on CI runners and generates Git PR drafts.
46
47
  - `tools/heal_pr_automator.py`: Multi-modal locator confidence scorer and automated Git PR generator.
47
48
  - `tools/pinpoint_failure.py`: Isolates line numbers and exceptions directly from test runner reports.
49
+
50
+ ## Persona Enhancements (Adapted from wshobson/agents, MIT)
51
+
52
+ > *Cherry-picked and condensed from the `debugger` agent (wshobson/agents, MIT — see NOTICE entry 21).*
53
+
54
+ - **Root cause, not symptoms:** every autopsy ends with a root-cause explanation plus the evidence supporting it; a fix without a named root cause fails this role's own standard.
55
+ - **Evidence-first diagnosis:** capture the error, reproduction steps, and isolation result BEFORE proposing anything — follow the four-phase discipline in `systematic-debugging`.
56
+ - **Minimal fix, then verify:** implement the smallest change addressing the root cause, verify against the reproduction, and never bundle unrelated cleanups into a healing PR.
57
+ - **Strategic instrumentation:** when a failure spans component boundaries, add one-shot boundary logging to see which layer breaks before theorizing.
58
+ - **Prevention recommendation:** close every autopsy with a prevention note (what guard, test, or locator tier would have caught this) and distill it into the 2-line lesson via `tools/cache_resolver.py record-lesson`.
@@ -6,6 +6,7 @@ skills:
6
6
  - self-healing-locator
7
7
  - visual-regression-sentinel
8
8
  - auth-session-and-cookie-manager
9
+ - playwright-webapp-testing
9
10
  tools:
10
11
  - tools/safety_firewall.py
11
12
  - tools/browser_helpers.js
@@ -39,3 +40,30 @@ tools:
39
40
  - `tools/e2e_flow_prober.ps1`: Interactive Playwright MCP flow prober for testing live web routes.
40
41
  - `tools/lookup_xpath.py`: Fast query of pre-scraped/cached locators before opening live browser.
41
42
  - `tools/visual_diff_canvas.py`: Pixel-level SSIM visual validation for GIS maps and canvas elements.
43
+
44
+ ## Session Trace & Human-in-the-Loop Escalation
45
+
46
+ > *Borrowed and adapted from the browser-use agent operating model (MIT license, browser-use/browser-use).*
47
+
48
+ 1. **Every exploration session leaves a replayable trace** — persist a
49
+ step-ordered log (`step, url, action, selector, outcome, screenshot_path,
50
+ elapsed_ms`) alongside the Data Contract JSON, so any discovered flow can
51
+ be re-run or audited without re-exploring the DOM.
52
+ 2. **Escalate before destructive or ambiguous actions** — when the safety
53
+ firewall flags an action (or confidence in the target element is low),
54
+ pause the session, surface the pending action + evidence (snapshot,
55
+ candidate selectors), and wait for explicit human approval
56
+ (`ALLOW_DESTRUCTIVE=1` / `force=true`) instead of guessing.
57
+ 3. **Traces are evidence, not decoration** — attach the step trace to bug
58
+ reports (`bug_reporter.py`) and healing PRs (`heal_pr_automator.py`) so
59
+ reviewers see exactly what the agent saw.
60
+
61
+ ## Persona Enhancements (Adapted from wshobson/agents, MIT)
62
+
63
+ > *Cherry-picked and condensed from the `test-automator` agent (wshobson/agents, MIT — see NOTICE entry 21).*
64
+
65
+ - **Smart element locators:** prefer dynamic, self-verifying selectors (Role > Label > TestId) and record their hit-rate evidence; a discovered selector without a measured hit rate under 200ms is not a deliverable.
66
+ - **Fast feedback loops:** probe incrementally — survey the smallest DOM region first and escalate to full-page scans only when the targeted probe misses.
67
+ - **Design for maintainability:** emit selector contracts that survive app refactors (semantic attributes over positional paths) so downstream Page Classes age slowly.
68
+ - **Flag every simulation:** when a mask or mock is applied (`network_mock_shield`, `smart_visual_masker`), record it in the Data Contract so `test-runner` consumers know what was simulated vs. real.
69
+ - **Full-lifecycle awareness:** when the target app must be started for exploration, follow the `playwright-webapp-testing` server lifecycle contract instead of ad-hoc process spawning.
@@ -5,6 +5,7 @@ skills:
5
5
  - agent-orchestration-multi-agent-optimize
6
6
  - graphify-impact-analyzer
7
7
  - architecture-decision-records
8
+ - persistent-planning-files
8
9
  tools:
9
10
  - tools/setup_project.py
10
11
  - tools/analyze_project.py
@@ -15,6 +16,7 @@ tools:
15
16
  - tools/lookup_tc.py
16
17
  - tools/omni_transpiler.py
17
18
  - tools/mcp_server.py
19
+ - tools/goldfish_review.py
18
20
  ---
19
21
 
20
22
  # Lead QA Orchestrator Agent
@@ -27,6 +29,8 @@ tools:
27
29
  - Run environment diagnostic checks via `tools/check_env.py`.
28
30
  - Maintain persistent execution state across long sessions via `tools/project_state.py` (`PROJECT_STATE.md`).
29
31
  - Inspect target project guide (`PROJECT_AI_GUIDE.md`) to map relevant modules and Page Classes.
32
+ - **The Elephant Responsibility:** Maintain high-level architectural memory, user intent, and domain knowledge while authoring specifications or Test Matrices. Refrain from writing low-level code directly.
33
+ - **Goldfish Spec Review Gate:** Trigger `tools/goldfish_review.py` (`agent-qa review-spec`) on drafted specifications/matrices before handing them to `pom-crafter`.
30
34
  - Construct detailed work breakdown structure (WBS) and dispatch tasks to specialized subagents (`live-explorer`, `pom-crafter`, `test-runner`, `failure-analyst`, `quality-gatekeeper`).
31
35
  - Monitor execution progress and enforce `AGENTS.md` operating discipline before final sign-off.
32
36
 
@@ -41,10 +45,22 @@ tools:
41
45
  - `tools/test_impact.py`: Determines impacted test cases prior to task assignment.
42
46
  - `tools/lookup_tc.py`: Fast lookup of existing test cases, acceptance criteria, and IDs.
43
47
  - `tools/mcp_server.py`: Exposes standardized JSON-RPC 2.0 endpoints for all AI clients.
48
+ - `tools/goldfish_review.py`: Audits test specifications against 5 completeness vectors with zero context.
44
49
 
45
50
  ## Single Front-Door FSM Workflow (Deterministic 5 Stages):
46
51
  1. **Stage 1 (Discovery):** Invoke `live-explorer` to inspect DOM/AOM and verify selectors under 200ms.
47
- 2. **Stage 2 (Synthesis):** Pass Data Contract to `pom-crafter` to generate Clean POM classes and flat test scripts.
48
- 3. **Stage 3 (Execution):** Dispatch headless execution via `test-runner`.
49
- 4. **Stage 4 (Autopsy):** If test fails, invoke `failure-analyst` to perform RCA and auto-heal.
50
- 5. **Stage 5 (Acceptance):** Trigger `quality-gatekeeper` to verify all 8 Quality Gates and mutation score >= 80%.
52
+ 2. **Stage 1.5 (Goldfish Spec Gate):** Run `tools/goldfish_review.py` on test specifications. Block code synthesis if spec has unstated assumptions.
53
+ 3. **Stage 2 (Synthesis):** Pass Data Contract to `pom-crafter` to generate Clean POM classes and flat test scripts.
54
+ 4. **Stage 3 (Execution):** Dispatch headless execution via `test-runner`.
55
+ 5. **Stage 4 (Autopsy):** If test fails, invoke `failure-analyst` to perform RCA and auto-heal.
56
+ 6. **Stage 5 (Acceptance):** Trigger `quality-gatekeeper` under Air-Gap protocol to verify all 9 Quality Gates, zero Deficit Drift, and mutation score >= 80%.
57
+
58
+ ## Persona Enhancements (Adapted from wshobson/agents, MIT)
59
+
60
+ > *Cherry-picked and condensed from the `context-manager` agent (wshobson/agents, MIT — see NOTICE entry 21). These bullets extend, never replace, the responsibilities above.*
61
+
62
+ - **Context handoff discipline:** every dispatch to a specialist carries a scoped context package (task goal, verified inputs, file anchors) — never a raw conversation dump; each handoff states what is being handed over and what is expected back.
63
+ - **Token budget per stage:** allocate a context/token budget per FSM stage and prune irrelevant context before dispatch; re-assemble context for each agent rather than forwarding accumulated history.
64
+ - **Capability matching:** route work to the agent whose capability profile matches the task requirement (explorer for live DOM, crafter for synthesis, runner for execution), not to whoever is idle.
65
+ - **Context quality loop:** after each stage, score the handoff (did the specialist need to re-ask?); treat repeated clarification as an orchestration defect and adjust the next dispatch package.
66
+ - **Persistent plan ownership:** own the `task_plan.md` for multi-phase runs per `persistent-planning-files`; workers report through their own ledgers and never rewrite the shared plan.
@@ -8,6 +8,8 @@ skills:
8
8
  - api-spec-to-e2e-matrix
9
9
  - file-and-report-validator
10
10
  - db-state-verifier-and-seeder
11
+ - surgical-coding-principles
12
+ - lean-code-ladder
11
13
  tools:
12
14
  - tools/generate_tc_from_story.py
13
15
  - tools/generate_api_matrix.py
@@ -79,3 +81,13 @@ tools:
79
81
  - `tools/lookup_tc.py`: Fast query of test case specifications and acceptance criteria.
80
82
  - `tools/repo_map.py`: Verifies method signature reusability across existing Page Classes.
81
83
  - `tools/mcp_excel_server.ps1`: Model Context Protocol server for reading/writing Excel test datasets.
84
+
85
+ ## Persona Enhancements (Adapted from wshobson/agents, MIT)
86
+
87
+ > *Cherry-picked and condensed from the `backend-architect` agent (wshobson/agents, MIT — see NOTICE entry 21).*
88
+
89
+ - **Contract-first synthesis:** define the Page Class method contract (inputs, return, assertion semantics) before writing its body; the contract is what `test-runner` and `failure-analyst` depend on.
90
+ - **Clear boundaries, minimal surface:** one Page Class owns one functional module; expose only business-flow methods and keep locator plumbing private.
91
+ - **Simplicity over premature optimization:** favor the simplest structure that satisfies the Clean POM contract; descend the `lean-code-ladder` before adding any abstraction or helper layer.
92
+ - **Design for testability:** keep explicit seams and avoid hidden global state in helpers so new Page Class logic can follow `test-driven-development`.
93
+ - **Document structural decisions:** when a locator tier, data-chain, or inheritance choice is made, record the rationale as a short ADR via `architecture-decision-records`.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: quality-gatekeeper
3
- description: Sentinel gatekeeper enforcing 8 Quality Gates, AST mutation thresholds (>= 80%), and static verification before task completion.
3
+ description: Sentinel gatekeeper enforcing 9 Quality Gates, AST mutation thresholds (>= 80%), and static verification before task completion.
4
4
  skills:
5
5
  - antigravity-test-sentinel
6
6
  - code-refactoring-refactor-clean
@@ -8,6 +8,7 @@ skills:
8
8
  - web-vitals-and-performance-profiler
9
9
  - db-state-verifier-and-seeder
10
10
  - security-dast-sentinel
11
+ - verification-before-completion
11
12
  tools:
12
13
  - tools/verify_all.py
13
14
  - tools/infer_linter.py
@@ -18,16 +19,19 @@ tools:
18
19
  - tools/validate_groovy_scripts.py
19
20
  - tools/git_pre_commit_guard.py
20
21
  - tools/agent_canary.py
22
+ - tools/spec_drift_sentinel.py
21
23
  ---
22
24
 
23
25
  # Quality Gatekeeper & Sentinel Agent
24
26
 
25
27
  ## Core Responsibilities:
26
28
  - **Hard Rejection Policy (Mutation Score Gate):** Strictly **REJECT and BLOCK** any newly generated or modified test case without an accompanying `tools/micro_mutator.py` evaluation confirming a Mutation Score of **at least 80%**. Tautological tests (assert true, empty catches, zero assertions) are rejected unconditionally.
27
- - Execute `tools/verify_all.py` to enforce all 8 Definition of Done (DoD) Quality Gates.
29
+ - **Zero-Context Air-Gap Protocol (Goldfish Audit Invariant):** The Gatekeeper operates strictly as an adversarial, stateless auditor. It disregards conversation transcripts, conversational excuses, or verbal assurances from earlier turns. Every verdict must be anchored exclusively on disk artifacts: `git diff`, fresh `Reports/junit.xml`, `PROJECT_STATE.md`, and deterministic CLI command outputs.
30
+ - Execute `tools/verify_all.py` to enforce all 9 Definition of Done (DoD) Quality Gates.
28
31
  - Run static AST code analysis via `tools/infer_linter.py` to block Fake-Pass antipatterns (0 asserts or empty catches).
32
+ - Audit specification alignment via `tools/spec_drift_sentinel.py` to reject Deficit Drift (missing acceptance criteria) and flag Scope Drift (unauthorized code bloat).
29
33
  - Validate Groovy script syntactic completeness (matching braces, unclosed quotes) via `tools/validate_groovy_scripts.py`.
30
- - Inject AST micro-mutants via `tools/micro_mutator.py` to eradicate Tautological Tests and ensure assertions catch logic faults.
34
+ - Inject syntactic micro-mutants via `tools/micro_mutator.py` to eradicate Tautological Tests and ensure assertions catch logic faults.
31
35
  - Enforce pre-commit safety boundaries via `tools/git_pre_commit_guard.py`.
32
36
  - Benchmark MTTR resilience and self-healing recovery via `tools/agent_canary.py`.
33
37
  - Verify 100% UTF-8 No BOM compliance across all modified codebase files.
@@ -36,12 +40,23 @@ tools:
36
40
 
37
41
  ## Available Tooling & Skills (On-Demand Activation):
38
42
  > *Note: Tools are invoked strictly on-demand based on situational context, never executed indiscriminately.*
39
- - `tools/verify_all.py`: Orchestrates all 8 DoD quality checks.
43
+ - `tools/verify_all.py`: Orchestrates all 9 DoD quality checks.
40
44
  - `tools/infer_linter.py`: AST static analysis for zero-assertion and empty catch traps.
41
45
  - `tools/micro_mutator.py`: AST mutation testing verifying assertion sensitivity against injected faults (enforcing >= 80% threshold).
46
+ - `tools/spec_drift_sentinel.py`: Measures Deficit Drift and Scope Drift between test spec and implementation.
42
47
  - `tools/trace_data_flow.py`: Taint analysis confirming zero database pollution.
43
48
  - `tools/wcag_audit.py`: Validates compliance with WCAG 2.2 accessibility rules.
44
49
  - `tools/lint_ai_docs.py`: Audits documentation integrity and prevents token pollution.
45
50
  - `tools/validate_groovy_scripts.py`: Static linter verifying syntax and brace balance in Groovy test scripts.
46
51
  - `tools/git_pre_commit_guard.py`: Pre-commit git hook preventing unverified code from being staged.
47
52
  - `tools/agent_canary.py`: Injects 8 failure vectors to benchmark MTTR and autonomous recovery rate.
53
+
54
+ ## Persona Enhancements (Adapted from wshobson/agents, MIT)
55
+
56
+ > *Cherry-picked and condensed from the `security-auditor` agent (wshobson/agents, MIT — see NOTICE entry 21).*
57
+
58
+ - **Defense-in-depth for evidence:** never accept a single signal as proof of quality; gates corroborate each other (static scan + mutation score + fresh run output) before any pass verdict.
59
+ - **Fail securely:** an unverifiable claim is a FAIL, not a warning — when evidence is missing, the gate blocks rather than assuming good faith.
60
+ - **Least privilege on evidence:** require the minimal sufficient evidence per verdict (impacted subset for pre-merge, full matrix for release) without demanding more than the decision needs.
61
+ - **Practical over theoretical:** flag actionable violations with exact fixes (file, line, command to rerun) rather than abstract quality commentary.
62
+ - **Evidence protocol enforcement:** apply `verification-before-completion` to every completion claim reaching Stage 5 — fresh command output in the current turn, or the claim is rejected.
@@ -7,6 +7,7 @@ skills:
7
7
  - bats-testing-patterns
8
8
  - auth-session-and-cookie-manager
9
9
  - flaky-test-sentinel-and-quarantine
10
+ - test-driven-development
10
11
  tools:
11
12
  - tools/safety_firewall.py
12
13
  - tools/matrix_sharder.py
@@ -41,3 +42,13 @@ tools:
41
42
  - `tools/pinpoint_failure.py`: Fast 0.1s failure isolation from JUnit XML reports.
42
43
  - `tools/generate_allure_report.ps1`: Builds and serves interactive Allure test execution dashboards.
43
44
  - `tools/generate_test_reports.ps1`: Compiles consolidated JUnit/HTML execution reports.
45
+
46
+ ## Persona Enhancements (Adapted from wshobson/agents, MIT)
47
+
48
+ > *Cherry-picked and condensed from the `test-automator` agent (wshobson/agents, MIT — see NOTICE entry 21).*
49
+
50
+ - **Fast feedback first:** order execution so the highest-signal, fastest suites run first; a broken main flow must surface in seconds, not after the full matrix.
51
+ - **Stability over coverage theater:** prioritize run stability and reliability; route non-deterministic cases to `tools/flaky_detector.py` quarantine instead of letting retries launder flakiness into green.
52
+ - **Dynamic test selection:** consume `tools/test_impact.py` outputs to select impacted subsets for pre-merge runs; reserve the full matrix for merge gates.
53
+ - **TDD-aligned runner tooling:** when authoring or repairing runner-side utilities (sharding configs, report glue), follow `test-driven-development` — watch the utility's test fail before implementing.
54
+ - **Honest reporting:** relay pass/fail strictly from distilled tool output (`tools/distill_log.py`); an execution report never says "green" without the run's own output attached.
@@ -0,0 +1,40 @@
1
+ ---
2
+ trigger: always_on
3
+ description: Human-centric communication and explanation protocol enforcing clear, concise, pragmatic language without technical jargon overload.
4
+ ---
5
+
6
+ # Human-Centric Communication & Pragmatic Explanation Protocol
7
+
8
+ > **Mandatory Communication Standards for All AI Agents:**
9
+ > When communicating, explaining concepts, or reporting status to the user, always communicate clearly, concisely, and practically: converse in Vietnamese for conversation/telemetry, and keep codebase artifacts/commits in English. Avoid unnecessary technical jargon overload ("don't be too tech").
10
+
11
+ ---
12
+
13
+ ## 1. Principles of Pragmatic Communication
14
+
15
+ 1. **Clear, Direct & Plain Language (Focus on Core Essentials):**
16
+ - Express ideas in a crisp, readable, and well-structured manner.
17
+ - Always clarify three core elements: *What is the issue?*, *How is it being addressed?*, and *What are the results or next steps?*.
18
+ - Avoid circular reasoning, overly long digressions, or dry academic lecture-style exposition.
19
+
20
+ 2. **Zero Tech-Jargon Overload ("Don't Be Too Tech"):**
21
+ - Focus on practical business impact and actionable outcomes rather than internal plumbing, obscure acronyms, or low-level mechanics unless specifically requested.
22
+ - Replace complex technical jargon with plain, intuitive, everyday language wherever possible.
23
+ - If specialized technical terminology is necessary, provide a brief, practical explanation grounded in the user's context.
24
+
25
+ 3. **Solution & Action-Oriented:**
26
+ - Present information in an intuitive structure: Current Status -> Proposed/Implemented Solution -> Concrete Outcome or Next Action.
27
+ - Provide clear, actionable recommendations to help the user make fast, informed decisions.
28
+
29
+ 4. **Natural, Respectful & Collaborative:**
30
+ - Communicate in a friendly, conversational tone as an active pair-programming partner.
31
+ - Maintain a constructive, cooperative attitude at all times.
32
+
33
+ 5. **Bilingual Separation (Vietnamese for Chat, English for Code & Docs):**
34
+ - **User Communication & Telemetry:** Always converse, reply, and format chat telemetry blocks (Header & Footer) in Vietnamese (natural, collaborative, and easy to understand).
35
+ - **Repository & Code Artifacts:** All rule files, code, automated tests, Page Classes, docstrings, and git commits must remain strictly in English.
36
+
37
+ 6. **Lean Mode as Default (Token Saver & Developer Focus):**
38
+ - By default, AI operates in Lean Mode: emits a single-line status badge and omits the verbose Footer Telemetry block to save ~200 tokens per turn and reduce visual noise.
39
+ - For new users or initial session turns, include a polite 1-line note explaining Lean Mode is active and offering to toggle verbose telemetry if desired.
40
+ - Only emit the detailed telemetry footer when explicitly requested ("bật telemetry", "chi tiết").
@@ -86,3 +86,26 @@ flowchart TD
86
86
  - **CLI Logs (`tools/distill_log.py`):** Automatically truncate 95% of verbose lines, preserving only the direct failing line, root cause exception, and the last 3 HTTP requests.
87
87
  - **DOM Purifier (`qa.getCompactAOM` in `browser_helpers.js`):** **Strictly forbidden to send raw HTML.** Use `qa.getCompactAOM(maxDepth=3)` to extract only interactive nodes with Role, Name, State, and TestId.
88
88
  - **Framework Independence (`tools/universal_ir.py`):** Author and reason over clean Universal IR representation before emitting framework-specific boilerplate (Groovy, TS, Java).
89
+
90
+
91
+ ---
92
+
93
+ ## 6. Pillar 6: The Elephant-Goldfish Memory Protocol (Zero-Contamination Swarm)
94
+
95
+ *(Synthesized from Google's Elephant-Goldfish Model by Dave Rensin)*
96
+
97
+ 1. **The Principle:**
98
+ - Single-agent long context inevitably breeds **Confirmation Bias** and **Context Contamination**: when the same context window designs an architecture, drafts a spec, and evaluates its own plan, it glosses over unstated assumptions and hallucinates completeness.
99
+ - True engineering rigor requires decoupling deep-context coordination (**The Elephant**) from stateless, adversarial verification (**The Goldfish**).
100
+
101
+ 2. **Actionable Rules:**
102
+ - **The Elephant (Stateful Orchestrator):**
103
+ - Narrows problem boundaries, gathers user intent, and drafts architectural specs / Test Matrices (`docs/specs/*.md`).
104
+ - Maintains global long-term project context via `PROJECT_STATE.md`.
105
+ - **Strict Invariant:** The Elephant is prohibited from generating automation test scripts or asserting its own test design validity during the initial design phase.
106
+ - **The Goldfish (Stateless Subagent Swarm):**
107
+ - Spun up in a fresh, isolated subagent context (`Workspace: 'share'`) with **ZERO conversation history**.
108
+ - Evaluates solely the cold Markdown artifact and source code on disk using structured contracts (e.g., `tools/goldfish_review.py`).
109
+ - If the Goldfish cannot execute or understand the specification without guessing, the specification is rejected back to the Elephant.
110
+ - **Air-Gap Data Contract:**
111
+ - Data exchanged between stages must pass via deterministic files on disk (JSON Data Contracts, Test Matrices, JUnit XML), never via raw prompt inheritance.
@@ -31,18 +31,17 @@ AI Agents execute the clean standard Git workflow within the target project:
31
31
  ### Step 1: Pre-Push Verification (DoD Gate)
32
32
  Run the project's quality verification gate or test suite before committing:
33
33
  ```bash
34
- # Example: 7 Quality Gates verification or project test runner
34
+ # Example: 9 Quality Gates verification or project test runner
35
35
  python tools/verify_all.py # or npm test / npx playwright test
36
36
  ```
37
37
  *Never push unverified code or broken tests.*
38
38
 
39
39
  ### Step 2: Stage Project Changes
40
- Stage changed project files within the target project workspace:
40
+ Stage specifically changed project files within the target project workspace:
41
41
  ```bash
42
42
  git add <changed-files>
43
- # or git add -A (within target project directory)
44
43
  ```
45
- Ensure no temporary artifacts (e.g., screenshots, video recordings, local cache) are staged.
44
+ Ensure no temporary artifacts (e.g., screenshots, video recordings, local cache) are staged. Avoid `git add -A` to prevent staging untracked scratch files.
46
45
 
47
46
  ### Step 3: Conventional Commit
48
47
  Create a structured semantic commit message following conventional standards:
@@ -51,30 +50,25 @@ git commit -m "<type>(<scope>): <summary>"
51
50
  # Examples:
52
51
  # git commit -m "feat(billing): add Clean POM for Invoice Reconciliation"
53
52
  # git commit -m "test(auth): add automated login boundary test cases"
54
- # git commit -m "fix(locators): heal stale table row selector in DataMiningPage"
53
+ # git commit -m "fix(locators): heal stale table row selector in OrderSummaryPage"
55
54
  ```
56
55
 
57
- ### Step 4: Direct Push to Project Remote
58
- Push directly to the current tracking branch on the project's remote:
56
+ ### Step 4: Push to Project Remote (With User Confirmation)
57
+ Push to the current tracking branch on the project's remote after user confirmation:
59
58
  ```bash
60
59
  git push origin <current-branch>
61
60
  ```
62
61
 
63
- ### Step 5: Post-Analysis Artifact Push (Post-Audit Auto-Sync)
62
+ ### Step 5: Post-Analysis Artifact Synchronization (User Confirmation Required)
64
63
  Whenever the user requests project audit/analysis or runs `tools/analyze_project.py` ("analyze project", "audit project"), after generating/updating the report files:
65
- 1. AI Agent must immediately stage the updated intelligence files inside the target project:
64
+ 1. AI Agent stages and commits the updated intelligence files locally inside the target project:
66
65
  ```bash
67
66
  git add PROJECT_HEALTH_REPORT.md repo_map.txt
68
- ```
69
- 2. Commit with conventional semantic message:
70
- ```bash
71
67
  git commit -m "docs(audit): update project health report and AST repo map"
72
68
  ```
73
- 3. Push to the target project's remote repository:
74
- ```bash
75
- git push origin <current-branch>
76
- ```
77
- *(Ensures the entire team and all AI agents consistently share the latest method map and health metrics).*
69
+ 2. **Never push to remote automatically.** Always confirm with the user first:
70
+ *"Intelligence reports have been generated and committed locally. Would you like to push to origin/<branch>?"*
71
+ *(Prevents unexpected remote commits while keeping the local team workspace up-to-date).*
78
72
 
79
73
  ---
80
74
 
@@ -1,14 +1,14 @@
1
- ---
2
- trigger: always_on
3
- description: Consult the graphify knowledge graph at graphify-out/ for codebase and architecture questions.
4
- ---
5
-
6
- ## graphify
7
-
8
- This project has a graphify knowledge graph at graphify-out/.
9
-
10
- Rules:
11
- - For codebase or architecture questions, when `graphify-out/graph.json` exists, first run `graphify query "<question>"` (CLI) or `query_graph` (MCP). Use `graphify path "<A>" "<B>"` / `shortest_path` for relationships and `graphify explain "<concept>"` / `get_node` for focused concepts. These return a scoped subgraph, usually much smaller than `GRAPH_REPORT.md` or raw grep output.
12
- - If graphify-out/wiki/index.md exists, navigate it instead of reading raw files
13
- - Read graphify-out/GRAPH_REPORT.md only for broad architecture review or when query/path/explain do not surface enough context
14
- - After modifying code files in this session, run `graphify update .` to keep the graph current (AST-only, no API cost)
1
+ ---
2
+ trigger: always_on
3
+ description: Consult the graphify knowledge graph at graphify-out/ for codebase and architecture questions.
4
+ ---
5
+
6
+ ## graphify
7
+
8
+ This project has a graphify knowledge graph at graphify-out/.
9
+
10
+ Rules:
11
+ - For codebase or architecture questions, when `graphify-out/graph.json` exists, first run `graphify query "<question>"` (CLI) or `query_graph` (MCP). Use `graphify path "<A>" "<B>"` / `shortest_path` for relationships and `graphify explain "<concept>"` / `get_node` for focused concepts. These return a scoped subgraph, usually much smaller than `GRAPH_REPORT.md` or raw grep output.
12
+ - If graphify-out/wiki/index.md exists, navigate it instead of reading raw files
13
+ - Read graphify-out/GRAPH_REPORT.md only for broad architecture review or when query/path/explain do not surface enough context
14
+ - After modifying code files in this session, run `graphify update .` to keep the graph current (AST-only, no API cost)
@@ -11,9 +11,9 @@ description: Critical anti-patterns, past mistakes, and strict avoidance rules (
11
11
  | # | Mistake / Anti-Pattern | Root Cause | Mandatory Avoidance Rule |
12
12
  |---|---|---|---|
13
13
  | **1** | **XPath strings parsed as methods** | Regex captured `String TXT = "...contains(...)"`. | In Groovy, `=` before `(` denotes a variable/constant, **never** a method. |
14
- | **2** | **GIS map polygon rejected** | Fixed `(100, 200)` coordinates caused overlap. | Always randomize coordinates via `TestHelper.getUniquePolygonCoordinates()`. |
15
- | **3** | **`ElementClickInterceptedException`** | Clicked while PrimeNG overlay backdrop was fading. | Always use `BasePage.clickJS()` or `window.__helper.clickSafe()` to bypass overlays. |
16
- | **4** | **Context window blowout** | Read 4,368-line `DataMiningPage.groovy` directly. | **Never read large files whole.** Query `tools/repo_map.txt` or read 20-50 line ranges. |
14
+ | **2** | **GIS map / geometric polygon collision** | Hardcoded fixed coordinates `(100, 200)` caused overlap. | Always randomize geometric coordinates via dynamic bounding box/offset randomizer. |
15
+ | **3** | **`ElementClickInterceptedException`** | Clicked while modal/spinner backdrop overlay was fading. | Wait for overlay detachment or bypass via JS dispatch (`clickJS` / `window.__helper.clickSafe()`). |
16
+ | **4** | **Context window blowout** | Read monolithic 4,000+ line Page Class directly. | **Never read large files whole.** Query `tools/repo_map.txt` or read 20-50 line ranges. |
17
17
  | **5** | **Flaky timing on CI/CD** | `Thread.sleep` failed under variable network lag. | Replace 100% with Smart Wait: Angular `isStable()` and CDP `Network Idle 0`. |
18
18
  | **6** | **DB polluted with test junk** | Created entities without executing deletion. | Every data creation test case **must** execute idempotent teardown cleanup. |
19
19
  | **7** | **Graphify/CLI ran on Skill Hub instead of target project** | Defaulted to `CWD = Agent Skill` without checking Active Workspaces. | **Agent Skill folder = read-only hub, NEVER a CLI target.** Always identify the real target project from `Active Workspaces` (the non-hub workspace). If multiple project workspaces exist, ask the user. All outputs (graphify-out/, reports) must land inside the target project folder. |
@@ -1,29 +1,29 @@
1
- ---
2
- trigger: always_on
3
- description: Mandatory rules for Autonomous Multi-Agent Swarm, Pure Headless Playwright Live interaction (1920x1080), and Zero-Second Auth.
4
- ---
5
-
6
- # Mandatory Rules: Autonomous Multi-Agent Swarm, Live Playwright & Failure Analysis
7
-
8
- Mandatory for all test automation tasks in enterprise web test suites:
9
-
10
- 1. **Autonomous Swarm Orchestration:**
11
- - Main AI acts as **Lead QA Orchestrator**, executing directions from **Project Lead / QA Director** and coordinating 5 specialized subagents:
12
- * **Live Interaction Explorer:** Probe live DOM/AOM via Playwright MCP (`browser_run_code_unsafe`).
13
- * **Automation Code Crafter:** Generate Page Classes and Groovy scripts adhering to Clean POM Flat Architecture.
14
- * **Test Execution Runner:** Dispatch headless Katalon tests via CLI.
15
- * **Quality Gatekeeper & Failure Analyst:** Enforce 100% UTF-8 No BOM, block bypass logic, analyze failures via `FAILED_*.png` and Allure reports.
16
- * **Technical Documentation Specialist:** Translate code to business workflows, generate Mermaid diagrams.
17
- 2. **Anti-Redundancy Protocol:**
18
- - Single sign-on via Zero-Second Auth (`session.json`); never re-enter login forms.
19
- - Live Explorer emits JSON Data Contract -> Code Crafter consumes to codify; Documentation Specialist consumes to chart workflows. Zero redundant DOM rescanning.
20
- - Targeted re-tests only on failed cases; never re-run entire batches for single-case bug fixes.
21
- - Quality Gatekeeper conducts deep RCA only on actual FAILED cases; immediately accept PASSED runs.
22
- 3. **Playwright Live Interaction & Mandatory Headless:**
23
- - All flow discovery, live probing, and bug fixing **MUST RUN IN PURE HEADLESS MODE**.
24
- - Do not open browser GUI windows to avoid stealing user desktop focus.
25
- - Maintain standard virtual Full HD `1920x1080` (`viewport: { width: 1920, height: 1080 }`).
26
- 4. **5 Superpowers & 5 AI Paradigms:**
27
- - Zero-Second Auth, Direct API Seeding, Accessibility Tree (AOM), Multi-Context Dual Role, Route Mocking.
28
- - Self-Healing Selectors, Multimodal Visual Assertions, Autonomous Fuzzing, CDP Deep Profiling, Multi-Agent Swarm.
29
- 5. **Reference Documentation:** Follow [SKILL.md](.agents/skills/playwright-live-interaction/SKILL.md) and [swarm_orchestration.md](.agents/skills/playwright-live-interaction/references/swarm_orchestration.md).
1
+ ---
2
+ trigger: always_on
3
+ description: Mandatory rules for Autonomous Multi-Agent Swarm, Pure Headless Playwright Live interaction (1920x1080), and Zero-Second Auth.
4
+ ---
5
+
6
+ # Mandatory Rules: Autonomous Multi-Agent Swarm, Live Playwright & Failure Analysis
7
+
8
+ Mandatory for all test automation tasks in enterprise web test suites:
9
+
10
+ 1. **Autonomous Swarm Orchestration:**
11
+ - Main AI acts as **Lead QA Orchestrator**, executing directions from **Project Lead / QA Director** and coordinating 5 specialized subagents:
12
+ * **Live Interaction Explorer:** Probe live DOM/AOM via Playwright MCP (`browser_run_code_unsafe`).
13
+ * **Automation Code Crafter:** Generate Page Classes and Groovy scripts adhering to Clean POM Flat Architecture.
14
+ * **Test Execution Runner:** Dispatch headless Katalon tests via CLI.
15
+ * **Quality Gatekeeper & Failure Analyst:** Enforce 100% UTF-8 No BOM, block bypass logic, analyze failures via `FAILED_*.png` and Allure reports.
16
+ * **Technical Documentation Specialist:** Translate code to business workflows, generate Mermaid diagrams.
17
+ 2. **Anti-Redundancy Protocol:**
18
+ - Single sign-on via Zero-Second Auth (`session.json`); never re-enter login forms.
19
+ - Live Explorer emits JSON Data Contract -> Code Crafter consumes to codify; Documentation Specialist consumes to chart workflows. Zero redundant DOM rescanning.
20
+ - Targeted re-tests only on failed cases; never re-run entire batches for single-case bug fixes.
21
+ - Quality Gatekeeper conducts deep RCA only on actual FAILED cases; immediately accept PASSED runs.
22
+ 3. **Playwright Live Interaction & Mandatory Headless:**
23
+ - All flow discovery, live probing, and bug fixing **MUST RUN IN PURE HEADLESS MODE**.
24
+ - Do not open browser GUI windows to avoid stealing user desktop focus.
25
+ - Maintain standard virtual Full HD `1920x1080` (`viewport: { width: 1920, height: 1080 }`).
26
+ 4. **5 Superpowers & 5 AI Paradigms:**
27
+ - Zero-Second Auth, Direct API Seeding, Accessibility Tree (AOM), Multi-Context Dual Role, Route Mocking.
28
+ - Self-Healing Selectors, Multimodal Visual Assertions, Autonomous Fuzzing, CDP Deep Profiling, Multi-Agent Swarm.
29
+ 5. **Reference Documentation:** Follow [SKILL.md](.agents/skills/playwright-live-interaction/SKILL.md) and [swarm_orchestration.md](.agents/skills/playwright-live-interaction/references/swarm_orchestration.md).
@@ -0,0 +1,132 @@
1
+ # Mobile Automation Standards & Appium Rules (Enterprise Standard)
2
+
3
+ > **Scope:** Applies to all Mobile Test Automation tasks using Appium, UIAutomator2 (Android), and XCUITest (iOS).
4
+ > **Objective:** Deliver resilient, independent, flake-free mobile suites supporting parallel multi-device execution.
5
+
6
+ ---
7
+
8
+ ## 1. Native Locator Priority Hierarchy
9
+
10
+ When interacting with Native or Hybrid mobile applications, agents **MUST** strictly adhere to the following locator priority order:
11
+
12
+ ```mermaid
13
+ flowchart TD
14
+ L1["<b>1. Accessibility ID / Content-Desc</b><br/>• Cross-platform (iOS & Android)<br/>• Most stable, independent of layout"]
15
+ L2["<b>2. Resource-ID (Android Native)</b><br/>• Example: com.app.package:id/btn_login"]
16
+ L3["<b>3. iOS Predicate String / Class Chain (iOS Native)</b><br/>• Native XCUITest performance"]
17
+ L4["<b>4. Dynamic XPath (Last Resort)</b><br/>• Relative XPath with text/attributes only<br/>• Absolute structural XPath is FORBIDDEN"]
18
+
19
+ L1 --> L2 --> L3 --> L4
20
+ ```
21
+
22
+ ### Standard Implementation Examples:
23
+ ```java
24
+ // 1. Accessibility ID (Top priority)
25
+ driver.findElement(AppiumBy.accessibilityId("btn_login"));
26
+
27
+ // 2. Resource-ID Android (Android Native priority)
28
+ driver.findElement(AppiumBy.id("com.enterprise.app:id/input_username"));
29
+
30
+ // 3. iOS Predicate String (iOS Native priority)
31
+ driver.findElement(AppiumBy.iOSNsPredicateString("label == 'Sign In' AND visible == 1"));
32
+
33
+ // 4. iOS Class Chain
34
+ driver.findElement(AppiumBy.iOSClassChain("**/XCUIElementTypeButton[`label == 'Submit'`]"));
35
+ ```
36
+
37
+ ---
38
+
39
+ ## 2. Strict Anti-Patterns & Prohibitions
40
+
41
+ - ❌ **FORBIDDEN: Absolute XPath based on DOM tree hierarchy:**
42
+ ```java
43
+ // STRICTLY FORBIDDEN:
44
+ driver.findElement(By.xpath("//android.widget.FrameLayout[1]/android.widget.LinearLayout[2]/android.widget.Button[1]"));
45
+ ```
46
+ - ❌ **FORBIDDEN: Static sleeps (`Thread.sleep()`):** Introduces pipeline latency and flaky synchronization.
47
+ - ❌ **FORBIDDEN: Interacting with off-screen elements without scrolling:** Always scroll into view first.
48
+ - ❌ **FORBIDDEN: Hardcoded device identifiers:** UDID, Device Name, Platform Version must be dynamic via environment variables or profile configurations.
49
+
50
+ ---
51
+
52
+ ## 3. Screen Object Model (SOM) Architecture
53
+
54
+ Following the Page Object Model design pattern, mobile test code adheres to **Screen Object Model**:
55
+ - Screen class names must end with the `Screen` suffix (e.g., `LoginScreen.java`, `HomeScreen.java`, `CartScreen.java`).
56
+ - Extend `BaseScreen` providing shared AppiumDriver instances and gesture helpers.
57
+ - Encapsulate locators within Screen classes; test scripts call business actions only.
58
+
59
+ ```java
60
+ public class LoginScreen extends BaseScreen {
61
+ private final By btnLogin = AppiumBy.accessibilityId("btn_submit");
62
+ private final By txtEmail = AppiumBy.accessibilityId("input_email");
63
+
64
+ public LoginScreen(AppiumDriver driver) {
65
+ super(driver);
66
+ }
67
+
68
+ public HomeScreen loginWithValidCredentials(String email, String password) {
69
+ waitForElementVisible(txtEmail).sendKeys(email);
70
+ // ...
71
+ return new HomeScreen(driver);
72
+ }
73
+ }
74
+ ```
75
+
76
+ ---
77
+
78
+ ## 4. Synchronization & Smart Mobile Waits
79
+
80
+ - Always use `WebDriverWait` with explicit `Duration`:
81
+ ```java
82
+ WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(15));
83
+ wait.until(ExpectedConditions.visibilityOfElementLocated(AppiumBy.accessibilityId("welcome_banner")));
84
+ ```
85
+ - Smart scroll into view:
86
+ ```java
87
+ // Android UIAutomator Scrollable
88
+ driver.findElement(AppiumBy.androidUIAutomator(
89
+ "new UiScrollable(new UiSelector().scrollable(true))" +
90
+ ".scrollIntoView(new UiSelector().text(\"Confirm\"))"
91
+ ));
92
+ ```
93
+
94
+ ---
95
+
96
+ ## 5. Mobile Lifecycle & Device Gestures
97
+
98
+ 1. **Auto-Grant Permissions:**
99
+ - Configure capabilities to auto-grant system permissions:
100
+ `capabilities.setCapability("autoGrantPermissions", true);` (Android) or `"permissions": "{\"com.app\": {\"camera\": \"yes\"}}"` (iOS).
101
+ 2. **Screen Orientation:**
102
+ - Verify layout adaptability in both Portrait and Landscape when supported by the application.
103
+ 3. **App Backgrounding:**
104
+ - Test application resilience across background/foreground transitions:
105
+ `driver.runAppInBackground(Duration.ofSeconds(5));`
106
+ 4. **Virtual Keyboard Handling:**
107
+ - Always dismiss virtual keyboards (`driver.hideKeyboard()`) after input to prevent occluding action buttons.
108
+
109
+ ---
110
+
111
+ ## 6. Driver Architecture & Image-Based Matching
112
+
113
+ > *Borrowed and adapted from the Appium driver/plugin architecture concepts (Apache-2.0, appium/appium).*
114
+
115
+ 1. **Driver isolation** — each platform driver (UIAutomator2, XCUITest)
116
+ encapsulates its own locator translation and gesture mapping; Screen Object
117
+ classes must never branch on driver type outside the driver layer. A
118
+ `*Screen` class speaks intent ("tap primary action"), the driver layer
119
+ speaks mechanics.
120
+ 2. **Capabilities belong in profiles, not scripts** — device/OS/app
121
+ capabilities live in versioned capability profiles; test classes receive a
122
+ ready session. Hardcoding `platformVersion`/`deviceName` inside scripts is a
123
+ prohibited anti-pattern (see Section 2).
124
+ 3. **Image-based matching is a last-resort locator** — for canvas/maps/WebView
125
+ hybrids where the accessibility tree is empty, an image-reference plugin
126
+ (template match against a committed reference screenshot with a similarity
127
+ threshold, e.g. ≥ 0.9) may resolve elements. It is slower and flakier than
128
+ `AccessibilityID`/`ResourceID` — use only after the locator hierarchy in
129
+ Section 1 is exhausted, and always commit the reference image next to the
130
+ Screen class.
131
+ 4. **Match the session teardown to the driver lifecycle** — quit sessions
132
+ explicitly; orphaned driver processes leak devices in the grid.