@leejungkiin/awkit 1.4.3 → 1.5.1
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/README.md +38 -14
- package/bin/awk.js +438 -86
- package/bin/claude-generators.js +3 -1
- package/bin/cline-generators.js +3 -1
- package/bin/codex-generators.js +7 -2
- package/core/orchestrator.md +17 -3
- package/core/skill-runtime-manifest.json +37 -0
- package/package.json +2 -2
- package/skill-packs/creator-studio/README.md +19 -0
- package/skill-packs/creator-studio/pack.json +10 -0
- package/skill-packs/marketing/README.md +64 -0
- package/skill-packs/marketing/pack.json +37 -0
- package/skill-packs/mobile-android/README.md +16 -0
- package/skill-packs/mobile-android/pack.json +10 -0
- package/skill-packs/mobile-ios/README.md +22 -0
- package/skill-packs/mobile-ios/pack.json +16 -0
- package/skill-packs/neural-memory/pack.json +8 -2
- package/skill-packs/superpowers/pack.json +1 -0
- package/skill-packs/superpowers/skills/single-flow-task-execution/SKILL.md +59 -358
- package/skill-packs/superpowers/skills/writing-skills/SKILL.md +60 -654
- package/skill-packs/superpowers/skills/writing-skills/examples/anti-rationalization.md +75 -0
- package/skill-packs/superpowers/skills/writing-skills/examples/cso-optimization.md +67 -0
- package/skill-packs/superpowers/skills/writing-skills/examples/tdd-for-skills.md +63 -0
- package/skills/CATALOG.md +49 -44
- package/skills/brainstorm-agent/SKILL.md +55 -315
- package/skills/brainstorm-agent/templates/brief-template.md +76 -0
- package/skills/codex-conductor/SKILL.md +55 -259
- package/skills/codex-conductor/examples/prompt-templates.md +72 -0
- package/skills/module-spec-writer/SKILL.md +38 -365
- package/skills/module-spec-writer/examples/port-migration-mode.md +40 -0
- package/skills/module-spec-writer/templates/module-spec-template.md +118 -0
- package/skills/orchestrator/SKILL.md +17 -8
- package/skills/single-flow-task-execution/SKILL.md +56 -363
- package/skills/single-flow-task-execution/examples/workflow-example.md +91 -0
- package/skills/smali-to-kotlin/SKILL.md +23 -416
- package/skills/smali-to-kotlin/examples/getting-started/tech-stack.md +58 -0
- package/skills/smali-to-kotlin/examples/pipeline/data-ui-parity.md +118 -0
- package/skills/smali-to-kotlin/examples/pipeline/scanner-and-bootstrap.md +106 -0
- package/skills/smali-to-swift/SKILL.md +18 -621
- package/skills/smali-to-swift/examples/getting-started/tech-stack.md +72 -0
- package/skills/smali-to-swift/examples/getting-started/toolchain.md +32 -0
- package/skills/smali-to-swift/examples/pipeline/core-logic.md +45 -0
- package/skills/smali-to-swift/examples/pipeline/data-layer.md +76 -0
- package/skills/smali-to-swift/examples/pipeline/framework-scanner.md +73 -0
- package/skills/smali-to-swift/examples/pipeline/project-bootstrap.md +76 -0
- package/skills/smali-to-swift/examples/pipeline/sdk-integration.md +66 -0
- package/skills/smali-to-swift/examples/pipeline/ui-viewmodel.md +96 -0
- package/skills/smali-to-swift/references/objc-to-swift-mapping.md +57 -0
- package/skills/spec-gate/SKILL.md +51 -265
- package/skills/spec-gate/templates/design-templates.md +93 -0
- package/skills/symphony-enforcer/SKILL.md +24 -555
- package/skills/symphony-enforcer/examples/startup-protocol.md +92 -0
- package/skills/symphony-enforcer/examples/task-completion.md +100 -0
- package/skills/symphony-enforcer/examples/three-phase.md +107 -0
- package/skills/symphony-enforcer/examples/trigger-points.md +99 -0
- package/skills/symphony-orchestrator/SKILL.md +1 -1
- package/skills/writing-skills/SKILL.md +82 -70
- package/skills/writing-skills/examples/anti-rationalization.md +53 -0
- package/skills/writing-skills/examples/cso-optimization.md +52 -0
- package/skills/writing-skills/examples/tdd-for-skills.md +48 -0
- package/templates/help.html +447 -0
- package/skills/memory-sync/SKILL.md +0 -424
- package/skills/memory-sync/memory-router.md +0 -185
- package/skills/memory-sync/memory-templates.md +0 -201
|
@@ -10,33 +10,18 @@ metadata:
|
|
|
10
10
|
version: "3.7"
|
|
11
11
|
replaces: "v3.6"
|
|
12
12
|
requires: symphony-orchestrator
|
|
13
|
-
tags: [symphony, enforcement, checkpoint, task-lifecycle, core,
|
|
13
|
+
tags: [symphony, enforcement, checkpoint, task-lifecycle, core, ui-first, maestro]
|
|
14
14
|
agent: Symphony Enforcer
|
|
15
|
-
allowed-tools:
|
|
16
|
-
- symphony_create_task
|
|
17
|
-
- symphony_claim_task
|
|
18
|
-
- symphony_complete_task
|
|
19
|
-
- symphony_report_progress
|
|
20
|
-
- symphony_available_tasks
|
|
21
|
-
- symphony_status
|
|
22
15
|
trigger: always
|
|
23
16
|
invocation-type: auto
|
|
24
17
|
priority: 1
|
|
25
18
|
---
|
|
26
19
|
|
|
27
|
-
# Symphony Enforcer v3.7 —
|
|
20
|
+
# Symphony Enforcer v3.7 — Router
|
|
28
21
|
|
|
29
22
|
> **Purpose:** Đảm bảo AI KHÔNG BAO GIỜ quên cập nhật Symphony.
|
|
30
|
-
> **Key Changes v3.7:**
|
|
31
|
-
> - **Step 0.5: Legacy Artifact Cleanup**: Auto-detect stale `.symphony/tasks.json` and warn user
|
|
32
|
-
> - **Gate 4 Three-Phase Execution**: Phase A (Infra) → Phase B (UI Shell + Auto Check) → Phase C (Logic + Auto Check)
|
|
33
|
-
> - **TP1.7: Auto Device Checkpoint (ADC)**: Tự động build & quét UI bằng Maestro MCP thay vì chờ user test thủ công
|
|
34
|
-
> - **UI-First Task Ordering**: UI tasks PHẢI đi trước logic tasks trong Symphony
|
|
35
|
-
> - Kế thừa tất cả features v3.5 (Kiro, Completion Status, Design Compliance).
|
|
36
23
|
> **Principle:** AI tự detect completion — user KHÔNG CẦN nói "xong".
|
|
37
24
|
|
|
38
|
-
---
|
|
39
|
-
|
|
40
25
|
## ⚠️ Core Rule
|
|
41
26
|
|
|
42
27
|
```
|
|
@@ -45,114 +30,19 @@ KHÔNG CÓ NGOẠI LỆ:
|
|
|
45
30
|
- Mọi milestone PHẢI report progress
|
|
46
31
|
- AI tự detect completion và auto-complete task
|
|
47
32
|
- Task done → PHẢI atomic git commit trước khi suggest next
|
|
48
|
-
-
|
|
49
|
-
- BỎ QUA BẤT BẤT KỲ STEP NÀO = VI PHẠM
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## 🔒 STRICT STARTUP PROTOCOL (BẮT BUỘC)
|
|
55
|
-
|
|
56
|
-
Mỗi khi bắt đầu task code/debug/plan, AI PHẢI đi qua **6 steps tuần tự**.
|
|
57
|
-
KHÔNG được bắt đầu work cho đến khi TẤT CẢ steps ✅.
|
|
58
|
-
|
|
59
|
-
### Step 0.5: Legacy Artifact Cleanup (AUTO — v3.6)
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
→ Kiểm tra: .symphony/tasks.json tồn tại?
|
|
63
|
-
→ CÓ → ⚠️ CẢNH BÁO: "Legacy tasks.json detected. Symphony uses SQLite DB — this file is stale."
|
|
64
|
-
→ Khuyên user xoá: "rm .symphony/tasks.json"
|
|
65
|
-
→ KHÔNG tự xoá (safety guardrail) — chỉ cảnh báo.
|
|
66
|
-
→ Ghi log vào NeuralMemory: "Legacy tasks.json found at {project}, warned user."
|
|
67
|
-
→ KHÔNG → ✅ Clean (no legacy artifacts)
|
|
68
|
-
→ Output: "🧹 Step 0.5: Legacy Check ✅ — No stale artifacts"
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
> **Lý do:** Symphony v2+ sử dụng SQLite DB (`symphony.db`) làm single source of truth.
|
|
72
|
-
> File `tasks.json` là di sản từ phiên bản cũ (pre-SQLite). Nếu tồn tại song song sẽ gây
|
|
73
|
-
> "split-brain" — một nửa tool đọc JSON, một nửa đọc DB → dữ liệu lệch pha.
|
|
74
|
-
|
|
75
|
-
### Step 1: Project Identity — `.project-identity`
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
→ Kiểm tra: file .project-identity có tồn tại?
|
|
79
|
-
→ CÓ → Đọc projectId, projectName
|
|
80
|
-
→ KHÔNG → ⛔ DỪNG. Hỏi user hoặc tạo .project-identity.
|
|
81
|
-
→ Output: "📋 Step 1/6: Project Identity ✅ — {projectId}"
|
|
33
|
+
- BỎ QUA BẤT KỲ STEP NÀO = VI PHẠM
|
|
82
34
|
```
|
|
83
35
|
|
|
84
|
-
|
|
36
|
+
## 📋 Topic Index — Load file theo nhu cầu
|
|
85
37
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
38
|
+
| Topic | Khi nào load | File |
|
|
39
|
+
|-------|-------------|------|
|
|
40
|
+
| Startup Protocol (6 steps) | Bắt đầu mọi task | `examples/startup-protocol.md` |
|
|
41
|
+
| Three-Phase Execution | Gate 4 với COMPLEX + UI tasks | `examples/three-phase.md` |
|
|
42
|
+
| Trigger Points (TP1, TP1.5, TP1.7) | Milestone, schema changes, checkpoints | `examples/trigger-points.md` |
|
|
43
|
+
| Task Completion (TP2-TP4) | Khi task sắp done | `examples/task-completion.md` |
|
|
91
44
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
```
|
|
95
|
-
→ CHECK 1 (Kiro — HIGHEST PRIORITY): .kiro/specs/ tồn tại?
|
|
96
|
-
→ CÓ → Load specs từ .kiro/specs/:
|
|
97
|
-
- .kiro/specs/<project>/requirements.md → project spec
|
|
98
|
-
- .kiro/specs/<module>/requirements.md → module specs
|
|
99
|
-
- .kiro/specs/<module>/design.md → architecture
|
|
100
|
-
- .kiro/specs/<module>/tasks.md → task breakdown (cho Step 4)
|
|
101
|
-
→ Extract constraints liên quan đến task hiện tại
|
|
102
|
-
→ Output: "📐 Step 3/6: Kiro Specs Loaded ✅ — {N} modules, {M} design docs"
|
|
103
|
-
|
|
104
|
-
→ CHECK 2 (fallback): docs/specs/PROJECT.md tồn tại?
|
|
105
|
-
→ CÓ → Đọc silent: PROJECT.md + TECH-SPEC.md + REQUIREMENTS.md
|
|
106
|
-
→ Extract constraints liên quan đến task hiện tại
|
|
107
|
-
→ NẾU PLANNING mode:
|
|
108
|
-
- Hỏi user 1-3 câu về constraints/UX cụ thể của feature
|
|
109
|
-
- Ví dụ: "Feature này cần offline support không?"
|
|
110
|
-
→ Output: "📐 Step 3/6: Spec Aligned ✅"
|
|
111
|
-
→ KHÔNG → Skip (project chưa /init) → "📐 Step 3/6: No spec — skipped"
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
> **Quan trọng:** Nếu .kiro/specs hoặc TECH-SPEC.md có "Constraints & Non-Negotiables",
|
|
115
|
-
> AI PHẢI tuân thủ chúng trong implementation_plan.md.
|
|
116
|
-
|
|
117
|
-
### Step 4: Symphony Task — Tạo hoặc nhận task
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
→ CHECK 1 (Kiro tasks): .kiro/specs/<module>/tasks.md tồn tại?
|
|
121
|
-
→ CÓ + chưa import → Parse task items từ tasks.md:
|
|
122
|
-
- Group theo module name
|
|
123
|
-
- Đánh tag kèm module name
|
|
124
|
-
→ ⛔ CẢNH BÁO: KHÔNG đồng bộ hàng loạt các item nhỏ này lên Trello (để tránh rác board). Chỉ đồng bộ lên cấp module hoặc feature lớn.
|
|
125
|
-
→ Output: "🎯 Step 4/6: Kiro Tasks Imported ✅ — {N} tasks created"
|
|
126
|
-
→ Claim task phù hợp nhất với user request
|
|
127
|
-
→ CÓ + đã import → symphony_available_tasks → claim task phù hợp
|
|
128
|
-
|
|
129
|
-
→ CHECK 2 (fallback): symphony_available_tasks(filter="my") → check active tasks
|
|
130
|
-
→ CÓ task in_progress phù hợp → dùng tiếp
|
|
131
|
-
→ CÓ task ready phù hợp → symphony_claim_task
|
|
132
|
-
→ KHÔNG CÓ → symphony_create_task(title) → symphony_claim_task(new_id)
|
|
133
|
-
→ Lưu task_id cho TP1-TP4
|
|
134
|
-
→ Output: "🎯 Step 4/6: Task ✅ — #sym-XYZ claimed"
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### Step 5: Confirmation Block
|
|
138
|
-
|
|
139
|
-
```
|
|
140
|
-
🚦 STARTUP PROTOCOL COMPLETE
|
|
141
|
-
══════════════════════════════════════
|
|
142
|
-
Step 0.5: 🧹 Legacy Check ✅ No stale artifacts
|
|
143
|
-
Step 1: 📋 Project Identity ✅ {projectId}
|
|
144
|
-
Step 2: 🧠 NeuralMemory ✅ brain: {projectId}
|
|
145
|
-
Step 3: 📐 Spec Alignment ✅ {constraints_count} constraints loaded
|
|
146
|
-
Step 4: 🎯 Task ✅ #sym-XYZ — "{title}"
|
|
147
|
-
Step 5: ✅ READY TO WORK
|
|
148
|
-
══════════════════════════════════════
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
> ⛔ **Nếu KHÔNG hiển thị confirmation block = VI PHẠM**
|
|
152
|
-
|
|
153
|
-
---
|
|
154
|
-
|
|
155
|
-
## Auto-Lifecycle: task_boundary ↔ Symphony (v3.5)
|
|
45
|
+
## Auto-Lifecycle: task_boundary ↔ Symphony
|
|
156
46
|
|
|
157
47
|
```
|
|
158
48
|
LIÊN KẾT TỰ ĐỘNG:
|
|
@@ -162,414 +52,13 @@ LIÊN KẾT TỰ ĐỘNG:
|
|
|
162
52
|
- notify_user(BlockedOnUser=false) → TRIGGER TP2 (completion check)
|
|
163
53
|
|
|
164
54
|
THREE-PHASE MAPPING (Gate 4 — COMPLEX tasks với UI):
|
|
165
|
-
- Phase A done (build OK) → report_progress(25%)
|
|
166
|
-
- Phase B done (UI mock) → report_progress(45%) + TRIGGER TP1.7
|
|
167
|
-
- Phase C per-feature done → report_progress(50-85%) + TRIGGER TP1.7
|
|
55
|
+
- Phase A done (build OK) → report_progress(25%)
|
|
56
|
+
- Phase B done (UI mock) → report_progress(45%) + TRIGGER TP1.7
|
|
57
|
+
- Phase C per-feature done → report_progress(50-85%) + TRIGGER TP1.7
|
|
168
58
|
- Phase C all features done → report_progress(90%) → Gate 5
|
|
169
59
|
```
|
|
170
60
|
|
|
171
|
-
|
|
172
|
-
Mỗi lần gọi `task_boundary` với mode mới → đồng thời report progress.
|
|
173
|
-
|
|
174
|
-
---
|
|
175
|
-
|
|
176
|
-
## 🚨 Three-Phase Auto-Enforcement Protocol (BẮT BUỘC — v3.5)
|
|
177
|
-
|
|
178
|
-
> **Vấn đề:** AI không tự chủ động dùng Three-Phase nếu không bị ép.
|
|
179
|
-
> **Giải pháp:** Auto-detect + auto-announce + auto-enforce.
|
|
180
|
-
|
|
181
|
-
### Phase State Tracking
|
|
182
|
-
|
|
183
|
-
AI PHẢI duy trì trạng thái phase hiện tại xuyên suốt Gate 4:
|
|
184
|
-
|
|
185
|
-
```
|
|
186
|
-
current_phase = "A" | "B" | "C" | "none"
|
|
187
|
-
phase_b_confirmed = false | true
|
|
188
|
-
checkpoint_count = 0
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### Auto-Detection: Khi nào kích hoạt Three-Phase?
|
|
192
|
-
|
|
193
|
-
Tại đầu Gate 4 (EXECUTION bắt đầu), AI PHẢI tự kiểm tra:
|
|
194
|
-
|
|
195
|
-
```
|
|
196
|
-
1. Task được triage là COMPLEX?
|
|
197
|
-
2. Task có UI component? (detect qua):
|
|
198
|
-
→ Symphony task title chứa: screen, view, UI, layout, dashboard, form
|
|
199
|
-
→ Implementation plan mentions: Composable, Fragment, Activity, Screen, View
|
|
200
|
-
→ Design doc tồn tại (docs/design/ hoặc docs/architecture/ có UI sections)
|
|
201
|
-
→ Spec references: wireframe, mockup, screenshot
|
|
202
|
-
→ Platform: Android/iOS/React Native/Flutter (hầu hết có UI)
|
|
203
|
-
|
|
204
|
-
Nếu CẢ HAI điều kiện thỏa:
|
|
205
|
-
→ BẮT BUỘC kích hoạt Three-Phase
|
|
206
|
-
→ Hiển thị Phase Announcement Block
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
### Phase Announcement Block (BẮT BUỘC)
|
|
210
|
-
|
|
211
|
-
Khi kích hoạt Three-Phase, AI PHẢI hiển thị:
|
|
212
|
-
|
|
213
|
-
```
|
|
214
|
-
🎯 THREE-PHASE EXECUTION ACTIVATED
|
|
215
|
-
══════════════════════════════════════
|
|
216
|
-
🏗️ Phase A: Infrastructure Setup
|
|
217
|
-
→ {list tasks for Phase A}
|
|
218
|
-
🎨 Phase B: UI Shell (Mock Data)
|
|
219
|
-
→ {list tasks for Phase B}
|
|
220
|
-
→ 🧪 AUTO DEVICE TEST (Maestro) sau phase này
|
|
221
|
-
⚡ Phase C: Logic Integration
|
|
222
|
-
→ {list tasks for Phase C}
|
|
223
|
-
→ 🧪 AUTO DEVICE TEST (Maestro) mỗi feature
|
|
224
|
-
══════════════════════════════════════
|
|
225
|
-
Bắt đầu Phase A...
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
### Phase Transition Triggers (TỰ ĐỘNG)
|
|
229
|
-
|
|
230
|
-
AI PHẢI tự động phát hiện khi chuyển phase:
|
|
231
|
-
|
|
232
|
-
```yaml
|
|
233
|
-
auto_triggers:
|
|
234
|
-
phase_a_to_b:
|
|
235
|
-
signal: Tất cả [INFRA] tasks đã done + build OK
|
|
236
|
-
action: |
|
|
237
|
-
- Announce: "🏗️ Phase A ✅ — Build thành công. Chuyển sang Phase B (UI Shell)."
|
|
238
|
-
- Set current_phase = "B"
|
|
239
|
-
- Bắt đầu code UI tasks
|
|
240
|
-
|
|
241
|
-
phase_b_to_checkpoint:
|
|
242
|
-
signal: Tất cả [UI] tasks đã done
|
|
243
|
-
action: |
|
|
244
|
-
- ⛔ TRIGGER TP1.7 (Checkpoint)
|
|
245
|
-
- Đọc `.project-identity` -> `autoVerification`
|
|
246
|
-
- NẾU `true`:
|
|
247
|
-
+ Chạy Auto Build → check exit code 0
|
|
248
|
-
+ Dùng mcp_maestro_launch_app và take_screenshot
|
|
249
|
-
+ NẾU fail → DỪNG (notify_user BlockedOnUser=true)
|
|
250
|
-
+ NẾU pass → Báo cáo Screenshot (BlockedOnUser=false) và làm tiếp Phase C
|
|
251
|
-
- NẾU `false` (default):
|
|
252
|
-
+ DỪNG VÀ CHỜ user test thủ công (notify_user BlockedOnUser=true)
|
|
253
|
-
+ CHỜ user xác nhận "OK" mới đi tiếp Phase C
|
|
254
|
-
|
|
255
|
-
checkpoint_to_phase_c:
|
|
256
|
-
signal: Build success & App launched (autoVerification=true) HOẶC User confirmed "OK" (autoVerification=false)
|
|
257
|
-
action: |
|
|
258
|
-
- Set phase_b_confirmed = true
|
|
259
|
-
- Set current_phase = "C"
|
|
260
|
-
- Announce: "🎨 Phase B ✅ — UI đã được duyệt. Chuyển sang Phase C (Logic)."
|
|
261
|
-
- Bắt đầu code [LOGIC] tasks
|
|
262
|
-
|
|
263
|
-
phase_c_per_feature:
|
|
264
|
-
signal: 1 feature [LOGIC] đã done + có UI impact
|
|
265
|
-
action: |
|
|
266
|
-
- TRIGGER TP1.7 (mini checkpoint)
|
|
267
|
-
- Batch các features nhỏ lại nếu có thể
|
|
268
|
-
```
|
|
269
|
-
|
|
270
|
-
### Enforcement Rules
|
|
271
|
-
|
|
272
|
-
```
|
|
273
|
-
❌ VI PHạM NẶNG:
|
|
274
|
-
- Code logic (Phase C) khi phase_b_confirmed = false (chưa pass Phase B checkpoint)
|
|
275
|
-
- Skip Phase Announcement Block
|
|
276
|
-
- Bỏ qua TP1.7
|
|
277
|
-
- Chạy Auto-verification khi `autoVerification: false` (bỏ qua thủ công)
|
|
278
|
-
- Chờ user test thủ công khi `autoVerification: true` (lười setup auto)
|
|
279
|
-
|
|
280
|
-
✅ BẮT BUỘC:
|
|
281
|
-
- Luôn announce phase transition rõ ràng
|
|
282
|
-
- Luôn đọc `autoVerification` trong `.project-identity` trước khi trigger check.
|
|
283
|
-
- Gắn BlockedOnUser = true cho mode manual, false cho mode auto.
|
|
284
|
-
- Ghi lại phase state vào NeuralMemory khi chuyển phase
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
---
|
|
288
|
-
|
|
289
|
-
## Trigger Points
|
|
290
|
-
|
|
291
|
-
### TP1: Progress Milestone
|
|
292
|
-
|
|
293
|
-
**Khi nào:** Milestone xảy ra:
|
|
294
|
-
- Chuyển mode: PLANNING → EXECUTION → VERIFICATION
|
|
295
|
-
- Gọi `notify_user` (TRƯỚC khi gọi)
|
|
296
|
-
- Hoàn thành 1 component/file lớn
|
|
297
|
-
- Phát hiện vấn đề cần thay đổi approach
|
|
298
|
-
|
|
299
|
-
**Action:**
|
|
300
|
-
```
|
|
301
|
-
symphony_report_progress(
|
|
302
|
-
task_id=current_task,
|
|
303
|
-
progress=estimated_percentage,
|
|
304
|
-
last_action="mô tả ngắn"
|
|
305
|
-
)
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
**Progress Guide (Three-Phase Model):**
|
|
309
|
-
```
|
|
310
|
-
10% — Task created, đang research/đọc code
|
|
311
|
-
20% — Implementation plan approved
|
|
312
|
-
25% — Phase A done (build OK, dependencies ready)
|
|
313
|
-
30% — Phase B bắt đầu (UI shell coding)
|
|
314
|
-
45% — Phase B done → USER TEST CHECKPOINT #1 (UI review)
|
|
315
|
-
50% — Phase C bắt đầu (logic integration)
|
|
316
|
-
50-85% — Phase C per-feature (each feature = +5-10%)
|
|
317
|
-
85% — Phase C done, đang final verification
|
|
318
|
-
90% — Walkthrough/docs tạo xong
|
|
319
|
-
100% — Hoàn thành (auto-trigger TP2)
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
**Enforcement:**
|
|
323
|
-
- ❌ KHÔNG được gọi `notify_user` mà chưa `report_progress` trước đó
|
|
324
|
-
- ❌ KHÔNG được chuyển mode (task_boundary) mà chưa report
|
|
325
|
-
|
|
326
|
-
---
|
|
327
|
-
|
|
328
|
-
### TP1.5: Design Compliance Check (NEW v3.2 — Gate 4 Enforcement)
|
|
329
|
-
|
|
330
|
-
**Khi nào:** Mỗi khi AI sửa file liên quan đến DB/Model/Schema trong EXECUTION mode.
|
|
331
|
-
|
|
332
|
-
**Trigger signals:**
|
|
333
|
-
```
|
|
334
|
-
File patterns:
|
|
335
|
-
- **/models/**, **/entities/**, **/schemas/**
|
|
336
|
-
- **Migration*, **Schema*, **Model*
|
|
337
|
-
- *.entity.*, *.model.*, *.schema.*
|
|
338
|
-
- Database.swift, AppDatabase.swift, schema.prisma, etc.
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
**Action:**
|
|
342
|
-
```
|
|
343
|
-
1. Kiểm tra: docs/architecture/<feature>_design.md tồn tại?
|
|
344
|
-
→ KHÔNG → ⚠️ Warning: "Đang sửa model file nhưng chưa có approved design.
|
|
345
|
-
Recommend chạy spec-gate trước."
|
|
346
|
-
→ Nếu COMPLEX task → ⛔ DỪNG, enforce Gate 2
|
|
347
|
-
→ Nếu TRIVIAL/MODERATE → Warning only, tiếp tục
|
|
348
|
-
|
|
349
|
-
2. Đối chiếu thay đổi vs approved design:
|
|
350
|
-
→ Thêm field KHÔNG có trong design? → ⛔ DỪNG
|
|
351
|
-
→ Đổi type khác design? → ⛔ DỪNG
|
|
352
|
-
→ Xóa field trong design? → ⛔ DỪNG
|
|
353
|
-
→ Thêm field CÓ trong design? → ✅ OK
|
|
354
|
-
|
|
355
|
-
3. Khi DỪNG:
|
|
356
|
-
→ Thông báo: "Schema change ngoài approved design detected.
|
|
357
|
-
[field_name] không có trong docs/architecture/<feature>_design.md.
|
|
358
|
-
Quay lại Gate 2 để update design trước nhé."
|
|
359
|
-
→ Kích hoạt spec-gate skill để update design doc
|
|
360
|
-
→ Sau khi re-approve → tiếp tục code
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
**Enforcement:**
|
|
364
|
-
- ❌ KHÔNG tự ý thêm cột/bảng ngoài approved design cho COMPLEX tasks
|
|
365
|
-
- ✅ NÊN ghi lại mọi deviation attempt vào NeuralMemory cho future reference
|
|
366
|
-
|
|
367
|
-
---
|
|
368
|
-
|
|
369
|
-
### TP1.7: Flexible Checkpoint (Manual v/s Auto) (UPDATE v3.7)
|
|
370
|
-
|
|
371
|
-
**Cấu hình Mode Verification:**
|
|
372
|
-
Quy trình Verification được quyết định bởi thuộc tính `"autoVerification"` trong `.project-identity`:
|
|
373
|
-
- `{"autoVerification": true}` → **Auto Device Checkpoint (ADC)**: Dùng Maestro tự build & chụp ảnh screenshot. Tiến thẳng sang bước tiếp (BlockedOnUser=false).
|
|
374
|
-
- `{"autoVerification": false}` (hoặc không khai báo) → **Manual Checkpoint**: Dừng lại chờ user test thủ công (BlockedOnUser=true). Đây là **MẶC ĐỊNH an toàn**.
|
|
375
|
-
|
|
376
|
-
**Khi nào trigger TP1.7:**
|
|
377
|
-
|
|
378
|
-
1. **Phase B → C Transition (BẮT BUỘC cho COMPLEX):**
|
|
379
|
-
- ALL UI screens đã code xong
|
|
380
|
-
|
|
381
|
-
2. **Sau mỗi feature trong Phase C (COMPLEX tasks):**
|
|
382
|
-
- Feature X đã code xong logic
|
|
383
|
-
|
|
384
|
-
**Action (Tùy theo Mode):**
|
|
385
|
-
```
|
|
386
|
-
1. Report progress trước: symphony_report_progress(current_task, progress)
|
|
387
|
-
2. Kiểm tra cờ `autoVerification` trong .project-identity.
|
|
388
|
-
|
|
389
|
-
=== TRƯỜNG HỢP 1: autoVerification = false (Default Manual) ===
|
|
390
|
-
- Announce "🧪 MANUAL USER TEST CHECKPOINT #{N}"
|
|
391
|
-
- Đưa hướng dẫn test cụ thể (e.g. "Mở app -> Bấm nút A -> Xem kết quả B")
|
|
392
|
-
- Gọi notify_user(BlockedOnUser=true) — DỪNG và CHỜ user response
|
|
393
|
-
- Chỉ đi tiếp khi user reply "OK".
|
|
394
|
-
|
|
395
|
-
=== TRƯỜNG HỢP 2: autoVerification = true (Auto Maestro) ===
|
|
396
|
-
- Chạy Auto Build
|
|
397
|
-
- Chạy mcp_maestro_launch_app, mcp_maestro_take_screenshot
|
|
398
|
-
- Announce "🤖 AUTO DEVICE CHECKPOINT #{N}" + Log + Evidence
|
|
399
|
-
- NẾU Build/Run Lỗi: BlockedOnUser=true (bắt user xem lỗi).
|
|
400
|
-
- NẾU Pass: BlockedOnUser=false. Lập tức đi tiếp phase tiếp theo! KHÔNG DỪNG.
|
|
401
|
-
```
|
|
402
|
-
|
|
403
|
-
---
|
|
404
|
-
|
|
405
|
-
### TP2: Task Complete — Completion Status Protocol
|
|
406
|
-
|
|
407
|
-
**Khi nào:** AI detect ≥2/4 completion signals:
|
|
408
|
-
|
|
409
|
-
```
|
|
410
|
-
Signal 1: Final notify_user với BlockedOnUser=false
|
|
411
|
-
Signal 2: Walkthrough artifact đã tạo
|
|
412
|
-
Signal 3: Tất cả checklist items trong task.md đã [x]
|
|
413
|
-
Signal 4: Verification pass (tests OK, build OK)
|
|
414
|
-
```
|
|
415
|
-
|
|
416
|
-
**Completion Status Protocol (4 statuses):**
|
|
417
|
-
|
|
418
|
-
```
|
|
419
|
-
DONE:
|
|
420
|
-
Điều kiện: Verification pass, không caveats.
|
|
421
|
-
Action: symphony_complete_task với evidence.
|
|
422
|
-
Format: "✅ DONE — {summary}. Build: ✅. Tests: ✅ N/N."
|
|
423
|
-
|
|
424
|
-
DONE_WITH_CONCERNS:
|
|
425
|
-
Điều kiện: Code hoạt động nhưng có caveats/risks cần biết.
|
|
426
|
-
Action: Complete task NHƯNG ghi rõ concerns.
|
|
427
|
-
Format: "⚠️ DONE_WITH_CONCERNS — {summary}.
|
|
428
|
-
Concerns: [list cụ thể]
|
|
429
|
-
Risk: [mức độ ảnh hưởng]
|
|
430
|
-
Recommendation: [đề xuất xử lý]"
|
|
431
|
-
Ví dụ: "Feature works nhưng chưa handle offline mode."
|
|
432
|
-
Ví dụ: "API call thành công nhưng chưa có retry logic."
|
|
433
|
-
|
|
434
|
-
BLOCKED:
|
|
435
|
-
Điều kiện: Không thể tiếp tục vì external dependency/blocker.
|
|
436
|
-
Action: KHÔNG complete task. Report + list attempts.
|
|
437
|
-
Format: "🚫 BLOCKED — {reason}.
|
|
438
|
-
Attempted: [list things đã thử]
|
|
439
|
-
Needs: [what's needed to unblock]"
|
|
440
|
-
Ví dụ: "API endpoint return 500, đã retry 3 lần."
|
|
441
|
-
|
|
442
|
-
NEEDS_CONTEXT:
|
|
443
|
-
Điều kiện: Thiếu thông tin từ user để tiếp tục.
|
|
444
|
-
Action: KHÔNG complete task. Hỏi user cụ thể.
|
|
445
|
-
Format: "❓ NEEDS_CONTEXT — {what's missing}.
|
|
446
|
-
Question: [câu hỏi cụ thể]
|
|
447
|
-
Options: [list options nếu có]"
|
|
448
|
-
Ví dụ: "Cần user clarify: offline-first hay online-only?"
|
|
449
|
-
```
|
|
450
|
-
|
|
451
|
-
⛔ **KHÔNG BAO GIỜ report DONE nếu thực tế là DONE_WITH_CONCERNS hoặc BLOCKED.**
|
|
452
|
-
|
|
453
|
-
**Action (cho DONE status):**
|
|
454
|
-
```
|
|
455
|
-
0. ⚡ VERIFICATION GATE (BẮT BUỘC — Iron Law):
|
|
456
|
-
- IDENTIFY: What command proves this task is done?
|
|
457
|
-
- RUN: Execute verification (build, test, lint)
|
|
458
|
-
- READ: Full output, check exit code
|
|
459
|
-
- VERIFY: Does output confirm completion?
|
|
460
|
-
- If NO → FIX trước, KHÔNG complete task
|
|
461
|
-
- If YES → Proceed with evidence
|
|
462
|
-
⛔ Skip verification = VI PHẠM (xem verification-gate skill)
|
|
463
|
-
|
|
464
|
-
1. symphony_complete_task(
|
|
465
|
-
task_id=current_task,
|
|
466
|
-
summary="mô tả ngắn + STATUS + VERIFICATION EVIDENCE"
|
|
467
|
-
// ✅ "DONE — Implemented X. Build: ✅ exit 0. Tests: ✅ 47/47."
|
|
468
|
-
// ✅ "DONE_WITH_CONCERNS — Implemented X. Build: ✅. Concerns: no offline support."
|
|
469
|
-
// ❌ "Implemented X" (không status, không evidence)
|
|
470
|
-
)
|
|
471
|
-
2. Hiển thị: "✅ SYM #sym-XYZ — {STATUS}"
|
|
472
|
-
3. → TRIGGER TP2.5 (Atomic Git Commit)
|
|
473
|
-
4. → TRIGGER TP4 (Auto-Next) NGAY LẬP TỨC
|
|
474
|
-
```
|
|
475
|
-
|
|
476
|
-
---
|
|
477
|
-
|
|
478
|
-
### TP2.5: Atomic Git Commit (NEW v3.1 — BẮT BUỘC)
|
|
479
|
-
|
|
480
|
-
**Khi nào:** Ngay sau TP2 (task completed), TRƯỚC TP4 (Auto-Next).
|
|
481
|
-
Chỉ trigger khi task có code changes (có files_changed).
|
|
482
|
-
|
|
483
|
-
**Action:**
|
|
484
|
-
```
|
|
485
|
-
1. Kiểm tra: git status --porcelain
|
|
486
|
-
→ Nếu KHÔNG CÓ changes → skip ("📝 No code changes to commit")
|
|
487
|
-
→ Nếu CÓ changes → tiếp tục
|
|
488
|
-
|
|
489
|
-
2. Xác định commit type từ task context:
|
|
490
|
-
→ PLANNING/EXECUTION mới → "feat"
|
|
491
|
-
→ Debug/fix → "fix"
|
|
492
|
-
→ Refactor/cleanup → "refactor"
|
|
493
|
-
→ Docs/specs → "docs"
|
|
494
|
-
|
|
495
|
-
3. Tạo commit message theo Conventional Commits:
|
|
496
|
-
→ Format: "{type}({scope}): {task_summary_ngắn}"
|
|
497
|
-
→ scope = module/feature name (từ task title)
|
|
498
|
-
→ Ví dụ: "feat(auth): implement login with Firebase"
|
|
499
|
-
→ Ví dụ: "fix(camera): resolve 10s delay on tab switch"
|
|
500
|
-
|
|
501
|
-
4. Stage & commit:
|
|
502
|
-
→ git add <files_changed từ symphony_complete_task>
|
|
503
|
-
→ Nếu không rõ files → git add -A (thận trọng)
|
|
504
|
-
→ git commit -m "{message}"
|
|
505
|
-
|
|
506
|
-
5. Hiển thị:
|
|
507
|
-
🔀 Atomic Commit: {short_hash} — "{message}"
|
|
508
|
-
📁 {N} files changed
|
|
509
|
-
|
|
510
|
-
6. ⚠️ KHÔNG AUTO-PUSH:
|
|
511
|
-
→ Chỉ commit local
|
|
512
|
-
→ Push = yêu cầu user confirm hoặc dùng /smart-git-ops
|
|
513
|
-
```
|
|
514
|
-
|
|
515
|
-
**Enforcement:**
|
|
516
|
-
- ❌ KHÔNG được auto-push (chỉ commit local)
|
|
517
|
-
- ❌ KHÔNG được commit nếu có unresolved merge conflicts
|
|
518
|
-
- ❌ KHÔNG được commit files ngoài scope task
|
|
519
|
-
- ✅ NÊN commit ngay khi task done — đừng để accumulate
|
|
520
|
-
- ✅ Mỗi task = 1 commit (atomic, traceable)
|
|
521
|
-
|
|
522
|
-
---
|
|
523
|
-
|
|
524
|
-
### TP3: Abandoned / Context Switch
|
|
525
|
-
|
|
526
|
-
**Khi nào:**
|
|
527
|
-
- User đổi topic sang task khác hoàn toàn
|
|
528
|
-
- AI bị lỗi/timeout giữa chừng
|
|
529
|
-
- User explicitly nói dừng task
|
|
530
|
-
|
|
531
|
-
**Action:**
|
|
532
|
-
```
|
|
533
|
-
symphony_abandon_task(task_id=current_task, reason="...")
|
|
534
|
-
```
|
|
535
|
-
|
|
536
|
-
---
|
|
537
|
-
|
|
538
|
-
### TP4: Auto-Next Suggestion (NEW v3.0 — BẮT BUỘC)
|
|
539
|
-
|
|
540
|
-
**Khi nào:** Ngay sau TP2 (task completed). KHÔNG ĐƯỢC BỎ QUA.
|
|
541
|
-
|
|
542
|
-
**Action:**
|
|
543
|
-
```
|
|
544
|
-
1. ĐỌC projectId từ .project-identity (đã có từ Step 1)
|
|
545
|
-
2. symphony task list -P <projectId> -s ready (CHỈ tasks cùng project)
|
|
546
|
-
⚠️ TUYỆT ĐỐI KHÔNG dùng filter="ready" không có project filter
|
|
547
|
-
⚠️ Dùng CLI: symphony task list -P <projectId> -s ready
|
|
548
|
-
⚠️ Hoặc MCP: symphony_available_tasks + parse project field
|
|
549
|
-
3. Lọc top 2-3 ready tasks theo priority
|
|
550
|
-
4. Present cho user:
|
|
551
|
-
|
|
552
|
-
➡️ NEXT STEPS ({projectName})
|
|
553
|
-
─────────────────────────────────
|
|
554
|
-
📋 #sym-A1 — Auth Module (P0, ready)
|
|
555
|
-
📋 #sym-A2 — Dashboard UI (P1, ready)
|
|
556
|
-
|
|
557
|
-
Bạn muốn tiếp tục với task nào?
|
|
558
|
-
|
|
559
|
-
5. Nếu KHÔNG CÓ ready tasks trong project hiện tại:
|
|
560
|
-
"✨ Không còn task ready cho {projectName}! Tạo task mới hoặc chuyển phase."
|
|
561
|
-
```
|
|
562
|
-
|
|
563
|
-
**Enforcement:**
|
|
564
|
-
- ❌ KHÔNG được kết thúc conversation mà KHÔNG present next suggestion
|
|
565
|
-
- ❌ KHÔNG được show tasks từ project khác
|
|
566
|
-
- Nếu quên filter projectId → vi phạm nghiêm trọng (cross-project contamination)
|
|
567
|
-
|
|
568
|
-
---
|
|
569
|
-
|
|
570
|
-
## XML Task Spec trong Implementation Plans (NEW v3.0)
|
|
571
|
-
|
|
572
|
-
Khi PLANNING mode tạo `implementation_plan.md`, MỖI task NÊN dùng XML format:
|
|
61
|
+
## XML Task Spec trong Implementation Plans
|
|
573
62
|
|
|
574
63
|
```xml
|
|
575
64
|
<task type="auto">
|
|
@@ -585,15 +74,7 @@ Khi PLANNING mode tạo `implementation_plan.md`, MỖI task NÊN dùng XML form
|
|
|
585
74
|
|
|
586
75
|
Template đầy đủ: `~/.gemini/antigravity/templates/specs/task-spec-template.xml`
|
|
587
76
|
|
|
588
|
-
|
|
589
|
-
- AI parse chính xác hơn markdown
|
|
590
|
-
- `<spec_ref>` ép buộc liên kết với project spec
|
|
591
|
-
- `<depends_on>` cho phép wave grouping (parallel execution)
|
|
592
|
-
- `<verify>` built-in verification step
|
|
593
|
-
|
|
594
|
-
---
|
|
595
|
-
|
|
596
|
-
## Ngoại lệ — Khi nào KHÔNG cần Startup Protocol
|
|
77
|
+
## Ngoại lệ
|
|
597
78
|
|
|
598
79
|
```
|
|
599
80
|
- Simple Q&A: Câu hỏi đơn giản, giải thích concept
|
|
@@ -601,8 +82,6 @@ Lợi ích:
|
|
|
601
82
|
- User nói rõ bỏ qua: "skip symphony", "không cần task"
|
|
602
83
|
```
|
|
603
84
|
|
|
604
|
-
---
|
|
605
|
-
|
|
606
85
|
## Sync Block Format
|
|
607
86
|
|
|
608
87
|
```
|
|
@@ -615,33 +94,23 @@ Nếu completed:
|
|
|
615
94
|
➡️ Next: #sym-A1 — Dashboard UI (P1)
|
|
616
95
|
```
|
|
617
96
|
|
|
618
|
-
---
|
|
619
|
-
|
|
620
97
|
## Edge Cases
|
|
621
98
|
|
|
622
99
|
| Tình huống | Xử lý |
|
|
623
100
|
|-----------|--------|
|
|
624
101
|
| Project chưa có .project-identity | ⛔ Dừng, tạo file trước |
|
|
625
102
|
| Project chưa có docs/specs/ | Skip Step 3, tiếp tục |
|
|
626
|
-
| Symphony server down | Start server, retry.
|
|
103
|
+
| Symphony server down | Start server, retry. Fail → warning + tiếp tục |
|
|
627
104
|
| User follow-up nhỏ sau task done | ≤2 file changes → không cần task mới |
|
|
628
105
|
| Nhiều task cùng lúc | Track task_id riêng, report đúng task |
|
|
629
|
-
| User reopen task đã complete | Claim lại, resume từ progress cuối |
|
|
630
|
-
| Không có ready tasks cho TP4 | Gợi ý tạo phase tiếp theo |
|
|
631
|
-
|
|
632
|
-
---
|
|
633
106
|
|
|
634
107
|
## Learnings
|
|
635
108
|
|
|
636
109
|
- AI quên Symphony vì nó là "side task" — strict protocol biến nó thành MAIN flow
|
|
637
|
-
-
|
|
638
|
-
-
|
|
639
|
-
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
-
|
|
644
|
-
- Atomic commits giúp rollback chính xác — 1 task = 1 commit (learned from GSD)
|
|
645
|
-
- KHÔNG auto-push — chỉ commit local, push cần user confirm
|
|
646
|
-
- Three-Phase WORKS vì AI CHỦ ĐỘNG announce — không chờ user gọi (learned from FitWitness v12.3)
|
|
647
|
-
- User test sớm bắt lỗi sớm — code logic trên UI sai = double wasted (learned from FitWitness v12.3)
|
|
110
|
+
- Three-Phase WORKS vì AI CHỦ ĐỘNG announce
|
|
111
|
+
- User test sớm bắt lỗi sớm — code logic trên UI sai = double wasted
|
|
112
|
+
- Atomic commits giúp rollback chính xác — 1 task = 1 commit
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
*symphony-enforcer v3.7 — Modular Router Architecture*
|