@leejungkiin/awkit 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/README.md +3 -3
  2. package/VERSION +1 -1
  3. package/bin/awf.js +1 -1
  4. package/bin/awk.js +237 -26
  5. package/core/AGENTS.md +8 -9
  6. package/core/GEMINI.md +74 -199
  7. package/package.json +3 -2
  8. package/skill-packs/neural-memory/skills/nm-memory-sync/SKILL.md +2 -2
  9. package/skills/CATALOG.md +3 -2
  10. package/skills/README.md +109 -0
  11. package/skills/android-re-analyzer/SKILL.md +238 -0
  12. package/skills/android-re-analyzer/references/api-extraction-patterns.md +119 -0
  13. package/skills/android-re-analyzer/references/call-flow-analysis.md +176 -0
  14. package/skills/android-re-analyzer/references/fernflower-usage.md +115 -0
  15. package/skills/android-re-analyzer/references/jadx-usage.md +116 -0
  16. package/skills/android-re-analyzer/references/setup-guide.md +221 -0
  17. package/skills/android-re-analyzer/scripts/check-deps.sh +129 -0
  18. package/skills/android-re-analyzer/scripts/decompile.sh +375 -0
  19. package/skills/android-re-analyzer/scripts/find-api-calls.sh +118 -0
  20. package/skills/android-re-analyzer/scripts/install-dep.sh +448 -0
  21. package/skills/awf-session-restore/SKILL.md +108 -184
  22. package/skills/beads-manager/SKILL.md +2 -2
  23. package/skills/brainstorm-agent/SKILL.md +47 -2
  24. package/skills/gemini-conductor/SKILL.md +234 -0
  25. package/skills/memory-sync/SKILL.md +29 -1
  26. package/skills/nm-memory-sync/SKILL.md +2 -2
  27. package/skills/orchestrator/SKILL.md +29 -155
  28. package/skills/skills/nm-memory-sync/SKILL.md +2 -2
  29. package/skills/smali-to-kotlin/SKILL.md +1 -1
  30. package/skills/smali-to-swift/SKILL.md +1 -1
  31. package/skills/swiftui-pro/SKILL.md +108 -0
  32. package/skills/swiftui-pro/agents/openai.yaml +10 -0
  33. package/skills/swiftui-pro/assets/swiftui-pro-icon.png +0 -0
  34. package/skills/swiftui-pro/assets/swiftui-pro-icon.svg +29 -0
  35. package/skills/swiftui-pro/references/accessibility.md +13 -0
  36. package/skills/swiftui-pro/references/api.md +39 -0
  37. package/skills/swiftui-pro/references/data.md +43 -0
  38. package/skills/swiftui-pro/references/design.md +31 -0
  39. package/skills/swiftui-pro/references/hygiene.md +9 -0
  40. package/skills/swiftui-pro/references/navigation.md +14 -0
  41. package/skills/swiftui-pro/references/performance.md +46 -0
  42. package/skills/swiftui-pro/references/swift.md +56 -0
  43. package/skills/swiftui-pro/references/views.md +35 -0
  44. package/skills/symphony-enforcer/SKILL.md +362 -0
  45. package/skills/symphony-orchestrator/SKILL.md +301 -0
  46. package/skills/telegram-notify/SKILL.md +57 -0
  47. package/symphony/LICENSE +21 -0
  48. package/symphony/README.md +178 -0
  49. package/symphony/app/api/agents/route.js +152 -0
  50. package/symphony/app/api/events/route.js +22 -0
  51. package/symphony/app/api/knowledge/route.js +253 -0
  52. package/symphony/app/api/locks/route.js +29 -0
  53. package/symphony/app/api/notes/route.js +125 -0
  54. package/symphony/app/api/preflight/route.js +23 -0
  55. package/symphony/app/api/projects/route.js +116 -0
  56. package/symphony/app/api/roles/route.js +134 -0
  57. package/symphony/app/api/skills/route.js +82 -0
  58. package/symphony/app/api/status/route.js +18 -0
  59. package/symphony/app/api/tasks/route.js +157 -0
  60. package/symphony/app/api/workflows/route.js +61 -0
  61. package/symphony/app/api/workspaces/route.js +15 -0
  62. package/symphony/app/globals.css +2605 -0
  63. package/symphony/app/layout.js +20 -0
  64. package/symphony/app/page.js +2122 -0
  65. package/symphony/cli/index.js +1060 -0
  66. package/symphony/core/agent-manager.js +357 -0
  67. package/symphony/core/context-bus.js +100 -0
  68. package/symphony/core/db.js +223 -0
  69. package/symphony/core/file-lock-manager.js +154 -0
  70. package/symphony/core/merge-pipeline.js +234 -0
  71. package/symphony/core/orchestrator.js +236 -0
  72. package/symphony/core/task-manager.js +335 -0
  73. package/symphony/core/workspace-manager.js +168 -0
  74. package/symphony/jsconfig.json +7 -0
  75. package/symphony/lib/core.mjs +1034 -0
  76. package/symphony/mcp/index.js +29 -0
  77. package/symphony/mcp/server.js +110 -0
  78. package/symphony/mcp/tools/context.js +80 -0
  79. package/symphony/mcp/tools/locks.js +99 -0
  80. package/symphony/mcp/tools/status.js +82 -0
  81. package/symphony/mcp/tools/tasks.js +216 -0
  82. package/symphony/mcp/tools/workspace.js +143 -0
  83. package/symphony/next.config.mjs +7 -0
  84. package/symphony/package.json +53 -0
  85. package/symphony/scripts/postinstall.js +49 -0
  86. package/symphony/symphony.config.js +41 -0
  87. package/templates/conductor-tracks.md +38 -0
  88. package/templates/specs/PROJECT.md +50 -0
  89. package/templates/specs/ROADMAP.md +79 -0
  90. package/templates/specs/TECH-SPEC.md +81 -0
  91. package/templates/specs/task-spec-template.xml +65 -0
  92. package/templates/workflow_dual_mode_template.md +5 -5
  93. package/workflows/_uncategorized/AGENTS.md +38 -0
  94. package/workflows/_uncategorized/decompile.md +67 -0
  95. package/workflows/_uncategorized/skill-health.md +7 -7
  96. package/workflows/ads/ads-audit.md +5 -5
  97. package/workflows/ads/ads-optimize.md +10 -10
  98. package/workflows/ads/adsExpert.md +7 -7
  99. package/workflows/conductor.md +97 -0
  100. package/workflows/context/auto-implement.md +4 -4
  101. package/workflows/context/codebase-sync.md +19 -8
  102. package/workflows/context/next.md +27 -27
  103. package/workflows/context/user-intent-analysis-workflow.md +4 -4
  104. package/workflows/expert/codeExpert.md +28 -31
  105. package/workflows/expert/debugExpert.md +11 -11
  106. package/workflows/expert/planExpert.md +21 -36
  107. package/workflows/git/smart-git-ops.md +49 -6
  108. package/workflows/lifecycle/debug.md +7 -7
  109. package/workflows/lifecycle/deploy.md +10 -10
  110. package/workflows/lifecycle/init.md +103 -91
  111. package/workflows/lifecycle/master-code-workflow.md +3 -3
  112. package/workflows/lifecycle/plan.md +19 -21
  113. package/workflows/quality/audit.md +1 -1
  114. package/workflows/quality/project-audit.md +1 -1
  115. package/workflows/roles/vibe-coding-master-workflow.md +2 -2
  116. package/workflows/smart-git-ops.md +146 -0
  117. package/workflows/ui/app-screen-analyzer.md +4 -4
  118. package/workflows/ui/create-feature.md +8 -8
  119. package/workflows/ui/create-spec-architect.md +11 -11
