awf-vibecoder-kit 5.0.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/LICENSE +21 -0
- package/README.md +159 -0
- package/bin/setup.js +144 -0
- package/bin/uninstall.js +28 -0
- package/docs/README.md +37 -0
- package/docs/commands.md +306 -0
- package/docs/glossary.md +181 -0
- package/docs/quick-start.md +96 -0
- package/docs/scenarios.md +293 -0
- package/docs/skills.md +147 -0
- package/index.js +13 -0
- package/package.json +36 -0
- package/skills/awf-adaptive-language/SKILL.md +189 -0
- package/skills/awf-auto-save/SKILL.md +223 -0
- package/skills/awf-context-help/SKILL.md +180 -0
- package/skills/awf-error-translator/SKILL.md +153 -0
- package/skills/awf-onboarding/SKILL.md +248 -0
- package/skills/awf-session-restore/SKILL.md +234 -0
- package/workflows/README.md +325 -0
- package/workflows/audit.md +231 -0
- package/workflows/awf-update.md +81 -0
- package/workflows/brainstorm.md +164 -0
- package/workflows/canary.md +102 -0
- package/workflows/code.md +663 -0
- package/workflows/customize.md +346 -0
- package/workflows/debug.md +265 -0
- package/workflows/deploy.md +314 -0
- package/workflows/design.md +364 -0
- package/workflows/dev-loop.md +182 -0
- package/workflows/freeze.md +79 -0
- package/workflows/help.md +299 -0
- package/workflows/init.md +145 -0
- package/workflows/learn.md +119 -0
- package/workflows/next.md +256 -0
- package/workflows/plan.md +605 -0
- package/workflows/recap.md +230 -0
- package/workflows/refactor.md +165 -0
- package/workflows/review.md +156 -0
- package/workflows/rollback.md +52 -0
- package/workflows/run.md +237 -0
- package/workflows/save_brain.md +522 -0
- package/workflows/sync.md +69 -0
- package/workflows/test.md +91 -0
- package/workflows/vibecoder-guide.md +285 -0
- package/workflows/visualize.md +469 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 MH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# ⚡ AWF Vibecoder Kit v5
|
|
2
|
+
|
|
3
|
+
> Biến AI thành đội dev ảo. Bộ công cụ vibecoding cho [Antigravity IDE](https://antigravity.dev).
|
|
4
|
+
|
|
5
|
+
**Vibecoding** = Bạn nói ý tưởng → AI viết code. Bạn làm "sếp", AI làm "nhân viên".
|
|
6
|
+
|
|
7
|
+
AWF (Antigravity Workflow Framework) giúp bạn "sếp" tốt hơn — ra lệnh đúng, kiểm tra đúng, ship nhanh.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## ✨ Highlights
|
|
12
|
+
|
|
13
|
+
🎯 **16 lệnh chính** — Sprint flow: Idea → Plan → Code → Review → Ship
|
|
14
|
+
🧠 **~50 skills ẩn** — AI tự kích hoạt kiến thức chuyên môn khi cần
|
|
15
|
+
🇻🇳 **Vietnamese-first** — Viết cho người Việt, thuật ngữ dễ hiểu
|
|
16
|
+
📱 **Mọi trình độ** — Từ non-tech đến senior dev đều dùng được
|
|
17
|
+
🔧 **Fix-first review** — AI tự fix lỗi rõ ràng, chỉ hỏi khi cần judgment
|
|
18
|
+
📚 **Docs đầy đủ** — 5 file hướng dẫn từ Quick Start đến Glossary
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 🚀 Cài Đặt — 30 Giây
|
|
23
|
+
|
|
24
|
+
### Cách 1: npm (Khuyến nghị)
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install -g awf-vibecoder-kit
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Tự động copy workflows + docs + skills vào `~/.gemini/antigravity/`.
|
|
31
|
+
|
|
32
|
+
### Cách 2: Git Clone
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
git clone https://github.com/mh/awf-vibecoder-kit.git
|
|
36
|
+
cd awf-vibecoder-kit
|
|
37
|
+
node bin/setup.js
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Cách 3: Manual
|
|
41
|
+
|
|
42
|
+
Copy thủ công 3 folder vào `~/.gemini/antigravity/`:
|
|
43
|
+
- `workflows/` → `global_workflows/`
|
|
44
|
+
- `docs/` → `docs/`
|
|
45
|
+
- `skills/` → `skills/`
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 📖 Quick Start
|
|
50
|
+
|
|
51
|
+
1. Mở Antigravity
|
|
52
|
+
2. Gõ `/vibecoder-guide` để đọc hướng dẫn
|
|
53
|
+
3. Gõ `/init` để tạo project mới
|
|
54
|
+
4. Gõ `/brainstorm` để khám phá ý tưởng
|
|
55
|
+
5. Ship! 🚀
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 🗺️ Sprint Flow
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
/init → /brainstorm → /plan → /design → /code → /review → /test → /deploy → /canary
|
|
63
|
+
↑ ↓
|
|
64
|
+
└────────────────────── /recap (mở lại project) ←──────── /save-brain (cuối buổi)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 📋 16 Lệnh Chính
|
|
70
|
+
|
|
71
|
+
| Lệnh | Mô tả | Khi nào dùng |
|
|
72
|
+
|-------|--------|-------------|
|
|
73
|
+
| `/init` | ✨ Tạo dự án mới | Bắt đầu project |
|
|
74
|
+
| `/brainstorm` | 💡 Khám phá ý tưởng (5 forcing questions) | Chưa rõ muốn làm gì |
|
|
75
|
+
| `/plan` | 📋 Lên kế hoạch chi tiết | Đã biết muốn gì |
|
|
76
|
+
| `/design` | 🎨 Thiết kế DB, API, luồng | Trước khi code |
|
|
77
|
+
| `/visualize` | 🖼️ Thiết kế UI mockup | Muốn xem UI trước |
|
|
78
|
+
| `/code` | 💻 Viết code (auto-test loop) | Bắt đầu code |
|
|
79
|
+
| `/review` | 👀 Code review + auto-fix | Sau code, trước deploy |
|
|
80
|
+
| `/test` | 🧪 Chạy test suite | Kiểm tra code |
|
|
81
|
+
| `/deploy` | 🚀 Deploy lên mạng | App sẵn sàng |
|
|
82
|
+
| `/canary` | 🐤 Check sức khỏe sau deploy | Vừa deploy xong |
|
|
83
|
+
| `/debug` | 🐛 Tìm và sửa lỗi | App bị lỗi |
|
|
84
|
+
| `/audit` | 🔒 Kiểm tra bảo mật | Trước khi public |
|
|
85
|
+
| `/freeze` | 🔒 Lock edit scope | Debug tập trung |
|
|
86
|
+
| `/learn` | 📚 Quản lý kiến thức | Xem bài học qua sessions |
|
|
87
|
+
| `/recap` | 📖 Nhớ lại context | Mở lại project |
|
|
88
|
+
| `/save-brain` | 🧠 Lưu context | Cuối buổi |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 📂 Cấu Trúc Package
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
awf-vibecoder-kit/
|
|
96
|
+
├── bin/
|
|
97
|
+
│ ├── setup.js # Install script
|
|
98
|
+
│ └── uninstall.js # Uninstall guide
|
|
99
|
+
├── workflows/ # 16+ workflow .md files
|
|
100
|
+
│ ├── brainstorm.md # 5 forcing questions + reframe
|
|
101
|
+
│ ├── review.md # Fix-first code review
|
|
102
|
+
│ ├── freeze.md # Edit scope lock
|
|
103
|
+
│ ├── canary.md # Post-deploy monitoring
|
|
104
|
+
│ ├── learn.md # Compound learnings
|
|
105
|
+
│ ├── code.md # Phase-based coding
|
|
106
|
+
│ ├── plan.md # Multi-perspective planning
|
|
107
|
+
│ └── ...
|
|
108
|
+
├── docs/ # User guide (Vietnamese)
|
|
109
|
+
│ ├── README.md # Table of contents
|
|
110
|
+
│ ├── quick-start.md # 5-minute beginner guide
|
|
111
|
+
│ ├── commands.md # 16 commands detailed
|
|
112
|
+
│ ├── skills.md # ~50 skills explained
|
|
113
|
+
│ ├── scenarios.md # 8 real-world scenarios
|
|
114
|
+
│ └── glossary.md # Tech terms → plain Vietnamese
|
|
115
|
+
├── skills/ # Auto-activated AI skills
|
|
116
|
+
│ ├── awf-session-restore/
|
|
117
|
+
│ ├── awf-auto-save/
|
|
118
|
+
│ └── ...
|
|
119
|
+
├── package.json
|
|
120
|
+
├── LICENSE
|
|
121
|
+
└── README.md # ← You are here
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 🆚 Lấy Cảm Hứng Từ
|
|
127
|
+
|
|
128
|
+
AWF v5 lấy ý tưởng hay nhất từ **[GStack](https://github.com/garrytan/gstack)** (Garry Tan, CEO Y Combinator) và kết hợp với thế mạnh riêng:
|
|
129
|
+
|
|
130
|
+
| Feature | GStack | AWF v5 |
|
|
131
|
+
|---------|--------|--------|
|
|
132
|
+
| Sprint flow | ✅ | ✅ |
|
|
133
|
+
| Fix-first review | ✅ | ✅ |
|
|
134
|
+
| Post-deploy canary | ✅ | ✅ |
|
|
135
|
+
| Edit scope lock | ✅ | ✅ |
|
|
136
|
+
| Memory/learnings | ✅ | ✅ |
|
|
137
|
+
| Real browser testing | ✅ | ❌ |
|
|
138
|
+
| Vietnamese UX | ❌ | ✅ |
|
|
139
|
+
| Phase-based coding | ❌ | ✅ |
|
|
140
|
+
| Non-tech friendly | ❌ | ✅ |
|
|
141
|
+
| Knowledge graph (GitNexus) | ❌ | ✅ |
|
|
142
|
+
| Multi-agent orchestration | ❌ | ✅ |
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## 📝 License
|
|
147
|
+
|
|
148
|
+
MIT — Free forever. Go build something.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## 🧑💻 Contributing
|
|
153
|
+
|
|
154
|
+
1. Fork repo
|
|
155
|
+
2. Tạo branch: `git checkout -b improve/brainstorm`
|
|
156
|
+
3. Sửa workflow `.md` files
|
|
157
|
+
4. PR + mô tả changes
|
|
158
|
+
|
|
159
|
+
Workflows là Markdown files — không cần biết code cũng contribute được!
|
package/bin/setup.js
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* AWF Vibecoder Kit — Setup Script
|
|
5
|
+
*
|
|
6
|
+
* Copies workflows, docs, and skills to ~/.gemini/antigravity/
|
|
7
|
+
* Safe: backs up existing files before overwriting.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
const fs = require('fs');
|
|
11
|
+
const path = require('path');
|
|
12
|
+
const os = require('os');
|
|
13
|
+
|
|
14
|
+
// ═══════════════════════════════════════
|
|
15
|
+
// Config
|
|
16
|
+
// ═══════════════════════════════════════
|
|
17
|
+
|
|
18
|
+
const HOME = os.homedir();
|
|
19
|
+
const TARGET_BASE = path.join(HOME, '.gemini', 'antigravity');
|
|
20
|
+
const SOURCE_BASE = path.join(__dirname, '..');
|
|
21
|
+
const isAuto = process.argv.includes('--auto');
|
|
22
|
+
const isForce = process.argv.includes('--force');
|
|
23
|
+
|
|
24
|
+
const DIRS_TO_COPY = [
|
|
25
|
+
{ src: 'workflows', dest: 'global_workflows', merge: true },
|
|
26
|
+
{ src: 'docs', dest: 'docs', merge: true },
|
|
27
|
+
{ src: 'skills', dest: 'skills', merge: true },
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
// ═══════════════════════════════════════
|
|
31
|
+
// Helpers
|
|
32
|
+
// ═══════════════════════════════════════
|
|
33
|
+
|
|
34
|
+
const COLORS = {
|
|
35
|
+
green: (t) => `\x1b[32m${t}\x1b[0m`,
|
|
36
|
+
yellow: (t) => `\x1b[33m${t}\x1b[0m`,
|
|
37
|
+
red: (t) => `\x1b[31m${t}\x1b[0m`,
|
|
38
|
+
cyan: (t) => `\x1b[36m${t}\x1b[0m`,
|
|
39
|
+
bold: (t) => `\x1b[1m${t}\x1b[0m`,
|
|
40
|
+
dim: (t) => `\x1b[2m${t}\x1b[0m`,
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
function log(icon, msg) {
|
|
44
|
+
console.log(` ${icon} ${msg}`);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function ensureDir(dir) {
|
|
48
|
+
if (!fs.existsSync(dir)) {
|
|
49
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function copyFileSync(src, dest) {
|
|
54
|
+
const destDir = path.dirname(dest);
|
|
55
|
+
ensureDir(destDir);
|
|
56
|
+
fs.copyFileSync(src, dest);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function copyDirMerge(srcDir, destDir) {
|
|
60
|
+
if (!fs.existsSync(srcDir)) return 0;
|
|
61
|
+
ensureDir(destDir);
|
|
62
|
+
let count = 0;
|
|
63
|
+
|
|
64
|
+
const entries = fs.readdirSync(srcDir, { withFileTypes: true });
|
|
65
|
+
for (const entry of entries) {
|
|
66
|
+
const srcPath = path.join(srcDir, entry.name);
|
|
67
|
+
const destPath = path.join(destDir, entry.name);
|
|
68
|
+
|
|
69
|
+
if (entry.isDirectory()) {
|
|
70
|
+
count += copyDirMerge(srcPath, destPath);
|
|
71
|
+
} else {
|
|
72
|
+
copyFileSync(srcPath, destPath);
|
|
73
|
+
count++;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return count;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function backupExisting(dir) {
|
|
80
|
+
if (!fs.existsSync(dir)) return;
|
|
81
|
+
const backupDir = dir + '.backup-' + Date.now();
|
|
82
|
+
fs.cpSync(dir, backupDir, { recursive: true });
|
|
83
|
+
return backupDir;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// ═══════════════════════════════════════
|
|
87
|
+
// Main
|
|
88
|
+
// ═══════════════════════════════════════
|
|
89
|
+
|
|
90
|
+
function main() {
|
|
91
|
+
console.log('');
|
|
92
|
+
console.log(COLORS.bold(' ⚡ AWF Vibecoder Kit v5.0 — Setup'));
|
|
93
|
+
console.log(COLORS.dim(' ─────────────────────────────────────'));
|
|
94
|
+
console.log('');
|
|
95
|
+
|
|
96
|
+
// Check target exists
|
|
97
|
+
ensureDir(TARGET_BASE);
|
|
98
|
+
log('📁', `Target: ${COLORS.cyan(TARGET_BASE)}`);
|
|
99
|
+
console.log('');
|
|
100
|
+
|
|
101
|
+
let totalFiles = 0;
|
|
102
|
+
|
|
103
|
+
for (const { src, dest, merge } of DIRS_TO_COPY) {
|
|
104
|
+
const srcDir = path.join(SOURCE_BASE, src);
|
|
105
|
+
const destDir = path.join(TARGET_BASE, dest);
|
|
106
|
+
|
|
107
|
+
if (!fs.existsSync(srcDir)) {
|
|
108
|
+
log('⏭️', COLORS.dim(`Skip: ${src}/ (not found in package)`));
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Count source files
|
|
113
|
+
const srcFiles = fs.readdirSync(srcDir, { recursive: true });
|
|
114
|
+
|
|
115
|
+
if (merge) {
|
|
116
|
+
const count = copyDirMerge(srcDir, destDir);
|
|
117
|
+
log('✅', `${COLORS.green(src + '/')} → ${dest}/ (${count} files)`);
|
|
118
|
+
totalFiles += count;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
console.log('');
|
|
123
|
+
console.log(COLORS.dim(' ─────────────────────────────────────'));
|
|
124
|
+
log('🎉', COLORS.bold(COLORS.green(`Done! ${totalFiles} files installed.`)));
|
|
125
|
+
console.log('');
|
|
126
|
+
|
|
127
|
+
console.log(' 📖 Quick Start:');
|
|
128
|
+
console.log(' 1. Open Antigravity');
|
|
129
|
+
console.log(' 2. Type /vibecoder-guide');
|
|
130
|
+
console.log(' 3. Start vibecoding!');
|
|
131
|
+
console.log('');
|
|
132
|
+
console.log(' 🗺️ Sprint Flow:');
|
|
133
|
+
console.log(' /init → /brainstorm → /plan → /code → /review → /deploy');
|
|
134
|
+
console.log('');
|
|
135
|
+
console.log(' 📚 Docs: ~/.gemini/antigravity/docs/');
|
|
136
|
+
console.log('');
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
try {
|
|
140
|
+
main();
|
|
141
|
+
} catch (err) {
|
|
142
|
+
console.error(COLORS.red(`\n ❌ Setup failed: ${err.message}\n`));
|
|
143
|
+
process.exit(1);
|
|
144
|
+
}
|
package/bin/uninstall.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* AWF Vibecoder Kit — Uninstall Script
|
|
5
|
+
* Lists files that were installed (does not delete — user decides).
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const fs = require('fs');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
const os = require('os');
|
|
11
|
+
|
|
12
|
+
const HOME = os.homedir();
|
|
13
|
+
const TARGET_BASE = path.join(HOME, '.gemini', 'antigravity');
|
|
14
|
+
|
|
15
|
+
console.log('');
|
|
16
|
+
console.log(' ⚠️ AWF Vibecoder Kit — Uninstall');
|
|
17
|
+
console.log(' ─────────────────────────────────────');
|
|
18
|
+
console.log('');
|
|
19
|
+
console.log(' AWF files are installed at:');
|
|
20
|
+
console.log(` 📁 ${TARGET_BASE}`);
|
|
21
|
+
console.log('');
|
|
22
|
+
console.log(' To uninstall, manually delete these folders:');
|
|
23
|
+
console.log(' - global_workflows/ (AWF workflow files)');
|
|
24
|
+
console.log(' - docs/ (AWF documentation)');
|
|
25
|
+
console.log(' - skills/ (AWF auto-skills)');
|
|
26
|
+
console.log('');
|
|
27
|
+
console.log(' ⚠️ This will NOT delete your project data or .brain/ files.');
|
|
28
|
+
console.log('');
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# 📖 AWF v5 — Tài Liệu Hướng Dẫn
|
|
2
|
+
|
|
3
|
+
> **AWF** (Antigravity Workflow Framework) — Bộ công cụ biến AI thành đội ngũ phát triển phần mềm ảo.
|
|
4
|
+
> Bạn chỉ cần nói ý tưởng, AI lo phần còn lại.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 📂 Mục Lục Tài Liệu
|
|
9
|
+
|
|
10
|
+
| # | File | Nội dung | Dành cho ai |
|
|
11
|
+
|---|------|---------|-------------|
|
|
12
|
+
| 1 | [quick-start.md](quick-start.md) | Bắt đầu trong 5 phút | Tất cả |
|
|
13
|
+
| 2 | [commands.md](commands.md) | 16 lệnh chi tiết + ví dụ | Tất cả |
|
|
14
|
+
| 3 | [skills.md](skills.md) | ~50 skills ẩn — AI tự kích hoạt | Người muốn hiểu sâu |
|
|
15
|
+
| 4 | [scenarios.md](scenarios.md) | 8 kịch bản thực tế A→Z | Tất cả |
|
|
16
|
+
| 5 | [glossary.md](glossary.md) | Thuật ngữ giải thích đời thường | Người mới |
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 🎯 Đọc Gì Trước?
|
|
21
|
+
|
|
22
|
+
**Nếu mới bắt đầu:** Đọc `quick-start.md` → `commands.md` → `scenarios.md`
|
|
23
|
+
|
|
24
|
+
**Nếu đã dùng AWF:** Đọc `commands.md` (phần "Mới ở v5") → `skills.md`
|
|
25
|
+
|
|
26
|
+
**Nếu muốn tra cứu nhanh:** Mở `commands.md` → tìm lệnh cần dùng
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 🔗 Sprint Flow
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
/init → /brainstorm → /plan → /design → /code → /review → /test → /deploy → /canary
|
|
34
|
+
↑ ↓
|
|
35
|
+
└────────────────────── /recap ←──────────────────────────────── /save-brain ←─┘
|
|
36
|
+
(quay lại khi mở project) (cuối buổi làm việc)
|
|
37
|
+
```
|
package/docs/commands.md
ADDED
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
# 📋 Danh Sách Lệnh — 16 Lệnh Chính Của AWF v5
|
|
2
|
+
|
|
3
|
+
> Mỗi lệnh bắt đầu bằng `/`. Gõ trong chat Antigravity.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🗺️ Bản Đồ: Dùng Lệnh Nào Khi Nào?
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
Muốn bắt đầu project mới?
|
|
11
|
+
└→ /init
|
|
12
|
+
|
|
13
|
+
Có ý tưởng mơ hồ?
|
|
14
|
+
└→ /brainstorm
|
|
15
|
+
|
|
16
|
+
Đã biết muốn làm gì?
|
|
17
|
+
└→ /plan → /design → /code
|
|
18
|
+
|
|
19
|
+
Code xong, muốn kiểm tra?
|
|
20
|
+
└→ /review → /test
|
|
21
|
+
|
|
22
|
+
Muốn đưa app lên mạng?
|
|
23
|
+
└→ /deploy → /canary
|
|
24
|
+
|
|
25
|
+
Cuối buổi làm việc?
|
|
26
|
+
└→ /save-brain
|
|
27
|
+
|
|
28
|
+
Mở lại project sau 1 thời gian?
|
|
29
|
+
└→ /recap
|
|
30
|
+
|
|
31
|
+
Gặp lỗi?
|
|
32
|
+
└→ /debug
|
|
33
|
+
|
|
34
|
+
Không biết làm gì tiếp?
|
|
35
|
+
└→ /next hoặc /help
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 📖 Chi Tiết Từng Lệnh
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
### ✨ `/init` — Tạo Dự Án Mới
|
|
45
|
+
|
|
46
|
+
**Khi nào:** Bắt đầu 1 project hoàn toàn mới.
|
|
47
|
+
|
|
48
|
+
**AI sẽ hỏi:** Tên project, mô tả ngắn, tạo ở đâu.
|
|
49
|
+
|
|
50
|
+
**Output:** Folder project với `.brain/` (bộ nhớ AI) + `docs/` + `README.md`
|
|
51
|
+
|
|
52
|
+
**KHÔNG làm gì thêm** — chưa install package, chưa tạo code. Mọi thứ để các lệnh sau lo.
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
Ví dụ:
|
|
56
|
+
/init
|
|
57
|
+
→ "Tên dự án?" → my-crm
|
|
58
|
+
→ "Mô tả?" → CRM quản lý khách hàng
|
|
59
|
+
→ ✅ Đã tạo workspace!
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### 💡 `/brainstorm` — Khám Phá Ý Tưởng 🆕 v5
|
|
65
|
+
|
|
66
|
+
**Khi nào:** Có ý tưởng mơ hồ, cần AI giúp làm rõ trước khi code.
|
|
67
|
+
|
|
68
|
+
**Cách hoạt động:**
|
|
69
|
+
1. AI hỏi **5 câu bắt buộc** (tại sao? ai dùng? đã có gì? không làm thì sao? nhỏ nhất là gì?)
|
|
70
|
+
2. AI **đặt lại vấn đề** — đôi khi vấn đề thật khác hoàn toàn feature request
|
|
71
|
+
3. AI **challenge giả định** — phản biện để bạn suy nghĩ kỹ hơn
|
|
72
|
+
4. AI đưa **3 giải pháp** (Quick Win / Balanced / Full Vision)
|
|
73
|
+
5. Bạn chọn → AI tạo **Design Brief** tự động
|
|
74
|
+
|
|
75
|
+
**Tại sao quan trọng:** 5 phút brainstorm tiết kiệm 5 ngày code sai hướng.
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
Ví dụ:
|
|
79
|
+
/brainstorm app quản lý nhân sự
|
|
80
|
+
→ AI hỏi 5 câu → phát hiện: "Anh không cần app quản lý nhân sự.
|
|
81
|
+
Anh cần app RECRUITMENT — theo dõi ứng viên qua từng vòng."
|
|
82
|
+
→ Đưa 3 giải pháp → Bạn chọn Balanced
|
|
83
|
+
→ ✅ Design Brief đã lưu tại .brain/design-brief.md
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### 📋 `/plan` — Lên Kế Hoạch Chi Tiết
|
|
89
|
+
|
|
90
|
+
**Khi nào:** Đã biết muốn làm gì, cần kế hoạch cụ thể.
|
|
91
|
+
|
|
92
|
+
**Cách hoạt động:**
|
|
93
|
+
1. AI hỏi 3 câu nhanh (quản lý gì? / ai dùng? / quan trọng nhất?)
|
|
94
|
+
2. AI đề xuất kiến trúc (tự chọn tech stack)
|
|
95
|
+
3. Bạn duyệt: OK / Chỉnh sửa / Từ đầu
|
|
96
|
+
4. AI tạo plan chi tiết → chia phases → list tasks mỗi phase
|
|
97
|
+
|
|
98
|
+
**Output:** Folder `plans/` với `plan.md` + `phase-01.md`, `phase-02.md`...
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
Ví dụ:
|
|
102
|
+
/plan
|
|
103
|
+
→ Plan: 6 phases, 56 tasks
|
|
104
|
+
→ Phase 01: Setup (5 tasks)
|
|
105
|
+
→ Phase 02: Database (8 tasks)
|
|
106
|
+
→ ...
|
|
107
|
+
→ "Bắt đầu Phase 1? Gõ /code phase-01"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
### 🎨 `/design` — Thiết Kế Kỹ Thuật
|
|
113
|
+
|
|
114
|
+
**Khi nào:** Sau `/plan`, trước `/code`. Thiết kế database, API, luồng hoạt động.
|
|
115
|
+
|
|
116
|
+
**Output:** File `docs/DESIGN.md` với sơ đồ database, danh sách màn hình, user journey, test criteria.
|
|
117
|
+
|
|
118
|
+
**Giải thích đời thường:** Nếu `/plan` là "biết LÀM GÌ", thì `/design` là "biết LÀM NHƯ THẾ NÀO".
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
### 🖼️ `/visualize` — Thiết Kế Giao Diện (UI)
|
|
123
|
+
|
|
124
|
+
**Khi nào:** Muốn xem UI trước khi code. Tạo mockup.
|
|
125
|
+
|
|
126
|
+
**Output:** Hình ảnh mockup của các màn hình app.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
### 💻 `/code` — Viết Code
|
|
131
|
+
|
|
132
|
+
**Khi nào:** Đã có plan, bắt đầu code.
|
|
133
|
+
|
|
134
|
+
**Cách dùng:**
|
|
135
|
+
| Lệnh | Ý nghĩa |
|
|
136
|
+
|-------|---------|
|
|
137
|
+
| `/code phase-01` | Code phase 1 trong plan |
|
|
138
|
+
| `/code phase-02` | Code phase 2 |
|
|
139
|
+
| `/code all-phases` | Code tất cả phases liên tục |
|
|
140
|
+
| `/code thêm dark mode` | Code feature cụ thể (không cần plan) |
|
|
141
|
+
|
|
142
|
+
**Tính năng đặc biệt:**
|
|
143
|
+
- **Auto Test Loop:** Code → test → fail → tự fix → test lại (max 3 lần)
|
|
144
|
+
- **Quality Level:** Hỏi bạn muốn MVP (nhanh) / Production (chuẩn) / Enterprise (scale)
|
|
145
|
+
- **Auto Checkpoint:** Tự lưu progress sau mỗi task
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
### 👀 `/review` — Kiểm Tra Code 🆕 v5
|
|
150
|
+
|
|
151
|
+
**Khi nào:** Sau khi code xong, TRƯỚC khi deploy. **Đừng bao giờ skip bước này.**
|
|
152
|
+
|
|
153
|
+
**Cách hoạt động:**
|
|
154
|
+
1. AI scan tất cả code đã thay đổi
|
|
155
|
+
2. **Tự fix** lỗi rõ ràng (imports, console.log, unused vars...)
|
|
156
|
+
3. **Hỏi bạn** lỗi cần judgment (race conditions, logic bugs)
|
|
157
|
+
4. Chạy checklist: Security / Error Handling / Performance
|
|
158
|
+
5. Đưa **verdict**: READY TO SHIP hoặc NEEDS WORK
|
|
159
|
+
|
|
160
|
+
**Trước v5:** `/review` chỉ là báo cáo tổng quan project.
|
|
161
|
+
**Từ v5:** `/review` tìm bug thật, fix thật, đánh giá production-readiness.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
### 🧪 `/test` — Chạy Test
|
|
166
|
+
|
|
167
|
+
**Khi nào:** Kiểm tra code chạy đúng.
|
|
168
|
+
|
|
169
|
+
| Lệnh | Ý nghĩa |
|
|
170
|
+
|-------|---------|
|
|
171
|
+
| `/test` | Chạy tất cả test |
|
|
172
|
+
| `/test src/auth.ts` | Tạo test cho file cụ thể |
|
|
173
|
+
| `/test coverage` | Xem test coverage |
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
### 🚀 `/deploy` — Đưa App Lên Mạng
|
|
178
|
+
|
|
179
|
+
**Khi nào:** App đã sẵn sàng, muốn public.
|
|
180
|
+
|
|
181
|
+
**Cách hoạt động:**
|
|
182
|
+
1. Chạy pre-flight checks (TypeScript, ESLint, tests, security)
|
|
183
|
+
2. Build app
|
|
184
|
+
3. Deploy lên platform (Vercel, Railway, Fly.io, Docker...)
|
|
185
|
+
4. Health check
|
|
186
|
+
|
|
187
|
+
| Lệnh | Ý nghĩa |
|
|
188
|
+
|-------|---------|
|
|
189
|
+
| `/deploy` | Deploy wizard |
|
|
190
|
+
| `/deploy check` | Chỉ kiểm tra, chưa deploy |
|
|
191
|
+
| `/deploy preview` | Deploy bản preview/staging |
|
|
192
|
+
| `/deploy production` | Deploy bản chính thức |
|
|
193
|
+
| `/deploy rollback` | Quay lại phiên bản trước |
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
### 🐤 `/canary` — Kiểm Tra Sau Deploy 🆕 v5
|
|
198
|
+
|
|
199
|
+
**Khi nào:** Vừa deploy xong, muốn chắc app chạy ổn.
|
|
200
|
+
|
|
201
|
+
**Kiểm tra:** Homepage load, API health, console errors, Core Web Vitals.
|
|
202
|
+
|
|
203
|
+
```
|
|
204
|
+
Ví dụ:
|
|
205
|
+
/canary https://myapp.com
|
|
206
|
+
→ Homepage: ✅ 200 OK (1.2s)
|
|
207
|
+
→ API Health: ✅ OK
|
|
208
|
+
→ Console Errors: ✅ None
|
|
209
|
+
→ Performance: ⚠️ LCP 3.2s (cần cải thiện)
|
|
210
|
+
→ 💚 Overall: HEALTHY
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
### 🐛 `/debug` — Tìm Và Sửa Lỗi
|
|
216
|
+
|
|
217
|
+
**Khi nào:** App bị lỗi, cần tìm nguyên nhân.
|
|
218
|
+
|
|
219
|
+
**Cách hoạt động:**
|
|
220
|
+
1. Thu thập thông tin lỗi
|
|
221
|
+
2. Đặt giả thuyết (3 nguyên nhân có thể)
|
|
222
|
+
3. Kiểm tra từng giả thuyết
|
|
223
|
+
4. Fix + giải thích root cause
|
|
224
|
+
5. Gợi ý cách phòng ngừa
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
Ví dụ:
|
|
228
|
+
/debug login không hoạt động
|
|
229
|
+
→ Giả thuyết 1: Token hết hạn ← Đúng!
|
|
230
|
+
→ Fix: Thêm refresh token logic
|
|
231
|
+
→ Prevention: Test token expiry trong test suite
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
### 🔒 `/freeze` — Khóa Phạm Vi Sửa File 🆕 v5
|
|
237
|
+
|
|
238
|
+
**Khi nào:** Đang debug, sợ AI "tiện tay" sửa file không liên quan.
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
/freeze src/lib/auth.ts → Chỉ cho sửa file auth.ts
|
|
242
|
+
/freeze src/components/ → Chỉ cho sửa trong components/
|
|
243
|
+
/unfreeze → Mở khóa
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
**Tự động:** Khi gõ `/debug file.ts`, AI tự freeze scope vào folder chứa file đó.
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
### 🔒 `/audit` — Kiểm Tra Bảo Mật
|
|
251
|
+
|
|
252
|
+
**Khi nào:** Trước khi public app. Kiểm tra SQL injection, XSS, auth bypass...
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
### 📖 `/recap` — Nhớ Lại Đang Làm Gì
|
|
257
|
+
|
|
258
|
+
**Khi nào:** Mở lại project sau 1 thời gian (1 ngày, 1 tuần, 1 tháng).
|
|
259
|
+
|
|
260
|
+
AI đọc `.brain/` → nhớ lại bạn đang ở phase nào, làm gì dở, cần làm gì tiếp.
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
### 🧠 `/save-brain` — Lưu Context
|
|
265
|
+
|
|
266
|
+
**Khi nào:** Cuối mỗi buổi làm việc. Để AI nhớ context cho session sau.
|
|
267
|
+
|
|
268
|
+
**Nếu quên:** Session sau AI sẽ không biết bạn đã làm gì → phải giải thích lại.
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
### 📚 `/learn` — Quản Lý Kiến Thức 🆕 v5
|
|
273
|
+
|
|
274
|
+
**Khi nào:** Xem/thêm bài học AI đã học qua các session.
|
|
275
|
+
|
|
276
|
+
```
|
|
277
|
+
/learn → Xem tất cả learnings
|
|
278
|
+
/learn search prisma → Tìm learning liên quan Prisma
|
|
279
|
+
/learn prune → Dọn dẹp learnings cũ
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
**Auto-learn:** AI tự lưu khi fix bug khó, khi bạn sửa code AI viết, khi retry 3+ lần.
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
### 🔧 `/refactor` — Dọn Dẹp Code
|
|
287
|
+
|
|
288
|
+
**Khi nào:** Code chạy rồi nhưng lộn xộn, cần restructure.
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
### ➡️ `/next` — Gợi Ý Bước Tiếp Theo
|
|
293
|
+
|
|
294
|
+
**Khi nào:** Không biết gõ gì tiếp.
|
|
295
|
+
|
|
296
|
+
AI đọc context → gợi ý lệnh phù hợp nhất lúc này.
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
### ❓ `/help` — Trợ Giúp
|
|
301
|
+
|
|
302
|
+
**Khi nào:** Cần hỏi về AWF, lệnh nào làm gì.
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## Tiếp Theo: [Skills ẩn — AI tự kích hoạt →](skills.md)
|