@leejungkiin/awkit 1.7.5 → 1.7.7

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 (60) hide show
  1. package/bin/awk.js +138 -23
  2. package/bin/codex-generators.js +34 -4
  3. package/core/GEMINI.md +12 -7
  4. package/core/GEMINI.md.bak +2 -2
  5. package/core/skill-runtime-manifest.json +1 -0
  6. package/docs/history/implementation_plan.v1.md +49 -45
  7. package/docs/history/implementation_plan.v2.md +87 -0
  8. package/package.json +1 -1
  9. package/scripts/codex-goal.js +163 -0
  10. package/scripts/exec-progress.js +116 -0
  11. package/scripts/exec-rtk.js +4 -3
  12. package/skills/codex-goal/SKILL.md +82 -0
  13. package/skills/generate-gui-assets/SKILL.md +5 -5
  14. package/skills/hatch-pet/SKILL.md +2 -2
  15. package/skills/threejs-animation/SKILL.md +86 -0
  16. package/skills/threejs-animation/examples/workflow-mixer-action.md +20 -0
  17. package/skills/threejs-animation/references/official-sections.md +19 -0
  18. package/skills/threejs-audio/SKILL.md +112 -0
  19. package/skills/threejs-audio/examples/workflow-positional-audio.md +15 -0
  20. package/skills/threejs-audio/references/official-sections.md +16 -0
  21. package/skills/threejs-camera/SKILL.md +96 -0
  22. package/skills/threejs-camera/examples/workflow-perspective-resize.md +13 -0
  23. package/skills/threejs-controls/SKILL.md +101 -0
  24. package/skills/threejs-controls/examples/workflow-orbit-damping.md +15 -0
  25. package/skills/threejs-dev-setup/SKILL.md +102 -0
  26. package/skills/threejs-dev-setup/examples/workflow-scaffold.md +24 -0
  27. package/skills/threejs-geometries/SKILL.md +108 -0
  28. package/skills/threejs-geometries/examples/workflow-extrude-shape.md +13 -0
  29. package/skills/threejs-helpers/SKILL.md +103 -0
  30. package/skills/threejs-helpers/examples/workflow-light-camera-helpers.md +13 -0
  31. package/skills/threejs-lights/SKILL.md +103 -0
  32. package/skills/threejs-lights/examples/workflow-directional-shadow.md +17 -0
  33. package/skills/threejs-loaders/SKILL.md +89 -0
  34. package/skills/threejs-loaders/examples/workflow-gltf-draco.md +22 -0
  35. package/skills/threejs-loaders/references/official-sections.md +27 -0
  36. package/skills/threejs-materials/SKILL.md +102 -0
  37. package/skills/threejs-materials/examples/workflow-pbr-transparent.md +15 -0
  38. package/skills/threejs-math/SKILL.md +102 -0
  39. package/skills/threejs-math/examples/workflow-ray-aabb.md +11 -0
  40. package/skills/threejs-node-tsl/SKILL.md +83 -0
  41. package/skills/threejs-node-tsl/examples/workflow-tsl-entry.md +13 -0
  42. package/skills/threejs-node-tsl/references/official-links.md +8 -0
  43. package/skills/threejs-node-tsl/references/tsl-vs-classic.md +23 -0
  44. package/skills/threejs-objects/SKILL.md +111 -0
  45. package/skills/threejs-objects/examples/workflow-raycaster-pick.md +17 -0
  46. package/skills/threejs-postprocessing/SKILL.md +116 -0
  47. package/skills/threejs-postprocessing/examples/workflow-composer-bloom.md +15 -0
  48. package/skills/threejs-renderers/SKILL.md +91 -0
  49. package/skills/threejs-renderers/examples/workflow-renderer-resize.md +21 -0
  50. package/skills/threejs-renderers/references/official-sections.md +14 -0
  51. package/skills/threejs-scenes/SKILL.md +90 -0
  52. package/skills/threejs-scenes/examples/workflow-fog-background.md +13 -0
  53. package/skills/threejs-textures/SKILL.md +83 -0
  54. package/skills/threejs-textures/examples/workflow-pmrem-env.md +19 -0
  55. package/skills/threejs-webxr/SKILL.md +104 -0
  56. package/skills/threejs-webxr/examples/workflow-xr-button.md +15 -0
  57. package/workflows/_uncategorized/goal.md +86 -0
  58. package/workflows/lifecycle/goal.md +86 -0
  59. package/workflows/ui/generate-gui-assets.md +111 -0
  60. package/workflows/ui/hatch-pet.md +116 -0
package/bin/awk.js CHANGED
@@ -67,16 +67,18 @@ const PLATFORMS = {
67
67
  },
68
68
  supportsCustomModes: false,
69
69
  supportsSubagents: false,
70
+ isGlobal: true,
70
71
  },
71
72
  cline: {
72
73
  name: 'Cline (VS Code)',
73
- globalRoot: process.cwd(), // Local to project
74
+ globalRoot: path.join(HOME, '.cline'),
74
75
  rulesFile: path.join(HOME, '.cline', 'rules', 'antigravity-rules.md'),
75
76
  versionFile: path.join(HOME, '.cline', 'awk_version'),
76
77
  dirs: {
77
- workflows: '.clinerules',
78
- skills: '.clinerules/skills',
78
+ workflows: 'rules',
79
+ skills: 'rules',
79
80
  },
81
+ isGlobal: true,
80
82
  },
