synapse-hub 2.6.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/.agents/agents/failure-analyst.md +4 -0
  2. package/.agents/agents/live-explorer.md +2 -0
  3. package/.agents/agents/orchestrator.md +16 -0
  4. package/.agents/agents/pom-crafter.md +10 -0
  5. package/.agents/agents/quality-gatekeeper.md +5 -0
  6. package/.agents/agents/test-runner.md +8 -0
  7. package/.agents/rules/git-push-protocol.md +1 -1
  8. package/.agents/rules/graphify.md +2 -0
  9. package/.agents/rules/mandatory-playwright-live.md +9 -9
  10. package/.agents/rules/mobile_appium_rules.md +8 -1
  11. package/.agents/skills/actor-qa-swarm/SKILL.md +77 -0
  12. package/.agents/skills/actor-qa-swarm/examples/broker_sharding_sample.json +12 -0
  13. package/.agents/skills/agentless-qa-repair/SKILL.md +69 -0
  14. package/.agents/skills/agentless-qa-repair/examples/healing_report_sample.json +17 -0
  15. package/.agents/skills/api-spec-to-e2e-matrix/SKILL.md +1 -1
  16. package/.agents/skills/clean-pom-crafter/SKILL.md +2 -2
  17. package/.agents/skills/db-state-verifier-and-seeder/SKILL.md +4 -4
  18. package/.agents/skills/event-stream-qa-orchestrator/SKILL.md +79 -0
  19. package/.agents/skills/event-stream-qa-orchestrator/examples/timeline_sample.jsonl +2 -0
  20. package/.agents/skills/failure-autopsy-and-healing/SKILL.md +2 -2
  21. package/.agents/skills/failure-autopsy-and-healing/scripts/triage_failures.sh +6 -21
  22. package/.agents/skills/katalon-cli-runner/SKILL.md +1 -1
  23. package/.agents/skills/lean-impact-scoreboard/SKILL.md +1 -1
  24. package/.agents/skills/mipro-prompt-compiler/SKILL.md +59 -0
  25. package/.agents/skills/mipro-prompt-compiler/examples/compiled_module_sample.json +22 -0
  26. package/.agents/skills/qa-aci-interface/SKILL.md +67 -0
  27. package/.agents/skills/qa-aci-interface/examples/surgical_edit_sample.json +12 -0
  28. package/.agents/skills/qa-memory-os/SKILL.md +80 -0
  29. package/.agents/skills/qa-memory-os/examples/archival_memory_sample.json +21 -0
  30. package/.agents/skills/repo-quality-audit/SKILL.md +1 -1
  31. package/.agents/skills/review-spec/SKILL.md +60 -0
  32. package/.agents/skills/review-spec/examples/sample_spec_review.md +33 -0
  33. package/.agents/skills/senior-code-review/SKILL.md +1 -1
  34. package/.agents/skills/synthetic-test-data-generator/SKILL.md +2 -2
  35. package/.agents/skills/technical-debt-harvester/SKILL.md +1 -1
  36. package/.agents/skills/tot-exploratory-testing/SKILL.md +59 -0
  37. package/.agents/skills/tot-exploratory-testing/examples/tot_graph_sample.json +35 -0
  38. package/.agents/skills/wcag-audit-patterns/SKILL.md +2 -2
  39. package/.agents/skills/web-agent-gym-benchmarking/SKILL.md +62 -0
  40. package/.agents/skills/web-agent-gym-benchmarking/examples/benchmark_report_sample.json +22 -0
  41. package/CLAUDE.md +2 -2
  42. package/README.en.md +70 -291
  43. package/README.md +68 -303
  44. package/docs/ARCHITECTURE.md +54 -8
  45. package/docs/CONTRIBUTING.md +1 -1
  46. package/docs/QUALITY_GATES.md +113 -0
  47. package/docs/research/EXTERNAL_AGENT_SKILLS_SURVEY.md +1062 -0
  48. package/package.json +1 -1
  49. package/scripts/package_dist.py +2 -1
  50. package/skills_manifest.json +92 -11
  51. package/synapse.config.json +1 -1
  52. package/templates/ai_bridges/CLAUDE.md +2 -2
  53. package/templates/ai_bridges/copilot-instructions.md +2 -2
  54. package/tools/TOOLS_RUNBOOK.md +1 -1
  55. package/tools/__init__.py +18 -1
  56. package/tools/_openapi_parser.py +158 -0
  57. package/tools/agent_canary.py +42 -30
  58. package/tools/agentless_patcher.py +417 -0
  59. package/tools/analyze_project.py +12 -11
  60. package/tools/api_drift_sentinel.py +4 -4
  61. package/tools/api_fuzzer.py +8 -8
  62. package/tools/auto_heal.py +23 -5
  63. package/tools/auto_heal_reflexion.py +2 -2
  64. package/tools/autogen_qa_broker.py +318 -0
  65. package/tools/browser_helpers.js +2 -2
  66. package/tools/browsergym_eval.py +236 -0
  67. package/tools/bug_reporter.py +11 -13
  68. package/tools/bump_version.py +75 -5
  69. package/tools/cache_resolver.py +78 -83
  70. package/tools/check_env.py +9 -1
  71. package/tools/check_version_sync.py +40 -3
  72. package/tools/ci_healing_hook.py +5 -7
  73. package/tools/cli.py +5 -7
  74. package/tools/config_decoupler.py +2 -3
  75. package/tools/core/__init__.py +52 -0
  76. package/tools/count_tokens.py +22 -20
  77. package/tools/dashboard_generator.py +628 -999
  78. package/tools/db_sandbox.py +69 -53
  79. package/tools/debt_harvester.py +3 -3
  80. package/tools/distill_log.py +3 -3
  81. package/tools/dspy_qa_signatures.py +3 -4
  82. package/tools/export_postman_collection.py +8 -8
  83. package/tools/flaky_detector.py +2 -2
  84. package/tools/fuzz_payloads.py +5 -5
  85. package/tools/generate_allure_report.py +1 -1
  86. package/tools/generate_jmx_plan.py +4 -4
  87. package/tools/gherkin_suite.py +1 -1
  88. package/tools/git_pre_commit_guard.py +2 -2
  89. package/tools/goldfish_review.py +2 -2
  90. package/tools/heal/__init__.py +28 -0
  91. package/tools/heal_pr_automator.py +29 -4
  92. package/tools/heuristic_locator_matcher.py +2 -2
  93. package/tools/infer_linter.py +8 -8
  94. package/tools/interview_story.py +0 -1
  95. package/tools/jtl_analyzer.py +11 -11
  96. package/tools/lint/__init__.py +30 -0
  97. package/tools/lint_ai_docs.py +42 -0
  98. package/tools/lookup_tc.py +1 -1
  99. package/tools/matrix_sharder.py +15 -13
  100. package/tools/mcp/__init__.py +16 -0
  101. package/tools/mcp_excel_server.py +2 -2
  102. package/tools/mcp_server.py +3 -4
  103. package/tools/md_to_xlsx.py +26 -26
  104. package/tools/micro_mutator.py +11 -12
  105. package/tools/mipro_assertion_tuner.py +207 -0
  106. package/tools/network_mock_shield.py +27 -27
  107. package/tools/newman_analyzer.py +2 -3
  108. package/tools/omni_emitter.py +5 -8
  109. package/tools/omni_parser.py +5 -5
  110. package/tools/omni_transpiler.py +5 -5
  111. package/tools/output_formatter.py +19 -0
  112. package/tools/perf/__init__.py +24 -0
  113. package/tools/pinpoint_failure.py +13 -1
  114. package/tools/project_state.py +4 -2
  115. package/tools/qa_event_stream.py +336 -0
  116. package/tools/repo_map.py +8 -8
  117. package/tools/report/__init__.py +32 -0
  118. package/tools/reversible_sandbox.py +5 -2
  119. package/tools/safety_firewall.py +2 -2
  120. package/tools/senior_code_review.py +2 -2
  121. package/tools/setup_project.py +10 -12
  122. package/tools/skill_collision_guard.py +3 -3
  123. package/tools/skill_vault.py +12 -3
  124. package/tools/skillspector.py +5 -7
  125. package/tools/smart_visual_masker.py +4 -6
  126. package/tools/spec_drift_sentinel.py +1 -2
  127. package/tools/swe_qa_aci.py +369 -0
  128. package/tools/synapse_qa_bench.py +3 -3
  129. package/tools/sync_agent_rules.py +18 -4
  130. package/tools/telemetry_correlator.py +3 -2
  131. package/tools/test_memory_os.py +419 -0
  132. package/tools/textgrad_mutation_optimizer.py +3 -3
  133. package/tools/tms_sync_bridge.py +5 -5
  134. package/tools/tot_exploratory_tester.py +239 -0
  135. package/tools/traffic_session_converter.py +9 -9
  136. package/tools/universal_ir.py +2 -3
  137. package/tools/update_sentinel.py +6 -9
  138. package/tools/verify_all.py +10 -0
  139. package/tools/visual_diff_canvas.py +1 -2
  140. package/tools/visual_som_helper.py +15 -13
  141. package/tools/watch_mode.py +1 -1
  142. package/tools/wcag_audit.py +22 -1
  143. package/tools/welcome_page.py +5 -6
