synapse-hub 2.6.0 → 2.7.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 (71) hide show
  1. package/.agents/agents/failure-analyst.md +4 -0
  2. package/.agents/agents/orchestrator.md +16 -0
  3. package/.agents/agents/pom-crafter.md +8 -0
  4. package/.agents/agents/quality-gatekeeper.md +5 -0
  5. package/.agents/agents/test-runner.md +5 -0
  6. package/.agents/rules/git-push-protocol.md +1 -1
  7. package/.agents/rules/graphify.md +2 -0
  8. package/.agents/rules/mandatory-playwright-live.md +9 -9
  9. package/.agents/rules/mobile_appium_rules.md +8 -1
  10. package/.agents/skills/actor-qa-swarm/SKILL.md +77 -0
  11. package/.agents/skills/actor-qa-swarm/examples/broker_sharding_sample.json +12 -0
  12. package/.agents/skills/agentless-qa-repair/SKILL.md +69 -0
  13. package/.agents/skills/agentless-qa-repair/examples/healing_report_sample.json +17 -0
  14. package/.agents/skills/api-spec-to-e2e-matrix/SKILL.md +1 -1
  15. package/.agents/skills/clean-pom-crafter/SKILL.md +2 -2
  16. package/.agents/skills/db-state-verifier-and-seeder/SKILL.md +4 -4
  17. package/.agents/skills/event-stream-qa-orchestrator/SKILL.md +79 -0
  18. package/.agents/skills/event-stream-qa-orchestrator/examples/timeline_sample.jsonl +2 -0
  19. package/.agents/skills/failure-autopsy-and-healing/SKILL.md +2 -2
  20. package/.agents/skills/failure-autopsy-and-healing/scripts/triage_failures.sh +6 -21
  21. package/.agents/skills/katalon-cli-runner/SKILL.md +1 -1
  22. package/.agents/skills/mipro-prompt-compiler/SKILL.md +59 -0
  23. package/.agents/skills/mipro-prompt-compiler/examples/compiled_module_sample.json +22 -0
  24. package/.agents/skills/qa-aci-interface/SKILL.md +67 -0
  25. package/.agents/skills/qa-aci-interface/examples/surgical_edit_sample.json +12 -0
  26. package/.agents/skills/qa-memory-os/SKILL.md +80 -0
  27. package/.agents/skills/qa-memory-os/examples/archival_memory_sample.json +21 -0
  28. package/.agents/skills/review-spec/SKILL.md +60 -0
  29. package/.agents/skills/review-spec/examples/sample_spec_review.md +33 -0
  30. package/.agents/skills/synthetic-test-data-generator/SKILL.md +2 -2
  31. package/.agents/skills/tot-exploratory-testing/SKILL.md +59 -0
  32. package/.agents/skills/tot-exploratory-testing/examples/tot_graph_sample.json +35 -0
  33. package/.agents/skills/wcag-audit-patterns/SKILL.md +2 -2
  34. package/.agents/skills/web-agent-gym-benchmarking/SKILL.md +62 -0
  35. package/.agents/skills/web-agent-gym-benchmarking/examples/benchmark_report_sample.json +22 -0
  36. package/CLAUDE.md +1 -1
  37. package/README.en.md +5 -5
  38. package/README.md +3 -3
  39. package/docs/ARCHITECTURE.md +8 -8
  40. package/docs/research/EXTERNAL_AGENT_SKILLS_SURVEY.md +1062 -0
  41. package/package.json +1 -1
  42. package/skills_manifest.json +88 -7
  43. package/synapse.config.json +1 -1
  44. package/templates/ai_bridges/CLAUDE.md +1 -1
  45. package/tools/TOOLS_RUNBOOK.md +1 -1
  46. package/tools/__init__.py +1 -1
  47. package/tools/_openapi_parser.py +158 -0
  48. package/tools/agentless_patcher.py +417 -0
  49. package/tools/analyze_project.py +9 -6
  50. package/tools/auto_heal.py +19 -0
  51. package/tools/autogen_qa_broker.py +318 -0
  52. package/tools/browser_helpers.js +2 -2
  53. package/tools/browsergym_eval.py +237 -0
  54. package/tools/ci_healing_hook.py +1 -1
  55. package/tools/cli.py +3 -3
  56. package/tools/dashboard_generator.py +4 -4
  57. package/tools/db_sandbox.py +4 -0
  58. package/tools/heal_pr_automator.py +25 -0
  59. package/tools/mcp_excel_server.py +1 -1
  60. package/tools/mcp_server.py +1 -1
  61. package/tools/mipro_assertion_tuner.py +207 -0
  62. package/tools/pinpoint_failure.py +12 -0
  63. package/tools/project_state.py +4 -0
  64. package/tools/qa_event_stream.py +336 -0
  65. package/tools/reversible_sandbox.py +4 -0
  66. package/tools/swe_qa_aci.py +369 -0
  67. package/tools/sync_agent_rules.py +1 -1
  68. package/tools/test_memory_os.py +409 -0
  69. package/tools/tot_exploratory_tester.py +240 -0
  70. package/tools/update_sentinel.py +3 -3
  71. package/tools/welcome_page.py +1 -1
