synapse-hub 2.1.0 → 2.2.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 (60) 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/README.md +140 -103
  33. package/package.json +1 -1
  34. package/skills_manifest.json +42 -29
  35. package/templates/PROJECT_AI_GUIDE_TEMPLATE.md +15 -1
  36. package/templates/ai_bridges/CLAUDE.md +31 -0
  37. package/templates/ai_bridges/copilot-instructions.md +25 -0
  38. package/templates/ai_bridges/cursor_synapse_qa.mdc +26 -0
  39. package/templates/ai_bridges/windsurfrules +25 -0
  40. package/templates/ci/github-actions-synapse.yml +28 -0
  41. package/templates/ci/gitlab-ci-synapse.yml +16 -0
  42. package/tools/TOOLS_RUNBOOK.md +203 -12
  43. package/tools/browser_helpers.js +2 -2
  44. package/tools/bump_version.py +8 -0
  45. package/tools/cli.py +74 -2
  46. package/tools/export_postman_collection.py +535 -218
  47. package/tools/generate_jmx_plan.py +672 -102
  48. package/tools/git_pre_commit_guard.py +21 -0
  49. package/tools/jtl_analyzer.py +474 -0
  50. package/tools/mcp_excel_server.ps1 +1 -1
  51. package/tools/mcp_server.py +1 -1
  52. package/tools/newman_analyzer.py +385 -0
  53. package/tools/setup_project.py +203 -18
  54. package/tools/skillspector.py +1141 -0
  55. package/tools/telemetry_correlator.py +351 -0
  56. package/tools/templates/jmeter-distributed/README.md +54 -0
  57. package/tools/templates/jmeter-distributed/docker-compose.yml +83 -0
  58. package/tools/update_sentinel.py +313 -0
  59. package/tools/repo_map.json +0 -12
  60. package/tools/repo_map.txt +0 -7
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.0` | **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.0` | **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.0)"]
18
- Skills[".agents/skills/ (27 Skills)"]
17
+ subgraph Hub["🧠 Synapse Hub (Intelligence Core v2.2.0)"]
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
74
  [![npm downloads](https://img.shields.io/npm/dm/synapse-hub.svg?style=flat-square)](https://www.npmjs.com/package/synapse-hub)
75
75
  [![license](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](https://github.com/TeeVee998/Synapse-Hub/blob/main/package.json)
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
  ---
@@ -274,7 +287,7 @@ Dự án **Synapse Hub** được tổng hợp, kế thừa và phát triển d
274
287
 
275
288
  > **The shared intelligence core and autonomous skill hub empowering AI coding assistants (Google Antigravity / Cursor / Windsurf / Claude Code) across automated testing suites.**
276
289
  > **Author:** Thế Vị ([@TeeVee998](https://github.com/TeeVee998))
277
- > **Hub Version:** `v2.1.0` (Semantic Versioning) | **Integrity Index:** 27 Skills, 6 Agent Swarm Roles, 7 Core Rules, 20+ Python Tools.
290
+ > **Hub Version:** `v2.2.0` (Semantic Versioning) | **Integrity Index:** 28 Skills, 6 Agent Swarm Roles, 7 Core Rules, 20+ Python Tools.
278
291
 
279
292
  ---
280
293
 
@@ -284,8 +297,8 @@ Dự án **Synapse Hub** được tổng hợp, kế thừa và phát triển d
284
297
 
285
298
  ```mermaid
286
299
  flowchart TD
287
- subgraph Hub["🧠 Synapse Hub (Intelligence Core v2.1.0)"]
288
- Skills[".agents/skills/ (27 Skills)"]
300
+ subgraph Hub["🧠 Synapse Hub (Intelligence Core v2.2.0)"]
301
+ Skills[".agents/skills/ (28 Skills)"]
289
302
  Agents[".agents/agents/ (6 Specialized Roles)"]
290
303
  Rules[".agents/rules/ (7 Core Rules)"]
291
304
  Tools["tools/ (20+ Universal Python Tools)"]
@@ -338,21 +351,37 @@ flowchart TD
338
351
 
339
352
  ---
340
353
 
341
- ## 🚀 2. Getting Started & Usage (NPM / npx & Workspace Mount)
354
+ ## 🚀 2. Getting Started & Integration (3 Approaches)
342
355
 
343
356
  [![npm version](https://img.shields.io/npm/v/synapse-hub.svg?style=flat-square&color=blue)](https://www.npmjs.com/package/synapse-hub)
344
357
  [![npm downloads](https://img.shields.io/npm/dm/synapse-hub.svg?style=flat-square)](https://www.npmjs.com/package/synapse-hub)
345
358
  [![license](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](https://github.com/TeeVee998/Synapse-Hub/blob/main/package.json)
346
359
 
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:
360
+ ---
349
361
 
350
- #### 1. Zero-Install Execution (`npx`):
351
- Run from any target project directory:
362
+ ### ⚡ Instant All-in-One Setup: Single NPX Command (Zero-Clone 🚀)
363
+ *All-in-one execution: **NO git cloning**, **NO multi-root workspace setup**, configures the target project **AND automatically injects into Antigravity Global Plugin**.*
364
+
365
+ Run directly from your **target automation project root**:
352
366
  ```bash
353
- # 1-Click Project Bootstrap (generates PROJECT_AI_GUIDE.md, installs pre-push hook, extracts AST repo map)
354
367
  npx synapse-hub setup
355
-
368
+ ```
369
+ 👉 **This single command automatically completes everything in 5 seconds:**
370
+ 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!
371
+ 2. 🌐 **Universal AI Bridges Deployment:** Automatically generates tailored configuration rules for all leading AI IDEs and assistants:
372
+ - 🖱️ **Cursor:** `.cursor/rules/synapse-qa.mdc`
373
+ - 🤖 **Claude Code:** `CLAUDE.md`
374
+ - 🐙 **GitHub Copilot:** `.github/copilot-instructions.md`
375
+ - 🏄 **Windsurf (Cascade):** `.windsurfrules`
376
+ *(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!)*
377
+ 3. 🔍 **Tech Stack Detection:** Auto-detects Playwright TypeScript/JS, Katalon Groovy, Cypress, or Pytest.
378
+ 4. 📋 **Project AI Guide Synthesis:** Generates `PROJECT_AI_GUIDE.md` so AI assistants strictly adhere to project workflows.
379
+ 5. 🛡️ **Zero-Leakage Git Pre-Push Hook:** Installs `.git/hooks/pre-push` invoking `npx synapse-hub verify` before any git push.
380
+ 6. 💾 **Central Agent Memory Initialization:** Seeds offline SQLite healing memory at `~/.agent_memory/global_cache.db` (0 token cost).
381
+ 7. 🗺️ **AST Architecture Mapping:** Scans project methods and exports condensed context map (`repo_map.txt`).
382
+
383
+ Run verification anytime:
384
+ ```bash
356
385
  # Run 8 Quality Gates DoD Verification
357
386
  npx synapse-hub verify
358
387
 
@@ -362,45 +391,39 @@ npx synapse-hub analyze
362
391
  # Static Defect & Fake-Pass Sentinel scan
363
392
  npx synapse-hub lint
364
393
  ```
365
- > 💡 **Tip:** You can also use the shorthand alias: `npx synapse setup` or `npx synapse verify`.
366
394
 
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
- }
395
+ ---
396
+
397
+ ### 🥈 Method 2: Antigravity-Native — Install Once as Global Plugin
398
+ *Install once: From that moment onward, **ANY project** opened in Google Antigravity automatically inherits all 28 Skills and 6 Subagent Swarm profiles.*
399
+
400
+ #### 1-Click Plugin Installation:
401
+ ```powershell
402
+ # On Windows PowerShell:
403
+ ./scripts/install_global_plugin.ps1
404
+
405
+ # On macOS / Linux:
406
+ ./scripts/install_global_plugin.sh
377
407
  ```
378
408
 
379
- #### 3. Global CLI Installation:
380
- To use `synapse-hub` anywhere on your terminal:
409
+ *(Or clone directly into Antigravity's Global Plugins folder):*
381
410
  ```bash
382
- npm install -g synapse-hub
383
-
384
- # Direct invocation:
385
- synapse-hub verify
386
- synapse setup
411
+ git clone https://github.com/TeeVee998/Synapse-Hub.git "$HOME/.gemini/config/plugins/synapse-hub"
387
412
  ```
388
413
 
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:
414
+ **Result:**
415
+ - Google Antigravity registers `synapse-hub` globally.
416
+ - Every workspace session automatically loads the complete QA intelligence core without manual workspace mounts!
417
+
418
+ ---
419
+
420
+ ### 🥉 Method 3: Multi-Root Workspace Mounting
421
+ *For Core Developers looking to extend, customize, or contribute new Skills and Tools directly to Synapse-Hub.*
422
+
423
+ 1. Open your AI IDE (Google Antigravity / Cursor / VS Code).
424
+ 2. Open your target test project (`File -> Open Folder`).
425
+ 3. Add `Synapse-Hub` to your workspace (`File -> Add Folder to Workspace...`).
426
+ 4. Run the local environment bootstrap script:
404
427
  ```powershell
405
428
  # Windows PowerShell
406
429
  ./scripts/install.ps1
@@ -431,11 +454,11 @@ Synapse Hub clearly partitions capabilities across 6 specialized AI roles, pre-c
431
454
  | **`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
455
  | **`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
456
  | **`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` |
457
+ | **`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
458
 
436
459
  ---
437
460
 
438
- ## 📦 4. Standardized 27 Skills Catalog (.agents/skills/)
461
+ ## 📦 4. Standardized 28 Skills Catalog (.agents/skills/)
439
462
 
440
463
  | # | Skill Name | Core Operational Scope |
441
464
  |:---:|---|---|
@@ -466,6 +489,7 @@ Synapse Hub clearly partitions capabilities across 6 specialized AI roles, pre-c
466
489
  | 25 | `visual-regression-sentinel` | Pixel-level and SSIM visual regression testing with dynamic masking. |
467
490
  | 26 | `wcag-audit-patterns` | Automated WCAG 2.2 Level A/AA accessibility auditing via AST and `@axe-core`. |
468
491
  | 27 | `web-vitals-and-performance-profiler` | Core Web Vitals (LCP, CLS, TTFB) profiling and slow API endpoint detection via CDP. |
492
+ | 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
493
 
470
494
  ---
471
495
 
@@ -485,7 +509,18 @@ Synapse Hub clearly partitions capabilities across 6 specialized AI roles, pre-c
485
509
 
486
510
  For full details, refer to [tools/TOOLS_RUNBOOK.md](tools/TOOLS_RUNBOOK.md):
487
511
 
488
- - `tools/verify_all.py`: 8 Quality Gates DoD verification (UTF-8, No XPaths, UniqueCode, Clean POM).
512
+ - `tools/verify_all.py`: 8 Quality Gates DoD verification (UTF-8, No XPaths, UniqueCode, Clean POM, AST Mutation).
513
+ - `tools/generate_jmx_plan.py`: Multi-protocol Apache JMeter 5.x (.jmx) plan generator (HTTP, JDBC, WS, gRPC, Kafka) with Pareto traffic shaping.
514
+ - `tools/jtl_analyzer.py`: JTL execution metrics analyzer, P95/P99 SLA gatekeeper, and CI/CD Quality Gate enforcer.
515
+ - `tools/telemetry_correlator.py`: Full-stack Pearson correlation analyzer between client-side latency and server APM (CPU, RAM, DB Pool).
516
+ - `tools/export_postman_collection.py`: Exports Postman Collections v2.1 with native AJV JSON Schema, DDT CSV, and Zero-Input domain synthesis.
517
+ - `tools/newman_analyzer.py`: Newman automated test results analyzer, assertion failure triage, and CI/CD Quality Gate.
518
+ - `tools/api_fuzzer.py`: Autonomous API fuzzer detecting HTTP 500 crashes, database stacktrace leaks, and latency SLA breaches.
519
+ - `tools/api_drift_sentinel.py`: Contract drift detector comparing OpenAPI/Swagger specifications for breaking changes.
520
+ - `tools/auto_heal.py`: In-place locator self-healing engine correlating JUnit XML and screenshots via AOM diffing.
521
+ - `tools/flaky_detector.py`: Flaky test detector and automated quarantine lifecycle manager.
522
+ - `tools/skillspector.py`: AI Agent Skill & MCP Security Sentinel (71 detection vectors, Prohibition Context Engine, SARIF/JSON reporting).
523
+ - `tools/omni_transpiler.py`: 0-token polyglot test transpiler (Playwright TS/Python, Java, Groovy, Cypress).
489
524
  - `tools/infer_linter.py`: Static AST analysis detecting fake passes (zero asserts) and empty catch blocks.
490
525
  - `tools/test_impact.py`: Scopes affected test cases based on git diffs.
491
526
  - `tools/cache_resolver.py`: Manages the central SQLite error memory cache (`~/.agent_memory/global_cache.db`).
@@ -515,6 +550,7 @@ pip install -e .
515
550
  agent-qa --help
516
551
  agent-qa verify
517
552
  agent-qa lint
553
+ agent-qa skillspector
518
554
  ```
519
555
 
520
556
  ---
@@ -525,6 +561,7 @@ agent-qa lint
525
561
 
526
562
  | Project & Author | Architectural Inspiration in Synapse Hub |
527
563
  | :--- | :--- |
564
+ | **[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
565
  | **[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
566
  | **[alexgreensh/token-optimizer](https://github.com/alexgreensh/token-optimizer)** | Token-efficient reasoning, 95% log distillation, and KV-cache serialization protocols. |
530
567
  | **[obra/superpowers](https://github.com/obra/superpowers)** *(Jesse Vincent)* | Systematic evidence-based debugging, cognitive forcing functions, and Red-Team vs Blue-Team verification. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synapse-hub",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "Enterprise AI Agent Intelligence Hub & Autonomous Skill Network",
5
5
  "publishConfig": {
6
6
  "access": "public"