@@ -0,0 +1,22 @@
1
+ {
2
+ "status": "PASS",
3
+ "module": "AssertionGenerator",
4
+ "optimization_trials": 20,
5
+ "best_trial_id": 14,
6
+ "baseline_mutation_score": 0.68,
7
+ "optimized_mutation_score": 0.895,
8
+ "estimated_token_footprint": 245,
9
+ "token_reduction_percent": 69.4,
10
+ "compiled_prompt": {
11
+ "instruction": "Produce strict web-first assertions avoiding tautologies, with dynamic wait and payload integrity checks.",
12
+ "demonstrations": [
13
+ {
14
+ "id": "demo_1",
15
+ "action": "submitOrder",
16
+ "assertion": "await expect(this.confirmationModal).toBeVisible();\nawait expect(this.orderId).not.toBeEmpty();"
17
+ }
18
+ ],
19
+ "signature": "AssertionGenerator"
20
+ },
21
+ "elapsed_seconds": 0.12
22
+ }
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: qa-aci-interface
3
+ description: "Safe Agent-Computer Interface for inspecting code windows (40-50 lines), surgical editing with pre-commit AST checks, and distilled test execution. Use when inspecting, editing, or refactoring code without context blowout."
4
+ ---
5
+
6
+ # QA Agent-Computer Interface (ACI) Skill — Context-Safe Code Editing
7
+
8
+ > **Paradigm Attribution:** Inspired by **Princeton NLP / Stanford SWE-agent ACI**.
9
+ > **Core Principle:** Prevent context window blowout and hallucinated edits by enforcing bounded file viewing (40–50 lines), surgical contiguous chunk replacements with AST syntax validation, and log distillation.
10
+
11
+ ---
12
+
13
+ ## 1. The Three ACI Primitives
14
+
15
+ ```mermaid
16
+ flowchart LR
17
+ View["1. view-window<br/>Read 40-50 lines with line numbers"] --> Edit["2. surgical-edit<br/>Replace exact chunk with AST syntax check"]
18
+ Edit --> Distill["3. run-distilled<br/>Run test and distill head+tail output"]
19
+ ```
20
+
21
+ 1. **Bounded File Viewing (`view-window`):**
22
+ - Strictly limits context consumption by reading bounded windows (default 40 lines) with line numbers.
23
+ - Eliminates monolithic file ingestion (reading 4,000-line PageClasses directly is strictly forbidden).
24
+
25
+ 2. **Pre-Commit Surgical Editing (`surgical-edit`):**
26
+ - Validates that target chunks exist uniquely in the file.
27
+ - Runs pre-commit AST syntax validation (Python `ast.parse` and bracket balance).
28
+ - Enforces **Clean POM**: strictly rejects raw XPath / CSS selectors if editing test scripts (`tests/`, `Scripts/`).
29
+ - Guarantees 100% UTF-8 No BOM across all file writes.
30
+
31
+ 3. **Distilled Execution (`run-distilled`):**
32
+ - Intercepts test runner stdout/stderr and extracts the head 25 lines and tail 25 lines.
33
+ - Prevents terminal noise and test trace dumps from saturating the conversation context.
34
+
35
+ ---
36
+
37
+ ## 2. CLI Tool Usage
38
+
39
+ Autonomous commands via `tools/swe_qa_aci.py`:
40
+
41
+ ```bash
42
+ # 1. View 40 lines starting at line 20
43
+ python tools/swe_qa_aci.py view-window \
44
+ --file src/pages/LoginPage.ts \
45
+ --start-line 20 \
46
+ --window-size 40
47
+
48
+ # 2. Surgically edit code with AST check & Clean POM guard
49
+ python tools/swe_qa_aci.py surgical-edit \
50
+ --file src/pages/LoginPage.ts \
51
+ --target-chunk "await this.page.click('#old-btn');" \
52
+ --replacement-chunk "await this.clickSafe(this.loginButton);" \
53
+ --validate-syntax
54
+
55
+ # 3. Run test command with distilled output
56
+ python tools/swe_qa_aci.py run-distilled \
57
+ --command "npx playwright test tests/login.spec.ts" \
58
+ --max-lines 50
59
+ ```
60
+
61
+ ---
62
+
63
+ ## 3. Strict Operating Invariants
64
+
65
+ - **Diff Minimization:** Diff length should not exceed 30 lines per edit.
66
+ - **Syntax Integrity:** Zero syntax errors permitted; the tool rolls back on any syntax invalidity before touching disk.
67
+ - **No BOM Invariant:** Ensures zero `0xEF, 0xBB, 0xBF` bytes in modified files.
@@ -0,0 +1,12 @@
1
+ {
2
+ "status": "PASS",
3
+ "file": "src/pages/LoginPage.ts",
4
+ "lines_replaced": {
5
+ "start": 25,
6
+ "end": 25
7
+ },
8
+ "ast_validation": "SYNTAX_VALID",
9
+ "utf8_nobom_verified": true,
10
+ "clean_pom_verified": true,
11
+ "diff_summary": "- await this.page.click('#old-btn');\n+ await this.clickSafe(this.loginButton);"
12
+ }
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: qa-memory-os
3
+ description: "Hierarchical 3-tier memory operating system for test automation: Core Memory blocks, Recall step logs, and Archival semantic store with AUT version scoping. Use when managing long-term test session state, auth tokens, and preventing context rot."
4
+ ---
5
+
6
+ # QA Test Memory OS Skill — Hierarchical Persistent Memory
7
+
8
+ > **Paradigm Attribution:** Inspired by **Letta AI / UC Berkeley SkyLab (MemGPT & MemFS)**.
9
+ > **Core Principle:** Replace flat SQLite caches with a disciplined 3-tier memory operating system. Eliminate memory rot across application versions by tagging locator mutations and flaky histories with explicit AUT release versions.
10
+
11
+ ---
12
+
13
+ ## 1. The 3-Tier Architecture
14
+
15
+ ```mermaid
16
+ flowchart TD
17
+ subgraph MemoryOS["Hierarchical QA Test Memory OS (.agent_memory/qa_memory.db)"]
18
+ Core["Tier 1: Core Memory Block<br/>Fast Key-Value JSON: AUT URL, Token Expiry, Feature Flags"]
19
+ Recall["Tier 2: Recall Memory Log<br/>Sequential chronological timeline of execution steps"]
20
+ Archival["Tier 3: Archival Semantic Store<br/>Cross-sprint locator mutations scoped by AUT version (v2.1 vs v2.2)"]
21
+ end
22
+
23
+ Clean["Hygiene & GC Daemon<br/>Secret scrubbing (zero passwords/tokens) & DB size < 50MB"]
24
+ Core --> Clean
25
+ Recall --> Clean
26
+ Archival --> Clean
27
+ ```
28
+
29
+ 1. **Tier 1 — Core Memory (`core_memory`):**
30
+ - Immediate in-context state: active auth tokens, storage state path, AUT base URL.
31
+ - Enables **Zero-Second Auth**: reuse active tokens without repeating UI login forms.
32
+
33
+ 2. **Tier 2 — Recall Memory (`recall_memory`):**
34
+ - Sequential audit log of subagent actions, navigation events, and errors.
35
+ - Rotates or prunes records older than 30 days to save disk space.
36
+
37
+ 3. **Tier 3 — Archival Memory (`archival_memory`):**
38
+ - Permanent knowledge base of healed locators and historical flaky failure patterns.
39
+ - **AUT Version Scoping (`aut_version`):** Queries can filter by release (e.g. `aut_version="v2.1"`). When the web app upgrades to `v2.2`, obsolete `v2.1` mutations are ignored, completely eliminating false cache hits (Memory Rot).
40
+
41
+ ---
42
+
43
+ ## 2. CLI Tool Usage
44
+
45
+ Autonomous commands via `tools/test_memory_os.py`:
46
+
47
+ ```bash
48
+ # 1. Initialize memory OS database
49
+ python tools/test_memory_os.py init --db-path .agent_memory/qa_memory.db
50
+
51
+ # 2. Update active session state in Core Memory
52
+ python tools/test_memory_os.py update-core \
53
+ --block auth_state \
54
+ --data '{"token_expiry": "2026-11-05T00:00:00Z", "storage_state": "storage_state.json"}'
55
+
56
+ # 3. Store locator mutation in Archival Memory scoped by version
57
+ python tools/test_memory_os.py archival-insert \
58
+ --key LOCATOR_MUTATION \
59
+ --payload '{"page": "CheckoutPage", "old": "#submit-btn", "new": "button[data-testid=submit]"}' \
60
+ --aut-version "v2.1" \
61
+ --tags "checkout,submit,button"
62
+
63
+ # 4. Search archival memory with semantic token matching
64
+ python tools/test_memory_os.py archival-search \
65
+ --query "Checkout submit button locator history" \
66
+ --aut-version "v2.1" \
67
+ --top-k 3 \
68
+ --json
69
+
70
+ # 5. Run garbage collection and secret scrubbing
71
+ python tools/test_memory_os.py gc --scrub-secrets --max-age-days 30
72
+ ```
73
+
74
+ ---
75
+
76
+ ## 3. Strict Operating Invariants
77
+
78
+ - **Zero Plaintext Secrets:** Automatic regex masking for passwords, bearer tokens, and private keys (`[MASKED_SECRET]`).
79
+ - **Memory File Ceiling:** DB size strictly maintained under **50MB**.
80
+ - **Version Isolation:** Never apply archival locator patches across different incompatible AUT major versions.
@@ -0,0 +1,21 @@
1
+ {
2
+ "status": "PASS",
3
+ "query": "Checkout submit button locator history",
4
+ "aut_version": "v2.1",
5
+ "matches_found": 1,
6
+ "results": [
7
+ {
8
+ "id": "mem_arch_9014",
9
+ "similarity_score": 0.912,
10
+ "key": "LOCATOR_MUTATION",
11
+ "timestamp": "2026-11-04T05:30:00Z",
12
+ "payload": {
13
+ "page": "CheckoutPage",
14
+ "old_selector": "#submit-order",
15
+ "new_selector": "button[data-testid=submit]",
16
+ "aut_version": "v2.1",
17
+ "verified_by_test": "tests/checkout.spec.ts"
18
+ }
19
+ }
20
+ ]
21
+ }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: repo-quality-audit
3
- description: "Quality audit of a whole codebase: bugs, security risks, concurrency and scale bottlenecks, missing test coverage, and code bloat. Ranks findings with 'Fix this first' priority."
3
+ description: "Comprehensive codebase quality audit covering bugs, security, bottlenecks, and bloat. Use when auditing an entire project, evaluating repository health, or prioritizing technical debt."
4
4
  category: architecture_and_analysis