@@ -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
+ }
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: review-spec
3
+ description: "Zero-context stress test and quality review of test specifications, user stories, BDD feature files, and acceptance criteria before code generation begins."
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
+ ```
@@ -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
@@ -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
@@ -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`
package/README.en.md CHANGED
@@ -4,9 +4,9 @@
4
4
  [🇻🇳 Tiếng Việt](README.md) | [🇬🇧 English Edition](README.en.md)
5
5
 
6
6
  > **Core Mission:** A standalone, zero-dependency Linter & Guardrail engine (zero external dependencies for core engine & DoD gates) protecting test suite integrity in the era of AI code generation — Catching tautological "fake-pass" tests, eliminating hard sleeps, distilling 95% CI log noise, and enforcing Clean POM architecture. Specialized tools (Excel export, Canvas visual diff) leverage standard optional extras (`openpyxl`, `Pillow`).
7
- > **Extended Ecosystem:** Bundled with 42 production QA skills, 6 specialized AI roles, and 10 DoD Quality Gates supporting Playwright, Cypress, Pytest, and Katalon.
7
+ > **Extended Ecosystem:** Bundled with 51 production QA skills, 6 specialized AI roles, and 10 DoD Quality Gates supporting Playwright, Cypress, Pytest, and Katalon.
8
8
  > **Author:** Thế Vị ([@TeeVee998](https://github.com/TeeVee998))
9
- > **Hub Version:** `v2.6.0` | **Scope:** 42 Standardized Skills, 6 Specialized AI Agents, 68 CLI Commands & 68+ Test Engineering Tools, 10 DoD Quality Gates.
9
+ > **Hub Version:** `v2.7.0` | **Scope:** 51 Standardized Skills, 6 Specialized AI Agents, 76 CLI Commands & 76+ Test Engineering Tools, 10 DoD Quality Gates.
10
10
 
11
11
  [![npm version](https://img.shields.io/npm/v/synapse-hub.svg?style=flat-square&color=blue)](https://www.npmjs.com/package/synapse-hub)
12
12
  [![node version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg?style=flat-square)](https://nodejs.org)
@@ -19,7 +19,7 @@
19
19
  ### 💡 What is Synapse Hub? (In 30 Seconds)
20
20
 
21
21
  > 📌 **Hub & Spoke Architecture Notice (Avoid Cloner Confusion):**
22
- > • **Synapse-Hub (This Repo):** The **"Central Brain"** hosting 42 skills, linters, and QA tools — **not** your test suite.
22
+ > • **Synapse-Hub (This Repo):** The **"Central Brain"** hosting 51 skills, linters, and QA tools — **not** your test suite.
23
23
  > • **Target Project (Spoke):** Your actual automation test repository (Playwright, Katalon, Pytest, Cypress, etc.).
24
24
  > 👉 To bootstrap Synapse Hub protection for your test project, open a terminal inside that project and run:
25
25
  > `npx synapse-hub setup` *(or from here with a target flag: `npx synapse-hub setup --target ../your-target-project`)*.
@@ -28,7 +28,7 @@ Think of Synapse Hub as a versatile, dual-mode engine:
28
28
  1. 🛠️ **Standalone CLI Tool (Zero AI needed):** Simply run `npx synapse-hub lint` to scan your test suite, distill bloated CI logs, or export test cases to standard Excel spreadsheets without any complex setup.
29
29
  2. 🧠 **Guardrail "Brain" for AI Coding Assistants:** When using Google Antigravity, Cursor, or Claude Code, Synapse Hub acts as an automated quality guardrail — preventing AI assistants from generating tautological fake-passes, swallowing exceptions, or inserting flaky hard sleeps.
30
30
 
31
- > 🛡️ **Zero Overhead:** You **never need to memorize** all 42 skills or 60+ tools! The system operates strictly *On-Demand*, activating tools only when a specific situation arises.
31
+ > 🛡️ **Zero Overhead:** You **never need to memorize** all 51 skills or 60+ tools! The system operates strictly *On-Demand*, activating tools only when a specific situation arises.
32
32
 
33
33
  #### ⚖️ Before vs. After Synapse Hub:
34
34
 
@@ -173,7 +173,7 @@ repos:
173
173
  ```mermaid
174
174
  flowchart TD
175
175
  subgraph Hub["🧠 Synapse Hub (Core v2.4.0)"]
176
- Skills[".agents/skills/ (42 Skills)"]
176
+ Skills[".agents/skills/ (51 Skills)"]
177
177
  Agents[".agents/agents/ (6 Specialized Roles)"]
178
178
  Rules[".agents/rules/ (11 Core Rules)"]
179
179
  Tools["tools/ (60+ Universal Python Tools)"]
package/README.md CHANGED
@@ -4,9 +4,9 @@
4
4
  [🇻🇳 Tiếng Việt](README.md) | [🇬🇧 English Edition](README.en.md)
5
5
 
6
6
  > **Định vị cốt lõi:** Bộ Linter & Guardrails độc lập (zero external dependencies cho core engine & DoD gates) bảo vệ độ tin cậy của test suite khi AI viết code — Phát hiện & ngăn chặn test "pass ảo" (0 assert, tautology), loại bỏ hoàn toàn sleep cố định, nén 95% log CI/CD, và chuẩn hóa cấu trúc Clean POM. Các tính năng nâng cao (xuất bảng Excel chuẩn doanh nghiệp, so sánh ảnh Canvas) sử dụng thư viện mở rộng tùy chọn (`openpyxl`, `Pillow`).
7
- > **Module mở rộng:** Sẵn sàng kết nối 42 kỹ năng QA chuyên sâu, 6 vai trò AI Swarm và 10 Cổng kiểm định DoD hỗ trợ Playwright, Cypress, Pytest và Katalon.
7
+ > **Module mở rộng:** Sẵn sàng kết nối 51 kỹ năng QA chuyên sâu, 6 vai trò AI Swarm và 10 Cổng kiểm định DoD hỗ trợ Playwright, Cypress, Pytest và Katalon.
8
8
  > **Tác giả:** Thế Vị ([@TeeVee998](https://github.com/TeeVee998))
9
- > **Phiên bản Hub:** `v2.6.0` | **Quy mô:** 42 Kỹ năng chuẩn hóa, 6 Vai trò AI Agent, 68 Lệnh CLI & 68+ Công cụ kiểm thử chuyên sâu, 10 Cổng kiểm định DoD.
9
+ > **Phiên bản Hub:** `v2.7.0` | **Quy mô:** 51 Kỹ năng chuẩn hóa, 6 Vai trò AI Agent, 76 Lệnh CLI & 76+ Công cụ kiểm thử chuyên sâu, 10 Cổng kiểm định DoD.
10
10
 
11
11
  [![npm version](https://img.shields.io/npm/v/synapse-hub.svg?style=flat-square&color=blue)](https://www.npmjs.com/package/synapse-hub)
12
12
  [![node version](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg?style=flat-square)](https://nodejs.org)
@@ -173,7 +173,7 @@ repos:
173
173
  ```mermaid
174
174
  flowchart TD
175
175
  subgraph Hub["🧠 Synapse Hub (Core v2.4.0)"]
176
- Skills[".agents/skills/ (42 Skills)"]
176
+ Skills[".agents/skills/ (51 Skills)"]
177
177
  Agents[".agents/agents/ (6 Specialized Roles)"]
178
178
  Rules[".agents/rules/ (11 Core Rules)"]
179
179
  Tools["tools/ (60+ Universal Python Tools)"]
@@ -1,7 +1,7 @@
1
1
  # Agent-Skills Architecture & Design Principles
2
2
 
3
3
  > **Scope:** Enterprise Multi-Agent QA Hub
4
- > **Version:** `2.6.0` | **Status:** Active / Production Standard
4
+ > **Version:** `2.7.0` | **Status:** Active / Production Standard
5
5
 
6
6
  ---
7
7
 
@@ -12,7 +12,7 @@ The `agent-skills` repository functions as a centralized **Intelligence Core (Hu
12
12
  ```mermaid
13
13
  flowchart TD
14
14
  subgraph Hub["Agent-Skills Hub (Intelligence Core)"]
15
- Catalog["42 Standardized Skills (.agents/skills)"]
15
+ Catalog["51 Standardized Skills (.agents/skills)"]
16
16
  Rules["Core Architectural Rules (.agents/rules)"]
17
17
  Tools["Zero-Token Python Engine (tools/)"]
18
18
  Swarm["6 Specialized Subagents (.agents/agents)"]
@@ -38,7 +38,7 @@ flowchart TD
38
38
 
39
39
  ## 2. Four-Tier Skill Stratification
40
40
 
41
- The 42 skills in the hub are structured into four progressive operational tiers:
41
+ The 50 skills in the hub are structured into four progressive operational tiers:
42
42
 
43
43
  ```mermaid
44
44
  flowchart LR
@@ -100,12 +100,12 @@ The Hub equips 6 specialized subagents with scoped tool and skill permissions:
100
100
 
101
101
  | Subagent Role | Primary Focus | Allowed Skills | Execution Tools |
102
102
  | :--- | :--- | :--- | :--- |
103
- | **`orchestrator`** | Task decomposition & governance | `agent-orchestration-multi-agent-optimize`, `graphify-impact-analyzer`, `architecture-decision-records`, `token-and-context-optimizer` | `verify_all.py`, `test_impact.py`, `setup_project.py`, `interview_story.py`, `dspy_qa_signatures.py` |
104
- | **`pom-crafter`** | Clean POM design & test generation | `clean-pom-crafter`, `lam-script-generator`, `synthetic-test-data-generator`, `api-spec-to-e2e-matrix` | `lookup_xpath.py`, `repo_map.py`, `generate_tc_from_story.py`, `skill_vault.py` |
103
+ | **`orchestrator`** | Task decomposition & governance | `agent-orchestration-multi-agent-optimize`, `graphify-impact-analyzer`, `architecture-decision-records`, `token-and-context-optimizer`, `actor-qa-swarm`, `event-stream-qa-orchestrator`, `qa-memory-os`, `tot-exploratory-testing`, `review-spec` | `verify_all.py`, `test_impact.py`, `setup_project.py`, `interview_story.py`, `dspy_qa_signatures.py`, `autogen_qa_broker.py`, `qa_event_stream.py`, `test_memory_os.py`, `tot_exploratory_tester.py`, `watch_mode.py`, `dashboard_generator.py` |
104
+ | **`pom-crafter`** | Clean POM design & test generation | `clean-pom-crafter`, `lam-script-generator`, `synthetic-test-data-generator`, `api-spec-to-e2e-matrix`, `gherkin-to-suite`, `mipro-prompt-compiler`, `qa-aci-interface` | `lookup_xpath.py`, `repo_map.py`, `generate_tc_from_story.py`, `skill_vault.py`, `gherkin_suite.py`, `swe_qa_aci.py`, `mipro_assertion_tuner.py`, `api_fuzzer.py`, `export_postman_collection.py` |
105
105
  | **`live-explorer`** | Live DOM & AOM exploration (<200ms) | `playwright-live-interaction`, `self-healing-locator`, `visual-regression-sentinel`, `api-network-mocking-interception` | `browser_helpers.js`, `e2e_flow_prober.ps1`, `safety_firewall.py` |
106
- | **`test-runner`** | Headless CLI test execution & CI | `katalon-cli-runner`, `e2e-testing-patterns`, `flaky-test-sentinel-and-quarantine`, `backend-load-and-stress-patterns`, `github-actions-templates` | `matrix_sharder.py`, `distill_log.py`, `pinpoint_failure.py`, `flaky_detector.py`, `reversible_sandbox.py`, `synapse_qa_bench.py` |
107
- | **`failure-analyst`**| Visual & XML error autopsy | `failure-autopsy-and-healing`, `self-healing-locator`, `file-and-report-validator` | `auto_heal.py`, `heal_pr_automator.py`, `pinpoint_failure.py`, `cache_resolver.py`, `auto_heal_reflexion.py` |
108
- | **`quality-gatekeeper`**| 10 Gates DoD & Fake-Pass Sentinel | `antigravity-test-sentinel`, `code-refactoring-refactor-clean`, `wcag-audit-patterns`, `web-vitals-and-performance-profiler`, `security-dast-sentinel` | `verify_all.py`, `infer_linter.py`, `micro_mutator.py`, `trace_data_flow.py`, `skill_collision_guard.py`, `textgrad_mutation_optimizer.py` |
106
+ | **`test-runner`** | Headless CLI test execution & CI | `katalon-cli-runner`, `e2e-testing-patterns`, `flaky-test-sentinel-and-quarantine`, `backend-load-and-stress-patterns`, `github-actions-templates` | `matrix_sharder.py`, `distill_log.py`, `pinpoint_failure.py`, `flaky_detector.py`, `reversible_sandbox.py`, `generate_jmx_plan.py`, `jtl_analyzer.py`, `newman_analyzer.py`, `traffic_session_converter.py`, `db_sandbox.py` |
107
+ | **`failure-analyst`**| Visual & XML error autopsy | `failure-autopsy-and-healing`, `self-healing-locator`, `file-and-report-validator`, `systematic-debugging`, `agentless-qa-repair` | `auto_heal.py`, `heal_pr_automator.py`, `pinpoint_failure.py`, `cache_resolver.py`, `auto_heal_reflexion.py`, `agentless_patcher.py`, `heuristic_locator_matcher.py`, `telemetry_correlator.py` |
108
+ | **`quality-gatekeeper`**| 10 Gates DoD & Fake-Pass Sentinel | `antigravity-test-sentinel`, `code-refactoring-refactor-clean`, `wcag-audit-patterns`, `web-vitals-and-performance-profiler`, `security-dast-sentinel`, `lean-impact-scoreboard`, `web-agent-gym-benchmarking` | `verify_all.py`, `infer_linter.py`, `micro_mutator.py`, `trace_data_flow.py`, `skill_collision_guard.py`, `textgrad_mutation_optimizer.py`, `skillspector.py`, `author_integrity.py`, `browsergym_eval.py` |
109
109
 
110
110
  ---
111
111