@@ -0,0 +1,67 @@
1
+ ---
2
+ description: 📦 Decompile APK/XAPK/JAR/AAR Android và phân tích cấu trúc + trích xuất API
3
+ ---
4
+
5
+ # /decompile — Android Reverse Engineering & API Extraction
6
+
7
+ // turbo-all
8
+
9
+ ## Workflow
10
+
11
+ ### 1. Xác định file target
12
+
13
+ Nếu user cung cấp đường dẫn file → dùng luôn.
14
+ Nếu không → hỏi user đường dẫn đến file `.apk`, `.xapk`, `.jar`, hoặc `.aar`.
15
+
16
+ ### 2. Kiểm tra & cài đặt dependencies
17
+
18
+ ```bash
19
+ bash ~/.gemini/antigravity/skills/android-re-analyzer/scripts/check-deps.sh
20
+ ```
21
+
22
+ Parse output tìm `INSTALL_REQUIRED:` và `INSTALL_OPTIONAL:`.
23
+
24
+ **Nếu thiếu required deps**, cài từng cái:
25
+ ```bash
26
+ bash ~/.gemini/antigravity/skills/android-re-analyzer/scripts/install-dep.sh java
27
+ bash ~/.gemini/antigravity/skills/android-re-analyzer/scripts/install-dep.sh jadx
28
+ ```
29
+
30
+ **Nếu thiếu optional deps** (vineflower, dex2jar), hỏi user có muốn cài không. Khuyến nghị cài cả hai.
31
+
32
+ Sau khi cài, chạy lại `check-deps.sh` để verify. KHÔNG tiếp tục nếu required deps chưa OK.
33
+
34
+ ### 3. Decompile
35
+
36
+ ```bash
37
+ # APK/XAPK → dùng jadx (xử lý resources tốt)
38
+ bash ~/.gemini/antigravity/skills/android-re-analyzer/scripts/decompile.sh <file>
39
+
40
+ # JAR/AAR + có Fernflower → ưu tiên fernflower
41
+ bash ~/.gemini/antigravity/skills/android-re-analyzer/scripts/decompile.sh --engine fernflower <file>
42
+
43
+ # Nếu jadx có warnings hoặc muốn chất lượng cao nhất → chạy cả hai
44
+ bash ~/.gemini/antigravity/skills/android-re-analyzer/scripts/decompile.sh --engine both <file>
45
+
46
+ # Cho app bị obfuscate → thêm --deobf
47
+ bash ~/.gemini/antigravity/skills/android-re-analyzer/scripts/decompile.sh --deobf <file>
48
+ ```
49
+
50
+ ### 4. Phân tích cấu trúc
51
+
52
+ 1. Đọc `AndroidManifest.xml` từ resources directory
53
+ 2. Nếu XAPK, review `xapk-manifest.json`
54
+ 3. List package structure top-level
55
+ 4. Xác định Activity chính, Application class, architecture pattern
56
+ 5. Báo cáo summary cho user
57
+
58
+ ### 5. Đề xuất bước tiếp theo
59
+
60
+ Hỏi user muốn làm gì tiếp:
61
+ - **Trace call flows**: "Tôi có thể theo luồng thực thi từ Activity đến API calls"
62
+ - **Extract APIs**: "Tôi có thể tìm tất cả HTTP endpoints và tài liệu hóa"
63
+ ```bash
64
+ bash ~/.gemini/antigravity/skills/android-re-analyzer/scripts/find-api-calls.sh <output>/sources/
65
+ ```
66
+ - **Phân tích class cụ thể**: "Chỉ cho tôi class hoặc feature cần phân tích"
67
+ - **Rebuild app**: "Muốn rebuild thành Kotlin hiện đại? → chuyển sang skill `smali-to-kotlin`"
@@ -4,9 +4,9 @@ description: 🩺 Kiểm tra tình trạng độ bền và sự ổn định c
4
4
 
