@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
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# STRICT STARTUP PROTOCOL (BẮT BUỘC)
|
|
2
|
+
|
|
3
|
+
Mỗi khi bắt đầu task code/debug/plan, AI PHẢI đi qua **6 steps tuần tự**.
|
|
4
|
+
KHÔNG được bắt đầu work cho đến khi TẤT CẢ steps ✅.
|
|
5
|
+
|
|
6
|
+
## Step 0.5: Legacy Artifact Cleanup (AUTO)
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
→ Kiểm tra: .symphony/tasks.json tồn tại?
|
|
10
|
+
→ CÓ → ⚠️ CẢNH BÁO: "Legacy tasks.json detected. Symphony uses SQLite DB — this file is stale."
|
|
11
|
+
→ Khuyên user xoá: "rm .symphony/tasks.json"
|
|
12
|
+
→ KHÔNG tự xoá (safety guardrail) — chỉ cảnh báo.
|
|
13
|
+
→ Ghi log vào NeuralMemory: "Legacy tasks.json found at {project}, warned user."
|
|
14
|
+
→ KHÔNG → ✅ Clean (no legacy artifacts)
|
|
15
|
+
→ Output: "🧹 Step 0.5: Legacy Check ✅ — No stale artifacts"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
> **Lý do:** Symphony v2+ sử dụng SQLite DB (`symphony.db`) làm single source of truth.
|
|
19
|
+
> 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
|
|
20
|
+
> "split-brain" — một nửa tool đọc JSON, một nửa đọc DB → dữ liệu lệch pha.
|
|
21
|
+
|
|
22
|
+
## Step 1: Project Identity — `.project-identity`
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
→ Kiểm tra: file .project-identity có tồn tại?
|
|
26
|
+
→ CÓ → Đọc projectId, projectName
|
|
27
|
+
→ KHÔNG → ⛔ DỪNG. Hỏi user hoặc tạo .project-identity.
|
|
28
|
+
→ Output: "📋 Step 1/6: Project Identity ✅ — {projectId}"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Step 2: NeuralMemory Brain — Switch brain
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
→ nmem brain use <projectId>
|
|
35
|
+
→ nmem_recap(level=1) — load context
|
|
36
|
+
→ Output: "🧠 Step 2/6: Brain ✅ — switched to {projectId}"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Step 3: Spec Alignment — Đọc Project Spec (Kiro + fallback)
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
→ CHECK 1 (Kiro — HIGHEST PRIORITY): .kiro/specs/ tồn tại?
|
|
43
|
+
→ CÓ → Load specs từ .kiro/specs/:
|
|
44
|
+
- .kiro/specs/<project>/requirements.md → project spec
|
|
45
|
+
- .kiro/specs/<module>/requirements.md → module specs
|
|
46
|
+
- .kiro/specs/<module>/design.md → architecture
|
|
47
|
+
- .kiro/specs/<module>/tasks.md → task breakdown (cho Step 4)
|
|
48
|
+
→ Extract constraints liên quan đến task hiện tại
|
|
49
|
+
→ Output: "📐 Step 3/6: Kiro Specs Loaded ✅ — {N} modules, {M} design docs"
|
|
50
|
+
|
|
51
|
+
→ CHECK 2 (fallback): docs/specs/PROJECT.md tồn tại?
|
|
52
|
+
→ CÓ → Đọc silent: PROJECT.md + TECH-SPEC.md + REQUIREMENTS.md
|
|
53
|
+
→ Extract constraints liên quan đến task hiện tại
|
|
54
|
+
→ NẾU PLANNING mode:
|
|
55
|
+
- Hỏi user 1-3 câu về constraints/UX cụ thể của feature
|
|
56
|
+
→ KHÔNG → Skip (project chưa /init) → "📐 Step 3/6: No spec — skipped"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Step 4: Symphony Task — Tạo hoặc nhận task
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
→ CHECK 1 (Kiro tasks): .kiro/specs/<module>/tasks.md tồn tại?
|
|
63
|
+
→ CÓ + chưa import → Parse task items từ tasks.md:
|
|
64
|
+
- Group theo module name
|
|
65
|
+
- Đánh tag kèm module name
|
|
66
|
+
→ ⛔ CẢNH BÁO: KHÔNG đồng bộ nhỏ lẻ lên Trello. Chỉ đồng bộ module/feature lớn.
|
|
67
|
+
→ Output: "🎯 Step 4/6: Kiro Tasks Imported ✅ — {N} tasks created"
|
|
68
|
+
→ Claim task phù hợp nhất với user request
|
|
69
|
+
|
|
70
|
+
→ CHECK 2 (fallback): symphony_available_tasks(filter="my") → check active tasks
|
|
71
|
+
→ CÓ task in_progress phù hợp → dùng tiếp
|
|
72
|
+
→ CÓ task ready phù hợp → symphony_claim_task
|
|
73
|
+
→ KHÔNG CÓ → symphony_create_task(title) → symphony_claim_task(new_id)
|
|
74
|
+
→ Lưu task_id cho TP1-TP4
|
|
75
|
+
→ Output: "🎯 Step 4/6: Task ✅ — #sym-XYZ claimed"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Step 5: Confirmation Block
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
🚦 STARTUP PROTOCOL COMPLETE
|
|
82
|
+
══════════════════════════════════════
|
|
83
|
+
Step 0.5: 🧹 Legacy Check ✅ No stale artifacts
|
|
84
|
+
Step 1: 📋 Project Identity ✅ {projectId}
|
|
85
|
+
Step 2: 🧠 NeuralMemory ✅ brain: {projectId}
|
|
86
|
+
Step 3: 📐 Spec Alignment ✅ {constraints_count} constraints loaded
|
|
87
|
+
Step 4: 🎯 Task ✅ #sym-XYZ — "{title}"
|
|
88
|
+
Step 5: ✅ READY TO WORK
|
|
89
|
+
══════════════════════════════════════
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
> ⛔ **Nếu KHÔNG hiển thị confirmation block = VI PHẠM**
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Task Completion Protocol (TP2) + Git Commit (TP2.5) + Auto-Next (TP4)
|
|
2
|
+
|
|
3
|
+
## TP2: Task Complete — Completion Status Protocol
|
|
4
|
+
|
|
5
|
+
**Khi nào:** AI detect ≥2/4 completion signals:
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
Signal 1: Final notify_user với BlockedOnUser=false
|
|
9
|
+
Signal 2: Walkthrough artifact đã tạo
|
|
10
|
+
Signal 3: Tất cả checklist items trong task.md đã [x]
|
|
11
|
+
Signal 4: Verification pass (tests OK, build OK)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
**Completion Status Protocol (4 statuses):**
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
DONE:
|
|
18
|
+
Điều kiện: Verification pass, không caveats.
|
|
19
|
+
Format: "✅ DONE — {summary}. Build: ✅. Tests: ✅ N/N."
|
|
20
|
+
|
|
21
|
+
DONE_WITH_CONCERNS:
|
|
22
|
+
Điều kiện: Code hoạt động nhưng có caveats/risks.
|
|
23
|
+
Format: "⚠️ DONE_WITH_CONCERNS — {summary}.
|
|
24
|
+
Concerns: [list] Risk: [mức độ] Recommendation: [đề xuất]"
|
|
25
|
+
|
|
26
|
+
BLOCKED:
|
|
27
|
+
Điều kiện: Không thể tiếp tục vì external dependency.
|
|
28
|
+
Format: "🚫 BLOCKED — {reason}. Attempted: [list] Needs: [what]"
|
|
29
|
+
|
|
30
|
+
NEEDS_CONTEXT:
|
|
31
|
+
Điều kiện: Thiếu thông tin từ user.
|
|
32
|
+
Format: "❓ NEEDS_CONTEXT — {what's missing}. Question: [câu hỏi]"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
⛔ **KHÔNG BAO GIỜ report DONE nếu thực tế là DONE_WITH_CONCERNS hoặc BLOCKED.**
|
|
36
|
+
|
|
37
|
+
**Action (cho DONE status):**
|
|
38
|
+
```
|
|
39
|
+
0. ⚡ VERIFICATION GATE (BẮT BUỘC):
|
|
40
|
+
- IDENTIFY → RUN → READ → VERIFY
|
|
41
|
+
- If NO → FIX trước, KHÔNG complete task
|
|
42
|
+
- If YES → Proceed with evidence
|
|
43
|
+
|
|
44
|
+
1. symphony_complete_task(task_id, summary="STATUS + EVIDENCE")
|
|
45
|
+
2. Hiển thị: "✅ SYM #sym-XYZ — {STATUS}"
|
|
46
|
+
3. → TRIGGER TP2.5 (Atomic Git Commit)
|
|
47
|
+
4. → TRIGGER TP4 (Auto-Next) NGAY LẬP TỨC
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## TP2.5: Atomic Git Commit (BẮT BUỘC)
|
|
53
|
+
|
|
54
|
+
**Khi nào:** Ngay sau TP2 (task done), TRƯỚC TP4. Chỉ trigger khi có code changes.
|
|
55
|
+
|
|
56
|
+
**Action:**
|
|
57
|
+
```
|
|
58
|
+
1. git status --porcelain → KHÔNG CÓ changes → skip
|
|
59
|
+
2. Xác định commit type: feat | fix | refactor | docs
|
|
60
|
+
3. Format: "{type}({scope}): {task_summary}"
|
|
61
|
+
4. git add <files> → git commit -m "{message}"
|
|
62
|
+
5. ⚠️ KHÔNG AUTO-PUSH — chỉ commit local
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Enforcement:**
|
|
66
|
+
- ❌ KHÔNG auto-push
|
|
67
|
+
- ❌ KHÔNG commit nếu có unresolved merge conflicts
|
|
68
|
+
- ❌ KHÔNG commit files ngoài scope task
|
|
69
|
+
- ✅ Mỗi task = 1 commit (atomic, traceable)
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## TP3: Abandoned / Context Switch
|
|
74
|
+
|
|
75
|
+
**Khi nào:** User đổi topic, AI timeout, user nói dừng.
|
|
76
|
+
|
|
77
|
+
**Action:** `symphony_abandon_task(task_id, reason="...")`
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## TP4: Auto-Next Suggestion (BẮT BUỘC)
|
|
82
|
+
|
|
83
|
+
**Khi nào:** Ngay sau TP2 (task completed). KHÔNG ĐƯỢC BỎ QUA.
|
|
84
|
+
|
|
85
|
+
**Action:**
|
|
86
|
+
```
|
|
87
|
+
1. ĐỌC projectId từ .project-identity
|
|
88
|
+
2. symphony task list -P <projectId> -s ready (CHỈ tasks cùng project)
|
|
89
|
+
⚠️ TUYỆT ĐỐI KHÔNG dùng filter="ready" không có project filter
|
|
90
|
+
3. Lọc top 2-3 ready tasks theo priority
|
|
91
|
+
4. Present cho user:
|
|
92
|
+
➡️ NEXT STEPS ({projectName})
|
|
93
|
+
📋 #sym-A1 — Auth Module (P0, ready)
|
|
94
|
+
📋 #sym-A2 — Dashboard UI (P1, ready)
|
|
95
|
+
5. Nếu KHÔNG CÓ ready tasks → "✨ Không còn task ready! Tạo task mới hoặc chuyển phase."
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Enforcement:**
|
|
99
|
+
- ❌ KHÔNG kết thúc conversation mà KHÔNG present next suggestion
|
|
100
|
+
- ❌ KHÔNG show tasks từ project khác
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Three-Phase Auto-Enforcement Protocol (BẮT BUỘC)
|
|
2
|
+
|
|
3
|
+
> **Vấn đề:** AI không tự chủ động dùng Three-Phase nếu không bị ép.
|
|
4
|
+
> **Giải pháp:** Auto-detect + auto-announce + auto-enforce.
|
|
5
|
+
|
|
6
|
+
## Phase State Tracking
|
|
7
|
+
|
|
8
|
+
AI PHẢI duy trì trạng thái phase hiện tại xuyên suốt Gate 4:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
current_phase = "A" | "B" | "C" | "none"
|
|
12
|
+
phase_b_confirmed = false | true
|
|
13
|
+
checkpoint_count = 0
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Auto-Detection: Khi nào kích hoạt Three-Phase?
|
|
17
|
+
|
|
18
|
+
Tại đầu Gate 4 (EXECUTION bắt đầu), AI PHẢI tự kiểm tra:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
1. Task được triage là COMPLEX?
|
|
22
|
+
2. Task có UI component? (detect qua):
|
|
23
|
+
→ Symphony task title chứa: screen, view, UI, layout, dashboard, form
|
|
24
|
+
→ Implementation plan mentions: Composable, Fragment, Activity, Screen, View
|
|
25
|
+
→ Design doc tồn tại (docs/design/ hoặc docs/architecture/ có UI sections)
|
|
26
|
+
→ Spec references: wireframe, mockup, screenshot
|
|
27
|
+
→ Platform: Android/iOS/React Native/Flutter (hầu hết có UI)
|
|
28
|
+
|
|
29
|
+
Nếu CẢ HAI điều kiện thỏa:
|
|
30
|
+
→ BẮT BUỘC kích hoạt Three-Phase
|
|
31
|
+
→ Hiển thị Phase Announcement Block
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Phase Announcement Block (BẮT BUỘC)
|
|
35
|
+
|
|
36
|
+
Khi kích hoạt Three-Phase, AI PHẢI hiển thị:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
🎯 THREE-PHASE EXECUTION ACTIVATED
|
|
40
|
+
══════════════════════════════════════
|
|
41
|
+
🏗️ Phase A: Infrastructure Setup
|
|
42
|
+
→ {list tasks for Phase A}
|
|
43
|
+
🎨 Phase B: UI Shell (Mock Data)
|
|
44
|
+
→ {list tasks for Phase B}
|
|
45
|
+
→ 🧪 AUTO DEVICE TEST (Maestro) sau phase này
|
|
46
|
+
⚡ Phase C: Logic Integration
|
|
47
|
+
→ {list tasks for Phase C}
|
|
48
|
+
→ 🧪 AUTO DEVICE TEST (Maestro) mỗi feature
|
|
49
|
+
══════════════════════════════════════
|
|
50
|
+
Bắt đầu Phase A...
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Phase Transition Triggers (TỰ ĐỘNG)
|
|
54
|
+
|
|
55
|
+
```yaml
|
|
56
|
+
auto_triggers:
|
|
57
|
+
phase_a_to_b:
|
|
58
|
+
signal: Tất cả [INFRA] tasks đã done + build OK
|
|
59
|
+
action: |
|
|
60
|
+
- Announce: "🏗️ Phase A ✅ — Build thành công. Chuyển sang Phase B (UI Shell)."
|
|
61
|
+
- Set current_phase = "B"
|
|
62
|
+
- Bắt đầu code UI tasks
|
|
63
|
+
|
|
64
|
+
phase_b_to_checkpoint:
|
|
65
|
+
signal: Tất cả [UI] tasks đã done
|
|
66
|
+
action: |
|
|
67
|
+
- ⛔ TRIGGER TP1.7 (Checkpoint)
|
|
68
|
+
- Đọc `.project-identity` -> `autoVerification`
|
|
69
|
+
- NẾU `true`:
|
|
70
|
+
+ Chạy Auto Build → check exit code 0
|
|
71
|
+
+ Dùng mcp_maestro_launch_app và take_screenshot
|
|
72
|
+
+ NẾU fail → DỪNG (notify_user BlockedOnUser=true)
|
|
73
|
+
+ NẾU pass → Báo cáo Screenshot (BlockedOnUser=false) và làm tiếp Phase C
|
|
74
|
+
- NẾU `false` (default):
|
|
75
|
+
+ DỪNG VÀ CHỜ user test thủ công (notify_user BlockedOnUser=true)
|
|
76
|
+
+ CHỜ user xác nhận "OK" mới đi tiếp Phase C
|
|
77
|
+
|
|
78
|
+
checkpoint_to_phase_c:
|
|
79
|
+
signal: Build success & App launched (autoVerification=true) HOẶC User confirmed "OK" (autoVerification=false)
|
|
80
|
+
action: |
|
|
81
|
+
- Set phase_b_confirmed = true
|
|
82
|
+
- Set current_phase = "C"
|
|
83
|
+
- Announce: "🎨 Phase B ✅ — UI đã được duyệt. Chuyển sang Phase C (Logic)."
|
|
84
|
+
|
|
85
|
+
phase_c_per_feature:
|
|
86
|
+
signal: 1 feature [LOGIC] đã done + có UI impact
|
|
87
|
+
action: |
|
|
88
|
+
- TRIGGER TP1.7 (mini checkpoint)
|
|
89
|
+
- Batch các features nhỏ lại nếu có thể
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Enforcement Rules
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
❌ VI PHẠM NẶNG:
|
|
96
|
+
- Code logic (Phase C) khi phase_b_confirmed = false
|
|
97
|
+
- Skip Phase Announcement Block
|
|
98
|
+
- Bỏ qua TP1.7
|
|
99
|
+
- Chạy Auto-verification khi `autoVerification: false`
|
|
100
|
+
- Chờ user test thủ công khi `autoVerification: true`
|
|
101
|
+
|
|
102
|
+
✅ BẮT BUỘC:
|
|
103
|
+
- Luôn announce phase transition rõ ràng
|
|
104
|
+
- Luôn đọc `autoVerification` trong `.project-identity` trước khi trigger check
|
|
105
|
+
- Gắn BlockedOnUser = true cho mode manual, false cho mode auto
|
|
106
|
+
- Ghi lại phase state vào NeuralMemory khi chuyển phase
|
|
107
|
+
```
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Trigger Points: TP1, TP1.5, TP1.7
|
|
2
|
+
|
|
3
|
+
## TP1: Progress Milestone
|
|
4
|
+
|
|
5
|
+
**Khi nào:** Milestone xảy ra:
|
|
6
|
+
- Chuyển mode: PLANNING → EXECUTION → VERIFICATION
|
|
7
|
+
- Gọi `notify_user` (TRƯỚC khi gọi)
|
|
8
|
+
- Hoàn thành 1 component/file lớn
|
|
9
|
+
- Phát hiện vấn đề cần thay đổi approach
|
|
10
|
+
|
|
11
|
+
**Action:**
|
|
12
|
+
```
|
|
13
|
+
symphony_report_progress(
|
|
14
|
+
task_id=current_task,
|
|
15
|
+
progress=estimated_percentage,
|
|
16
|
+
last_action="mô tả ngắn"
|
|
17
|
+
)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Progress Guide (Three-Phase Model):**
|
|
21
|
+
```
|
|
22
|
+
10% — Task created, đang research/đọc code
|
|
23
|
+
20% — Implementation plan approved
|
|
24
|
+
25% — Phase A done (build OK, dependencies ready)
|
|
25
|
+
30% — Phase B bắt đầu (UI shell coding)
|
|
26
|
+
45% — Phase B done → USER TEST CHECKPOINT #1 (UI review)
|
|
27
|
+
50% — Phase C bắt đầu (logic integration)
|
|
28
|
+
50-85% — Phase C per-feature (each feature = +5-10%)
|
|
29
|
+
85% — Phase C done, đang final verification
|
|
30
|
+
90% — Walkthrough/docs tạo xong
|
|
31
|
+
100% — Hoàn thành (auto-trigger TP2)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Enforcement:**
|
|
35
|
+
- ❌ KHÔNG được gọi `notify_user` mà chưa `report_progress` trước đó
|
|
36
|
+
- ❌ KHÔNG được chuyển mode (task_boundary) mà chưa report
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## TP1.5: Design Compliance Check (Gate 4 Enforcement)
|
|
41
|
+
|
|
42
|
+
**Khi nào:** Mỗi khi AI sửa file liên quan đến DB/Model/Schema trong EXECUTION mode.
|
|
43
|
+
|
|
44
|
+
**Trigger signals:**
|
|
45
|
+
```
|
|
46
|
+
File patterns:
|
|
47
|
+
- **/models/**, **/entities/**, **/schemas/**
|
|
48
|
+
- **Migration*, **Schema*, **Model*
|
|
49
|
+
- *.entity.*, *.model.*, *.schema.*
|
|
50
|
+
- Database.swift, AppDatabase.swift, schema.prisma, etc.
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Action:**
|
|
54
|
+
```
|
|
55
|
+
1. Kiểm tra: docs/architecture/<feature>_design.md tồn tại?
|
|
56
|
+
→ KHÔNG → ⚠️ Warning: "Đang sửa model file nhưng chưa có approved design."
|
|
57
|
+
→ Nếu COMPLEX task → ⛔ DỪNG, enforce Gate 2
|
|
58
|
+
→ Nếu TRIVIAL/MODERATE → Warning only, tiếp tục
|
|
59
|
+
|
|
60
|
+
2. Đối chiếu thay đổi vs approved design:
|
|
61
|
+
→ Thêm field KHÔNG có trong design? → ⛔ DỪNG
|
|
62
|
+
→ Đổi type khác design? → ⛔ DỪNG
|
|
63
|
+
→ Xóa field trong design? → ⛔ DỪNG
|
|
64
|
+
→ Thêm field CÓ trong design? → ✅ OK
|
|
65
|
+
|
|
66
|
+
3. Khi DỪNG:
|
|
67
|
+
→ Thông báo schema change ngoài approved design
|
|
68
|
+
→ Kích hoạt spec-gate skill để update design doc
|
|
69
|
+
→ Sau khi re-approve → tiếp tục code
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## TP1.7: Flexible Checkpoint (Manual vs Auto)
|
|
75
|
+
|
|
76
|
+
**Cấu hình Mode Verification:**
|
|
77
|
+
- `{"autoVerification": true}` → **Auto Device Checkpoint (ADC)**: Dùng Maestro tự build & chụp screenshot. Tiến thẳng (BlockedOnUser=false).
|
|
78
|
+
- `{"autoVerification": false}` (hoặc không khai báo) → **Manual Checkpoint**: Dừng chờ user test (BlockedOnUser=true). **MẶC ĐỊNH an toàn**.
|
|
79
|
+
|
|
80
|
+
**Khi nào trigger TP1.7:**
|
|
81
|
+
1. **Phase B → C Transition (BẮT BUỘC cho COMPLEX):** ALL UI screens đã code xong
|
|
82
|
+
2. **Sau mỗi feature trong Phase C (COMPLEX tasks):** Feature X đã code xong logic
|
|
83
|
+
|
|
84
|
+
**Action (Tùy theo Mode):**
|
|
85
|
+
```
|
|
86
|
+
1. Report progress trước: symphony_report_progress(current_task, progress)
|
|
87
|
+
2. Kiểm tra cờ `autoVerification` trong .project-identity.
|
|
88
|
+
|
|
89
|
+
=== TRƯỜNG HỢP 1: autoVerification = false (Default Manual) ===
|
|
90
|
+
- Announce "🧪 MANUAL USER TEST CHECKPOINT #{N}"
|
|
91
|
+
- Đưa hướng dẫn test cụ thể
|
|
92
|
+
- Gọi notify_user(BlockedOnUser=true) — DỪNG và CHỜ user response
|
|
93
|
+
|
|
94
|
+
=== TRƯỜNG HỢP 2: autoVerification = true (Auto Maestro) ===
|
|
95
|
+
- Chạy Auto Build
|
|
96
|
+
- Chạy mcp_maestro_launch_app, mcp_maestro_take_screenshot
|
|
97
|
+
- NẾU Build/Run Lỗi: BlockedOnUser=true
|
|
98
|
+
- NẾU Pass: BlockedOnUser=false. Lập tức đi tiếp!
|
|
99
|
+
```
|
|
@@ -1,110 +1,122 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: writing-skills
|
|
3
|
-
description: Use when creating or
|
|
3
|
+
description: Use when creating or updating AWKit skills or workflow documentation and you need a lean, searchable, testable skill structure.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Writing Skills
|
|
6
|
+
# Writing Skills — Router
|
|
7
7
|
|
|
8
8
|
## Overview
|
|
9
9
|
|
|
10
|
-
Writing skills IS Test-Driven Development applied to process documentation
|
|
10
|
+
**Writing skills IS Test-Driven Development applied to process documentation.**
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Write pressure scenarios, observe failure, write the minimum useful skill, then close loopholes without bloating the main file.
|
|
13
|
+
|
|
14
|
+
**Core principle:** If you did not watch an agent fail without the skill, you do not know whether the skill teaches the right behavior.
|
|
15
|
+
|
|
16
|
+
**Required background:** `test-driven-development` from the `superpowers` pack when you need the full RED-GREEN-REFACTOR discipline.
|
|
13
17
|
|
|
14
18
|
## What is a Skill?
|
|
15
19
|
|
|
16
|
-
|
|
20
|
+
**Skills are:** Reusable techniques, patterns, tools, reference guides
|
|
21
|
+
**Skills are not:** Session narratives or one-off implementation logs
|
|
22
|
+
|
|
23
|
+
### Skill Types
|
|
24
|
+
|
|
25
|
+
- **Technique** — Concrete method with steps
|
|
26
|
+
- **Pattern** — Decision framework or mental model
|
|
27
|
+
- **Reference** — API docs, syntax guides, environment-specific notes
|
|
17
28
|
|
|
18
|
-
|
|
19
|
-
**Skills are NOT:** Narratives about how you solved a problem once
|
|
29
|
+
## Topic Index
|
|
20
30
|
|
|
21
|
-
|
|
31
|
+
| Topic | When to Load | File |
|
|
32
|
+
|-------|--------------|------|
|
|
33
|
+
| Search optimization and descriptions | Naming skills and writing trigger metadata | `examples/cso-optimization.md` |
|
|
34
|
+
| TDD for skills | Designing validation for skills and workflow docs | `examples/tdd-for-skills.md` |
|
|
35
|
+
| Anti-rationalization patterns | Hardening discipline skills against loopholes | `examples/anti-rationalization.md` |
|
|
22
36
|
|
|
23
|
-
|
|
37
|
+
## SKILL.md Structure
|
|
38
|
+
|
|
39
|
+
**Frontmatter:** Only `name` and `description`
|
|
40
|
+
|
|
41
|
+
- `name`: letters, numbers, hyphens only
|
|
42
|
+
- `description`: start with `Use when...`
|
|
43
|
+
- Keep the description focused on trigger conditions, not on the workflow internals
|
|
24
44
|
|
|
25
45
|
```markdown
|
|
26
46
|
---
|
|
27
47
|
name: skill-name
|
|
28
|
-
description:
|
|
48
|
+
description: Use when [triggering conditions and symptoms]
|
|
29
49
|
---
|
|
30
50
|
|
|
31
|
-
# Skill
|
|
51
|
+
# Skill Name
|
|
52
|
+
## Overview
|
|
53
|
+
## When to Use / When Not to Use
|
|
54
|
+
## Core Pattern
|
|
55
|
+
## Quick Reference
|
|
56
|
+
## Implementation
|
|
57
|
+
## Common Mistakes
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Directory Structure
|
|
32
61
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
## Integration (related skills + workflows)
|
|
62
|
+
```text
|
|
63
|
+
skills/skill-name/
|
|
64
|
+
├── SKILL.md
|
|
65
|
+
├── examples/
|
|
66
|
+
├── references/
|
|
67
|
+
└── scripts/
|
|
40
68
|
```
|
|
41
69
|
|
|
42
|
-
|
|
43
|
-
|
|
70
|
+
Put only the routing logic and core rules in `SKILL.md`. Push heavy references and extended examples into side files.
|
|
71
|
+
|
|
72
|
+
## Code Examples
|
|
73
|
+
|
|
74
|
+
**One excellent example beats many mediocre ones.**
|
|
75
|
+
|
|
76
|
+
Prefer one real, runnable example over five thin examples in different languages.
|
|
44
77
|
|
|
45
|
-
##
|
|
78
|
+
## Flowchart Usage
|
|
46
79
|
|
|
47
|
-
|
|
48
|
-
- Technique wasn't intuitively obvious
|
|
49
|
-
- You'd reference this again across projects
|
|
50
|
-
- Pattern applies broadly (not project-specific)
|
|
51
|
-
- An agent repeatedly makes the same mistake
|
|
80
|
+
Use flowcharts only for non-obvious branching or loops where agents commonly stop too early. Use plain markdown for linear instructions and reference material.
|
|
52
81
|
|
|
53
|
-
|
|
54
|
-
- One-off solutions
|
|
55
|
-
- Standard practices well-documented elsewhere
|
|
56
|
-
- Project-specific conventions (put in GEMINI.md or docs/specs/)
|
|
82
|
+
## The Iron Law
|
|
57
83
|
|
|
58
|
-
|
|
84
|
+
```text
|
|
85
|
+
NO SKILL WITHOUT A FAILING TEST FIRST
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
No exceptions for "small doc updates" or "just adding one section".
|
|
59
89
|
|
|
60
|
-
|
|
61
|
-
- `verification-gate` — No shortcuts for verification
|
|
62
|
-
- `systematic-debugging` — 4-phase process mandatory
|
|
63
|
-
- TDD enforcement — RED-GREEN-REFACTOR cycle
|
|
90
|
+
## Skill Creation Checklist
|
|
64
91
|
|
|
65
|
-
|
|
66
|
-
- `brainstorm-agent` — Adapt questions to context
|
|
67
|
-
- `ios-engineer` — Apply patterns per project needs
|
|
92
|
+
**RED**
|
|
68
93
|
|
|
69
|
-
|
|
94
|
+
- [ ] Create pressure scenarios or realistic retrieval tasks
|
|
95
|
+
- [ ] Run them without the skill
|
|
96
|
+
- [ ] Capture exact failures and rationalizations
|
|
70
97
|
|
|
71
|
-
|
|
98
|
+
**GREEN**
|
|
72
99
|
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
- Use bullet points over prose
|
|
77
|
-
- Eliminate redundancy ruthlessly
|
|
100
|
+
- [ ] Write the minimum skill that addresses the observed failures
|
|
101
|
+
- [ ] Keep trigger metadata short and precise
|
|
102
|
+
- [ ] Add only the references/examples required to teach the missing behavior
|
|
78
103
|
|
|
79
|
-
|
|
80
|
-
- Agents are smart and WILL find loopholes under pressure
|
|
81
|
-
- Close every loophole explicitly
|
|
82
|
-
- Build rationalization table with common excuses
|
|
83
|
-
- Create Red Flags list
|
|
104
|
+
**REFACTOR**
|
|
84
105
|
|
|
85
|
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
- Reference workflows: `/debug`, `/code`, `/deploy`
|
|
106
|
+
- [ ] Add explicit counters for new loopholes
|
|
107
|
+
- [ ] Keep `SKILL.md` lean and move detail to side files
|
|
108
|
+
- [ ] Re-run the same validation after every material change
|
|
89
109
|
|
|
90
|
-
##
|
|
110
|
+
## Stop Rule
|
|
91
111
|
|
|
92
|
-
-
|
|
93
|
-
- [ ] `name` and `description` in frontmatter
|
|
94
|
-
- [ ] When to Use is clear and specific
|
|
95
|
-
- [ ] Process steps are numbered and unambiguous
|
|
96
|
-
- [ ] Anti-rationalization table covers common excuses
|
|
97
|
-
- [ ] Integration section lists related skills/workflows
|
|
98
|
-
- [ ] File < 500 lines
|
|
99
|
-
- [ ] No narrative/story sections — only reference content
|
|
100
|
-
- [ ] Updated CATALOG.md entry
|
|
112
|
+
Do not batch-create multiple skills without validating each one first.
|
|
101
113
|
|
|
102
114
|
## Integration
|
|
103
115
|
|
|
104
|
-
|
|
105
|
-
- `
|
|
106
|
-
-
|
|
116
|
+
- `awf-version-tracker` — snapshot skill changes
|
|
117
|
+
- `single-flow-task-execution` — useful when implementing multi-step skill refactors
|
|
118
|
+
- `superpowers` pack — deeper TDD and verification references when you need them
|
|
119
|
+
|
|
120
|
+
---
|
|
107
121
|
|
|
108
|
-
|
|
109
|
-
- `/skill-health` — Check skill system health
|
|
110
|
-
- `/skill-rollback` — Rollback broken skill changes
|
|
122
|
+
*writing-skills — Lean Router Architecture*
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Bulletproofing Skills Against Rationalization
|
|
2
|
+
|
|
3
|
+
Skills that enforce discipline need to resist rationalization. Agents will look for loopholes under pressure.
|
|
4
|
+
|
|
5
|
+
## Close Every Loophole Explicitly
|
|
6
|
+
|
|
7
|
+
Do not just state the rule. Forbid the common workarounds.
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
# Bad
|
|
11
|
+
Write code before test? Delete it.
|
|
12
|
+
|
|
13
|
+
# Good
|
|
14
|
+
Write code before test? Delete it. Start over.
|
|
15
|
+
|
|
16
|
+
**No exceptions:**
|
|
17
|
+
- Do not keep it as "reference"
|
|
18
|
+
- Do not adapt it while writing tests
|
|
19
|
+
- Do not look at it
|
|
20
|
+
- Delete means delete
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Address Spirit-vs-Letter Arguments
|
|
24
|
+
|
|
25
|
+
Add the foundational rule early:
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
**Violating the letter of the rules is violating the spirit of the rules.**
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Build a Rationalization Table
|
|
32
|
+
|
|
33
|
+
Every repeated excuse should become an explicit counter-rule.
|
|
34
|
+
|
|
35
|
+
```markdown
|
|
36
|
+
| Excuse | Reality |
|
|
37
|
+
|--------|---------|
|
|
38
|
+
| "Too simple to test" | Simple code still breaks. |
|
|
39
|
+
| "I'll test after" | Tests-after answers a different question. |
|
|
40
|
+
| "This case is special" | Special pleading is how process discipline collapses. |
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Create a Red Flags List
|
|
44
|
+
|
|
45
|
+
```markdown
|
|
46
|
+
## Red Flags
|
|
47
|
+
- Code before test
|
|
48
|
+
- "I already checked manually"
|
|
49
|
+
- "Close enough"
|
|
50
|
+
- "I'll tighten it later"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
When these appear, stop and re-run the intended process.
|