antigravity-ide 4.1.22 → 4.1.26
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/.agent/rules/strict-protocol.md +47 -0
- package/README.md +45 -38
- package/README.vi.md +44 -37
- package/cli/create.js +67 -23
- package/cli/logic/gemini-generator.js +69 -0
- package/cli/logic/manifest-manager.js +4 -23
- package/cli/repair.js +1 -9
- package/package.json +3 -3
- package/.agent/scripts/automation/auto-release.js +0 -177
- package/.agent/scripts/automation/auto_preview.py +0 -174
- package/.agent/scripts/automation/translate_workflows.py +0 -88
- package/.agent/scripts/fractalize-skills.js +0 -89
- package/.agent/scripts/generate-skill-definitions.js +0 -134
- package/.agent/scripts/internal/session_manager.py +0 -156
- package/.agent/scripts/internal/simulation_install.js +0 -67
- package/.agent/scripts/internal/sync_to_global.py +0 -114
- package/.agent/scripts/internal/update-docs.js +0 -115
- package/.agent/scripts/refactor-skill-content.js +0 -127
- package/.agent/scripts/rename-skills.js +0 -96
- package/.agent/scripts/sync-skills.js +0 -112
- package/.agent/scripts/update-frontmatter-names.js +0 -99
- package/.agent/scripts/verification/audit-dna.js +0 -56
- package/.agent/scripts/verification/audit-skills.js +0 -65
- package/.agent/scripts/verification/checklist.py +0 -292
- package/.agent/scripts/verification/verify_all.py +0 -340
- package/.agent/scripts/verification/verify_shared_modules.js +0 -188
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# STRICT PROTOCOL ENFORCEMENT
|
|
2
|
+
|
|
3
|
+
> **Trigger**: ALWAYS_ON (Critical)
|
|
4
|
+
> **Priority**: HIGHEST (Overrides all standard behaviors)
|
|
5
|
+
|
|
6
|
+
## 🚫 1. ZERO-TRUST GIT POLICY (Chính Sách Git Không Tin Cậy)
|
|
7
|
+
|
|
8
|
+
**Tuyệt đối CẤM** Agent tự động thực hiện các lệnh sau nếu không có lệnh rõ ràng từ User:
|
|
9
|
+
- `git push`
|
|
10
|
+
- `git push origin <branch>`
|
|
11
|
+
- `git push --tags`
|
|
12
|
+
- `npm publish`
|
|
13
|
+
|
|
14
|
+
**Quy trình Bắt buộc:**
|
|
15
|
+
1. Agent thực hiện thay đổi code.
|
|
16
|
+
2. Agent chạy test/verify.
|
|
17
|
+
3. Agent **BÁO CÁO** kết quả và **HỎI** ý kiến User: *"Test đã qua. Bạn có muốn đẩy code không?"*
|
|
18
|
+
4. CHỈ KHI User trả lời: "ok", "push", "đẩy đi", "duyệt", v.v. -> Agent mới được chạy lệnh đẩy.
|
|
19
|
+
|
|
20
|
+
**Hậu quả:** Nếu vi phạm, Agent được coi là "Mất kiểm soát" (Rogue Agent).
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 🌐 2. DYNAMIC LANGUAGE ADHERENCE (Tuân Thủ Ngôn Ngữ Động)
|
|
25
|
+
|
|
26
|
+
Agent PHẢI đọc và tuân thủ mục **"Language Protocol"** trong file `GEMINI.md` tại thư mục gốc.
|
|
27
|
+
|
|
28
|
+
- Nếu `GEMINI.md` yêu cầu **VIETNAMESE**:
|
|
29
|
+
- Giao tiếp: 100% Tiếng Việt.
|
|
30
|
+
- Cấm: Giải thích bằng Tiếng Anh (trừ thuật ngữ kỹ thuật).
|
|
31
|
+
|
|
32
|
+
- Nếu `GEMINI.md` yêu cầu **ENGLISH**:
|
|
33
|
+
- Giao tiếp: 100% Tiếng Anh.
|
|
34
|
+
|
|
35
|
+
**Nguyên tắc**: User là người quyết định ngôn ngữ (qua `npx` setup hoặc config), Agent không được tự ý.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## 🛑 3. FAIL-SAFE MECHANISM (Cơ Chế Ngắt Khẩn Cấp)
|
|
40
|
+
|
|
41
|
+
Nếu User phát hiện Agent vi phạm 1 trong 2 điều trên, User sẽ gõ lệnh:
|
|
42
|
+
> **`/protocol-reset`**
|
|
43
|
+
|
|
44
|
+
Khi nhận lệnh này, Agent PHẢI:
|
|
45
|
+
1. Dừng ngay lập tức mọi tác vụ.
|
|
46
|
+
2. Đọc lại file này `view_file .agent/rules/strict-protocol.md`.
|
|
47
|
+
3. Xác nhận lại trạng thái tuân thủ.
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
|
|
3
3
|
# 🛰️ AntiGravity IDE
|
|
4
4
|
### *Advanced Edition • v4.1.22 Meta-Engine*
|
|
@@ -21,29 +21,29 @@
|
|
|
21
21
|
|
|
22
22
|
### 📊 System Capability Matrix
|
|
23
23
|
|
|
24
|
-
| **15** Rules | **
|
|
25
|
-
| :---: | :---: | :---: | :---: | :---: |
|
|
26
|
-
| *Governance* | *
|
|
24
|
+
| **15** Rules | **573** Skills | **2977** Patterns | **30** Flows | **17** Core Libs |
|
|
25
|
+
| :---: | :---: | :---: | :---: | :---: |
|
|
26
|
+
| *Governance* | *Operational* | *Advanced AI* | *Standardized* | *Core Libraries* |
|
|
27
27
|
|
|
28
28
|
</div>
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
32
|
-
## ⚡
|
|
32
|
+
## ⚡ Smart Installation (npx)
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
Antigravity uses a **Dual-Scope Installation Strategy** to ensure stability:
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
# Create, Update, Repair, and Sync - All in one.
|
|
39
|
-
npx antigravity-ide [project-name]
|
|
36
|
+
1. **Global Scope (Project Root)**: Installs `GEMINI.md` (Configuration).
|
|
37
|
+
2. **Workspace Scope (.agent/)**: Installs Rules, Skills, and Workflows (The Brain).
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
**Safe-Sync Protocol:**
|
|
40
|
+
- 🟢 **Missing Files**: Automatically added.
|
|
41
|
+
- 🟡 **Existing Files**: Skipped to preserve your customizations.
|
|
42
|
+
- 🔴 **Reset Force**: Use `--force` if you want to overwrite everything.
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
```bash
|
|
45
|
+
# ONE COMMAND TO RULE THEM ALL
|
|
46
|
+
npx antigravity-ide [project-name]
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
> [!TIP]
|
|
@@ -80,24 +80,21 @@ A fracture-free, standardized architecture for scalable AI development.
|
|
|
80
80
|
```text
|
|
81
81
|
your-project/
|
|
82
82
|
├── .agent/ # 🧠 THE BRAIN (Fractal Core)
|
|
83
|
-
│ ├── .shared/ # ⛩️
|
|
84
|
-
│ ├── agents/ # 🎭 Specialists (Lead, PM, Auditor)
|
|
83
|
+
│ ├── .shared/ # ⛩️ Core Library (API/DB/Security Standards)
|
|
85
84
|
│ ├── rules/ # ⚖️ Governance (Compliance, Context)
|
|
86
85
|
│ ├── skills/ # 🛠️ Mastery (573 Fractal Skills)
|
|
87
|
-
│
|
|
88
|
-
│ └── scripts/ # 🧪 Continuous Validation
|
|
86
|
+
│ └── workflows/ # 🚀 Ops (/create, /debug, /audit)
|
|
89
87
|
└── (your app) # ⚡ Your Source Code
|
|
90
88
|
```
|
|
91
89
|
|
|
92
|
-
|
|
90
|
+
> [!NOTE]
|
|
91
|
+
> **Scope Definition**:
|
|
92
|
+
> - **Global**: The CLI Tool (`npx antigravity-ide`) acts as the installer.
|
|
93
|
+
> - **Workspace**: All Rules (`.agent/rules`), Skills, and Workflows are installed **Locally** into your project. This ensures total isolation—what happens in one project stays in that project.
|
|
93
94
|
|
|
94
|
-
|
|
95
|
+
---
|
|
95
96
|
|
|
96
|
-
###
|
|
97
|
-
- **Lead Developer**: System Design & Architecture.
|
|
98
|
-
- **Security Auditor**: Real-time vulnerability scanning.
|
|
99
|
-
- **Product Manager**: Semantic task planning.
|
|
100
|
-
- *...and 19 other senior industrial personas.*
|
|
97
|
+
### 🧠 Master Ecosystem
|
|
101
98
|
|
|
102
99
|
### 🛠️ Strategic Skill Domains
|
|
103
100
|
- **High-Perf Web**: Next.js 15, React 19, Tailwind v4.
|
|
@@ -107,28 +104,38 @@ your-project/
|
|
|
107
104
|
|
|
108
105
|
---
|
|
109
106
|
|
|
110
|
-
##
|
|
107
|
+
## 🚀 Power Commands
|
|
111
108
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
- **
|
|
109
|
+
| Command | Action | Logic |
|
|
110
|
+
| :--- | :--- | :--- |
|
|
111
|
+
| `npx antigravity-ide .` | **Repair / Sync** | Scans Global (`GEMINI.md`) & Workspace (`.agent`). Fills gaps. |
|
|
112
|
+
| `npx antigravity-ide validate` | **Health Check** | Verifies integrity of both scopes. |
|
|
113
|
+
| `npx antigravity-ide update` | **Upgrade** | Updates Core DNA while respecting Scope boundaries. |
|
|
115
114
|
|
|
116
115
|
---
|
|
117
116
|
|
|
118
|
-
##
|
|
117
|
+
## ❓ Frequent Questions
|
|
118
|
+
|
|
119
|
+
**Q: Is this just another AI wrapper?**
|
|
120
|
+
A: No. Wrappers are stateless. Antigravity installs a **Fractal Memory System** (.agent folder) directly into your project. It gives your AI long-term memory, context awareness, and self-correction capabilities.
|
|
119
121
|
|
|
120
|
-
|
|
122
|
+
**Q: What is "Pure Install"?**
|
|
123
|
+
A: Starting from v4.1.23, we stripped all bloat. No internal scripts, no dev dependencies. You get **only** the production artifacts needed to run your AI team.
|
|
121
124
|
|
|
122
|
-
|
|
125
|
+
**Q: Can I customize the Agents?**
|
|
126
|
+
A: Yes. All agents live in `.agent/agents/`. You can edit their prompts, give them new skills, or fire them. You are the boss.
|
|
123
127
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
- **[
|
|
127
|
-
- **[
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
- **[Gemini Usage Guide](docs/GEMINI_USAGE.md)**: How to configure and use with Google Gemini.
|
|
131
|
+
- **[Master Operations](docs/MASTER_OPERATIONS.md)**: Deep dive into the IDE's core mechanics.
|
|
132
|
+
- **[Publishing Guide](docs/PUBLISHING_GUIDE.md)**: How to release your own Agent packages.
|
|
128
133
|
|
|
129
134
|
---
|
|
130
135
|
|
|
131
|
-
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
132
139
|
Developed with 💡 by <strong>Dokhacgiakhoa</strong><br>
|
|
133
140
|
<a href="LICENSE">MIT LICENSE</a>
|
|
134
141
|
</div>
|
package/README.vi.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
2
|
|
|
3
3
|
# 🛰️ AntiGravity IDE
|
|
4
4
|
### *Phiên bản Nâng cao • v4.1.22 Meta-Engine*
|
|
@@ -21,29 +21,29 @@
|
|
|
21
21
|
|
|
22
22
|
### 📊 Ma trận Năng lực Hệ thống
|
|
23
23
|
|
|
24
|
-
| **15** Quy tắc | **
|
|
25
|
-
| :---: | :---: | :---: | :---: | :---: |
|
|
26
|
-
| *Quản trị* | *
|
|
24
|
+
| **15** Quy tắc | **573** Kỹ năng | **2977** Chiến thuật | **30** Quy trình | **17** Core Libs |
|
|
25
|
+
| :---: | :---: | :---: | :---: | :---: |
|
|
26
|
+
| *Quản trị* | *Công cụ lõi* | *Mẫu AI Nâng cao* | *Chuẩn hóa* | *DNA Dùng chung* |
|
|
27
27
|
|
|
28
28
|
</div>
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
32
|
-
## ⚡ Cài
|
|
32
|
+
## ⚡ Cơ Chế Cài Đặt Thông Minh (Smart Sync)
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
Antigravity sử dụng chiến lược **Dual-Scope Installation** để đảm bảo sự ổn định:
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
# Tạo mới, Cập nhật, Sửa lỗi và Đồng bộ - Tất cả trong 1.
|
|
39
|
-
npx antigravity-ide [ten-du-an]
|
|
36
|
+
1. **Global Scope (Gốc Dự Án)**: Cài đặt `GEMINI.md` (Cấu hình định danh).
|
|
37
|
+
2. **Workspace Scope (Thư mục .agent)**: Cài đặt Rules, Skills, Workflows (Bộ não).
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
**Giao thức Safe-Sync:**
|
|
40
|
+
- 🟢 **File Thiếu**: Tự động bổ sung.
|
|
41
|
+
- 🟡 **File Trùng**: Tự động bỏ qua (Giữ nguyên code bạn đã sửa).
|
|
42
|
+
- 🔴 **Reset Force**: Chỉ ghi đè khi bạn dùng cờ `--force`.
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
```bash
|
|
45
|
+
# MỘT LỆNH DUY NHẤT CHO TẤT CẢ
|
|
46
|
+
npx antigravity-ide [ten-du-an]
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
> [!TIP]
|
|
@@ -80,25 +80,22 @@ Kiến trúc chuẩn hóa, dễ dàng mở rộng và bảo trì.
|
|
|
80
80
|
```text
|
|
81
81
|
du-an-cua-ban/
|
|
82
82
|
├── .agent/ # 🧠 BỘ NÃO (Fractal Core)
|
|
83
|
-
│ ├── .shared/ # ⛩️
|
|
84
|
-
│ ├── agents/ # 🎭 Chuyên gia (Lead, PM, Auditor)
|
|
83
|
+
│ ├── .shared/ # ⛩️ Thư viện lõi (API/DB/Security Standards)
|
|
85
84
|
│ ├── rules/ # ⚖️ Quản trị (Compliance, Context)
|
|
86
85
|
│ ├── skills/ # 🛠️ Kỹ năng (573 Fractal Skills)
|
|
87
|
-
│
|
|
88
|
-
│ └── scripts/ # 🧪 Kiểm định & Validation
|
|
86
|
+
│ └── workflows/ # 🚀 Quy trình (/create, /debug, /audit)
|
|
89
87
|
└── (code của bạn) # ⚡ Mã nguồn ứng dụng
|
|
90
88
|
```
|
|
91
89
|
|
|
90
|
+
> [!NOTE]
|
|
91
|
+
> **Định Nghĩa Phạm Vi (Scope)**:
|
|
92
|
+
> - **Global (Toàn cầu)**: Bộ công cụ CLI (`npx antigravity-ide`) dùng để cài đặt & quản lý.
|
|
93
|
+
> - **Workspace (Dự án)**: Toàn bộ Quy tắc (`.agent/rules`), Kỹ năng và Quy trình được cài đặt **Cục bộ** vào từng dự án riêng biệt. Đảm bảo trí tuệ của dự án này không bị rò rỉ sang dự án khác.
|
|
94
|
+
|
|
92
95
|
---
|
|
93
96
|
|
|
94
97
|
## 🧠 Hệ sinh thái Master
|
|
95
98
|
|
|
96
|
-
### 🎭 Đội ngũ Tác nhân Chuyên gia
|
|
97
|
-
- **Lead Developer**: Thiết kế hệ thống & Kiến trúc.
|
|
98
|
-
- **Security Auditor**: Quét lỗ hổng bảo mật thời gian thực.
|
|
99
|
-
- **Product Manager**: Lập kế hoạch Task thông minh.
|
|
100
|
-
- *...và 19 nhân sự Senior khác.*
|
|
101
|
-
|
|
102
99
|
### 🛠️ Lĩnh vực Tác chiến Kỹ năng
|
|
103
100
|
- **Web Hiệu năng cao**: Next.js 15, React 19, Tailwind v4.
|
|
104
101
|
- **Bảo mật Tấn công**: OWASP, Malware, Pentesting.
|
|
@@ -107,28 +104,38 @@ du-an-cua-ban/
|
|
|
107
104
|
|
|
108
105
|
---
|
|
109
106
|
|
|
110
|
-
##
|
|
107
|
+
## 🚀 Lệnh Nâng Cao (Power Commands)
|
|
111
108
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
- **
|
|
109
|
+
| Lệnh | Hành động | Logic Xử Lý |
|
|
110
|
+
| :--- | :--- | :--- |
|
|
111
|
+
| `npx antigravity-ide .` | **Sửa Chữa / Đồng Bộ** | Quét cả Global (`GEMINI.md`) & Workspace (`.agent`). Bù file thiếu. |
|
|
112
|
+
| `npx antigravity-ide validate` | **Kiểm Tra Sức Khỏe** | Xác minh tính toàn vẹn của cả 2 phạm vi. |
|
|
113
|
+
| `npx antigravity-ide update` | **Nâng Cấp** | Cập nhật Core DNA nhưng tôn trọng ranh giới Scope (không ghi đè ẩu). |
|
|
115
114
|
|
|
116
115
|
---
|
|
117
116
|
|
|
118
|
-
##
|
|
117
|
+
## ❓ Câu Hỏi Thường Gặp
|
|
118
|
+
|
|
119
|
+
**Q: Đây có phải chỉ là AI wrapper nữa không?**
|
|
120
|
+
A: Không. Wrapper thì vô tri (stateless). Antigravity cài đặt một **Hệ Thống Ký Ức Fractal** (thư mục .agent) trực tiếp vào dự án. Nó mang lại khả năng ghi nhớ dài hạn, nhận thức ngữ cảnh và tự sửa lỗi.
|
|
119
121
|
|
|
120
|
-
|
|
122
|
+
**Q: "Pure Install" là gì?**
|
|
123
|
+
A: Từ v4.1.23, chúng tôi loại bỏ hoàn toàn mã thừa. Không script nội bộ, không file rác. Bạn chỉ nhận được **đúng** những gì cần thiết để vận hành đội ngũ AI.
|
|
121
124
|
|
|
122
|
-
|
|
125
|
+
**Q: Tôi có thể tùy chỉnh Agent không?**
|
|
126
|
+
A: Có. Tất cả nhân sự ảo nằm trong `.agent/agents/`. Bạn có thể sửa prompt, dạy skill mới hoặc... sa thải họ. Bạn là sếp mà.
|
|
123
127
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
- **[
|
|
127
|
-
- **[
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
- **[Hướng dẫn Gemini](docs/GEMINI_USAGE.md)**: Cách cấu hình và sử dụng với Google Gemini.
|
|
131
|
+
- **[Vận hành Master](docs/MASTER_OPERATIONS.vi.md)**: Tìm hiểu sâu về cơ chế cốt lõi.
|
|
132
|
+
- **[Hướng dẫn Phát hành](docs/PUBLISHING_GUIDE.md)**: Cách đóng gói và xuất bản Agent của riêng bạn.
|
|
128
133
|
|
|
129
134
|
---
|
|
130
135
|
|
|
131
|
-
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
132
139
|
Phát triển với 💡 bởi <strong>Dokhacgiakhoa</strong><br>
|
|
133
140
|
<a href="LICENSE">MIT LICENSE</a>
|
|
134
141
|
</div>
|
package/cli/create.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
const fs = require('fs-extra');
|
|
6
6
|
const path = require('path');
|
|
7
|
+
const os = require('os');
|
|
7
8
|
const chalk = require('chalk');
|
|
8
9
|
const ora = require('ora');
|
|
9
10
|
const { execSync } = require('child_process');
|
|
@@ -66,6 +67,10 @@ async function createProject(projectName, options, predefinedConfig = null) {
|
|
|
66
67
|
|
|
67
68
|
// 2. Copy Base Structure + Selective Rules/Agents
|
|
68
69
|
await copyModularStructure(projectPath, config, rulesToInstall, agentsToInstall);
|
|
70
|
+
|
|
71
|
+
// 2b. Global Sync (Dual-Scope Strategy)
|
|
72
|
+
await ensureGlobalSync(config, rulesToInstall, agentsToInstall);
|
|
73
|
+
|
|
69
74
|
spinner.succeed('Project structure created (Modular Mode)');
|
|
70
75
|
|
|
71
76
|
// --- MODULAR INSTALLATION END ---
|
|
@@ -237,16 +242,9 @@ async function copyModularStructure(projectPath, config, rulesList, agentsList)
|
|
|
237
242
|
}
|
|
238
243
|
}
|
|
239
244
|
|
|
240
|
-
// 3.
|
|
241
|
-
const agentsDest = path.join(destAgentDir, 'agents');
|
|
242
|
-
fs.mkdirSync(agentsDest, { recursive: true });
|
|
243
|
-
|
|
244
|
-
for (const agent of agentsList) {
|
|
245
|
-
const srcAgent = path.join(sourceAgentDir, 'agents', agent);
|
|
246
|
-
if (fs.existsSync(srcAgent)) {
|
|
247
|
-
await fs.copy(srcAgent, path.join(agentsDest, agent));
|
|
248
|
-
}
|
|
249
|
-
}
|
|
245
|
+
// 3. Agents (Skipped - Single Context Optimization)
|
|
246
|
+
// const agentsDest = path.join(destAgentDir, 'agents');
|
|
247
|
+
// fs.mkdirSync(agentsDest, { recursive: true });
|
|
250
248
|
|
|
251
249
|
// 4. Ensure 'skills' and 'workflows' dir exists
|
|
252
250
|
fs.mkdirSync(path.join(destAgentDir, 'skills'), { recursive: true });
|
|
@@ -265,15 +263,7 @@ async function copyModularStructure(projectPath, config, rulesList, agentsList)
|
|
|
265
263
|
}
|
|
266
264
|
}
|
|
267
265
|
|
|
268
|
-
|
|
269
|
-
const resourcesSource = path.join(sourceAgentDir, 'RESOURCES.md');
|
|
270
|
-
if (fs.existsSync(resourcesSource)) {
|
|
271
|
-
const resourcesDest = path.join(destAgentDir, 'RESOURCES.md');
|
|
272
|
-
// No need for conflict check usually strictly internal, but safe to overwrite or skip
|
|
273
|
-
if (!fs.existsSync(resourcesDest) || config.force) {
|
|
274
|
-
fs.copyFileSync(resourcesSource, resourcesDest);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
266
|
+
|
|
277
267
|
}
|
|
278
268
|
|
|
279
269
|
|
|
@@ -328,7 +318,7 @@ function printSuccessMessage(projectName, config, stats = null) {
|
|
|
328
318
|
console.log(chalk.bold('📋 Config'));
|
|
329
319
|
console.log(chalk.gray(' Project: ') + gradient.cristal(projectName));
|
|
330
320
|
console.log(chalk.gray(' Template: ') + chalk.cyan(config.template));
|
|
331
|
-
console.log(chalk.gray(' Scale: ') + chalk.cyan(config.rules.toUpperCase()));
|
|
321
|
+
console.log(chalk.gray(' Scale: ') + chalk.cyan((config.rules || 'N/A').toUpperCase()));
|
|
332
322
|
|
|
333
323
|
// AI Activation Instructions
|
|
334
324
|
console.log('');
|
|
@@ -353,16 +343,15 @@ function printSuccessMessage(projectName, config, stats = null) {
|
|
|
353
343
|
console.log('');
|
|
354
344
|
const statLine = [
|
|
355
345
|
chalk.white(`${stats.rules} Rules`),
|
|
356
|
-
chalk.white(`${stats.agents} Agents`),
|
|
357
346
|
chalk.white(`${stats.skills} Skills`),
|
|
358
347
|
chalk.white(`${stats.workflows} Workflows`),
|
|
359
|
-
chalk.white(`${stats.shared}
|
|
348
|
+
chalk.white(`${stats.shared} Core Modules`)
|
|
360
349
|
].join(chalk.gray(' • '));
|
|
361
350
|
console.log(gradient.pastel(' ✨ Installed: ') + statLine);
|
|
362
351
|
} else {
|
|
363
352
|
// Fallback for non-modular runs
|
|
364
353
|
console.log('');
|
|
365
|
-
console.log(gradient.pastel(' ✨ Installed: ') + chalk.white('Adaptive Rules') + chalk.gray(' • ') + chalk.white('
|
|
354
|
+
console.log(gradient.pastel(' ✨ Installed: ') + chalk.white('Adaptive Rules') + chalk.gray(' • ') + chalk.white('Shared Core'));
|
|
366
355
|
}
|
|
367
356
|
|
|
368
357
|
console.log('');
|
|
@@ -373,6 +362,61 @@ function printSuccessMessage(projectName, config, stats = null) {
|
|
|
373
362
|
console.log('');
|
|
374
363
|
}
|
|
375
364
|
|
|
365
|
+
// Helper: Ensure Global Sync (~/.antigravity)
|
|
366
|
+
async function ensureGlobalSync(config, rulesList, agentsList) {
|
|
367
|
+
try {
|
|
368
|
+
const globalDir = path.join(os.homedir(), '.antigravity');
|
|
369
|
+
const sourceAgentDir = path.join(__dirname, '..', '.agent');
|
|
370
|
+
const filter = getEngineFilter(config.engineMode);
|
|
371
|
+
|
|
372
|
+
// Ensure global dir exists
|
|
373
|
+
fs.ensureDirSync(globalDir);
|
|
374
|
+
|
|
375
|
+
// 1. Copy Shared
|
|
376
|
+
if (fs.existsSync(path.join(sourceAgentDir, '.shared'))) {
|
|
377
|
+
await fs.copy(path.join(sourceAgentDir, '.shared'), path.join(globalDir, '.shared'), {
|
|
378
|
+
overwrite: false,
|
|
379
|
+
filter
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
// 2. Copy Rules
|
|
384
|
+
const rulesDest = path.join(globalDir, 'rules');
|
|
385
|
+
fs.ensureDirSync(rulesDest);
|
|
386
|
+
for (const rule of rulesList) {
|
|
387
|
+
const src = path.join(sourceAgentDir, 'rules', rule);
|
|
388
|
+
if (fs.existsSync(src)) {
|
|
389
|
+
await fs.copy(src, path.join(rulesDest, rule), { overwrite: false });
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
// 3. Agents (Skipped - Single Context Optimization)
|
|
394
|
+
// const agentsDest = path.join(globalDir, 'agents');
|
|
395
|
+
|
|
396
|
+
// 4. Copy Skills (All standard skills)
|
|
397
|
+
const skillsSource = path.join(sourceAgentDir, 'skills');
|
|
398
|
+
const skillsDest = path.join(globalDir, 'skills');
|
|
399
|
+
if (fs.existsSync(skillsSource)) {
|
|
400
|
+
// We copy ALL skills to global to ensure the full arsenal is available
|
|
401
|
+
await fs.copy(skillsSource, skillsDest, {
|
|
402
|
+
overwrite: false,
|
|
403
|
+
filter
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
// 5. Copy Workflows
|
|
408
|
+
const workflowsSource = path.join(sourceAgentDir, 'workflows');
|
|
409
|
+
const workflowsDest = path.join(globalDir, 'workflows');
|
|
410
|
+
if (fs.existsSync(workflowsSource)) {
|
|
411
|
+
await fs.copy(workflowsSource, workflowsDest, { overwrite: false });
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
} catch (e) {
|
|
415
|
+
// Silent fail for global sync is acceptable to avoid breaking project flow
|
|
416
|
+
// console.error('Global sync warning:', e.message);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
|
|
376
420
|
module.exports = {
|
|
377
421
|
createProject,
|
|
378
422
|
generateGeminiMd
|
|
@@ -92,6 +92,41 @@ The following **17 Shared Modules** in \`.agent/.shared\` must be respected:
|
|
|
92
92
|
16. **Error Logging**: Automatic learning system.
|
|
93
93
|
17. **Docs Sync**: Documentation integrity.
|
|
94
94
|
|
|
95
|
+
94.
|
|
96
|
+
## ⌨️ Slash Commands (Auto-Active)
|
|
97
|
+
Use these commands to trigger specialized workflows:
|
|
98
|
+
|
|
99
|
+
- **/api**: API Design & Documentation (OpenAPI 3.1).
|
|
100
|
+
- **/audit**: Comprehensive pre-delivery audit.
|
|
101
|
+
- **/blog**: Personal or enterprise blogging system.
|
|
102
|
+
- **/brainstorm**: Ideation & creative solutions.
|
|
103
|
+
- **/compliance**: Legal compliance check (GDPR, HIPAA).
|
|
104
|
+
- **/create**: Initialize new features or projects.
|
|
105
|
+
- **/debug**: Deep bug fixing & log analysis.
|
|
106
|
+
- **/deploy**: Deploy to Server/Vercel.
|
|
107
|
+
- **/document**: Auto-generate technical documentation.
|
|
108
|
+
- **/enhance**: UI upgrades & minor logic tweaks.
|
|
109
|
+
- **/explain**: Code explanation & training.
|
|
110
|
+
- **/log-error**: Log errors to tracking system.
|
|
111
|
+
- **/mobile**: Native mobile app development.
|
|
112
|
+
- **/monitor**: System monitoring & Pipeline setup.
|
|
113
|
+
- **/onboard**: Onboard new team members.
|
|
114
|
+
- **/orchestrate**: Coordinate complex multi-tasks.
|
|
115
|
+
- **/performance**: Performance & speed optimization.
|
|
116
|
+
- **/plan**: Development planning & roadmap.
|
|
117
|
+
- **/portfolio**: Build personal portfolio sites.
|
|
118
|
+
- **/preview**: Application Live Preview.
|
|
119
|
+
- **/realtime**: Realtime integration (Socket/WebRTC).
|
|
120
|
+
- **/release-version**: Version update & Changelog.
|
|
121
|
+
- **/security**: Vulnerability scan & System hardening.
|
|
122
|
+
- **/seo**: SEO & Generative Engine Optimization.
|
|
123
|
+
- **/status**: View project status report.
|
|
124
|
+
- **/test**: Write & Run automated tests (TDD).
|
|
125
|
+
- **/ui-ux-pro-max**: High-end Visuals & Motion Design.
|
|
126
|
+
- **/update**: Update AntiGravity to latest version.
|
|
127
|
+
- **/update-docs**: Sync documentation with code.
|
|
128
|
+
- **/visually**: Visualize logic & architecture.
|
|
129
|
+
|
|
95
130
|
## Custom Instructions
|
|
96
131
|
|
|
97
132
|
Add your project-specific instructions here.
|
|
@@ -160,6 +195,40 @@ Vui lòng sử dụng các kỹ năng phù hợp nhất cho **${industryFocus}**
|
|
|
160
195
|
16. **Error Logging**: Hệ thống tự học từ lỗi.
|
|
161
196
|
17. **Docs Sync**: Đồng bộ tài liệu.
|
|
162
197
|
|
|
198
|
+
## ⌨️ Hệ thống lệnh Slash Command (Tự động Kích hoạt)
|
|
199
|
+
Sử dụng các lệnh sau để kích hoạt quy trình tác chiến chuyên sâu:
|
|
200
|
+
|
|
201
|
+
- **/api**: Thiết kế API & Tài liệu hóa (OpenAPI 3.1).
|
|
202
|
+
- **/audit**: Kiểm tra toàn diện trước khi bàn giao.
|
|
203
|
+
- **/blog**: Hệ thống blog cá nhân hoặc doanh nghiệp.
|
|
204
|
+
- **/brainstorm**: Tìm ý tưởng & giải pháp sáng tạo.
|
|
205
|
+
- **/compliance**: Kiểm tra tuân thủ pháp lý (GDPR, HIPAA).
|
|
206
|
+
- **/create**: Khởi tạo tính năng hoặc dự án mới.
|
|
207
|
+
- **/debug**: Sửa lỗi & Phân tích log chuyên sâu.
|
|
208
|
+
- **/deploy**: Triển khai lên Server/Vercel.
|
|
209
|
+
- **/document**: Viết tài liệu kỹ thuật tự động.
|
|
210
|
+
- **/enhance**: Nâng cấp giao diện & logic nhỏ.
|
|
211
|
+
- **/explain**: Giải thích mã nguồn & đào tạo.
|
|
212
|
+
- **/log-error**: Ghi log lỗi vào hệ thống theo dõi.
|
|
213
|
+
- **/mobile**: Phát triển ứng dụng di động Native.
|
|
214
|
+
- **/monitor**: Cài đặt giám sát hệ thống & Pipeline.
|
|
215
|
+
- **/onboard**: Hướng dẫn thành viên mới.
|
|
216
|
+
- **/orchestrate**: Điều phối đa tác vụ phức tạp.
|
|
217
|
+
- **/performance**: Tối ưu hóa hiệu năng & tốc độ.
|
|
218
|
+
- **/plan**: Lập kế hoạch & lộ trình development.
|
|
219
|
+
- **/portfolio**: Xây dựng trang Portfolio cá nhân.
|
|
220
|
+
- **/preview**: Xem trước ứng dụng (Live Preview).
|
|
221
|
+
- **/realtime**: Tích hợp Realtime (Socket.io/WebRTC).
|
|
222
|
+
- **/release-version**: Cập nhật phiên bản & Changelog.
|
|
223
|
+
- **/security**: Quét lỗ hổng & Bảo mật hệ thống.
|
|
224
|
+
- **/seo**: Tối ưu hóa SEO & Generative Engine.
|
|
225
|
+
- **/status**: Xem báo cáo trạng thái dự án.
|
|
226
|
+
- **/test**: Viết & Chạy kiểm thử tự động (TDD).
|
|
227
|
+
- **/ui-ux-pro-max**: Thiết kế Visuals & Motion cao cấp.
|
|
228
|
+
- **/update**: Cập nhật AntiGravity lên bản mới nhất.
|
|
229
|
+
- **/update-docs**: Đồng bộ tài liệu với mã nguồn.
|
|
230
|
+
- **/visually**: Trực quan hóa logic & kiến trúc.
|
|
231
|
+
|
|
163
232
|
## Hướng dẫn tùy chỉnh
|
|
164
233
|
|
|
165
234
|
Thêm các hướng dẫn cụ thể cho dự án của bạn tại đây.
|
|
@@ -51,30 +51,11 @@ const MANIFEST = {
|
|
|
51
51
|
]
|
|
52
52
|
},
|
|
53
53
|
|
|
54
|
-
// 2. AGENTS MAPPING (
|
|
54
|
+
// 2. AGENTS MAPPING (Removed for Single-Context Efficiency)
|
|
55
55
|
agents: {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
'frontend-specialist.md',
|
|
60
|
-
'product-manager.md' // Basic PM for MVP
|
|
61
|
-
],
|
|
62
|
-
// 🏢 SME (Full Stack Team)
|
|
63
|
-
sme: [
|
|
64
|
-
'project-planner.md',
|
|
65
|
-
'frontend-specialist.md',
|
|
66
|
-
'backend-specialist.md',
|
|
67
|
-
'database-architect.md',
|
|
68
|
-
'devops-engineer.md',
|
|
69
|
-
'test-engineer.md',
|
|
70
|
-
'quality-inspector.md',
|
|
71
|
-
'debugger.md'
|
|
72
|
-
],
|
|
73
|
-
// 🎨 Creative (All Hands on Deck)
|
|
74
|
-
creative: [
|
|
75
|
-
// All Agents allowed
|
|
76
|
-
'*'
|
|
77
|
-
]
|
|
56
|
+
instant: [],
|
|
57
|
+
sme: [],
|
|
58
|
+
creative: []
|
|
78
59
|
},
|
|
79
60
|
|
|
80
61
|
// 3. PRODUCT SPECIFIC ADD-ONS
|
package/cli/repair.js
CHANGED
|
@@ -135,15 +135,7 @@ async function repairProject(projectPath, options, config) {
|
|
|
135
135
|
}
|
|
136
136
|
spinner.succeed(`Skills synchronized (${restoredSkills} restored)`);
|
|
137
137
|
|
|
138
|
-
|
|
139
|
-
const resourcesSource = path.join(sourceAgentDir, 'RESOURCES.md');
|
|
140
|
-
const resourcesDest = path.join(agentDir, 'RESOURCES.md');
|
|
141
|
-
if (fs.existsSync(resourcesSource)) {
|
|
142
|
-
// Smart Repair: Merge logic
|
|
143
|
-
if (!fs.existsSync(resourcesDest) || options.force) {
|
|
144
|
-
await fs.copy(resourcesSource, resourcesDest, { overwrite: true });
|
|
145
|
-
}
|
|
146
|
-
}
|
|
138
|
+
|
|
147
139
|
|
|
148
140
|
// 4. Sync Workflows (Critical for slash commands)
|
|
149
141
|
spinner.start('Restoring Workflows...');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antigravity-ide",
|
|
3
|
-
"version": "4.1.
|
|
4
|
-
"description": "The Ultimate AI-Powered IDE for 10x Engineers (Full Agentic Workflow)• 573 Master Skills • 2977 AI Patterns • 30 Workflows •
|
|
3
|
+
"version": "4.1.26",
|
|
4
|
+
"description": "The Ultimate AI-Powered IDE for 10x Engineers (Full Agentic Workflow)• 573 Master Skills • 2977 AI Patterns • 30 Workflows • 17 Shared Core Libraries. One Command to Rule Them All.",
|
|
5
5
|
"homepage": "https://antigravity-ide-cli.vercel.app/",
|
|
6
6
|
"main": "cli/index.js",
|
|
7
7
|
"bin": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"test": "jest",
|
|
23
23
|
"setup": "node ./setup.js",
|
|
24
24
|
"update": "node ./update.js",
|
|
25
|
-
"prepublishOnly": "node
|
|
25
|
+
"prepublishOnly": "node ./scripts/internal/generate-skill-definitions.js && node ./scripts/bundle-skills.js"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"boxen": "^5.1.2",
|