5
5
  version: "1.0.0"
6
6
  ---
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: review-spec
3
+ description: "Stress-test specifications, user stories, and BDD feature files with zero-context rigor. Use when reviewing requirements, user stories, or acceptance criteria before code generation."
4
+ category: architecture_and_analysis
5
+ version: "1.0.0"
6
+ ---
7
+
8
+ # Review Spec — Zero-Context Specification Stress-Tester
9
+
10
+ Review test specifications, User Stories, and BDD `.feature` files with stateless, zero-context rigor (Elephant-Goldfish Model) before generating code.
11
+
12
+ Order of evaluation: **System Boundaries -> Dynamic Data & Teardown -> Assertion Rigor -> Boundary & Negative Cases -> Concrete Implementation Targets**.
13
+
14
+ ---
15
+
16
+ ## 1. When to Use
17
+
18
+ - Triggered automatically before `pom-crafter` synthesizes Page Classes or test scripts from natural-language specs.
19
+ - Triggered when the user asks to review, audit, or refine requirements, user stories, or acceptance criteria.
20
+ - Integrated CLI invocation:
21
+ ```bash
22
+ python tools/goldfish_review.py path/to/spec.md
23
+ python tools/goldfish_review.py path/to/feature.feature --json
24
+ # or via CLI shim:
25
+ agent-qa review-spec path/to/spec.md
26
+ ```
27
+
28
+ ---
29
+
30
+ ## 2. Five Verification Vectors (Goldfish Protocol)
31
+
32
+ 1. **Comprehension & System Boundaries (20%):**
33
+ - Explicit Actor/Role definition.
34
+ - Clear Preconditions and Initial State.
35
+ - Well-defined Target Scope (no vague "works fine" or "system operates normally").
36
+
37
+ 2. **Dynamic Data & Idempotent Teardown (20%):**
38
+ - Mandatory dynamic timestamps or random prefixes (`AUTO_`, `uniqueCode`) to eliminate database primary key collisions.
39
+ - Explicit post-test cleanup or automated Teardown step for every data-creation path.
40
+
41
+ 3. **Assertion Rigor & Truth Anchor (25%):**
42
+ - Concrete, deterministic expected results instead of tautological assertions.
43
+ - Zero-Fake-Pass guarantee: explicit UI state changes, status codes, or database assertions.
44
+
45
+ 4. **Boundary & Negative Scenarios (20%):**
46
+ - Invalid input values, boundary overflows, and unauthorized access attempts.
47
+ - Explicit error message and validation feedback assertions.
48
+
49
+ 5. **Concrete Implementation Targets (15%):**
50
+ - Concrete Page Class mappings or API endpoint routes.
51
+ - Clean POM Flat Architecture compliance (locators belongs in Page Classes, not test scripts).
52
+
53
+ ---
54
+
55
+ ## 3. Autonomous Execution Workflow
56
+
57
+ 1. Ingest specification file (`.md`, `.feature`, or story text).
58
+ 2. Run `python tools/goldfish_review.py <spec_file>`.
59
+ 3. If review score is `< 80/100` or blocking gaps are found, report specific missing vectors to the user or orchestrator.
60
+ 4. Once verified ($\ge 80/100$), proceed with Clean POM test script codification.
@@ -0,0 +1,33 @@
1
+ # Sample Spec Review (Goldfish Protocol)
2
+
3
+ Representative output of `python tools/goldfish_review.py` evaluating a draft specification for an e-commerce checkout flow.
4
+
5
+ ```markdown
6
+ # 🔍 Goldfish Specification Review Report
7
+ Target Spec: `specs/checkout_flow.md`
8
+ Timestamp: 2026-11-04 15:30:00
9
+
10
+ ## Scorecard: 85/100 (APPROVED)
11
+
12
+ 1. Comprehension & System Boundaries: 20/20
13
+ - Actor: Authenticated Buyer.
14
+ - Preconditions: Active cart with >= 1 item, valid shipping address.
15
+ - Target Scope: Payment step through Order Confirmation modal.
16
+
17
+ 2. Dynamic Data & Idempotent Teardown: 18/20
18
+ - Dynamic order ID with `AUTO_${Date.now()}`.
19
+ - Teardown: DB order status updated to `CANCELLED_TEST` via API hook.
20
+
21
+ 3. Assertion Rigor: 22/25
22
+ - Explicit confirmation message and total amount match.
23
+ - Anti-Fake Pass check: database order record mutation verified.
24
+
25
+ 4. Boundary & Negative Scenarios: 15/20
26
+ - Invalid credit card number and expired CVV covered.
27
+ - Recommendation: Add test case for network timeout during 3D Secure redirect.
28
+
29
+ 5. Implementation Target: 10/15
30
+ - Target Page: `CheckoutPage.ts`, `OrderConfirmationPage.ts`.
31
+
32
+ Verdict: PASS (Ready for POM Codification)
33
+ ```
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: senior-code-review
3
- description: "Quality review of a code change: verify logic correctness, security boundaries, real concurrency/load, missing test coverage, execution speed, and eliminate bloat. Reads connected callers and data flows, not just the diff."
3
+ description: "Review code changes across logic, security, concurrency, and test coverage. Use when conducting pull request reviews, diff inspections, or auditing commit changes before merge."
4
4
  category: architecture_and_analysis
