@leejungkiin/awkit 1.6.6 → 1.7.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 +186 -8
- package/package.json +5 -3
- package/schemas/onboarding-screen.schema.json +108 -0
- package/scripts/__pycache__/openrouter_image_gen.cpython-311.pyc +0 -0
- package/scripts/automation-gate.js +8 -7
- package/scripts/cockpit-quota.js +93 -0
- package/scripts/exec-rtk.js +50 -0
- package/scripts/openrouter_image_gen.py +772 -0
- package/scripts/video-analyzer.js +172 -0
- package/skills/CATALOG.md +3 -2
- package/skills/TRIGGER_INDEX.md +1 -1
- package/skills/ai-sprite-maker/SKILL.md +27 -6
- package/skills/ai-sprite-maker/scripts/__pycache__/remove_chroma_key.cpython-311.pyc +0 -0
- package/skills/ai-sprite-maker/scripts/remove_chroma_key.py +440 -0
- package/skills/awf-caveman/SKILL.md +65 -0
- package/skills/expo-build-optimizer/SKILL.md +33 -0
- package/skills/ios-app-store-audit/SKILL.md +48 -0
- package/skills/ios-expert-coder/SKILL.md +45 -0
- package/skills/marketing-spec-writer/SKILL.md +51 -0
- package/skills/marketing-spec-writer/templates/MARKETING_SPEC.md +53 -0
- package/skills/mascot-designer/SKILL.md +66 -0
- package/skills/mascot-designer/examples/witny-case-study.md +35 -0
- package/skills/orchestrator/SKILL.md +20 -0
- package/skills/review/SKILL.md +87 -0
- package/skills/short-maker/scripts/google-flow-cli/README.md +227 -115
- package/skills/short-maker/scripts/google-flow-cli/gflow/api/client.py +32 -3
- package/skills/short-maker/scripts/google-flow-cli/gflow/api/models.py +4 -2
- package/skills/short-maker/scripts/google-flow-cli/gflow/cli/main.py +33 -6
- package/skills/short-maker/scripts/google-flow-cli/pyproject.toml +1 -1
- package/skills/storyboard-to-scene-pack/SKILL.md +102 -0
- package/skills/storyboard-to-scene-pack/agents/openai.yaml +4 -0
- package/skills/storyboard-to-scene-pack/assets/preview-template/index.html +101 -0
- package/skills/storyboard-to-scene-pack/references/continuity-checklist.md +32 -0
- package/skills/storyboard-to-scene-pack/references/scene-prompt-template.md +19 -0
- package/skills/storyboard-to-scene-pack/references/storyboard-sheet-template.md +14 -0
- package/skills/verification-gate/SKILL.md +4 -0
- package/templates/help.html +21 -0
- package/templates/project-identity/android.json +24 -0
- package/templates/project-identity/backend-nestjs.json +24 -0
- package/templates/project-identity/expo.json +24 -0
- package/templates/project-identity/ios.json +24 -0
- package/templates/project-identity/web-nextjs.json +24 -0
- package/templates/specs/design-template.md +71 -161
- package/templates/specs/requirements-template.md +133 -65
- package/workflows/ui/create-spec-architect.md +80 -50
- package/workflows/ui/image-gen.md +118 -0
- package/skills/code-review/SKILL.md +0 -115
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 🎨 Image Generator — Tạo App Icons, Mascots và Pets (Hatch-style) với chất lượng Studio (Soft-Edge & Hole-Aware)
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /image-gen — High-Quality Asset Production Workflow
|
|
6
|
+
|
|
7
|
+
> Quy trình tạo Asset chuyên nghiệp, tự động tách nền và xử lý cạnh mượt mà (PicWish Style).
|
|
8
|
+
> Hỗ trợ tạo Pet Bundle (Trứng + Thú cưng) tương tự Codex nhưng chất lượng cao hơn.
|
|
9
|
+
|
|
10
|
+
// turbo-all
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Sub-commands
|
|
15
|
+
|
|
16
|
+
### `/image-gen:icon` — Tạo bộ App Icon
|
|
17
|
+
|
|
18
|
+
1. Hỏi user về chủ đề (Theme), phong cách (Style - mặc định: `vector`), và **Kích thước lưới** (Grid - mặc định: `3x3`).
|
|
19
|
+
2. Tự động tính toán số lượng `{count}` dựa trên lưới (vd: 3x3 -> 9 icons).
|
|
20
|
+
3. Thông báo user: "🎨 Đang phác thảo bộ Icon Set {grid} cho chủ đề: {theme}..."
|
|
21
|
+
4. Thực thi lệnh tạo:
|
|
22
|
+
```bash
|
|
23
|
+
create-icon {theme} {grid} {style}
|
|
24
|
+
```
|
|
25
|
+
5. Sau khi ảnh được tạo, thông báo: "✅ Đã tạo xong và xử lý Soft-Edge. File lưu tại: `assets/generated/`."
|
|
26
|
+
|
|
27
|
+
### `/image-gen:mascot` — Tạo bộ Linh vật / Mascot
|
|
28
|
+
|
|
29
|
+
1. Hỏi user về nhân vật (Character), phong cách (Style - mặc định: `chibi`), và **Kích thước lưới** (Grid - mặc định: `3x3`).
|
|
30
|
+
2. Tự động tính toán số lượng `{count}` dựa trên lưới.
|
|
31
|
+
3. Thông báo user: "🧸 Đang thiết kế bộ Mascot {grid} cho: {character}..."
|
|
32
|
+
4. Thực thi lệnh tạo:
|
|
33
|
+
```bash
|
|
34
|
+
create-mascot {character} {grid} {style}
|
|
35
|
+
```
|
|
36
|
+
5. Sau khi ảnh được tạo, thông báo: "✅ Mascot đã sẵn sàng với nền trong suốt hoàn hảo!"
|
|
37
|
+
|
|
38
|
+
### `/image-gen:pet` — Tạo Pet Bundle (Ấp trứng)
|
|
39
|
+
|
|
40
|
+
1. Hỏi user về loại Pet (ví dụ: `fire dragon`, `ice phoenix`) và **Kích thước lưới** (Grid - mặc định: `4x4` cho đầy đủ trạng thái).
|
|
41
|
+
2. Thông báo user: "🐣 Đang tạo Pet Bundle ({grid}) cho: {pet_type}..."
|
|
42
|
+
3. Thực thi lệnh tạo:
|
|
43
|
+
```bash
|
|
44
|
+
create-pet {pet_type} {grid}
|
|
45
|
+
```
|
|
46
|
+
4. Tạo thư mục cấu hình: `mkdir -p assets/pets/{pet_id}`
|
|
47
|
+
5. Ghi file `pet.json` mẫu tương thích hệ thống Hatch Pet.
|
|
48
|
+
6. Thông báo: "✨ Pet Bundle đã được đóng gói tại `assets/pets/{pet_id}/`."
|
|
49
|
+
|
|
50
|
+
### `/image-gen:process` — Xử lý ảnh có sẵn (Hole-Aware)
|
|
51
|
+
|
|
52
|
+
1. User cung cấp đường dẫn ảnh nguồn (`input_path`).
|
|
53
|
+
2. Xác định tên file đầu ra (`output_name.webp`).
|
|
54
|
+
3. Thực thi lệnh xử lý với thuật toán v3.1:
|
|
55
|
+
```bash
|
|
56
|
+
process-image {input_path} assets/generated/{output_name}.webp 15
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### `/image-gen:openrouter` — Tạo ảnh qua OpenRouter (GPT-5.4-Image)
|
|
60
|
+
|
|
61
|
+
Quy trình sử dụng script `openrouter_image_gen.py` (Codex-grade) hỗ trợ 3 chế độ:
|
|
62
|
+
|
|
63
|
+
#### 1. Chế độ `generate` (Text-to-Image)
|
|
64
|
+
Dùng để tạo mới asset từ mô tả văn bản, hỗ trợ các tham số Art Direction cực mạnh:
|
|
65
|
+
```bash
|
|
66
|
+
python3 ~/.gemini/antigravity/scripts/openrouter_image_gen.py generate \
|
|
67
|
+
--prompt "{chủ_thể}" \
|
|
68
|
+
--style "{phong_cách}" \
|
|
69
|
+
--lighting "{ánh_sáng}" \
|
|
70
|
+
--palette "{tông_màu}" \
|
|
71
|
+
--out "assets/generated/{filename}.webp"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
#### 2. Chế độ `edit` (Image-to-Image / Style Transfer)
|
|
75
|
+
Dùng để biến đổi ảnh có sẵn (Local path hoặc URL) sang phong cách khác hoặc chỉnh sửa chi tiết:
|
|
76
|
+
```bash
|
|
77
|
+
python3 ~/.gemini/antigravity/scripts/openrouter_image_gen.py edit \
|
|
78
|
+
--image "{đường_dẫn_ảnh_gốc}" \
|
|
79
|
+
--prompt "{mô_tả_chỉnh_sửa}" \
|
|
80
|
+
--style "{phong_cách_mới}" \
|
|
81
|
+
--out "assets/generated/{filename}.webp"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
#### 3. Chế độ `generate-batch` (Chạy hàng loạt)
|
|
85
|
+
Dùng để sinh hàng loạt asset từ file `.jsonl` (tối đa 100 jobs) với cơ chế Retry tự động:
|
|
86
|
+
```bash
|
|
87
|
+
python3 ~/.gemini/antigravity/scripts/openrouter_image_gen.py generate-batch \
|
|
88
|
+
--input "jobs.jsonl" \
|
|
89
|
+
--out-dir "assets/generated/batch/" \
|
|
90
|
+
--concurrency 3
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
> **Note**: Script tự động xử lý Upload ảnh local lên `tmpfiles.org` và có cơ chế Exponential Backoff để chống lỗi nghẽn (429).
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## 🛠 Quality Standards (Codex Hatch Pet Technique)
|
|
98
|
+
|
|
99
|
+
- **🚫 CẤM DÙNG "Nền trong suốt / Transparent Background"**: TUYỆT ĐỐI KHÔNG thêm các từ khóa "transparent background", "nền trong suốt", "alpha channel" vào prompt sinh ảnh. Việc này sẽ khiến AI (như DALL-E, Midjourney, OpenRouter) sinh ra **nền caro giả (fake checkerboard)** bám dính vào nhân vật, cực kỳ khó xoá.
|
|
100
|
+
- **✅ Background**: LUÔN ưu tiên sử dụng `solid bright green background #00FF00` hoặc `solid white background #FFFFFF` (nếu nhân vật có màu xanh) để AI render chi tiết tốt nhất, không bị đổ bóng (no shadows cast on the background).
|
|
101
|
+
- **🛠 Hậu kỳ (Post-Processing)**: Sau khi sinh ảnh thô có nền Solid, BẮT BUỘC sử dụng công cụ Python Chroma-key cục bộ (process-image hoặc process_sprites.py) để gỡ nền.
|
|
102
|
+
- **Edges & Holes**: Script Python sẽ tự động áp dụng Alpha Feathering (Blur 0x3) để triệt tiêu răng cưa, và xóa các vùng kẹt trong cánh/tay nhưng bảo vệ đôi mắt (Morphology Close).
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Communication
|
|
107
|
+
|
|
108
|
+
Mỗi khi bắt đầu một lượt generate:
|
|
109
|
+
```
|
|
110
|
+
🎨 [Antigravity Artist] Đang khởi tạo xưởng vẽ cho {asset_type}...
|
|
111
|
+
🚀 Chiến lược: Neutral White + Soft-Edge Alpha.
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Sau khi hoàn tất:
|
|
115
|
+
```
|
|
116
|
+
✅ Hoàn tất! Asset của bạn đã được tối ưu hóa WebP và tách nền sạch sẽ.
|
|
117
|
+
📍 Vị trí: [đường dẫn]
|
|
118
|
+
```
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: code-review
|
|
3
|
-
description: Use when completing tasks, implementing features, or before merging. Dispatch structured code review with severity classification. Auto-triggers after task completion in subagent-driven or single-flow execution.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
<!-- ⚠️ REVIEW GATE — Spec compliance FIRST, then code quality. No merge without review. -->
|
|
7
|
-
|
|
8
|
-
# Code Review
|
|
9
|
-
|
|
10
|
-
## Overview
|
|
11
|
-
|
|
12
|
-
Review early, review often. Catch issues before they cascade.
|
|
13
|
-
|
|
14
|
-
**Core principle:** Structured review with actionable, severity-classified feedback.
|
|
15
|
-
|
|
16
|
-
## When to Request Review
|
|
17
|
-
|
|
18
|
-
**Mandatory:**
|
|
19
|
-
- After completing each task in execution flow
|
|
20
|
-
- After implementing major feature or fix
|
|
21
|
-
- Before merge to main branch
|
|
22
|
-
- Before deploy to production
|
|
23
|
-
|
|
24
|
-
**Optional but valuable:**
|
|
25
|
-
- When stuck (fresh perspective helps)
|
|
26
|
-
- Before refactoring (baseline check)
|
|
27
|
-
- After fixing complex bug
|
|
28
|
-
|
|
29
|
-
## The Review Process (Execution via Codex CLI)
|
|
30
|
-
|
|
31
|
-
Thay vì tự đọc diff và đánh giá, Antigravity **BẮT BUỘC** gọi `codex` CLI để thực hiện Code Review nhằm mở rộng Context Window và sử dụng subagent chuyên dụng.
|
|
32
|
-
|
|
33
|
-
Có 3 chế độ review chính tùy theo bối cảnh:
|
|
34
|
-
|
|
35
|
-
### 1. Review Toàn Bộ Codebase (Full Review)
|
|
36
|
-
Sử dụng khi cần đánh giá tổng thể dự án, review architecture, security, hoặc chuẩn bị big release.
|
|
37
|
-
```bash
|
|
38
|
-
codex -p "Review toàn bộ codebase. Tập trung kiểm tra tính nhất quán kiến trúc (architecture), rủi ro bảo mật (security) và hiệu suất (performance)." --approval-mode auto
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### 2. Review Những Thay Đổi (Changes / Diff Review)
|
|
42
|
-
Sử dụng khi vừa hoàn thành xong code một tính năng hoặc fix bug (các thay đổi workspace, stashed, unstaged, hoặc dải diff ngắn).
|
|
43
|
-
```bash
|
|
44
|
-
codex -p "Review những thay đổi hiện tại (git diff/staged). Tập trung kiểm tra logic, edge cases và conventions." --approval-mode auto
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### 3. Review Commit Cụ Thể (Specific Commit)
|
|
48
|
-
Sử dụng khi cần review một nhánh git, PR, hoặc một commit hash cụ thể.
|
|
49
|
-
```bash
|
|
50
|
-
codex -p "Review commit <commit_hash> (hoặc range main..HEAD). Tập trung đánh giá xem code có giải quyết đúng vấn đề và compliance với Spec không." --approval-mode auto
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### Cách Xử Lý Output Từ Codex
|
|
54
|
-
1. Fix 🔴 **Critical** issues NGAY LẬP TỨC.
|
|
55
|
-
2. Fix 🟡 **Important** issues trước khi kết thúc task hoặc chuyển sang Phase mới.
|
|
56
|
-
3. Log 🟢 **Minor** issues để cấu trúc lại sau.
|
|
57
|
-
4. Proceed nếu Subagent Codex báo "LGTM" hoặc không có issue nào nghiêm trọng.
|
|
58
|
-
|
|
59
|
-
## Two-Stage Review (Subagent-Driven)
|
|
60
|
-
|
|
61
|
-
For automated execution, run TWO separate review passes:
|
|
62
|
-
|
|
63
|
-
### Stage 1: Spec Compliance Review
|
|
64
|
-
```
|
|
65
|
-
- Does the code implement ALL requirements from the spec/plan?
|
|
66
|
-
- Is anything MISSING from the spec?
|
|
67
|
-
- Is anything EXTRA that wasn't specified (scope creep)?
|
|
68
|
-
- Does behavior match expected output for each requirement?
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### Stage 2: Code Quality Review
|
|
72
|
-
```
|
|
73
|
-
- Is the code clean, readable, and well-structured?
|
|
74
|
-
- Are there any thread safety issues?
|
|
75
|
-
- Is error handling comprehensive?
|
|
76
|
-
- Are there performance concerns?
|
|
77
|
-
- Does it follow project coding conventions?
|
|
78
|
-
- Are there any security vulnerabilities?
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
**Order matters:** Spec compliance FIRST, then code quality. No point reviewing quality of wrong code.
|
|
82
|
-
|
|
83
|
-
## Self-Review Checklist (Before Requesting External Review)
|
|
84
|
-
|
|
85
|
-
Before asking for review, verify yourself:
|
|
86
|
-
|
|
87
|
-
- [ ] All requirements from plan/spec addressed
|
|
88
|
-
- [ ] No TODO/FIXME/HACK left unresolved
|
|
89
|
-
- [ ] Error handling for all failure paths
|
|
90
|
-
- [ ] No hardcoded values that should be configurable
|
|
91
|
-
- [ ] Thread safety for shared state
|
|
92
|
-
- [ ] Localization for user-facing strings
|
|
93
|
-
- [ ] No print/debugPrint left in production code
|
|
94
|
-
- [ ] File sizes < 500 lines
|
|
95
|
-
|
|
96
|
-
## Integration
|
|
97
|
-
|
|
98
|
-
**Used by:**
|
|
99
|
-
- `single-flow-task-execution` — Review after each task
|
|
100
|
-
- `symphony-enforcer` — Review before `symphony_complete_task`
|
|
101
|
-
|
|
102
|
-
**Related skills:**
|
|
103
|
-
- `verification-gate` — Run tests BEFORE requesting review
|
|
104
|
-
- `systematic-debugging` — If review reveals bugs
|
|
105
|
-
|
|
106
|
-
## Anti-Rationalization Table
|
|
107
|
-
|
|
108
|
-
| Excuse | Reality |
|
|
109
|
-
|--------|---------|
|
|
110
|
-
| "It's a small change" | Small changes cause big bugs |
|
|
111
|
-
| "Tests pass so it's correct" | Tests ≠ requirements. Review catches logic gaps |
|
|
112
|
-
| "I'm confident in this code" | Confidence ≠ correctness |
|
|
113
|
-
| "No time for review" | 5 min review saves 2 hours debugging |
|
|
114
|
-
| "I'll review it later" | Later never comes. Review now |
|
|
115
|
-
| "Only I understand this code" | That's exactly why someone else should review |
|