81
83
  codex: {
82
84
  name: 'Codex (OpenAI)',
@@ -87,15 +89,17 @@ const PLATFORMS = {
87
89
  agents: 'agents',
88
90
  skills: '../.agents/skills',
89
91
  },
92
+ isGlobal: true,
90
93
  },
91
94
  claude: {
92
95
  name: 'Claude Code',
93
- globalRoot: process.cwd(), // Local to project
96
+ globalRoot: path.join(HOME, '.claude'),
94
97
  rulesFile: 'CLAUDE.md',
95
- versionFile: '.claude/awk_version',
98
+ versionFile: 'awk_version',
96
99
  dirs: {
97
- skills: '.claude/skills',
100
+ skills: 'skills',
98
101
  },
102
+ isGlobal: true,
99
103
  },
100
104
  qwen: {
101
105
  name: 'Qwen Code',
@@ -105,15 +109,17 @@ const PLATFORMS = {
105
109
  dirs: {
106
110
  skills: 'skills',
107
111
  },
112
+ isGlobal: true,
108
113
  },
109
114
  cursor: {
110
115
  name: 'Cursor AI',
111
- globalRoot: process.cwd(), // Local to project
112
- rulesFile: '.cursor/rules/antigravity-rules.mdc',
113
- versionFile: '.cursor/awk_version',
116
+ globalRoot: path.join(HOME, '.cursor'),
117
+ rulesFile: path.join(HOME, '.cursor', 'rules', 'antigravity-rules.mdc'),
118
+ versionFile: path.join(HOME, '.cursor', 'awk_version'),
114
119
  dirs: {
115
- skills: '.cursor/rules',
120
+ skills: 'rules',
116
121
  },
122
+ isGlobal: true,
117
123
  }
118
124
  };
119
125
 
