@leejungkiin/awkit 1.5.5 → 1.6.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/README.md +6 -4
- package/bin/awk.js +196 -8
- package/core/GEMINI.md +24 -8
- package/core/work-modes.json +45 -0
- package/package.json +3 -3
- package/skill-packs/cocos2d/pack.json +8 -0
- package/skill-packs/cocos2d/skills/cocos2d-x/LICENSE.txt +8 -0
- package/skill-packs/cocos2d/skills/cocos2d-x/SKILL.md +168 -0
- package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/action.md +278 -0
- package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/animation.md +220 -0
- package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/event.md +133 -0
- package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/input.md +291 -0
- package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/label.md +184 -0
- package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/node-scene.md +212 -0
- package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/scene.md +228 -0
- package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/sprite.md +206 -0
- package/skill-packs/cocos2d/skills/cocos2d-x/examples/core/texture.md +186 -0
- package/skill-packs/cocos2d/skills/cocos2d-x/examples/getting-started/about-engine.md +53 -0
- package/skill-packs/cocos2d/skills/cocos2d-x/examples/getting-started/installation.md +203 -0
- package/skill-packs/cocos2d/skills/cocos2d-x/examples/getting-started/quick-start.md +134 -0
- package/skill-packs/electron/pack.json +9 -0
- package/skill-packs/electron/skills/electron/LICENSE.txt +202 -0
- package/skill-packs/electron/skills/electron/SKILL.md +160 -0
- package/skill-packs/electron/skills/electron/api/app.md +83 -0
- package/skill-packs/electron/skills/electron/api/browser-window.md +84 -0
- package/skill-packs/electron/skills/electron/examples/advanced/packaging.md +140 -0
- package/skill-packs/electron/skills/electron/examples/api/browser-window.md +182 -0
- package/skill-packs/electron/skills/electron/examples/api/menu.md +187 -0
- package/skill-packs/electron/skills/electron/examples/getting-started/installation.md +88 -0
- package/skill-packs/electron/skills/electron/examples/getting-started/quick-start.md +104 -0
- package/skill-packs/electron/skills/electron/examples/processes/ipc-communication.md +140 -0
- package/skill-packs/electron/skills/electron/examples/processes/main-process.md +121 -0
- package/skill-packs/electron/skills/electron/templates/main-process.md +105 -0
- package/skill-packs/electron/skills/electron/templates/preload-script.md +84 -0
- package/skill-packs/electron/skills/electron-egg/LICENSE.txt +202 -0
- package/skill-packs/electron/skills/electron-egg/SKILL.md +154 -0
- package/skill-packs/electron/skills/electron-egg/api/config-api.md +62 -0
- package/skill-packs/electron/skills/electron-egg/api/ipc-api.md +55 -0
- package/skill-packs/electron/skills/electron-egg/api/main-api.md +54 -0
- package/skill-packs/electron/skills/electron-egg/api/renderer-api.md +62 -0
- package/skill-packs/electron/skills/electron-egg/api/window-api.md +64 -0
- package/skill-packs/electron/skills/electron-egg/examples/features/ipc-communication.md +84 -0
- package/skill-packs/electron/skills/electron-egg/examples/features/main-process.md +89 -0
- package/skill-packs/electron/skills/electron-egg/examples/features/renderer-process.md +74 -0
- package/skill-packs/electron/skills/electron-egg/examples/guide/build.md +77 -0
- package/skill-packs/electron/skills/electron-egg/examples/guide/configuration.md +88 -0
- package/skill-packs/electron/skills/electron-egg/examples/guide/installation.md +66 -0
- package/skill-packs/electron/skills/electron-egg/examples/guide/intro.md +47 -0
- package/skill-packs/electron/skills/electron-egg/examples/guide/project-structure.md +73 -0
- package/skill-packs/electron/skills/electron-egg/examples/guide/quick-start.md +78 -0
- package/skill-packs/electron/skills/electron-egg/templates/configuration.md +63 -0
- package/skill-packs/electron/skills/electron-egg/templates/installation.md +42 -0
- package/skill-packs/electron/skills/electron-egg/templates/project-setup.md +75 -0
- package/skill-packs/flutter/pack.json +9 -0
- package/skill-packs/flutter/skills/flutter/LICENSE.txt +202 -0
- package/skill-packs/flutter/skills/flutter/SKILL.md +127 -0
- package/skill-packs/flutter/skills/flutter-project-creater/LICENSE.txt +202 -0
- package/skill-packs/flutter/skills/flutter-project-creater/SKILL.md +106 -0
- package/skill-packs/threejs/pack.json +25 -0
- package/skill-packs/threejs/skills/README.md +95 -0
- package/skill-packs/threejs/skills/threejs-animation/SKILL.md +86 -0
- package/skill-packs/threejs/skills/threejs-animation/examples/workflow-mixer-action.md +20 -0
- package/skill-packs/threejs/skills/threejs-animation/references/official-sections.md +19 -0
- package/skill-packs/threejs/skills/threejs-audio/SKILL.md +112 -0
- package/skill-packs/threejs/skills/threejs-audio/examples/workflow-positional-audio.md +15 -0
- package/skill-packs/threejs/skills/threejs-audio/references/official-sections.md +16 -0
- package/skill-packs/threejs/skills/threejs-camera/SKILL.md +96 -0
- package/skill-packs/threejs/skills/threejs-camera/examples/workflow-perspective-resize.md +13 -0
- package/skill-packs/threejs/skills/threejs-controls/SKILL.md +101 -0
- package/skill-packs/threejs/skills/threejs-controls/examples/workflow-orbit-damping.md +15 -0
- package/skill-packs/threejs/skills/threejs-dev-setup/SKILL.md +102 -0
- package/skill-packs/threejs/skills/threejs-dev-setup/examples/workflow-scaffold.md +24 -0
- package/skill-packs/threejs/skills/threejs-geometries/SKILL.md +108 -0
- package/skill-packs/threejs/skills/threejs-geometries/examples/workflow-extrude-shape.md +13 -0
- package/skill-packs/threejs/skills/threejs-helpers/SKILL.md +103 -0
- package/skill-packs/threejs/skills/threejs-helpers/examples/workflow-light-camera-helpers.md +13 -0
- package/skill-packs/threejs/skills/threejs-lights/SKILL.md +103 -0
- package/skill-packs/threejs/skills/threejs-lights/examples/workflow-directional-shadow.md +17 -0
- package/skill-packs/threejs/skills/threejs-loaders/SKILL.md +89 -0
- package/skill-packs/threejs/skills/threejs-loaders/examples/workflow-gltf-draco.md +22 -0
- package/skill-packs/threejs/skills/threejs-loaders/references/official-sections.md +27 -0
- package/skill-packs/threejs/skills/threejs-materials/SKILL.md +102 -0
- package/skill-packs/threejs/skills/threejs-materials/examples/workflow-pbr-transparent.md +15 -0
- package/skill-packs/threejs/skills/threejs-math/SKILL.md +102 -0
- package/skill-packs/threejs/skills/threejs-math/examples/workflow-ray-aabb.md +11 -0
- package/skill-packs/threejs/skills/threejs-node-tsl/SKILL.md +83 -0
- package/skill-packs/threejs/skills/threejs-node-tsl/examples/workflow-tsl-entry.md +13 -0
- package/skill-packs/threejs/skills/threejs-node-tsl/references/official-links.md +8 -0
- package/skill-packs/threejs/skills/threejs-node-tsl/references/tsl-vs-classic.md +23 -0
- package/skill-packs/threejs/skills/threejs-objects/SKILL.md +111 -0
- package/skill-packs/threejs/skills/threejs-objects/examples/workflow-raycaster-pick.md +17 -0
- package/skill-packs/threejs/skills/threejs-postprocessing/SKILL.md +116 -0
- package/skill-packs/threejs/skills/threejs-postprocessing/examples/workflow-composer-bloom.md +15 -0
- package/skill-packs/threejs/skills/threejs-renderers/SKILL.md +91 -0
- package/skill-packs/threejs/skills/threejs-renderers/examples/workflow-renderer-resize.md +21 -0
- package/skill-packs/threejs/skills/threejs-renderers/references/official-sections.md +14 -0
- package/skill-packs/threejs/skills/threejs-scenes/SKILL.md +90 -0
- package/skill-packs/threejs/skills/threejs-scenes/examples/workflow-fog-background.md +13 -0
- package/skill-packs/threejs/skills/threejs-textures/SKILL.md +83 -0
- package/skill-packs/threejs/skills/threejs-textures/examples/workflow-pmrem-env.md +19 -0
- package/skill-packs/threejs/skills/threejs-webxr/SKILL.md +104 -0
- package/skill-packs/threejs/skills/threejs-webxr/examples/workflow-xr-button.md +15 -0
- package/skills/CATALOG.md +44 -49
- package/skills/TRIGGER_INDEX.md +30 -0
- package/skills/awf-session-restore/SKILL.md +19 -2
- package/skills/brainstorm-agent/SKILL.md +2 -0
- package/skills/code-review/SKILL.md +2 -0
- package/skills/code-review-system-principles/SKILL.md +154 -0
- package/skills/codex-conductor/SKILL.md +6 -4
- package/skills/gemini-conductor/SKILL.md +4 -3
- package/skills/gitnexus-intelligence/SKILL.md +2 -0
- package/skills/module-spec-writer/SKILL.md +2 -0
- package/skills/nm-memory-sync/SKILL.md +10 -0
- package/skills/skill-creator/SKILL.md +2 -0
- package/skills/spec-gate/SKILL.md +2 -0
- package/skills/symphony-enforcer/SKILL.md +9 -0
- package/skills/symphony-enforcer/examples/mindful-stop.md +141 -0
- package/skills/symphony-enforcer/examples/task-completion.md +11 -2
- package/skills/symphony-enforcer/examples/trigger-points.md +7 -0
- package/skills/symphony-orchestrator/SKILL.md +2 -0
- package/skills/telegram-notify/SKILL.md +1 -0
- package/skills/trello-sync/SKILL.md +7 -0
- package/skills/verification-gate/SKILL.md +2 -0
- package/skills/visual-design-gate/SKILL.md +2 -0
- package/templates/project-identity/android.json +26 -1
- package/templates/project-identity/backend-nestjs.json +26 -1
- package/templates/project-identity/expo.json +26 -1
- package/templates/project-identity/ios.json +26 -1
- package/templates/project-identity/web-nextjs.json +26 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# AWKit — Antigravity Workflow Kit
|
|
1
|
+
# AWKit — Antigravity Workflow Kit v12.5
|
|
2
2
|
|
|
3
|
-
> **
|
|
3
|
+
> **v12.5.0** · Single Source of Truth · Symphony-First · Mindful Execution
|
|
4
4
|
|
|
5
5
|
AWKit là framework điều phối AI agent chuyên nghiệp. Đây là **nơi duy nhất** chứa toàn bộ workflows, skills, GEMINI.md và cấu hình — không còn phân tán giữa nhiều repo.
|
|
6
6
|
|
|
@@ -18,6 +18,7 @@ AWKit (Antigravity v12+) thực thi 8 nguyên tắc lõi (Gstack-inspired) nhằ
|
|
|
18
18
|
6. **Scope Freeze:** Khi debugging: KHÔNG sửa code không liên quan, KHÔNG refactor. Chỉ tập trung root cause.
|
|
19
19
|
7. **Boil-the-Lake Checklist:** Checklist trước khi báo DONE: error handling, edge cases, logging, cleanup, input validation...
|
|
20
20
|
8. **Safety Guardrails:** Chặn auto-run cho các lệnh nguy hiểm (`rm -rf`, `git push --force`, deploy production). Bắt buộc double-confirm.
|
|
21
|
+
9. **Mindful Execution (v12.5+):** Chống AI "brain fry" bằng Iteration Counter (dừng sau 3 lần polish), Scope Guard, và Milestone Rest.
|
|
21
22
|
|
|
22
23
|
---
|
|
23
24
|
|
|
@@ -191,10 +192,10 @@ AWKit (từ bản cập nhật tích hợp mới) sử dụng **GitNexus** làm
|
|
|
191
192
|
|
|
192
193
|
```bash
|
|
193
194
|
# 1. Quét toàn bộ project để tạo knowledge graph (chỉ cần chạy lần đầu hoặc khi cấu trúc code thay đổi lớn)
|
|
194
|
-
npx @
|
|
195
|
+
npx @duytransipher/gitnexus analyze
|
|
195
196
|
|
|
196
197
|
# 2. Setup MCP servers và skills tự động cho Antigravity và các editors khác:
|
|
197
|
-
npx @
|
|
198
|
+
npx @duytransipher/gitnexus setup
|
|
198
199
|
```
|
|
199
200
|
|
|
200
201
|
AI agent của hệ thống cũng tự động gọi qua cổng GitNexus bằng MCP Tools để tự phân tích rủi ro trước khi commit!
|
|
@@ -219,6 +220,7 @@ awkit enable-pack creator-studio
|
|
|
219
220
|
| 6.x | AWF v6 | main-awf, multiple sources |
|
|
220
221
|
| **1.1.x** | **AWKit v1.1.9** | **Single source of truth, Native CLI, Telegram Integration** |
|
|
221
222
|
| **1.5.x** | **AWKit v1.5.0** | **Unified Orchestration, Symphony 1.5.0, 7-Gate Intelligence** |
|
|
223
|
+
| **12.5.x** | **Antigravity v12.5** | **Mindful Checkpoints (TP-ITER, TP-SCOPE, TP-REST), @duytransipher/gitnexus** |
|
|
222
224
|
|
|
223
225
|
---
|
|
224
226
|
|
package/bin/awk.js
CHANGED
|
@@ -38,6 +38,7 @@ const HOME = process.env.HOME || process.env.USERPROFILE;
|
|
|
38
38
|
const { generateClineRules, generateClineWorkflows, generateClineSkills } = require('./cline-generators');
|
|
39
39
|
const { generateCodexAgentsMd, generateCodexSkills, generateCodexAgents } = require('./codex-generators');
|
|
40
40
|
const { generateClaudeRules, generateClaudeSkills } = require('./claude-generators');
|
|
41
|
+
const { cmdGate } = require('../scripts/automation-gate');
|
|
41
42
|
|
|
42
43
|
// ─── Platform Definitions ──────────────────────────────────────────────────
|
|
43
44
|
|
|
@@ -280,7 +281,8 @@ function readInstallState(platform = activePlatform) {
|
|
|
280
281
|
const fallback = {
|
|
281
282
|
version: 1,
|
|
282
283
|
profile: getDefaultSkillProfileName(),
|
|
283
|
-
enabledPacks: []
|
|
284
|
+
enabledPacks: [],
|
|
285
|
+
activeMode: null
|
|
284
286
|
};
|
|
285
287
|
return readJsonFile(getInstallStatePath(platform), fallback) || fallback;
|
|
286
288
|
}
|
|
@@ -725,8 +727,7 @@ function cmdInstall(args = []) {
|
|
|
725
727
|
}
|
|
726
728
|
|
|
727
729
|
writeInstallState({
|
|
728
|
-
|
|
729
|
-
profile: getDefaultSkillProfileName(),
|
|
730
|
+
...previousState,
|
|
730
731
|
enabledPacks: activePacks
|
|
731
732
|
}, platform);
|
|
732
733
|
ok(`Install state saved (${desiredSkills.size} active skills)`);
|
|
@@ -1421,8 +1422,7 @@ function cmdEnablePack(packName, { autoMode = false } = {}) {
|
|
|
1421
1422
|
const enabledPacks = new Set(state.enabledPacks || []);
|
|
1422
1423
|
enabledPacks.add(packName);
|
|
1423
1424
|
writeInstallState({
|
|
1424
|
-
|
|
1425
|
-
profile: getDefaultSkillProfileName(),
|
|
1425
|
+
...state,
|
|
1426
1426
|
enabledPacks: [...enabledPacks].sort()
|
|
1427
1427
|
});
|
|
1428
1428
|
|
|
@@ -1491,14 +1491,146 @@ function cmdDisablePack(packName) {
|
|
|
1491
1491
|
|
|
1492
1492
|
const state = readInstallState();
|
|
1493
1493
|
writeInstallState({
|
|
1494
|
-
|
|
1495
|
-
profile: getDefaultSkillProfileName(),
|
|
1494
|
+
...state,
|
|
1496
1495
|
enabledPacks: (state.enabledPacks || []).filter(name => name !== packName)
|
|
1497
1496
|
});
|
|
1498
1497
|
|
|
1499
1498
|
ok(`Skill pack "${packName}" disabled (skills backed up to ${backupDir})`);
|
|
1500
1499
|
}
|
|
1501
1500
|
|
|
1501
|
+
function loadWorkModes() {
|
|
1502
|
+
const defaultsPath = path.join(AWK_ROOT, 'core', 'work-modes.json');
|
|
1503
|
+
const userPath = path.join(HOME, '.awkit_modes.json');
|
|
1504
|
+
const modes = readJsonFile(defaultsPath, { modes: {} }).modes || {};
|
|
1505
|
+
|
|
1506
|
+
if (fs.existsSync(userPath)) {
|
|
1507
|
+
const userModes = readJsonFile(userPath, { modes: {} }).modes || {};
|
|
1508
|
+
for (const [key, val] of Object.entries(userModes)) {
|
|
1509
|
+
modes[key] = { ...modes[key], ...val };
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
return modes;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
function cmdMode(args = []) {
|
|
1516
|
+
const modes = loadWorkModes();
|
|
1517
|
+
const state = readInstallState();
|
|
1518
|
+
|
|
1519
|
+
if (args.length === 0) {
|
|
1520
|
+
log('');
|
|
1521
|
+
log(`${C.cyan}${C.bold}🔄 AWK Work Modes${C.reset}`);
|
|
1522
|
+
log('');
|
|
1523
|
+
|
|
1524
|
+
const active = state.activeMode;
|
|
1525
|
+
if (active && modes[active]) {
|
|
1526
|
+
log(`Current Mode: ${C.green}${C.bold}${active}${C.reset} - ${modes[active].description}`);
|
|
1527
|
+
} else {
|
|
1528
|
+
log(`Current Mode: ${C.yellow}core-only${C.reset}`);
|
|
1529
|
+
}
|
|
1530
|
+
log('');
|
|
1531
|
+
log(`${C.cyan}Available Modes:${C.reset}`);
|
|
1532
|
+
for (const [modeName, data] of Object.entries(modes)) {
|
|
1533
|
+
if (data.hidden && modeName !== active) continue;
|
|
1534
|
+
const marker = modeName === active ? `${C.green}▶${C.reset}` : ` `;
|
|
1535
|
+
log(` ${marker} ${C.green}${modeName.padEnd(15)}${C.reset} ${C.gray}${data.description}${C.reset}`);
|
|
1536
|
+
}
|
|
1537
|
+
log('');
|
|
1538
|
+
log(`${C.cyan}Commands:${C.reset}`);
|
|
1539
|
+
log(` awkit mode <name> Switch to a mode`);
|
|
1540
|
+
log(` awkit mode --create <name> <pack1,pack2,...>`);
|
|
1541
|
+
log(` awkit mode --delete <name>`);
|
|
1542
|
+
log(` awkit mode --reset Back to core-only`);
|
|
1543
|
+
log('');
|
|
1544
|
+
return;
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
const subCmd = args[0];
|
|
1548
|
+
|
|
1549
|
+
if (subCmd === '--reset') {
|
|
1550
|
+
if (!state.activeMode) {
|
|
1551
|
+
info(`Already in core-only mode.`);
|
|
1552
|
+
return;
|
|
1553
|
+
}
|
|
1554
|
+
const activePacks = modes[state.activeMode]?.packs || [];
|
|
1555
|
+
for (const p of activePacks) cmdDisablePack(p);
|
|
1556
|
+
|
|
1557
|
+
state.activeMode = null;
|
|
1558
|
+
writeInstallState(state);
|
|
1559
|
+
ok(`Disabled mode packs. Back to core-only.`);
|
|
1560
|
+
return;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
if (subCmd === '--create') {
|
|
1564
|
+
const name = args[1];
|
|
1565
|
+
const packsList = args[2];
|
|
1566
|
+
if (!name || !packsList) {
|
|
1567
|
+
err(`Usage: awkit mode --create <name> <pack1,pack2,...>`);
|
|
1568
|
+
return;
|
|
1569
|
+
}
|
|
1570
|
+
const packs = packsList.split(',').map(s => s.trim()).filter(Boolean);
|
|
1571
|
+
const userPath = path.join(HOME, '.awkit_modes.json');
|
|
1572
|
+
const userConfig = readJsonFile(userPath, { version: 1, modes: {} }) || { version: 1, modes: {} };
|
|
1573
|
+
if (!userConfig.modes) userConfig.modes = {};
|
|
1574
|
+
userConfig.modes[name] = {
|
|
1575
|
+
description: "Custom user mode",
|
|
1576
|
+
packs
|
|
1577
|
+
};
|
|
1578
|
+
fs.writeFileSync(userPath, JSON.stringify(userConfig, null, 2));
|
|
1579
|
+
ok(`Created custom mode: ${name} with packs: ${packs.join(', ')}`);
|
|
1580
|
+
return;
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
if (subCmd === '--delete') {
|
|
1584
|
+
const name = args[1];
|
|
1585
|
+
const userPath = path.join(HOME, '.awkit_modes.json');
|
|
1586
|
+
if (fs.existsSync(userPath)) {
|
|
1587
|
+
const userConfig = readJsonFile(userPath, { version: 1, modes: {} });
|
|
1588
|
+
if (userConfig?.modes?.[name]) {
|
|
1589
|
+
delete userConfig.modes[name];
|
|
1590
|
+
fs.writeFileSync(userPath, JSON.stringify(userConfig, null, 2));
|
|
1591
|
+
ok(`Deleted custom mode: ${name}`);
|
|
1592
|
+
} else {
|
|
1593
|
+
err(`Mode '${name}' not found in user configs.`);
|
|
1594
|
+
}
|
|
1595
|
+
} else {
|
|
1596
|
+
err(`No user modes config found.`);
|
|
1597
|
+
}
|
|
1598
|
+
return;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
// Switch mode
|
|
1602
|
+
const modeName = subCmd;
|
|
1603
|
+
if (!modes[modeName]) {
|
|
1604
|
+
err(`Work mode '${modeName}' not found.`);
|
|
1605
|
+
return;
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
info(`Switching to mode: ${modeName}`);
|
|
1609
|
+
|
|
1610
|
+
const currentActive = state.activeMode;
|
|
1611
|
+
if (currentActive && currentActive !== modeName && modes[currentActive]) {
|
|
1612
|
+
const oldPacks = modes[currentActive].packs || [];
|
|
1613
|
+
// Disable packs that are not in the new mode to avoid toggling what we want to keep
|
|
1614
|
+
const newPacksSet = new Set(modes[modeName].packs || []);
|
|
1615
|
+
for (const p of oldPacks) {
|
|
1616
|
+
if (!newPacksSet.has(p)) {
|
|
1617
|
+
cmdDisablePack(p);
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
const newPacks = modes[modeName].packs || [];
|
|
1623
|
+
for (const p of newPacks) {
|
|
1624
|
+
cmdEnablePack(p, { autoMode: true });
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
const freshState = readInstallState();
|
|
1628
|
+
freshState.activeMode = modeName;
|
|
1629
|
+
writeInstallState(freshState);
|
|
1630
|
+
|
|
1631
|
+
ok(`Successfully switched to mode: ${C.bold}${modeName}${C.reset}`);
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1502
1634
|
function cmdListPacks() {
|
|
1503
1635
|
const packsDir = path.join(AWK_ROOT, 'skill-packs');
|
|
1504
1636
|
|
|
@@ -1888,8 +2020,10 @@ function cmdHelp() {
|
|
|
1888
2020
|
log('');
|
|
1889
2021
|
|
|
1890
2022
|
// Packs
|
|
1891
|
-
log(`${C.bold}📦 Skill Packs${C.reset}`);
|
|
2023
|
+
log(`${C.bold}📦 Skill Packs & Modes${C.reset}`);
|
|
1892
2024
|
log(line);
|
|
2025
|
+
log(` ${C.green}mode${C.reset} Show active mode & list modes`);
|
|
2026
|
+
log(` ${C.green}mode <name>${C.reset} Switch to a work mode`);
|
|
1893
2027
|
log(` ${C.green}list-packs${C.reset} List available skill packs`);
|
|
1894
2028
|
log(` ${C.green}enable-pack${C.reset} <name> Install a skill pack`);
|
|
1895
2029
|
log(` ${C.green}disable-pack${C.reset} <name> Uninstall a skill pack (backed up)`);
|
|
@@ -2354,6 +2488,32 @@ async function cmdInit(forceFlag = false) {
|
|
|
2354
2488
|
} catch (_) { /* ignore */ }
|
|
2355
2489
|
}
|
|
2356
2490
|
|
|
2491
|
+
// ── 3.6. Automation config migration ─────────────────────────────────────────
|
|
2492
|
+
try {
|
|
2493
|
+
const currentIdentity = JSON.parse(fs.readFileSync(identityPath, 'utf8'));
|
|
2494
|
+
if (!currentIdentity.automation) {
|
|
2495
|
+
currentIdentity.automation = {
|
|
2496
|
+
telegram: {
|
|
2497
|
+
enabled: true,
|
|
2498
|
+
chatId: "",
|
|
2499
|
+
topicId: "",
|
|
2500
|
+
triggers: { git_push: true, task_complete: false, deploy: true }
|
|
2501
|
+
},
|
|
2502
|
+
trello: {
|
|
2503
|
+
enabled: true,
|
|
2504
|
+
autoSync: true,
|
|
2505
|
+
triggers: { task_complete: true, milestone: true, blocked: true }
|
|
2506
|
+
},
|
|
2507
|
+
git: {
|
|
2508
|
+
autoCommit: true,
|
|
2509
|
+
autoPush: true
|
|
2510
|
+
}
|
|
2511
|
+
};
|
|
2512
|
+
fs.writeFileSync(identityPath, JSON.stringify(currentIdentity, null, 2) + '\n');
|
|
2513
|
+
ok('Added Automation config placeholder to .project-identity');
|
|
2514
|
+
}
|
|
2515
|
+
} catch (_) { /* ignore */ }
|
|
2516
|
+
|
|
2357
2517
|
const trelloCred = trelloLoadCredentials();
|
|
2358
2518
|
if (!trelloCred) {
|
|
2359
2519
|
log('');
|
|
@@ -2700,6 +2860,28 @@ function tgSend(args) {
|
|
|
2700
2860
|
let chatId = config.default_chat_id;
|
|
2701
2861
|
let topicId = config.default_topic_id || null;
|
|
2702
2862
|
let parseMode = null;
|
|
2863
|
+
|
|
2864
|
+
// Apply .project-identity automation overrides
|
|
2865
|
+
const pjPath = path.join(process.cwd(), '.project-identity');
|
|
2866
|
+
if (fs.existsSync(pjPath)) {
|
|
2867
|
+
try {
|
|
2868
|
+
const pj = JSON.parse(fs.readFileSync(pjPath, 'utf8'));
|
|
2869
|
+
if (pj?.automation?.telegram) {
|
|
2870
|
+
const tgAuto = pj.automation.telegram;
|
|
2871
|
+
if (tgAuto.enabled === false) {
|
|
2872
|
+
dim('Telegram notifications are disabled for this project (.project-identity).');
|
|
2873
|
+
return;
|
|
2874
|
+
}
|
|
2875
|
+
if (tgAuto.chatId) {
|
|
2876
|
+
chatId = tgAuto.chatId;
|
|
2877
|
+
// Reset topicId when chatId is overridden — global topicId belongs to global chatId
|
|
2878
|
+
topicId = null;
|
|
2879
|
+
}
|
|
2880
|
+
if (tgAuto.topicId && parseInt(tgAuto.topicId, 10) > 1) topicId = tgAuto.topicId;
|
|
2881
|
+
}
|
|
2882
|
+
} catch (e) { }
|
|
2883
|
+
}
|
|
2884
|
+
|
|
2703
2885
|
const messageParts = [];
|
|
2704
2886
|
|
|
2705
2887
|
for (let i = 0; i < args.length; i++) {
|
|
@@ -3329,6 +3511,9 @@ const [, , command, ...args] = process.argv;
|
|
|
3329
3511
|
case 'browser':
|
|
3330
3512
|
cmdBrowser(args);
|
|
3331
3513
|
break;
|
|
3514
|
+
case 'mode':
|
|
3515
|
+
cmdMode(args);
|
|
3516
|
+
break;
|
|
3332
3517
|
case 'enable-pack':
|
|
3333
3518
|
cmdEnablePack(args[0]);
|
|
3334
3519
|
break;
|
|
@@ -3360,6 +3545,9 @@ const [, , command, ...args] = process.argv;
|
|
|
3360
3545
|
case 'serve':
|
|
3361
3546
|
cmdServe(args);
|
|
3362
3547
|
break;
|
|
3548
|
+
case 'gate':
|
|
3549
|
+
cmdGate(args);
|
|
3550
|
+
break;
|
|
3363
3551
|
case 'admin':
|
|
3364
3552
|
cmdAdmin();
|
|
3365
3553
|
break;
|
package/core/GEMINI.md
CHANGED
|
@@ -49,14 +49,23 @@ Mỗi skill tự xử lý gate logic riêng — xem SKILL.md của từng skill.
|
|
|
49
49
|
- AI models: Gemini 2.5+ only.
|
|
50
50
|
- Firebase: Firebase AI Logic SDK.
|
|
51
51
|
|
|
52
|
-
###
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
- `git
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
52
|
+
### Automation Gate (BẮT BUỘC)
|
|
53
|
+
- AI **PHẢI** dùng `awkit gate` thay vì gọi trực tiếp `git commit/push`, `awkit trello`, `awkit tg send`.
|
|
54
|
+
- `awkit gate` tự đọc `.project-identity` → enforce `automation.*` config → execute hoặc block.
|
|
55
|
+
- **Git:**
|
|
56
|
+
- `awkit gate git auto "message"` — commit + push + telegram notify (nếu enabled).
|
|
57
|
+
- `awkit gate git commit "message"` — chỉ commit.
|
|
58
|
+
- `awkit gate git push` — chỉ push.
|
|
59
|
+
- Commit message: conventional format (`fix:`, `feat:`, `refactor:`, `chore:`).
|
|
60
|
+
- Push fail → auto-retry 1 lần với `git pull --rebase`. Cấm force push.
|
|
61
|
+
- **Trello:**
|
|
62
|
+
- `awkit gate trello complete "Task"` — gated trello complete.
|
|
63
|
+
- `awkit gate trello comment "Note"` — gated trello comment.
|
|
64
|
+
- `awkit gate trello block "Reason"` — gated trello block.
|
|
65
|
+
- **Telegram:**
|
|
66
|
+
- `awkit gate telegram send "Message"` — gated telegram send.
|
|
67
|
+
- **Dry-run:** `awkit gate check` — hiển thị trạng thái gate hiện tại (không execute).
|
|
68
|
+
- ⛔ Gọi `git commit/push` hoặc `awkit trello/tg` trực tiếp (bypass gate) = **VI PHẠM**.
|
|
60
69
|
|
|
61
70
|
### 7-Gate Autonomous System (v12.3)
|
|
62
71
|
- orchestrator PHẢI triage complexity (TRIVIAL/MODERATE/COMPLEX) trước mọi task.
|
|
@@ -124,6 +133,13 @@ Mỗi skill tự xử lý gate logic riêng — xem SKILL.md của từng skill.
|
|
|
124
133
|
- Double-confirm với user trước khi chạy destructive command.
|
|
125
134
|
- Nếu không chắc command có destructive hay không → hỏi trước.
|
|
126
135
|
|
|
136
|
+
### Trello Auto-Sync (Per-Project Automation)
|
|
137
|
+
- Nếu `.project-identity` có `automation.trello.autoSync: true` → AI **PHẢI** tự động kích hoạt Trello tại các trigger:
|
|
138
|
+
- Task complete → `awkit trello complete "<tên>"` + comment progress.
|
|
139
|
+
- Milestone (gate transition, 40/60/80%) → `awkit trello comment`.
|
|
140
|
+
- Blocked → `awkit trello block`.
|
|
141
|
+
- Nếu `autoSync: false` hoặc không có config → chỉ sync khi user yêu cầu rõ ràng.
|
|
142
|
+
|
|
127
143
|
### 6 Decision Principles (Auto-decide)
|
|
128
144
|
Khi AI cần tự quyết định mà không hỏi user:
|
|
129
145
|
1. **Complete > Shortcuts** — Implement đủ, không bỏ edge cases.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"modes": {
|
|
4
|
+
"mobile": {
|
|
5
|
+
"description": "Mobile app development (iOS, Android, Flutter)",
|
|
6
|
+
"packs": [
|
|
7
|
+
"mobile-ios",
|
|
8
|
+
"mobile-android",
|
|
9
|
+
"flutter"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"ads": {
|
|
13
|
+
"description": "Monetization & ads optimization",
|
|
14
|
+
"packs": [
|
|
15
|
+
"ads-management"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"marketing": {
|
|
19
|
+
"description": "ASO, UA, app marketing",
|
|
20
|
+
"packs": [
|
|
21
|
+
"marketing"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"web": {
|
|
25
|
+
"description": "Web & desktop app development",
|
|
26
|
+
"packs": [
|
|
27
|
+
"electron"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"game": {
|
|
31
|
+
"description": "Game & 3D development",
|
|
32
|
+
"packs": [
|
|
33
|
+
"cocos2d",
|
|
34
|
+
"threejs"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"mod": {
|
|
38
|
+
"description": "Reverse engineering & modding",
|
|
39
|
+
"packs": [
|
|
40
|
+
"reverse-engineering"
|
|
41
|
+
],
|
|
42
|
+
"hidden": true
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leejungkiin/awkit",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Antigravity Workflow Kit. Unified AI agent orchestration system.",
|
|
3
|
+
"version": "1.6.0",
|
|
4
|
+
"description": "Antigravity Workflow Kit v12.5. Unified AI agent orchestration system with Mindful Checkpoints.",
|
|
5
5
|
"main": "bin/awk.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"awkit": "bin/awk.js",
|
|
@@ -38,6 +38,6 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@leejungkiin/awkit-symphony": "^1.5.0",
|
|
41
|
-
"@
|
|
41
|
+
"@duytransipher/gitnexus": "latest"
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
This skill is based on the official Cocos2d-x v4 documentation.
|
|
2
|
+
|
|
3
|
+
Official Documentation: https://docs.cocos.com/cocos2d-x/v4/manual/zh/
|
|
4
|
+
|
|
5
|
+
Cocos2d-x is licensed under the MIT License.
|
|
6
|
+
|
|
7
|
+
For complete license terms, please refer to:
|
|
8
|
+
https://github.com/cocos2d/cocos2d-x/blob/v4/LICENSE
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cocos2d-x
|
|
3
|
+
description: "Provides comprehensive guidance for Cocos2d-x v4 game engine including scene graph, nodes, sprites, actions, animations, physics, rendering, shaders, and platform deployment. Use when the user asks about Cocos2d-x, needs to create games, implement game features, set up development environments, or deploy games to multiple platforms."
|
|
4
|
+
license: Complete terms in LICENSE.txt
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## When to use this skill
|
|
8
|
+
|
|
9
|
+
Use this skill whenever the user wants to:
|
|
10
|
+
- Create Cocos2d-x v4 games or applications
|
|
11
|
+
- Learn Cocos2d-x v4 core concepts (Node, Sprite, Scene, Action)
|
|
12
|
+
- Set up Cocos2d-x v4 development environment
|
|
13
|
+
- Work with sprites, textures, animations, and labels
|
|
14
|
+
- Implement scene management and node lifecycle
|
|
15
|
+
- Handle input events (touch, mouse, keyboard)
|
|
16
|
+
- Use physics engine (Box2D) and collision detection
|
|
17
|
+
- Implement rendering pipeline, shaders, and particle systems
|
|
18
|
+
- Build and deploy games for multiple platforms (Windows, macOS, Linux, Android, iOS)
|
|
19
|
+
- Use CMake build system and command-line tools
|
|
20
|
+
- Migrate from older Cocos2d-x versions
|
|
21
|
+
- Extend engine with custom rendering and script bindings
|
|
22
|
+
|
|
23
|
+
## How to use this skill
|
|
24
|
+
|
|
25
|
+
To work with Cocos2d-x v4:
|
|
26
|
+
|
|
27
|
+
1. **Identify the topic** from the user's request:
|
|
28
|
+
- Engine overview/了解引擎 → `examples/getting-started/about-engine.md`
|
|
29
|
+
- Quick start/快速上手 → `examples/getting-started/quick-start.md`
|
|
30
|
+
- Installation/安装配置 → `examples/getting-started/installation.md`
|
|
31
|
+
- Node and Scene/节点和场景 → `examples/core/node-scene.md`
|
|
32
|
+
- Sprite/精灵 → `examples/core/sprite.md`
|
|
33
|
+
- Texture/纹理 → `examples/core/texture.md`
|
|
34
|
+
- Animation/动画 → `examples/core/animation.md`
|
|
35
|
+
- Action/动作 → `examples/core/action.md`
|
|
36
|
+
- Label/标签 → `examples/core/label.md`
|
|
37
|
+
- Scene management/场景管理 → `examples/core/scene.md`
|
|
38
|
+
- Input handling/输入处理 → `examples/core/input.md`
|
|
39
|
+
- Event system/事件系统 → `examples/core/event.md`
|
|
40
|
+
- Physics/物理引擎 → `examples/advanced/physics.md`
|
|
41
|
+
- Rendering/渲染 → `examples/advanced/rendering.md`
|
|
42
|
+
- Shaders/着色器 → `examples/advanced/shader.md`
|
|
43
|
+
- Particle system/粒子系统 → `examples/advanced/particle.md`
|
|
44
|
+
- Build system/构建系统 → `examples/tools/build-system.md`
|
|
45
|
+
- Platform deployment/平台部署 → `examples/tools/deployment.md`
|
|
46
|
+
|
|
47
|
+
2. **Load the appropriate example file** from the `examples/` directory:
|
|
48
|
+
- `examples/getting-started/about-engine.md` - Engine overview and features
|
|
49
|
+
- `examples/getting-started/quick-start.md` - Create first project
|
|
50
|
+
- `examples/getting-started/installation.md` - Environment setup
|
|
51
|
+
- `examples/core/node-scene.md` - Node and Scene concepts
|
|
52
|
+
- `examples/core/sprite.md` - Sprite creation and manipulation
|
|
53
|
+
- `examples/core/texture.md` - Texture loading and management
|
|
54
|
+
- `examples/core/animation.md` - Animation system
|
|
55
|
+
- `examples/core/action.md` - Action system and sequences
|
|
56
|
+
- `examples/core/label.md` - Label and text rendering
|
|
57
|
+
- `examples/core/scene.md` - Scene management and transitions
|
|
58
|
+
- `examples/core/input.md` - Touch, mouse, and keyboard input
|
|
59
|
+
- `examples/core/event.md` - Event system and listeners
|
|
60
|
+
- `examples/advanced/physics.md` - Physics engine integration
|
|
61
|
+
- `examples/advanced/rendering.md` - Rendering pipeline
|
|
62
|
+
- `examples/advanced/shader.md` - Custom shaders
|
|
63
|
+
- `examples/advanced/particle.md` - Particle effects
|
|
64
|
+
- `examples/tools/build-system.md` - CMake and build configuration
|
|
65
|
+
- `examples/tools/deployment.md` - Platform-specific deployment
|
|
66
|
+
|
|
67
|
+
3. **Follow the specific instructions** in that example file for syntax, structure, and best practices
|
|
68
|
+
|
|
69
|
+
Each example file contains:
|
|
70
|
+
- **Instructions**: Overview and usage guidelines
|
|
71
|
+
- **Syntax**: API syntax and parameters
|
|
72
|
+
- **Examples**: Complete code examples with explanations
|
|
73
|
+
- **Reference**: Links to official documentation
|
|
74
|
+
|
|
75
|
+
4. **Generate C++ code** following Cocos2d-x v4 conventions:
|
|
76
|
+
- Use `USING_NS_CC;` for namespace
|
|
77
|
+
- Use `CREATE_FUNC()` macro for create functions
|
|
78
|
+
- Follow Cocos2d-x naming conventions
|
|
79
|
+
- Include proper error handling
|
|
80
|
+
- Use smart pointers where appropriate
|
|
81
|
+
|
|
82
|
+
5. **Reference the official documentation**:
|
|
83
|
+
- Official manual: https://docs.cocos.com/cocos2d-x/v4/manual/zh/
|
|
84
|
+
- API reference: Check `api/` directory for detailed API documentation
|
|
85
|
+
- Examples: Check `examples/` directory for code examples
|
|
86
|
+
|
|
87
|
+
6. **Use templates** when creating new projects:
|
|
88
|
+
- `templates/project-structure.md` - Standard project structure
|
|
89
|
+
- `templates/cmake-config.md` - CMake configuration examples
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
### Doc mapping (one-to-one with official documentation)
|
|
93
|
+
|
|
94
|
+
- See examples and API files → https://docs.cocos.com/cocos2d-x/v4/manual/zh/
|
|
95
|
+
|
|
96
|
+
## Core Concepts
|
|
97
|
+
|
|
98
|
+
### Node System
|
|
99
|
+
- **Node**: Base class for all display objects
|
|
100
|
+
- **Scene**: Root node of the scene graph
|
|
101
|
+
- **Sprite**: Image display node
|
|
102
|
+
- **Label**: Text display node
|
|
103
|
+
- **Node hierarchy**: Parent-child relationships
|
|
104
|
+
|
|
105
|
+
### Coordinate System
|
|
106
|
+
- Origin at bottom-left (OpenGL style)
|
|
107
|
+
- Anchor point for positioning
|
|
108
|
+
- Local and world coordinates
|
|
109
|
+
|
|
110
|
+
### Action System
|
|
111
|
+
- **Action**: Base class for node transformations
|
|
112
|
+
- **Sequence**: Chain multiple actions
|
|
113
|
+
- **Spawn**: Run actions simultaneously
|
|
114
|
+
- **Repeat**: Repeat actions multiple times
|
|
115
|
+
- **Ease**: Apply easing functions
|
|
116
|
+
|
|
117
|
+
### Scene Management
|
|
118
|
+
- Scene transitions
|
|
119
|
+
- Scene lifecycle (onEnter, onExit)
|
|
120
|
+
- Director for scene management
|
|
121
|
+
|
|
122
|
+
### Input Handling
|
|
123
|
+
- Touch events (single and multi-touch)
|
|
124
|
+
- Mouse events
|
|
125
|
+
- Keyboard events
|
|
126
|
+
- Event dispatcher system
|
|
127
|
+
|
|
128
|
+
## Platform Support
|
|
129
|
+
|
|
130
|
+
Cocos2d-x v4 supports:
|
|
131
|
+
- **Desktop**: Windows, macOS, Linux
|
|
132
|
+
- **Mobile**: Android, iOS
|
|
133
|
+
- **Web**: (via Cocos Creator)
|
|
134
|
+
|
|
135
|
+
## Build System
|
|
136
|
+
|
|
137
|
+
- **CMake**: Primary build system
|
|
138
|
+
- **Command-line tools**: `cocos` command
|
|
139
|
+
- **IDE support**: Visual Studio, Xcode, Android Studio
|
|
140
|
+
|
|
141
|
+
## Migration Guide
|
|
142
|
+
|
|
143
|
+
For migrating from older versions:
|
|
144
|
+
- Check `examples/migration/` for migration guides
|
|
145
|
+
- API changes and compatibility notes
|
|
146
|
+
- CMake migration from older build systems
|
|
147
|
+
|
|
148
|
+
## Reference Resources
|
|
149
|
+
|
|
150
|
+
- **Official Documentation**: https://docs.cocos.com/cocos2d-x/v4/manual/zh/
|
|
151
|
+
- **API Reference**: See `api/` directory
|
|
152
|
+
- **Examples**: See `examples/` directory
|
|
153
|
+
- **Templates**: See `templates/` directory
|
|
154
|
+
|
|
155
|
+
## Keywords
|
|
156
|
+
|
|
157
|
+
cocos2d-x, cocos2d, game engine, game development, C++ game, 2D game, cross-platform game, sprite, scene, node, action, animation, physics, rendering, shader, particle system, CMake, game framework, 游戏引擎, 游戏开发, 精灵, 场景, 节点, 动作, 动画, 物理引擎, 渲染, 着色器, 粒子系统
|
|
158
|
+
|
|
159
|
+
## Important Notes
|
|
160
|
+
|
|
161
|
+
1. **Version**: This skill covers Cocos2d-x v4 specifically
|
|
162
|
+
2. **Language**: C++ is the primary development language
|
|
163
|
+
3. **Build System**: CMake is required for building projects
|
|
164
|
+
4. **Platform**: Ensure platform-specific dependencies are installed
|
|
165
|
+
5. **Examples**: All code examples use C++ syntax
|
|
166
|
+
6. **Memory Management**: Cocos2d-x uses reference counting, be careful with retain/release cycles
|
|
167
|
+
7. **Coordinate System**: Uses OpenGL-style coordinates (origin at bottom-left)
|
|
168
|
+
8. **Thread Safety**: Most Cocos2d-x operations must be performed on the main thread
|