5
5
  # 🩺 AWK Skill & Workflow Health Check
6
6
 
7
- > **Workflow này tính toán độ "Health" (khỏe mạnh) của các agentic workflows dựa trên dữ liệu từ Beads và Linting.**
7
+ > **Workflow này tính toán độ "Health" (khỏe mạnh) của các agentic workflows dựa trên dữ liệu từ Symphony và Linting.**
8
8
  > - Phát hiện Token Creep (khi SKILL.md phình to).
9
- > - Phát hiện High Correction Rate (khi 1 Bead in_progress quá lâu hoặc có comment phàn nàn).
9
+ > - Phát hiện High Correction Rate (khi 1 task in_progress quá lâu hoặc có comment phàn nàn).
10
10
 
11
11
  ---
12
12
 
@@ -18,12 +18,12 @@ awkit lint || true
18
18
  ```
19
19
  Nếu có cảnh báo, khuyên User sử dụng `/refactor` để chẻ nhỏ files nhằm tiết kiệm Context Window.
20
20
 
21
- ## 2. Kiểm tra hiệu suất chạy (Beads-Driven)
22
- Lấy top 5 Beads (Tasks) mới nhất ở trạng thái `done` hoặc `in_progress` để đánh giá thời gian chênh lệch:
21
+ ## 2. Kiểm tra hiệu suất chạy (Symphony-Driven)
22
+ Lấy top 5 tasks mới nhất ở trạng thái `done` hoặc `in_progress` để đánh giá thời gian chênh lệch:
23
23
 
24
- ```bash
25
- bd list --status done --limit 5
26
- bd list --status in_progress
24
+ ```
25
+ symphony_available_tasks(filter="all")
26
+ symphony_status()
27
27
  ```
28
28
 
29
29
  **Phân tích của hệ thống AI**:
@@ -2,7 +2,7 @@
2
2
  description: 📊 Tự động phân tích & báo cáo hiệu suất Google Ads hàng ngày (Dual-Mode v5.0)
3
3
  ---
4
4
 
5
- # WORKFLOW: /ads-audit - The Ads Analyst (Dual-Mode + Beads)
5
+ # WORKFLOW: /ads-audit - The Ads Analyst (Dual-Mode + Symphony)
6
6
 
7
7
  > **Mode A (Expert):** `/adsExpert [id]` -> Auto check & create tasks.
8
8
  > **Mode B (Guided):** `/ads-audit` -> Chọn Account -> Phân tích -> Hướng dẫn chi tiết.
@@ -49,16 +49,16 @@ User nhận được tóm tắt và menu chọn hành động:
49
49
 
50
50
  ➡️ **Chiến lược tiếp theo:**
51
51
  1️⃣ 🧹 Dọn dẹp rác ngay (Review & Pause)
52
- 2️⃣ 📿 Tạo task Beads để xử lý sau
52
+ 2️⃣ 🎵 Tạo task Symphony để xử lý sau
53
53
  3️⃣ 📝 Xem báo cáo đầy đủ
54
54
  4️⃣ 🔍 Phân tích sâu hơn (`/ads-analyst`)
