@leejungkiin/awkit 1.3.7 → 1.4.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/bin/awk.js +250 -59
- package/core/AGENTS.md +38 -0
- package/core/GEMINI.md.bak +126 -199
- package/package.json +1 -1
- package/skill-packs/superpowers/skills/single-flow-task-execution/SKILL.md +50 -0
- package/skills/admob-roas/SKILL.md +130 -0
- package/skills/awf-session-restore/SKILL.md +12 -2
- package/skills/brainstorm-agent/SKILL.md +11 -8
- package/skills/gitnexus/gitnexus-cli/SKILL.md +82 -0
- package/skills/gitnexus/gitnexus-debugging/SKILL.md +89 -0
- package/skills/gitnexus/gitnexus-exploring/SKILL.md +78 -0
- package/skills/gitnexus/gitnexus-guide/SKILL.md +64 -0
- package/skills/gitnexus/gitnexus-impact-analysis/SKILL.md +97 -0
- package/skills/gitnexus/gitnexus-refactoring/SKILL.md +121 -0
- package/skills/nm-memory-sync/SKILL.md +14 -1
- package/skills/orchestrator/SKILL.md +25 -465
- package/skills/ship-to-code/SKILL.md +115 -0
- package/skills/single-flow-task-execution/SKILL.md +409 -0
- package/skills/single-flow-task-execution/code-quality-reviewer-prompt.md +20 -0
- package/skills/single-flow-task-execution/implementer-prompt.md +78 -0
- package/skills/single-flow-task-execution/spec-reviewer-prompt.md +61 -0
- package/skills/symphony-enforcer/SKILL.md +239 -32
- package/skills/trello-sync/SKILL.md +55 -32
- package/templates/CODEBASE.md +26 -42
- package/templates/configs/trello-config.json +2 -2
- package/templates/project-identity/android.json +10 -0
- package/templates/project-identity/backend-nestjs.json +10 -0
- package/templates/project-identity/expo.json +10 -0
- package/templates/project-identity/ios.json +10 -0
- package/templates/project-identity/web-nextjs.json +10 -0
- package/templates/workflow_dual_mode_template.md +5 -5
- package/workflows/_uncategorized/conductor-codex.md +125 -0
- package/workflows/_uncategorized/conductor.md +97 -0
- package/workflows/_uncategorized/trello-sync.md +52 -0
- package/workflows/quality/visual-debug.md +66 -12
|
@@ -1,498 +1,58 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: orchestrator
|
|
3
|
-
description:
|
|
4
|
-
Autonomous State Machine Gatekeeper — triages task complexity, enforces 7-Gate pipeline,
|
|
5
|
-
and auto-routes to the correct skill. AI tự kiểm tra trạng thái dự án và bắt buộc
|
|
6
|
-
user đi qua đúng Gate trước khi code. User KHÔNG CẦN gọi workflow bằng tay.
|
|
7
|
-
Hỗ trợ auto-detect .kiro/specs từ IDE Kiro để bypass/accelerate Gates.
|
|
8
|
-
metadata:
|
|
9
|
-
stage: core
|
|
10
|
-
version: "2.3"
|
|
11
|
-
replaces: "2.2"
|
|
12
|
-
tags: [orchestrator, routing, gate, triage, state-machine, core, kiro]
|
|
13
|
-
agent: Orchestrator
|
|
14
|
-
trigger: always
|
|
15
|
-
invocation-type: auto
|
|
16
|
-
priority: 0
|
|
3
|
+
description: Intelligent dispatcher — analyzes context and delegates to the right skill or workflow
|
|
17
4
|
---
|
|
18
5
|
|
|
19
|
-
# Orchestrator
|
|
6
|
+
# Orchestrator Skill
|
|
20
7
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
> User chỉ cần nói ý tưởng, AI lo phần còn lại.
|
|
24
|
-
> Hỗ trợ auto-detect `.kiro/specs` để accelerate/bypass Gates khi IDE đã tạo sẵn specs.
|
|
8
|
+
## Purpose
|
|
9
|
+
Route user requests to the correct workflow or skill based on context analysis.
|
|
25
10
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## ⚡ Core Principle
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
AI LÀ NGƯỜI GIÁM SÁT "CÁN CÂN" CỦA DỰ ÁN.
|
|
32
|
-
- User không cần nhớ workflow nào để gọi
|
|
33
|
-
- AI tự detect thiếu spec → tự hỏi
|
|
34
|
-
- AI tự detect thiếu design → tự phác thảo
|
|
35
|
-
- AI tự detect thiếu tickets → tự tạo
|
|
36
|
-
- Chỉ cho phép code khi TẤT CẢ prerequisites thỏa mãn
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### 6 Decision Principles (Auto-decide khi không cần hỏi user)
|
|
40
|
-
|
|
41
|
-
```
|
|
42
|
-
1. Complete > Shortcuts — AI cost rẻ. Implement đủ, kể cả edge cases.
|
|
43
|
-
2. Evidence > Assumptions — Dựa trên data thực tế, không đoán.
|
|
44
|
-
3. Standard > Custom — Ưu tiên thư viện/pattern có sẵn.
|
|
45
|
-
4. Explicit > Implicit — Code rõ ràng, không clever tricks.
|
|
46
|
-
5. Test > Trust — Viết test, không "chắc chắn đúng".
|
|
47
|
-
6. Small > Big — Incremental changes, không big-bang.
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## 🔍 Kiro Spec Detection (Auto-Accelerate Gates)
|
|
53
|
-
|
|
54
|
-
> **Kiro** là IDE có khả năng sinh spec cấu trúc tại `.kiro/specs/`.
|
|
55
|
-
> Khi phát hiện thư mục này, orchestrator tự động map nội dung vào Gate system,
|
|
56
|
-
> giúp bypass/accelerate các Gates mà không cần AI tự sinh lại tài liệu.
|
|
57
|
-
|
|
58
|
-
### Detection Logic (chạy ĐẦU TIÊN trước Gate check)
|
|
59
|
-
|
|
60
|
-
```yaml
|
|
61
|
-
kiro_detection:
|
|
62
|
-
trigger: Mỗi khi bắt đầu COMPLEX task
|
|
63
|
-
scan_path: ".kiro/specs/" (tương đối từ project root)
|
|
64
|
-
|
|
65
|
-
structure_expected:
|
|
66
|
-
.kiro/specs/
|
|
67
|
-
├── <project-slug>/ # Top-level project spec
|
|
68
|
-
│ ├── requirements.md # → Gate 1 (Spec)
|
|
69
|
-
│ ├── design.md # → Gate 2 (Architecture)
|
|
70
|
-
│ └── tasks.md # → Gate 3 (Symphony Tasks)
|
|
71
|
-
├── <module-01>/ # Per-module specs
|
|
72
|
-
│ ├── requirements.md # → Gate 1.5 (Module Spec)
|
|
73
|
-
│ ├── design.md # → Gate 2 (per-module design)
|
|
74
|
-
│ └── tasks.md # → Gate 3 (per-module tasks)
|
|
75
|
-
└── <module-02>/
|
|
76
|
-
└── ...
|
|
77
|
-
|
|
78
|
-
gate_mapping:
|
|
79
|
-
gate_1_spec:
|
|
80
|
-
pass_if: ANY requirements.md exists in .kiro/specs/
|
|
81
|
-
source: .kiro/specs/<project-slug>/requirements.md
|
|
82
|
-
action: Load as project BRIEF — bypass brainstorm-agent
|
|
83
|
-
|
|
84
|
-
gate_1_5_module_spec:
|
|
85
|
-
pass_if: ≥2 module folders (excluding project-slug) with requirements.md
|
|
86
|
-
source: .kiro/specs/<module>/requirements.md (each)
|
|
87
|
-
action: Load as module specs — bypass module-spec-writer
|
|
88
|
-
|
|
89
|
-
gate_2_architecture:
|
|
90
|
-
pass_if: ANY design.md exists in .kiro/specs/
|
|
91
|
-
source: .kiro/specs/<project-slug>/design.md + per-module design.md
|
|
92
|
-
action: Load as approved design — auto-approve (user already approved in Kiro)
|
|
93
|
-
|
|
94
|
-
gate_2_5_visual:
|
|
95
|
-
pass_if: NOT affected (Kiro doesn't produce visual designs)
|
|
96
|
-
action: Normal Gate 2.5 flow
|
|
97
|
-
|
|
98
|
-
gate_3_tasks:
|
|
99
|
-
pass_if: ANY tasks.md exists in .kiro/specs/
|
|
100
|
-
source: .kiro/specs/<module>/tasks.md (each)
|
|
101
|
-
action: Parse tasks → auto-create Symphony tickets
|
|
102
|
-
|
|
103
|
-
output_format:
|
|
104
|
-
"🔍 KIRO SPECS DETECTED at .kiro/specs/
|
|
105
|
-
📄 Requirements: {count} files (Gate 1 + 1.5 → AUTO-PASS)
|
|
106
|
-
📐 Design docs: {count} files (Gate 2 → AUTO-PASS)
|
|
107
|
-
📋 Task lists: {count} files (Gate 3 → AUTO-IMPORT)
|
|
108
|
-
Modules: {list module names}"
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### Kiro Spec Priority Rules
|
|
112
|
-
|
|
113
|
-
```
|
|
114
|
-
1. .kiro/specs > docs/specs > docs/architecture > Brain/NeuralMemory
|
|
115
|
-
→ Kiro specs LUÔN được ưu tiên khi tồn tại
|
|
116
|
-
|
|
117
|
-
2. Nếu CẢ .kiro/specs VÀ docs/specs tồn tại:
|
|
118
|
-
→ Dùng .kiro/specs làm source of truth
|
|
119
|
-
→ Cảnh báo: "⚠️ Phát hiện cả .kiro/specs và docs/specs.
|
|
120
|
-
Sử dụng .kiro/specs làm source of truth. docs/specs có thể outdated."
|
|
121
|
-
|
|
122
|
-
3. Kiro specs KHÔNG thay thế:
|
|
123
|
-
→ Gate 2.5 (Visual Design) — Kiro không tạo design visuals
|
|
124
|
-
→ Gate 5 (Verification) — luôn cần run tests/build
|
|
125
|
-
→ NeuralMemory decisions — vẫn lưu context vào brain
|
|
126
|
-
|
|
127
|
-
4. Khi code (Gate 4), AI PHẢI đối chiếu với:
|
|
128
|
-
→ .kiro/specs/<module>/requirements.md (acceptance criteria)
|
|
129
|
-
→ .kiro/specs/<module>/design.md (technical design)
|
|
130
|
-
→ .kiro/specs/<module>/tasks.md (task checklist)
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
---
|
|
134
|
-
|
|
135
|
-
## 🎯 STEP 1: Complexity Triage (BẮT BUỘC)
|
|
136
|
-
|
|
137
|
-
Mỗi khi nhận request từ user, orchestrator PHẢI phân loại complexity **TRƯỚC** mọi action khác.
|
|
138
|
-
|
|
139
|
-
### Scoring Criteria
|
|
140
|
-
|
|
141
|
-
```yaml
|
|
142
|
-
factors:
|
|
143
|
-
persistence_change: # Thay đổi Database/Storage/Model
|
|
144
|
-
score: +4
|
|
145
|
-
signals: ["database", "schema", "table", "collection", "model", "migration", "storage"]
|
|
146
|
-
|
|
147
|
-
new_feature: # Feature hoàn toàn mới
|
|
148
|
-
score: +3
|
|
149
|
-
signals: ["tính năng mới", "new feature", "implement", "build", "tạo mới"]
|
|
150
|
-
|
|
151
|
-
multi_file: # Ảnh hưởng nhiều file/module
|
|
152
|
-
score: +2
|
|
153
|
-
signals: [">3 files", "cross-module", "refactor lớn", "architecture"]
|
|
154
|
-
|
|
155
|
-
api_change: # Thay đổi API contract
|
|
156
|
-
score: +2
|
|
157
|
-
signals: ["API", "endpoint", "request", "response", "contract"]
|
|
158
|
-
|
|
159
|
-
ui_only: # Chỉ thay đổi UI/styling
|
|
160
|
-
score: +0
|
|
161
|
-
signals: ["đổi màu", "UI", "layout", "font", "padding", "margin"]
|
|
162
|
-
|
|
163
|
-
single_file_fix: # Sửa 1 file, logic nhỏ
|
|
164
|
-
score: +0
|
|
165
|
-
signals: ["fix typo", "sửa lỗi nhỏ", "update text", "rename"]
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### Classification
|
|
169
|
-
|
|
170
|
-
```
|
|
171
|
-
TRIVIAL (score 0-2): Bypass ALL gates → Execute trực tiếp
|
|
172
|
-
Examples: đổi màu nút, sửa typo, thêm log, fix linter, update string
|
|
173
|
-
|
|
174
|
-
MODERATE (score 3-5): Gate 3 + 4 + 5
|
|
175
|
-
Examples: thêm UI component, sửa logic business nhỏ, update 1-2 files
|
|
176
|
-
|
|
177
|
-
COMPLEX (score 6-10): ALL 7 Gates bắt buộc
|
|
178
|
-
Examples: thêm feature mới, thay đổi DB schema, thiết kế UI, refactor architecture, thêm API
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
### Output Format
|
|
182
|
-
|
|
183
|
-
```
|
|
184
|
-
🔍 TRIAGE: [TRIVIAL|MODERATE|COMPLEX] (score: N/10)
|
|
185
|
-
Factors: [list detected factors]
|
|
186
|
-
Gates required: [list gates]
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
## 🚦 STEP 2: Gate State Check (Cho COMPLEX tasks)
|
|
192
|
-
|
|
193
|
-
Sau khi triage = COMPLEX, orchestrator kiểm tra **tuần tự** từng Gate.
|
|
194
|
-
Dừng tại Gate ĐẦU TIÊN chưa thỏa mãn.
|
|
195
|
-
|
|
196
|
-
### Gate 1: Spec Clarification 🔴
|
|
197
|
-
|
|
198
|
-
```
|
|
199
|
-
CHECK: Tồn tại file mô tả feature này?
|
|
200
|
-
→ CHECK 1 (Kiro): .kiro/specs/<module>/requirements.md tồn tại?
|
|
201
|
-
→ CÓ → AUTO-PASS Gate 1 (Kiro specs detected)
|
|
202
|
-
→ CHECK 2: docs/specs/<feature>.md HOẶC docs/BRIEF.md có section liên quan
|
|
203
|
-
→ CHECK 3: NeuralMemory có BRIEF/SPEC cho feature này
|
|
204
|
-
|
|
205
|
-
PASS condition:
|
|
206
|
-
- .kiro/specs requirements.md tồn tại (highest priority), HOẶC
|
|
207
|
-
- docs/specs file tồn tại VÀ có nội dung rõ ràng, HOẶC
|
|
208
|
-
- NeuralMemory có BRIEF/SPEC
|
|
209
|
-
|
|
210
|
-
FAIL action:
|
|
211
|
-
→ Thông báo user: "Ý tưởng rất hay! Nhưng trước khi bắt tay vào code,
|
|
212
|
-
để tôi hỏi vài câu để chốt rõ yêu cầu đã nhé."
|
|
213
|
-
→ Kích hoạt: brainstorm-agent skill (Phase 2-6)
|
|
214
|
-
→ Output: BRIEF.md hoặc docs/specs/<feature>.md
|
|
215
|
-
→ Sau khi tạo xong → Re-check Gate 1 → Proceed Gate 1.5
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### Gate 1.5: Module Specification 🟠
|
|
219
|
-
|
|
220
|
-
```
|
|
221
|
-
CHECK: Mỗi module có file spec chi tiết?
|
|
222
|
-
→ CHECK 1 (Kiro): .kiro/specs/ chứa ≥2 module folders với requirements.md?
|
|
223
|
-
→ CÓ → AUTO-PASS Gate 1.5 (Kiro module specs detected)
|
|
224
|
-
→ Load từng .kiro/specs/<module>/requirements.md làm module spec
|
|
225
|
-
→ CHECK 2: docs/specs/modules/<module>_spec.md tồn tại?
|
|
226
|
-
→ CHECK 3: NeuralMemory có module specs cho project này
|
|
227
|
-
|
|
228
|
-
PASS condition:
|
|
229
|
-
- .kiro/specs module folders tồn tại (highest priority), HOẶC
|
|
230
|
-
- Tất cả modules có spec file VÀ status "Approved"
|
|
231
|
-
|
|
232
|
-
SKIP condition:
|
|
233
|
-
→ TRIVIAL hoặc MODERATE tasks → SKIP
|
|
234
|
-
→ Single-module projects (≤3 modules, không phải port) → SKIP
|
|
235
|
-
→ User nói "skip spec" → SKIP
|
|
236
|
-
|
|
237
|
-
MANDATORY condition:
|
|
238
|
-
→ COMPLEX (score ≥6) VÀ >3 modules
|
|
239
|
-
→ Port/migration projects (iOS→Android, Android→iOS)
|
|
240
|
-
|
|
241
|
-
FAIL action:
|
|
242
|
-
→ Thông báo user: "Trước khi thiết kế kỹ thuật, để em mô tả chi tiết
|
|
243
|
-
từng module — screens, flows, rules — để anh em hiểu rõ cùng nhau."
|
|
244
|
-
→ Kích hoạt: module-spec-writer skill
|
|
245
|
-
→ Output: docs/specs/modules/<module>_spec.md (per module)
|
|
246
|
-
→ Sau khi tạo + approved → Re-check Gate 1.5 → Proceed Gate 2
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
### Gate 2: Architecture & Data Design 🟠
|
|
250
|
-
|
|
251
|
-
```
|
|
252
|
-
CHECK: Tồn tại bản thiết kế kỹ thuật đã được duyệt?
|
|
253
|
-
→ CHECK 1 (Kiro): .kiro/specs/<module>/design.md tồn tại?
|
|
254
|
-
→ CÓ → AUTO-PASS Gate 2 (Kiro design specs detected, pre-approved by IDE)
|
|
255
|
-
→ Load design.md làm approved architecture document
|
|
256
|
-
→ Lưu vào NeuralMemory: "Kiro design docs loaded for <modules>"
|
|
257
|
-
→ CHECK 2: docs/architecture/<feature>_design.md tồn tại?
|
|
258
|
-
→ CHECK 3: implementation_plan.md có section "Data Model" + marker "Approved"
|
|
259
|
-
|
|
260
|
-
PASS condition:
|
|
261
|
-
- .kiro/specs design.md tồn tại (highest priority, auto-approved), HOẶC
|
|
262
|
-
- docs/architecture file tồn tại VÀ có marker "## Status: Approved"
|
|
263
|
-
|
|
264
|
-
FAIL action:
|
|
265
|
-
→ Thông báo user: "Đã có spec rồi. Giờ để tôi phác thảo thiết kế
|
|
266
|
-
Database và API trước khi code, tránh phải sửa đi sửa lại sau nhé."
|
|
267
|
-
→ Kích hoạt: spec-gate skill
|
|
268
|
-
→ Output: docs/architecture/<feature>_design.md
|
|
269
|
-
→ Yêu cầu user approve design
|
|
270
|
-
→ Sau khi approved → Re-check Gate 2 → Proceed Gate 2.5
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
### Gate 2.5: Visual Design & UI Sync 🎨
|
|
274
|
-
|
|
275
|
-
```
|
|
276
|
-
CHECK: Đã có thiết kế UI/hiểu biết chung về UI chưa?
|
|
277
|
-
→ Scan: docs/design/ hoặc docs/screenshot/ có ảnh/tài liệu UI
|
|
278
|
-
→ HOẶC: file docs/design/<feature>.pen đã được duyệt
|
|
279
|
-
|
|
280
|
-
PASS condition: Đã có ảnh UI tham chiếu HOẶC bản vẽ Pencil đính kèm.
|
|
281
|
-
|
|
282
|
-
SKIP condition:
|
|
283
|
-
→ Backend/Logic-only tasks (Cron, API pure, Refactor, DB Query...)
|
|
284
|
-
→ User nói "skip design"
|
|
285
|
-
|
|
286
|
-
FAIL action:
|
|
287
|
-
→ Thông báo user: "Tính năng này có giao diện nên để đảm bảo đồng bộ,
|
|
288
|
-
tôi sẽ phác thảo qua thiết kế bằng Pencil hoặc anh có thể gửi ảnh screenshot/vào docs/design/ trước nhé."
|
|
289
|
-
→ Kích hoạt: visual-design-gate skill
|
|
290
|
-
→ Output: UI layout thống nhất (ảnh / .pen file)
|
|
291
|
-
→ Xác nhận approve visual preview
|
|
292
|
-
→ Sau khi approved → Re-check Gate 2.5 → Proceed Gate 3
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
### Gate 3: Task Breakdown (Symphony) 🟡
|
|
296
|
-
|
|
297
|
-
```
|
|
298
|
-
CHECK: Có Symphony tasks liên kết feature này?
|
|
299
|
-
→ CHECK 1 (Kiro): .kiro/specs/<module>/tasks.md tồn tại?
|
|
300
|
-
→ CÓ → Parse tasks từ Kiro tasks.md
|
|
301
|
-
→ Map task items → Symphony tickets (symphony_create_task)
|
|
302
|
-
→ AUTO-IMPORT: Tạo Symphony tasks từ Kiro task list
|
|
303
|
-
→ CHECK 2: symphony_available_tasks → filter by feature keyword/tag
|
|
304
|
-
|
|
305
|
-
PASS condition: ≥1 task tồn tại cho feature này
|
|
306
|
-
|
|
307
|
-
FAIL action:
|
|
308
|
-
→ Đọc design doc từ Gate 2 (hoặc .kiro/specs design.md)
|
|
309
|
-
→ Auto-generate 3-8 micro-tasks
|
|
310
|
-
→ Tạo Symphony tasks (symphony_create_task cho mỗi task)
|
|
311
|
-
→ Present danh sách cho user confirm
|
|
312
|
-
→ Sau khi confirm → Proceed Gate 4
|
|
313
|
-
```
|
|
314
|
-
|
|
315
|
-
### Gate 4: Execution 🟢
|
|
316
|
-
|
|
317
|
-
```
|
|
318
|
-
CHECK: Có ticket đang In Progress?
|
|
319
|
-
→ symphony_available_tasks(filter="in_progress")
|
|
320
|
-
|
|
321
|
-
🔍 SEARCH BEFORE BUILDING (BẮT BUỘC trước khi viết code mới):
|
|
322
|
-
Layer 0 — Structural (GitNexus, CHỈ khi .gitnexus/ tồn tại):
|
|
323
|
-
→ gitnexus_impact: Check blast radius của symbol cần sửa
|
|
324
|
-
→ gitnexus_context: Xem 360° callers/callees trước khi code
|
|
325
|
-
→ gitnexus_query: Tìm execution flows liên quan
|
|
326
|
-
Layer 1 — Tried-and-True:
|
|
327
|
-
→ nmem_recall: Tìm similar problems đã giải quyết trong brain
|
|
328
|
-
→ grep_search: Tìm existing utils/patterns trong codebase
|
|
329
|
-
Layer 2 — New-and-Popular:
|
|
330
|
-
→ Tìm thư viện/SDK chuẩn ngành cho problem này
|
|
331
|
-
→ Ưu tiên well-maintained, community-backed solutions
|
|
332
|
-
Layer 3 — First-Principles:
|
|
333
|
-
→ CHỈ build from scratch khi Layer 1+2 không có solution phù hợp
|
|
334
|
-
→ Ghi lý do tại sao existing solutions không đáp ứng
|
|
335
|
-
|
|
336
|
-
⚠️ KHÔNG được skip layers! Log kết quả search vào progress report.
|
|
337
|
-
|
|
338
|
-
ACTION:
|
|
339
|
-
→ Nếu chưa có → Claim task tiếp theo: symphony_claim_task
|
|
340
|
-
→ Code THEO TICKET, THEO DESIGN DOC, THEO search results
|
|
341
|
-
→ Nếu phát hiện cần sửa schema khác design → ⛔ DỪNG:
|
|
342
|
-
"Schema change ngoài approved design detected.
|
|
343
|
-
Quay lại Gate 2 để cập nhật design doc."
|
|
344
|
-
→ Complete ticket → symphony_complete_task
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
### Gate 5: Verification 🔵
|
|
348
|
-
|
|
349
|
-
```
|
|
350
|
-
ACTION: Auto-trigger sau mỗi Gate 4 completion
|
|
351
|
-
→ verification-gate skill (evidence before claims)
|
|
352
|
-
→ Boil-the-Lake checklist (completeness check)
|
|
353
|
-
→ code-review skill (nếu task phức tạp)
|
|
354
|
-
→ Đối chiếu: code thực tế vs design doc
|
|
355
|
-
→ OK → Task done → Auto-Next (TP4 in symphony-enforcer)
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
---
|
|
359
|
-
|
|
360
|
-
## 🔀 STEP 3: Slash Command Detection (Giữ lại)
|
|
361
|
-
|
|
362
|
-
Nếu user dùng slash command rõ ràng → Load workflow file trực tiếp, SKIP triage.
|
|
11
|
+
## Routing Logic
|
|
363
12
|
|
|
13
|
+
### 1. Slash Command Detection
|
|
364
14
|
```
|
|
365
15
|
User input starts with `/` → Load workflow file directly
|
|
366
16
|
/plan → workflows/lifecycle/plan.md
|
|
367
17
|
/code → workflows/lifecycle/code.md
|
|
368
18
|
/debug → workflows/lifecycle/debug.md
|
|
369
|
-
|
|
370
|
-
...etc (see GEMINI.md)
|
|
19
|
+
...etc (see GEMINI.md § 2)
|
|
371
20
|
```
|
|
372
21
|
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
---
|
|
376
|
-
|
|
377
|
-
## 🧠 STEP 4: Intent Detection (Fallback)
|
|
378
|
-
|
|
379
|
-
Nếu KHÔNG phải slash command VÀ triage chưa rõ:
|
|
380
|
-
|
|
22
|
+
### 2. Intent Detection (No slash command)
|
|
381
23
|
```yaml
|
|
382
24
|
code_intent:
|
|
383
|
-
keywords: ["implement", "build", "create", "add", "code", "fix", "viết", "tạo"
|
|
384
|
-
action:
|
|
25
|
+
keywords: ["implement", "build", "create", "add", "code", "fix", "viết", "tạo"]
|
|
26
|
+
action: Suggest `/code` or `/codeExpert`
|
|
385
27
|
|
|
386
28
|
debug_intent:
|
|
387
|
-
keywords: ["error", "bug", "crash", "fix", "lỗi", "sửa", "fail"
|
|
388
|
-
action:
|
|
29
|
+
keywords: ["error", "bug", "crash", "fix", "lỗi", "sửa", "fail"]
|
|
30
|
+
action: Suggest `/debug` or `/debugExpert`
|
|
389
31
|
|
|
390
32
|
plan_intent:
|
|
391
33
|
keywords: ["plan", "design", "architect", "how to", "strategy", "thiết kế"]
|
|
392
|
-
action: Suggest
|
|
393
|
-
|
|
394
|
-
brainstorm_intent:
|
|
395
|
-
keywords: ["brainstorm", "ý tưởng", "idea", "nên làm gì", "what should"]
|
|
396
|
-
action: brainstorm-agent skill
|
|
34
|
+
action: Suggest `/plan` or `/planExpert`
|
|
397
35
|
|
|
398
36
|
context_intent:
|
|
399
37
|
keywords: ["remember", "save", "continue", "where was I", "nhớ", "tiếp"]
|
|
400
|
-
action: Suggest
|
|
401
|
-
|
|
402
|
-
refactor_intent:
|
|
403
|
-
keywords: ["refactor", "rename", "extract", "split", "move", "restructure", "blast radius", "impact"]
|
|
404
|
-
action: gitnexus-intelligence skill (impact analysis + safe refactoring)
|
|
405
|
-
```
|
|
406
|
-
|
|
407
|
-
---
|
|
408
|
-
|
|
409
|
-
## 🗣️ Communication Style
|
|
410
|
-
|
|
411
|
-
Orchestrator KHÔNG nói giọng máy móc. Dùng giọng đồng nghiệp senior:
|
|
38
|
+
action: Suggest `/recap` or `/save-brain`
|
|
412
39
|
|
|
40
|
+
ads_intent:
|
|
41
|
+
keywords: ["ads", "campaign", "CPI", "ROAS", "quảng cáo"]
|
|
42
|
+
action: Suggest `/ads-audit` or `/adsExpert`
|
|
413
43
|
```
|
|
414
|
-
❌ "ERROR: Gate 1 not satisfied. Spec document missing."
|
|
415
|
-
✅ "Ý tưởng rất hay! Kinh nghiệm cho thấy nếu không chốt yêu cầu trước,
|
|
416
|
-
sau sửa cực lắm. Để tôi hỏi vài câu rồi mình chốt spec nhé?"
|
|
417
|
-
|
|
418
|
-
❌ "Gate 2 failed. Architecture document required."
|
|
419
|
-
✅ "Đã hiểu yêu cầu rồi. Giờ để tôi phác thảo cấu trúc database
|
|
420
|
-
cho anh xem trước — tránh kiểu vừa làm vừa đập đi xây lại."
|
|
421
44
|
|
|
422
|
-
|
|
423
|
-
✅ "Design ngon rồi! Giờ tôi bẻ ra thành 5 task nhỏ trên Symphony
|
|
424
|
-
để track tiến độ nhé."
|
|
45
|
+
### 3. Skill Pack Check
|
|
425
46
|
```
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
## 🚫 Anti-Patterns
|
|
430
|
-
|
|
431
|
-
```yaml
|
|
432
|
-
never_do:
|
|
433
|
-
- Cho phép code COMPLEX task mà chưa qua Gate 1-2
|
|
434
|
-
- Tự ý thêm cột DB ngoài approved design
|
|
435
|
-
- Hỏi "Bạn muốn chạy workflow nào?" — AI phải TỰ QUYẾT
|
|
436
|
-
- Tạo Symphony tickets trước khi có design doc (Gate 3 cần Gate 2)
|
|
437
|
-
- Force user qua 5 Gates cho trivial tasks
|
|
438
|
-
- Code mới mà chưa search existing solution (Search Before Building)
|
|
439
|
-
- Đồng ý approach có vấn đề mà không push back (Anti-sycophancy)
|
|
440
|
-
- Skip edge cases / error handling vì "trivial" (Boil the Lake)
|
|
441
|
-
|
|
442
|
-
always_do:
|
|
443
|
-
- Hiển thị triage result trước mọi action
|
|
444
|
-
- Thông báo đang ở Gate nào khi chặn
|
|
445
|
-
- Giữ giọng thân thiện, giải thích LÝ DO chặn
|
|
446
|
-
- Cho phép user override gate: "skip gates" hoặc "bỏ qua"
|
|
447
|
-
- Re-check gates sau mỗi lần user provide input
|
|
448
|
-
- Search NeuralMemory + codebase TRƯỚC khi code mới
|
|
449
|
-
- Report DONE_WITH_CONCERNS nếu có caveats (Completion Status)
|
|
450
|
-
- Escalate sau 3 failed attempts (3-Strike Rule)
|
|
47
|
+
If user request involves iOS-specific → Check if mobile-ios pack enabled
|
|
48
|
+
If not enabled → Suggest: "awf enable-pack mobile-ios"
|
|
451
49
|
```
|
|
452
50
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
## 🔗 Skill Relationships
|
|
456
|
-
|
|
51
|
+
### 4. Fallback
|
|
457
52
|
```
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
Gate 1.5 → module-spec-writer (mô tả chi tiết per-module spec)
|
|
461
|
-
Gate 2 → spec-gate (thiết kế DB/API → design doc)
|
|
462
|
-
Gate 2.5 → visual-design-gate (thống nhất UI/UX bằng Pencil)
|
|
463
|
-
Gate 3 → symphony-enforcer (tạo + track tasks)
|
|
464
|
-
Gate 4 → relevant coding workflow (/code, /codeExpert)
|
|
465
|
-
Gate 5 → verification-gate + code-review
|
|
466
|
-
|
|
467
|
-
WORKS WITH:
|
|
468
|
-
nm-memory-sync (đọc context từ NeuralMemory)
|
|
469
|
-
awf-session-restore (restore state)
|
|
470
|
-
symphony-orchestrator (đảm bảo Symphony server running)
|
|
471
|
-
gitnexus-intelligence (architectural awareness trước khi code)
|
|
472
|
-
|
|
473
|
-
DOES NOT:
|
|
474
|
-
Execute code trực tiếp (delegates to workflows)
|
|
475
|
-
Modify files (chỉ route + enforce gates)
|
|
53
|
+
No match → Ask clarifying question (max 2 times)
|
|
54
|
+
Still unclear → Suggest `/help`
|
|
476
55
|
```
|
|
477
56
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
## 🧩 Edge Cases
|
|
481
|
-
|
|
482
|
-
| Tình huống | Xử lý |
|
|
483
|
-
|-----------|--------|
|
|
484
|
-
| User nói "skip gates" / "bỏ qua" | Cho phép bypass, ghi cảnh báo |
|
|
485
|
-
| Feature đã có partial spec | Gate 1 pass, check Gate 2 |
|
|
486
|
-
| Debug request | Bypass spec gates — debugging is reactive |
|
|
487
|
-
| User follow-up nhỏ sau feature done | Re-triage — thường TRIVIAL |
|
|
488
|
-
| Multiple features cùng lúc | Triage TỪNG feature riêng |
|
|
489
|
-
| Spec tồn tại nhưng outdated | Cảnh báo "Spec cũ, cần update?" |
|
|
490
|
-
| Project chưa có docs/ folder | Tạo folder structure tự động |
|
|
491
|
-
| `.kiro/specs/` tồn tại | AUTO-DETECT → accelerate Gates 1, 1.5, 2, 3 |
|
|
492
|
-
| `.kiro/specs` + `docs/specs` cùng tồn tại | Ưu tiên `.kiro/specs`, cảnh báo potential conflict |
|
|
493
|
-
| `.kiro/specs` chỉ có 1 module folder | Pass Gate 1, SKIP Gate 1.5 (single module) |
|
|
494
|
-
| `.kiro/specs/<module>/tasks.md` format lạ | Parse best-effort, fallback tạo tasks thủ công |
|
|
495
|
-
|
|
496
|
-
---
|
|
497
|
-
|
|
498
|
-
*orchestrator v2.3 — Autonomous State Machine Gatekeeper for AWKit (Kiro Spec Integration)*
|
|
57
|
+
## Auto-Activation
|
|
58
|
+
This skill is always active. It runs as the first layer before any other processing.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ship-to-code
|
|
3
|
+
description: >-
|
|
4
|
+
Universal Code Porting & Migration Specialist. Translates legacy or reference code
|
|
5
|
+
from ANY source language/framework to ANY target language/framework.
|
|
6
|
+
Rebuilds the architecture while adhering to the target's modern best practices.
|
|
7
|
+
author: Antigravity Team
|
|
8
|
+
version: 1.0.0
|
|
9
|
+
trigger: conditional
|
|
10
|
+
activation_keywords:
|
|
11
|
+
- "/ship-to-code"
|
|
12
|
+
- "/port-code"
|
|
13
|
+
- "/migrate-code"
|
|
14
|
+
- "port code"
|
|
15
|
+
- "chuyển ngôn ngữ"
|
|
16
|
+
- "ship to code"
|
|
17
|
+
- "dịch code"
|
|
18
|
+
priority: high
|
|
19
|
+
platform: agnostic
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# 🚢 Ship-to-Code Skill
|
|
23
|
+
|
|
24
|
+
> **Purpose:** Transform reference codebase from ANY source language/framework to ANY modern target language/framework.
|
|
25
|
+
> **Philosophy:** "Read source to understand WHAT and WHY → Write target for HOW."
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## ⚠️ SCOPE CLARITY
|
|
30
|
+
|
|
31
|
+
| This skill DOES | This skill DOES NOT |
|
|
32
|
+
|-----------------|---------------------|
|
|
33
|
+
| Read & analyze source language code & structure | Write in the obsolete/source language |
|
|
34
|
+
| Rebuild logic idiomatically in modern target language | Blindly translate line-by-line (syntax-only) |
|
|
35
|
+
| Map source dependencies to target equivalents | Auto-migrate production database records directly |
|
|
36
|
+
| Implement Clean Architecture/Modern patterns in target | Just copy-paste without adapting paradigms |
|
|
37
|
+
| Extract/convert needed resources on-demand | Mass-copy entire resource folders blindly |
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 🎯 ROLE DEFINITION
|
|
42
|
+
|
|
43
|
+
When this skill is active, the agent becomes:
|
|
44
|
+
|
|
45
|
+
> **Expert Multi-Language Porting Architect**
|
|
46
|
+
> - Master at deciphering unfamiliar, foreign or legacy codebases.
|
|
47
|
+
> - Fluent in modern target architectures (Clean Architecture / MVC / MVVM / Hexagonal depending on target ecosystem).
|
|
48
|
+
> - Knows how to map business logic across different language paradigms (e.g., Object-Oriented to Functional, Sync to Async, etc).
|
|
49
|
+
> - Enforces exact Input/Output mathematical parity for core algorithms and cryptology.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 📋 EXECUTION PIPELINE (6 Phases)
|
|
54
|
+
|
|
55
|
+
> **Rule:** Always complete one phase fully before moving to the next.
|
|
56
|
+
> **Rule:** After each phase, create a checkpoint summary for the user to approve.
|
|
57
|
+
|
|
58
|
+
### Phase 0: Ecosystem & Dependency Mapping 🔍
|
|
59
|
+
**Purpose:** Identify all 3rd-party libraries, SDKs, and frameworks in the source project and map them to the best modern equivalents in the target ecosystem.
|
|
60
|
+
1. Scan source project configuration files (`package.json`, `build.gradle`, `requirements.txt`, `Cargo.toml`, `go.mod`, etc.).
|
|
61
|
+
2. Generate a Library Detection Report featuring a **Matrix (Source Lib → Target Lib)**.
|
|
62
|
+
3. Present to the user for evaluation and approval.
|
|
63
|
+
|
|
64
|
+
### Phase 1: Architecture Design & Project Bootstrap 📄
|
|
65
|
+
**Purpose:** Analyze application entry points, metadata, lifecycle, and propose a robust target directory structure.
|
|
66
|
+
1. Identify how the app starts, handles authentication, routes traffic, and loads plugins.
|
|
67
|
+
2. Propose a modern project folder layout aligned with target language standards (e.g., standard Go layout, feature-first React layout, Clean Architecture for Mobile).
|
|
68
|
+
3. Scaffold initial configuration files for the target language.
|
|
69
|
+
|
|
70
|
+
### Phase 2: Data & Domain Layer Reconstruction 💾
|
|
71
|
+
**Purpose:** Rebuild strict data contracts and persistence infrastructure.
|
|
72
|
+
1. Convert source models/POJOs/Entities into target native DTOs, interfaces, structs, or dataclasses (e.g., implementing `.fromJson()`, `Codable`, `serde`).
|
|
73
|
+
2. Port Database schemas/ORMs to target paradigms (e.g., translating SQLAlchemy to Prisma, Room to SwiftData).
|
|
74
|
+
3. Migrate API clients using target's native concurrency mechanisms (Coroutines, `async/await`, Goroutines).
|
|
75
|
+
|
|
76
|
+
### Phase 3: Core Business Logic & Utils 🧮
|
|
77
|
+
**Purpose:** Port specialized algorithms, encryption, math, and custom helpers.
|
|
78
|
+
1. Translate raw logic with strict adherence to the exact mathematical and state behavior of the source.
|
|
79
|
+
2. Provide **Unit Tests** in the target language to prove 100% computational parity with source output (especially for Base64, MD5/SHA, AES, timezone parsing).
|
|
80
|
+
|
|
81
|
+
### Phase 4: UI & Presentation / Controller Layer 🎨
|
|
82
|
+
**Purpose:** Rebuild user interfaces or API controllers utilizing the target's standard frameworks.
|
|
83
|
+
1. Map source UI components to target equivalents (e.g., React to Compose, HTML/Jinja to Vue, Android XML to SwiftUI).
|
|
84
|
+
2. For backend APIs: Convert source controller route handling to modern target framework routing (e.g., Express.js to FastAPI, Spring Boot to Go Gin).
|
|
85
|
+
3. Implement modern state management and reactive data flows native to the new ecosystem.
|
|
86
|
+
|
|
87
|
+
### Phase 5: SDK Integration & Parity Quality Gate ✅
|
|
88
|
+
**Purpose:** Finalize third-party setups and ensure feature completeness.
|
|
89
|
+
1. Wire up heavy SDKs (Auth, Analytics, Push Notifications, Payment gateways) with target SDKs.
|
|
90
|
+
2. Perform rigorous Parity Validation across:
|
|
91
|
+
- *Branch Coverage:* Ensure all `if/switch` edge cases from source were ported.
|
|
92
|
+
- *Endpoint Parity:* Ensure headers, bodies, status codes match output.
|
|
93
|
+
- *Visual Parity:* (If UI) Layout behaves correctly.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## 🚫 ANTI-PATTERNS
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
never_do:
|
|
101
|
+
- Line-by-line verbatim syntax translation (e.g., writing Java code in Go syntax using 'for' instead of 'range', or ignoring Swift optionals to force unwrap like in C#).
|
|
102
|
+
- Use deprecated patterns in the target ecosystem just because the source used them.
|
|
103
|
+
- Skip extracting business rules before writing the target implementation.
|
|
104
|
+
- Alter encryption hashes / outputs — they must match the original exactly for server compatibility!
|
|
105
|
+
|
|
106
|
+
always_do:
|
|
107
|
+
- Write Idiomatic Code: Fully embrace the target language's design patterns, conventions, and error-handling features.
|
|
108
|
+
- Checkpoint and halt after generating the Ecosystem Dependency Matrix to let the user review framework choices.
|
|
109
|
+
- Build test suites to verify math and crypto translations against known source outputs.
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
*ship-to-code v1.0.0 — Universal Code Porting Skill*
|
|
115
|
+
*Created by Antigravity Team*
|