@@ -538,8 +544,19 @@ function cmdInstall(args = []) {
538
544
  const isUpdate = args.includes('--update');
539
545
  let selectedPlatforms = [];
540
546
 
541
- if (args.includes('--all') || args.includes('-a') || args.includes('all')) {
542
- selectedPlatforms = Object.keys(PLATFORMS);
547
+ const hasAll = args.includes('--all') || args.includes('-a') || args.includes('all');
548
+ const hasLocal = args.includes('--local') || args.includes('-l') || args.includes('local');
549
+
550
+ if (hasAll) {
551
+ // Mặc định --all chỉ cài đặt các platform Global
552
+ selectedPlatforms = Object.keys(PLATFORMS).filter(p => PLATFORMS[p].isGlobal);
553
+ if (hasLocal) {
554
+ // Nếu có cả --local thì cài tất cả các platform
555
+ selectedPlatforms = Object.keys(PLATFORMS);
556
+ }
557
+ } else if (hasLocal) {
558
+ // Chỉ cài các platform Local
559
+ selectedPlatforms = Object.keys(PLATFORMS).filter(p => !PLATFORMS[p].isGlobal);
543
560
  } else {
544
561
  if (args.includes('--gemini') || args.includes('-g') || args.includes('antigravity')) selectedPlatforms.push('antigravity');
545
562
  if (args.includes('--cline') || args.includes('cline')) selectedPlatforms.push('cline');
@@ -552,7 +569,7 @@ function cmdInstall(args = []) {
552
569
  let legacyArg = null;
553
570
  if (pIdx !== -1 && args[pIdx + 1]) {
554
571
  legacyArg = args[pIdx + 1];
555
- } else if (args.length > 0 && !args[0].startsWith('-') && args[0] !== 'all' && args[0] !== '--update') {
572
+ } else if (args.length > 0 && !args[0].startsWith('-') && args[0] !== 'all' && args[0] !== '--update' && args[0] !== 'local') {
556
573
  legacyArg = args[0];
557
574
  }
558
575
 
@@ -569,17 +586,17 @@ function cmdInstall(args = []) {
569
586
  const defaultPlatform = getActivePlatform();
570
587
  const defaultChoice = String(Math.max(platformOrder.indexOf(defaultPlatform), 0) + 1);
571
588
  log(`${C.cyan}Select platforms to install (e.g., type "1,2", "all", or "1-6"):${C.reset}`);
572
- log(` 1. Gemini Code Assist (antigravity)`);
573
- log(` 2. Cline (VS Code)`);
574
- log(` 3. Codex CLI (codex)`);
575
- log(` 4. Claude Code (.claude/)`);
576
- log(` 5. Qwen Code (~/.qwen/)`);
577
- log(` 6. Cursor AI (.cursor/rules/)`);
578
- log(` 7. All of the above`);
589
+ log(` 1. Gemini Code Assist (antigravity) [Global]`);
590
+ log(` 2. Cline (VS Code) [Global]`);
591
+ log(` 3. Codex CLI (codex) [Global]`);
592
+ log(` 4. Claude Code (.claude/) [Global]`);
593
+ log(` 5. Qwen Code (~/.qwen/) [Global]`);
594
+ log(` 6. Cursor AI (.cursor/rules/) [Global]`);
595
+ log(` 7. All platforms (1-6)`);
579
596
  log(`${C.gray}Press Enter to install only the active platform: ${PLATFORMS[defaultPlatform].name}.${C.reset}`);
580
597
  const choice = promptChoice('Choice', defaultChoice).trim().toLowerCase();
581
598
 
582
- if (choice === '7' || choice === 'all') {
599
+ if (choice === '7' || choice === 'all' || choice === '1-6') {
583
600
  selectedPlatforms = Object.keys(PLATFORMS);
584
601
  } else {
585
602
  if (choice.includes('1')) selectedPlatforms.push('antigravity');
@@ -704,6 +721,8 @@ function cmdInstall(args = []) {
704
721
  generateClineSkills(skillsSrc, skillsDest, coreSkills);
705
722
  } else if (platform === 'codex') {
706
723
  generateCodexSkills(skillsSrc, skillsDest, coreSkills);
724
+ const codexSkillsDest = path.join(target, 'skills');
725
+ generateCodexSkills(skillsSrc, codexSkillsDest, coreSkills);
707
726
  const agentsDest = path.join(target, plat.dirs.agents);
708
727
  generateCodexAgents(skillsSrc, agentsDest, coreSkills);
709
728
  } else if (platform === 'claude') {
@@ -1067,7 +1086,8 @@ async function cmdDoctor() {
1067
1086
  log('');
1068
1087
  log(`${C.bold}Runtime Profile:${C.reset}`);
1069
1088
  log(` Profile: ${C.cyan}${installState.profile}${C.reset}`);
1070
- log(` Optional packs: ${installState.enabledPacks?.length ? installState.enabledPacks.join(', ') : C.gray + 'none' + C.reset}`);
1089
+ const visiblePacks = (installState.enabledPacks || []).filter(p => p !== 'reverse-engineering');
1090
+ log(` Optional packs: ${visiblePacks.length ? visiblePacks.join(', ') : C.gray + 'none' + C.reset}`);
1071
1091
 
1072
1092
  // Summary
1073
1093
  log('');
@@ -1929,7 +1949,8 @@ function cmdStatus() {
1929
1949
  }
1930
1950
 
1931
1951
  log(` ${C.gray}Profile:${C.reset} ${installState.profile}`);
1932
- log(` ${C.gray}Optional packs:${C.reset} ${installState.enabledPacks?.length ? installState.enabledPacks.join(', ') : 'none'}`);
1952
+ const visiblePacksStatus = (installState.enabledPacks || []).filter(p => p !== 'reverse-engineering');
1953
+ log(` ${C.gray}Optional packs:${C.reset} ${visiblePacksStatus.length ? visiblePacksStatus.join(', ') : 'none'}`);
1933
1954
 
1934
1955
  log('');
1935
1956
 
@@ -2241,6 +2262,40 @@ function cmdGreet(args) {
2241
2262
  }
2242
2263
  }
2243
2264
 
2265
+ function cmdGoal(args) {
2266
+ if (args.includes('--help') || args.includes('-h')) {
2267
+ log('');
2268
+ log(`${C.cyan}${C.bold}🎯 awkit goal — Codex Goal Mode Orchestrator${C.reset}`);
2269
+ log('');
2270
+ log('Usage:');
2271
+ log(' awkit goal "<objective>"');
2272
+ log(' awkit goal --status');
2273
+ log(' awkit goal --pause');
2274
+ log(' awkit goal --resume');
2275
+ log(' awkit goal --cancel');
2276
+ log('');
2277
+ return;
2278
+ }
2279
+
2280
+ try {
2281
+ const scriptPath = path.join(__dirname, '..', 'scripts', 'codex-goal.js');
2282
+ const passArgs = [];
2283
+
2284
+ if (args.length > 0 && !args[0].startsWith('-')) {
2285
+ passArgs.push('--prompt', args.join(' '));
2286
+ } else {
2287
+ passArgs.push(...args);
2288
+ }
2289
+
2290
+ const result = spawnSync('node', [scriptPath, ...passArgs], { stdio: 'inherit' });
2291
+ if (result.status !== 0) {
2292
+ process.exit(result.status || 1);
2293
+ }
2294
+ } catch (e) {
2295
+ err('Failed to execute Codex Goal Mode: ' + e.message);
2296
+ }
2297
+ }
2298
+
2244
2299
  function cmdHelp() {
2245
2300
  const line = `${C.gray}${'─'.repeat(56)}${C.reset}`;
2246
2301
  log('');
@@ -2339,6 +2394,16 @@ function cmdHelp() {
2339
2394
  log(` ${C.gray} -t, --timezone <tz>${C.reset} Timezone parameter`);
2340
2395
  log('');
2341
2396
 
2397
+ // Goal Mode
2398
+ log(`${C.bold}🎯 Goal Mode${C.reset}`);
2399
+ log(line);
2400
+ log(` ${C.green}goal${C.reset} <objective> Pursue a high-level goal using Codex Goal Conductor`);
2401
+ log(` ${C.green}goal --status${C.reset} Check active goal status and task progress`);
2402
+ log(` ${C.green}goal --pause${C.reset} Pause active goal execution loop`);
2403
+ log(` ${C.green}goal --resume${C.reset} Resume paused goal execution`);
2404
+ log(` ${C.green}goal --cancel${C.reset} Cancel and reset active goal session`);
2405
+ log('');
2406
+
2342
2407
  // Symphony
2343
2408
  log(`${C.bold}🎶 Symphony${C.reset}`);
2344
2409
  log(line);
@@ -2774,6 +2839,16 @@ function buildProjectIdentity(projectName, projectType, cwd, date) {
2774
2839
  automation: {
2775
2840
  autoQA: true,
2776
2841
  maxSelfCorrectionLoops: 3,
2842
+ multiAgent: {
2843
+ enabled: true,
2844
+ routingMode: 'cost-optimized',
2845
+ audioAlerts: true,
2846
+ runners: {
2847
+ claude: 'claude',
2848
+ codex: 'codex',
2849
+ qwen: 'qwen'
2850
+ }
2851
+ },
2777
2852
  telegram: {
2778
2853
  enabled: true,
2779
2854
  chatId: "",
@@ -3021,6 +3096,16 @@ async function cmdInit(forceFlag = false) {
3021
3096
  currentIdentity.automation = {
3022
3097
  autoQA: true,
3023
3098
  maxSelfCorrectionLoops: 3,
3099
+ multiAgent: {
3100
+ enabled: true,
3101
+ routingMode: 'cost-optimized',
3102
+ audioAlerts: true,
3103
+ runners: {
3104
+ claude: 'claude',
3105
+ codex: 'codex',
3106
+ qwen: 'qwen'
3107
+ }
3108
+ },
3024
3109
  telegram: {
3025
3110
  enabled: true,
3026
3111
  chatId: "",
@@ -3061,6 +3146,33 @@ async function cmdInit(forceFlag = false) {
3061
3146
  currentIdentity.automation.maxSelfCorrectionLoops = 3;
3062
3147
  changed = true;
3063
3148
  }
3149
+ if (!currentIdentity.automation.multiAgent) {
3150
+ currentIdentity.automation.multiAgent = {
3151
+ enabled: true,
3152
+ routingMode: 'cost-optimized',
3153
+ audioAlerts: true,
3154
+ runners: {
3155
+ claude: 'claude',
3156
+ codex: 'codex',
3157
+ qwen: 'qwen'
3158
+ }
3159
+ };
3160
+ changed = true;
3161
+ } else {
3162
+ if (!currentIdentity.automation.multiAgent.runners) {
3163
+ currentIdentity.automation.multiAgent.runners = {
3164
+ claude: 'claude',
3165
+ codex: 'codex',
3166
+ qwen: 'qwen'
3167
+ };
3168
+ changed = true;
3169
+ } else {
3170
+ const runners = currentIdentity.automation.multiAgent.runners;
3171
+ if (!runners.claude) { runners.claude = 'claude'; changed = true; }
3172
+ if (!runners.codex) { runners.codex = 'codex'; changed = true; }
3173
+ if (!runners.qwen) { runners.qwen = 'qwen'; changed = true; }
3174
+ }
3175
+ }
3064
3176
  if (!currentIdentity.automation.obsidian) {
3065
3177
  currentIdentity.automation.obsidian = { enabled: false, path: "", autoSync: false };
3066
3178
  changed = true;
@@ -5150,6 +5262,9 @@ const [, , command, ...args] = process.argv;
5150
5262
  case 'greet':
5151
5263
  cmdGreet(args);
5152
5264
  break;
5265
+ case 'goal':
5266
+ cmdGoal(args);
5267
+ break;
5153
5268
  case 'config-global':
5154
5269
  cmdGlobalConfig(args);
5155
5270
  break;
@@ -16,9 +16,36 @@ function generateCodexAgentsMd(sourcePath, destPath) {
16
16
  console.log(`✅ Codex AGENTS.md generated at: ${destPath}`);
17
17
  }
18
18
 
19
+ /**
20
+ * Recursively copies a skill directory preserving structure.
21
+ */
22
+ function copySkillDir(src, dest) {
23
+ if (!fs.existsSync(src)) return 0;
24
+ fs.mkdirSync(dest, { recursive: true });
25
+
26
+ let count = 0;
27
+ const entries = fs.readdirSync(src, { withFileTypes: true });
28
+
29
+ for (const entry of entries) {
30
+ if (entry.name === '.DS_Store') continue;
31
+ if (entry.name === '__pycache__') continue;
32
+
33
+ const srcPath = path.join(src, entry.name);
34
+ const destPath = path.join(dest, entry.name);
35
+
36
+ if (entry.isDirectory()) {
37
+ count += copySkillDir(srcPath, destPath);
38
+ } else {
39
+ fs.copyFileSync(srcPath, destPath);
40
+ count++;
41
+ }
42
+ }
43
+ return count;
44
+ }
45
+
19
46
  /**
20
47
  * Generates Codex skills directory structure.
21
- * Copies SKILL.md and parses it.
48
+ * Copies the entire skill directory and parses/injects frontmatter to SKILL.md.
22
49
  */
23
50
  function generateCodexSkills(srcDir, destDir, selectedSkills = null) {
24
51
  if (!fs.existsSync(srcDir)) return;
@@ -37,11 +64,13 @@ function generateCodexSkills(srcDir, destDir, selectedSkills = null) {
37
64
  const skillFile = path.join(skillDir, 'SKILL.md');
38
65
  if (fs.existsSync(skillFile)) {
39
66
  const destSkillDir = path.join(destDir, skill);
40
- fs.mkdirSync(destSkillDir, { recursive: true });
67
+
68
+ // Copy the entire directory first
69
+ copySkillDir(skillDir, destSkillDir);
41
70
 
42
71
  const destPath = path.join(destSkillDir, 'SKILL.md');
43
72
 
44
- let content = fs.readFileSync(skillFile, 'utf8');
73
+ let content = fs.readFileSync(destPath, 'utf8');
45
74
 
46
75
  if (content.startsWith('---\n')) {
47
76
  if (!content.match(/^name:/m)) {
@@ -76,7 +105,8 @@ function generateCodexAgents(srcDir, destDir, selectedSkills = null) {
76
105
  'problem-solving-pro',
77
106
  'swiftui-pro',
78
107
  'android-re-analyzer',
79
- 'brainstorm-agent'
108
+ 'brainstorm-agent',
109
+ 'codex-goal'
80
110
  ];
81
111
 
82
112
  let count = 0;
package/core/GEMINI.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # GEMINI.md — Antigravity v12.6
2
2
 
3
- > Rules only. Updated: 2026-06-15
3
+ > Rules only. Updated: 2026-06-23
4
4
 
5
5
  ---
6
6
 
@@ -62,11 +62,12 @@ symphony-orchestrator → awf-session-restore (gitnexus state) → nm-memory-syn
62
62
  - Build: CHỈ dùng `awkit build`. CẤM gọi native (`xcodebuild`, `./gradlew`, `npm run build`).
63
63
  - `automation.build.enabled: false` → DỪNG, báo user. KHÔNG fallback native.
64
64
  - Thêm params qua `--`: `awkit build -- -destination '...'`. Bypass wrapper = VI PHẠM.
65
+ - **Chạy tác vụ nền (Background Tasks)**: Khi chạy các tác vụ nền hoặc tác vụ dài (>30 giây) như Codex CLI, PHẢI chạy qua wrapper `node scripts/exec-progress.js "<command>"` để hiển thị checklist tiến trình trực quan cho người dùng thay vì để trống màn hình.
65
66
 
66
67
  ### 7-Gate System
67
68
  - Triage: TRIVIAL (→ Gate 4 thẳng) | MODERATE (→ G3+4+5) | COMPLEX (→ all gates).
68
69
  - Gates: G1 brainstorm → G1.5 module-spec (COMPLEX+>3mod) → G2 spec-gate → G2.5 visual (skip nếu backend) → G3 symphony-enforcer → G4 execution → G5 verification.
69
- - **Goal Mode Override:** Khi đang ở goal mode (`/goal`, active Codex goal, hoặc user nói rõ "goal mode") → gates là checklist nội bộ, KHÔNG dừng chờ user approval ở G2/G2.5/G4 checkpoints. AI tự chọn best-effort, tự verify, ghi assumption, rồi tiếp tục tới khi goal complete/bị block thật sự. Safety/destructive/security vẫn phải hỏi.
70
+ - **Goal Mode Override (NO-CONFIRM):** Khi đang ở goal mode (`/goal`, active Codex goal, hoặc user nói rõ "goal mode") → gates là checklist nội bộ, KHÔNG dừng chờ user approval ở bất kỳ bước nào (G2/G2.5/G4 checkpoints, prompt audit, style preview, grid configuration, specs approval, v.v.). AI tự động chọn phương án tối ưu (best-effort/recommended default), tự verify, ghi nhận giả định (assumptions) vào logs/walkthrough, rồi tiếp tục cho đến khi goal hoàn thành hoặc bị block thực sự bởi lỗi kỹ thuật/permission. Chỉ dừng lại hỏi ý kiến khi gặp lệnh thực sự nguy hại (destructive) hoặc nhạy cảm bảo mật quy định tại Safety Guardrails.
70
71
  - **Gate 4 Three-Phase:**
71
72
  - Phase A 🏗️ Infrastructure → B 🎨 UI Shell (mock) → C ⚡ Logic (real data).
72
73
  - COMPLEX+UI: 3 phases bắt buộc. MODERATE+UI: A+C gộp, B optional. TRIVIAL: bypass.
@@ -102,8 +103,11 @@ symphony-orchestrator → awf-session-restore (gitnexus state) → nm-memory-syn
102
103
  - Sau khi dùng tool sửa code → KHÔNG in lại code trong chat. Tóm tắt bằng bullets.
103
104
  - Code block trong chat: tối đa 10 dòng. Show diff → dùng `render_diffs()`.
104
105
 
105
- ### Image Generation Efficiency
106
- - Image gen: grid/spritesheet cho batch variants, không gen từng ảnh rời.
106
+ ### Image Generation & Asset Mandates (BẮT BUỘC)
107
+ - **Cấm tự tạo SVG:** CẤM tự sinh, tự tạo hoặc thiết kế mã SVG cho các UI assets, biểu tượng trang trí, hoặc spritesheet (do chất lượng SVG tự tạo không đảm bảo và không bám sát thiết kế). BẮT BUỘC sử dụng Codex CLI để tạo hình ảnh và spritesheet UI.
108
+ - **Sử dụng Skill bắt buộc:** Tuyệt đối sử dụng các skill `generate-gui-assets` và `hatch-pet` theo tài liệu tương ứng tại `/Users/trungkientn/.agents/skills/generate-gui-assets/SKILL.md` và `/Users/trungkientn/.codex/skills/hatch-pet/SKILL.md`.
109
+ - **Thiết kế dùng Grid để tiết kiệm:** Bắt buộc thiết kế các assets (ngoại trừ background) bằng dạng Grid (spritesheet/atlas) để tối ưu chi phí và tài nguyên.
110
+ - **Quy trình Grid & Tự Động Phê Duyệt:** Luôn ưu tiên tạo và kiểm chứng (verify) theo hướng lưới `8x6` trước. Nếu chất lượng quá xấu, tự động giảm dần số lượng item/kích thước grid xuống các cấu hình nhỏ hơn (ví dụ: 8x5, 6x6, 6x5, v.v.) mà KHÔNG cần hỏi ý kiến hoặc bắt user xác nhận lại (kể cả trong Normal hay Goal Mode).
107
111
 
108
112
  ### Proactive UI Asset Generation (MANDATORY)
109
113
  - **Asset Audit:** Trong Gate 2.5 (Visual Design) và Gate 4 Phase B (UI Shell), BẮT BUỘC rà soát mã nguồn/thiết kế để phát hiện các UI assets bị thiếu (nút bấm, panel, icon, pet, egg...).
@@ -112,7 +116,8 @@ symphony-orchestrator → awf-session-restore (gitnexus state) → nm-memory-syn
112
116
  - **Cấu trúc Lệnh:**
113
117
  - Đối với UI assets: `codex exec "Generate GUI asset: [Prompt/Style/Theme] and save it to [path] using the generate-gui-assets skill rules."`
114
118
  - Đối với Pet/Egg assets: `codex exec "Generate pet companion asset: [Pet Type/State] and save it to [path] using the hatch-pet skill rules and grid configuration [grid]."`
115
- - **Chi tiết & Approval:** Tự động thiết lập prompt chi tiết dựa trên Theme của App, tuân thủ tiêu chuẩn Solid Background và hỏi ý kiến user trước khi thực thi lệnh.
119
+ - **Chi tiết & Approval:** Tự động thiết lập prompt chi tiết dựa trên Theme của App, tuân thủ tiêu chuẩn Solid Background và hỏi ý kiến user trước khi thực thi lệnh (Trừ Goal Mode hoặc trường hợp tự động giảm cấu hình lưới grid: Tự động phê duyệt prompt/cấu hình và thực thi lệnh không cần hỏi).
120
+
116
121
 
117
122
 
118
123
  ### Communication (CAVEMAN ULTRA)
@@ -191,5 +196,5 @@ Complete>Shortcuts, Evidence>Assumptions, Standard>Custom, Explicit>Implicit, Te
191
196
  - **Gate skills:** `orchestrator` (triage) → `brainstorm-agent` (G1) → `module-spec-writer` (G1.5) → `spec-gate` (G2) → `visual-design-gate` (G2.5) → `symphony-enforcer` (G3) → `verification-gate` (G5)
192
197
  - **Code intelligence:** `gitnexus-intelligence` (impact analysis, blast radius, safe refactoring)
193
198
  - **Skill catalog:** xem `orchestrator/SKILL.md`
194
- - **Workflows:** 75+ (/xxx). Core: /init /code /debug /recap /next /todo /gitnexus /teach
195
- - **Shortcuts:** `/todo` `/done` `/next`
199
+ - **Workflows:** 75+ (/xxx). Core: /init /code /debug /recap /next /todo /gitnexus /teach /goal
200
+ - **Shortcuts:** `/todo` `/done` `/next` `/goal`
@@ -191,5 +191,5 @@ Complete>Shortcuts, Evidence>Assumptions, Standard>Custom, Explicit>Implicit, Te
191
191
  - **Gate skills:** `orchestrator` (triage) → `brainstorm-agent` (G1) → `module-spec-writer` (G1.5) → `spec-gate` (G2) → `visual-design-gate` (G2.5) → `symphony-enforcer` (G3) → `verification-gate` (G5)
192
192
  - **Code intelligence:** `gitnexus-intelligence` (impact analysis, blast radius, safe refactoring)
193
193
  - **Skill catalog:** xem `orchestrator/SKILL.md`
194
- - **Workflows:** 75+ (/xxx). Core: /init /code /debug /recap /next /todo /gitnexus /teach
195
- - **Shortcuts:** `/todo` `/done` `/next`
194
+ - **Workflows:** 75+ (/xxx). Core: /init /code /debug /recap /next /todo /gitnexus /teach /goal
195
+ - **Shortcuts:** `/todo` `/done` `/next` `/goal`
@@ -15,6 +15,7 @@
15
15
  "brainstorm-agent",
16
16
  "code-review",
17
17
  "codex-conductor",
18
+ "codex-goal",
18
19
  "gemini-conductor",
19
20
  "generate-gui-assets",
20
21
  "gitnexus-intelligence",
@@ -1,58 +1,62 @@
1
- # Add Game Development Skills (Unity, Godot, Expo)
1
+ # Implementation Plan - GreetingApp Feature
2
2
 
3
- Implement dedicated game development skills inside `main-awf/skills` to enhance the orchestrator's capability in building games using Unity, Godot, and Expo.
4
-
5
- ## User Review Required
6
-
7
- > [!NOTE]
8
- > All new skills will be created directly in `skills/` of `main-awf` workspace and then deployed to `~/.gemini/antigravity` via `awkit install`.
9
-
10
- ## Proposed Changes
11
-
12
- ### AWKit Skills
3
+ ## Revision History
4
+ | Version | Date | Description | Author |
5
+ |---|---|---|---|
6
+ | v1.0 | 2026-06-22 | Initial implementation plan for GreetingApp | Antigravity Orchestrator |
13
7
 
14
8
  ---
15
9
 
16
- #### [NEW] [unity-game-development/SKILL.md](file:///Users/trungkientn/Dev/NodeJS/main-awf/skills/unity-game-development/SKILL.md)
17
- Contains high-density instructions for Unity game development, enforcing:
18
- - C# coding style (PascalCase public, camelCase private, `m_` fields prefix).
19
- - Component-based architecture and ScriptableObjects for data-driven game structures.
20
- - Performance optimization: avoiding `Find`/`GetComponent` in hot paths (`Update()`), caching, object pooling.
21
- - Separate Editor code via `#if UNITY_EDITOR`.
22
- - Direct Unity MCP server integration.
23
-
24
- #### [NEW] [godot-game-development/SKILL.md](file:///Users/trungkientn/Dev/NodeJS/main-awf/skills/godot-game-development/SKILL.md)
25
- Contains guidelines for Godot 4.x game development, enforcing:
26
- - Godot 4 API standards (rejecting Godot 3 syntax).
27
- - GDScript style preferences (`@export`, `@onready`, `await` signals).
28
- - Composition-first scene tree structure over deep class inheritance.
29
- - Signal connection best practices (`signal.connect(callback)`).
30
- - Physics and locomotion handling via parameterless `move_and_slide()`.
31
-
32
- #### [NEW] [expo-game-development/SKILL.md](file:///Users/trungkientn/Dev/NodeJS/main-awf/skills/expo-game-development/SKILL.md)
33
- Contains instructions for Expo/React Native game development, covering:
34
- - High-frequency drawing techniques (React Native Skia, Expo GL/Three.js).
35
- - State optimization: keeping physics/game tick loop decoupled from heavy React re-renders.
36
- - User input handling (React Native Gesture Handler).
37
- - Game loop implementations using `requestAnimationFrame`.
38
- - Asset management and sound effects via `expo-av`.
10
+ ## 1. Objectives
11
+ Implement the GreetingApp feature within the `main-awf` workspace, integrating:
12
+ - A shared Greeting Engine at `core/GreetingEngine`.
13
+ - CLI Interface command `awkit greet` in `bin/awk.js`.
14
+ - REST API endpoint `GET /api/greet` in `symphony/app/api/greet/route.js`.
15
+ - Light history logging via JSON Lines at `~/.gemini/antigravity/greeting_history.jsonl` (and local project fallback).
39
16
 
40
17
  ---
41
18
 
42
- #### [MODIFY] [CATALOG.md](file:///Users/trungkientn/Dev/NodeJS/main-awf/skills/CATALOG.md)
43
- Add the three new skills to the active skills table.
44
-
45
- #### [MODIFY] [TRIGGER_INDEX.md](file:///Users/trungkientn/Dev/NodeJS/main-awf/skills/TRIGGER_INDEX.md)
46
- Register keywords and triggers for the new game skills.
19
+ ## 2. Proposed Changes
20
+
21
+ ### Phase A: Core Engine and Locales
22
+ #### 1. Locales Definition
23
+ Create locales JSON files under `core/GreetingEngine/locales/`:
24
+ - `en.json`: English templates.
25
+ - `vi.json`: Vietnamese templates.
26
+ - `ja.json`: Japanese templates.
27
+
28
+ #### 2. Greeting Engine (`core/GreetingEngine/index.js`)
29
+ Create the core processor. It will:
30
+ - Parse `name` (default: "Guest"), `lang` (default: "en"), and `timezone` (default: local).
31
+ - Determine time-of-day period (`morning` 5-11:59, `afternoon` 12-17:59, `evening` 18-21:59, `night` 22-4:59).
32
+ - Load localization strings, format the template by replacing `{name}`, and return the object.
33
+ - Record transactions to `greeting_history.jsonl`.
34
+ - Provide stats functions.
35
+
36
+ ### Phase B: CLI Integration
37
+ #### 1. CLI Commands (`bin/awk.js`)
38
+ - Register the `greet` subcommand in the main switch-case.
39
+ - Parse flags: `--name` / `-n`, `--lang` / `-l`, and `--timezone` / `-t` (or use system timezone).
40
+ - Print the generated greeting and save to the history log.
41
+
42
+ ### Phase C: REST API Integration
43
+ #### 1. API Route Handler (`symphony/app/api/greet/route.js`)
44
+ - Define `GET` handler.
45
+ - Extract `name`, `lang`, and `timezone` query parameters.
46
+ - Call the Greeting Engine.
47
+ - Return structured JSON response following spec.
47
48
 
48
49
  ---
49
50
 
50
- ## Verification Plan
51
+ ## 3. Verification Plan
51
52
 
52
- ### Automated Verification
53
- - Run `awkit status` to inspect mapping diffs.
54
- - Deploy to runtime using `awkit install`.
55
- - Verify CLI integration and syntax using `awkit doctor`.
53
+ ### Automated/Unit Tests
54
+ - Verify engine resolves times and timezones correctly.
55
+ - Verify fallback to `en` on unrecognized language inputs.
56
+ - Verify JSON structure matches specifications.
56
57
 
57
58
  ### Manual Verification
58
- - Ask the user to verify the added skills locally or confirm availability in future workspace tasks.
59
+ - Execute `node bin/awk.js greet --name="Alice" --lang="vi"`.
60
+ - Execute `node bin/awk.js greet --name="Bob" --lang="ja"`.
61
+ - Query Symphony REST API `/api/greet?name=Charlie&lang=en` locally.
62
+ - Inspect the history log at the designated path.
@@ -0,0 +1,87 @@
1
+ # Implementation Plan - Codex Goal Mode Integration
2
+
3
+ ## Revision History
4
+ | Version | Date | Description | Author |
5
+ |---|---|---|---|
6
+ | v1.0 | 2026-06-22 | Initial plan for Codex Goal Mode, skill, and workflow integration | Antigravity Orchestrator |
7
+
8
+ ---
9
+
10
+ ## Goal Description
11
+ Implement a **Goal Mode** (including a new **Skill** and a **Workflow**) that utilizes the Codex goal-execution capabilities for centralized task orchestration. In this mode, Codex serves as the master coordinator (Goal Conductor), partitioning a high-level user goal into subtasks, tracking progress in Symphony, and delegating specific duties back to other specialized agents (Claude, Qwen, Gemini/AGY) or its own independent sub-agents (e.g., critic, coder, tester, ios-engineer) in a collaborative loop.
12
+
13
+ ---
14
+
15
+ ## User Review Required
16
+
17
+ > [!IMPORTANT]
18
+ > **Orchestration Loop Protocol:** Codex Goal Mode runs as a closed-loop execution system. Checkpoints are automatically bypassed when `goal_mode = true` (using best-effort AI verification) except for safety-critical, destructive, or security tasks.
19
+
20
+ ---
21
+
22
+ ## Open Questions
23
+ - Do we want to support persistent background session resume for long-running goals (e.g., using `codex resume --last`)? *(Currently planned to support resume by storing execution states in `codex-reports/goals/`).*
24
+
25
+ ---
26
+
27
+ ## Proposed Changes
28
+
29
+ ### Core Orchestration Layer
30
+
31
+ #### [NEW] [codex-goal.js](file:///Users/trungkientn/Dev/NodeJS/main-awf/scripts/codex-goal.js)
32
+ Create a new script that coordinates the Goal loop:
33
+ 1. Initializes a goal workspace under `codex-reports/goals/<goal_id>/`.
34
+ 2. Sets `goal_mode = true` in the process context.
35
+ 3. Invokes Codex CLI to analyze the initial goal, parse it into subtasks, and map them to appropriate agents.
36
+ 4. Orchestrates task execution:
37
+ - For architecture & specs: Delegates to Claude via `scripts/claude-plan.js`.
38
+ - For coding/refactoring: Delegates to Qwen via `scripts/qwen-exec.js`.
39
+ - For general tasks/fallbacks: Delegates to AGY (Gemini).
40
+ - For reviews, tests, visual QA: Delegates to Codex sub-agents (`critic`, `tester`, `ios-visual-qa-strategist`).
41
+ 5. Tracks states, saves progress reports to `.md` files, and updates Symphony tickets.
42
+
43
+ ---
44
+
45
+ ### Workflows
46
+
47
+ #### [NEW] [goal.md](file:///Users/trungkientn/Dev/NodeJS/main-awf/workflows/lifecycle/goal.md)
48
+ Define the `/goal` workflow containing:
49
+ - Pre-requisites checks for Codex CLI.
50
+ - Workflow subcommands: `/goal "[objective]"`, `/goal:status`, `/goal:resume`, `/goal:pause`, `/goal:cancel`.
51
+ - Detailed description of the autonomous goal execution loop.
52
+ - Fallback policies and recovery steps.
53
+
54
+ ---
55
+
56
+ ### Skills
57
+
58
+ #### [NEW] [SKILL.md](file:///Users/trungkientn/Dev/NodeJS/main-awf/skills/codex-goal/SKILL.md)
59
+ Create a new skill for the Codex Goal Orchestrator defining:
60
+ - Developer instructions for the master Goal Conductor role.
61
+ - Task breakdown schemas and JSON mapping format.
62
+ - Sub-agent specifications (definitions, system prompts, capabilities).
63
+ - Call-back protocols for Claude, Qwen, and AGY.
64
+
65
+ ---
66
+
67
+ ### CLI & Code Integration
68
+
69
+ #### [MODIFY] [awk.js](file:///Users/trungkientn/Dev/NodeJS/main-awf/bin/awk.js)
70
+ 1. Register `goal` in the CLI command list and register the command parser.
71
+ 2. Include the new `/goal` and `/goal-mode` commands in the help usage block.
72
+ 3. Add the `codex-goal` skill folder to the default runtime list, ensuring it gets synced during `awkit install`.
73
+
74
+ #### [MODIFY] [codex-generators.js](file:///Users/trungkientn/Dev/NodeJS/main-awf/bin/codex-generators.js)
75
+ Add `codex-goal` to `SPECIALIST_SKILLS` list so that a Codex-compatible `.toml` agent spec is automatically generated for it.
76
+
77
+ ---
78
+
79
+ ## Verification Plan
80
+
81
+ ### Automated Tests
82
+ - Run `node bin/awk.js doctor` to check installation state.
83
+ - Run `awkit status` to ensure all files are synchronized.
84
+
85
+ ### Manual Verification
86
+ - Execute `node bin/awk.js goal "Build a simple greeting command line tool"` and verify that the orchestration loop initializes the plan, registers tasks, calls Qwen for implementation, and reviews using the critic sub-agent.
87
+ - Verify status checks, pause, and resume capabilities.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leejungkiin/awkit",
3
- "version": "1.7.5",
3
+ "version": "1.7.7",
4
4
  "description": "Antigravity Workflow Kit v1.6 Unified AI agent orchestration system with Mindful Checkpoints.",
5
5
  "main": "bin/awk.js",
6
6
  "private": false,