55
55
  ```
56
56
 
57
- ### Phase 5: Beads Integration
57
+ ### Phase 5: Symphony Integration
58
58
  - Nếu chọn **2 (Create Task)**:
59
59
  - AI tự động tạo các tasks:
60
- - `bd create "Pause Keyword X (Waste 200k)" --label ads`
61
- - `bd create "Review Campaign Y (CPA too high)" --label ads`
60
+ - `symphony_create_task(title="Pause Keyword X (Waste 200k)")`
61
+ - `symphony_create_task(title="Review Campaign Y (CPA too high)")`
62
62
 
63
63
  ---
64
64
 
@@ -37,21 +37,21 @@ User chọn mục tiêu:
37
37
 
38
38
  ### Phase 3: Action Execution
39
39
  - AI thực hiện thay đổi thông qua MCP (nếu tool hỗ trợ write).
40
- - Nếu MCP chưa hỗ trợ write (an toàn): -> **Tạo Beads Task hướng dẫn chi tiết.**
40
+ - Nếu MCP chưa hỗ trợ write (an toàn): -> **Tạo Symphony Task hướng dẫn chi tiết.**
41
41
 
42
- ### Phase 4: Beads Integration (Task Generation)
42
+ ### Phase 4: Symphony Integration (Task Generation)
43
43
 
44
- **Tạo Action Plan trong Beads:**
44
+ **Tạo Action Plan trong Symphony:**
45
45
 
46
- ```bash
46
+ ```
47
47
  # Example: Cut Waste Plan
48
- bd create "Ads Optimization: Cut Waste [Date]" --priority 1
49
- bd create "Add 5 Negative Keywords" --parent [ParentID] --note "burn, hack, free,..."
50
- bd create "Exclude 10 Mobile App Placements" --parent [ParentID]
48
+ symphony_create_task(title="Ads Optimization: Cut Waste [Date]", priority=1)
49
+ symphony_create_task(title="Add 5 Negative Keywords", description="burn, hack, free,...")
50
+ symphony_create_task(title="Exclude 10 Mobile App Placements")
51
51
 
52
52
  # Example: Scale Plan
53
- bd create "Ads Optimization: Scale Up [Date]" --priority 0
54
- bd create "Increase Budget: Campaign A (+20%)" --parent [ParentID]
53
+ symphony_create_task(title="Ads Optimization: Scale Up [Date]", priority=2)
54
+ symphony_create_task(title="Increase Budget: Campaign A (+20%)")
55
55
  ```
56
56
 
57
57
  ---
@@ -92,6 +92,6 @@ Sau khi hoàn thành workflow, AI **PHẢI** ghi log vào file `brain/ads_histor
92
92
 
93
93
  ## ⚠️ NEXT STEPS:
94
94
  ```
95
- 1️⃣ Xác nhận task trong Beads (`/todo`)
95
+ 1️⃣ Xác nhận task trong Symphony (`/todo`)
96
96
  2️⃣ Kiểm tra lại Audit (`/ads-audit`)
97
97
  ```
@@ -49,23 +49,23 @@ AI tự động check các rules sau:
49
49
 
50
50
  **Without `--auto-fix`:**
51
51
  - Tổng hợp lỗi vào Report.
52
- - Tạo Beads Tasks cho các lỗi R1, R2.
52
+ - Tạo Symphony Tasks cho các lỗi R1, R2.
53
53
 
54
54
  **With `--auto-fix`:**
55
55
  - **R1 (Wasted Spend):** Auto-pause Keyword/Ad Group.
56
- - **R2, R3, R4:** Tạo Beads Task.
56
+ - **R2, R3, R4:** Tạo Symphony Task.
57
57
 
58
- ### 4. Beads Integration
58
+ ### 4. Symphony Integration
59
59
 
60
60
  ```bash
61
61
  # R1: Wasted Spend -> Critical Task
62
- bd create "Pause Waste: [Keyword] ($$ Spend, 0 Conv)" --label ads-waste --priority 0
62
+ symphony_create_task(title="Pause Waste: [Keyword] ($$ Spend, 0 Conv)", priority=1)
63
63
 
64
64
  # R2: High CPA -> Investigation Task
65
- bd create "Investigate High CPA: [Campaign] (CPA: $$)" --label ads-optimize --priority 1
65
+ symphony_create_task(title="Investigate High CPA: [Campaign] (CPA: $$)", priority=1)
66
66
 
67
67
  # R5: Good Mover -> Scale Task
