@leejungkiin/awkit 1.6.8 → 1.7.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/bin/awk.js +76 -1
- package/package.json +1 -1
- package/scripts/automation-gate.js +13 -12
- package/scripts/exec-rtk.js +50 -0
- package/skills/CATALOG.md +1 -1
- package/skills/TRIGGER_INDEX.md +1 -1
- package/skills/marketing-spec-writer/SKILL.md +51 -0
- package/skills/marketing-spec-writer/templates/MARKETING_SPEC.md +53 -0
- package/skills/review/SKILL.md +87 -0
- 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 -2
- package/templates/project-identity/android.json +2 -2
- package/templates/project-identity/backend-nestjs.json +2 -2
- package/templates/project-identity/expo.json +2 -2
- package/templates/project-identity/ios.json +2 -2
- package/templates/project-identity/web-nextjs.json +2 -2
- package/skills/code-review/SKILL.md +0 -115
package/bin/awk.js
CHANGED
|
@@ -368,7 +368,7 @@ function copyDirRecursive(src, dest, options = {}) {
|
|
|
368
368
|
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
369
369
|
|
|
370
370
|
for (const entry of entries) {
|
|
371
|
-
if (entry.name === '.DS_Store') continue;
|
|
371
|
+
if (entry.name === '.DS_Store' || entry.name === '.git') continue;
|
|
372
372
|
|
|
373
373
|
const srcPath = path.join(src, entry.name);
|
|
374
374
|
|
|
@@ -998,6 +998,18 @@ function cmdDoctor() {
|
|
|
998
998
|
warn('schemas/ directory missing'); issues++;
|
|
999
999
|
}
|
|
1000
1000
|
|
|
1001
|
+
// 4.5. Check RTK Integration
|
|
1002
|
+
try {
|
|
1003
|
+
const { checkRtk } = require('../scripts/exec-rtk');
|
|
1004
|
+
if (checkRtk()) {
|
|
1005
|
+
ok('RTK (Rust Token Killer) is installed and active');
|
|
1006
|
+
} else {
|
|
1007
|
+
warn('RTK (Rust Token Killer) not found. Run "awkit rtk setup" to optimize token usage.');
|
|
1008
|
+
}
|
|
1009
|
+
} catch (e) {
|
|
1010
|
+
warn(`RTK check failed: ${e.message}`);
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1001
1013
|
// 5. Check version
|
|
1002
1014
|
if (fs.existsSync(TARGETS.versionFile)) {
|
|
1003
1015
|
const v = fs.readFileSync(TARGETS.versionFile, 'utf8').trim();
|
|
@@ -2031,6 +2043,7 @@ function cmdHelp() {
|
|
|
2031
2043
|
log(` ${C.green}update${C.reset} Pull latest + reinstall`);
|
|
2032
2044
|
log(` ${C.green}lint${C.reset} Run skill & workflow guards (check length, frontmatter)`);
|
|
2033
2045
|
log(` ${C.green}doctor${C.reset} Check installation health`);
|
|
2046
|
+
log(` ${C.green}rtk setup${C.reset} Auto-install and configure RTK wrapper`);
|
|
2034
2047
|
log(` ${C.green}credentials list${C.reset} List stored API keys`);
|
|
2035
2048
|
log(` ${C.green}credentials set${C.reset} <k> <v> Set API key (e.g., gemini_api_key, openrouter_api_key)`);
|
|
2036
2049
|
log(` ${C.green}set-openrouter${C.reset} <key> Shorthand for setting OpenRouter API Key`);
|
|
@@ -3848,6 +3861,65 @@ function cmdGitnexus(args) {
|
|
|
3848
3861
|
}
|
|
3849
3862
|
}
|
|
3850
3863
|
|
|
3864
|
+
// ─── RTK Integration ──────────────────────────────────────────────────────────
|
|
3865
|
+
|
|
3866
|
+
async function cmdRtkSetup() {
|
|
3867
|
+
log(`${C.cyan}${C.bold}╔═══════════════════════════════════════════════════════╗${C.reset}`);
|
|
3868
|
+
log(`${C.cyan}${C.bold}║ ⚙️ RTK Auto-Setup & Configuration ║${C.reset}`);
|
|
3869
|
+
log(`${C.cyan}${C.bold}╚═══════════════════════════════════════════════════════╝${C.reset}`);
|
|
3870
|
+
|
|
3871
|
+
log(`\nChecking dependencies...`);
|
|
3872
|
+
try {
|
|
3873
|
+
execSync('which cargo', { stdio: 'ignore' });
|
|
3874
|
+
ok('Cargo is installed.');
|
|
3875
|
+
} catch (_) {
|
|
3876
|
+
err('Cargo/Rust not found. Please install Rust (https://rustup.rs/) and retry.');
|
|
3877
|
+
return;
|
|
3878
|
+
}
|
|
3879
|
+
|
|
3880
|
+
log(`\nInstalling RTK (Rust Token Killer) via Cargo...`);
|
|
3881
|
+
try {
|
|
3882
|
+
execSync('cargo install --git https://github.com/rtk-ai/rtk', { stdio: 'inherit' });
|
|
3883
|
+
ok('RTK successfully installed/updated via Cargo.');
|
|
3884
|
+
} catch (e) {
|
|
3885
|
+
err(`Failed to install RTK: ${e.message}`);
|
|
3886
|
+
return;
|
|
3887
|
+
}
|
|
3888
|
+
|
|
3889
|
+
const zshrcPath = path.join(HOME, '.zshrc');
|
|
3890
|
+
log(`\nConfiguring Shell Aliases in ~/.zshrc...`);
|
|
3891
|
+
if (fs.existsSync(zshrcPath)) {
|
|
3892
|
+
const zshrc = fs.readFileSync(zshrcPath, 'utf8');
|
|
3893
|
+
const aliasBlock = `
|
|
3894
|
+
# RTK Alias for AI Agents (AWKit)
|
|
3895
|
+
alias git="rtk git"
|
|
3896
|
+
alias npm="rtk npm"
|
|
3897
|
+
alias pnpm="rtk pnpm"
|
|
3898
|
+
alias yarn="rtk yarn"
|
|
3899
|
+
alias cargo="rtk cargo"
|
|
3900
|
+
`;
|
|
3901
|
+
if (zshrc.includes('alias git="rtk git"')) {
|
|
3902
|
+
ok('Aliases already present in ~/.zshrc.');
|
|
3903
|
+
} else {
|
|
3904
|
+
fs.appendFileSync(zshrcPath, aliasBlock, 'utf8');
|
|
3905
|
+
ok('Shell aliases successfully added to ~/.zshrc.');
|
|
3906
|
+
log(`\n${C.cyan}Please reload your shell (source ~/.zshrc) to apply shifts.${C.reset}`);
|
|
3907
|
+
}
|
|
3908
|
+
} else {
|
|
3909
|
+
warn('~/.zshrc not found. Skipping alias setup.');
|
|
3910
|
+
}
|
|
3911
|
+
}
|
|
3912
|
+
|
|
3913
|
+
async function cmdRtk(args) {
|
|
3914
|
+
const action = args[0];
|
|
3915
|
+
if (action === 'setup') {
|
|
3916
|
+
await cmdRtkSetup();
|
|
3917
|
+
} else {
|
|
3918
|
+
err(`Unknown rtk command: ${action || ''}`);
|
|
3919
|
+
log(` Available: setup`);
|
|
3920
|
+
}
|
|
3921
|
+
}
|
|
3922
|
+
|
|
3851
3923
|
// ─── Native HTTP Server ───────────────────────────────────────────────────────
|
|
3852
3924
|
|
|
3853
3925
|
function cmdServe(args) {
|
|
@@ -4019,6 +4091,9 @@ const [, , command, ...args] = process.argv;
|
|
|
4019
4091
|
case 'serve':
|
|
4020
4092
|
cmdServe(args);
|
|
4021
4093
|
break;
|
|
4094
|
+
case 'rtk':
|
|
4095
|
+
await cmdRtk(args);
|
|
4096
|
+
break;
|
|
4022
4097
|
case 'gitnexus':
|
|
4023
4098
|
case 'gn':
|
|
4024
4099
|
cmdGitnexus(args);
|
package/package.json
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
const fs = require('fs');
|
|
19
19
|
const path = require('path');
|
|
20
20
|
const { execSync } = require('child_process');
|
|
21
|
+
const { execRtkSync } = require('./exec-rtk');
|
|
21
22
|
|
|
22
23
|
// Lazy-load obsidian-sync to avoid circular dependencies
|
|
23
24
|
let _autoSyncObsidian = null;
|
|
@@ -101,13 +102,13 @@ function checkGate(domain, action) {
|
|
|
101
102
|
case 'git': {
|
|
102
103
|
const gitConfig = automation.git;
|
|
103
104
|
if (!gitConfig) {
|
|
104
|
-
return { allowed:
|
|
105
|
+
return { allowed: false, config: null, reason: 'No automation.git config — default block' };
|
|
105
106
|
}
|
|
106
|
-
if (action === 'commit' && gitConfig.autoCommit
|
|
107
|
-
return { allowed: false, config: gitConfig, reason: 'automation.git.autoCommit is
|
|
107
|
+
if (action === 'commit' && gitConfig.autoCommit !== true) {
|
|
108
|
+
return { allowed: false, config: gitConfig, reason: 'automation.git.autoCommit is not true (default off)' };
|
|
108
109
|
}
|
|
109
|
-
if (action === 'push' && gitConfig.autoPush
|
|
110
|
-
return { allowed: false, config: gitConfig, reason: 'automation.git.autoPush is
|
|
110
|
+
if (action === 'push' && gitConfig.autoPush !== true) {
|
|
111
|
+
return { allowed: false, config: gitConfig, reason: 'automation.git.autoPush is not true (default off)' };
|
|
111
112
|
}
|
|
112
113
|
return { allowed: true, config: gitConfig, reason: 'automation.git allows this action' };
|
|
113
114
|
}
|
|
@@ -174,8 +175,8 @@ function execGitCommit(message) {
|
|
|
174
175
|
}
|
|
175
176
|
|
|
176
177
|
try {
|
|
177
|
-
|
|
178
|
-
|
|
178
|
+
execRtkSync('git add -A', { stdio: 'inherit' });
|
|
179
|
+
execRtkSync(`git commit -m "${message.replace(/"/g, '\\"')}"`, { stdio: 'inherit' });
|
|
179
180
|
ok(`Committed: ${message}`);
|
|
180
181
|
return true;
|
|
181
182
|
} catch (e) {
|
|
@@ -198,13 +199,13 @@ function execGitPush() {
|
|
|
198
199
|
}
|
|
199
200
|
|
|
200
201
|
try {
|
|
201
|
-
|
|
202
|
+
execRtkSync('git push', { stdio: 'inherit' });
|
|
202
203
|
ok('Pushed successfully.');
|
|
203
204
|
return true;
|
|
204
205
|
} catch (e) {
|
|
205
206
|
warn('Push failed. Retrying with git pull --rebase...');
|
|
206
207
|
try {
|
|
207
|
-
|
|
208
|
+
execRtkSync('git pull --rebase && git push', { stdio: 'inherit' });
|
|
208
209
|
ok('Pushed successfully after rebase.');
|
|
209
210
|
return true;
|
|
210
211
|
} catch (e2) {
|
|
@@ -231,7 +232,7 @@ function execGitAuto(message) {
|
|
|
231
232
|
if (tgGate.allowed) {
|
|
232
233
|
info('Triggering Telegram notification...');
|
|
233
234
|
try {
|
|
234
|
-
|
|
235
|
+
execRtkSync(`awkit tg send "✅ Pushed: ${message.replace(/"/g, '\\"')}"`, { stdio: 'inherit' });
|
|
235
236
|
} catch (_) {
|
|
236
237
|
dim('Telegram notification skipped (not configured or failed).');
|
|
237
238
|
}
|
|
@@ -255,7 +256,7 @@ function execTrelloAction(action, args) {
|
|
|
255
256
|
|
|
256
257
|
try {
|
|
257
258
|
const cmd = `awkit trello ${action} ${args.map(a => `"${a}"`).join(' ')}`;
|
|
258
|
-
|
|
259
|
+
execRtkSync(cmd, { stdio: 'inherit' });
|
|
259
260
|
// Trigger Obsidian sync after successful trello action
|
|
260
261
|
getAutoSyncObsidian()();
|
|
261
262
|
return true;
|
|
@@ -277,7 +278,7 @@ function execTelegramSend(args) {
|
|
|
277
278
|
|
|
278
279
|
try {
|
|
279
280
|
const cmd = `awkit tg send ${args.map(a => `"${a}"`).join(' ')}`;
|
|
280
|
-
|
|
281
|
+
execRtkSync(cmd, { stdio: 'inherit' });
|
|
281
282
|
return true;
|
|
282
283
|
} catch (e) {
|
|
283
284
|
err(`Telegram send failed: ${e.message}`);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const { execSync } = require('child_process');
|
|
2
|
+
|
|
3
|
+
let hasRtkCache = null;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Check if rtk binary is available in the current environment PATH.
|
|
7
|
+
* @returns {boolean}
|
|
8
|
+
*/
|
|
9
|
+
function checkRtk() {
|
|
10
|
+
if (hasRtkCache !== null) return hasRtkCache;
|
|
11
|
+
try {
|
|
12
|
+
execSync('which rtk', { stdio: 'ignore' });
|
|
13
|
+
hasRtkCache = true;
|
|
14
|
+
} catch (_) {
|
|
15
|
+
hasRtkCache = false;
|
|
16
|
+
}
|
|
17
|
+
return hasRtkCache;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Execute command with rtk prefix if available and eligible.
|
|
22
|
+
* @param {string} command
|
|
23
|
+
* @param {object} options
|
|
24
|
+
* @returns {Buffer|string}
|
|
25
|
+
*/
|
|
26
|
+
function execRtkSync(command, options = {}) {
|
|
27
|
+
if (!checkRtk()) {
|
|
28
|
+
return execSync(command, options);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const trimmed = command.trim();
|
|
32
|
+
if (trimmed.startsWith('rtk ')) {
|
|
33
|
+
return execSync(command, options);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Only compress developer commands known to be verbose
|
|
37
|
+
const eligiblePrefixes = ['git ', 'npm ', 'cargo ', 'yarn ', 'pnpm ', 'grep ', 'find ', 'awkit trello '];
|
|
38
|
+
const isEligible = eligiblePrefixes.some(prefix => trimmed.startsWith(prefix));
|
|
39
|
+
|
|
40
|
+
if (isEligible) {
|
|
41
|
+
return execSync(`rtk ${command}`, options);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return execSync(command, options);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
module.exports = {
|
|
48
|
+
execRtkSync,
|
|
49
|
+
checkRtk
|
|
50
|
+
};
|
package/skills/CATALOG.md
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
|---|-------|------|---------|----------|--------|
|
|
49
49
|
| 14 | `verification-gate` | `auto` | Task completion, commit, deploy | 1 | ✅ Active |
|
|
50
50
|
| 15 | `systematic-debugging` | `auto` | `/debug`, error detected, test failures | 2 | ✅ Active |
|
|
51
|
-
| 16 | `
|
|
51
|
+
| 16 | `review` | `auto` | Task completion, before merge | 3 | ✅ Active |
|
|
52
52
|
| 17 | `writing-skills` | `manual` | Creating/modifying skills | — | ✅ Active |
|
|
53
53
|
|
|
54
54
|
|
package/skills/TRIGGER_INDEX.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
| awf-session-restore | Session start, init chain | awf-session-restore/SKILL.md | 🔴 |
|
|
12
12
|
| nm-memory-sync | Session start/end, debug, errors | nm-memory-sync/SKILL.md | 🟡 |
|
|
13
13
|
| verification-gate | Task completion, commit, deploy, success claims | verification-gate/SKILL.md | 🟡 |
|
|
14
|
-
|
|
|
14
|
+
| review | Task completion, before merge | review/SKILL.md | 🟡 |
|
|
15
15
|
| spec-gate | Gate 2 architecture design | spec-gate/SKILL.md | 🟡 |
|
|
16
16
|
| brainstorm-agent | `/brainstorm`, ý tưởng, ideation | brainstorm-agent/SKILL.md | 🟢 |
|
|
17
17
|
| skill-creator | `/create-agent-skill`, tạo/sửa skill | skill-creator/SKILL.md | 🟢 |
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: marketing-spec-writer
|
|
3
|
+
description: |
|
|
4
|
+
Đóng vai trò là Giám đốc Marketing (CMO) của dự án. AI tự động quét codebase, đọc project identity
|
|
5
|
+
và dịch các tính năng kỹ thuật khô khan thành tài liệu Marketing Spec (Value Props, ASO, Campaign Briefs).
|
|
6
|
+
Cung cấp đầu vào cực chuẩn (Prompt Ready) để đưa cho các AI Agent khác như `short-maker` làm video quảng cáo.
|
|
7
|
+
metadata:
|
|
8
|
+
stage: workflow
|
|
9
|
+
version: "1.0"
|
|
10
|
+
tags: [marketing, aso, spec, content, ads, brief, strategy]
|
|
11
|
+
trigger: explicit
|
|
12
|
+
activation_keywords:
|
|
13
|
+
- "/marketing"
|
|
14
|
+
- "/marketing-spec"
|
|
15
|
+
- "viết tài liệu marketing"
|
|
16
|
+
- "tạo spec quảng cáo"
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# 📈 Marketing Spec Writer (CMO Mode)
|
|
20
|
+
|
|
21
|
+
> **Mục tiêu**: Biến Codebase kỹ thuật thành "Vàng Marketing". Skill này chuẩn bị toàn bộ "đạn dược" (Asset Briefs, ASO, USP) để cung cấp cho các AI Agent khác (như `short-maker` làm video, hoặc AI viết bài PR) thao tác tự động.
|
|
22
|
+
|
|
23
|
+
## 🚀 Quy trình hoạt động
|
|
24
|
+
|
|
25
|
+
### Bước 1: Thu thập Context Kỹ Thuật
|
|
26
|
+
- Đọc file `.project-identity` và `CODEBASE.md` để hiểu "Linh hồn" và tính năng chính của App.
|
|
27
|
+
- (Tùy chọn) Dùng `gitnexus_query` tìm các tính năng cốt lõi hoặc các module vừa được push code gần đây nếu làm Release Marketing.
|
|
28
|
+
|
|
29
|
+
### Bước 2: Dịch Thuật Kỹ Thuật -> Lợi Ích (Tech-to-Value)
|
|
30
|
+
- Phân tích và chuyển đổi các Specs kỹ thuật (ví dụ: *Offline First SQLite*, *End-to-End Encryption*, *50fps Rendering*) thành User Benefits (ví dụ: *Use Anywhere, Even in the Woods*, *Your Secrets are Safe*, *Silky Smooth Experience*).
|
|
31
|
+
|
|
32
|
+
### Bước 3: Phân rã theo định dạng (Marketing Spec Generation)
|
|
33
|
+
Tạo file `docs/MARKETING_SPEC.md` theo template chuẩn bao gồm các phần:
|
|
34
|
+
1. **Product Core Identity**: Sứ mệnh, Đối tượng mục tiêu (Persona), Tone of Voice.
|
|
35
|
+
2. **App Store Optimization (ASO)**: Đề xuất Tiêu đề, Subtitle, Keywords, Description.
|
|
36
|
+
3. **Unique Selling Propositions (USPs)**: 3-5 điểm ăn tiền nhất.
|
|
37
|
+
4. **Campaign Angles (Góc nhìn truyền thông)**: Các kịch bản đánh vào cảm xúc (Nỗi đau - Giải pháp, hoặc Khát vọng).
|
|
38
|
+
5. **AI Video Prompt (BẮT BUỘC)**: Đóng gói sẵn 1 đoạn Text để User **chỉ việc Copy-Paste vào lệnh `/short` hoặc `short-maker`** để ra lệnh làm video.
|
|
39
|
+
|
|
40
|
+
### Bước 4: Review & Chốt Hướng Đi
|
|
41
|
+
- Trình bày tóm tắt cho User duyệt.
|
|
42
|
+
- Nếu User duyệt, hướng dẫn cách sử dụng đoạn prompt đã gen để đẩy sang quy trình Video Marketing (`short-maker`).
|
|
43
|
+
|
|
44
|
+
## 🔗 Liên kết hệ sinh thái (Agent Hand-off)
|
|
45
|
+
Tài liệu sinh ra từ skill này được thiết kế ĐẶC BIỆT để làm mồi (Input) cho các tools khác:
|
|
46
|
+
- **`short-maker` (Video Ads)**: Sử dụng phần Campaign Angles và Persona để xây dựng Character và kịch bản AIDA chính xác nhất.
|
|
47
|
+
- **`blitz-macos` (Store Upload)**: Copy phần ASO để dán tự động lên App Store Connect.
|
|
48
|
+
|
|
49
|
+
## ⚠️ Lưu ý cho AI
|
|
50
|
+
- TUYỆT ĐỐI không dùng ngôn ngữ máy móc kiểu "App này dùng React Native...". Hãy dùng ngôn ngữ bán hàng, thuyết phục, đánh vào cảm xúc người dùng cuối (End-user).
|
|
51
|
+
- Hãy áp dụng các Framework Marketing chuẩn: AIDA (Attention - Interest - Desire - Action) hoặc PAS (Problem - Agitate - Solve).
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# 📈 Marketing Spec: {{APP_NAME}}
|
|
2
|
+
|
|
3
|
+
> Tự động tạo bởi `marketing-spec-writer`
|
|
4
|
+
> Ngày: {{DATE}} | Phiên bản: {{VERSION}}
|
|
5
|
+
|
|
6
|
+
## 1. Bản sắc Cốt lõi (Product Soul)
|
|
7
|
+
- **Sứ mệnh**: [App này tồn tại để giải quyết vấn đề gì, mang lại niềm vui gì?]
|
|
8
|
+
- **Tone of Voice**: [Chuyên nghiệp/Hài hước/Đồng cảm/Tạo động lực...]
|
|
9
|
+
- **Khách hàng Mục tiêu (Persona)**:
|
|
10
|
+
- *Bề mặt*: [Ví dụ: Dân văn phòng 25-35 tuổi]
|
|
11
|
+
- *Nỗi đau (Pain Point)*: [Họ đang gặp rắc rối gì hàng ngày?]
|
|
12
|
+
- *Khát vọng (Desire)*: [Họ muốn đạt được trạng thái nào?]
|
|
13
|
+
|
|
14
|
+
## 2. Điểm Bán Hàng Độc Nhất (USPs - Tech to Value)
|
|
15
|
+
*(Dịch từ Codebase sang Lợi ích)*
|
|
16
|
+
1. **[Tên USP 1]**: (Tech: *[Tech Note]*) -> Value: *[Người dùng nhận được gì?]*
|
|
17
|
+
2. **[Tên USP 2]**: (Tech: *[Tech Note]*) -> Value: *[Tại sao nó tuyệt vời?]*
|
|
18
|
+
3. **[Tên USP 3]**: (Tech: *[Tech Note]*) -> Value: *[Điều này đánh bại đối thủ như thế nào?]*
|
|
19
|
+
|
|
20
|
+
## 3. Tối ưu Kho Ứng dụng (ASO Meta)
|
|
21
|
+
*(Dùng để đẩy lên App Store / Google Play)*
|
|
22
|
+
- **Title (Tối đa 30 ký tự)**: [Chứa Keyword chính]
|
|
23
|
+
- **Subtitle (Tối đa 30 ký tự)**: [Định vị ngắn gọn]
|
|
24
|
+
- **Keywords (Dấu phẩy)**: [word1, word2, word3...]
|
|
25
|
+
- **Promotional Text**: [Câu slogan ăn tiền nhất]
|
|
26
|
+
- **Description Hook**:
|
|
27
|
+
> *[Câu mở đầu giật gân, ví dụ: "Bạn đã chán ngấy việc...?"]*
|
|
28
|
+
|
|
29
|
+
## 4. Kịch bản Truyền thông (Campaign Angles)
|
|
30
|
+
*(Góc nhìn để chạy quảng cáo Facebook/TikTok)*
|
|
31
|
+
|
|
32
|
+
### Angle 1: Đánh vào nỗi sợ / sự bất tiện (Pain-driven)
|
|
33
|
+
- **Mở bài**: Bạn đang tốn quá nhiều thời gian cho X?
|
|
34
|
+
- **Giải pháp**: Với {{APP_NAME}}, X được giải quyết trong 1 nốt nhạc nhờ [USP 1].
|
|
35
|
+
|
|
36
|
+
### Angle 2: Bán kết quả / Ước mơ (Desire-driven)
|
|
37
|
+
- **Mở bài**: Trở thành phiên bản tốt nhất của bạn với...
|
|
38
|
+
- **Giải pháp**: Sở hữu [Kết quả lý tưởng] mà không cần [Trở ngại].
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 🤖 [Handoff] Short-Maker Ready Prompt
|
|
43
|
+
*(Bạn có thể copy nội dung dưới đây và dán cho `short-maker` hoặc gọi `/short`)*
|
|
44
|
+
|
|
45
|
+
```text
|
|
46
|
+
/short
|
|
47
|
+
|
|
48
|
+
Tên App: {{APP_NAME}}
|
|
49
|
+
Thông điệp chính: [Chọn 1 Angle ở trên]
|
|
50
|
+
Tone: [Tone of Voice]
|
|
51
|
+
Nhân vật: [Mô tả Persona lý tưởng làm diễn viên, ví dụ: "Một nam thanh niên mặc đồ gym, vóc dáng săn chắc, khuôn mặt quyết tâm..."]
|
|
52
|
+
Yêu cầu nội dung: Làm nổi bật tính năng [USP 1] và [USP 2]. Đoạn Hook phải bắt ngay vào nỗi đau [Pain Point]. Call To Action cuối video là tải app {{APP_NAME}} ngay hôm nay.
|
|
53
|
+
```
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review
|
|
3
|
+
description: Use when completing tasks, implementing features, or before merging. Dispatch structured code review with severity classification via Codex CLI.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- ⚠️ SMART REVIEW AGENT — Intelligent routing for Security, Localization, Compliance, and Quality -->
|
|
7
|
+
|
|
8
|
+
# Smart Code Review
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
Review early, review often. Catch issues before they cascade.
|
|
13
|
+
Antigravity uses `codex` CLI to perform deep, multi-file code reviews across specific domains (Security, Localization, Compliance, Quality).
|
|
14
|
+
|
|
15
|
+
**Core principle:** Actionable, domain-specific feedback via Multi-Agent Flow.
|
|
16
|
+
|
|
17
|
+
## The Review Modules (Execution via Codex CLI)
|
|
18
|
+
|
|
19
|
+
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.
|
|
20
|
+
Dưới đây là 5 Module Review Tự Động. Antigravity tự động map intent của User để chọn Module phù hợp:
|
|
21
|
+
|
|
22
|
+
### 1. 🛡️ Security & Privacy Review (Thay thế `/audit`)
|
|
23
|
+
**Dùng khi User yêu cầu:** *"review bảo mật", "check security", "kiểm tra an toàn"*
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
codex -p "Thực hiện Security & Privacy Review. Hãy quét khắt khe các điểm sau:
|
|
27
|
+
1. Hardcoded API Keys/Secrets trong code hoặc file config.
|
|
28
|
+
2. Dữ liệu PII (Personal Identifiable Information) có bị log ra console không (print, console.log).
|
|
29
|
+
3. Lỗ hổng OWASP (SQL Injection, XSS, thiếu Rate Limiting, CORS/Headers lỏng lẻo).
|
|
30
|
+
4. Kiểm tra việc sử dụng Secure Storage (Keychain/EncryptedSharedPreferences).
|
|
31
|
+
5. Phân tích file Privacy Policy có khớp với dữ liệu thực tế thu thập không.
|
|
32
|
+
Trả về báo cáo phân loại Critical/High/Low." --approval-mode auto
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 2. 🌐 Localization & UI Review
|
|
36
|
+
**Dùng khi User yêu cầu:** *"review đa ngôn ngữ", "check hardcode string", "kiểm tra UI"*
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
codex -p "Thực hiện Localization Review. Quét các file UI (Views, Components):
|
|
40
|
+
1. Tìm tất cả các string hiển thị cho người dùng bị hardcode mà chưa bọc qua hàm dịch (i18n, LocalizedStringKey, R.string).
|
|
41
|
+
2. Đối chiếu xem các key được gọi trong UI đã tồn tại trong file từ điển (en/vi) chưa.
|
|
42
|
+
Liệt kê chi tiết tên file và số dòng vi phạm." --approval-mode auto
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 3. 🍏 Store Compliance Review
|
|
46
|
+
**Dùng khi User yêu cầu:** *"review appstore", "check compliance", "chuẩn bị submit"*
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
codex -p "Thực hiện App Store / Play Store Compliance Review. Đánh giá:
|
|
50
|
+
1. Info.plist / AndroidManifest: Các chuỗi giải thích quyền (NSCameraUsageDescription...) có đầy đủ ý nghĩa không.
|
|
51
|
+
2. App Tracking Transparency (ATT): Đã cấu hình và gọi khi cần chưa.
|
|
52
|
+
3. Background Modes: Có khai báo thừa thãi không.
|
|
53
|
+
4. Kiểm tra mã nguồn có API riêng tư (Private APIs) hoặc code tải logic động trái phép không." --approval-mode auto
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 4. 🧠 Architecture & Logic Review
|
|
57
|
+
**Dùng khi User yêu cầu:** *"review kiến trúc", "review logic", "code smell"*
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
codex -p "Thực hiện Architecture & Logic Review. Đánh giá:
|
|
61
|
+
1. Vi phạm nguyên tắc SOLID và Clean Architecture (VD: View xử lý Business Logic).
|
|
62
|
+
2. Code duplication (Lặp code) hoặc Hàm quá dài (>50 lines).
|
|
63
|
+
3. Thiếu Error Handling trong các async function / API calls.
|
|
64
|
+
4. Memory Leaks (Retain cycles, forgot to unsubscribe)." --approval-mode auto
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 5. ⚡ Auto Diff Review (Mặc định)
|
|
68
|
+
**Dùng khi User yêu cầu:** *"review", "review diff", "check code vừa viết"* hoặc khi hoàn thành Task.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
codex -p "Review các thay đổi hiện tại (git diff/staged). Đảm bảo code mới viết đáp ứng Spec, không phá vỡ logic cũ và tuân thủ Coding Convention của dự án. Nếu an toàn, hãy trả về LGTM (Looks Good To Me)." --approval-mode auto
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Cách Xử Lý Output Từ Codex
|
|
77
|
+
1. Fix 🔴 **Critical** issues NGAY LẬP TỨC. (VD: Lộ Key, API chưa chặn rate limit).
|
|
78
|
+
2. Fix 🟡 **Important** issues trước khi kết thúc task hoặc chuyển sang Phase mới. (VD: Quên localize string).
|
|
79
|
+
3. Log 🟢 **Minor** issues để cấu trúc lại sau.
|
|
80
|
+
4. Proceed nếu Subagent Codex báo "LGTM" hoặc không có issue nào nghiêm trọng.
|
|
81
|
+
|
|
82
|
+
## Integration
|
|
83
|
+
|
|
84
|
+
**Used by:**
|
|
85
|
+
- `single-flow-task-execution` — Review sau mỗi task
|
|
86
|
+
- `symphony-enforcer` — Review trước khi `symphony_complete_task`
|
|
87
|
+
- Thay thế hoàn toàn quy trình thủ công của `/audit` workflow.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: storyboard-to-scene-pack
|
|
3
|
+
description: "Create end-to-end storyboard design packs for animation/video projects with continuity-safe per-scene prompts and reviewer-ready previews. Use when Codex needs to: (1) design a storyboard sheet, (2) generate prompts for each scene (default 8s per scene), (3) prepare keyframe image prompts with character/environment continuity, or (4) produce an HTML storyboard preview that shows each frame and its prompt."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Storyboard To Scene Pack
|
|
7
|
+
|
|
8
|
+
Build a reusable storyboard pipeline that turns one concept into a continuity-safe scene package and reviewable preview.
|
|
9
|
+
|
|
10
|
+
## Workflow
|
|
11
|
+
|
|
12
|
+
1. Collect a compact brief.
|
|
13
|
+
2. Build continuity locks.
|
|
14
|
+
3. Draft storyboard plan and panel prompts.
|
|
15
|
+
4. Generate per-scene keyframe prompts (default `duration: 8s`).
|
|
16
|
+
5. Produce preview output (hand-drawn storyboard prompt + HTML preview data).
|
|
17
|
+
|
|
18
|
+
## Step 1: Collect Brief
|
|
19
|
+
|
|
20
|
+
Capture only what is required:
|
|
21
|
+
|
|
22
|
+
- Project title and one-line premise
|
|
23
|
+
- Visual style (for example: pencil sketch, noir ink, watercolor)
|
|
24
|
+
- Character list (name, role, physical anchors, wardrobe anchors)
|
|
25
|
+
- Environment anchors (layout elements that must persist)
|
|
26
|
+
- Total scene count and target duration per scene (default 8s)
|
|
27
|
+
- Tone and camera language preferences
|
|
28
|
+
|
|
29
|
+
If input is missing, assume safe defaults and continue.
|
|
30
|
+
|
|
31
|
+
## Step 2: Build Continuity Locks
|
|
32
|
+
|
|
33
|
+
Before generating scene prompts, define immutable anchors:
|
|
34
|
+
|
|
35
|
+
- Character Bible: face/hair/body/clothes/props signatures
|
|
36
|
+
- Environment Bible: spatial map and recurring objects
|
|
37
|
+
- Time/lighting continuity: time-of-day and light direction
|
|
38
|
+
- State continuity tokens: object states carried across scenes
|
|
39
|
+
|
|
40
|
+
Use [continuity-checklist.md](references/continuity-checklist.md) to validate.
|
|
41
|
+
|
|
42
|
+
## Step 3: Draft Storyboard Plan
|
|
43
|
+
|
|
44
|
+
Create a panel plan first, then prompts:
|
|
45
|
+
|
|
46
|
+
- Use a grid format (`3x4` default) with numbered panels
|
|
47
|
+
- For each panel, define `scene`, `action`, `dialogue`, `camera`
|
|
48
|
+
- Keep camera progression intentional (wide -> medium -> close-up as needed)
|
|
49
|
+
- Include explicit shot/move labels when relevant (`WIDE SHOT`, `PAN LEFT`, `TILT UP`, `ZOOM IN`)
|
|
50
|
+
|
|
51
|
+
For hand-drawn storyboard sheet generation, use [storyboard-sheet-template.md](references/storyboard-sheet-template.md).
|
|
52
|
+
|
|
53
|
+
## Step 4: Generate Per-Scene Prompt Pack
|
|
54
|
+
|
|
55
|
+
For each scene, output one prompt block with this schema:
|
|
56
|
+
|
|
57
|
+
- `scene_id`
|
|
58
|
+
- `duration_seconds` (default `8`)
|
|
59
|
+
- `goal_of_scene`
|
|
60
|
+
- `visual_prompt`
|
|
61
|
+
- `camera_prompt`
|
|
62
|
+
- `continuity_from_previous`
|
|
63
|
+
- `negative_constraints`
|
|
64
|
+
|
|
65
|
+
Prefer explicit continuity phrasing, for example: "same wardrobe as Scene 03", "knife remains in right hand", "steam intensity reduced from prior scene".
|
|
66
|
+
|
|
67
|
+
Use [scene-prompt-template.md](references/scene-prompt-template.md).
|
|
68
|
+
|
|
69
|
+
## Step 5: Produce Preview Artifacts
|
|
70
|
+
|
|
71
|
+
Always provide these outputs:
|
|
72
|
+
|
|
73
|
+
- Hand-drawn storyboard sheet prompt (single-sheet overview)
|
|
74
|
+
- Scene prompt list (JSON or Markdown table)
|
|
75
|
+
- HTML preview mapping each frame to its prompt and continuity notes
|
|
76
|
+
|
|
77
|
+
Use [preview-template/index.html](assets/preview-template/index.html) as the base layout.
|
|
78
|
+
|
|
79
|
+
## Output Contract
|
|
80
|
+
|
|
81
|
+
Return outputs in this structure:
|
|
82
|
+
|
|
83
|
+
- `storyboard/handdrawn_storyboard_prompt.md`
|
|
84
|
+
- `storyboard/scene_prompts.json`
|
|
85
|
+
- `preview/index.html`
|
|
86
|
+
|
|
87
|
+
If scene images are already available, reference them in preview as:
|
|
88
|
+
|
|
89
|
+
- `scenes/scene_01.png`
|
|
90
|
+
- `scenes/scene_02.png`
|
|
91
|
+
- `...`
|
|
92
|
+
|
|
93
|
+
## Quality Gate
|
|
94
|
+
|
|
95
|
+
Validate before finalizing:
|
|
96
|
+
|
|
97
|
+
- Panel numbering is complete and ordered
|
|
98
|
+
- Character and wardrobe continuity is preserved
|
|
99
|
+
- Environment anchors stay consistent
|
|
100
|
+
- Camera sequence supports narrative clarity
|
|
101
|
+
- Every scene has explicit 8s duration (or user-specified override)
|
|
102
|
+
- HTML preview contains both image slot and prompt text per scene
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
6
|
+
<title>Storyboard Preview</title>
|
|
7
|
+
<style>
|
|
8
|
+
:root {
|
|
9
|
+
--bg: #f5f3ee;
|
|
10
|
+
--panel: #ffffff;
|
|
11
|
+
--ink: #1f1f1f;
|
|
12
|
+
--muted: #666;
|
|
13
|
+
--line: #ddd7cc;
|
|
14
|
+
}
|
|
15
|
+
body {
|
|
16
|
+
margin: 0;
|
|
17
|
+
font-family: "Avenir Next", "Segoe UI", sans-serif;
|
|
18
|
+
background: var(--bg);
|
|
19
|
+
color: var(--ink);
|
|
20
|
+
}
|
|
21
|
+
header {
|
|
22
|
+
padding: 20px;
|
|
23
|
+
border-bottom: 1px solid var(--line);
|
|
24
|
+
background: linear-gradient(180deg, #fff, #f7f4ee);
|
|
25
|
+
}
|
|
26
|
+
h1 { margin: 0 0 8px; font-size: 24px; }
|
|
27
|
+
.sub { margin: 0; color: var(--muted); }
|
|
28
|
+
main {
|
|
29
|
+
max-width: 1100px;
|
|
30
|
+
margin: 20px auto;
|
|
31
|
+
padding: 0 16px 24px;
|
|
32
|
+
display: grid;
|
|
33
|
+
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
34
|
+
gap: 16px;
|
|
35
|
+
}
|
|
36
|
+
article {
|
|
37
|
+
background: var(--panel);
|
|
38
|
+
border: 1px solid var(--line);
|
|
39
|
+
border-radius: 12px;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
|
|
42
|
+
}
|
|
43
|
+
img {
|
|
44
|
+
width: 100%;
|
|
45
|
+
aspect-ratio: 16 / 9;
|
|
46
|
+
object-fit: cover;
|
|
47
|
+
background: #ece8de;
|
|
48
|
+
display: block;
|
|
49
|
+
}
|
|
50
|
+
.content { padding: 12px; }
|
|
51
|
+
.id { font-weight: 700; margin: 0 0 6px; }
|
|
52
|
+
.meta { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
|
|
53
|
+
pre {
|
|
54
|
+
margin: 0;
|
|
55
|
+
white-space: pre-wrap;
|
|
56
|
+
font-family: "SF Mono", Consolas, monospace;
|
|
57
|
+
font-size: 12px;
|
|
58
|
+
line-height: 1.4;
|
|
59
|
+
background: #fbfaf7;
|
|
60
|
+
border: 1px solid var(--line);
|
|
61
|
+
border-radius: 8px;
|
|
62
|
+
padding: 8px;
|
|
63
|
+
max-height: 240px;
|
|
64
|
+
overflow: auto;
|
|
65
|
+
}
|
|
66
|
+
</style>
|
|
67
|
+
</head>
|
|
68
|
+
<body>
|
|
69
|
+
<header>
|
|
70
|
+
<h1>Storyboard Scene Preview</h1>
|
|
71
|
+
<p class="sub">Replace `SCENES` in the inline script with your generated scene data.</p>
|
|
72
|
+
</header>
|
|
73
|
+
<main id="grid"></main>
|
|
74
|
+
|
|
75
|
+
<script>
|
|
76
|
+
const SCENES = [
|
|
77
|
+
{
|
|
78
|
+
scene_id: "SCENE_01",
|
|
79
|
+
duration_seconds: 8,
|
|
80
|
+
image: "../scenes/scene_01.png",
|
|
81
|
+
prompt: "Example prompt for scene 01",
|
|
82
|
+
continuity: "Initial scene"
|
|
83
|
+
}
|
|
84
|
+
];
|
|
85
|
+
|
|
86
|
+
const grid = document.getElementById("grid");
|
|
87
|
+
SCENES.forEach(scene => {
|
|
88
|
+
const card = document.createElement("article");
|
|
89
|
+
card.innerHTML = `
|
|
90
|
+
<img src="${scene.image}" alt="${scene.scene_id}" />
|
|
91
|
+
<div class="content">
|
|
92
|
+
<p class="id">${scene.scene_id}</p>
|
|
93
|
+
<p class="meta">Duration: ${scene.duration_seconds}s</p>
|
|
94
|
+
<pre>${scene.prompt}\n\nContinuity: ${scene.continuity}</pre>
|
|
95
|
+
</div>
|
|
96
|
+
`;
|
|
97
|
+
grid.appendChild(card);
|
|
98
|
+
});
|
|
99
|
+
</script>
|
|
100
|
+
</body>
|
|
101
|
+
</html>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Continuity Checklist
|
|
2
|
+
|
|
3
|
+
Use this checklist before approving scene prompts or keyframes.
|
|
4
|
+
|
|
5
|
+
## Character Continuity
|
|
6
|
+
|
|
7
|
+
- Face shape, hairstyle, and age cues remain stable
|
|
8
|
+
- Wardrobe palette and core accessories remain stable
|
|
9
|
+
- Signature props stay present or are intentionally removed
|
|
10
|
+
|
|
11
|
+
## Environment Continuity
|
|
12
|
+
|
|
13
|
+
- Primary layout remains consistent (major objects do not teleport)
|
|
14
|
+
- Lighting direction and intensity progress logically
|
|
15
|
+
- Background density and style remain coherent
|
|
16
|
+
|
|
17
|
+
## Action Continuity
|
|
18
|
+
|
|
19
|
+
- Entry/exit direction between adjacent scenes is consistent
|
|
20
|
+
- Handedness stays stable for held objects
|
|
21
|
+
- Object states evolve logically (raw -> chopped -> cooked)
|
|
22
|
+
|
|
23
|
+
## Camera Continuity
|
|
24
|
+
|
|
25
|
+
- Shot changes are motivated, not random
|
|
26
|
+
- Camera move labels match visual intent
|
|
27
|
+
- Close-up inserts still preserve geography from master shots
|
|
28
|
+
|
|
29
|
+
## Timing Continuity
|
|
30
|
+
|
|
31
|
+
- Each scene uses `duration_seconds: 8` unless overridden
|
|
32
|
+
- Motion intent is clear for an 8-second beat
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Scene Prompt Template
|
|
2
|
+
|
|
3
|
+
```yaml
|
|
4
|
+
scene_id: SCENE_01
|
|
5
|
+
duration_seconds: 8
|
|
6
|
+
goal_of_scene: "Introduce conflict at the prep station"
|
|
7
|
+
visual_prompt: >
|
|
8
|
+
[Describe composition, characters, action, environment details, and style]
|
|
9
|
+
camera_prompt: >
|
|
10
|
+
[Shot type, lens feel, movement direction, framing priority]
|
|
11
|
+
continuity_from_previous: >
|
|
12
|
+
[Explicit carry-over from prior scene: wardrobe, prop state, lighting]
|
|
13
|
+
negative_constraints:
|
|
14
|
+
- "No extra characters"
|
|
15
|
+
- "No wardrobe change"
|
|
16
|
+
- "No prop position reset"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Prefer concrete language over abstract adjectives.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Storyboard Sheet Prompt Template
|
|
2
|
+
|
|
3
|
+
Use this when generating the single-page hand-drawn overview.
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
A full, professional storyboard sheet for "{PROJECT_TITLE}", in {STYLE} black-and-white hand-drawn pencil sketch style.
|
|
7
|
+
Layout: clean {GRID} grid with numbered panels.
|
|
8
|
+
Title text: "{TITLE_LINE}".
|
|
9
|
+
Each panel: characters {CHARACTERS} performing key action beats in {ENVIRONMENT}.
|
|
10
|
+
Below each panel: stylized handwritten production notes for SCENE, ACTION, DIALOGUE, CAMERA.
|
|
11
|
+
Include camera labels where relevant: CLOSE-UP, PAN LEFT, WIDE SHOT, TILT UP, ZOOM IN.
|
|
12
|
+
Include a right-side section: "NOTES / PLAN UPDATES" with bullet notes.
|
|
13
|
+
Keep linework consistent, organized layout, white background.
|
|
14
|
+
```
|
|
@@ -33,7 +33,9 @@ BEFORE claiming any status or expressing satisfaction:
|
|
|
33
33
|
- If NO: State actual status with evidence
|
|
34
34
|
- If YES: State claim WITH evidence
|
|
35
35
|
5. ONLY THEN: Make the claim
|
|
36
|
-
6. AUTO-COMMIT
|
|
36
|
+
6. AUTO-COMMIT (TÙY CHỌN — Mặc định TẮT):
|
|
37
|
+
- Chỉ tự động commit nếu `automation.git.autoCommit: true` được bật trong `.project-identity`.
|
|
38
|
+
- Nếu được bật: Build 0 errors → git add → git commit → git push (non-force)
|
|
37
39
|
- Do NOT ask user permission for regular commits
|
|
38
40
|
- Use conventional commit message (fix:/feat:/refactor:)
|
|
39
41
|
- If push fails → git pull --rebase && git push (retry once)
|
|
@@ -99,7 +101,7 @@ If you catch yourself thinking any of these, STOP and run verification:
|
|
|
99
101
|
|
|
100
102
|
**Build:**
|
|
101
103
|
```
|
|
102
|
-
✅ [Run build] → [See: BUILD SUCCEEDED] → auto git add+commit+push → "Build passes, committed & pushed"
|
|
104
|
+
✅ [Run build] → [See: BUILD SUCCEEDED] → (nếu bật auto git) auto git add+commit+push → "Build passes, committed & pushed"
|
|
103
105
|
❌ "Linter passed so build is fine"
|
|
104
106
|
❌ Build succeeded but forgot to commit
|
|
105
107
|
```
|
|
@@ -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 |
|