@teevee98/synapse-hub 0.0.0-stage → 3.8.3
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.
- package/.agents/agents/api-engineer.md +67 -0
- package/.agents/agents/failure-analyst.md +75 -0
- package/.agents/agents/live-explorer.md +70 -0
- package/.agents/agents/orchestrator.md +104 -0
- package/.agents/agents/perf-engineer.md +74 -0
- package/.agents/agents/pom-crafter.md +112 -0
- package/.agents/agents/quality-gatekeeper.md +87 -0
- package/.agents/agents/test-designer.md +73 -0
- package/.agents/agents/test-runner.md +67 -0
- package/.agents/rules/author-integrity-guard.md +33 -0
- package/.agents/rules/communication-style.md +18 -0
- package/.agents/rules/context-engineering.md +37 -0
- package/.agents/rules/git-push-protocol.md +33 -0
- package/.agents/rules/graphify.md +14 -0
- package/.agents/rules/lessons-learned.md +25 -0
- package/.agents/rules/mandatory-playwright-live.md +25 -0
- package/.agents/rules/mobile_appium_rules.md +43 -0
- package/.agents/rules/performance_testing_rules.md +35 -0
- package/.agents/rules/skill-precedence.md +29 -0
- package/.agents/rules/systematic-debugging.md +36 -0
- package/.agents/skills/actor-qa-swarm/SKILL.md +77 -0
- package/.agents/skills/actor-qa-swarm/examples/broker_sharding_sample.json +12 -0
- package/.agents/skills/agent-orchestration-multi-agent-optimize/SKILL.md +88 -0
- package/.agents/skills/agent-orchestration-multi-agent-optimize/examples/swarm_workload_config.json +15 -0
- package/.agents/skills/agentless-qa-repair/SKILL.md +69 -0
- package/.agents/skills/agentless-qa-repair/examples/healing_report_sample.json +17 -0
- package/.agents/skills/agentless-qa-repair/examples/three_phase_repair_workflow.md +40 -0
- package/.agents/skills/antigravity-test-sentinel/SKILL.md +63 -0
- package/.agents/skills/antigravity-test-sentinel/examples/dod_gate_policy.json +11 -0
- package/.agents/skills/antigravity-test-sentinel/examples/sprint_dod_enforcement.md +47 -0
- package/.agents/skills/api-network-mocking-interception/SKILL.md +142 -0
- package/.agents/skills/api-network-mocking-interception/examples/network_route_stub.json +9 -0
- package/.agents/skills/api-spec-to-e2e-matrix/SKILL.md +80 -0
- package/.agents/skills/api-spec-to-e2e-matrix/examples/sample_openapi.json +19 -0
- package/.agents/skills/architecture-decision-records/SKILL.md +64 -0
- package/.agents/skills/architecture-decision-records/examples/0001-record-architecture-decisions.md +12 -0
- package/.agents/skills/auth-session-and-cookie-manager/SKILL.md +75 -0
- package/.agents/skills/auth-session-and-cookie-manager/examples/multi_role_auth_matrix.md +70 -0
- package/.agents/skills/auth-session-and-cookie-manager/examples/storage_state_sample.json +11 -0
- package/.agents/skills/backend-load-and-stress-patterns/SKILL.md +85 -0
- package/.agents/skills/backend-load-and-stress-patterns/examples/k6_load_test_sample.js +13 -0
- package/.agents/skills/backend-load-and-stress-patterns/references/k6_load_template.js +82 -0
- package/.agents/skills/bats-testing-patterns/SKILL.md +100 -0
- package/.agents/skills/bats-testing-patterns/examples/cli_runner_test.bats +6 -0
- package/.agents/skills/bats-testing-patterns/resources/implementation-playbook.md +614 -0
- package/.agents/skills/clean-pom-crafter/SKILL.md +110 -0
- package/.agents/skills/clean-pom-crafter/examples/standard_test_case.groovy +28 -0
- package/.agents/skills/clean-pom-crafter/references/pom_patterns.groovy +138 -0
- package/.agents/skills/code-refactoring-refactor-clean/SKILL.md +64 -0
- package/.agents/skills/code-refactoring-refactor-clean/examples/refactored_page_sample.groovy +9 -0
- package/.agents/skills/code-refactoring-refactor-clean/examples/refactored_playwright_pom.ts +52 -0
- package/.agents/skills/code-refactoring-refactor-clean/resources/implementation-playbook.md +881 -0
- package/.agents/skills/consumer-driven-contract-testing/SKILL.md +147 -0
- package/.agents/skills/consumer-driven-contract-testing/examples/order_service_pact.json +45 -0
- package/.agents/skills/db-state-verifier-and-seeder/SKILL.md +123 -0
- package/.agents/skills/db-state-verifier-and-seeder/examples/db_fixture_seed.json +12 -0
- package/.agents/skills/e2e-testing-patterns/SKILL.md +103 -0
- package/.agents/skills/e2e-testing-patterns/examples/playwright_sharded_config.ts +12 -0
- package/.agents/skills/e2e-testing-patterns/resources/implementation-playbook.md +522 -0
- package/.agents/skills/event-stream-qa-orchestrator/SKILL.md +79 -0
- package/.agents/skills/event-stream-qa-orchestrator/examples/timeline_sample.jsonl +2 -0
- package/.agents/skills/failure-autopsy-and-healing/SKILL.md +66 -0
- package/.agents/skills/failure-autopsy-and-healing/examples/closed_loop_healing_walkthrough.md +48 -0
- package/.agents/skills/failure-autopsy-and-healing/examples/sample_junit_failure.xml +8 -0
- package/.agents/skills/failure-autopsy-and-healing/references/healing_matrix.md +64 -0
- package/.agents/skills/failure-autopsy-and-healing/references/qa_investigation_protocol.md +56 -0
- package/.agents/skills/failure-autopsy-and-healing/scripts/triage_failures.sh +83 -0
- package/.agents/skills/file-and-report-validator/SKILL.md +90 -0
- package/.agents/skills/file-and-report-validator/examples/sample_export_schema.json +14 -0
- package/.agents/skills/flaky-test-sentinel-and-quarantine/SKILL.md +114 -0
- package/.agents/skills/flaky-test-sentinel-and-quarantine/examples/quarantine_registry.json +11 -0
- package/.agents/skills/gherkin-to-suite/SKILL.md +103 -0
- package/.agents/skills/gherkin-to-suite/examples/checkout.feature +39 -0
- package/.agents/skills/gherkin-to-suite/examples/suite_report_sample.json +334 -0
- package/.agents/skills/github-actions-templates/SKILL.md +77 -0
- package/.agents/skills/github-actions-templates/examples/matrix_test_pipeline.yml +8 -0
- package/.agents/skills/graphify-impact-analyzer/SKILL.md +76 -0
- package/.agents/skills/graphify-impact-analyzer/examples/dependency_blast_radius.json +8 -0
- package/.agents/skills/katalon-cli-runner/SKILL.md +76 -0
- package/.agents/skills/katalon-cli-runner/examples/headless_kre_exec.sh +3 -0
- package/.agents/skills/katalon-cli-runner/references/groovy-patterns.md +209 -0
- package/.agents/skills/katalon-cli-runner/references/katalon-api.md +155 -0
- package/.agents/skills/katalon-cli-runner/references/runner_commands.md +67 -0
- package/.agents/skills/lam-script-generator/SKILL.md +123 -0
- package/.agents/skills/lam-script-generator/examples/user_story_sample.md +8 -0
- package/.agents/skills/lean-code-ladder/SKILL.md +94 -0
- package/.agents/skills/lean-code-ladder/examples/ladder_walkthrough.md +37 -0
- package/.agents/skills/lean-impact-scoreboard/SKILL.md +48 -0
- package/.agents/skills/lean-impact-scoreboard/examples/sample_benchmark_gain.md +20 -0
- package/.agents/skills/lean-impact-scoreboard/examples/sample_scoreboard.md +15 -0
- package/.agents/skills/meta-prompt-crafter/SKILL.md +107 -0
- package/.agents/skills/meta-prompt-crafter/examples/qa_prompt_template.md +35 -0
- package/.agents/skills/mipro-prompt-compiler/SKILL.md +59 -0
- package/.agents/skills/mipro-prompt-compiler/examples/compiled_module_sample.json +22 -0
- package/.agents/skills/mipro-prompt-compiler/examples/dspy_assertion_optimizer_case.md +46 -0
- package/.agents/skills/mobile-appium-som/SKILL.md +88 -0
- package/.agents/skills/mobile-appium-som/examples/BaseScreen.java +88 -0
- package/.agents/skills/mobile-appium-som/examples/LoginScreen.java +46 -0
- package/.agents/skills/mobile-appium-som/examples/TC_MobileLogin.java +43 -0
- package/.agents/skills/persistent-planning-files/SKILL.md +108 -0
- package/.agents/skills/persistent-planning-files/examples/task_plan_example.md +56 -0
- package/.agents/skills/playwright-live-interaction/SKILL.md +131 -0
- package/.agents/skills/playwright-live-interaction/examples/live_probe_script.js +5 -0
- package/.agents/skills/playwright-live-interaction/references/advanced_superpowers.md +160 -0
- package/.agents/skills/playwright-live-interaction/references/compact_accessibility_snapshots.md +75 -0
- package/.agents/skills/playwright-live-interaction/references/recipes.md +388 -0
- package/.agents/skills/playwright-live-interaction/references/swarm_orchestration.md +134 -0
- package/.agents/skills/playwright-webapp-testing/SKILL.md +93 -0
- package/.agents/skills/playwright-webapp-testing/examples/server_lifecycle_playwright.py +63 -0
- package/.agents/skills/qa-aci-interface/SKILL.md +67 -0
- package/.agents/skills/qa-aci-interface/examples/surgical_code_window_walkthrough.md +40 -0
- package/.agents/skills/qa-aci-interface/examples/surgical_edit_sample.json +12 -0
- package/.agents/skills/qa-memory-os/SKILL.md +80 -0
- package/.agents/skills/qa-memory-os/examples/archival_memory_sample.json +21 -0
- package/.agents/skills/rbt-manual-testing/SKILL.md +137 -0
- package/.agents/skills/rbt-manual-testing/examples/checkout_rbt_manual_suite.md +25 -0
- package/.agents/skills/rbt-manual-testing/references/field_validation_checklist.md +29 -0
- package/.agents/skills/repo-quality-audit/SKILL.md +68 -0
- package/.agents/skills/repo-quality-audit/examples/sample_audit_walkthrough.md +15 -0
- package/.agents/skills/repo-quality-audit/examples/sample_repo_audit.md +33 -0
- package/.agents/skills/review-spec/SKILL.md +60 -0
- package/.agents/skills/review-spec/examples/pocock_grilling_decision_rubric.md +40 -0
- package/.agents/skills/review-spec/examples/sample_spec_review.md +33 -0
- package/.agents/skills/security-dast-sentinel/SKILL.md +119 -0
- package/.agents/skills/security-dast-sentinel/examples/dast_scan_config.json +10 -0
- package/.agents/skills/security-dast-sentinel/references/AI-AND-LLM.md +113 -0
- package/.agents/skills/security-dast-sentinel/references/ATTACK-CLASSES.md +89 -0
- package/.agents/skills/security-dast-sentinel/references/dast_recipes.ts +33 -0
- package/.agents/skills/self-healing-locator/SKILL.md +86 -0
- package/.agents/skills/self-healing-locator/examples/aom_diff_sample.json +16 -0
- package/.agents/skills/senior-code-review/SKILL.md +108 -0
- package/.agents/skills/senior-code-review/examples/sample_review_walkthrough.md +29 -0
- package/.agents/skills/skillspector-security-guard/SKILL.md +57 -0
- package/.agents/skills/skillspector-security-guard/examples/audit_threat_vectors_report.json +35 -0
- package/.agents/skills/skillspector-security-guard/examples/safe_mcp_config.json +12 -0
- package/.agents/skills/surgical-coding-principles/SKILL.md +89 -0
- package/.agents/skills/surgical-coding-principles/examples/surgical_vs_scope_creep.md +46 -0
- package/.agents/skills/synthetic-test-data-generator/SKILL.md +135 -0
- package/.agents/skills/synthetic-test-data-generator/examples/idempotent_data_recipe.json +9 -0
- package/.agents/skills/systematic-debugging/SKILL.md +100 -0
- package/.agents/skills/systematic-debugging/examples/four_phase_case.md +44 -0
- package/.agents/skills/technical-debt-harvester/SKILL.md +70 -0
- package/.agents/skills/technical-debt-harvester/examples/sample_debt_ledger.md +25 -0
- package/.agents/skills/technical-debt-harvester/examples/sample_ledger_output.md +20 -0
- package/.agents/skills/test-driven-development/SKILL.md +114 -0
- package/.agents/skills/test-driven-development/examples/red_green_refactor_qa.md +78 -0
- package/.agents/skills/token-and-context-optimizer/SKILL.md +70 -0
- package/.agents/skills/token-and-context-optimizer/examples/distilled_log_sample.txt +3 -0
- package/.agents/skills/token-and-context-optimizer/references/context_engineering_guide.md +49 -0
- package/.agents/skills/tot-exploratory-testing/SKILL.md +59 -0
- package/.agents/skills/tot-exploratory-testing/examples/payment_gateway_tot_tree.json +62 -0
- package/.agents/skills/tot-exploratory-testing/examples/tot_graph_sample.json +35 -0
- package/.agents/skills/verification-before-completion/SKILL.md +100 -0
- package/.agents/skills/verification-before-completion/examples/evidence_log_example.md +46 -0
- package/.agents/skills/visual-regression-sentinel/SKILL.md +82 -0
- package/.agents/skills/visual-regression-sentinel/examples/visual_mask_rules.json +9 -0
- package/.agents/skills/wcag-audit-patterns/SKILL.md +77 -0
- package/.agents/skills/wcag-audit-patterns/examples/wcag_compliance_checklist.json +10 -0
- package/.agents/skills/wcag-audit-patterns/resources/implementation-playbook.md +541 -0
- package/.agents/skills/web-agent-gym-benchmarking/SKILL.md +62 -0
- package/.agents/skills/web-agent-gym-benchmarking/examples/benchmark_report_sample.json +22 -0
- package/.agents/skills/web-agent-gym-benchmarking/examples/enterprise_tasks_suite.json +38 -0
- package/.agents/skills/web-vitals-and-performance-profiler/SKILL.md +65 -0
- package/.agents/skills/web-vitals-and-performance-profiler/examples/cwv_budget_policy.json +6 -0
- package/.agents/skills/web-vitals-and-performance-profiler/examples/playwright_cwv_profiler_fixture.ts +118 -0
- package/.agents/templates/completion_report.md +57 -0
- package/.agents/workflows/analyze_requirement_document.md +18 -0
- package/.agents/workflows/export_testcases_excel.md +32 -0
- package/.agents/workflows/generate_combinatorial_test_data.md +28 -0
- package/.agents/workflows/generate_cross_module_test_plan.md +37 -0
- package/.agents/workflows/generate_manual_testcases_rbt.md +56 -0
- package/.agents/workflows/generate_requirements_from_website.md +25 -0
- package/.agents/workflows/generate_testcases_from_requirements.md +21 -0
- package/.agents/workflows/graphify.md +10 -0
- package/.agents/workflows/test-impact.md +15 -0
- package/.agents/workflows/verify.md +34 -0
- package/.cursor/rules/agents.mdc +16 -0
- package/.cursor/rules/language.mdc +7 -0
- package/.cursor/rules/synapse-qa.mdc +24 -0
- package/.cursorrules +27 -0
- package/.dockerignore +53 -0
- package/.pre-commit-hooks.yaml +14 -0
- package/.windsurfrules +26 -0
- package/AGENTS.md +86 -0
- package/CLAUDE.md +54 -0
- package/Dockerfile +81 -0
- package/LICENSE +52 -0
- package/NOTICE +264 -0
- package/README.en.md +171 -0
- package/README.md +170 -2
- package/action.yml +51 -0
- package/agentskills.json +16 -0
- package/bin/agent-qa.js +138 -0
- package/docker-compose.yml +74 -0
- package/docs/ARCHITECTURE.en.md +198 -0
- package/docs/ARCHITECTURE.md +199 -0
- package/docs/CI_CD_INTEGRATION.en.md +170 -0
- package/docs/CI_CD_INTEGRATION.md +170 -0
- package/docs/CLI_REFERENCE.en.md +174 -0
- package/docs/CLI_REFERENCE.md +176 -0
- package/docs/CONTRIBUTING.en.md +49 -0
- package/docs/CONTRIBUTING.md +49 -0
- package/docs/PERFORMANCE_AUDIT_REPORT.md +783 -0
- package/docs/PLUGIN_DEVELOPMENT_GUIDE.md +127 -0
- package/docs/QUALITY_GATES.en.md +118 -0
- package/docs/QUALITY_GATES.md +118 -0
- package/docs/TOKEN_QUOTA_PLAYBOOK.md +41 -0
- package/docs/TOOL_CATALOG.md +129 -0
- package/docs/adopted-ecosystem-tools.md +96 -0
- package/docs/research/EXTERNAL_AGENT_SKILLS_SURVEY.md +1062 -0
- package/docs/research/agent_skill_training_analysis.md +1358 -0
- package/docs/schemas/synapse.config.schema.json +86 -0
- package/package.json +94 -4
- package/plugin.json +31 -0
- package/scripts/generate_skill_examples.py +244 -0
- package/scripts/install.ps1 +112 -0
- package/scripts/install_global_plugin.ps1 +94 -0
- package/scripts/install_global_plugin.sh +49 -0
- package/scripts/lint_skills.ps1 +57 -0
- package/scripts/package_dist.py +337 -0
- package/scripts/setup.sh +59 -0
- package/scripts/update_hub.ps1 +19 -0
- package/scripts/update_hub.sh +15 -0
- package/skills_manifest.json +854 -0
- package/synapse.config.json +31 -0
- package/templates/PROJECT_AI_GUIDE_TEMPLATE.md +111 -0
- package/templates/PROJECT_STATE_TEMPLATE.md +20 -0
- package/templates/ai_bridges/CLAUDE.md +54 -0
- package/templates/ai_bridges/copilot-instructions.md +20 -0
- package/templates/ai_bridges/cursor_synapse_qa.mdc +24 -0
- package/templates/ai_bridges/windsurfrules +26 -0
- package/templates/ci/github-actions-synapse.yml +95 -0
- package/templates/ci/gitlab-ci-synapse.yml +16 -0
- package/templates/ui/index.html +1069 -0
- package/templates/welcome.html.tmpl +2074 -0
- package/tools/.infer_baseline.json +30 -0
- package/tools/TOOLS_RUNBOOK.md +1553 -0
- package/tools/TOOL_CATALOG.json +1769 -0
- package/tools/__init__.py +43 -0
- package/tools/_openapi_parser.py +158 -0
- package/tools/agent_canary.py +525 -0
- package/tools/agentless_patcher.py +417 -0
- package/tools/analyze_project.py +262 -0
- package/tools/api_drift_sentinel.py +208 -0
- package/tools/api_fuzzer.py +762 -0
- package/tools/author_integrity.py +190 -0
- package/tools/auto_heal.py +271 -0
- package/tools/auto_heal_reflexion.py +532 -0
- package/tools/autogen_qa_broker.py +844 -0
- package/tools/benchmark_swarm_context.py +394 -0
- package/tools/browser_helpers.js +746 -0
- package/tools/browsergym_eval.py +236 -0
- package/tools/bug_reporter.py +252 -0
- package/tools/bump_version.py +423 -0
- package/tools/cache_resolver.py +1214 -0
- package/tools/check_env.py +426 -0
- package/tools/check_version_sync.py +256 -0
- package/tools/ci_healing_hook.py +126 -0
- package/tools/cli.py +1598 -0
- package/tools/config_decoupler.py +253 -0
- package/tools/contract_validator.py +141 -0
- package/tools/core/__init__.py +70 -0
- package/tools/core/adapters.py +431 -0
- package/tools/core/circuit_breaker.py +263 -0
- package/tools/core/cli_runtime.py +66 -0
- package/tools/core/file_lock.py +159 -0
- package/tools/core/i18n.py +394 -0
- package/tools/core/memory_bus.py +905 -0
- package/tools/core/process_supervisor.py +332 -0
- package/tools/core/telemetry.py +329 -0
- package/tools/count_tokens.py +1267 -0
- package/tools/create_mock_docx.py +104 -0
- package/tools/dashboard_generator.py +2403 -0
- package/tools/db_sandbox.py +675 -0
- package/tools/debt_harvester.py +237 -0
- package/tools/distill_log.py +161 -0
- package/tools/dspy_qa_signatures.py +356 -0
- package/tools/e2e_flow_prober.py +132 -0
- package/tools/export_postman_collection.py +945 -0
- package/tools/flaky_detector.py +389 -0
- package/tools/fsm_enforcer.py +450 -0
- package/tools/fsm_middleware.py +401 -0
- package/tools/fuzz_payloads.py +197 -0
- package/tools/generate_allure_report.py +88 -0
- package/tools/generate_api_matrix.py +193 -0
- package/tools/generate_jmx_plan.py +1322 -0
- package/tools/generate_sbom.py +252 -0
- package/tools/generate_tc_from_story.py +203 -0
- package/tools/generate_test_reports.py +133 -0
- package/tools/generate_tool_catalog.py +482 -0
- package/tools/gherkin_suite.py +758 -0
- package/tools/git_pre_commit_guard.py +298 -0
- package/tools/goldfish_review.py +366 -0
- package/tools/heal/__init__.py +28 -0
- package/tools/heal_pr_automator.py +220 -0
- package/tools/heuristic_locator_matcher.py +351 -0
- package/tools/hub_publisher.py +623 -0
- package/tools/humanize_linter.py +438 -0
- package/tools/infer_linter.py +977 -0
- package/tools/init_config.py +306 -0
- package/tools/interview_story.py +116 -0
- package/tools/jira_sync.py +566 -0
- package/tools/jtl_analyzer.py +474 -0
- package/tools/lint/__init__.py +30 -0
- package/tools/lint_ai_docs.py +374 -0
- package/tools/lookup_tc.py +165 -0
- package/tools/lookup_xpath.py +167 -0
- package/tools/matrix_sharder.py +148 -0
- package/tools/mcp/__init__.py +18 -0
- package/tools/mcp_docx_server.ps1 +13 -0
- package/tools/mcp_docx_server.py +851 -0
- package/tools/mcp_excel_server.ps1 +13 -0
- package/tools/mcp_excel_server.py +441 -0
- package/tools/mcp_server.py +725 -0
- package/tools/md_to_xlsx.py +327 -0
- package/tools/micro_mutator.py +887 -0
- package/tools/mipro_assertion_tuner.py +210 -0
- package/tools/network_mock_shield.py +311 -0
- package/tools/newman_analyzer.py +384 -0
- package/tools/omni_emitter.py +579 -0
- package/tools/omni_parser.py +450 -0
- package/tools/omni_transpiler.py +168 -0
- package/tools/openxml_guard.py +438 -0
- package/tools/output_formatter.py +182 -0
- package/tools/package_release.py +325 -0
- package/tools/perf/__init__.py +24 -0
- package/tools/pinpoint_failure.py +190 -0
- package/tools/project_state.py +171 -0
- package/tools/qa_event_stream.py +358 -0
- package/tools/repo_map.py +346 -0
- package/tools/report/__init__.py +32 -0
- package/tools/reversible_sandbox.py +344 -0
- package/tools/safety_firewall.py +437 -0
- package/tools/security_coverage_ledger.py +538 -0
- package/tools/security_scanner.py +229 -0
- package/tools/senior_code_review.py +393 -0
- package/tools/setup_project.py +770 -0
- package/tools/skill_collision_guard.py +304 -0
- package/tools/skill_profiles.py +217 -0
- package/tools/skill_vault.py +481 -0
- package/tools/skillspector.py +1278 -0
- package/tools/smart_visual_masker.py +132 -0
- package/tools/spec_drift_sentinel.py +438 -0
- package/tools/swe_qa_aci.py +369 -0
- package/tools/synapse_observer.py +485 -0
- package/tools/synapse_qa_bench.py +190 -0
- package/tools/sync_agent_rules.py +274 -0
- package/tools/telemetry_correlator.py +397 -0
- package/tools/template_excel_exporter.py +514 -0
- package/tools/templates/jmeter-distributed/README.md +54 -0
- package/tools/templates/jmeter-distributed/docker-compose.yml +83 -0
- package/tools/test_impact.py +419 -0
- package/tools/test_memory_os.py +462 -0
- package/tools/textgrad_mutation_optimizer.py +237 -0
- package/tools/tms_sync_bridge.py +834 -0
- package/tools/tot_exploratory_tester.py +239 -0
- package/tools/trace_data_flow.py +240 -0
- package/tools/traffic_session_converter.py +256 -0
- package/tools/trend_analytics.py +314 -0
- package/tools/ui_server.py +401 -0
- package/tools/universal_ir.py +488 -0
- package/tools/update_sentinel.py +383 -0
- package/tools/validate_groovy_scripts.py +173 -0
- package/tools/verify_all.py +1271 -0
- package/tools/visual_diff_canvas.py +143 -0
- package/tools/visual_som_helper.py +550 -0
- package/tools/watch_mode.py +308 -0
- package/tools/wcag_audit.py +239 -0
- package/tools/welcome_page.py +290 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-driven-development
|
|
3
|
+
description: "Enforce the RED-GREEN-REFACTOR cycle: no production or automation code is written before a failing test exists and has been watched failing. Use when implementing new helpers, Page Class logic, bug fixes, or any behavior change in test codebases."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Test-Driven Development — Enterprise Red-Green-Refactor Standard
|
|
7
|
+
|
|
8
|
+
Specialized skill for writing test-automation and tool code test-first: write the test, watch it fail for the right reason, write minimal code to pass, then refactor while staying green.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 1. The Iron Law
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
- Code written before the test is deleted — not kept "as reference", not "adapted while writing tests". Delete means delete; implement fresh from the tests.
|
|
19
|
+
- "Violating the letter of the rules is violating the spirit of the rules." Thinking "skip TDD just this once" is rationalization, not judgment.
|
|
20
|
+
|
|
21
|
+
## 2. The Cycle
|
|
22
|
+
|
|
23
|
+
```mermaid
|
|
24
|
+
flowchart LR
|
|
25
|
+
R["<b>RED</b><br/>Write failing test"] --> VR{"Fails<br/>correctly?"}
|
|
26
|
+
VR -- no --> R
|
|
27
|
+
VR -- yes --> G["<b>GREEN</b><br/>Minimal code"]
|
|
28
|
+
G --> VG{"Passes +<br/>suite green?"}
|
|
29
|
+
VG -- no --> G
|
|
30
|
+
VG -- yes --> F["<b>REFACTOR</b><br/>Clean up, stay green"]
|
|
31
|
+
F --> R
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### RED — Write the Failing Test
|
|
35
|
+
|
|
36
|
+
- One behavior per test; a name that describes the behavior; real code (mocks only when unavoidable).
|
|
37
|
+
- **Verify RED is mandatory:** run the test and confirm it fails for the expected reason — feature missing, not a typo. A test that passes immediately is testing existing behavior; fix the test, not the code.
|
|
38
|
+
|
|
39
|
+
### GREEN — Minimal Code
|
|
40
|
+
|
|
41
|
+
- Simplest code that passes the test. No features, no refactoring of other code, no "improvements" beyond what the test demands.
|
|
42
|
+
- **Verify GREEN is mandatory:** the new test passes AND the project suite still passes. A green single file is not a green suite — run the project's test command before calling the change done. Any failure that run shows, including one you did not cause, goes into your report by name; a red test scrolled past unmentioned is a report falsified by omission.
|
|
43
|
+
|
|
44
|
+
### REFACTOR — Clean Up While Green
|
|
45
|
+
|
|
46
|
+
- Remove duplication, improve names, extract helpers. Keep tests green; add no behavior.
|
|
47
|
+
|
|
48
|
+
## 3. Good Tests
|
|
49
|
+
|
|
50
|
+
| Quality | Good | Bad |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| Minimal | One thing; "and" in the name means split it | `test('validates email and domain and whitespace')` |
|
|
53
|
+
| Clear | Name describes behavior | `test('test1')` |
|
|
54
|
+
| Intent-revealing | Demonstrates the desired API | Obscures what the code should do |
|
|
55
|
+
| Honest | Asserts real behavior; you can name the production change that would make it fail | Asserts on mock behavior only |
|
|
56
|
+
|
|
57
|
+
## 4. Hub Integration
|
|
58
|
+
|
|
59
|
+
- **Fake-pass synergy:** test-first pairs with `python3 tools/infer_linter.py` (flags 0-assert and tautological tests) and Gate 8 — `python3 tools/micro_mutator.py` requires Mutation Score >= 80%, which a test written AFTER the code rarely achieves honestly.
|
|
60
|
+
- **Bug fixes:** the bug reproduction IS the RED test. Never fix a bug without a test that fails before the fix and passes after.
|
|
61
|
+
- **Locator logic:** selector helpers and Page Class methods follow the same cycle; live verification (Stage 2 of `playwright-live-interaction`, 100% hit rate under 200ms) is the RED check for locator changes.
|
|
62
|
+
|
|
63
|
+
## 5. Common Rationalizations (All Rejected)
|
|
64
|
+
|
|
65
|
+
| Excuse | Reality |
|
|
66
|
+
|---|---|
|
|
67
|
+
| "Too simple to test" | Simple code breaks; the test takes 30 seconds. |
|
|
68
|
+
| "I'll test after" | Tests written after pass immediately — which proves nothing. You never watched it fail, so you never proved it can catch the bug. |
|
|
69
|
+
| "Already manually tested" | Ad-hoc checking has no record and no repeatability; "worked when I tried it" is not coverage. |
|
|
70
|
+
| "Keep as reference, write tests first" | You will adapt it. That is testing after. Delete means delete. |
|
|
71
|
+
| "Need to explore first" | Fine — explore, throw the exploration away, start with TDD. |
|
|
72
|
+
| "Test hard = skip" | Hard to test means hard to use; listen to the design signal. |
|
|
73
|
+
| "TDD will slow me down" | TDD catches bugs before commit and lets you refactor without fear; the pragmatic shortcut is debugging in production. |
|
|
74
|
+
|
|
75
|
+
## 6. Red Flags — Stop and Start Over
|
|
76
|
+
|
|
77
|
+
- Code before test; test written after implementation
|
|
78
|
+
- Test passes immediately on first run
|
|
79
|
+
- Cannot explain why the test failed
|
|
80
|
+
- Tests promised "later", or rationalizing "just this once"
|
|
81
|
+
|
|
82
|
+
All of these mean: delete the code and restart the cycle from RED.
|
|
83
|
+
|
|
84
|
+
## 7. Verification Checklist
|
|
85
|
+
|
|
86
|
+
Before marking any implementation complete:
|
|
87
|
+
|
|
88
|
+
- [ ] Every new function/method has a test
|
|
89
|
+
- [ ] Each test was watched failing, for the expected reason
|
|
90
|
+
- [ ] Minimal code was written to pass each test
|
|
91
|
+
- [ ] The project's full test command was run and its output quoted
|
|
92
|
+
- [ ] Output is pristine (no errors, warnings)
|
|
93
|
+
- [ ] Edge cases and error paths covered
|
|
94
|
+
|
|
95
|
+
Cannot check all boxes? The cycle was skipped — start over.
|
|
96
|
+
|
|
97
|
+
## 8. Boundary vs Sibling Skills (Do Not Confuse)
|
|
98
|
+
|
|
99
|
+
| Sibling | Owns | Hand-off |
|
|
100
|
+
|---|---|---|
|
|
101
|
+
| `systematic-debugging` | Root-cause investigation of failures | Phase 4 hands the reproduced bug to this skill as the RED test |
|
|
102
|
+
| `verification-before-completion` | Evidence protocol for completion claims | This skill's GREEN check feeds the evidence that protocol quotes |
|
|
103
|
+
| `antigravity-test-sentinel` | Hard completion blocking on gates | The sentinel enforces what this skill produces (fresh, watched, honest tests) |
|
|
104
|
+
| `surgical-coding-principles` | Diff discipline | Goal-Driven Execution (principle 4) is operationalized by this cycle |
|
|
105
|
+
|
|
106
|
+
## 9. Reference Documentation
|
|
107
|
+
|
|
108
|
+
- `python3 tools/infer_linter.py` — AST scan for fake passes and 0-assert tests.
|
|
109
|
+
- `python3 tools/micro_mutator.py` — Gate 8 mutation floor (>= 80%) validating test honesty.
|
|
110
|
+
- [Worked QA example (`red_green_refactor_qa.md`)](examples/red_green_refactor_qa.md): full cycle for a retry helper in a test utility.
|
|
111
|
+
|
|
112
|
+
## 10. Attribution
|
|
113
|
+
|
|
114
|
+
Adapted from **superpowers** skill `test-driven-development` (https://github.com/obra/superpowers) — MIT License, Copyright (c) 2025 Jesse Vincent. The Iron Law, RED-GREEN-REFACTOR cycle, and rationalization table are re-scoped for enterprise QA automation in Synapse Hub; wording, structure, and examples modified.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Example: RED-GREEN-REFACTOR for a Test Utility Retry Helper
|
|
2
|
+
|
|
3
|
+
Task: "Our Playwright API calls occasionally race the dev server; add retry
|
|
4
|
+
to the request helper."
|
|
5
|
+
|
|
6
|
+
## RED — write the failing test first
|
|
7
|
+
|
|
8
|
+
```typescript
|
|
9
|
+
test('retries a failing request up to 3 attempts then succeeds', async () => {
|
|
10
|
+
let attempts = 0;
|
|
11
|
+
const flakyCall = async () => {
|
|
12
|
+
attempts += 1;
|
|
13
|
+
if (attempts < 3) throw new Error('ECONNRESET');
|
|
14
|
+
return { status: 200 };
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const result = await requestWithRetry(flakyCall);
|
|
18
|
+
|
|
19
|
+
expect(result.status).toBe(200);
|
|
20
|
+
expect(attempts).toBe(3);
|
|
21
|
+
});
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Verify RED — MANDATORY
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
$ npx vitest run tests/unit/retry.spec.ts
|
|
28
|
+
FAIL: requestWithRetry is not a function
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Fails for the right reason: the feature does not exist yet. (An error like
|
|
32
|
+
"cannot read properties of undefined" would mean a typo — fix the test
|
|
33
|
+
before writing code.)
|
|
34
|
+
|
|
35
|
+
## GREEN — minimal implementation
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
export async function requestWithRetry<T>(
|
|
39
|
+
call: () => Promise<T>,
|
|
40
|
+
maxAttempts = 3,
|
|
41
|
+
): Promise<T> {
|
|
42
|
+
let lastError: unknown;
|
|
43
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
|
|
44
|
+
try {
|
|
45
|
+
return await call();
|
|
46
|
+
} catch (error) {
|
|
47
|
+
lastError = error;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
throw lastError;
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Verify GREEN — MANDATORY
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
$ npx vitest run tests/unit/retry.spec.ts
|
|
58
|
+
PASS 1/1
|
|
59
|
+
$ npm test # the PROJECT suite, not just this file
|
|
60
|
+
PASS 214/214
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
A green single file is not a green suite — the project command is the
|
|
64
|
+
acceptance run, and its output is quoted in the report.
|
|
65
|
+
|
|
66
|
+
## REFACTOR — while green
|
|
67
|
+
|
|
68
|
+
No duplication to remove yet; the next failing test (e.g. "gives up after 3
|
|
69
|
+
attempts and rethrows") starts the next cycle. Adding exponential backoff NOW
|
|
70
|
+
would be speculative — nobody asked for it.
|
|
71
|
+
|
|
72
|
+
## Honesty check
|
|
73
|
+
|
|
74
|
+
- The test uses real behavior (a counting closure), not a mock asserting on
|
|
75
|
+
itself.
|
|
76
|
+
- Gate 8 wiring: `tools/micro_mutator.py` inverts the attempt boundary — the
|
|
77
|
+
test must survive the mutant (kill it), keeping Mutation Score >= 80%.
|
|
78
|
+
- `tools/infer_linter.py` finds both assertions present and meaningful.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: token-and-context-optimizer
|
|
3
|
+
description: "Optimize prompt context, distill verbose logs, and prevent context rot in Antigravity. Use when optimizing prompts or reducing token and context overhead."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Token & Context Optimizer — Antigravity Engineering Standard
|
|
7
|
+
|
|
8
|
+
> **Purpose:** Master context engineering and token efficiency. Directs AI Agents to prevent context rot, mitigate Lost-in-the-Middle attention drops, offload large state to filesystem scratchpads, and maintain clean KV-cache alignment across long test automation sessions.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 1. The Core Context Architecture
|
|
13
|
+
|
|
14
|
+
```mermaid
|
|
15
|
+
flowchart TD
|
|
16
|
+
P1["<b>1. Sparse Context Retrieval</b><br/>• Forbid cat on large files<br/>• Grep / Line-range only"] --> P2["<b>2. Terminal Log Distillation</b><br/>• Strip PASSED steps via tools/distill_log.py<br/>• Forward only FAILED stack trace"]
|
|
17
|
+
P2 --> P3["<b>3. File-Backed Memory Layer</b><br/>• Persist state to PROJECT_STATE.md<br/>• Zero conversational bloat"]
|
|
18
|
+
P3 --> P4["<b>4. Context Degradation Prevention</b><br/>• Attention U-Curve placement<br/>• Circuit break on hallucination poisoning"]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 2. Protocol 1: Sparse Context Retrieval
|
|
24
|
+
|
|
25
|
+
- **Rule:** Never read entire source files exceeding 150 lines into active context.
|
|
26
|
+
- **Enforcement:**
|
|
27
|
+
- Prohibit commands like `cat`, `type`, or unbounded `read_file` on large Page Classes (e.g. `DataMiningPage.groovy`).
|
|
28
|
+
- Use regex search (`grep -n`, `ripgrep`) or compressed maps (`tools/repo_map.txt`) to pinpoint signatures.
|
|
29
|
+
- Read strictly the targeted 20–50 lines using `StartLine` and `EndLine` parameters.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 3. Protocol 2: Terminal Log Distiller (`tools/distill_log.py`)
|
|
34
|
+
|
|
35
|
+
- **Rule:** Never dump unparsed execution logs (KRE CLI, Playwright stdout, Gradle) into the active conversation.
|
|
36
|
+
- **Enforcement:**
|
|
37
|
+
- Automatically filter out passing step messages, INFO logs, and JVM loading notices.
|
|
38
|
+
- Forward strictly the distilled failure block:
|
|
39
|
+
```text
|
|
40
|
+
[FAILED] TC-xxx at Line <LineNumber>
|
|
41
|
+
Exception: <ExceptionName> (<Message>)
|
|
42
|
+
[Full raw log saved to file://<path>; verbose lines omitted]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 4. Protocol 3: Task Scratchpad & File-Backed Context
|
|
48
|
+
|
|
49
|
+
- **Rule:** Do not accumulate large session state, test case inventories, or defect logs inside conversational prompt turns.
|
|
50
|
+
- **Enforcement:**
|
|
51
|
+
- Use the filesystem as the primary overflow memory layer.
|
|
52
|
+
- Persist ephemeral task tracking and defect registers to disk in structured markdown files (e.g. `PROJECT_STATE.md`, `KNOWN_ISSUES.md`, or `<appDataDir>/brain/<id>/scratch/`).
|
|
53
|
+
- Prefer dynamic context discovery (pulling context on demand via search tools) over static bulk inclusion.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 5. Protocol 4: Mitigating Context Degradation & Lost-in-the-Middle
|
|
58
|
+
|
|
59
|
+
- **Attention U-Curve Principle:** Models recall information at the beginning (BOS / System Prompt) and end (latest turn) far better than information buried in the middle of long sessions (> 4,000 tokens).
|
|
60
|
+
- **Enforcement:**
|
|
61
|
+
- Place critical instructions and current objective anchors at the beginning and end of prompts.
|
|
62
|
+
- Segment multi-module tasks into discrete sub-agent scopes to prevent cross-task confusion.
|
|
63
|
+
- **Context Poisoning Circuit Breaker:** If a tool output or test run produces an invalid assumption or hallucination, truncate reasoning immediately and re-anchor against verified disk state rather than compounding false premises.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 6. Protocol 5: KV-Cache Friendly Ordering
|
|
68
|
+
- Maintain immutable static instruction prefixes at the top.
|
|
69
|
+
- Append new dynamic observations strictly at the bottom.
|
|
70
|
+
- Use uniform pre-flight header formats to achieve > 85% inference KV-cache hit rate.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Context Engineering & Token Optimization Guide (Full Architecture)
|
|
2
|
+
|
|
3
|
+
*(Synthesized from `muratcankoylan/Agent-Skills-for-Context-Engineering`, `alexgreensh/token-optimizer`, and `obra/superpowers`)*
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Pillar 1: Observation Masking
|
|
8
|
+
Raw tool outputs (CLI execution logs, Gradle builds, browser console traces) contain 90% repetitive noise and low-signal tokens.
|
|
9
|
+
- **Log Truncation & Summarization:** Never dump thousands of lines into the active conversation. Extract only: failing line number, exception name, test case identifier (`TC-xxx`), and status.
|
|
10
|
+
- **Pointer Masking:** Use structured references pointing to files on disk: `[Full raw log saved to file://<path>; 2,400 verbose lines omitted]`.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 2. Pillar 2: Progressive Disclosure
|
|
15
|
+
Never load large codebases or giant classes (over 500 lines) into context at once. Load information in 3 progressive tiers:
|
|
16
|
+
- **Tier 1:** High-Level Index & Repo Map (< 150 lines) via `tools/repo_map.txt`.
|
|
17
|
+
- **Tier 2:** Graph Semantic Scoping via `graphify explain` or `test_impact.py`.
|
|
18
|
+
- **Tier 3:** Targeted Micro-Read (20-50 lines using `StartLine`/`EndLine`).
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 3. Pillar 3: KV-Cache Friendly Ordering
|
|
23
|
+
LLM inference engines cache Key-Value (KV) attention states for identical prompt prefixes.
|
|
24
|
+
- **Static Prefix First:** Keep instructions, rules, and tool schemas immutable at the top.
|
|
25
|
+
- **Append-Only Dynamic State:** Only append new test results and tool observations at the bottom.
|
|
26
|
+
- **Predictable Format:** Use identical pre-flight status badges on every turn to maximize cache hits (> 85%).
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 4. Pillar 4: Scoped Context & Compaction Anchoring
|
|
31
|
+
- **Compaction State Anchoring:** Critical state must be persisted to disk in `PROJECT_STATE.md`. When compaction fires, re-anchor immediately from disk with zero memory loss.
|
|
32
|
+
- **Workspace Isolation (`Workspace: 'share'`):** Subagents use isolated worktrees to prevent dirty tree collisions.
|
|
33
|
+
- **Zero Context Contagion:** Subagents return distilled 3-5 line summaries; stdout remains in subagent sandbox.
|
|
34
|
+
- **Data Partitioning:** Subagents append agent IDs to test data (`uniqueCode = "AUTO_" + time + "_SUB" + id`).
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 5. Pillar 5: Semantic Context Distillation (Pure Signal, Zero Noise)
|
|
39
|
+
All sensory inputs must pass through deterministic filters:
|
|
40
|
+
- **CLI Logs (`tools/distill_log.py`):** Truncate 95% of verbose lines.
|
|
41
|
+
- **DOM Purifier (`qa.getCompactAOM`):** Strictly forbidden to send raw HTML. Use compact AOM (< 500 tokens).
|
|
42
|
+
- **Universal IR (`tools/universal_ir.py`):** Author clean universal IR before emitting framework-specific code.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 6. Pillar 6: Elephant-Goldfish Memory Model
|
|
47
|
+
- **The Elephant (Stateful Orchestrator):** Narrows problem boundaries, gathers intent, drafts specs in `docs/specs/*.md`, maintains `PROJECT_STATE.md`. Never writes tests during design phase.
|
|
48
|
+
- **The Goldfish (Stateless Subagent Swarm):** Fresh subagent with ZERO conversation history; evaluates solely cold artifacts on disk via `tools/goldfish_review.py`.
|
|
49
|
+
- **Air-Gap Data Contract:** All inter-stage data exchanges pass via disk files (JSON/JUnit XML), never raw prompt inheritance.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tot-exploratory-testing
|
|
3
|
+
description: "Non-linear Tree/Graph-of-Thoughts exploratory testing engine exploring Happy Path, Boundary/Race, and Negative/Chaos branches with Beam Search risk scoring and multi-hypothesis RCA. Use when decomposing complex user stories into exploratory test trees or triaging complex failures."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Tree-of-Thoughts Exploratory Testing Skill — Deliberative QA Reasoning
|
|
7
|
+
|
|
8
|
+
> **Paradigm Attribution:** Inspired by **Princeton NLP Tree-of-Thoughts (ToT) & ETH Zürich Graph-of-Thoughts (GoT)**.
|
|
9
|
+
> **Core Principle:** Overcome linear single-track test generation. Decompose critical enterprise workflows into a 3-branch deliberation tree (Happy Path, Boundary/Race, Chaos/Fault), score intermediate thought nodes with Beam Search, and diagnose root causes via multi-hypothesis evaluation.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. The Deliberative 3-Branch Reasoning Tree
|
|
14
|
+
|
|
15
|
+
```mermaid
|
|
16
|
+
flowchart TD
|
|
17
|
+
Story["User Story / Feature Requirement"] --> ToT["Tree-of-Thoughts Deliberation Engine"]
|
|
18
|
+
ToT --> B1["Branch 1: Happy Path<br/>Risk Score: 0.25 (Standard Business CRUD)"]
|
|
19
|
+
ToT --> B2["Branch 2: Boundary, Race & Session<br/>Risk Score: 0.88 (Double-Click, Token Expire)"]
|
|
20
|
+
ToT --> B3["Branch 3: Negative & Chaos Fault<br/>Risk Score: 0.72 (Backend 500, DB Timeout)"]
|
|
21
|
+
|
|
22
|
+
B2 --> Synthesize["Clean POM Synthesis<br/>Generate High-Risk Boundary Test Scenarios"]
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
1. **Deliberative Branching:**
|
|
26
|
+
- Evaluates non-linear edge cases: mid-transaction network drops, concurrent duplicate clicks, and auth token expiration.
|
|
27
|
+
- Assigns quantitative risk scores (0.0 to 1.0) to prioritize high-risk test scripts over repetitive happy paths.
|
|
28
|
+
|
|
29
|
+
2. **Multi-Hypothesis RCA:**
|
|
30
|
+
- Evaluates competing defect hypotheses (`DOM_TIMEOUT`, `ASYNC_RACE`, `DB_LOCK`, `BACKEND_500`, `STALE_SELECTOR`).
|
|
31
|
+
- Replaces guesswork with evidence-based diagnosis ranked by confidence scores.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 2. CLI Tool Usage
|
|
36
|
+
|
|
37
|
+
Autonomous commands via `tools/tot_exploratory_tester.py`:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# 1. Expand User Story into Tree of Thoughts
|
|
41
|
+
python tools/tot_exploratory_tester.py expand-story \
|
|
42
|
+
--story-file docs/stories/US_PAYMENT_GATEWAY.md \
|
|
43
|
+
--max-depth 3 \
|
|
44
|
+
--beam-width 3 \
|
|
45
|
+
--out-graph reports/tot_payment_graph.json
|
|
46
|
+
|
|
47
|
+
# 2. Perform multi-hypothesis Root Cause Analysis
|
|
48
|
+
python tools/tot_exploratory_tester.py rca-hypotheses \
|
|
49
|
+
--error-log reports/failed_run.log \
|
|
50
|
+
--hypotheses "DOM_TIMEOUT,ASYNC_RACE,DB_LOCK,BACKEND_500"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 3. Strict Operating Invariants
|
|
56
|
+
|
|
57
|
+
- **Critical Flow Prioritization:** Focus multi-branch deliberation on high-risk domains (Financial Checkout, Authentication, Data Mutation).
|
|
58
|
+
- **Clean POM Output:** Test scenarios derived from thought trees must map directly into Page Classes extending `BasePage`.
|
|
59
|
+
- **Zero Hallucination:** Hypotheses must be grounded directly in error log evidence and stacktraces.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"story_id": "US_CHECKOUT_PAYMENT_GATEWAY_V3",
|
|
3
|
+
"feature_title": "Enterprise E-commerce Payment Gateway Integration (Stripe / VNPAY)",
|
|
4
|
+
"root_objective": "Ensure zero duplicate charges, graceful network fault tolerance, and secure 3DS authorization.",
|
|
5
|
+
"deliberation_tree": {
|
|
6
|
+
"branch_1_happy_path": {
|
|
7
|
+
"risk_score": 0.20,
|
|
8
|
+
"scenarios": [
|
|
9
|
+
{
|
|
10
|
+
"id": "TC_HP_01",
|
|
11
|
+
"name": "Standard Credit Card Checkout with Valid CVV",
|
|
12
|
+
"steps": ["Fill billing form", "Enter valid test card", "Submit order"],
|
|
13
|
+
"expected": "Order status 'PAID', receipt confirmation rendered, DB balance updated",
|
|
14
|
+
"target_page_class": "CheckoutPage"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"branch_2_boundary_race": {
|
|
19
|
+
"risk_score": 0.88,
|
|
20
|
+
"scenarios": [
|
|
21
|
+
{
|
|
22
|
+
"id": "TC_BR_01",
|
|
23
|
+
"name": "Concurrent Rapid Double-Click on Pay Button",
|
|
24
|
+
"steps": ["Dispatch two click events simultaneously within 50ms window"],
|
|
25
|
+
"expected": "Idempotency key prevents secondary charge; exactly 1 charge request processed",
|
|
26
|
+
"target_page_class": "CheckoutPage"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "TC_BR_02",
|
|
30
|
+
"name": "Session / Auth Token Expiration During 3D-Secure Modal Redirect",
|
|
31
|
+
"steps": ["Wait for 3DS modal", "Simulate auth token expiry", "Complete 3DS OTP"],
|
|
32
|
+
"expected": "User is prompted for silent refresh; cart state and transaction intent are preserved",
|
|
33
|
+
"target_page_class": "CheckoutPage"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"branch_3_chaos_fault": {
|
|
38
|
+
"risk_score": 0.78,
|
|
39
|
+
"scenarios": [
|
|
40
|
+
{
|
|
41
|
+
"id": "TC_CF_01",
|
|
42
|
+
"name": "Backend 504 Gateway Timeout Mid-Transaction",
|
|
43
|
+
"steps": ["Mock payment gateway POST endpoint to delay 30s and return HTTP 504"],
|
|
44
|
+
"expected": "Checkout UI renders retry banner with polling status; order is marked PENDING_VERIFICATION",
|
|
45
|
+
"target_page_class": "CheckoutPage"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "TC_CF_02",
|
|
49
|
+
"name": "Insufficient Funds Webhook Drop Simulation",
|
|
50
|
+
"steps": ["Trigger card decline webhook with dropped network packet"],
|
|
51
|
+
"expected": "Client-side fallback query identifies decline; user receives actionable card switch guidance",
|
|
52
|
+
"target_page_class": "CheckoutPage"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"beam_search_summary": {
|
|
58
|
+
"total_nodes_evaluated": 18,
|
|
59
|
+
"top_selected_nodes": ["TC_BR_01", "TC_BR_02", "TC_CF_01"],
|
|
60
|
+
"recommended_execution_order": ["TC_BR_01", "TC_CF_01", "TC_HP_01"]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"status": "PASS",
|
|
3
|
+
"story_title": "US_PAYMENT_GATEWAY",
|
|
4
|
+
"domain": "FINANCIAL_CHECKOUT",
|
|
5
|
+
"max_depth": 3,
|
|
6
|
+
"beam_width": 3,
|
|
7
|
+
"total_branches_explored": 3,
|
|
8
|
+
"highest_risk_branch": "BRANCH_BOUNDARY_RACE",
|
|
9
|
+
"branches": [
|
|
10
|
+
{
|
|
11
|
+
"branch_id": "BRANCH_BOUNDARY_RACE",
|
|
12
|
+
"name": "Boundary, Session Interruption & Concurrency Path",
|
|
13
|
+
"risk_score": 0.88,
|
|
14
|
+
"thoughts": [
|
|
15
|
+
{
|
|
16
|
+
"step": 1,
|
|
17
|
+
"thought": "Simulate session expiration or token invalidation mid-flow."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"step": 2,
|
|
21
|
+
"thought": "Perform rapid double-click on submission action to probe race condition."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"step": 3,
|
|
25
|
+
"thought": "Assert idempotency: strictly 1 transaction created, duplicate blocked gracefully."
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"clean_pom_recommendations": [
|
|
31
|
+
"Implement FINANCIAL_CHECKOUTPage extending BasePage",
|
|
32
|
+
"Encapsulate double-click debounce in clickSubmitSafe()",
|
|
33
|
+
"Assert boundary toast in verifyErrorMessageDisplayed()"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verification-before-completion
|
|
3
|
+
description: "Require fresh verification evidence — a command run in the current session with its real output — before any claim that work is complete, fixed, or passing. Use when about to report success, commit, open a PR, or close a task."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Verification Before Completion — Enterprise Evidence Protocol
|
|
7
|
+
|
|
8
|
+
Specialized skill for the evidence discipline behind every success claim in the hub: no completion statement exists without fresh verification output. This is the operational form of the Truth Anchor (No Fake Pass) rule in `AGENTS.md` Section 3.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 1. The Iron Law
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
If the verification command was not run in the current message turn, the claim cannot be made. "Evidence before claims, always."
|
|
19
|
+
|
|
20
|
+
## 2. The Gate Function
|
|
21
|
+
|
|
22
|
+
Run before claiming ANY status or expressing satisfaction:
|
|
23
|
+
|
|
24
|
+
1. **IDENTIFY** — which command proves this claim?
|
|
25
|
+
2. **RUN** — execute the full command, fresh and complete (not a partial rerun, not a memory of an earlier run).
|
|
26
|
+
3. **READ** — full output, exit code, failure count.
|
|
27
|
+
4. **VERIFY** — does the output actually confirm the claim? If no: state the real status with the evidence. If yes: state the claim WITH the evidence.
|
|
28
|
+
5. **ONLY THEN** — make the claim.
|
|
29
|
+
|
|
30
|
+
Skipping any step is lying, not verifying.
|
|
31
|
+
|
|
32
|
+
## 3. Claim → Required Evidence Matrix
|
|
33
|
+
|
|
34
|
+
| Claim | Requires | Not Sufficient |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| Tests pass | Test command output in this session: 0 failures | Previous run, "should pass" |
|
|
37
|
+
| 10 Quality Gates pass | `python3 tools/verify_all.py --mode hub` output: 10/10 | Gates passing last week |
|
|
38
|
+
| No fake passes | `python3 tools/infer_linter.py` output: 0 findings | "Assertions look fine" |
|
|
39
|
+
| Mutation floor met | `python3 tools/micro_mutator.py` score >= 80% | Tests exist, so "they must kill mutants" |
|
|
40
|
+
| Bug fixed | Reproduction test passes now | Code changed, assumed fixed |
|
|
41
|
+
| Regression test works | Red-green cycle verified (watched fail, then pass) | Test passes once |
|
|
42
|
+
| Subagent finished | Its diff inspected + its claims re-verified independently | Agent reports "success" |
|
|
43
|
+
| Requirements met | Line-by-line checklist against the original request | Tests passing |
|
|
44
|
+
|
|
45
|
+
## 4. Red Flags — STOP
|
|
46
|
+
|
|
47
|
+
- Using "should", "probably", "seems to", "definitely works"
|
|
48
|
+
- Expressing satisfaction before verification ("Perfect!", "Done!")
|
|
49
|
+
- About to commit, push, or open a PR without verification in this turn
|
|
50
|
+
- Trusting a subagent's success report without independent re-verification
|
|
51
|
+
- Relying on a partial check (linter passed, therefore build must pass)
|
|
52
|
+
- Thinking "just this once"
|
|
53
|
+
|
|
54
|
+
## 5. Rationalization Prevention
|
|
55
|
+
|
|
56
|
+
| Excuse | Reality |
|
|
57
|
+
|---|---|
|
|
58
|
+
| "Should work now" | RUN the verification. |
|
|
59
|
+
| "I'm confident" | Confidence is not evidence. |
|
|
60
|
+
| "Just this once" | No exceptions — one unverifiable claim poisons the whole report. |
|
|
61
|
+
| "Linter passed" | The linter is not the compiler; linter does not equal build. |
|
|
62
|
+
| "Agent said success" | Verify independently; subagent reports are claims, not evidence. |
|
|
63
|
+
| "Partial check is enough" | Partial proves nothing about the whole. |
|
|
64
|
+
| "Different words, so the rule doesn't apply" | Spirit over letter — paraphrases and implications of success are covered. |
|
|
65
|
+
|
|
66
|
+
## 6. Key Patterns
|
|
67
|
+
|
|
68
|
+
**Tests:** run command, quote `N/N pass`, then claim "all tests pass". Never "looks correct".
|
|
69
|
+
|
|
70
|
+
**Regression (TDD red-green):** write test, run (MUST FAIL), apply fix, run (passes), quote both runs. A regression test without a watched failure is unproven.
|
|
71
|
+
|
|
72
|
+
**Quality gates:** `python3 tools/verify_all.py --mode hub` fresh output with the 10/10 line quoted — required before any "task done" statement in swarm Stage 5.
|
|
73
|
+
|
|
74
|
+
**Subagent delegation:** agent reports success, orchestrator inspects the diff and re-runs the decisive command before relaying any success upward.
|
|
75
|
+
|
|
76
|
+
**Requirements:** re-read the original request, build the checklist, verify each item, report gaps or completion — "tests pass, phase complete" without the checklist is insufficient.
|
|
77
|
+
|
|
78
|
+
## 7. When To Apply
|
|
79
|
+
|
|
80
|
+
Always before: ANY success or completion claim, ANY positive statement about work state, committing or PR creation, task closure, moving to the next task, delegating to subagents.
|
|
81
|
+
|
|
82
|
+
Applies to exact phrases, paraphrases, synonyms, and any communication implying completion or correctness.
|
|
83
|
+
|
|
84
|
+
## 8. Boundary vs Sibling Skills (Do Not Confuse)
|
|
85
|
+
|
|
86
|
+
| Sibling | Owns | Hand-off |
|
|
87
|
+
|---|---|---|
|
|
88
|
+
| `antigravity-test-sentinel` | Hard completion blocking until tests and gates pass | The sentinel is the enforcement gate; this skill is the evidence protocol the agent follows to pass it honestly |
|
|
89
|
+
| `test-driven-development` | RED-GREEN-REFACTOR cycle | GREEN verification output feeds the evidence quoted here |
|
|
90
|
+
| `systematic-debugging` | Root-cause investigation | Phase 4 fix verification uses this protocol for its "fixed" claim |
|
|
91
|
+
|
|
92
|
+
## 9. Reference Documentation
|
|
93
|
+
|
|
94
|
+
- `python3 tools/verify_all.py --mode hub` — the 9-gate acceptance command for hub work.
|
|
95
|
+
- `python3 tools/infer_linter.py` — fake-pass scan required before any "tests are honest" claim.
|
|
96
|
+
- [Evidence log example (`evidence_log_example.md`)](examples/evidence_log_example.md): claim/evidence pairing for a swarm task closure.
|
|
97
|
+
|
|
98
|
+
## 10. Attribution
|
|
99
|
+
|
|
100
|
+
Adapted from **superpowers** skill `verification-before-completion` (https://github.com/obra/superpowers) — MIT License, Copyright (c) 2025 Jesse Vincent. The Iron Law, gate function, claim-evidence matrix, and rationalization table are re-scoped for enterprise QA automation in Synapse Hub; wording, structure, and hub tooling modified.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Example: Claim/Evidence Log for a Swarm Task Closure
|
|
2
|
+
|
|
3
|
+
Task: "Fix the flaky export test and get the suite green."
|
|
4
|
+
Subagent: test-runner -> failure-analyst -> quality-gatekeeper (Stage 5).
|
|
5
|
+
|
|
6
|
+
## Claim 1: "The flaky root cause is fixed"
|
|
7
|
+
|
|
8
|
+
| Field | Value |
|
|
9
|
+
|---|---|
|
|
10
|
+
| Claim | Export timeout root cause fixed via condition-based job poll |
|
|
11
|
+
| Evidence command | `npx playwright test tests/e2e/TC-220_export.spec.ts --repeat-each=10` |
|
|
12
|
+
| Fresh output (this turn) | `10 passed (94.2s)` |
|
|
13
|
+
| Verdict | Claim SUPPORTED — quoted with the output |
|
|
14
|
+
|
|
15
|
+
## Claim 2: "The full suite is green"
|
|
16
|
+
|
|
17
|
+
| Field | Value |
|
|
18
|
+
|---|---|
|
|
19
|
+
| Claim | Project suite green after the fix |
|
|
20
|
+
| Evidence command | `npm test` (the project command, not one file) |
|
|
21
|
+
| Fresh output (this turn) | `Tests: 2 failed, 214 passed` |
|
|
22
|
+
| Verdict | Claim REFUTED — report states 2 failures in TC-118/TC-140 with
|
|
23
|
+
distilled failure blocks (tools/distill_log.py). Work is NOT done. |
|
|
24
|
+
|
|
25
|
+
The 2 failures were pre-existing and not caused by the fix — still reported
|
|
26
|
+
by name. A red test scrolled past unmentioned is a report falsified by
|
|
27
|
+
omission.
|
|
28
|
+
|
|
29
|
+
## Claim 3 (after the second fix cycle): "Task complete, 10/10 gates"
|
|
30
|
+
|
|
31
|
+
| Field | Value |
|
|
32
|
+
|---|---|
|
|
33
|
+
| Evidence commands | `npm test` -> `Tests: 216 passed`; then
|
|
34
|
+
`python3 tools/verify_all.py --mode hub` |
|
|
35
|
+
| Fresh output (this turn) | `Gate 1..10: PASS — 10/10 gates` and mutation score
|
|
36
|
+
`0.86 (>= 0.80)` |
|
|
37
|
+
| Requirement checklist | Original request re-read; both requested items
|
|
38
|
+
(stabilize export test; suite green) verified line by line |
|
|
39
|
+
| Verdict | "Task complete" claim MADE — with all evidence attached |
|
|
40
|
+
|
|
41
|
+
## Anti-pattern (rejected)
|
|
42
|
+
|
|
43
|
+
> "All good, the suite is green now, ready to merge."
|
|
44
|
+
|
|
45
|
+
No command, no output, no turn — this is a claim without evidence. Under the
|
|
46
|
+
Iron Law it is not verification, it is a guess wearing a checkmark.
|