68
- bd create "Scale Up: [Campaign] (ROAS: 2.5)" --label ads-scale --priority 1
68
+ symphony_create_task(title="Scale Up: [Campaign] (ROAS: 2.5)", priority=1)
69
69
  ```
70
70
 
71
71
  ### 5. Report Generation
@@ -83,7 +83,7 @@ Tạo file: `reports/ads/[date]_expert_audit.md`
83
83
  ## 🚨 Actions Taken (Auto-Fix)
84
84
  - Paused Keyword: "free download" (Spent 200k, 0 conv)
85
85
 
86
- ## 📿 Beads Tasks Created
86
+ ## 📿 Symphony Tasks Created
87
87
  1. [P0] Pause Waste: "cheat codes" (Spent 150k, 0 conv) #123
88
88
  2. [P1] Investigate High CPA: "Competitor Campaign" #124
89
89
  3. [P1] Scale Up: "Brand Campaign" #125
@@ -0,0 +1,97 @@
1
+ ---
2
+ description: 🎼 CLI Conductor — Gọi Gemini CLI phân tích, lên chiến lược, và review code project-wide
3
+ ---
4
+
5
+ # /conductor — Two-Agent Orchestration Workflow
6
+
7
+ > Antigravity chủ động gọi Gemini CLI (headless) khi cần tầm nhìn toàn project.
8
+ > CLI chạy quota pool riêng → nhân đôi AI capacity.
9
+
10
+ // turbo-all
11
+
12
+ ---
13
+
14
+ ## Sub-commands
15
+
16
+ ### `/conductor:analyze` — Phân tích project-wide
17
+
18
+ 1. Xác định project root (dùng `.project-identity` hoặc `CODEBASE.md`)
19
+ 2. Thông báo user: "📡 Đang gọi Gemini CLI phân tích cấu trúc project..."
20
+ 3. Gọi CLI:
21
+ ```bash
22
+ cd <PROJECT_ROOT> && timeout 60 gemini -p "Analyze the project structure. List main modules, their responsibilities, key files, and dependencies. Be concise." --approval-mode plan 2>/dev/null
23
+ ```
24
+ 4. Parse output → tóm tắt cho user
25
+ 5. Nếu project có `conductor/tracks.md` → cập nhật
26
+ 6. Nếu chưa có `conductor/` → hỏi user có muốn tạo không
27
+
28
+ ### `/conductor:track` — Tạo/cập nhật strategic track
29
+
30
+ 1. Đọc `conductor/tracks.md` hiện tại (nếu có)
31
+ 2. User mô tả mục tiêu chiến lược
32
+ 3. Gọi CLI:
33
+ ```bash
34
+ cd <PROJECT_ROOT> && timeout 60 gemini -p "Given this project context and goal: <GOAL>. Create a strategic track with: objectives, key milestones, and task breakdown. Current tracks: <EXISTING_TRACKS>" --approval-mode plan 2>/dev/null
35
+ ```
36
+ 4. Parse output → ghi vào `conductor/tracks.md`
37
+ 5. Tạo Symphony tasks từ task breakdown (nếu user đồng ý)
38
+
39
+ ### `/conductor:delegate` — Delegate task cho CLI xử lý
40
+
41
+ 1. Xác định task cần CLI (phân tích, review, generate)
42
+ 2. Build prompt với context đầy đủ
43
+ 3. Gọi CLI:
44
+ ```bash
45
+ cd <PROJECT_ROOT> && timeout 60 gemini -p "<TASK_PROMPT>" --approval-mode plan 2>/dev/null
46
+ ```
47
+ 4. Nhận kết quả → tích hợp vào workflow hiện tại
48
+ 5. Tiếp tục code/debug với insights từ CLI
49
+
50
+ ### `/conductor:review` — Pre-commit review qua CLI
51
+
52
+ 1. Lấy diff: `git diff --staged` hoặc `git diff`
53
+ 2. Gọi CLI:
54
+ ```bash
55
+ cd <PROJECT_ROOT> && timeout 60 gemini -p "Review these code changes for bugs, security issues, and best practices: $(git diff --staged --stat)" --approval-mode plan 2>/dev/null
56
+ ```
57
+ 3. Parse output → báo cáo issues cho user
58
+ 4. Nếu clean → suggest `git commit`
59
+
60
+ ### `/conductor:setup` — Khởi tạo conductor infrastructure
61
+
62
+ 1. Tạo thư mục `conductor/` tại project root
63
+ 2. Copy template `conductor-tracks.md` → `conductor/tracks.md`
64
+ 3. Thêm `conductor/` vào `.gitignore` (nếu user muốn)
65
+ 4. Thông báo: "✅ Conductor infrastructure ready!"
66
+
67
+ ---
68
+
69
+ ## Fallback Rules
70
+
71
+ ```yaml
72
+ cli_unavailable:
73
+ - "⚠️ Gemini CLI không khả dụng, tiếp tục với Antigravity-only mode"
74
+ - Do NOT block workflow
75
+
76
+ cli_timeout:
77
+ - "⏳ CLI phân tích quá lâu (>60s), bỏ qua và tiếp tục"
78
+
79
+ cli_error:
80
+ - Log error
81
+ - Fall back gracefully
82
+ - Suggest: "gemini --version" to check installation
83
+ ```
84
+
85
+ ---
86
+
87
+ ## Communication
88
+
89
+ Mỗi khi gọi CLI, LUÔN thông báo user:
90
+ ```
91
+ 📡 Đang gọi Gemini CLI để [mục đích]...
92
+ ```
93
+
94
+ Sau khi nhận kết quả:
95
+ ```
96
+ ✅ CLI phân tích xong. Tóm tắt: [key findings]
97
+ ```
@@ -23,10 +23,10 @@ FEATURE=$1 # Pass feature name as argument
23
23
  Đọc và parse:
24
24
  1. `requirements.md` → Hiểu WHAT & WHY
25
25
  2. `design.md` → Hiểu HOW (architecture, models, UI)
26
- 3. `bd list` → Hiểu execution plan (list tasks in JSON format for parsing)
26
+ 3. `symphony_available_tasks()` → Hiểu execution plan (list tasks in JSON format for parsing)
27
27
 
28
28
  ### 0.3. Parse Tasks
29
- Retrieve tasks using `bd list --json`:
29
+ Retrieve tasks using Symphony:
30
30
  - Extract task ID
31
31
  - Extract description and body
32
32
  - Extract requirements from body tags
@@ -45,7 +45,7 @@ FOR each task WHERE status = "[ ]":
45
45
  4. GENERATE code
46
46
  5. WRITE to specified file
47
47
  6. VERIFY (syntax check)
48
- 7. MARK task as complete: `bd close [id]`
48
+ 7. MARK task as complete: `symphony_complete_task(task_id)`
49
49
  8. REPORT progress
50
50
  END FOR
51
51
  ```
@@ -113,7 +113,7 @@ Mọi code phải tuân thủ:
113
113
  ### 3.1. Update Status
114
114
  Sau mỗi task hoàn thành:
115
115
  ```bash
116
- bd close [id]
116
+ symphony_complete_task(task_id)
117
117
  ```
118
118
 
119
119
  ### 3.2. Progress Report
@@ -83,17 +83,29 @@ for each missing_file:
83
83
 
84
84
  ## Phase 3: Update CODEBASE.md
85
85
 