5
5
  version: "1.0.0"
6
6
  ---
@@ -81,8 +81,8 @@ Transform functional tests into input sanitization and robustness validation by
81
81
 
82
82
  ```bash
83
83
  # Query CLI catalog for specific field vectors
84
- python3 ~/.zcode/synapse-hub/tools/fuzz_payloads.py --field username --type string
85
- python3 ~/.zcode/synapse-hub/tools/fuzz_payloads.py --category sqli --json
84
+ python tools/fuzz_payloads.py --field username --type string
85
+ python tools/fuzz_payloads.py --category sqli --json
86
86
  ```
87
87
 
88
88
  ### Recipe D: Harmless SQLi Polyglot Sanity
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: technical-debt-harvester
3
- description: "Harvest shortcut: comments into a tracked debt ledger so deliberate compromises do not rot into forgotten tech debt."
3
+ description: "Harvest shortcut: comments into a tracked technical debt ledger. Use when auditing code compromises, tracking deferred refactorings, or scanning for shortcut markers."
4
4
  category: architecture_and_analysis
5
5
  version: "1.0.0"
6
6
  ---
@@ -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,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
+ }
@@ -70,8 +70,8 @@ Agent can automatically audit accessibility for any HTML file or live page URL v
70
70
 
71
71
  ```bash
72
72
  # Audit a local HTML snapshot
73
- python3 ~/.zcode/synapse-hub/tools/wcag_audit.py path/to/page.html -o docs/wcag_audit_report.md
73
+ python tools/wcag_audit.py path/to/page.html -o docs/wcag_audit_report.md
74
74
 
75
75
  # Audit a live application URL directly
76
- python3 ~/.zcode/synapse-hub/tools/wcag_audit.py https://staging.example.com --url -o docs/wcag_audit_report.md
76
+ python tools/wcag_audit.py https://staging.example.com --url -o docs/wcag_audit_report.md
77
77
  ```
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: web-agent-gym-benchmarking
3
+ description: "Empirical benchmark harness evaluating web agents and Page Classes against standardized enterprise tasks with headless <200ms latency budgets and ground-truth DB state verification. Use when benchmarking web agents or certifying Page Classes."
4
+ ---
5
+
6
+ # Web Agent Gym Benchmarking Skill — Empirical Interaction & PageClass Certification
7
+
8
+ > **Paradigm Attribution:** Inspired by **ServiceNow Research BrowserGym & CMU WebArena**.
9
+ > **Core Principle:** Move beyond static assertions and text-only tool tests. Measure real agent navigation efficiency, enforce < 200ms headless step latency, and confirm that UI actions trigger ground-truth database mutations (eliminating fake passes).
10
+
11
+ ---
12
+
13
+ ## 1. The Benchmark Architecture
14
+
15
+ ```mermaid
16
+ flowchart TD
17
+ subgraph GymHarness["BrowserGym Evaluation Harness (tools/browsergym_eval.py)"]
18
+ Tasks["Standardized Tasks<br/>ecommerce_order, crm_lead_create, filter_data_grid"]
19
+ Execution["Headless Playwright Execution<br/>Sub-200ms latency per action step"]
20
+ DualVerify["Dual Verification Oracle<br/>1. DOM/AOM state inspection<br/>2. Underlying DB record verification"]
21
+ Certify["Certification Decision<br/>Success >= 90% & Latency < 200ms -> APPROVED"]
22
+ end
23
+ ```
24
+
25
+ 1. **Standardized Tasks:**
26
+ - Pre-packaged enterprise scenarios covering forms, checkout modals, dropdowns, and data grids.
27
+ - Evaluates whether the web agent can navigate without deadlocks or infinite loops.
28
+
29
+ 2. **Ground-Truth Dual Verification:**
30
+ - A pass is NOT granted merely because a UI toast says "Success".
31
+ - The harness validates the database mutation (`SELECT COUNT(*) FROM orders WHERE ...`).
32
+
33
+ 3. **PageClass Certification:**
34
+ - Static and dynamic audit of newly synthesized Page Classes.
35
+ - Rejects Page Classes containing `findTestObject`, raw XPaths, or static `Thread.sleep` calls.
36
+
37
+ ---
38
+
39
+ ## 2. CLI Tool Usage
40
+
41
+ Autonomous commands via `tools/browsergym_eval.py`:
42
+
43
+ ```bash
44
+ # 1. Run full benchmark suite in headless mode
45
+ python tools/browsergym_eval.py run-suite \
46
+ --tasks "ecommerce_order,crm_lead_create,filter_data_grid" \
47
+ --headless \
48
+ --timeout-sec 30 \
49
+ --report-out reports/browsergym_benchmark.json
50
+
51
+ # 2. Evaluate and certify a Page Class
52
+ python tools/browsergym_eval.py evaluate-pageclass \
53
+ --page-class src/pages/OrderManagementPage.ts
54
+ ```
55
+
56
+ ---
57
+
58
+ ## 3. Strict Operating Invariants
59
+
60
+ - **Headless Latency Ceiling:** Average action step latency must remain below **200ms**.
61
+ - **No Static Sleep:** Any Page Class with `sleep()` calls is automatically flagged as `REJECTED`.
62
+ - **Clean POM:** Strictly prohibits hardcoded selectors outside Page Classes.
@@ -0,0 +1,22 @@
1
+ {
2
+ "status": "PASS",
3
+ "suite": "EnterpriseWebBenchmark_v1",
4
+ "total_tasks": 3,
5
+ "passed_tasks": 3,
6
+ "action_success_rate": 1.0,
7
+ "avg_latency_ms": 131.2,
8
+ "database_assertion_pass_rate": 1.0,
9
+ "certification": "APPROVED",
10
+ "tasks": [
11
+ {
12
+ "task": "ecommerce_order",
13
+ "name": "E-Commerce Checkout & Order Generation",
14
+ "steps_count": 5,
15
+ "avg_step_latency_ms": 130.0,
16
+ "dom_verification": "PASS",
17
+ "database_assertion": "PASS",
18
+ "status": "PASS"
19
+ }
20
+ ],
21
+ "elapsed_seconds": 0.45
22
+ }
package/CLAUDE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # CLAUDE.md — Synapse-Hub Guidelines for Claude Code
2
2
 
3
- > **Author & Creator:** Thế Vị (@TeeVee998) <https://github.com/TeeVee998/Synapse-Hub>
3
+ > **Author & Creator:** Thế Vị (@TeeVee998) <https://github.com/TeeVee998/Synapse-Hub>
4
4
  > **License:** MIT License (Mandatory Attribution Preservation)
5
5
 
6
6
  <!-- ============================================================================== -->
@@ -17,7 +17,7 @@ In accordance with the MIT License, the original copyright notice crediting **Th
17
17
  ---
18
18
 
19
19
  ## ⚡ Quick Commands
20
- - Verify 9 Quality Gates: `npx synapse-hub verify` (or `python tools/verify_all.py`)
20
+ - Verify 10 Quality Gates: `npx synapse-hub verify` (or `python tools/verify_all.py`)
21
21
  - Project Health Audit: `npx synapse-hub analyze` (or `python tools/analyze_project.py`)
22
22
  - Code Linter & Fake-Pass Sentinel: `npx synapse-hub lint` (or `python tools/infer_linter.py`)
23
23
  - Verify Author Attribution: `python tools/author_integrity.py`