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.
- package/.agents/agents/orchestrator.md +7 -0
- package/.agents/rules/lessons-learned.md +1 -0
- package/.agents/skills/agent-orchestration-multi-agent-optimize/SKILL.md +1 -1
- package/.agents/skills/antigravity-test-sentinel/SKILL.md +1 -2
- package/.agents/skills/api-network-mocking-interception/SKILL.md +1 -1
- package/.agents/skills/api-spec-to-e2e-matrix/SKILL.md +11 -4
- package/.agents/skills/architecture-decision-records/SKILL.md +1 -1
- package/.agents/skills/auth-session-and-cookie-manager/SKILL.md +1 -1
- package/.agents/skills/backend-load-and-stress-patterns/SKILL.md +32 -11
- package/.agents/skills/bats-testing-patterns/SKILL.md +1 -1
- package/.agents/skills/clean-pom-crafter/SKILL.md +1 -4
- package/.agents/skills/code-refactoring-refactor-clean/SKILL.md +1 -1
- package/.agents/skills/db-state-verifier-and-seeder/SKILL.md +1 -1
- package/.agents/skills/e2e-testing-patterns/SKILL.md +1 -1
- package/.agents/skills/failure-autopsy-and-healing/SKILL.md +1 -3
- package/.agents/skills/file-and-report-validator/SKILL.md +1 -1
- package/.agents/skills/flaky-test-sentinel-and-quarantine/SKILL.md +1 -1
- package/.agents/skills/github-actions-templates/SKILL.md +1 -1
- package/.agents/skills/graphify-impact-analyzer/SKILL.md +1 -3
- package/.agents/skills/katalon-cli-runner/SKILL.md +1 -1
- package/.agents/skills/lam-script-generator/SKILL.md +1 -2
- package/.agents/skills/playwright-live-interaction/SKILL.md +1 -4
- package/.agents/skills/security-dast-sentinel/SKILL.md +1 -1
- package/.agents/skills/self-healing-locator/SKILL.md +1 -2
- package/.agents/skills/skillspector-security-guard/SKILL.md +115 -0
- package/.agents/skills/synthetic-test-data-generator/SKILL.md +1 -1
- package/.agents/skills/token-and-context-optimizer/SKILL.md +1 -1
- package/.agents/skills/visual-regression-sentinel/SKILL.md +1 -1
- package/.agents/skills/wcag-audit-patterns/SKILL.md +1 -1
- package/.agents/skills/web-vitals-and-performance-profiler/SKILL.md +1 -1
- package/AGENTS.md +36 -0
- package/README.md +140 -103
- package/package.json +1 -1
- package/skills_manifest.json +42 -29
- package/templates/PROJECT_AI_GUIDE_TEMPLATE.md +15 -1
- package/templates/ai_bridges/CLAUDE.md +31 -0
- package/templates/ai_bridges/copilot-instructions.md +25 -0
- package/templates/ai_bridges/cursor_synapse_qa.mdc +26 -0
- package/templates/ai_bridges/windsurfrules +25 -0
- package/templates/ci/github-actions-synapse.yml +28 -0
- package/templates/ci/gitlab-ci-synapse.yml +16 -0
- package/tools/TOOLS_RUNBOOK.md +203 -12
- package/tools/browser_helpers.js +2 -2
- package/tools/bump_version.py +8 -0
- package/tools/cli.py +74 -2
- package/tools/export_postman_collection.py +535 -218
- package/tools/generate_jmx_plan.py +672 -102
- package/tools/git_pre_commit_guard.py +21 -0
- package/tools/jtl_analyzer.py +474 -0
- package/tools/mcp_excel_server.ps1 +1 -1
- package/tools/mcp_server.py +1 -1
- package/tools/newman_analyzer.py +385 -0
- package/tools/setup_project.py +203 -18
- package/tools/skillspector.py +1141 -0
- package/tools/telemetry_correlator.py +351 -0
- package/tools/templates/jmeter-distributed/README.md +54 -0
- package/tools/templates/jmeter-distributed/docker-compose.yml +83 -0
- package/tools/update_sentinel.py +313 -0
- package/tools/repo_map.json +0 -12
- 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.
|
|
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.
|
|
18
|
-
Skills[".agents/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.
|
|
71
|
+
## 🚀 2. Hướng Dẫn Bắt Đầu & Tích Hợp (3 Cách Dùng)
|
|
72
72
|
|
|
73
73
|
[](https://www.npmjs.com/package/synapse-hub)
|
|
74
74
|
[](https://www.npmjs.com/package/synapse-hub)
|
|
75
75
|
[](https://github.com/TeeVee998/Synapse-Hub/blob/main/package.json)
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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.
|
|
288
|
-
Skills[".agents/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 &
|
|
354
|
+
## 🚀 2. Getting Started & Integration (3 Approaches)
|
|
342
355
|
|
|
343
356
|
[](https://www.npmjs.com/package/synapse-hub)
|
|
344
357
|
[](https://www.npmjs.com/package/synapse-hub)
|
|
345
358
|
[](https://github.com/TeeVee998/Synapse-Hub/blob/main/package.json)
|
|
346
359
|
|
|
347
|
-
|
|
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
|
-
|
|
351
|
-
|
|
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
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
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
|
-
|
|
380
|
-
To use `synapse-hub` anywhere on your terminal:
|
|
409
|
+
*(Or clone directly into Antigravity's Global Plugins folder):*
|
|
381
410
|
```bash
|
|
382
|
-
|
|
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
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
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
|
|
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. |
|