86
+ > [!IMPORTANT]
87
+ > CODEBASE.md dùng **compact format** — AI đọc nhanh, tốn ít context.
88
+ > KHÔNG dùng format verbose (multi-line per file).
89
+
86
90
  ```yaml
87
91
  MO:
88
92
  - APPEND vào đúng section, không xóa gì cũ
89
93
  - Update "Last Updated" timestamp
90
94
  - Nếu thêm feature mới → thêm section mới
91
95
 
92
- Format mỗi entry thêm vào:
93
- #### [FileName.swift]
94
- **Layer:** [Layer name]
95
- **Purpose:** [Description]
96
- **Key class/struct:** `ClassName`
96
+ Compact Format (BẮT BUỘC):
97
+ Mỗi file = 1 dòng trong table:
98
+ | `path/to/File.swift` | Purpose mô tả ngắn (1 câu) |
99
+
100
+ dụ:
101
+ | `Core/Services/PushNotificationService.swift` | FCM push notification registration & handling |
102
+ | `Features/WeeklyGoal/ViewModels/WeeklyGoalVM.swift` | Weekly goal progress tracking logic |
103
+
104
+ ❌ KHÔNG dùng format cũ:
105
+ #### FileName.swift
106
+ **Layer:** ...
107
+ **Purpose:** ...
108
+ **Key class:** ...
97
109
 
98
110
  Footer update:
99
111
  **Last Updated**: [current date]
@@ -103,9 +115,8 @@ Footer update:
103
115
  **Preview trước khi apply:**
104
116
  ```
105
117
  📝 Sẽ thêm [K] entries vào CODEBASE.md:
106
- + Core/Services/PushNotificationService.swift → Services Layer
107
- + Features/WeeklyGoal/ViewModels/WeeklyGoalViewModel.swift → Features
108
- + Presentation/Views/Dashboard/CombinedDashboardHeader.swift → Views
118
+ + Core/Services/PushNotificationService.swift → FCM push notification
119
+ + Features/WeeklyGoal/ViewModels/WeeklyGoalVM.swift → Weekly goal logic
109
120
 
110
121
  Apply? [auto-yes nếu < 10 entries / confirm nếu lớn hơn]
111
122
  ```
@@ -1,36 +1,36 @@
1
1
  ---
2
- description: ➡️ Không biết làm gì tiếp? (v5.0 - Beads + Brain)
2
+ description: ➡️ Không biết làm gì tiếp? (v5.0 - Symphony + Brain)
3
3
  ---
4
4
 
5
- # WORKFLOW: /next - The Smart Compass (Beads + Brain Navigator)
5
+ # WORKFLOW: /next - The Smart Compass (Symphony + Brain Navigator)
6
6
 
7
- > **Mục tiêu:** Phân tích context từ Beads (Tasks) và Brain (Plans/Knowledge) để gợi ý bước tiếp theo CHÍNH XÁC.
7
+ > **Mục tiêu:** Phân tích context từ Symphony (Tasks) và Brain (Plans/Knowledge) để gợi ý bước tiếp theo CHÍNH XÁC.
8
8
 
9
9
  ---
10
10
 
11
11
  ## Giai đoạn 1: Multi-Source Context Check (Tự động)
12
12
 
13
- ### 1.1. Priority 1: Check Beads (Task Tracker)
14
- ```bash
15
- bd list --status in_progress
13
+ ### 1.1. Priority 1: Check Symphony (Task Tracker)
14
+ ```
15
+ symphony_available_tasks(filter="my")
16
16
  ```
17
17
 
18
18
  **Case A: Có task đang làm dở**
19
19
  ```
20
- 📿 **Beads Context:**
20
+ 🎵 **Symphony Context:**
21
21
  Task #123: "Implement Login API" (in_progress)
22
22
  └─ Started: 2 hours ago
23
23
  └─ Blocker: None
24
24
 
25
25
  ➡️ **Bước tiếp theo:**
26
26
  1️⃣ Tiếp tục task này? `/code` (AI sẽ tự load context)
27
- 2️⃣ Xem chi tiết task? `bd show 123`
28
- 3️⃣ Chuyển sang task khác? `bd list`
27
+ 2️⃣ Xem chi tiết task? `symphony_workspace_status(task_id)`
28
+ 3️⃣ Chuyển sang task khác? `symphony_available_tasks(filter="ready")`
29
29
  ```
30
30
 
31
31
  **Case B: Không có task in_progress**
32
- ```bash
33
- bd list --status open
32
+ ```
33
+ symphony_available_tasks(filter="ready")
34
34
  ```
35
35
  → Hiển thị danh sách tasks đang chờ (ready to start).
36
36
 
@@ -46,7 +46,7 @@ else:
46
46
  **Từ Brain lấy được:**
47
47
  - Feature đang làm
48
48
  - Phase hiện tại
49
- - Tasks trong phase (so sánh với Beads)
49
+ - Tasks trong phase (so sánh với Symphony)
50
50
 
51
51
  ### 1.3. Priority 3: Check Git State (Fallback)
52
52
  - `git status` → File nào đang thay đổi?
@@ -62,16 +62,16 @@ else:
62
62
 
63
63
  ➡️ **Bước tiếp theo:**
64
64
  1️⃣ Lập kế hoạch: `/plan "Feature Name"`
65
- → Sẽ tự động tạo tasks trong Beads
65
+ → Sẽ tự động tạo tasks trong Symphony
66
66
  2️⃣ Brainstorm ý tưởng: `/brainstorm`
67
67
  ```
