@leejungkiin/awkit 1.1.1 → 1.1.2
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/core/GEMINI.md +14 -17
- package/package.json +2 -2
- package/skills/orchestrator/SKILL.md +0 -4
- package/skills/symphony-enforcer/SKILL.md +188 -53
- package/templates/specs/PROJECT.md +50 -0
- package/templates/specs/ROADMAP.md +79 -0
- package/templates/specs/TECH-SPEC.md +81 -0
- package/templates/specs/task-spec-template.xml +65 -0
- package/workflows/lifecycle/init.md +103 -91
package/core/GEMINI.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# GEMINI.md — Antigravity
|
|
1
|
+
# GEMINI.md — Antigravity v11.0
|
|
2
2
|
|
|
3
|
-
> Rules + routing only. Gate details → skills. Updated: 2026-03-
|
|
3
|
+
> Rules + routing only. Gate details → skills. Updated: 2026-03-18
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
- Bạn là **Antigravity Orchestrator**.
|
|
10
10
|
- Pragmatic. Regression-averse. Symphony-first. Multi-project.
|
|
11
|
-
- Luôn khai báo mô hình trước mỗi câu trả lời
|
|
12
11
|
|
|
13
12
|
---
|
|
14
13
|
|
|
@@ -33,8 +32,9 @@ Mỗi skill tự xử lý gate logic riêng — xem SKILL.md của từng skill.
|
|
|
33
32
|
|
|
34
33
|
### Exit Protocol
|
|
35
34
|
|
|
36
|
-
- Task done →
|
|
37
|
-
-
|
|
35
|
+
- Task done → auto-complete Symphony → **BẮT BUỘC** `symphony next` + present gợi ý.
|
|
36
|
+
- Kết thúc message → **LUÔN** kèm "Next steps" section.
|
|
37
|
+
- `nm-memory-sync` auto-save (W1–W4 triggers).
|
|
38
38
|
- Deploy/push → kiểm tra in-progress tasks trước, confirm với user.
|
|
39
39
|
|
|
40
40
|
---
|
|
@@ -50,6 +50,11 @@ Mỗi skill tự xử lý gate logic riêng — xem SKILL.md của từng skill.
|
|
|
50
50
|
- AI models: Gemini 2.5+ only.
|
|
51
51
|
- Firebase: Firebase AI Logic SDK.
|
|
52
52
|
|
|
53
|
+
### Spec-First (NEW v11.0)
|
|
54
|
+
- PLANNING mode PHẢI đọc `docs/specs/` **trước** khi viết `implementation_plan.md`.
|
|
55
|
+
- Mỗi task trong plan NÊN có format XML `<task>` (xem `templates/specs/task-spec-template.xml`).
|
|
56
|
+
- `implementation_plan.md` PHẢI reference `TECH-SPEC.md` constraints khi relevant.
|
|
57
|
+
|
|
53
58
|
### NeuralMemory
|
|
54
59
|
- Brain = projectId. Switch trước mọi nmem call.
|
|
55
60
|
- Mọi `nmem_remember()` PHẢI tag projectId.
|
|
@@ -62,16 +67,8 @@ Mỗi skill tự xử lý gate logic riêng — xem SKILL.md của từng skill.
|
|
|
62
67
|
- Kết thúc task: Tóm tắt + Test + Next steps.
|
|
63
68
|
- Không rõ: Hỏi lại, tối đa 2 lần.
|
|
64
69
|
|
|
65
|
-
### Project Context
|
|
66
|
-
|
|
67
|
-
> [!CAUTION]
|
|
68
|
-
> TRƯỚC KHI dùng `grep_search` / `codebase_search` / `list_dir` → **PHẢI đọc CODEBASE.md** của project đó.
|
|
69
|
-
> Bỏ qua = vi phạm. KHÔNG CÓ NGOẠI LỆ.
|
|
70
|
-
|
|
71
|
-
- **Quy trình bắt buộc:** Đọc CODEBASE.md → xác định file/layer target → search cụ thể.
|
|
72
|
-
- **KHÔNG search "mù"** (search mà chưa biết project structure).
|
|
73
|
-
- CODEBASE.md là **bản đồ project** — dạng compact (path + purpose). Đọc nhanh, tốn ít context.
|
|
74
|
-
- KHÔNG scan raw directory (`list_dir`, `find_by_name`) nếu đã có CODEBASE.md.
|
|
70
|
+
### Project Context
|
|
71
|
+
- CODEBASE.md tồn tại → KHÔNG scan raw directory.
|
|
75
72
|
- KHÔNG hỏi user về project structure.
|
|
76
73
|
- CODEBASE.md outdated → ghi chú "⚠️ dùng /codebase-sync".
|
|
77
74
|
|
|
@@ -88,9 +85,9 @@ Mỗi skill tự xử lý gate logic riêng — xem SKILL.md của từng skill.
|
|
|
88
85
|
|
|
89
86
|
## Routing
|
|
90
87
|
|
|
91
|
-
- **Execution order:** `symphony-orchestrator` → `awf-session-restore` → `nm-memory-sync` → `orchestrator` → action
|
|
88
|
+
- **Execution order:** `symphony-orchestrator` → `awf-session-restore` → `nm-memory-sync` → `symphony-enforcer` → `orchestrator` → action
|
|
92
89
|
- **Skill catalog:** xem `orchestrator/SKILL.md`
|
|
93
|
-
- **Workflows:** 75+ (`/xxx`). Core: `/
|
|
90
|
+
- **Workflows:** 75+ (`/xxx`). Core: `/init` `/code` `/debug` `/recap` `/next` `/todo`
|
|
94
91
|
- **Shortcuts:** `/todo` `/done` `/next`
|
|
95
92
|
|
|
96
93
|
---
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leejungkiin/awkit",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "AWKit v1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
|
+
"description": "AWKit v1.1.2 — Antigravity Workflow Kit. Unified AI agent orchestration system.",
|
|
5
5
|
"main": "bin/awk.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"awkit": "bin/awk.js",
|
|
@@ -40,10 +40,6 @@ context_intent:
|
|
|
40
40
|
ads_intent:
|
|
41
41
|
keywords: ["ads", "campaign", "CPI", "ROAS", "quảng cáo"]
|
|
42
42
|
action: Suggest `/ads-audit` or `/adsExpert`
|
|
43
|
-
|
|
44
|
-
conductor_intent:
|
|
45
|
-
keywords: ["analyze project", "phân tích project", "review toàn bộ", "cross-module", "refactor lớn", "conductor", "CLI analysis", "second opinion", "kiến trúc tổng"]
|
|
46
|
-
action: Auto-activate `gemini-conductor` skill or suggest `/conductor`
|
|
47
43
|
```
|
|
48
44
|
|
|
49
45
|
### 3. Skill Pack Check
|
|
@@ -4,12 +4,13 @@ description: |
|
|
|
4
4
|
Mandatory Symphony checkpoint system. Ensures AI never forgets to create,
|
|
5
5
|
update, or complete tasks in Symphony. Enforces progress reporting at every
|
|
6
6
|
milestone and auto-detects task completion without waiting for user confirmation.
|
|
7
|
+
v3.1: Pre-Plan Gate, Auto-Lifecycle, Auto-Next, Atomic Git Commits.
|
|
7
8
|
metadata:
|
|
8
9
|
stage: core
|
|
9
|
-
version: "
|
|
10
|
-
replaces:
|
|
10
|
+
version: "3.1"
|
|
11
|
+
replaces: "v2.0"
|
|
11
12
|
requires: symphony-orchestrator
|
|
12
|
-
tags: [symphony, enforcement, checkpoint, task-lifecycle, core]
|
|
13
|
+
tags: [symphony, enforcement, checkpoint, task-lifecycle, core, spec-first, auto-next]
|
|
13
14
|
agent: Symphony Enforcer
|
|
14
15
|
allowed-tools:
|
|
15
16
|
- symphony_create_task
|
|
@@ -23,11 +24,15 @@ invocation-type: auto
|
|
|
23
24
|
priority: 1
|
|
24
25
|
---
|
|
25
26
|
|
|
26
|
-
# Symphony Enforcer —
|
|
27
|
+
# Symphony Enforcer v3.1 — Spec-First + Auto-Lifecycle + Auto-Next + Atomic Commits
|
|
27
28
|
|
|
28
29
|
> **Purpose:** Đảm bảo AI KHÔNG BAO GIỜ quên cập nhật Symphony.
|
|
29
|
-
> **
|
|
30
|
-
> **
|
|
30
|
+
> **Key Changes v3.1:**
|
|
31
|
+
> - **Pre-Plan Gate**: Đọc spec trước khi plan, hỏi user về constraints
|
|
32
|
+
> - **Auto-Lifecycle**: Liên kết task_boundary ↔ Symphony tự động
|
|
33
|
+
> - **Auto-Next**: BẮT BUỘC gợi ý next steps sau mỗi task done
|
|
34
|
+
> - **Atomic Git Commits**: Tự động commit sau mỗi task done (NEW v3.1)
|
|
35
|
+
> **Principle:** AI tự detect completion — user KHÔNG CẦN nói "xong".
|
|
31
36
|
|
|
32
37
|
---
|
|
33
38
|
|
|
@@ -35,34 +40,28 @@ priority: 1
|
|
|
35
40
|
|
|
36
41
|
```
|
|
37
42
|
KHÔNG CÓ NGOẠI LỆ:
|
|
38
|
-
- Mọi code/debug/plan task PHẢI qua STRICT STARTUP PROTOCOL
|
|
43
|
+
- Mọi code/debug/plan task PHẢI qua STRICT STARTUP PROTOCOL
|
|
39
44
|
- Mọi milestone PHẢI report progress
|
|
40
45
|
- AI tự detect completion và auto-complete task
|
|
46
|
+
- Task done → PHẢI atomic git commit trước khi suggest next
|
|
47
|
+
- Kết thúc task PHẢI kèm next suggestion
|
|
41
48
|
- BỎ QUA BẤT KỲ STEP NÀO = VI PHẠM
|
|
42
49
|
```
|
|
43
50
|
|
|
44
51
|
---
|
|
45
52
|
|
|
46
|
-
## 🔒 STRICT STARTUP PROTOCOL (BẮT BUỘC
|
|
53
|
+
## 🔒 STRICT STARTUP PROTOCOL (BẮT BUỘC)
|
|
47
54
|
|
|
48
|
-
Mỗi khi bắt đầu task code/debug/plan, AI PHẢI đi qua **
|
|
49
|
-
KHÔNG được bắt đầu work cho đến khi TẤT CẢ
|
|
50
|
-
|
|
51
|
-
> **Note:** Symphony server + project registration đã được `symphony-orchestrator` xử lý
|
|
52
|
-
> trước khi skill này chạy. Enforcer chỉ lo `.project-identity` → Brain → Task.
|
|
55
|
+
Mỗi khi bắt đầu task code/debug/plan, AI PHẢI đi qua **5 steps tuần tự**.
|
|
56
|
+
KHÔNG được bắt đầu work cho đến khi TẤT CẢ steps ✅.
|
|
53
57
|
|
|
54
58
|
### Step 1: Project Identity — `.project-identity`
|
|
55
59
|
|
|
56
60
|
```
|
|
57
|
-
→ Kiểm tra: file .project-identity có tồn tại
|
|
58
|
-
→ CÓ → Đọc projectId, projectName
|
|
59
|
-
→ KHÔNG → ⛔ DỪNG
|
|
60
|
-
|
|
61
|
-
"id": "project-slug",
|
|
62
|
-
"name": "Project Name",
|
|
63
|
-
"path": "/absolute/path"
|
|
64
|
-
}
|
|
65
|
-
→ Output: "📋 Step 1/4: Project Identity ✅ — {projectId}"
|
|
61
|
+
→ Kiểm tra: file .project-identity có tồn tại?
|
|
62
|
+
→ CÓ → Đọc projectId, projectName
|
|
63
|
+
→ KHÔNG → ⛔ DỪNG. Hỏi user hoặc tạo .project-identity.
|
|
64
|
+
→ Output: "📋 Step 1/5: Project Identity ✅ — {projectId}"
|
|
66
65
|
```
|
|
67
66
|
|
|
68
67
|
### Step 2: NeuralMemory Brain — Switch brain
|
|
@@ -70,42 +69,74 @@ KHÔNG được bắt đầu work cho đến khi TẤT CẢ 4 steps đều ✅.
|
|
|
70
69
|
```
|
|
71
70
|
→ nmem brain use <projectId>
|
|
72
71
|
→ nmem_recap(level=1) — load context
|
|
73
|
-
→ Output: "🧠 Step 2/
|
|
72
|
+
→ Output: "🧠 Step 2/5: Brain ✅ — switched to {projectId}"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Step 3: Spec Alignment — Đọc Project Spec (NEW v3.0)
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
→ Kiểm tra: docs/specs/PROJECT.md tồn tại?
|
|
79
|
+
→ CÓ → Đọc silent: PROJECT.md + TECH-SPEC.md + REQUIREMENTS.md
|
|
80
|
+
→ Extract constraints liên quan đến task hiện tại
|
|
81
|
+
→ NẾU PLANNING mode:
|
|
82
|
+
- Hỏi user 1-3 câu về constraints/UX cụ thể của feature
|
|
83
|
+
- Ví dụ: "Feature này cần offline support không?"
|
|
84
|
+
- Ví dụ: "UI nên dạng list hay cards?"
|
|
85
|
+
→ Output: "📐 Step 3/5: Spec Aligned ✅"
|
|
86
|
+
→ KHÔNG → Skip (project chưa /init) → "📐 Step 3/5: No spec — skipped"
|
|
74
87
|
```
|
|
75
88
|
|
|
76
|
-
|
|
89
|
+
> **Quan trọng:** Nếu TECH-SPEC.md có "Constraints & Non-Negotiables",
|
|
90
|
+
> AI PHẢI tuân thủ chúng trong implementation_plan.md.
|
|
91
|
+
|
|
92
|
+
### Step 4: Symphony Task — Tạo hoặc nhận task
|
|
77
93
|
|
|
78
94
|
```
|
|
79
95
|
→ symphony_available_tasks(filter="my") → check active tasks
|
|
80
96
|
→ CÓ task in_progress phù hợp → dùng tiếp
|
|
81
97
|
→ CÓ task ready phù hợp → symphony_claim_task
|
|
82
|
-
→ KHÔNG CÓ → symphony_create_task(title
|
|
83
|
-
|
|
84
|
-
→
|
|
85
|
-
→ Output: "🎯 Step 3/4: Task ✅ — #sym-XYZ claimed"
|
|
98
|
+
→ KHÔNG CÓ → symphony_create_task(title) → symphony_claim_task(new_id)
|
|
99
|
+
→ Lưu task_id cho TP1-TP4
|
|
100
|
+
→ Output: "🎯 Step 4/5: Task ✅ — #sym-XYZ claimed"
|
|
86
101
|
```
|
|
87
102
|
|
|
88
|
-
### Step
|
|
103
|
+
### Step 5: Confirmation Block
|
|
89
104
|
|
|
90
105
|
```
|
|
91
106
|
🚦 STARTUP PROTOCOL COMPLETE
|
|
92
107
|
══════════════════════════════════════
|
|
93
108
|
Step 1: 📋 Project Identity ✅ {projectId}
|
|
94
109
|
Step 2: 🧠 NeuralMemory ✅ brain: {projectId}
|
|
95
|
-
Step 3:
|
|
96
|
-
Step 4: ✅
|
|
110
|
+
Step 3: 📐 Spec Alignment ✅ {constraints_count} constraints loaded
|
|
111
|
+
Step 4: 🎯 Task ✅ #sym-XYZ — "{title}"
|
|
112
|
+
Step 5: ✅ READY TO WORK
|
|
97
113
|
══════════════════════════════════════
|
|
98
114
|
```
|
|
99
115
|
|
|
100
|
-
> ⛔ **Nếu KHÔNG hiển thị confirmation block = VI PHẠM
|
|
116
|
+
> ⛔ **Nếu KHÔNG hiển thị confirmation block = VI PHẠM**
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Auto-Lifecycle: task_boundary ↔ Symphony (NEW v3.0)
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
LIÊN KẾT TỰ ĐỘNG:
|
|
124
|
+
- task_boundary(PLANNING) → symphony_create_task (nếu chưa có)
|
|
125
|
+
- task_boundary(EXECUTION) → symphony_report_progress(40%)
|
|
126
|
+
- task_boundary(VERIFICATION) → symphony_report_progress(80%)
|
|
127
|
+
- notify_user(BlockedOnUser=false) → TRIGGER TP2 (completion check)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
AI PHẢI giữ `current_task_id` xuyên suốt session.
|
|
131
|
+
Mỗi lần gọi `task_boundary` với mode mới → đồng thời report progress.
|
|
101
132
|
|
|
102
133
|
---
|
|
103
134
|
|
|
104
|
-
## Trigger Points
|
|
135
|
+
## Trigger Points
|
|
105
136
|
|
|
106
|
-
### TP1: Progress Milestone
|
|
137
|
+
### TP1: Progress Milestone
|
|
107
138
|
|
|
108
|
-
**Khi nào:**
|
|
139
|
+
**Khi nào:** Milestone xảy ra:
|
|
109
140
|
- Chuyển mode: PLANNING → EXECUTION → VERIFICATION
|
|
110
141
|
- Gọi `notify_user` (TRƯỚC khi gọi)
|
|
111
142
|
- Hoàn thành 1 component/file lớn
|
|
@@ -116,11 +147,11 @@ KHÔNG được bắt đầu work cho đến khi TẤT CẢ 4 steps đều ✅.
|
|
|
116
147
|
symphony_report_progress(
|
|
117
148
|
task_id=current_task,
|
|
118
149
|
progress=estimated_percentage,
|
|
119
|
-
last_action="mô tả ngắn
|
|
150
|
+
last_action="mô tả ngắn"
|
|
120
151
|
)
|
|
121
152
|
```
|
|
122
153
|
|
|
123
|
-
**Progress
|
|
154
|
+
**Progress Guide:**
|
|
124
155
|
```
|
|
125
156
|
10% — Task created, đang research/đọc code
|
|
126
157
|
25% — Implementation plan approved
|
|
@@ -137,7 +168,7 @@ symphony_report_progress(
|
|
|
137
168
|
|
|
138
169
|
---
|
|
139
170
|
|
|
140
|
-
### TP2: Task Complete —
|
|
171
|
+
### TP2: Task Complete — Auto-detect
|
|
141
172
|
|
|
142
173
|
**Khi nào:** AI detect ≥2/4 completion signals:
|
|
143
174
|
|
|
@@ -145,7 +176,7 @@ symphony_report_progress(
|
|
|
145
176
|
Signal 1: Final notify_user với BlockedOnUser=false
|
|
146
177
|
Signal 2: Walkthrough artifact đã tạo
|
|
147
178
|
Signal 3: Tất cả checklist items trong task.md đã [x]
|
|
148
|
-
Signal 4: Verification pass (tests
|
|
179
|
+
Signal 4: Verification pass (tests OK, build OK)
|
|
149
180
|
```
|
|
150
181
|
|
|
151
182
|
**Action:**
|
|
@@ -155,12 +186,55 @@ Signal 4: Verification pass (tests chạy OK, build thành công)
|
|
|
155
186
|
summary="mô tả ngắn kết quả"
|
|
156
187
|
)
|
|
157
188
|
2. Hiển thị: "✅ SYM #sym-XYZ — Done"
|
|
158
|
-
3.
|
|
189
|
+
3. → TRIGGER TP2.5 (Atomic Git Commit)
|
|
190
|
+
4. → TRIGGER TP4 (Auto-Next) NGAY LẬP TỨC
|
|
159
191
|
```
|
|
160
192
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
### TP2.5: Atomic Git Commit (NEW v3.1 — BẮT BUỘC)
|
|
196
|
+
|
|
197
|
+
**Khi nào:** Ngay sau TP2 (task completed), TRƯỚC TP4 (Auto-Next).
|
|
198
|
+
Chỉ trigger khi task có code changes (có files_changed).
|
|
199
|
+
|
|
200
|
+
**Action:**
|
|
201
|
+
```
|
|
202
|
+
1. Kiểm tra: git status --porcelain
|
|
203
|
+
→ Nếu KHÔNG CÓ changes → skip ("📝 No code changes to commit")
|
|
204
|
+
→ Nếu CÓ changes → tiếp tục
|
|
205
|
+
|
|
206
|
+
2. Xác định commit type từ task context:
|
|
207
|
+
→ PLANNING/EXECUTION mới → "feat"
|
|
208
|
+
→ Debug/fix → "fix"
|
|
209
|
+
→ Refactor/cleanup → "refactor"
|
|
210
|
+
→ Docs/specs → "docs"
|
|
211
|
+
|
|
212
|
+
3. Tạo commit message theo Conventional Commits:
|
|
213
|
+
→ Format: "{type}({scope}): {task_summary_ngắn}"
|
|
214
|
+
→ scope = module/feature name (từ task title)
|
|
215
|
+
→ Ví dụ: "feat(auth): implement login with Firebase"
|
|
216
|
+
→ Ví dụ: "fix(camera): resolve 10s delay on tab switch"
|
|
217
|
+
|
|
218
|
+
4. Stage & commit:
|
|
219
|
+
→ git add <files_changed từ symphony_complete_task>
|
|
220
|
+
→ Nếu không rõ files → git add -A (thận trọng)
|
|
221
|
+
→ git commit -m "{message}"
|
|
222
|
+
|
|
223
|
+
5. Hiển thị:
|
|
224
|
+
🔀 Atomic Commit: {short_hash} — "{message}"
|
|
225
|
+
📁 {N} files changed
|
|
226
|
+
|
|
227
|
+
6. ⚠️ KHÔNG AUTO-PUSH:
|
|
228
|
+
→ Chỉ commit local
|
|
229
|
+
→ Push = yêu cầu user confirm hoặc dùng /smart-git-ops
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**Enforcement:**
|
|
233
|
+
- ❌ KHÔNG được auto-push (chỉ commit local)
|
|
234
|
+
- ❌ KHÔNG được commit nếu có unresolved merge conflicts
|
|
235
|
+
- ❌ KHÔNG được commit files ngoài scope task
|
|
236
|
+
- ✅ NÊN commit ngay khi task done — đừng để accumulate
|
|
237
|
+
- ✅ Mỗi task = 1 commit (atomic, traceable)
|
|
164
238
|
|
|
165
239
|
---
|
|
166
240
|
|
|
@@ -173,14 +247,69 @@ Signal 4: Verification pass (tests chạy OK, build thành công)
|
|
|
173
247
|
|
|
174
248
|
**Action:**
|
|
175
249
|
```
|
|
176
|
-
symphony_abandon_task(
|
|
177
|
-
task_id=current_task,
|
|
178
|
-
reason="mô tả lý do"
|
|
179
|
-
)
|
|
250
|
+
symphony_abandon_task(task_id=current_task, reason="...")
|
|
180
251
|
```
|
|
181
252
|
|
|
182
253
|
---
|
|
183
254
|
|
|
255
|
+
### TP4: Auto-Next Suggestion (NEW v3.0 — BẮT BUỘC)
|
|
256
|
+
|
|
257
|
+
**Khi nào:** Ngay sau TP2 (task completed). KHÔNG ĐƯỢC BỎ QUA.
|
|
258
|
+
|
|
259
|
+
**Action:**
|
|
260
|
+
```
|
|
261
|
+
1. ĐỌC projectId từ .project-identity (đã có từ Step 1)
|
|
262
|
+
2. symphony task list -P <projectId> -s ready (CHỈ tasks cùng project)
|
|
263
|
+
⚠️ TUYỆT ĐỐI KHÔNG dùng filter="ready" không có project filter
|
|
264
|
+
⚠️ Dùng CLI: symphony task list -P <projectId> -s ready
|
|
265
|
+
⚠️ Hoặc MCP: symphony_available_tasks + parse project field
|
|
266
|
+
3. Lọc top 2-3 ready tasks theo priority
|
|
267
|
+
4. Present cho user:
|
|
268
|
+
|
|
269
|
+
➡️ NEXT STEPS ({projectName})
|
|
270
|
+
─────────────────────────────────
|
|
271
|
+
📋 #sym-A1 — Auth Module (P0, ready)
|
|
272
|
+
📋 #sym-A2 — Dashboard UI (P1, ready)
|
|
273
|
+
|
|
274
|
+
Bạn muốn tiếp tục với task nào?
|
|
275
|
+
|
|
276
|
+
5. Nếu KHÔNG CÓ ready tasks trong project hiện tại:
|
|
277
|
+
"✨ Không còn task ready cho {projectName}! Tạo task mới hoặc chuyển phase."
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
**Enforcement:**
|
|
281
|
+
- ❌ KHÔNG được kết thúc conversation mà KHÔNG present next suggestion
|
|
282
|
+
- ❌ KHÔNG được show tasks từ project khác
|
|
283
|
+
- Nếu quên filter projectId → vi phạm nghiêm trọng (cross-project contamination)
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## XML Task Spec trong Implementation Plans (NEW v3.0)
|
|
288
|
+
|
|
289
|
+
Khi PLANNING mode tạo `implementation_plan.md`, MỖI task NÊN dùng XML format:
|
|
290
|
+
|
|
291
|
+
```xml
|
|
292
|
+
<task type="auto">
|
|
293
|
+
<name>Task name</name>
|
|
294
|
+
<files>file1.swift, file2.swift</files>
|
|
295
|
+
<spec_ref>REQUIREMENTS.md § R1</spec_ref>
|
|
296
|
+
<depends_on>none</depends_on>
|
|
297
|
+
<action>Specific instructions</action>
|
|
298
|
+
<verify>How to verify completion</verify>
|
|
299
|
+
<done>Expected final state</done>
|
|
300
|
+
</task>
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
Template đầy đủ: `~/.gemini/antigravity/templates/specs/task-spec-template.xml`
|
|
304
|
+
|
|
305
|
+
Lợi ích:
|
|
306
|
+
- AI parse chính xác hơn markdown
|
|
307
|
+
- `<spec_ref>` ép buộc liên kết với project spec
|
|
308
|
+
- `<depends_on>` cho phép wave grouping (parallel execution)
|
|
309
|
+
- `<verify>` built-in verification step
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
184
313
|
## Ngoại lệ — Khi nào KHÔNG cần Startup Protocol
|
|
185
314
|
|
|
186
315
|
```
|
|
@@ -193,8 +322,6 @@ symphony_abandon_task(
|
|
|
193
322
|
|
|
194
323
|
## Sync Block Format
|
|
195
324
|
|
|
196
|
-
Mỗi khi sync, AI hiển thị dòng ngắn:
|
|
197
|
-
|
|
198
325
|
```
|
|
199
326
|
🎯 SYM #sym-XYZ — 40% → 70% "Implemented auth module"
|
|
200
327
|
```
|
|
@@ -202,6 +329,7 @@ Mỗi khi sync, AI hiển thị dòng ngắn:
|
|
|
202
329
|
Nếu completed:
|
|
203
330
|
```
|
|
204
331
|
✅ SYM #sym-XYZ — Done "Auth module with tests"
|
|
332
|
+
➡️ Next: #sym-A1 — Dashboard UI (P1)
|
|
205
333
|
```
|
|
206
334
|
|
|
207
335
|
---
|
|
@@ -211,17 +339,24 @@ Nếu completed:
|
|
|
211
339
|
| Tình huống | Xử lý |
|
|
212
340
|
|-----------|--------|
|
|
213
341
|
| Project chưa có .project-identity | ⛔ Dừng, tạo file trước |
|
|
342
|
+
| Project chưa có docs/specs/ | Skip Step 3, tiếp tục |
|
|
214
343
|
| Symphony server down | Start server, retry. Nếu fail → warning + tiếp tục |
|
|
215
344
|
| User follow-up nhỏ sau task done | ≤2 file changes → không cần task mới |
|
|
216
345
|
| Nhiều task cùng lúc | Track task_id riêng, report đúng task |
|
|
217
346
|
| User reopen task đã complete | Claim lại, resume từ progress cuối |
|
|
347
|
+
| Không có ready tasks cho TP4 | Gợi ý tạo phase tiếp theo |
|
|
218
348
|
|
|
219
349
|
---
|
|
220
350
|
|
|
221
351
|
## Learnings
|
|
222
352
|
|
|
223
353
|
- AI quên Symphony vì nó là "side task" — strict protocol biến nó thành MAIN flow
|
|
224
|
-
- Step-by-step sequential = AI không thể skip
|
|
225
|
-
- Confirmation block = visual proof cho user
|
|
226
|
-
- User KHÔNG muốn nói "xong" — AI phải tự detect completion
|
|
227
|
-
-
|
|
354
|
+
- Step-by-step sequential = AI không thể skip
|
|
355
|
+
- Confirmation block = visual proof cho user
|
|
356
|
+
- User KHÔNG muốn nói "xong" — AI phải tự detect completion
|
|
357
|
+
- Pre-Plan Discussion giúp plan đúng hướng từ đầu (learned from GSD)
|
|
358
|
+
- XML task format chính xác hơn markdown cho AI parsing (learned from GSD)
|
|
359
|
+
- Auto-Next giữ momentum — user không cần tự tìm task tiếp theo
|
|
360
|
+
- Spec alignment tránh plan bị lệch khỏi project constraints
|
|
361
|
+
- Atomic commits giúp rollback chính xác — 1 task = 1 commit (learned from GSD)
|
|
362
|
+
- KHÔNG auto-push — chỉ commit local, push cần user confirm
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} — Project Spec
|
|
2
|
+
|
|
3
|
+
> Created: {{DATE}} | Last Updated: {{DATE}}
|
|
4
|
+
|
|
5
|
+
## Vision
|
|
6
|
+
|
|
7
|
+
[1-2 sentences describing the core purpose and value proposition of this project.]
|
|
8
|
+
|
|
9
|
+
## Goals
|
|
10
|
+
|
|
11
|
+
1. **Primary Goal:** [What is the #1 thing this project must achieve?]
|
|
12
|
+
2. **Secondary Goal:** [What else matters?]
|
|
13
|
+
3. **Stretch Goal:** [Nice-to-have if time permits]
|
|
14
|
+
|
|
15
|
+
## Target Audience
|
|
16
|
+
|
|
17
|
+
| Segment | Description | Pain Point |
|
|
18
|
+
|---------|-------------|------------|
|
|
19
|
+
| Primary | [Who is the main user?] | [What problem do they face?] |
|
|
20
|
+
| Secondary | [Other user group] | [Their specific need] |
|
|
21
|
+
|
|
22
|
+
## Success Metrics
|
|
23
|
+
|
|
24
|
+
- [ ] **Metric 1:** [e.g., 1000 DAU within 3 months]
|
|
25
|
+
- [ ] **Metric 2:** [e.g., 4.5+ App Store rating]
|
|
26
|
+
- [ ] **Metric 3:** [e.g., < 2s cold start time]
|
|
27
|
+
|
|
28
|
+
## Scope
|
|
29
|
+
|
|
30
|
+
### In Scope (v1)
|
|
31
|
+
- Feature A
|
|
32
|
+
- Feature B
|
|
33
|
+
- Feature C
|
|
34
|
+
|
|
35
|
+
### Out of Scope (v1)
|
|
36
|
+
- Feature X (deferred to v2)
|
|
37
|
+
- Feature Y (requires further research)
|
|
38
|
+
|
|
39
|
+
## Key Decisions
|
|
40
|
+
|
|
41
|
+
| Decision | Choice | Rationale |
|
|
42
|
+
|----------|--------|-----------|
|
|
43
|
+
| [e.g., Backend] | [e.g., Firebase] | [Why this choice] |
|
|
44
|
+
| [e.g., State Mgmt] | [e.g., SwiftUI @Observable] | [Why] |
|
|
45
|
+
|
|
46
|
+
## References
|
|
47
|
+
|
|
48
|
+
- [Design inspiration link]
|
|
49
|
+
- [Competitor analysis link]
|
|
50
|
+
- [Technical reference]
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} — Roadmap
|
|
2
|
+
|
|
3
|
+
> Created: {{DATE}} | Last Updated: {{DATE}}
|
|
4
|
+
> Source of truth: PROJECT.md
|
|
5
|
+
|
|
6
|
+
## Overview
|
|
7
|
+
|
|
8
|
+
| Phase | Title | Status | Priority |
|
|
9
|
+
|-------|-------|--------|----------|
|
|
10
|
+
| 1 | [Phase title] | 🔲 Not Started | P0 |
|
|
11
|
+
| 2 | [Phase title] | 🔲 Not Started | P1 |
|
|
12
|
+
| 3 | [Phase title] | 🔲 Not Started | P2 |
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Phase 1: [Title] — [Target Date]
|
|
17
|
+
|
|
18
|
+
**Goal:** [What this phase delivers in 1 sentence]
|
|
19
|
+
|
|
20
|
+
**Requirements Covered:** REQUIREMENTS.md § R1, R2
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
- [ ] Feature 1.1 — [Short description]
|
|
24
|
+
- [ ] Feature 1.2 — [Short description]
|
|
25
|
+
- [ ] Feature 1.3 — [Short description]
|
|
26
|
+
|
|
27
|
+
### Dependencies
|
|
28
|
+
- [External service / API / library needed]
|
|
29
|
+
|
|
30
|
+
### Definition of Done
|
|
31
|
+
- [ ] All features functional
|
|
32
|
+
- [ ] Core tests passing
|
|
33
|
+
- [ ] No P0 bugs
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Phase 2: [Title] — [Target Date]
|
|
38
|
+
|
|
39
|
+
**Goal:** [What this phase delivers]
|
|
40
|
+
|
|
41
|
+
**Requirements Covered:** REQUIREMENTS.md § R3, R4
|
|
42
|
+
|
|
43
|
+
### Features
|
|
44
|
+
- [ ] Feature 2.1
|
|
45
|
+
- [ ] Feature 2.2
|
|
46
|
+
|
|
47
|
+
### Dependencies
|
|
48
|
+
- Phase 1 complete
|
|
49
|
+
|
|
50
|
+
### Definition of Done
|
|
51
|
+
- [ ] All features functional
|
|
52
|
+
- [ ] Integration tests passing
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Phase 3: [Title] — [Target Date]
|
|
57
|
+
|
|
58
|
+
**Goal:** [What this phase delivers]
|
|
59
|
+
|
|
60
|
+
**Requirements Covered:** REQUIREMENTS.md § R5+
|
|
61
|
+
|
|
62
|
+
### Features
|
|
63
|
+
- [ ] Feature 3.1
|
|
64
|
+
- [ ] Feature 3.2
|
|
65
|
+
|
|
66
|
+
### Definition of Done
|
|
67
|
+
- [ ] All features functional
|
|
68
|
+
- [ ] Performance benchmarks met
|
|
69
|
+
- [ ] Ready for production release
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Milestone Tracking
|
|
74
|
+
|
|
75
|
+
| Milestone | Target | Actual | Status |
|
|
76
|
+
|-----------|--------|--------|--------|
|
|
77
|
+
| MVP (Phase 1) | [Date] | — | 🔲 |
|
|
78
|
+
| Beta (Phase 2) | [Date] | — | 🔲 |
|
|
79
|
+
| Launch (Phase 3) | [Date] | — | 🔲 |
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} — Technical Specification
|
|
2
|
+
|
|
3
|
+
> Created: {{DATE}} | Last Updated: {{DATE}}
|
|
4
|
+
> Companion to: PROJECT.md, REQUIREMENTS.md
|
|
5
|
+
|
|
6
|
+
## Architecture Overview
|
|
7
|
+
|
|
8
|
+
[1-2 sentences describing the high-level architecture pattern being used.]
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
[Simple ASCII diagram of the system architecture]
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Tech Stack
|
|
15
|
+
|
|
16
|
+
| Layer | Technology | Version | Rationale |
|
|
17
|
+
|-------|-----------|---------|-----------|
|
|
18
|
+
| Language | [e.g., Swift] | [e.g., 6.0] | [Why] |
|
|
19
|
+
| Framework | [e.g., SwiftUI] | [e.g., iOS 17+] | [Why] |
|
|
20
|
+
| Backend | [e.g., Firebase] | [e.g., v11] | [Why] |
|
|
21
|
+
| Database | [e.g., GRDB] | [e.g., 7.x] | [Why] |
|
|
22
|
+
| AI/ML | [e.g., Gemini 2.5] | — | [Why] |
|
|
23
|
+
| Analytics | [e.g., Firebase Analytics] | — | [Why] |
|
|
24
|
+
|
|
25
|
+
## Architecture Decisions
|
|
26
|
+
|
|
27
|
+
### AD-1: [Decision Title]
|
|
28
|
+
|
|
29
|
+
**Context:** [What problem or question prompted this decision?]
|
|
30
|
+
**Decision:** [What was decided]
|
|
31
|
+
**Consequences:** [What trade-offs or implications does this have?]
|
|
32
|
+
**Alternatives Considered:** [What else was evaluated?]
|
|
33
|
+
|
|
34
|
+
### AD-2: [Decision Title]
|
|
35
|
+
|
|
36
|
+
**Context:** [...]
|
|
37
|
+
**Decision:** [...]
|
|
38
|
+
**Consequences:** [...]
|
|
39
|
+
|
|
40
|
+
## Patterns & Conventions
|
|
41
|
+
|
|
42
|
+
### Code Organization
|
|
43
|
+
```
|
|
44
|
+
[Folder structure with descriptions]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Naming Conventions
|
|
48
|
+
- Files: [e.g., PascalCase for types, camelCase for functions]
|
|
49
|
+
- Modules: [e.g., feature-based grouping]
|
|
50
|
+
- Tests: [e.g., Test suffix, describe/it pattern]
|
|
51
|
+
|
|
52
|
+
### Error Handling
|
|
53
|
+
[Standard error handling approach for the project]
|
|
54
|
+
|
|
55
|
+
### State Management
|
|
56
|
+
[How state is managed across the app]
|
|
57
|
+
|
|
58
|
+
## Constraints & Non-Negotiables
|
|
59
|
+
|
|
60
|
+
> [!CAUTION]
|
|
61
|
+
> These constraints MUST be followed in ALL implementation plans.
|
|
62
|
+
|
|
63
|
+
1. **[Constraint 1]:** [e.g., All network calls must have offline fallback]
|
|
64
|
+
2. **[Constraint 2]:** [e.g., No hardcoded strings — use localization]
|
|
65
|
+
3. **[Constraint 3]:** [e.g., All AI calls must respect quota limits]
|
|
66
|
+
4. **[Constraint 4]:** [e.g., Minimum iOS 17 / Android 14 support]
|
|
67
|
+
|
|
68
|
+
## Security Requirements
|
|
69
|
+
|
|
70
|
+
- Authentication: [e.g., Firebase Auth with Apple/Google Sign-In]
|
|
71
|
+
- Data at rest: [e.g., Keychain for sensitive data]
|
|
72
|
+
- API keys: [e.g., Firebase Remote Config, never hardcoded]
|
|
73
|
+
|
|
74
|
+
## Performance Targets
|
|
75
|
+
|
|
76
|
+
| Metric | Target | How to Measure |
|
|
77
|
+
|--------|--------|----------------|
|
|
78
|
+
| Cold start | < [X]s | Instruments / Profiler |
|
|
79
|
+
| API response | < [X]ms | Network logs |
|
|
80
|
+
| Memory | < [X]MB | Memory profiler |
|
|
81
|
+
| App size | < [X]MB | Archive build |
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
AWF Task Spec Template (XML Format)
|
|
3
|
+
|
|
4
|
+
Usage: Copy this structure into implementation_plan.md for each task.
|
|
5
|
+
AI parses these blocks precisely during EXECUTION mode.
|
|
6
|
+
|
|
7
|
+
Attributes:
|
|
8
|
+
type="auto" → AI executes without user interaction
|
|
9
|
+
type="manual" → Requires user action (e.g., config, credentials)
|
|
10
|
+
|
|
11
|
+
Elements:
|
|
12
|
+
<name> → Short task title
|
|
13
|
+
<files> → Comma-separated list of files to create/modify
|
|
14
|
+
<spec_ref> → Reference to REQUIREMENTS.md or TECH-SPEC.md section
|
|
15
|
+
<depends_on> → Task names this depends on (for wave grouping)
|
|
16
|
+
<action> → Specific implementation instructions
|
|
17
|
+
<verify> → Command or check to verify task completion
|
|
18
|
+
<done> → Expected final state description
|
|
19
|
+
-->
|
|
20
|
+
|
|
21
|
+
<!-- Example: Single independent task -->
|
|
22
|
+
<task type="auto">
|
|
23
|
+
<name>Create User model</name>
|
|
24
|
+
<files>Models/User.swift, Models/UserRepository.swift</files>
|
|
25
|
+
<spec_ref>REQUIREMENTS.md § R1, TECH-SPEC.md § AD-1</spec_ref>
|
|
26
|
+
<depends_on>none</depends_on>
|
|
27
|
+
<action>
|
|
28
|
+
Create User struct with Codable conformance.
|
|
29
|
+
Implement UserRepository with GRDB persistence.
|
|
30
|
+
Follow offline-first pattern from TECH-SPEC.md.
|
|
31
|
+
</action>
|
|
32
|
+
<verify>Unit test: UserRepositoryTests — insert, fetch, delete pass</verify>
|
|
33
|
+
<done>User model persists to local DB with full CRUD</done>
|
|
34
|
+
</task>
|
|
35
|
+
|
|
36
|
+
<!-- Example: Dependent task -->
|
|
37
|
+
<task type="auto">
|
|
38
|
+
<name>Create login endpoint</name>
|
|
39
|
+
<files>Services/AuthService.swift, ViewModels/LoginViewModel.swift</files>
|
|
40
|
+
<spec_ref>REQUIREMENTS.md § R2</spec_ref>
|
|
41
|
+
<depends_on>Create User model</depends_on>
|
|
42
|
+
<action>
|
|
43
|
+
Use Firebase Auth for authentication.
|
|
44
|
+
Store session in Keychain per TECH-SPEC.md § Security.
|
|
45
|
+
Handle offline: queue login attempt, retry on connectivity.
|
|
46
|
+
</action>
|
|
47
|
+
<verify>Login with test credentials returns valid session token</verify>
|
|
48
|
+
<done>User can log in; session persists across app restarts</done>
|
|
49
|
+
</task>
|
|
50
|
+
|
|
51
|
+
<!-- Example: Manual task -->
|
|
52
|
+
<task type="manual">
|
|
53
|
+
<name>Configure Firebase project</name>
|
|
54
|
+
<files>GoogleService-Info.plist</files>
|
|
55
|
+
<spec_ref>TECH-SPEC.md § Tech Stack</spec_ref>
|
|
56
|
+
<depends_on>none</depends_on>
|
|
57
|
+
<action>
|
|
58
|
+
User must:
|
|
59
|
+
1. Create Firebase project at console.firebase.google.com
|
|
60
|
+
2. Download GoogleService-Info.plist
|
|
61
|
+
3. Add to Xcode project root
|
|
62
|
+
</action>
|
|
63
|
+
<verify>FirebaseApp.configure() succeeds without crash</verify>
|
|
64
|
+
<done>Firebase SDK initialized on app launch</done>
|
|
65
|
+
</task>
|
|
@@ -1,152 +1,164 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: ✨ Khởi tạo dự án chuẩn Antigravity (
|
|
2
|
+
description: ✨ Khởi tạo dự án chuẩn Antigravity (v5.0 - Spec-First + CLI Hybrid)
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
# WORKFLOW: /init - The Antigravity Orchestrator (
|
|
5
|
+
# WORKFLOW: /init - The Antigravity Orchestrator (v5.0)
|
|
6
6
|
|
|
7
|
-
> **Mission:**
|
|
7
|
+
> **Mission:** Thiết lập "Hệ điều hành phát triển" (OS for Development) với Spec-First approach.
|
|
8
|
+
> **Key Change v5.0:** Tạo Project-Level Spec (PROJECT.md, REQUIREMENTS.md, ROADMAP.md, TECH-SPEC.md) ngay từ đầu.
|
|
9
|
+
> **Hybrid:** CLI scaffolds → AI fills content through brainstorm.
|
|
8
10
|
|
|
9
11
|
---
|
|
10
12
|
|
|
11
|
-
## 🚀 Giai đoạn 0: Environment & MCP Check
|
|
12
|
-
Trước khi làm bất cứ điều gì, kiểm tra "vũ khí":
|
|
13
|
+
## 🚀 Giai đoạn 0: Environment & MCP Check
|
|
13
14
|
|
|
14
15
|
1. **MCP Status Check**:
|
|
15
|
-
* `firebase-mcp-server`: [Check]
|
|
16
|
-
* `maestro`: [Check]
|
|
17
|
-
* `ios-simulator`: [Check]
|
|
18
|
-
* `google-ads-mcp`: [Check] -> (Optional) Cho Marketing.
|
|
16
|
+
* `firebase-mcp-server`: [Check] → Nếu thiếu, hỏi user có cần Backend/Auth không?
|
|
17
|
+
* `maestro`: [Check] → Nếu thiếu, warn "Sẽ không thể chạy test UI tự động".
|
|
18
|
+
* `ios-simulator`: [Check] → Nếu là dự án Mobile, yêu cầu bật Simulator.
|
|
19
19
|
|
|
20
|
-
2. **Dev Environment**:
|
|
21
|
-
* Node/Ruby/Java/Swift versions.
|
|
22
|
-
* Docker status (nếu là Backend).
|
|
20
|
+
2. **Dev Environment**: Node/Ruby/Java/Swift versions.
|
|
23
21
|
|
|
24
22
|
---
|
|
25
23
|
|
|
26
24
|
## ⚡ Giai đoạn 1: Context Awareness & Smart Adoption
|
|
27
|
-
*Thay vì hỏi máy móc, hãy quan sát:*
|
|
28
25
|
|
|
29
26
|
**Kịch bản A: Thư mục trống (New Project)**
|
|
30
|
-
* Chạy quy trình phỏng vấn **Vision Capture
|
|
31
|
-
* Hỏi
|
|
27
|
+
* Chạy quy trình phỏng vấn **Vision Capture**.
|
|
28
|
+
* Hỏi: "Anh muốn dùng template có sẵn không?" (Clean Arch, Boilerplate).
|
|
32
29
|
|
|
33
30
|
**Kịch bản B: Thư mục có Code (Adoption Mode)**
|
|
34
31
|
* AI quét cấu trúc hiện tại.
|
|
35
32
|
* Tự động điền `.project-identity`.
|
|
36
|
-
* Đề xuất
|
|
33
|
+
* Đề xuất chuẩn hóa theo Antigravity Workflow.
|
|
37
34
|
|
|
38
35
|
---
|
|
39
36
|
|
|
40
|
-
## 🧠 Giai đoạn 2:
|
|
41
|
-
*Đây là "bí mật" tạo nên sự khác biệt. Setup nền tảng cho các workflow nâng cao.*
|
|
37
|
+
## 🧠 Giai đoạn 2: Project Skeleton
|
|
42
38
|
|
|
43
|
-
|
|
44
|
-
|
|
39
|
+
1. **Generate `.project-identity`** (Bắt buộc):
|
|
40
|
+
* Copy template từ `~/.gemini/antigravity/templates/project-identity/[platform].json`.
|
|
41
|
+
* Customize: Thay thế `{{DATE}}`, `projectName` bằng thông tin thực tế.
|
|
45
42
|
|
|
46
|
-
|
|
43
|
+
2. **Create Standard Ecosystem**:
|
|
47
44
|
```bash
|
|
48
|
-
mkdir -p docs/specs
|
|
45
|
+
mkdir -p docs/specs
|
|
49
46
|
mkdir -p docs/architecture/decisions
|
|
50
|
-
mkdir -p .
|
|
47
|
+
mkdir -p .planning/research
|
|
51
48
|
```
|
|
52
49
|
|
|
53
|
-
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* *Ví dụ iOS:* `App/Features`, `App/Shared`, `Tests`, ...
|
|
50
|
+
3. **App Structure (Platform-Specific)**:
|
|
51
|
+
* Đọc template từ `~/.gemini/antigravity/templates/structures/[platform].txt`.
|
|
52
|
+
* Tạo folder tree tương ứng.
|
|
57
53
|
|
|
58
|
-
|
|
59
|
-
Tạo file mẫu để workflow `/plan` (create-spec) hoạt động trơn tru:
|
|
54
|
+
4. **Git Setup**: `.gitignore` thông minh theo stack.
|
|
60
55
|
|
|
61
|
-
|
|
62
|
-
*(Mẫu chuẩn Requirements từng dùng ở `create-spec-architect`)*
|
|
56
|
+
---
|
|
63
57
|
|
|
64
|
-
|
|
65
|
-
*(Mẫu chuẩn Clean Architecture Decision)*
|
|
58
|
+
## 📐 Giai đoạn 3: Project Spec Generation (NEW — Spec-First)
|
|
66
59
|
|
|
67
|
-
|
|
68
|
-
|
|
60
|
+
> **Đây là bước mới quan trọng nhất.** AI brainstorm với user để tạo ra "hiến pháp" của dự án.
|
|
61
|
+
> Tất cả feature-level planning SAU NÀY phải tuân theo spec này.
|
|
69
62
|
|
|
70
|
-
|
|
71
|
-
|
|
63
|
+
### 3.1. Copy Templates
|
|
64
|
+
```bash
|
|
65
|
+
# CLI tự động copy templates vào project
|
|
66
|
+
cp ~/.gemini/antigravity/templates/specs/PROJECT.md docs/specs/PROJECT.md
|
|
67
|
+
cp ~/.gemini/antigravity/templates/specs/requirements-template.md docs/specs/REQUIREMENTS.md
|
|
68
|
+
cp ~/.gemini/antigravity/templates/specs/ROADMAP.md docs/specs/ROADMAP.md
|
|
69
|
+
cp ~/.gemini/antigravity/templates/specs/TECH-SPEC.md docs/specs/TECH-SPEC.md
|
|
70
|
+
```
|
|
72
71
|
|
|
73
|
-
|
|
72
|
+
### 3.2. AI Fills Content (Brainstorm Session)
|
|
74
73
|
|
|
75
|
-
|
|
76
|
-
*(Kế thừa từ v4.0 nhưng mạnh mẽ hơn)*
|
|
77
|
-
|
|
78
|
-
1. **Generate `.project-identity`**: (Bắt buộc, là trái tim của mọi workflow).
|
|
79
|
-
* **Action:** Copy template từ `~/.gemini/antigravity/templates/project-identity/`:
|
|
80
|
-
* `ios.json` cho iOS.
|
|
81
|
-
* `android.json` cho Android.
|
|
82
|
-
* `expo.json` cho Cross-platform.
|
|
83
|
-
* `web-nextjs.json` cho Web App.
|
|
84
|
-
* `backend-nestjs.json` cho API.
|
|
85
|
-
* **Customize:** Thay thế các placeholder (`{{DATE}}`, `projectName`) bằng thông tin thực tế.
|
|
86
|
-
2. **Git Setup**: `.gitignore` thông minh theo stack.
|
|
87
|
-
3. **Linter/Formatter**: Cài ESLint/SwiftLint/Detekt ngay lập tức.
|
|
88
|
-
4. **CI/CD Basics**: Tạo `.github/workflows/ci.yml` cơ bản (build test).
|
|
74
|
+
AI **chủ động** brainstorm với user để fill từng file:
|
|
89
75
|
|
|
90
|
-
|
|
76
|
+
1. **PROJECT.md** — Hỏi về vision, goals, target audience, success metrics.
|
|
77
|
+
* "Dự án này giải quyết vấn đề gì?"
|
|
78
|
+
* "Ai là người dùng chính?"
|
|
79
|
+
* "Thành công sẽ trông như thế nào?"
|
|
91
80
|
|
|
92
|
-
|
|
93
|
-
*
|
|
81
|
+
2. **REQUIREMENTS.md** — Hỏi về features, scope, priorities.
|
|
82
|
+
* "Features nào BẮT BUỘC có trong v1?"
|
|
83
|
+
* "Có features nào nên để v2?"
|
|
84
|
+
* Dùng user story format: "As a [user], I want [action] so that [benefit]"
|
|
94
85
|
|
|
95
|
-
|
|
96
|
-
*
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
86
|
+
3. **ROADMAP.md** — Tự động sinh từ requirements.
|
|
87
|
+
* Chia phases dựa trên priority + dependencies.
|
|
88
|
+
* Mỗi phase có Definition of Done rõ ràng.
|
|
89
|
+
|
|
90
|
+
4. **TECH-SPEC.md** — Hỏi về architecture constraints.
|
|
91
|
+
* "Có yêu cầu offline-first không?"
|
|
92
|
+
* "AI model nào sẽ dùng?"
|
|
93
|
+
* Ghi nhận Architecture Decisions (AD-1, AD-2...).
|
|
94
|
+
|
|
95
|
+
### 3.3. Review & Confirm
|
|
96
|
+
* AI present tổng kết spec cho user review trước khi lưu.
|
|
97
|
+
* User approve → spec trở thành "source of truth".
|
|
100
98
|
|
|
101
99
|
---
|
|
102
100
|
|
|
103
|
-
##
|
|
104
|
-
|
|
101
|
+
## 🎨 Giai đoạn 4: Visual Vision (Optional)
|
|
102
|
+
|
|
103
|
+
1. **Brainstorm UI Concept** dựa trên spec vừa tạo.
|
|
104
|
+
2. **Generate Mockup** via `generate_image` tool.
|
|
105
|
+
3. Hiển thị cho user: "App trông sẽ như thế này!"
|
|
105
106
|
|
|
106
|
-
|
|
107
|
+
---
|
|
107
108
|
|
|
108
|
-
|
|
109
|
+
## 🔗 Giai đoạn 5: Handover — Symphony + Next Steps
|
|
109
110
|
|
|
110
|
-
**
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
1. **Register project trong Symphony**:
|
|
112
|
+
```bash
|
|
113
|
+
symphony project register --id <projectId> --name "<projectName>"
|
|
114
|
+
```
|
|
113
115
|
|
|
114
|
-
**
|
|
115
|
-
|
|
116
|
-
👉 Gõ: **/structure** (Sẽ chạy `structure-clean-architect` dựa trên `.project-identity`).
|
|
116
|
+
2. **Tạo initial tasks từ ROADMAP.md Phase 1**:
|
|
117
|
+
* Mỗi feature trong Phase 1 → 1 Symphony task (status: ready).
|
|
117
118
|
|
|
118
|
-
**
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
3. **Present next steps**:
|
|
120
|
+
```
|
|
121
|
+
🎉 SETUP COMPLETE!
|
|
122
|
+
|
|
123
|
+
📐 Specs created:
|
|
124
|
+
+ docs/specs/PROJECT.md
|
|
125
|
+
+ docs/specs/REQUIREMENTS.md
|
|
126
|
+
+ docs/specs/ROADMAP.md
|
|
127
|
+
+ docs/specs/TECH-SPEC.md
|
|
128
|
+
|
|
129
|
+
🎯 Symphony tasks created from Phase 1:
|
|
130
|
+
📋 #sym-A1 — [Feature 1] (ready)
|
|
131
|
+
📋 #sym-A2 — [Feature 2] (ready)
|
|
132
|
+
|
|
133
|
+
➡️ Next: Pick a feature to start PLANNING mode.
|
|
134
|
+
AI will read your specs automatically.
|
|
135
|
+
```
|
|
121
136
|
|
|
122
137
|
---
|
|
123
138
|
|
|
124
|
-
## 📝 Example Execution
|
|
139
|
+
## 📝 Example Execution
|
|
125
140
|
|
|
126
141
|
```text
|
|
127
|
-
Antigravity Initializer
|
|
142
|
+
Antigravity Initializer v5.0
|
|
128
143
|
----------------------------
|
|
129
144
|
✅ Checking Environment... OK
|
|
130
|
-
✅ Checking MCPs... Firebase (
|
|
145
|
+
✅ Checking MCPs... Firebase (ON), Maestro (ON)
|
|
131
146
|
📂 Project detected: Empty folder
|
|
132
147
|
|
|
133
148
|
🤖 Let's build something great!
|
|
134
|
-
... [Vision Capture
|
|
135
|
-
|
|
136
|
-
🚀 Setting up Antigravity Core...
|
|
137
|
-
+ docs/specs/_templates
|
|
138
|
-
+ .project-identity
|
|
139
|
-
+ .gitignore
|
|
140
|
-
+ scripts/scaffold_feature.sh
|
|
149
|
+
... [Vision Capture + Spec Brainstorm] ...
|
|
141
150
|
|
|
142
|
-
|
|
143
|
-
|
|
151
|
+
📐 Filling Project Specs...
|
|
152
|
+
✅ docs/specs/PROJECT.md — filled
|
|
153
|
+
✅ docs/specs/REQUIREMENTS.md — filled (12 requirements)
|
|
154
|
+
✅ docs/specs/ROADMAP.md — filled (3 phases)
|
|
155
|
+
✅ docs/specs/TECH-SPEC.md — filled (5 architecture decisions)
|
|
144
156
|
|
|
145
|
-
|
|
146
|
-
|
|
157
|
+
🎯 Symphony tasks created:
|
|
158
|
+
📋 #sym-A1 — User Authentication (P0, ready)
|
|
159
|
+
📋 #sym-A2 — Onboarding Flow (P0, ready)
|
|
160
|
+
📋 #sym-A3 — Dashboard UI (P1, ready)
|
|
147
161
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
2. /structure [FeatureName] (Scaffold Code)
|
|
151
|
-
3. /visualize (Design UI)
|
|
162
|
+
🎉 SETUP COMPLETE! Your "Operating System" is ready.
|
|
163
|
+
➡️ Pick a feature to start building.
|
|
152
164
|
```
|