@leejungkiin/awkit 1.7.4 → 1.7.5
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 +42 -5
- package/bin/awk.js +579 -15
- package/core/GEMINI.md +4 -0
- package/core/GEMINI.md.bak +4 -0
- package/core/GreetingEngine/index.js +225 -0
- package/core/GreetingEngine/locales/en.json +6 -0
- package/core/GreetingEngine/locales/ja.json +6 -0
- package/core/GreetingEngine/locales/vi.json +6 -0
- package/core/GreetingEngine/test.js +37 -0
- package/docs/PRD.md +57 -0
- package/docs/brainstorm_multi_agent_cli.md +211 -0
- package/docs/history/PRD.v1.md +55 -0
- package/docs/history/PRD.v2.md +57 -0
- package/docs/history/memoizedfibonacci_spec.v1.md +127 -0
- package/docs/specs/greetingapp_spec.md +97 -0
- package/docs/specs/memoizedfibonacci_spec.md +211 -0
- package/package.json +1 -1
- package/scripts/multi-model-pipeline.js +292 -50
- package/scripts/qwen-exec.js +147 -0
- package/skills/claude-planner/SKILL.md +24 -0
- package/skills/codex-conductor/SKILL.md +25 -1
- package/skills/qwen-conductor/SKILL.md +100 -0
- package/workflows/multi-agent-pipeline.md +52 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qwen-conductor
|
|
3
|
+
description: >-
|
|
4
|
+
Cost-Efficient Execution Flow — Antigravity invokes Qwen CLI
|
|
5
|
+
for boilerplate code generation, routine logic coding, and local code edits.
|
|
6
|
+
Runs on local resources or cost-optimized API providers, saving premium API tokens.
|
|
7
|
+
metadata:
|
|
8
|
+
stage: core
|
|
9
|
+
version: "1.0"
|
|
10
|
+
requires: qwen (/Users/trungkientn/.nvm/versions/node/v22.22.0/bin/qwen)
|
|
11
|
+
tags: [conductor, qwen, cli, boilerplate, local, cost-optimized, execution]
|
|
12
|
+
agent: Executor
|
|
13
|
+
trigger: conditional
|
|
14
|
+
invocation-type: auto
|
|
15
|
+
priority: 4
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# 🤖 Qwen Conductor Skill
|
|
19
|
+
|
|
20
|
+
> **Purpose:** Tự động gọi Qwen Coder CLI qua script wrapper `scripts/qwen-exec.js` khi cần sinh mã nguồn boilerplate, hàm hỗ trợ, hoặc các logic phổ thông.
|
|
21
|
+
> **Key Benefit:** Tận dụng mô hình nguồn mở tối ưu cho code (Qwen 2.5 Coder 32B/72B) chạy local/API giá rẻ ➔ Tiết kiệm ~85% chi phí so với gọi Claude cho toàn bộ task.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 🎯 Trigger Conditions
|
|
26
|
+
|
|
27
|
+
Kích hoạt khi AWKit ở chế độ `cost-optimized` (mặc định) và nhận diện các tác vụ:
|
|
28
|
+
|
|
29
|
+
```yaml
|
|
30
|
+
auto_trigger:
|
|
31
|
+
high_confidence:
|
|
32
|
+
- Boilerplate code generation (new files, routine structures)
|
|
33
|
+
- Simple function/utility implementation (<50 lines of code)
|
|
34
|
+
- Code formatting, lint errors fixing
|
|
35
|
+
- Local unit tests suite generation
|
|
36
|
+
- Script helpers writing
|
|
37
|
+
|
|
38
|
+
medium_confidence (confirm before running):
|
|
39
|
+
- Refactoring local modules
|
|
40
|
+
- Translation or migration of small packages
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 🔧 CLI Wrapper Invocation
|
|
46
|
+
|
|
47
|
+
Hàm execution của AWKit sẽ ủy quyền cho Qwen thông qua wrapper:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
node scripts/qwen-exec.js \
|
|
51
|
+
--prompt "<PROMPT>" \
|
|
52
|
+
--sandbox read-only \
|
|
53
|
+
--output "<OUTPUT_FILE>"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Safety & Sandboxing Rules
|
|
57
|
+
|
|
58
|
+
```yaml
|
|
59
|
+
safety:
|
|
60
|
+
- Luôn chạy Qwen dưới quyền sandbox `read-only` trừ khi có chỉ thị ghi file cụ thể.
|
|
61
|
+
- Phục hồi an toàn (Fallback): Nếu Qwen CLI thoát với mã lỗi khác 0, tự động chuyển sang gọi Gemini CLI (agy) để hoàn thành task viết mã.
|
|
62
|
+
- Sử dụng file input tạm để xử lý các prompt chứa chuỗi và nháy kép phức tạp, tránh lỗi parse shell command.
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 🔄 Integration Flow
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
1. AWKit nhận diện Gate 4 (Execution - Viết code) ở chế độ Cost-Optimized.
|
|
71
|
+
2. Gom specs từ docs/specs/ và implementation_plan.md làm context.
|
|
72
|
+
3. Chạy lệnh: run_command("node scripts/qwen-exec.js --prompt '...' --output '...'")
|
|
73
|
+
4. Qwen CLI xử lý và ghi code trực tiếp ra file đích.
|
|
74
|
+
5. Nếu Qwen lỗi ➔ tự động fallback sang agy (Gemini Flash) viết code.
|
|
75
|
+
6. Kết thúc ➔ afplay báo chuông hoàn thành cho User.
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## ⚙️ Configuration & Control Techniques
|
|
79
|
+
|
|
80
|
+
### 1. Check Runner Status
|
|
81
|
+
Verify if the Qwen runner is enabled globally:
|
|
82
|
+
```bash
|
|
83
|
+
awkit config qwen
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 2. Enable/Disable Runner
|
|
87
|
+
To temporarily disable Qwen runner (forcing fallback to Gemini standard models) or enable it:
|
|
88
|
+
```bash
|
|
89
|
+
awkit config qwen off
|
|
90
|
+
awkit config qwen on
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 3. Check All Runners
|
|
94
|
+
```bash
|
|
95
|
+
awkit config runners
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### 4. Active Routing & Fallback
|
|
99
|
+
If `qwen` is disabled or unavailable on the system, the pipeline automatically routes code generation tasks (Gate 4 execution) to **Gemini Flash** via `agy` CLI using `gemini-3.5-flash`.
|
|
100
|
+
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# 🎼 Multi-Agent CLI Pipeline Workflow
|
|
2
|
+
|
|
3
|
+
> **Command Shortcut:** `/multi-agent`
|
|
4
|
+
> **Central Script:** `scripts/multi-model-pipeline.js`
|
|
5
|
+
> **Orchestration:** Claude (Architect) ➔ Qwen (Executor) ➔ Codex (Inspector)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 📖 Overview
|
|
10
|
+
|
|
11
|
+
Quy trình này tự động hóa việc phát triển tính năng bằng cách phân phối các bước thiết kế, code, và review cho các CLI chuyên dụng. Điều này tối ưu hóa chi phí API và cải thiện chất lượng sản phẩm cuối cùng.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 🛠️ Step-by-Step Execution
|
|
16
|
+
|
|
17
|
+
### Bước 1: Khởi chạy Lập kế hoạch (Plan Phase)
|
|
18
|
+
Gọi Claude CLI để lập PRD và spec kiến trúc chi tiết:
|
|
19
|
+
```bash
|
|
20
|
+
awkit pipeline plan "FeatureName"
|
|
21
|
+
```
|
|
22
|
+
*Sản phẩm đầu ra:* `docs/PRD.md` và `docs/specs/feature_name_spec.md`.
|
|
23
|
+
|
|
24
|
+
### Bước 2: Thiết kế giao diện & Mockup (UI Phase)
|
|
25
|
+
Gọi Codex CLI để tạo demo và spritesheet/gui assets:
|
|
26
|
+
```bash
|
|
27
|
+
awkit pipeline ui "FeatureName"
|
|
28
|
+
```
|
|
29
|
+
*Sản phẩm đầu ra:* `assets/ui/demo_preview.html` và GUI assets.
|
|
30
|
+
|
|
31
|
+
### Bước 3: Viết mã nguồn (Code Phase)
|
|
32
|
+
Gọi Qwen Coder CLI (hoặc fallback Gemini) để thực thi viết mã và tự động chạy code review:
|
|
33
|
+
```bash
|
|
34
|
+
awkit pipeline code "FeatureName"
|
|
35
|
+
```
|
|
36
|
+
*Sản phẩm đầu ra:* Source code hoàn thiện và báo cáo review chi tiết.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 🔔 Sound Notifications
|
|
41
|
+
|
|
42
|
+
Sau khi mỗi Phase (Plan, UI, Code) hoàn tất, hệ thống sẽ tự động phát âm thanh thông báo hệ thống và giọng nói (trên macOS) để báo hiệu cho người dùng biết khi nào task background kết thúc:
|
|
43
|
+
- `afplay /System/Library/Sounds/Glass.aiff`
|
|
44
|
+
- `say "[Phase] đã hoàn thành"`
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## 🚫 Fallback Policy
|
|
49
|
+
|
|
50
|
+
- Nếu Claude CLI bị lỗi ➔ Tự động chuyển sang sử dụng `agy --model claude-opus` (Gemini CLI).
|
|
51
|
+
- Nếu Qwen CLI bị lỗi ➔ Tự động chuyển sang sử dụng `agy --model gemini-2.5-flash` (Gemini CLI).
|
|
52
|
+
- Quy trình không bị dừng hoặc crash giữa chừng, đảm bảo sự liên tục.
|