68
68
 
69
69
  ### 2.2. Scenario: Có Plan nhưng chưa có Task
70
70
  ```
71
- 🧭 **Tình trạng:** Có plan tại `plans/260130-login/` nhưng chưa sync Beads.
71
+ 🧭 **Tình trạng:** Có plan tại `plans/260130-login/` nhưng chưa sync Symphony.
72
72
 
73
73
  ➡️ **Bước tiếp theo:**
74
- 1️⃣ Sync plan sang Beads? (Em sẽ tạo tasks tự động)
74
+ 1️⃣ Sync plan sang Symphony? (Em sẽ tạo tasks tự động)
75
75
  2️⃣ Bắt đầu code luôn? `/code phase-01`
76
76
  ```
77
77
 
@@ -79,13 +79,13 @@ else:
79
79
  ```
80
80
  🧭 **Tình trạng:** Có 3 tasks sẵn sàng làm:
81
81
 
82
- 📿 **Beads Tasks:**
83
- #101 Setup Database Schema (P0)
84
- #102 Create User Model (P1)
85
- #103 Write API Tests (P2)
82
+ 🎵 **Symphony Tasks:**
83
+ #101 Setup Database Schema (P1 - High)
84
+ #102 Create User Model (P2 - Medium)
85
+ #103 Write API Tests (P3 - Low)
86
86
 
87
87
  ➡️ **Bước tiếp theo:**
88
- 1️⃣ Làm task #101? `/code` (AI sẽ tự chọn P0)
88
+ 1️⃣ Làm task #101? `/code` (AI sẽ tự chọn P1)
89
89
  2️⃣ Chọn task khác? Gõ số task (vd: "102")
90
90
  ```
91
91
 
@@ -95,7 +95,7 @@ else:
95
95
 
96
96
  📊 **Progress:**
97
97
  - Brain: Phase 02 - Backend (50%)
98
- - Beads: Task #123 (in_progress, 2h ago)
98
+ - Symphony: Task #123 (in_progress, 2h ago)
99
99
  - Git: 3 files changed
100
100
 
101
101
  ➡️ **Bước tiếp theo:**
@@ -136,7 +136,7 @@ else:
136
136
 
137
137
  ➡️ **Gợi ý:**
138
138
  1️⃣ Tiếp tục task này? `/code`
139
- 2️⃣ Đóng task (không làm nữa)? `bd update 115 --status cancelled`
139
+ 2️⃣ Bỏ task (không làm nữa)? `symphony_abandon_task(task_id, reason)`
140
140
  ```
141
141
 
142
142
  ### 3.3. Knowledge Gap
@@ -152,9 +152,9 @@ else:
152
152
 
153
153
  ```markdown
154
154
  🧭 **ĐANG Ở ĐÂU:**
155
- [Context từ Beads + Brain + Git]
155
+ [Context từ Symphony + Brain + Git]
156
156
 
157
- 📿 **BEADS STATUS:**
157
+ 🎵 **SYMPHONY STATUS:**
158
158
  - In Progress: X tasks
159
159
  - Ready: Y tasks
160
160
  - Blocked: Z tasks
@@ -174,11 +174,11 @@ else:
174
174
 
175
175
  ## 🛡️ Resilience Patterns
176
176
 
177
- ### Beads Unavailable
177
+ ### Symphony Unavailable
178
178
  ```
179
- if bd_command_fails:
179
+ if symphony_command_fails:
180
180
  → Fallback to Brain only
181
- → Warning: "Beads không khả dụng. Dùng context từ Brain."
181
+ → Warning: "Symphony không khả dụng. Dùng context từ Brain."
182
182
  ```
183
183
 
184
184
  ### Brain Empty
@@ -7,16 +7,16 @@ alwaysApply: true
7
7
 
8
8
  ## Nguyên Tắc Cốt Lõi
9
9
 
10
- - **_BẮT BUỘC_** kiểm tra Beads task trước khi phân tích bất kỳ yêu cầu coding nào
10
+ - **_BẮT BUỘC_** kiểm tra Symphony task trước khi phân tích bất kỳ yêu cầu coding nào
11
11
  - **_BẮT BUỘC_** phân tích và suy luận ý định thực sự của người dùng
12
12
  - **_BẮT BUỘC_** đề xuất giải pháp tối ưu thay vì chỉ làm theo nghĩa đen
13
- - **_NGHIÊM CẤM_** bỏ qua Beads check kể cả khi user nói “nhanh lên”, “làm luôn”
13
+ - **_NGHIÊM CẤM_** bỏ qua Symphony check kể cả khi user nói “nhanh lên”, “làm luôn”
14
14
 
15
- ## ⛔ Pre-Analysis Beads Gate (LUÔN LUÔN CHẠY TRƯỚC)
15
+ ## ⛔ Pre-Analysis Symphony Gate (LUÔN LUÔN CHẠY TRƯỚC)
16
16
 
