antigravity-ide 4.0.1 → 4.0.3
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/docs-update.md +81 -0
- package/.agent/rules/error-logging.md +93 -0
- package/.agent/scripts/update-docs.js +77 -0
- package/.agent/workflows/log-error.md +74 -0
- package/.agent/workflows/update-docs.md +88 -0
- package/CHANGELOG.md +32 -0
- package/ERRORS.md +45 -0
- package/README.md +10 -1
- package/README.vi.md +8 -2
- package/VERSION +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# DOCS-UPDATE.MD - Documentation Sync Protocol
|
|
6
|
+
|
|
7
|
+
> **Mục tiêu**: Đảm bảo tài liệu luôn đồng bộ với code thực tế. Tránh outdated docs.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 📋 1. CHECKLIST CẬP NHẬT DOCS
|
|
12
|
+
|
|
13
|
+
Mỗi khi thêm tính năng mới, Agent PHẢI kiểm tra và cập nhật các file sau:
|
|
14
|
+
|
|
15
|
+
### A. Khi thêm SKILL mới
|
|
16
|
+
- [ ] `SKILLS.md` - Thêm skill vào danh sách chuẩn
|
|
17
|
+
- [ ] `docs/SKILLS_GUIDE.vi.md` - Thêm vào nhóm phù hợp
|
|
18
|
+
- [ ] `README.vi.md` - Cập nhật số lượng Skills
|
|
19
|
+
- [ ] `README.md` - Cập nhật số lượng Skills (English)
|
|
20
|
+
|
|
21
|
+
### B. Khi thêm WORKFLOW mới
|
|
22
|
+
- [ ] `docs/WORKFLOW_GUIDE.vi.md` - Thêm section hướng dẫn
|
|
23
|
+
- [ ] `README.vi.md` - Cập nhật số lượng Workflows + thêm vào danh sách `/command`
|
|
24
|
+
- [ ] `README.md` - Tương tự như README.vi.md
|
|
25
|
+
|
|
26
|
+
### C. Khi thêm RULE mới
|
|
27
|
+
- [ ] `docs/RULES_GUIDE.vi.md` - Thêm vào bảng phân loại (Auto-Active hoặc On-Demand)
|
|
28
|
+
- [ ] `README.vi.md` - Nếu là tính năng nổi bật → Thêm vào phần features
|
|
29
|
+
|
|
30
|
+
### D. Khi thêm AGENT mới
|
|
31
|
+
- [ ] `docs/AGENTS_GUIDE.vi.md` - Mô tả vai trò và trách nhiệm
|
|
32
|
+
- [ ] `README.vi.md` - Cập nhật số lượng Agents nếu thay đổi
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 🔄 2. QUY TRÌNH TỰ ĐỘNG
|
|
37
|
+
|
|
38
|
+
1. **Phát hiện thay đổi**: Sau khi tạo file mới trong `.agent/`
|
|
39
|
+
2. **Chạy script**: `node .agent/scripts/update-docs.js`
|
|
40
|
+
3. **Review output**: Script sẽ hiển thị số liệu hiện tại
|
|
41
|
+
4. **Cập nhật thủ công**: Dựa vào checklist ở trên
|
|
42
|
+
5. **Commit docs**: Tạo commit riêng cho docs
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 📊 3. FORMAT CHUẨN
|
|
47
|
+
|
|
48
|
+
### Trong README (Bảng thống kê):
|
|
49
|
+
```markdown
|
|
50
|
+
| **XX** Bộ Kỹ năng (Skills) | **XX** Agent Chuyên gia | **XX** Quy trình (Workflows) |
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Trong SKILLS_GUIDE:
|
|
54
|
+
```markdown
|
|
55
|
+
### 🛡️ Nhóm Bảo Mật (Security)
|
|
56
|
+
* **`skill-name`**: Mô tả ngắn gọn về skill
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Trong WORKFLOW_GUIDE:
|
|
60
|
+
```markdown
|
|
61
|
+
### `/workflow-name` - Tiêu đề ngắn gọn
|
|
62
|
+
- **Khi nào dùng**: Mô tả use case
|
|
63
|
+
- **Cách dùng**: `/workflow-name [params]`
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## ⚠️ 4. LƯU Ý QUAN TRỌNG
|
|
69
|
+
|
|
70
|
+
1. **Luôn cập nhật cả 2 ngôn ngữ**: README.md (EN) và README.vi.md (VI)
|
|
71
|
+
2. **Giữ số liệu nhất quán**: Đếm chính xác số lượng files
|
|
72
|
+
3. **Viết mô tả súc tích**: 1 dòng cho mỗi skill/workflow
|
|
73
|
+
4. **Commit riêng**: Tách docs update ra commit riêng để dễ review
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 🎯 5. MỤC TIÊU
|
|
78
|
+
|
|
79
|
+
- Docs luôn phản ánh đúng 100% tính năng hiện có
|
|
80
|
+
- Người dùng mới có thể hiểu hệ thống chỉ từ README
|
|
81
|
+
- Không có "hidden features" không được document
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# ERROR-LOGGING.MD - Automatic Error Tracking & Learning
|
|
6
|
+
|
|
7
|
+
> **Mục tiêu**: Ghi lại mọi lỗi xảy ra trong quá trình phát triển để học hỏi và cải thiện. Ngăn chặn lỗi lặp lại.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 🎯 1. KHI NÀO GHI LỖI
|
|
12
|
+
|
|
13
|
+
Agent PHẢI ghi lại lỗi vào file `ERRORS.md` trong các trường hợp sau:
|
|
14
|
+
|
|
15
|
+
1. **Lỗi Cú pháp (Syntax Error)**:
|
|
16
|
+
- Thiếu dấu ngoặc, dấu chấm phẩy
|
|
17
|
+
- Import sai đường dẫn
|
|
18
|
+
- Typo trong tên biến/hàm
|
|
19
|
+
|
|
20
|
+
2. **Lỗi Logic (Logic Error)**:
|
|
21
|
+
- Code chạy nhưng kết quả sai
|
|
22
|
+
- Điều kiện if/else không cover hết case
|
|
23
|
+
- Vòng lặp vô hạn
|
|
24
|
+
|
|
25
|
+
3. **Lỗi Tích hợp (Integration Error)**:
|
|
26
|
+
- API call thất bại
|
|
27
|
+
- Database query lỗi
|
|
28
|
+
- Module không tìm thấy
|
|
29
|
+
|
|
30
|
+
4. **Lỗi Runtime**:
|
|
31
|
+
- Null pointer exception
|
|
32
|
+
- Type mismatch
|
|
33
|
+
- Out of memory
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 📝 2. FORMAT GHI LỖI
|
|
38
|
+
|
|
39
|
+
Mỗi lỗi PHẢI tuân thủ cấu trúc sau trong `ERRORS.md`:
|
|
40
|
+
|
|
41
|
+
```markdown
|
|
42
|
+
## [YYYY-MM-DD HH:MM] - Tiêu đề Lỗi Ngắn Gọn
|
|
43
|
+
|
|
44
|
+
- **Type**: [Syntax/Logic/Integration/Runtime]
|
|
45
|
+
- **Severity**: [Low/Medium/High/Critical]
|
|
46
|
+
- **File**: `path/to/file.extension:line_number`
|
|
47
|
+
- **Agent**: [Tên Agent thực hiện]
|
|
48
|
+
- **Root Cause**: Mô tả nguyên nhân gốc rễ (1-2 câu)
|
|
49
|
+
- **Error Message**:
|
|
50
|
+
```
|
|
51
|
+
[Code lỗi hoặc stack trace]
|
|
52
|
+
```
|
|
53
|
+
- **Fix Applied**: Hành động cụ thể đã thực hiện
|
|
54
|
+
- **Prevention**: Cách tránh lặp lại lỗi này trong tương lai
|
|
55
|
+
- **Status**: [Fixed/Investigating/Deferred]
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 🔄 3. QUY TRÌNH TỰ ĐỘNG
|
|
63
|
+
|
|
64
|
+
1. **Phát hiện lỗi**: Khi Agent gặp lỗi (test fail, build fail, runtime error).
|
|
65
|
+
2. **Phân loại**: Xác định Type và Severity.
|
|
66
|
+
3. **Ghi nhận**: Append vào file `ERRORS.md` theo format chuẩn.
|
|
67
|
+
4. **Thông báo**: Báo cho người dùng biết đã ghi lỗi và đường dẫn file.
|
|
68
|
+
5. **Giải quyết**: Sửa lỗi và cập nhật Status.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 📍 4. VỊ TRÍ LƯU FILE
|
|
73
|
+
|
|
74
|
+
- **File chính**: `ERRORS.md` (tại thư mục gốc dự án)
|
|
75
|
+
- **Backup**: `.agent/logs/errors-[YYYY-MM].md` (theo tháng)
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## ⚠️ 5. LƯU Ý QUAN TRỌNG
|
|
80
|
+
|
|
81
|
+
1. **Không bao giờ xóa lỗi cũ**: Lỗi là tài sản học tập.
|
|
82
|
+
2. **Luôn cập nhật Status**: Đánh dấu Fixed khi đã giải quyết.
|
|
83
|
+
3. **Privacy**: Không log thông tin nhạy cảm (API Key, Password).
|
|
84
|
+
4. **Review định kỳ**: Cuối tuần xem lại các lỗi để rút kinh nghiệm.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 🎓 6. HỌC TỪ LỖI
|
|
89
|
+
|
|
90
|
+
Mỗi lỗi lặp lại 2 lần trở lên PHẢI được biến thành:
|
|
91
|
+
- **Rule mới**: Để ngăn chặn tự động
|
|
92
|
+
- **Test case**: Để phát hiện sớm
|
|
93
|
+
- **Checklist item**: Trong pre-flight check
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Auto-Update Documentation System
|
|
5
|
+
* Tự động cập nhật các file docs khi có Skills/Workflows/Rules mới
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const fs = require('fs');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
|
|
11
|
+
// Đường dẫn các file cần cập nhật
|
|
12
|
+
const DOCS_FILES = {
|
|
13
|
+
README_VI: 'README.vi.md',
|
|
14
|
+
README_EN: 'README.md',
|
|
15
|
+
SKILLS_GUIDE: 'docs/SKILLS_GUIDE.vi.md',
|
|
16
|
+
RULES_GUIDE: 'docs/RULES_GUIDE.vi.md',
|
|
17
|
+
WORKFLOW_GUIDE: 'docs/WORKFLOW_GUIDE.vi.md'
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// Đếm số lượng Skills
|
|
21
|
+
function countSkills() {
|
|
22
|
+
const skillsDir = path.join(process.cwd(), '.agent', 'skills');
|
|
23
|
+
if (!fs.existsSync(skillsDir)) return 0;
|
|
24
|
+
|
|
25
|
+
const items = fs.readdirSync(skillsDir, { withFileTypes: true });
|
|
26
|
+
return items.filter(item => item.isDirectory()).length;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Đếm số lượng Workflows
|
|
30
|
+
function countWorkflows() {
|
|
31
|
+
const workflowsDir = path.join(process.cwd(), '.agent', 'workflows');
|
|
32
|
+
if (!fs.existsSync(workflowsDir)) return 0;
|
|
33
|
+
|
|
34
|
+
const items = fs.readdirSync(workflowsDir);
|
|
35
|
+
return items.filter(item => item.endsWith('.md')).length;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Đếm số lượng Rules
|
|
39
|
+
function countRules() {
|
|
40
|
+
const rulesDir = path.join(process.cwd(), '.agent', 'rules');
|
|
41
|
+
if (!fs.existsSync(rulesDir)) return 0;
|
|
42
|
+
|
|
43
|
+
const items = fs.readdirSync(rulesDir);
|
|
44
|
+
return items.filter(item => item.endsWith('.md')).length;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Cập nhật số liệu trong README
|
|
48
|
+
function updateCounts() {
|
|
49
|
+
const skills = countSkills();
|
|
50
|
+
const workflows = countWorkflows();
|
|
51
|
+
const rules = countRules();
|
|
52
|
+
|
|
53
|
+
console.log('📊 Current Statistics:');
|
|
54
|
+
console.log(` Skills: ${skills}`);
|
|
55
|
+
console.log(` Workflows: ${workflows}`);
|
|
56
|
+
console.log(` Rules: ${rules}`);
|
|
57
|
+
|
|
58
|
+
return { skills, workflows, rules };
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Main function
|
|
62
|
+
async function main() {
|
|
63
|
+
console.log('🚀 Auto-Update Documentation System\n');
|
|
64
|
+
|
|
65
|
+
const stats = updateCounts();
|
|
66
|
+
|
|
67
|
+
console.log('\n✅ Statistics collected successfully!');
|
|
68
|
+
console.log('💡 Tip: Use this data to update README.md and other docs manually for now.');
|
|
69
|
+
console.log(' Future versions will support automatic text replacement.');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Run if called directly
|
|
73
|
+
if (require.main === module) {
|
|
74
|
+
main().catch(console.error);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
module.exports = { countSkills, countWorkflows, countRules, updateCounts };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Ghi lại lỗi vào Error Log để học tập và cải thiện
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /log-error - Hệ thống Ghi nhận Lỗi Tự động
|
|
6
|
+
|
|
7
|
+
Workflow này hướng dẫn Agent cách ghi lại lỗi một cách có hệ thống.
|
|
8
|
+
|
|
9
|
+
## 📋 Các bước thực hiện
|
|
10
|
+
|
|
11
|
+
1. **Phát hiện lỗi**:
|
|
12
|
+
- Lỗi có thể đến từ: Test fail, Build error, Runtime exception, Logic bug
|
|
13
|
+
- Đọc error message/stack trace đầy đủ
|
|
14
|
+
|
|
15
|
+
2. **Phân loại lỗi**:
|
|
16
|
+
- **Type**: Xác định loại (Syntax/Logic/Integration/Runtime)
|
|
17
|
+
- **Severity**:
|
|
18
|
+
- `Critical`: Hệ thống không chạy được
|
|
19
|
+
- `High`: Tính năng chính bị hỏng
|
|
20
|
+
- `Medium`: Tính năng phụ có vấn đề
|
|
21
|
+
- `Low`: Lỗi nhỏ, không ảnh hưởng nhiều
|
|
22
|
+
|
|
23
|
+
3. **Thu thập thông tin**:
|
|
24
|
+
- File và dòng code gây lỗi
|
|
25
|
+
- Agent nào đang làm việc
|
|
26
|
+
- Thời gian xảy ra lỗi
|
|
27
|
+
- Error message chi tiết
|
|
28
|
+
|
|
29
|
+
4. **Ghi vào ERRORS.md**:
|
|
30
|
+
// turbo
|
|
31
|
+
- Mở file `ERRORS.md`
|
|
32
|
+
- Append entry mới theo format chuẩn (xem `error-logging.md`)
|
|
33
|
+
- Lưu file
|
|
34
|
+
|
|
35
|
+
5. **Thông báo người dùng**:
|
|
36
|
+
- "🐛 Đã ghi lại lỗi vào `ERRORS.md`. Đang tiến hành sửa..."
|
|
37
|
+
|
|
38
|
+
6. **Giải quyết lỗi**:
|
|
39
|
+
- Áp dụng fix
|
|
40
|
+
- Test lại để đảm bảo lỗi không tái phát
|
|
41
|
+
- Cập nhật Status trong `ERRORS.md` thành `Fixed`
|
|
42
|
+
|
|
43
|
+
7. **Học từ lỗi**:
|
|
44
|
+
- Nếu lỗi lặp lại >= 2 lần: Tạo Rule hoặc Test case mới
|
|
45
|
+
- Cập nhật Pre-flight Checklist nếu cần
|
|
46
|
+
|
|
47
|
+
## 💡 Ví dụ
|
|
48
|
+
|
|
49
|
+
Khi gặp lỗi import:
|
|
50
|
+
```
|
|
51
|
+
Error: Cannot find module 'react-bootstrap/Alert'
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Agent sẽ ghi vào ERRORS.md:
|
|
55
|
+
```markdown
|
|
56
|
+
## [2026-02-02 11:25] - Missing Import for React Bootstrap Alert
|
|
57
|
+
|
|
58
|
+
- **Type**: Integration
|
|
59
|
+
- **Severity**: High
|
|
60
|
+
- **File**: `src/components/Dashboard.jsx:5`
|
|
61
|
+
- **Agent**: frontend-specialist
|
|
62
|
+
- **Root Cause**: Import package `react-bootstrap` nhưng chưa cài đặt dependency
|
|
63
|
+
- **Error Message**:
|
|
64
|
+
```
|
|
65
|
+
Cannot find module 'react-bootstrap/Alert'
|
|
66
|
+
```
|
|
67
|
+
- **Fix Applied**: Chạy `npm install react-bootstrap` và kiểm tra imports
|
|
68
|
+
- **Prevention**: Luôn kiểm tra `package.json` trước khi import thư viện mới
|
|
69
|
+
- **Status**: Fixed
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
**Lưu ý**: Workflow này chạy tự động mỗi khi có lỗi. Người dùng không cần gọi thủ công.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Tự động cập nhật tài liệu khi có tính năng mới
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /update-docs - Hệ thống Cập nhật Tài liệu Tự động
|
|
6
|
+
|
|
7
|
+
Workflow này đảm bảo tất cả tài liệu được đồng bộ khi thêm Skills/Workflows/Rules mới.
|
|
8
|
+
|
|
9
|
+
## 📋 Khi nào sử dụng
|
|
10
|
+
|
|
11
|
+
- Khi tạo mới một Skill trong `.agent/skills/`
|
|
12
|
+
- Khi tạo mới một Workflow trong `.agent/workflows/`
|
|
13
|
+
- Khi tạo mới một Rule trong `.agent/rules/`
|
|
14
|
+
- Sau khi merge tính năng lớn
|
|
15
|
+
|
|
16
|
+
## 🔄 Quy trình tự động
|
|
17
|
+
|
|
18
|
+
### Bước 1: Thu thập Metadata
|
|
19
|
+
// turbo
|
|
20
|
+
- Chạy script: `node .agent/scripts/update-docs.js`
|
|
21
|
+
- Lấy số lượng Skills, Workflows, Rules hiện tại
|
|
22
|
+
- Quét file mới được tạo để lấy name và description
|
|
23
|
+
|
|
24
|
+
### Bước 2: Phát hiện thay đổi
|
|
25
|
+
- So sánh với số liệu cũ trong README
|
|
26
|
+
- Liệt kê các file mới: Skills/Workflows/Rules
|
|
27
|
+
|
|
28
|
+
### Bước 3: Cập nhật các file docs
|
|
29
|
+
|
|
30
|
+
#### 3.1. README.vi.md & README.md
|
|
31
|
+
- Cập nhật bảng thống kê (dòng ~12):
|
|
32
|
+
```markdown
|
|
33
|
+
| **XX** Bộ Kỹ năng | **XX** Workflows | ...
|
|
34
|
+
```
|
|
35
|
+
- Nếu có tính năng nổi bật mới → Thêm vào phần "Tính năng"
|
|
36
|
+
|
|
37
|
+
#### 3.2. SKILLS_GUIDE.vi.md
|
|
38
|
+
- Nếu có Skill mới:
|
|
39
|
+
- Xác định nhóm (Development/Security/AI/...)
|
|
40
|
+
- Thêm vào danh sách tương ứng với format:
|
|
41
|
+
```markdown
|
|
42
|
+
* **`skill-name`**: Mô tả ngắn gọn
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### 3.3. WORKFLOW_GUIDE.vi.md
|
|
46
|
+
- Nếu có Workflow mới:
|
|
47
|
+
- Xác định nhóm (Core/Builder/Security/...)
|
|
48
|
+
- Thêm section mới:
|
|
49
|
+
```markdown
|
|
50
|
+
### `/workflow-name` - Tiêu đề
|
|
51
|
+
- **Khi nào dùng**: ...
|
|
52
|
+
- **Cách dùng**: ...
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
#### 3.4. RULES_GUIDE.vi.md
|
|
56
|
+
- Nếu có Rule mới:
|
|
57
|
+
- Kiểm tra trigger type (always_on/glob/model_decision)
|
|
58
|
+
- Thêm vào bảng tương ứng
|
|
59
|
+
|
|
60
|
+
### Bước 4: Verify & Commit
|
|
61
|
+
- Review các thay đổi
|
|
62
|
+
- Tạo commit với message: `docs: update with new features`
|
|
63
|
+
|
|
64
|
+
## 💡 Ví dụ
|
|
65
|
+
|
|
66
|
+
**Khi thêm Skill `malware-analyst`:**
|
|
67
|
+
|
|
68
|
+
1. Script phát hiện: `+1 Skill`
|
|
69
|
+
2. Đọc metadata từ `SKILL.md`:
|
|
70
|
+
```yaml
|
|
71
|
+
name: malware-analyst
|
|
72
|
+
description: Threat intelligence and URL scanning
|
|
73
|
+
```
|
|
74
|
+
3. Tự động cập nhật:
|
|
75
|
+
- README: 26 → 27 Skills
|
|
76
|
+
- SKILLS_GUIDE: Thêm vào nhóm Security
|
|
77
|
+
|
|
78
|
+
## ⚙️ Cấu hình
|
|
79
|
+
|
|
80
|
+
File `.agent/scripts/update-docs.js` chứa logic tự động.
|
|
81
|
+
Có thể mở rộng để hỗ trợ:
|
|
82
|
+
- Tự động tạo changelog
|
|
83
|
+
- Generate skill index
|
|
84
|
+
- Update version badges
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
**Lưu ý**: Workflow này giúp Agent không bỏ sót việc cập nhật docs. Luôn chạy sau khi thêm tính năng mới!
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [4.0.3] - 2026-02-02
|
|
6
|
+
### Added
|
|
7
|
+
- **Feature**: Auto-Update Documentation System - Never forget to update docs again
|
|
8
|
+
- **Workflow**: New `/update-docs` workflow for systematic docs synchronization
|
|
9
|
+
- **Rule**: New `docs-update.md` rule with checklist for all doc types
|
|
10
|
+
- **Script**: `update-docs.js` for automatic statistics collection
|
|
11
|
+
- **Automation**: AI now auto-checks and updates docs when adding Skills/Workflows/Rules
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- Updated workflow count from 19 to 21 (added update-docs and plan-auto-update-chat)
|
|
15
|
+
- Updated all documentation with new feature descriptions
|
|
16
|
+
- Enhanced `RULES_GUIDE.vi.md` with docs-update rule
|
|
17
|
+
- Enhanced `WORKFLOW_GUIDE.vi.md` with /update-docs workflow
|
|
18
|
+
|
|
19
|
+
### Improved
|
|
20
|
+
- Documentation consistency across all files
|
|
21
|
+
- Automatic statistics tracking (27 Skills, 21 Workflows, 12 Rules)
|
|
22
|
+
- Reduced manual effort in maintaining docs
|
|
23
|
+
|
|
24
|
+
## [4.0.2] - 2026-02-02
|
|
25
|
+
### Added
|
|
26
|
+
- **Feature**: Automatic Error Logging System - AI tracks all errors to `ERRORS.md` for learning
|
|
27
|
+
- **Rule**: New `error-logging.md` rule that auto-captures errors during development
|
|
28
|
+
- **Workflow**: New `/log-error` workflow for systematic error tracking
|
|
29
|
+
- **File**: `ERRORS.md` central error repository with statistics and prevention tips
|
|
30
|
+
- **Test**: Error logging test suite to verify the tracking system
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
- Updated `RULES_GUIDE.vi.md` with error-logging rule
|
|
34
|
+
- Updated `WORKFLOW_GUIDE.vi.md` with /log-error workflow
|
|
35
|
+
- Enhanced AI's ability to learn from mistakes and prevent recurring errors
|
|
36
|
+
|
|
5
37
|
## [4.0.1] - 2026-02-02
|
|
6
38
|
### Added
|
|
7
39
|
- **Security**: New `malware-analyst` skill for threat intelligence and malicious URL scanning.
|
package/ERRORS.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# 🐛 Error Log - Antigravity IDE Development
|
|
2
|
+
|
|
3
|
+
> Tập hợp tất cả lỗi xảy ra trong quá trình phát triển. File này giúp Agent học hỏi và tránh lặp lại sai lầm.
|
|
4
|
+
|
|
5
|
+
**Cách sử dụng**:
|
|
6
|
+
- Mỗi lỗi mới được append vào cuối file
|
|
7
|
+
- Không xóa lỗi cũ (dùng để học tập)
|
|
8
|
+
- Đánh dấu Status khi đã fix
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Thống kê nhanh
|
|
13
|
+
|
|
14
|
+
- **Tổng lỗi**: 1
|
|
15
|
+
- **Đã sửa**: 1
|
|
16
|
+
- **Đang điều tra**: 0
|
|
17
|
+
- **Tạm hoãn**: 0
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
<!-- Errors sẽ được ghi theo format chuẩn dưới đây -->
|
|
22
|
+
|
|
23
|
+
## [2026-02-02 11:25] - Missing Closing Parenthesis in forEach
|
|
24
|
+
|
|
25
|
+
- **Type**: Syntax
|
|
26
|
+
- **Severity**: High
|
|
27
|
+
- **File**: `tests/temp-test-error.js:8`
|
|
28
|
+
- **Agent**: Antigravity (Testing Error Logging System)
|
|
29
|
+
- **Root Cause**: Thiếu dấu ngoặc đóng `)` trong callback function của `forEach`. Dòng 8 có `items.forEach(item => {` nhưng chỉ đóng bằng `}` mà không đóng dấu ngoặc tròn của forEach.
|
|
30
|
+
- **Error Message**:
|
|
31
|
+
```
|
|
32
|
+
SyntaxError: missing ) after argument list
|
|
33
|
+
at wrapSafe (node:internal/modules/cjs/loader:1691:18)
|
|
34
|
+
at Module._compile (node:internal/modules/cjs/loader:1734:20)
|
|
35
|
+
```
|
|
36
|
+
- **Fix Applied**:
|
|
37
|
+
- Thêm dấu `)` đóng cho forEach trước khi có `return total;`
|
|
38
|
+
- Code đúng phải là: `items.forEach(item => { total += item.price; });`
|
|
39
|
+
- **Prevention**:
|
|
40
|
+
- Luôn kiểm tra cặp dấu ngoặc (bracket matching) trước khi chạy code
|
|
41
|
+
- Sử dụng IDE với auto-formatting (Prettier) để tự động phát hiện
|
|
42
|
+
- Thêm ESLint rule để cảnh báo syntax errors ngay khi viết
|
|
43
|
+
- **Status**: Fixed
|
|
44
|
+
|
|
45
|
+
---
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
**Google Antigravity** is more than just a skill collection; it is a comprehensive **Orchestration Framework**. it provides an "AI Battlefield" environment where AI agents collaborate through a professional production line (PDCA), ensuring every line of code is audited and optimized.
|
|
12
12
|
|
|
13
|
-
| **
|
|
13
|
+
| **27** Master Skills | **15** Specialist Agents | **21** Workflows | **17** Shared DNA Modules |
|
|
14
14
|
| :---: | :---: | :---: | :---: |
|
|
15
15
|
| Containing 600+ Capabilities | Role-Based Personas | PDCA Cycle | Industry Blueprints |
|
|
16
16
|
|
|
@@ -53,6 +53,13 @@ The new interactive CLI puts you in control with a **Scale-Adaptive Engine**:
|
|
|
53
53
|
- **Multi-Persona Orchestration**: Coordinate up to 15 specialist agents through a unified command.
|
|
54
54
|
- *Auto-Injection*: These details are deeply embedded into `.agent/rules/GEMINI.md`.
|
|
55
55
|
|
|
56
|
+
5. **Security & Learning Systems (v4.0.x)**:
|
|
57
|
+
- **🛡️ Malware Protection**: Automatic scanning of malicious URLs and links before loading external resources.
|
|
58
|
+
- **🔄 Auto-Update Chat**: AI proactively checks NPM for new versions and offers to upgrade via chat.
|
|
59
|
+
- **🐛 Error Logging**: AI automatically logs all errors to `ERRORS.md` for analysis and learning (v4.0.2).
|
|
60
|
+
- **📊 Smart Prevention**: Classifies errors by Type/Severity, suggests fixes, and prevents recurrence.
|
|
61
|
+
- **🎓 Self-Learning**: Errors repeated ≥ 2 times → AI auto-creates new Rules or Test cases.
|
|
62
|
+
|
|
56
63
|
### Engine Modes
|
|
57
64
|
- **⚡ Standard (Node.js)**: High-speed, lightweight, perfect for Web/SaaS projects.
|
|
58
65
|
- **🧠 Advanced (Python)**: Deep AI integration, Data Science, and automated Security Scanners.
|
|
@@ -80,6 +87,8 @@ Trigger deep workflows directly within your AI chat interface:
|
|
|
80
87
|
- `/create`: Scaffold the project's foundation.
|
|
81
88
|
- `/ui-ux-pro-max`: Design premium interfaces & micro-interactions.
|
|
82
89
|
- `/orchestrate`: Coordinate multiple agents to solve complex problems.
|
|
90
|
+
- `/update`: Check for updates and upgrade Antigravity IDE to the latest version.
|
|
91
|
+
- `/log-error`: Auto error logging (runs in background, no manual invocation needed).
|
|
83
92
|
|
|
84
93
|
### System Updates
|
|
85
94
|
Update the Antigravity Brain to the latest version while preserving your custom configurations:
|
package/README.vi.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
**Google Antigravity** không chỉ là một bộ skill, mà là một **Khung vận hành (Orchestration Framework)** toàn diện. Nó cung cấp một môi trường "Phòng tác chiến AI" giúp các AI Agent phối hợp theo dây chuyền sản xuất chuyên nghiệp (PDCA), đảm bảo mọi dòng code ra đời đều qua thẩm định và tối ưu hóa.
|
|
11
11
|
|
|
12
|
-
| **27** Bộ Kỹ năng (Skills) | **15** Agent Chuyên gia | **
|
|
12
|
+
| **27** Bộ Kỹ năng (Skills) | **15** Agent Chuyên gia | **21** Quy trình (Workflows) | **17** Mô-đun DNA (Shared) |
|
|
13
13
|
| :---: | :---: | :---: | :---: |
|
|
14
14
|
| Chứa 600+ Năng lực | Role-Based Personas | Chu kỳ PDCA | Tri thức nghiệp vụ mẫu |
|
|
15
15
|
|
|
@@ -53,10 +53,15 @@ Trải nghiệm dòng lệnh (CLI) đẳng cấp Premium với **Cơ chế Thíc
|
|
|
53
53
|
- Đặt tên riêng cho trợ lý (ví dụ: *Jarvis, Friday*) để tạo "linh hồn" cho AI.
|
|
54
54
|
- Phối hợp đa Agent (lên đến 15 chuyên gia) qua một bộ chỉ huy thống nhất.
|
|
55
55
|
|
|
56
|
-
5. **Hệ thống Bảo vệ & Cập nhật Thông minh
|
|
56
|
+
5. **Hệ thống Bảo vệ & Cập nhật Thông minh**:
|
|
57
57
|
- **🛡️ Malware Protection**: Tự động rà soát link độc hại và mã độc trước khi tải tài nguyên bên ngoài.
|
|
58
58
|
- **🔄 Auto-Update Chat**: Agent chủ động kiểm tra phiên bản mới nhất trên NPM và hỏi ý kiến bạn để nâng cấp hệ thống ngay trong khung chat.
|
|
59
59
|
|
|
60
|
+
6. **Hệ thống Học tập từ Lỗi (Mới - v4.0.2)**:
|
|
61
|
+
- **🐛 Error Logging**: AI tự động ghi lại mọi lỗi xảy ra vào `ERRORS.md` để phân tích và học tập.
|
|
62
|
+
- **📊 Thống kê & Phòng ngừa**: Phân loại lỗi theo Type/Severity, đề xuất cách khắc phục và ngăn chặn lặp lại.
|
|
63
|
+
- **🎓 Học tự động**: Lỗi lặp lại ≥ 2 lần → AI tự tạo Rule hoặc Test case mới.
|
|
64
|
+
|
|
60
65
|
### 🤖 Hướng dẫn Kích hoạt (Activation Protocol)
|
|
61
66
|
Sau khi cài đặt xong, hãy "đánh thức" bộ não AI trong **IDE AI Chat** của bạn:
|
|
62
67
|
|
|
@@ -91,6 +96,7 @@ Kích hoạt các Workflow chuyên sâu ngay trong khung chat:
|
|
|
91
96
|
- `/ui-ux-pro-max`: Thiết kế giao diện cao cấp & Micro-interactions.
|
|
92
97
|
- `/orchestrate`: Điều phối đa Agent giải quyết bài toán phức tạp.
|
|
93
98
|
- `/update`: Kiểm tra và nâng cấp Antigravity IDE lên bản mới nhất.
|
|
99
|
+
- `/log-error`: Hệ thống ghi lỗi tự động (chạy ngầm, không cần gọi thủ công).
|
|
94
100
|
|
|
95
101
|
### Cập nhật hệ thống
|
|
96
102
|
Để cập nhật bộ não Antigravity lên bản mới nhất mà không mất các cấu hình custom:
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.0.
|
|
1
|
+
4.0.3
|