synapse-hub 2.1.1 → 2.2.1

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 (62) hide show
  1. package/.agents/agents/orchestrator.md +7 -0
  2. package/.agents/rules/lessons-learned.md +1 -0
  3. package/.agents/skills/agent-orchestration-multi-agent-optimize/SKILL.md +1 -1
  4. package/.agents/skills/antigravity-test-sentinel/SKILL.md +1 -2
  5. package/.agents/skills/api-network-mocking-interception/SKILL.md +1 -1
  6. package/.agents/skills/api-spec-to-e2e-matrix/SKILL.md +11 -4
  7. package/.agents/skills/architecture-decision-records/SKILL.md +1 -1
  8. package/.agents/skills/auth-session-and-cookie-manager/SKILL.md +1 -1
  9. package/.agents/skills/backend-load-and-stress-patterns/SKILL.md +32 -11
  10. package/.agents/skills/bats-testing-patterns/SKILL.md +1 -1
  11. package/.agents/skills/clean-pom-crafter/SKILL.md +1 -4
  12. package/.agents/skills/code-refactoring-refactor-clean/SKILL.md +1 -1
  13. package/.agents/skills/db-state-verifier-and-seeder/SKILL.md +1 -1
  14. package/.agents/skills/e2e-testing-patterns/SKILL.md +1 -1
  15. package/.agents/skills/failure-autopsy-and-healing/SKILL.md +1 -3
  16. package/.agents/skills/file-and-report-validator/SKILL.md +1 -1
  17. package/.agents/skills/flaky-test-sentinel-and-quarantine/SKILL.md +1 -1
  18. package/.agents/skills/github-actions-templates/SKILL.md +1 -1
  19. package/.agents/skills/graphify-impact-analyzer/SKILL.md +1 -3
  20. package/.agents/skills/katalon-cli-runner/SKILL.md +1 -1
  21. package/.agents/skills/lam-script-generator/SKILL.md +1 -2
  22. package/.agents/skills/playwright-live-interaction/SKILL.md +1 -4
  23. package/.agents/skills/security-dast-sentinel/SKILL.md +1 -1
  24. package/.agents/skills/self-healing-locator/SKILL.md +1 -2
  25. package/.agents/skills/skillspector-security-guard/SKILL.md +115 -0
  26. package/.agents/skills/synthetic-test-data-generator/SKILL.md +1 -1
  27. package/.agents/skills/token-and-context-optimizer/SKILL.md +1 -1
  28. package/.agents/skills/visual-regression-sentinel/SKILL.md +1 -1
  29. package/.agents/skills/wcag-audit-patterns/SKILL.md +1 -1
  30. package/.agents/skills/web-vitals-and-performance-profiler/SKILL.md +1 -1
  31. package/AGENTS.md +36 -0
  32. package/LICENSE +22 -0
  33. package/README.md +171 -107
  34. package/bin/agent-qa.js +4 -0
  35. package/package.json +3 -2
  36. package/skills_manifest.json +42 -29
  37. package/templates/PROJECT_AI_GUIDE_TEMPLATE.md +15 -1
  38. package/templates/ai_bridges/CLAUDE.md +31 -0
  39. package/templates/ai_bridges/copilot-instructions.md +25 -0
  40. package/templates/ai_bridges/cursor_synapse_qa.mdc +26 -0
  41. package/templates/ai_bridges/windsurfrules +25 -0
  42. package/templates/ci/github-actions-synapse.yml +28 -0
  43. package/templates/ci/gitlab-ci-synapse.yml +16 -0
  44. package/tools/TOOLS_RUNBOOK.md +223 -12
  45. package/tools/author_integrity.py +151 -0
  46. package/tools/browser_helpers.js +2 -2
  47. package/tools/bump_version.py +8 -0
  48. package/tools/cli.py +100 -4
  49. package/tools/export_postman_collection.py +535 -218
  50. package/tools/generate_jmx_plan.py +672 -102
  51. package/tools/git_pre_commit_guard.py +21 -0
  52. package/tools/jtl_analyzer.py +474 -0
  53. package/tools/mcp_excel_server.ps1 +1 -1
  54. package/tools/mcp_server.py +1 -1
  55. package/tools/newman_analyzer.py +385 -0
  56. package/tools/setup_project.py +203 -18
  57. package/tools/skillspector.py +1145 -0
  58. package/tools/telemetry_correlator.py +351 -0
  59. package/tools/templates/jmeter-distributed/README.md +54 -0
  60. package/tools/templates/jmeter-distributed/docker-compose.yml +83 -0
  61. package/tools/update_sentinel.py +313 -0
  62. package/tools/verify_all.py +30 -1
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **Bộ não trí tuệ dùng chung và mạng lưới kỹ năng tự hành, tăng cường năng lực cho các trợ lý AI (Google Antigravity, Cursor, Windsurf, Claude Code) trên mọi hệ sinh thái kiểm thử tự động.**
6
6
  > **Tác giả:** Thế Vị ([@TeeVee998](https://github.com/TeeVee998))
7
- > **Phiên bản Hub:** `v2.1.1` | **Quy mô:** 27 Kỹ năng chuẩn hóa, 6 Vai trò AI Swarm, 7 Quy tắc cốt lõi, 20+ Công cụ tự động.
7
+ > **Phiên bản Hub:** `v2.2.1` | **Quy mô:** 28 Kỹ năng chuẩn hóa, 6 Vai trò AI Swarm, 7 Quy tắc cốt lõi, 20+ Công cụ tự động.
8
8
 
9
9
  ---
10
10
 
@@ -14,8 +14,8 @@
14
14
 
15
15
  ```mermaid
16
16
  flowchart TD
17
- subgraph Hub["🧠 Synapse Hub (Intelligence Core v2.1.1)"]
18
- Skills[".agents/skills/ (27 Skills)"]
17
+ subgraph Hub["🧠 Synapse Hub (Intelligence Core v2.2.1)"]
18
+ Skills[".agents/skills/ (28 Skills)"]
19
19
  Agents[".agents/agents/ (6 Specialized Roles)"]
20
20
  Rules[".agents/rules/ (7 Core Rules)"]
21
21
  Tools["tools/ (20+ Universal Python Tools)"]
@@ -68,22 +68,38 @@ flowchart TD
68
68
 
69
69
  ---
70
70
 
71
- ## 🚀 2. Cách Sử Dụng (NPM / npx & Workspace Mount)
71
+ ## 🚀 2. Hướng Dẫn Bắt Đầu & Tích Hợp (3 Cách Dùng)
72
72
 
73
73
  [![npm version](https://img.shields.io/npm/v/synapse-hub.svg?style=flat-square&color=blue)](https://www.npmjs.com/package/synapse-hub)
74
- [![npm downloads](https://img.shields.io/npm/dm/synapse-hub.svg?style=flat-square)](https://www.npmjs.com/package/synapse-hub)
75
- [![license](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](https://github.com/TeeVee998/Synapse-Hub/blob/main/package.json)
74
+ [![node version](https://img.shields.io/badge/node-%3E%3D16.0.0-brightgreen.svg?style=flat-square)](https://nodejs.org)
75
+ [![license](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](https://github.com/TeeVee998/Synapse-Hub/blob/main/LICENSE)
76
76
 
77
- ### Cách A: Sử dụng tức thì qua NPM Registry (Khuyên dùng)
78
- Gói chính thức đã được phát hành toàn cầu tại **[npmjs.com/package/synapse-hub](https://www.npmjs.com/package/synapse-hub)**. Bạn có thể sử dụng ngay mà không cần clone mã nguồn:
77
+ ---
78
+
79
+ ### ⚡ Khởi Động Siêu Tốc: Đúng 1 Lệnh Duy Nhất Với NPX (All-in-One 🚀)
80
+ *Tất cả trong một: **KHÔNG CẦN clone repo Hub**, **KHÔNG CẦN mở Multi-root workspace**, tự động cấu hình dự án **VÀ tự động bơm thẳng vào Antigravity Global Plugin**.*
79
81
 
80
- #### 1. Thực thi tức thì không cần cài đặt (`npx`):
81
- Tại thư mục gốc của bất kỳ dự án nào, thực thi trực tiếp:
82
+ Mở terminal ngay tại thư mục **dự án kiểm thử của bạn** và chạy đúng 1 dòng:
82
83
  ```bash
83
- # Khởi tạo tự động 1-Click (sinh PROJECT_AI_GUIDE.md, cài pre-push hook, trích xuất AST repo map)
84
84
  npx synapse-hub setup
85
-
86
- # Chạy kiểm định 8 Cổng Chất Lượng (DoD Quality Gates)
85
+ ```
86
+ 👉 **Đúng 1 lệnh này sẽ tự động hoàn tất toàn bộ trong 5 giây:**
87
+ 1. 🧠 **Tự động bơm vào Antigravity Global Plugin:** Triển khai Synapse-Hub vào `~/.gemini/config/plugins/synapse-hub`. Kể từ giây phút này, **mọi dự án** mở trên Google Antigravity đều tự động sở hữu toàn bộ 28 Skills và 6 Subagents mà không cần cấu hình thêm!
88
+ 2. 🌐 **Triển Khai Cầu Nối Đa IDE & AI (Universal AI Bridges):** Tự động sinh file cấu hình và quy chuẩn cho mọi trợ lý AI khác nhau ngay trong dự án của bạn:
89
+ - 🖱️ **Cursor:** `.cursor/rules/synapse-qa.mdc` (Tự động kích hoạt khi mở file trong Cursor)
90
+ - 🤖 **Claude Code:** `CLAUDE.md` (Hướng dẫn quy chuẩn QA, commands và Clean POM)
91
+ - 🐙 **GitHub Copilot:** `.github/copilot-instructions.md` (Chỉ dẫn hệ thống cho VS Code / JetBrains Copilot)
92
+ - 🏄 **Windsurf (Cascade):** `.windsurfrules` (Nguyên tắc kiểm thử bắt buộc)
93
+ *(Mọi thành viên dù dùng Antigravity, Cursor, Claude Code, Copilot hay Windsurf đều chung 1 chuẩn Clean POM, 1 nguyên tắc Truth Anchor chống pass ảo, và 8 Cổng Kiểm Định DoD!)*
94
+ 3. 🔍 **Nhận diện Framework:** Tự động phát hiện Playwright TypeScript/JS, Katalon Studio Groovy, Cypress, hoặc Pytest.
95
+ 4. 📋 **Sinh Hướng Dẫn Nghiệp Vụ:** Tạo file `PROJECT_AI_GUIDE.md` ngay trong dự án của bạn để AI hiểu sâu kiến trúc và quy chuẩn code.
96
+ 5. 🛡️ **Cài Đặt Cổng Gác Git (Pre-Push Hook):** Tự cài `.git/hooks/pre-push` gọi `npx synapse-hub verify` để chặn đứng mã lỗi và lộ mật khẩu trước khi push.
97
+ 6. 💾 **Khởi Tạo Bộ Nhớ Kinh Nghiệm (SQLite Cache):** Khởi tạo và nạp giải pháp sửa lỗi UI vào `~/.agent_memory/global_cache.db` (chi phí 0 token).
98
+ 7. 🗺️ **Quét AST & Xuất Bản Đồ Hàm:** Tự động phân tích codebase và trích xuất `repo_map.txt` cô đọng.
99
+
100
+ Sau đó, bạn có thể thực thi kiểm định bất cứ lúc nào:
101
+ ```bash
102
+ # Kiểm định 8 Cổng Chất Lượng (DoD Quality Gates)
87
103
  npx synapse-hub verify
88
104
 
89
105
  # Đánh giá sức khỏe toàn diện dự án (5-in-1 Project Health Report)
@@ -92,45 +108,39 @@ npx synapse-hub analyze
92
108
  # Quét phát hiện mã giả, assertion rỗng (Fake-Pass AST Sentinel)
93
109
  npx synapse-hub lint
94
110
  ```
95
- > 💡 **Mẹo:** Bạn cũng có thể dùng lệnh gọi rút gọn: `npx synapse setup` hoặc `npx synapse verify`.
96
111
 
97
- #### 2. Cài đặt cố định vào dự án (DevDependency):
98
- ```bash
99
- npm install -D synapse-hub
100
- ```
101
- Sau đó có thể khai báo vào `scripts` trong file `package.json` của dự án mục tiêu:
102
- ```json
103
- "scripts": {
104
- "qa:verify": "synapse-hub verify",
105
- "qa:analyze": "synapse-hub analyze"
106
- }
112
+ ---
113
+
114
+ ### 🥈 Cách 2: Tối Ưu Cho Antigravity — Cài Đặt 1 Lần Thành "Global Plugin"
115
+ *Cài đặt 1 lần duy nhất: Kể từ đó **BẤT KỲ DỰ ÁN NÀO** mở trên Google Antigravity cũng tự động có sẵn toàn bộ 28 Skills và 6 Subagents mà không cần cấu hình thêm.*
116
+
117
+ #### Bước cài đặt 1-Click:
118
+ ```powershell
119
+ # Trên Windows PowerShell:
120
+ ./scripts/install_global_plugin.ps1
121
+
122
+ # Trên macOS / Linux:
123
+ ./scripts/install_global_plugin.sh
107
124
  ```
108
125
 
109
- #### 3. Cài đặt toàn cục (Global CLI):
110
- Để sử dụng công cụ ở bất cứ đâu trên máy tính:
126
+ *(Hoặc nếu chưa clone repo, chỉ cần clone thẳng vào thư mục plugin của Antigravity):*
111
127
  ```bash
112
- npm install -g synapse-hub
113
-
114
- # Sử dụng trực tiếp:
115
- synapse-hub verify
116
- synapse setup
128
+ git clone https://github.com/TeeVee998/Synapse-Hub.git "$HOME/.gemini/config/plugins/synapse-hub"
117
129
  ```
118
130
 
119
- ### Cách B: Mở phiên làm việc đa thư mục (Multi-Root Workspace)
120
- Trong IDE (Google Antigravity / VS Code / Cursor):
121
- 1. Mở thư mục dự án mục tiêu của bạn.
122
- 2. Thêm thư mục `Synapse-Hub` vào Workspace (`File` -> `Add Folder to Workspace...`).
123
-
124
- ### Bước 2: Khởi tạo hướng dẫn dự án (`PROJECT_AI_GUIDE.md`)
125
- Copy file mẫu từ `templates/PROJECT_AI_GUIDE_TEMPLATE.md` vào thư mục gốc của dự án mục tiêu, đổi tên thành `PROJECT_AI_GUIDE.md` và điền thông tin cụ thể:
126
- - URL môi trường test/staging.
127
- - Tài khoản và cơ chế đăng nhập.
128
- - Cấu trúc thư mục mã nguồn.
129
- - Lệnh chạy test headless và công nghệ sử dụng.
130
- - **Dữ liệu tra cứu nhanh:** Khai báo đường dẫn `testcases.json` và `selectors.json` (hoặc đặt biến môi trường `TC_DATA_FILE` / `XPATH_DATA_FILE`) để công cụ `tools/lookup_tc.py` và `tools/lookup_xpath.py` nạp đúng dữ liệu của dự án.
131
-
132
- ### Bước 3: Cài đặt tự động (One-Click Bootstrap)
133
- Chạy script cài đặt môi trường và phụ thuộc:
131
+ **Sau khi cài đặt:**
132
+ - Mở Google Antigravity lên, bạn sẽ thấy `synapse-hub` xuất hiện trong danh mục Plugins toàn cục.
133
+ - Mở bất kỳ thư mục dự án nào, AI Agent cũng tự động nắm bắt toàn bộ năng lực kiểm thử của Synapse-Hub!
134
+
135
+ ---
136
+
137
+ ### 🥉 Cách 3: Truyền Thống — Mở Multi-Root Workspace trong IDE
138
+ *Dành cho Core Developers muốn chỉnh sửa, mở rộng hoặc đóng góp phát triển thêm Skills/Tools cho Synapse-Hub.*
139
+
140
+ 1. Mở IDE (Google Antigravity / Cursor / VS Code).
141
+ 2. Mở thư mục dự án mục tiêu của bạn (`File -> Open Folder`).
142
+ 3. Thêm thư mục `Synapse-Hub` vào Workspace (`File -> Add Folder to Workspace...`).
143
+ 4. Chạy script bootstrap môi trường nội bộ:
134
144
  ```powershell
135
145
  # Windows PowerShell
136
146
  ./scripts/install.ps1
@@ -138,15 +148,6 @@ Chạy script cài đặt môi trường và phụ thuộc:
138
148
  # Linux / macOS
139
149
  ./scripts/setup.sh
140
150
  ```
141
- Script bootstrap sẽ tự động thiết lập `.venv`, cài dependencies, chạy lint kiểm tra 30 skills, và **khởi tạo nạp seed giải pháp ban đầu** cho SQLite Central Agent Memory (`~/.agent_memory/global_cache.db`).
142
-
143
- > 💡 **Khởi tạo SQLite Memory trên CI/CD & Docker sạch:**
144
- > Trên agent runner CI hoặc container Docker mới tinh, chạy lệnh sau để cấp quyền và khởi tạo bộ nhớ 0-token:
145
- > ```bash
146
- > agent-qa heal init
147
- > # hoặc chạy trực tiếp:
148
- > python tools/cache_resolver.py init
149
- > ```
150
151
 
151
152
  ---
152
153
 
@@ -161,11 +162,11 @@ Hub phân chia năng lực rõ ràng cho 6 vai trò Agent, mỗi Agent được
161
162
  | **`pom-crafter`** | Kỹ sư Clean POM, kiểm tra API drift, sinh test từ User Story. | `clean-pom-crafter`, `lam-script-generator`, `synthetic-test-data-generator`, `api-spec-to-e2e-matrix`, `file-and-report-validator`, `db-state-verifier-and-seeder` | `tools/generate_tc_from_story.py`, `tools/generate_api_matrix.py`, `tools/api_drift_sentinel.py`, `tools/repo_map.py` |
162
163
  | **`test-runner`** | Quản lý chạy test headless CLI, chia tải thời gian chạy trên CI. | `katalon-cli-runner`, `e2e-testing-patterns`, `bats-testing-patterns`, `auth-session-and-cookie-manager`, `flaky-test-sentinel-and-quarantine` | `tools/matrix_sharder.py`, `tools/distill_log.py`, `tools/pinpoint_failure.py`, `tools/flaky_detector.py` |
163
164
  | **`failure-analyst`**| Tự động chẩn đoán lỗi, tính điểm tin cậy & tự tạo PR đối soát. | `failure-autopsy-and-healing`, `self-healing-locator`, `file-and-report-validator` | `tools/auto_heal.py`, `tools/heal_pr_automator.py`, `tools/pinpoint_failure.py`, `tools/cache_resolver.py` |
164
- | **`quality-gatekeeper`**| Gác cổng chất lượng 7 Gates DoD, quét Fake-Pass, bơm mutant. | `antigravity-test-sentinel`, `code-refactoring-refactor-clean`, `wcag-audit-patterns`, `web-vitals-and-performance-profiler`, `db-state-verifier-and-seeder`, `security-dast-sentinel` | `tools/verify_all.py`, `tools/infer_linter.py`, `tools/micro_mutator.py`, `tools/trace_data_flow.py`, `tools/wcag_audit.py`, `tools/lint_ai_docs.py` |
165
+ | **`quality-gatekeeper`**| Gác cổng chất lượng 7 Gates DoD, quét Fake-Pass, bơm mutant. | `antigravity-test-sentinel`, `code-refactoring-refactor-clean`, `wcag-audit-patterns`, `web-vitals-and-performance-profiler`, `db-state-verifier-and-seeder`, `security-dast-sentinel`, `skillspector-security-guard` | `tools/verify_all.py`, `tools/infer_linter.py`, `tools/micro_mutator.py`, `tools/trace_data_flow.py`, `tools/wcag_audit.py`, `tools/lint_ai_docs.py`, `tools/skillspector.py` |
165
166
 
166
167
  ---
167
168
 
168
- ## 📦 4. Danh Mục 27 Kỹ Năng Chuẩn Hóa (.agents/skills/)
169
+ ## 📦 4. Danh Mục 28 Kỹ Năng Chuẩn Hóa (.agents/skills/)
169
170
 
170
171
  | STT | Tên Kỹ Năng (Skill) | Phạm Vi Hoạt Động Cốt Lõi |
171
172
  |:---:|---|---|
@@ -196,6 +197,7 @@ Hub phân chia năng lực rõ ràng cho 6 vai trò Agent, mỗi Agent được
196
197
  | 25 | `visual-regression-sentinel` | So sánh giao diện mức pixel và SSIM, hỗ trợ dynamic masking chống flaky test. |
197
198
  | 26 | `wcag-audit-patterns` | Kiểm toán tiếp cận web WCAG 2.2 Level A/AA tự động qua AST và `@axe-core`. |
198
199
  | 27 | `web-vitals-and-performance-profiler` | Đo lường Core Web Vitals (LCP, CLS, TTFB) và giám sát API endpoint chậm qua CDP. |
200
+ | 28 | `skillspector-security-guard` | Kiểm toán bảo mật AI Agent skills & MCP configs với 71 vector lỗ hổng (Prompt Injection, Data Exfiltration, Privilege Escalation) theo chuẩn NVIDIA SkillSpector. |
199
201
 
200
202
  ---
201
203
 
@@ -215,7 +217,18 @@ Hub phân chia năng lực rõ ràng cho 6 vai trò Agent, mỗi Agent được
215
217
 
216
218
  Chi tiết đầy đủ xem tại [tools/TOOLS_RUNBOOK.md](tools/TOOLS_RUNBOOK.md):
217
219
 
218
- - `tools/verify_all.py`: Cổng thẩm định 7 Gates DoD (UTF-8, No XPaths, UniqueCode, Clean POM).
220
+ - `tools/verify_all.py`: Cổng thẩm định 8 Gates DoD (UTF-8, No XPaths, UniqueCode, Clean POM, AST Mutation).
221
+ - `tools/generate_jmx_plan.py`: Sinh kịch bản Apache JMeter 5.x (.jmx) đa giao thức (HTTP, JDBC, WS, gRPC, Kafka) kèm Traffic Shaping Pareto.
222
+ - `tools/jtl_analyzer.py`: Phân tích kết quả JTL, kiểm soát SLA percentiles ($P_{90}, P_{95}, P_{99}$) và làm Quality Gate CI/CD.
223
+ - `tools/telemetry_correlator.py`: Phân tích tương quan Pearson giữa Client Latency và Server APM (CPU, RAM, DB Pool).
224
+ - `tools/export_postman_collection.py`: Xuất Postman Collection v2.1 với AJV JSON Schema, DDT, và Zero-Input synthesis.
225
+ - `tools/newman_analyzer.py`: Phân tích kết quả Newman, triage lỗi assertion và làm Quality Gate cho API.
226
+ - `tools/api_fuzzer.py`: Autonomous API Fuzzer phát hiện lỗi HTTP 500, rò rỉ stacktrace DB và vi phạm SLA độ trễ.
227
+ - `tools/api_drift_sentinel.py`: Bắt breaking change giữa các phiên bản OpenAPI / Swagger specifications.
228
+ - `tools/auto_heal.py`: Tự phục hồi locator gãy dựa trên AOM diffing mà không cần chạy lại toàn bộ test suite.
229
+ - `tools/flaky_detector.py`: Phát hiện kiểm thử chập chờn (Flaky tests) và quản lý vòng đời cách ly Quarantine.
230
+ - `tools/skillspector.py`: Quét kiểm toán an ninh AI Agent Skills & MCP (71 vectors theo chuẩn NVIDIA SkillSpector).
231
+ - `tools/omni_transpiler.py`: Chuyển đổi mã kiểm thử 0-token đa ngôn ngữ (Playwright TS/Python, Java, Groovy, Cypress).
219
232
  - `tools/infer_linter.py`: Phân tích tĩnh AST phát hiện fake-pass (0 assertion) và khối try-catch nuốt lỗi.
220
233
  - `tools/test_impact.py`: Phân tích git diff và khoanh vùng chính xác test cases bị ảnh hưởng.
221
234
  - `tools/cache_resolver.py`: Quản lý bộ nhớ đệm lỗi SQLite trung tâm (`~/.agent_memory/global_cache.db`).
@@ -228,7 +241,7 @@ Chi tiết đầy đủ xem tại [tools/TOOLS_RUNBOOK.md](tools/TOOLS_RUNBOOK.m
228
241
  - `tools/generate_tc_from_story.py`: Large Action Model parser sinh khung Clean POM từ User Story.
229
242
  - `tools/trace_data_flow.py`: Kiểm tra luồng dữ liệu kiểm thử, phát hiện rác dữ liệu DB (Orphan Data).
230
243
  - `scripts/install.ps1` & `scripts/setup.sh`: Script cài đặt 1-click tự động khởi tạo môi trường Hub.
231
- - `scripts/lint_skills.ps1`: Linter kiểm tra tính toàn vẹn 30 skills và metadata manifest.
244
+ - `scripts/lint_skills.ps1`: Linter kiểm tra tính toàn vẹn 28 skills và metadata manifest.
232
245
  - `pyproject.toml` & `tools/cli.py`: Đóng gói chuẩn PEP 621 cho lệnh CLI toàn cầu `agent-qa`.
233
246
 
234
247
  ---
@@ -268,13 +281,26 @@ Dự án **Synapse Hub** được tổng hợp, kế thừa và phát triển d
268
281
 
269
282
  ---
270
283
 
284
+ ## 📄 9. Bản Quyền & Điều Khoản Sử Dụng (License & Attribution)
285
+
286
+ Dự án được phân phối chính thức dưới giấy phép **[MIT License](LICENSE)**.
287
+
288
+ **Quyền sở hữu tác giả & Xuất xứ (Provenance):**
289
+ - **Tác giả & Nhà sáng lập:** Thế Vị ([@TeeVee998](https://github.com/TeeVee998))
290
+ - **Mã nguồn gốc:** [https://github.com/TeeVee998/Synapse-Hub](https://github.com/TeeVee998/Synapse-Hub)
291
+ - **Bản quyền:** Copyright © 2026 Thế Vị (@TeeVee998). All rights reserved.
292
+
293
+ > ⚖️ **Quy định bản quyền quốc tế & MIT:** Bạn được toàn quyền sử dụng, sửa đổi, tích hợp và phân phối lại mã nguồn này cho bất kỳ mục đích cá nhân hay thương mại nào, **VỚI ĐIỀU KIỆN** thông báo bản quyền gốc ghi nhận tác giả **Thế Vị (@TeeVee998)** cùng liên kết mã nguồn gốc phải được giữ nguyên vẹn trong toàn bộ bản sao hoặc các phần phái sinh quan trọng của phần mềm. Mọi hành vi xóa bỏ tên tác giả khỏi dự án đều cấu thành hành vi vi phạm điều khoản giấy phép MIT.
294
+
295
+ ---
296
+
271
297
  # 🌐 English Edition
272
298
 
273
299
  # 🧠 Synapse Hub — AI Agent Intelligence Core & Skill Network
274
300
 
275
301
  > **The shared intelligence core and autonomous skill hub empowering AI coding assistants (Google Antigravity / Cursor / Windsurf / Claude Code) across automated testing suites.**
276
302
  > **Author:** Thế Vị ([@TeeVee998](https://github.com/TeeVee998))
277
- > **Hub Version:** `v2.1.1` (Semantic Versioning) | **Integrity Index:** 27 Skills, 6 Agent Swarm Roles, 7 Core Rules, 20+ Python Tools.
303
+ > **Hub Version:** `v2.2.1` (Semantic Versioning) | **Integrity Index:** 28 Skills, 6 Agent Swarm Roles, 7 Core Rules, 20+ Python Tools.
278
304
 
279
305
  ---
280
306
 
@@ -284,8 +310,8 @@ Dự án **Synapse Hub** được tổng hợp, kế thừa và phát triển d
284
310
 
285
311
  ```mermaid
286
312
  flowchart TD
287
- subgraph Hub["🧠 Synapse Hub (Intelligence Core v2.1.1)"]
288
- Skills[".agents/skills/ (27 Skills)"]
313
+ subgraph Hub["🧠 Synapse Hub (Intelligence Core v2.2.1)"]
314
+ Skills[".agents/skills/ (28 Skills)"]
289
315
  Agents[".agents/agents/ (6 Specialized Roles)"]
290
316
  Rules[".agents/rules/ (7 Core Rules)"]
291
317
  Tools["tools/ (20+ Universal Python Tools)"]
@@ -338,21 +364,37 @@ flowchart TD
338
364
 
339
365
  ---
340
366
 
341
- ## 🚀 2. Getting Started & Usage (NPM / npx & Workspace Mount)
367
+ ## 🚀 2. Getting Started & Integration (3 Approaches)
342
368
 
343
369
  [![npm version](https://img.shields.io/npm/v/synapse-hub.svg?style=flat-square&color=blue)](https://www.npmjs.com/package/synapse-hub)
344
- [![npm downloads](https://img.shields.io/npm/dm/synapse-hub.svg?style=flat-square)](https://www.npmjs.com/package/synapse-hub)
345
- [![license](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](https://github.com/TeeVee998/Synapse-Hub/blob/main/package.json)
370
+ [![node version](https://img.shields.io/badge/node-%3E%3D16.0.0-brightgreen.svg?style=flat-square)](https://nodejs.org)
371
+ [![license](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](https://github.com/TeeVee998/Synapse-Hub/blob/main/LICENSE)
372
+
373
+ ---
346
374
 
347
- ### Method A: Instant Execution via NPM Registry (Recommended)
348
- The package is officially published at **[npmjs.com/package/synapse-hub](https://www.npmjs.com/package/synapse-hub)**. Execute directly without cloning:
375
+ ### ⚡ Instant All-in-One Setup: Single NPX Command (Zero-Clone 🚀)
376
+ *All-in-one execution: **NO git cloning**, **NO multi-root workspace setup**, configures the target project **AND automatically injects into Antigravity Global Plugin**.*
349
377
 
350
- #### 1. Zero-Install Execution (`npx`):
351
- Run from any target project directory:
378
+ Run directly from your **target automation project root**:
352
379
  ```bash
353
- # 1-Click Project Bootstrap (generates PROJECT_AI_GUIDE.md, installs pre-push hook, extracts AST repo map)
354
380
  npx synapse-hub setup
355
-
381
+ ```
382
+ 👉 **This single command automatically completes everything in 5 seconds:**
383
+ 1. 🧠 **Injects Antigravity Global Plugin:** Deploys Synapse-Hub into `~/.gemini/config/plugins/synapse-hub`. From this moment on, **ALL projects** opened in Google Antigravity automatically inherit all 28 Skills and 6 Subagent profiles!
384
+ 2. 🌐 **Universal AI Bridges Deployment:** Automatically generates tailored configuration rules for all leading AI IDEs and assistants:
385
+ - 🖱️ **Cursor:** `.cursor/rules/synapse-qa.mdc`
386
+ - 🤖 **Claude Code:** `CLAUDE.md`
387
+ - 🐙 **GitHub Copilot:** `.github/copilot-instructions.md`
388
+ - 🏄 **Windsurf (Cascade):** `.windsurfrules`
389
+ *(Empowers team members across Antigravity, Cursor, Claude Code, Copilot, or Windsurf to enforce the exact same Clean POM architecture, Truth Anchor, and 8 Quality Gates DoD!)*
390
+ 3. 🔍 **Tech Stack Detection:** Auto-detects Playwright TypeScript/JS, Katalon Groovy, Cypress, or Pytest.
391
+ 4. 📋 **Project AI Guide Synthesis:** Generates `PROJECT_AI_GUIDE.md` so AI assistants strictly adhere to project workflows.
392
+ 5. 🛡️ **Zero-Leakage Git Pre-Push Hook:** Installs `.git/hooks/pre-push` invoking `npx synapse-hub verify` before any git push.
393
+ 6. 💾 **Central Agent Memory Initialization:** Seeds offline SQLite healing memory at `~/.agent_memory/global_cache.db` (0 token cost).
394
+ 7. 🗺️ **AST Architecture Mapping:** Scans project methods and exports condensed context map (`repo_map.txt`).
395
+
396
+ Run verification anytime:
397
+ ```bash
356
398
  # Run 8 Quality Gates DoD Verification
357
399
  npx synapse-hub verify
358
400
 
@@ -362,45 +404,39 @@ npx synapse-hub analyze
362
404
  # Static Defect & Fake-Pass Sentinel scan
363
405
  npx synapse-hub lint
364
406
  ```
365
- > 💡 **Tip:** You can also use the shorthand alias: `npx synapse setup` or `npx synapse verify`.
366
407
 
367
- #### 2. Project-Local Installation (DevDependency):
368
- ```bash
369
- npm install -D synapse-hub
370
- ```
371
- Configure custom lifecycle scripts in your target project's `package.json`:
372
- ```json
373
- "scripts": {
374
- "qa:verify": "synapse-hub verify",
375
- "qa:analyze": "synapse-hub analyze"
376
- }
408
+ ---
409
+
410
+ ### 🥈 Method 2: Antigravity-Native — Install Once as Global Plugin
411
+ *Install once: From that moment onward, **ANY project** opened in Google Antigravity automatically inherits all 28 Skills and 6 Subagent Swarm profiles.*
412
+
413
+ #### 1-Click Plugin Installation:
414
+ ```powershell
415
+ # On Windows PowerShell:
416
+ ./scripts/install_global_plugin.ps1
417
+
418
+ # On macOS / Linux:
419
+ ./scripts/install_global_plugin.sh
377
420
  ```
378
421
 
379
- #### 3. Global CLI Installation:
380
- To use `synapse-hub` anywhere on your terminal:
422
+ *(Or clone directly into Antigravity's Global Plugins folder):*
381
423
  ```bash
382
- npm install -g synapse-hub
383
-
384
- # Direct invocation:
385
- synapse-hub verify
386
- synapse setup
424
+ git clone https://github.com/TeeVee998/Synapse-Hub.git "$HOME/.gemini/config/plugins/synapse-hub"
387
425
  ```
388
426
 
389
- ### Method B: Multi-Root Workspace Mounting
390
- Within your AI IDE (Google Antigravity / VS Code / Cursor):
391
- 1. Open your target project folder.
392
- 2. Add the `Synapse-Hub` directory to your workspace (`File` -> `Add Folder to Workspace...`).
393
-
394
- ### Step 2: Initialize Project AI Guide (`PROJECT_AI_GUIDE.md`)
395
- Copy `templates/PROJECT_AI_GUIDE_TEMPLATE.md` to target project root, rename to `PROJECT_AI_GUIDE.md`, and configure:
396
- - Test/staging environment URLs.
397
- - Credentials and authentication strategies.
398
- - Source code directory structure.
399
- - Headless execution commands and technology stack.
400
- - **Fast-Lookup Registers:** Point `testcases.json` and `selectors.json` (or set `TC_DATA_FILE` / `XPATH_DATA_FILE` env vars) for instant zero-token query via `tools/lookup_tc.py` and `tools/lookup_xpath.py`.
401
-
402
- ### Step 3: One-Click Environment Bootstrap
403
- Execute the automated bootstrap script:
427
+ **Result:**
428
+ - Google Antigravity registers `synapse-hub` globally.
429
+ - Every workspace session automatically loads the complete QA intelligence core without manual workspace mounts!
430
+
431
+ ---
432
+
433
+ ### 🥉 Method 3: Multi-Root Workspace Mounting
434
+ *For Core Developers looking to extend, customize, or contribute new Skills and Tools directly to Synapse-Hub.*
435
+
436
+ 1. Open your AI IDE (Google Antigravity / Cursor / VS Code).
437
+ 2. Open your target test project (`File -> Open Folder`).
438
+ 3. Add `Synapse-Hub` to your workspace (`File -> Add Folder to Workspace...`).
439
+ 4. Run the local environment bootstrap script:
404
440
  ```powershell
405
441
  # Windows PowerShell
406
442
  ./scripts/install.ps1
@@ -431,11 +467,11 @@ Synapse Hub clearly partitions capabilities across 6 specialized AI roles, pre-c
431
467
  | **`pom-crafter`** | Clean POM engineer, API drift detection, User Story to test generation. | `clean-pom-crafter`, `lam-script-generator`, `synthetic-test-data-generator`, `api-spec-to-e2e-matrix`, `file-and-report-validator`, `db-state-verifier-and-seeder` | `tools/generate_tc_from_story.py`, `tools/generate_api_matrix.py`, `tools/api_drift_sentinel.py`, `tools/repo_map.py` |
432
468
  | **`test-runner`** | Headless CLI suite manager, CI parallel sharding and log distillation. | `katalon-cli-runner`, `e2e-testing-patterns`, `bats-testing-patterns`, `auth-session-and-cookie-manager`, `flaky-test-sentinel-and-quarantine` | `tools/matrix_sharder.py`, `tools/distill_log.py`, `tools/pinpoint_failure.py`, `tools/flaky_detector.py` |
433
469
  | **`failure-analyst`**| Automated closed-loop failure triage, MTTR scoring, self-healing PR drafting. | `failure-autopsy-and-healing`, `self-healing-locator`, `file-and-report-validator` | `tools/auto_heal.py`, `tools/heal_pr_automator.py`, `tools/pinpoint_failure.py`, `tools/cache_resolver.py` |
434
- | **`quality-gatekeeper`**| Enforces 8 Quality Gates DoD, scans fake passes, runs AST mutation testing. | `antigravity-test-sentinel`, `code-refactoring-refactor-clean`, `wcag-audit-patterns`, `web-vitals-and-performance-profiler`, `db-state-verifier-and-seeder`, `security-dast-sentinel` | `tools/verify_all.py`, `tools/infer_linter.py`, `tools/micro_mutator.py`, `tools/trace_data_flow.py`, `tools/wcag_audit.py`, `tools/lint_ai_docs.py` |
470
+ | **`quality-gatekeeper`**| Enforces 8 Quality Gates DoD, scans fake passes, runs AST mutation testing. | `antigravity-test-sentinel`, `code-refactoring-refactor-clean`, `wcag-audit-patterns`, `web-vitals-and-performance-profiler`, `db-state-verifier-and-seeder`, `security-dast-sentinel`, `skillspector-security-guard` | `tools/verify_all.py`, `tools/infer_linter.py`, `tools/micro_mutator.py`, `tools/trace_data_flow.py`, `tools/wcag_audit.py`, `tools/lint_ai_docs.py`, `tools/skillspector.py` |
435
471
 
436
472
  ---
437
473
 
438
- ## 📦 4. Standardized 27 Skills Catalog (.agents/skills/)
474
+ ## 📦 4. Standardized 28 Skills Catalog (.agents/skills/)
439
475
 
440
476
  | # | Skill Name | Core Operational Scope |
441
477
  |:---:|---|---|
@@ -466,6 +502,7 @@ Synapse Hub clearly partitions capabilities across 6 specialized AI roles, pre-c
466
502
  | 25 | `visual-regression-sentinel` | Pixel-level and SSIM visual regression testing with dynamic masking. |
467
503
  | 26 | `wcag-audit-patterns` | Automated WCAG 2.2 Level A/AA accessibility auditing via AST and `@axe-core`. |
468
504
  | 27 | `web-vitals-and-performance-profiler` | Core Web Vitals (LCP, CLS, TTFB) profiling and slow API endpoint detection via CDP. |
505
+ | 28 | `skillspector-security-guard` | AI agent skill & MCP config security auditing against 71 vulnerability vectors (Prompt Injection, Data Exfiltration, Privilege Escalation) powered by NVIDIA SkillSpector spec. |
469
506
 
470
507
  ---
471
508
 
@@ -485,7 +522,18 @@ Synapse Hub clearly partitions capabilities across 6 specialized AI roles, pre-c
485
522
 
486
523
  For full details, refer to [tools/TOOLS_RUNBOOK.md](tools/TOOLS_RUNBOOK.md):
487
524
 
488
- - `tools/verify_all.py`: 8 Quality Gates DoD verification (UTF-8, No XPaths, UniqueCode, Clean POM).
525
+ - `tools/verify_all.py`: 8 Quality Gates DoD verification (UTF-8, No XPaths, UniqueCode, Clean POM, AST Mutation).
526
+ - `tools/generate_jmx_plan.py`: Multi-protocol Apache JMeter 5.x (.jmx) plan generator (HTTP, JDBC, WS, gRPC, Kafka) with Pareto traffic shaping.
527
+ - `tools/jtl_analyzer.py`: JTL execution metrics analyzer, P95/P99 SLA gatekeeper, and CI/CD Quality Gate enforcer.
528
+ - `tools/telemetry_correlator.py`: Full-stack Pearson correlation analyzer between client-side latency and server APM (CPU, RAM, DB Pool).
529
+ - `tools/export_postman_collection.py`: Exports Postman Collections v2.1 with native AJV JSON Schema, DDT CSV, and Zero-Input domain synthesis.
530
+ - `tools/newman_analyzer.py`: Newman automated test results analyzer, assertion failure triage, and CI/CD Quality Gate.
531
+ - `tools/api_fuzzer.py`: Autonomous API fuzzer detecting HTTP 500 crashes, database stacktrace leaks, and latency SLA breaches.
532
+ - `tools/api_drift_sentinel.py`: Contract drift detector comparing OpenAPI/Swagger specifications for breaking changes.
533
+ - `tools/auto_heal.py`: In-place locator self-healing engine correlating JUnit XML and screenshots via AOM diffing.
534
+ - `tools/flaky_detector.py`: Flaky test detector and automated quarantine lifecycle manager.
535
+ - `tools/skillspector.py`: AI Agent Skill & MCP Security Sentinel (71 detection vectors, Prohibition Context Engine, SARIF/JSON reporting).
536
+ - `tools/omni_transpiler.py`: 0-token polyglot test transpiler (Playwright TS/Python, Java, Groovy, Cypress).
489
537
  - `tools/infer_linter.py`: Static AST analysis detecting fake passes (zero asserts) and empty catch blocks.
490
538
  - `tools/test_impact.py`: Scopes affected test cases based on git diffs.
491
539
  - `tools/cache_resolver.py`: Manages the central SQLite error memory cache (`~/.agent_memory/global_cache.db`).
@@ -515,6 +563,7 @@ pip install -e .
515
563
  agent-qa --help
516
564
  agent-qa verify
517
565
  agent-qa lint
566
+ agent-qa skillspector
518
567
  ```
519
568
 
520
569
  ---
@@ -525,6 +574,7 @@ agent-qa lint
525
574
 
526
575
  | Project & Author | Architectural Inspiration in Synapse Hub |
527
576
  | :--- | :--- |
577
+ | **[NVIDIA/SkillSpector](https://github.com/NVIDIA/SkillSpector)** *(NVIDIA AI Security Team)* | AI Agent skill & MCP security vetting engine (`tools/skillspector.py`, Skill #28 `skillspector-security-guard`) featuring 71 vulnerability vectors across 17 categories and the Prohibition Context Engine. |
528
578
  | **[muratcankoylan/Agent-Skills-for-Context-Engineering](https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering)** | Context Engineering foundations, observation masking, and LLM attention budget optimization. |
529
579
  | **[alexgreensh/token-optimizer](https://github.com/alexgreensh/token-optimizer)** | Token-efficient reasoning, 95% log distillation, and KV-cache serialization protocols. |
530
580
  | **[obra/superpowers](https://github.com/obra/superpowers)** *(Jesse Vincent)* | Systematic evidence-based debugging, cognitive forcing functions, and Red-Team vs Blue-Team verification. |
@@ -536,3 +586,17 @@ agent-qa lint
536
586
  | **[bats-core/bats-core](https://github.com/bats-core/bats-core)** | Bash Automated Testing System patterns for CI/CD pipelines and cross-platform CLI verification. |
537
587
  | **[npryce/adr-tools](https://github.com/npryce/adr-tools)** | Architecture Decision Record (ADR) conventions and lifecycle workflows. |
538
588
 
589
+ ---
590
+
591
+ ## 📄 9. License & Author Attribution
592
+
593
+ This project is licensed under the **[MIT License](LICENSE)**.
594
+
595
+ **Provenance & Copyright Notice:**
596
+ - **Author & Founder:** Thế Vị ([@TeeVee998](https://github.com/TeeVee998))
597
+ - **Original Repository:** [https://github.com/TeeVee998/Synapse-Hub](https://github.com/TeeVee998/Synapse-Hub)
598
+ - **Copyright:** Copyright © 2026 Thế Vị (@TeeVee998). All rights reserved.
599
+
600
+ > ⚖️ **Mandatory Attribution Condition:** Under the terms of the MIT License, you are granted permission to use, modify, merge, publish, and distribute this software freely, **PROVIDED** that the original copyright notice crediting **Thế Vị (@TeeVee998)** and repository provenance link are preserved in all copies or substantial portions of the Software. Stripping author attribution is a violation of international copyright treaties and MIT License conditions.
601
+
602
+
package/bin/agent-qa.js CHANGED
@@ -1,4 +1,8 @@
1
1
  #!/usr/bin/env node
2
+ // SPDX-FileCopyrightText: Copyright (c) 2026 Thế Vị (@TeeVee998). All rights reserved.
3
+ // SPDX-License-Identifier: MIT
4
+ // Project: Synapse-Hub (https://github.com/TeeVee998/Synapse-Hub)
5
+
2
6
  /**
3
7
  * Enterprise Synapse-Hub NPM Launcher
4
8
  * ====================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synapse-hub",
3
- "version": "2.1.1",
3
+ "version": "2.2.1",
4
4
  "description": "Enterprise AI Agent Intelligence Hub & Autonomous Skill Network",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -25,7 +25,7 @@
25
25
  "url": "git+https://github.com/TeeVee998/Synapse-Hub.git"
26
26
  },
27
27
  "license": "MIT",
28
- "author": "AI QA Engineering Swarm <qa-swarm@enterprise.internal>",
28
+ "author": "Thế Vị (@TeeVee998) <https://github.com/TeeVee998>",
29
29
  "main": "bin/agent-qa.js",
30
30
  "bin": {
31
31
  "synapse-hub": "./bin/agent-qa.js",
@@ -38,6 +38,7 @@
38
38
  "bin",
39
39
  "tools",
40
40
  "templates",
41
+ "LICENSE",
41
42
  "README.md",
42
43
  "AGENTS.md",
43
44
  "skills_manifest.json",