17
17
  ```bash
18
18
  # Trước khi phân tích bất kỳ yêu cầu coding/debug/plan:
19
- bd list --status in_progress
19
+ symphony_available_tasks(filter="my")
20
20
 
21
21
  # Nếu có task → Confirm: “Đây có liên quan đến Task #X không?”
22
22
  # Nếu không có → Tạo task mới sau khi confirm với user
@@ -18,42 +18,39 @@ description: 💻 Code ngay lập tức (Expert Mode)
18
18
  ```bash
19
19
  /codeExpert phase-01 # Code toàn bộ phase 01
20
20
  /codeExpert "Login API" # Code task cụ thể
21
- /codeExpert # Code task tiếp theo (auto-detect từ Beads)
21
+ /codeExpert # Code task tiếp theo (auto-detect từ Symphony)
22
22
  ```
23
23
 
24
24
  ---
25
25
 
26
26
  ## Execution Flow
27
27
 
28
- ### 1. Context Detection — `smart_pick()` (v6.5)
28
+ ### 1. Context Detection — `smart_pick()`
29
29
 
30
- **Priority 1: Active Epic (Hierarchical)**
31
- ```bash
32
- # Read epic from brain
33
- EPIC_ID=$(cat brain/active_plans.json | jq -r '.current.epic_id // empty')
34
-
35
- if [ -n "$EPIC_ID" ]; then
36
- # Check in-progress first
37
- bd list --status in_progress --parent $EPIC_ID --json
38
- # If none → Get ready (unblocked) tasks
39
- bd ready --parent $EPIC_ID --json --limit 5
40
- # Auto-claim first ready task
41
- bd update <id> --claim
42
- fi
30
+ **Priority 1: Active Tasks (Symphony)**
31
+ ```
32
+ # Read task mapping from brain
33
+ TASK_MAPPING = read brain/active_plans.json
34
+
35
+ # Check in-progress first
36
+ symphony_available_tasks(filter="my")
37
+ # If none Get ready tasks
38
+ symphony_available_tasks(filter="ready")
39
+ # Auto-claim first ready task
40
+ symphony_claim_task(task_id)
43
41
  ```
44
42
 
45
43
  **Priority 2: Argument**
46
44
  - Nếu có `phase-XX` → Load phase file
47
45
  - Nếu có task name → Search trong plan
48
46
 
49
- **Priority 3: Legacy Flat (no epic)**
50
- ```bash
51
- bd list --status in_progress
52
- bd ready --limit 5
47
+ **Priority 3: Fallback**
48
+ ```
49
+ symphony_available_tasks(filter="ready")
53
50
  ```
54
51
 
55
52
  ### 2. Load Spec/Plan
56
- - Đọc acceptance criteria từ task metadata (`bd show <id> --json`)
53
+ - Đọc acceptance criteria từ Symphony task
57
54
  - Đọc spec từ `docs/specs/` hoặc phase file
58
55
 
59
56
  ### 3. Execute (Zero Questions)
@@ -67,15 +64,15 @@ bd ready --limit 5
67
64
  ### 4. Auto-Test
68
65
  - Chạy test liên quan (nếu có)
69
66
  - Fix lỗi tự động (max 3 lần)
70
- - Nếu fail sau 3 lần → Tạo Beads task "Fix test for [Feature]"
67
+ - Nếu fail sau 3 lần → Tạo Symphony task "Fix test for [Feature]"
71
68
 
72
- ### 5. Update Beads — `cascade_complete()` (v6.5)
73
- ```bash
74
- # Close task with reason + suggest next
75
- bd close <task-id> --reason "Completed" --suggest-next
69
+ ### 5. Update Symphony — `complete_task()`
70
+ ```
71
+ # Complete task with summary
72
+ symphony_complete_task(task_id, summary="Completed", files_changed=[...])
76
73
 
77
- # Auto-close parent phase/epic if all children done
78
- bd epic close-eligible
74
+ # Report progress if partially done
75
+ symphony_report_progress(task_id, progress=100)
79
76
  ```
80
77
 
81
78
  ### 6. Report
@@ -89,7 +86,7 @@ bd epic close-eligible
89
86
 
90
87
  ✅ **Tests:** 5/5 passed
91
88
 
92
- 📿 **Beads:** Task #123 → Done
89
+ 🎵 **Symphony:** Task #123 → Done
93
90
 
94
91
  ➡️ **Next:** /codeExpert (Auto-pick next task)
95
92
  ```
@@ -117,14 +114,14 @@ AI sẽ tự động quyết định:
117
114
  Suggestions:
118
115
  1. Create plan first: /planExpert "Feature"
119
116
  2. Specify target: /codeExpert "Task Name"
120
- 3. Check Beads: bd list
117
+ 3. Check Symphony: symphony_available_tasks()
121
118
  ```
122
119
 
123
120
  ### Test Fail (After 3 Retries)
124
121
  ```
125
122
  ⚠️ Auto-fix failed after 3 attempts
126
123
 
127
- 📿 Created task: #456 "Fix test for Login API"
124
+ 🎵 Created task: "Fix test for Login API"
128
125
 
129
126
  Options:
130
127
  1. Debug manually: /debugExpert
@@ -136,6 +133,6 @@ Options:
136
133
 
137
134
  ## Integration
138
135
 
139
- - **Beads:** Auto-update task status
136
+ - **Symphony:** Auto-update task status via `symphony_complete_task()`
140
137
  - **Brain:** Auto-save code patterns to knowledge base
141
138
  - **Git:** Auto-stage changes (optional)