@leejungkiin/awkit 1.3.8 → 1.4.2
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 +630 -52
- package/bin/claude-generators.js +122 -0
- package/core/AGENTS.md +54 -0
- package/core/CLAUDE.md +155 -0
- package/core/GEMINI.md +44 -9
- package/core/GEMINI.md.bak +126 -199
- package/package.json +1 -1
- package/skills/ai-sprite-maker/SKILL.md +81 -0
- package/skills/ai-sprite-maker/scripts/animate_sprite.py +102 -0
- package/skills/ai-sprite-maker/scripts/process_sprites.py +140 -0
- package/skills/awf-session-restore/SKILL.md +12 -2
- package/skills/brainstorm-agent/SKILL.md +11 -8
- package/skills/code-review/SKILL.md +21 -33
- package/skills/gitnexus/gitnexus-cli/SKILL.md +82 -0
- package/skills/gitnexus/gitnexus-debugging/SKILL.md +89 -0
- package/skills/gitnexus/gitnexus-exploring/SKILL.md +78 -0
- package/skills/gitnexus/gitnexus-guide/SKILL.md +64 -0
- package/skills/gitnexus/gitnexus-impact-analysis/SKILL.md +97 -0
- package/skills/gitnexus/gitnexus-refactoring/SKILL.md +121 -0
- package/skills/lucylab-tts/SKILL.md +64 -0
- package/skills/lucylab-tts/resources/voices_library.json +908 -0
- package/skills/lucylab-tts/scripts/.env +1 -0
- package/skills/lucylab-tts/scripts/lucylab_tts.py +506 -0
- package/skills/nm-memory-sync/SKILL.md +14 -1
- package/skills/orchestrator/SKILL.md +5 -38
- package/skills/ship-to-code/SKILL.md +115 -0
- package/skills/short-maker/SKILL.md +150 -0
- package/skills/short-maker/_backup/storyboard.html +106 -0
- package/skills/short-maker/_backup/video_mixer.py +296 -0
- package/skills/short-maker/outputs/fitbite-promo/background.jpg +0 -0
- package/skills/short-maker/outputs/fitbite-promo/final/promo-final.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/script.md +19 -0
- package/skills/short-maker/outputs/fitbite-promo/segments/scene-01.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/segments/scene-02.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/segments/scene-03.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/segments/scene-04.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/storyboard/scene-01.png +0 -0
- package/skills/short-maker/outputs/fitbite-promo/storyboard/scene-02.png +0 -0
- package/skills/short-maker/outputs/fitbite-promo/storyboard/scene-03.png +0 -0
- package/skills/short-maker/outputs/fitbite-promo/storyboard/scene-04.png +0 -0
- package/skills/short-maker/outputs/fitbite-promo/storyboard.html +133 -0
- package/skills/short-maker/outputs/fitbite-promo/storyboard.json +38 -0
- package/skills/short-maker/outputs/fitbite-promo/temp/merged_chroma.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/temp/merged_crossfaded.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/temp/ready_00.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/temp/ready_01.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/temp/ready_02.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/temp/ready_03.mp4 +0 -0
- package/skills/short-maker/outputs/fitbite-promo/tts/manifest.json +31 -0
- package/skills/short-maker/outputs/fitbite-promo/tts/scene-01.wav +0 -0
- package/skills/short-maker/outputs/fitbite-promo/tts/scene-02.wav +0 -0
- package/skills/short-maker/outputs/fitbite-promo/tts/scene-03.wav +0 -0
- package/skills/short-maker/outputs/fitbite-promo/tts/scene-04.wav +0 -0
- package/skills/short-maker/outputs/fitbite-promo/tts_script.txt +11 -0
- package/skills/short-maker/scripts/google-flow-cli/.project-identity +41 -0
- package/skills/short-maker/scripts/google-flow-cli/.trae/rules/project_rules.md +52 -0
- package/skills/short-maker/scripts/google-flow-cli/CODEBASE.md +67 -0
- package/skills/short-maker/scripts/google-flow-cli/GoogleFlowCli.code-workspace +29 -0
- package/skills/short-maker/scripts/google-flow-cli/README.md +168 -0
- package/skills/short-maker/scripts/google-flow-cli/docs/specs/PROJECT.md +12 -0
- package/skills/short-maker/scripts/google-flow-cli/docs/specs/REQUIREMENTS.md +22 -0
- package/skills/short-maker/scripts/google-flow-cli/docs/specs/ROADMAP.md +16 -0
- package/skills/short-maker/scripts/google-flow-cli/docs/specs/TECH-SPEC.md +13 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/__init__.py +3 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/api/__init__.py +19 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/api/client.py +1921 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/api/models.py +64 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/api/rpc_ids.py +98 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/auth/__init__.py +15 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/auth/browser_auth.py +692 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/auth/humanizer.py +417 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/auth/proxy_ext.py +120 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/auth/recaptcha.py +482 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/batchexecute/__init__.py +5 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/batchexecute/client.py +414 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/cli/__init__.py +1 -0
- package/skills/short-maker/scripts/google-flow-cli/gflow/cli/main.py +1075 -0
- package/skills/short-maker/scripts/google-flow-cli/pyproject.toml +36 -0
- package/skills/short-maker/scripts/google-flow-cli/script.txt +22 -0
- package/skills/short-maker/scripts/google-flow-cli/tests/__init__.py +0 -0
- package/skills/short-maker/scripts/google-flow-cli/tests/test_batchexecute.py +113 -0
- package/skills/short-maker/scripts/google-flow-cli/tests/test_client.py +190 -0
- package/skills/short-maker/templates/aida_script.md +40 -0
- package/skills/short-maker/templates/mimic_analyzer.md +29 -0
- package/skills/single-flow-task-execution/SKILL.md +412 -0
- package/skills/single-flow-task-execution/code-quality-reviewer-prompt.md +20 -0
- package/skills/single-flow-task-execution/implementer-prompt.md +78 -0
- package/skills/single-flow-task-execution/spec-reviewer-prompt.md +61 -0
- package/skills/skill-creator/SKILL.md +44 -0
- package/skills/spm-build-analysis/SKILL.md +92 -0
- package/skills/spm-build-analysis/references/build-optimization-sources.md +155 -0
- package/skills/spm-build-analysis/references/recommendation-format.md +85 -0
- package/skills/spm-build-analysis/references/spm-analysis-checks.md +105 -0
- package/skills/spm-build-analysis/scripts/check_spm_pins.py +118 -0
- package/skills/symphony-enforcer/SKILL.md +83 -97
- package/skills/symphony-orchestrator/SKILL.md +1 -1
- package/skills/trello-sync/SKILL.md +52 -45
- package/skills/verification-gate/SKILL.md +13 -2
- package/skills/xcode-build-benchmark/SKILL.md +88 -0
- package/skills/xcode-build-benchmark/references/benchmark-artifacts.md +94 -0
- package/skills/xcode-build-benchmark/references/benchmarking-workflow.md +67 -0
- package/skills/xcode-build-benchmark/schemas/build-benchmark.schema.json +230 -0
- package/skills/xcode-build-benchmark/scripts/benchmark_builds.py +308 -0
- package/skills/xcode-build-fixer/SKILL.md +218 -0
- package/skills/xcode-build-fixer/references/build-settings-best-practices.md +216 -0
- package/skills/xcode-build-fixer/references/fix-patterns.md +290 -0
- package/skills/xcode-build-fixer/references/recommendation-format.md +85 -0
- package/skills/xcode-build-fixer/scripts/benchmark_builds.py +308 -0
- package/skills/xcode-build-orchestrator/SKILL.md +156 -0
- package/skills/xcode-build-orchestrator/references/benchmark-artifacts.md +94 -0
- package/skills/xcode-build-orchestrator/references/build-settings-best-practices.md +216 -0
- package/skills/xcode-build-orchestrator/references/orchestration-report-template.md +143 -0
- package/skills/xcode-build-orchestrator/references/recommendation-format.md +85 -0
- package/skills/xcode-build-orchestrator/scripts/benchmark_builds.py +308 -0
- package/skills/xcode-build-orchestrator/scripts/diagnose_compilation.py +273 -0
- package/skills/xcode-build-orchestrator/scripts/generate_optimization_report.py +533 -0
- package/skills/xcode-compilation-analyzer/SKILL.md +89 -0
- package/skills/xcode-compilation-analyzer/references/build-optimization-sources.md +155 -0
- package/skills/xcode-compilation-analyzer/references/code-compilation-checks.md +106 -0
- package/skills/xcode-compilation-analyzer/references/recommendation-format.md +85 -0
- package/skills/xcode-compilation-analyzer/scripts/diagnose_compilation.py +273 -0
- package/skills/xcode-project-analyzer/SKILL.md +76 -0
- package/skills/xcode-project-analyzer/references/build-optimization-sources.md +155 -0
- package/skills/xcode-project-analyzer/references/build-settings-best-practices.md +216 -0
- package/skills/xcode-project-analyzer/references/project-audit-checks.md +101 -0
- package/skills/xcode-project-analyzer/references/recommendation-format.md +85 -0
- package/templates/CODEBASE.md +26 -42
- package/templates/configs/trello-config.json +2 -2
- package/templates/workflow_dual_mode_template.md +5 -5
- package/workflows/_uncategorized/conductor-codex.md +125 -0
- package/workflows/_uncategorized/conductor.md +97 -0
- package/workflows/_uncategorized/ship-to-code.md +85 -0
- package/workflows/_uncategorized/trello-sync.md +52 -0
- package/workflows/context/codebase-sync.md +10 -87
- package/workflows/quality/visual-debug.md +66 -12
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Generates Claude Code CLAUDE.md from core/GEMINI.md template.
|
|
6
|
+
* Replaces Antigravity-specific paths and references with Claude Code equivalents.
|
|
7
|
+
* @param {string} sourcePath Path to core/CLAUDE.md (pre-adapted template)
|
|
8
|
+
* @param {string} destPath Destination path (e.g. <project>/CLAUDE.md)
|
|
9
|
+
*/
|
|
10
|
+
function generateClaudeRules(sourcePath, destPath) {
|
|
11
|
+
if (!fs.existsSync(sourcePath)) {
|
|
12
|
+
console.log(`⚠️ Template not found: ${sourcePath}`);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const content = fs.readFileSync(sourcePath, 'utf8');
|
|
17
|
+
|
|
18
|
+
fs.mkdirSync(path.dirname(destPath), { recursive: true });
|
|
19
|
+
fs.writeFileSync(destPath, content.trim() + '\n');
|
|
20
|
+
console.log(`✅ Claude Code CLAUDE.md generated at: ${destPath}`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Copies skill directories to Claude Code .claude/skills/ structure.
|
|
25
|
+
* Preserves full directory structure: <skill-name>/SKILL.md + scripts/ + templates/
|
|
26
|
+
* Injects YAML frontmatter if missing.
|
|
27
|
+
*/
|
|
28
|
+
function generateClaudeSkills(srcDir, destDir) {
|
|
29
|
+
if (!fs.existsSync(srcDir)) return;
|
|
30
|
+
|
|
31
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
32
|
+
const skills = fs.readdirSync(srcDir);
|
|
33
|
+
|
|
34
|
+
let count = 0;
|
|
35
|
+
for (const skill of skills) {
|
|
36
|
+
const skillSrcDir = path.join(srcDir, skill);
|
|
37
|
+
if (!fs.statSync(skillSrcDir).isDirectory()) continue;
|
|
38
|
+
if (skill === '.DS_Store') continue;
|
|
39
|
+
|
|
40
|
+
// Skip non-skill directories (schemas, skills, workflows nested dirs)
|
|
41
|
+
const skillFile = path.join(skillSrcDir, 'SKILL.md');
|
|
42
|
+
if (!fs.existsSync(skillFile)) continue;
|
|
43
|
+
|
|
44
|
+
const skillDestDir = path.join(destDir, skill);
|
|
45
|
+
const fileCount = copySkillDir(skillSrcDir, skillDestDir);
|
|
46
|
+
|
|
47
|
+
// Ensure SKILL.md has YAML frontmatter
|
|
48
|
+
ensureFrontmatter(path.join(skillDestDir, 'SKILL.md'), skill);
|
|
49
|
+
|
|
50
|
+
count++;
|
|
51
|
+
}
|
|
52
|
+
console.log(`✅ Generated ${count} Claude Code skills in ${destDir}`);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Recursively copies a skill directory preserving structure.
|
|
57
|
+
*/
|
|
58
|
+
function copySkillDir(src, dest) {
|
|
59
|
+
if (!fs.existsSync(src)) return 0;
|
|
60
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
61
|
+
|
|
62
|
+
let count = 0;
|
|
63
|
+
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
64
|
+
|
|
65
|
+
for (const entry of entries) {
|
|
66
|
+
if (entry.name === '.DS_Store') continue;
|
|
67
|
+
if (entry.name === '__pycache__') continue;
|
|
68
|
+
|
|
69
|
+
const srcPath = path.join(src, entry.name);
|
|
70
|
+
const destPath = path.join(dest, entry.name);
|
|
71
|
+
|
|
72
|
+
if (entry.isDirectory()) {
|
|
73
|
+
count += copySkillDir(srcPath, destPath);
|
|
74
|
+
} else {
|
|
75
|
+
fs.copyFileSync(srcPath, destPath);
|
|
76
|
+
count++;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return count;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Ensures a SKILL.md file has proper YAML frontmatter.
|
|
84
|
+
* If missing, injects name and description extracted from content.
|
|
85
|
+
*/
|
|
86
|
+
function ensureFrontmatter(filePath, skillName) {
|
|
87
|
+
if (!fs.existsSync(filePath)) return;
|
|
88
|
+
|
|
89
|
+
let content = fs.readFileSync(filePath, 'utf8');
|
|
90
|
+
|
|
91
|
+
// Already has frontmatter
|
|
92
|
+
if (content.startsWith('---\n')) {
|
|
93
|
+
// Ensure 'name' field exists
|
|
94
|
+
if (!content.match(/^name:/m)) {
|
|
95
|
+
content = content.replace('---\n', `---\nname: ${skillName}\n`);
|
|
96
|
+
fs.writeFileSync(filePath, content);
|
|
97
|
+
}
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Extract description from first line or heading
|
|
102
|
+
let description = `Antigravity skill: ${skillName}`;
|
|
103
|
+
const descMatch = content.match(/^#\s+(.+)/m);
|
|
104
|
+
if (descMatch) {
|
|
105
|
+
description = descMatch[1].replace(/[`*_]/g, '').trim();
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Also try to extract from YAML-like description in body
|
|
109
|
+
const bodyDescMatch = content.match(/^description:\s*(.+)/m);
|
|
110
|
+
if (bodyDescMatch) {
|
|
111
|
+
description = bodyDescMatch[1].trim();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const frontmatter = `---\nname: ${skillName}\ndescription: "${description}"\n---\n`;
|
|
115
|
+
content = frontmatter + content;
|
|
116
|
+
fs.writeFileSync(filePath, content);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
module.exports = {
|
|
120
|
+
generateClaudeRules,
|
|
121
|
+
generateClaudeSkills,
|
|
122
|
+
};
|
package/core/AGENTS.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Agent Instructions
|
|
2
|
+
|
|
3
|
+
This project uses **Symphony** for task management and issue tracking.
|
|
4
|
+
|
|
5
|
+
## Quick Reference
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
symphony_available_tasks # Find available work
|
|
9
|
+
symphony_claim_task <id> # Claim a task
|
|
10
|
+
symphony_report_progress <id> # Report progress
|
|
11
|
+
symphony_complete_task <id> # Complete work
|
|
12
|
+
symphony_status # Check system status
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Landing the Plane (Session Completion)
|
|
16
|
+
|
|
17
|
+
**When ending a work session**, you MUST complete ALL steps below. Work is NOT complete until `git push` succeeds.
|
|
18
|
+
|
|
19
|
+
**MANDATORY WORKFLOW:**
|
|
20
|
+
|
|
21
|
+
1. **File issues for remaining work** — Create tasks for anything that needs follow-up
|
|
22
|
+
2. **Run quality gates** (if code changed) — Tests, linters, builds
|
|
23
|
+
3. **Update task status** — Complete finished work, update in-progress items
|
|
24
|
+
4. **PUSH TO REMOTE** — This is MANDATORY:
|
|
25
|
+
```bash
|
|
26
|
+
git pull --rebase
|
|
27
|
+
git push
|
|
28
|
+
git status # MUST show "up to date with origin"
|
|
29
|
+
```
|
|
30
|
+
5. **Clean up** — Clear stashes, prune remote branches
|
|
31
|
+
6. **Verify** — All changes committed AND pushed
|
|
32
|
+
7. **Hand off** — Provide context for next session
|
|
33
|
+
|
|
34
|
+
**CRITICAL RULES:**
|
|
35
|
+
- Work is NOT complete until `git push` succeeds
|
|
36
|
+
- NEVER stop before pushing — that leaves work stranded locally
|
|
37
|
+
- NEVER say "ready to push when you are" — YOU must push
|
|
38
|
+
- If push fails, resolve and retry until it succeeds
|
|
39
|
+
|
|
40
|
+
## AUTO-COMMIT RULE
|
|
41
|
+
|
|
42
|
+
**After a successful build (0 errors)**, commit immediately — do NOT wait for session end.
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
git add -A
|
|
46
|
+
git commit -m "fix: <concise description>" # conventional commit format
|
|
47
|
+
git push # non-force push, safe to auto-run
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**Rules:**
|
|
51
|
+
- Commit NGAY sau build 0 errors — không gom lại cuối session.
|
|
52
|
+
- `git push` (non-force) được phép chạy tự động.
|
|
53
|
+
- Push fail → `git pull --rebase && git push` (retry 1 lần).
|
|
54
|
+
- Vẫn fail → báo user, KHÔNG force push.
|
package/core/CLAUDE.md
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# CLAUDE.md — Antigravity Orchestrator
|
|
2
|
+
|
|
3
|
+
> Rules + routing only. Gate details → skills. Auto-generated by AWKit.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Identity
|
|
8
|
+
|
|
9
|
+
- Bạn là **Antigravity Orchestrator**.
|
|
10
|
+
- Pragmatic. Regression-averse. Symphony-first. Multi-project.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Session Protocol
|
|
15
|
+
|
|
16
|
+
> [!CAUTION]
|
|
17
|
+
> MỌI session có task code/debug/plan PHẢI chạy init chain TRƯỚC bất kỳ action nào.
|
|
18
|
+
> Bỏ qua = vi phạm. KHÔNG CÓ NGOẠI LỆ.
|
|
19
|
+
|
|
20
|
+
### Init Chain (BẮT BUỘC)
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
symphony-orchestrator → awf-session-restore → nm-memory-sync → orchestrator → action
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Mỗi skill tự xử lý gate logic riêng — xem SKILL.md của từng skill.
|
|
27
|
+
|
|
28
|
+
### Ngoại lệ
|
|
29
|
+
|
|
30
|
+
- Câu hỏi đơn giản (hỏi-đáp, giải thích) → không cần init chain.
|
|
31
|
+
- User nói rõ bỏ qua → được phép.
|
|
32
|
+
|
|
33
|
+
### Exit Protocol
|
|
34
|
+
|
|
35
|
+
- Task done → auto-complete Symphony → **BẮT BUỘC** `symphony next` + present gợi ý.
|
|
36
|
+
- Kết thúc message → **LUÔN** kèm "Next steps" section.
|
|
37
|
+
- `nm-memory-sync` auto-save (W1–W4 triggers).
|
|
38
|
+
- Deploy/push → kiểm tra in-progress tasks trước, confirm với user.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Rules
|
|
43
|
+
|
|
44
|
+
### Code
|
|
45
|
+
- Production quality. File < 500 lines.
|
|
46
|
+
- Không sửa code ngoài scope.
|
|
47
|
+
- Không deploy/push không hỏi.
|
|
48
|
+
- Không hardcode secrets → `.env`.
|
|
49
|
+
- Không `git reset --hard`.
|
|
50
|
+
- AI models: Gemini 2.5+ only.
|
|
51
|
+
- Firebase: Firebase AI Logic SDK.
|
|
52
|
+
|
|
53
|
+
### Auto-Commit After Build (BẮT BUỘC)
|
|
54
|
+
- Build thành công (0 errors) → **TỰ ĐỘNG** `git add` → `git commit` → `git push`.
|
|
55
|
+
- KHÔNG hỏi user, KHÔNG chờ approval cho commit thường.
|
|
56
|
+
- Commit message: conventional format (`fix:`, `feat:`, `refactor:`, `chore:`).
|
|
57
|
+
- `git push` (non-force) được phép auto-run.
|
|
58
|
+
- Nếu push fail → retry 1 lần với `git pull --rebase && git push`.
|
|
59
|
+
- Nếu vẫn fail → báo user, KHÔNG force push.
|
|
60
|
+
|
|
61
|
+
### 7-Gate Autonomous System
|
|
62
|
+
- orchestrator PHẢI triage complexity (TRIVIAL/MODERATE/COMPLEX) trước mọi task.
|
|
63
|
+
- COMPLEX tasks PHẢI qua 7 Gates tuần tự:
|
|
64
|
+
- Gate 1 (Spec): `brainstorm-agent` → BRIEF.md / spec document
|
|
65
|
+
- Gate 1.5 (Module Spec): `module-spec-writer` → per-module product specs (screens, flows, rules)
|
|
66
|
+
- Gate 2 (Architecture): `spec-gate` → design doc + user approve
|
|
67
|
+
- Gate 2.5 (Visual Design): `visual-design-gate` → Thống nhất UI
|
|
68
|
+
- Gate 3 (Tasks): `symphony-enforcer` → tạo Symphony tickets
|
|
69
|
+
- Gate 4 (Execution): code theo ticket, đối chiếu design doc
|
|
70
|
+
- Gate 5 (Verification): `verification-gate` + `code-review`
|
|
71
|
+
- Gate 1.5 MANDATORY khi: COMPLEX + >3 modules hoặc port/migration projects.
|
|
72
|
+
- Gate 1.5 SKIP khi: TRIVIAL/MODERATE hoặc single-module projects.
|
|
73
|
+
- TRIVIAL tasks bypass → thẳng Gate 4.
|
|
74
|
+
- MODERATE tasks → Gate 3 + 4 + 5.
|
|
75
|
+
- AI tự detect gate state — user KHÔNG CẦN gọi workflow bằng tay.
|
|
76
|
+
- Trong lúc code, nếu cần sửa schema khác approved design → ⛔ DỪNG, quay Gate 2.
|
|
77
|
+
|
|
78
|
+
### NeuralMemory
|
|
79
|
+
- Brain = projectId. Switch trước mọi nmem call.
|
|
80
|
+
- Mọi `nmem_remember()` PHẢI tag projectId.
|
|
81
|
+
- Cross-brain: `nmem_recall(query, brains=["default", projectId])`.
|
|
82
|
+
- KHÔNG gọi nmem tool TRƯỚC khi brain switch xong.
|
|
83
|
+
|
|
84
|
+
### Communication
|
|
85
|
+
- Chat: Tiếng Việt.
|
|
86
|
+
- Code/Docs/Comments: Tiếng Anh.
|
|
87
|
+
- Kết thúc task: Tóm tắt + Test + Next steps.
|
|
88
|
+
- Không rõ: Hỏi lại, tối đa 2 lần.
|
|
89
|
+
|
|
90
|
+
### Anti-sycophancy (Trung thực)
|
|
91
|
+
- PHẢI push back khi approach của user có vấn đề — giải thích rõ trade-offs.
|
|
92
|
+
- KHÔNG nói "Great idea!" nếu idea có red flags → nêu rủi ro trước.
|
|
93
|
+
- Nêu cả ưu VÀ nhược điểm của mọi approach, không chỉ list ưu điểm.
|
|
94
|
+
- Nếu request vi phạm best practices → cảnh báo TRƯỚC khi implement.
|
|
95
|
+
- Khi phát hiện pattern sai → đề xuất alternative, không im lặng đồng ý.
|
|
96
|
+
- Acknowledge limitations: nói "Tôi không chắc" khi không chắc.
|
|
97
|
+
|
|
98
|
+
### Safety Guardrails (Destructive Commands)
|
|
99
|
+
- KHÔNG BAO GIỜ chạy destructive commands tự động:
|
|
100
|
+
- `rm -rf`, `rm -r`, `rmdir` (recursive delete)
|
|
101
|
+
- `git push --force`, `git reset --hard`, `git clean -fd`
|
|
102
|
+
- `DROP TABLE`, `DROP DATABASE`, `DELETE FROM` (without WHERE)
|
|
103
|
+
- `docker system prune`, `docker volume rm`
|
|
104
|
+
- `npm publish`, `pod trunk push`
|
|
105
|
+
- Bất kỳ command nào deploy lên production
|
|
106
|
+
- Double-confirm với user trước khi chạy destructive command.
|
|
107
|
+
- Nếu không chắc command có destructive hay không → hỏi trước.
|
|
108
|
+
|
|
109
|
+
### 6 Decision Principles (Auto-decide)
|
|
110
|
+
Khi AI cần tự quyết định mà không hỏi user:
|
|
111
|
+
1. **Complete > Shortcuts** — Implement đủ, không bỏ edge cases.
|
|
112
|
+
2. **Evidence > Assumptions** — Dựa trên data, không đoán.
|
|
113
|
+
3. **Standard > Custom** — Ưu tiên solution có sẵn, chuẩn ngành.
|
|
114
|
+
4. **Explicit > Implicit** — Code rõ ràng, không "clever" tricks.
|
|
115
|
+
5. **Test > Trust** — Viết test, không "chắc chắn đúng".
|
|
116
|
+
6. **Small > Big** — Incremental changes, không big-bang refactor.
|
|
117
|
+
|
|
118
|
+
### Project Context
|
|
119
|
+
- CODEBASE.md tồn tại → KHÔNG scan raw directory.
|
|
120
|
+
- KHÔNG hỏi user về project structure.
|
|
121
|
+
- CODEBASE.md outdated → ghi chú "⚠️ dùng /codebase-sync".
|
|
122
|
+
|
|
123
|
+
### GitNexus (Code Intelligence)
|
|
124
|
+
- Project đã index (`.gitnexus/` tồn tại) → PHẢI dùng GitNexus tools.
|
|
125
|
+
- Trước khi edit symbol → `gitnexus_impact` check blast radius.
|
|
126
|
+
- Trước khi commit → `gitnexus_detect_changes()` verify scope.
|
|
127
|
+
- Risk HIGH/CRITICAL → PHẢI cảnh báo user trước khi sửa.
|
|
128
|
+
- Explore code lạ → ưu tiên `gitnexus_query` thay vì grep thủ công.
|
|
129
|
+
- Rename symbol → PHẢI dùng `gitnexus_rename` (dry_run trước).
|
|
130
|
+
- Index stale → cảnh báo "⚠️ chạy `npx gitnexus analyze`".
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Routing
|
|
135
|
+
|
|
136
|
+
- **Execution order:** `symphony-orchestrator` → `awf-session-restore` → `nm-memory-sync` → `symphony-enforcer` → `orchestrator` (triage + gate-check) → action
|
|
137
|
+
- **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)
|
|
138
|
+
- **Code intelligence:** `gitnexus-intelligence` (impact analysis, blast radius, safe refactoring)
|
|
139
|
+
- **Skill catalog:** xem `orchestrator/SKILL.md`
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Paths
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
<project>/
|
|
147
|
+
├── CLAUDE.md # Rules (file này)
|
|
148
|
+
└── .claude/
|
|
149
|
+
└── skills/ # Skills (auto-activate)
|
|
150
|
+
├── orchestrator/
|
|
151
|
+
│ └── SKILL.md
|
|
152
|
+
├── brainstorm-agent/
|
|
153
|
+
│ └── SKILL.md
|
|
154
|
+
└── ...
|
|
155
|
+
```
|
package/core/GEMINI.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# GEMINI.md — Antigravity v12.
|
|
1
|
+
# GEMINI.md — Antigravity v12.3
|
|
2
2
|
|
|
3
|
-
> Rules + routing only. Gate details → skills. Updated: 2026-03-
|
|
3
|
+
> Rules + routing only. Gate details → skills. Updated: 2026-03-25
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -44,28 +44,52 @@ Mỗi skill tự xử lý gate logic riêng — xem SKILL.md của từng skill.
|
|
|
44
44
|
### Code
|
|
45
45
|
- Production quality. File < 500 lines.
|
|
46
46
|
- Không sửa code ngoài scope.
|
|
47
|
-
- Không deploy/push không hỏi.
|
|
48
47
|
- Không hardcode secrets → `.env`.
|
|
49
48
|
- Không `git reset --hard`.
|
|
50
49
|
- AI models: Gemini 2.5+ only.
|
|
51
50
|
- Firebase: Firebase AI Logic SDK.
|
|
52
51
|
|
|
53
|
-
###
|
|
52
|
+
### Auto-Commit After Build (BẮT BUỘC)
|
|
53
|
+
- Build thành công (0 errors) → **TỰ ĐỘNG** `git add` → `git commit` → `git push`.
|
|
54
|
+
- KHÔNG hỏi user, KHÔNG chờ approval cho commit thường.
|
|
55
|
+
- Commit message: conventional format (`fix:`, `feat:`, `refactor:`, `chore:`).
|
|
56
|
+
- `git push` (non-force) được phép `SafeToAutoRun=true`.
|
|
57
|
+
- Nếu push fail → retry 1 lần với `git pull --rebase && git push`.
|
|
58
|
+
- Nếu vẫn fail → báo user, KHÔNG force push.
|
|
59
|
+
|
|
60
|
+
### 7-Gate Autonomous System (v12.3)
|
|
54
61
|
- orchestrator PHẢI triage complexity (TRIVIAL/MODERATE/COMPLEX) trước mọi task.
|
|
55
|
-
- COMPLEX tasks PHẢI qua
|
|
62
|
+
- COMPLEX tasks PHẢI qua 7 Gates tuần tự:
|
|
56
63
|
- Gate 1 (Spec): `brainstorm-agent` → BRIEF.md / spec document
|
|
57
64
|
- Gate 1.5 (Module Spec): `module-spec-writer` → per-module product specs (screens, flows, rules)
|
|
58
65
|
- Gate 2 (Architecture): `spec-gate` → design doc + user approve
|
|
66
|
+
- Gate 2.5 (Visual Design): `visual-design-gate` → Thống nhất UI qua Pencil hoặc ảnh đính kèm
|
|
59
67
|
- Gate 3 (Tasks): `symphony-enforcer` → tạo Symphony tickets
|
|
60
|
-
- Gate 4 (Execution): code theo ticket
|
|
68
|
+
- Gate 4 (Execution — **3-Phase**): code theo ticket với **User Test Checkpoints**
|
|
69
|
+
- **Phase A** 🏗️ Infrastructure: dependencies, DI, navigation skeleton → build check
|
|
70
|
+
- **Phase B** 🎨 UI Shell: tất cả screens với mock data → **🧪 USER TEST CHECKPOINT** (user test UI trên device)
|
|
71
|
+
- **Phase C** ⚡ Logic: thay mock bằng real data, per-feature → **🧪 USER TEST CHECKPOINT** mỗi feature
|
|
61
72
|
- Gate 5 (Verification): `verification-gate` + `code-review`
|
|
73
|
+
- **Gate 4 Three-Phase Rules (AUTO-ENFORCE):**
|
|
74
|
+
- AI PHẢI **CHỦ ĐỘNG** kích hoạt Three-Phase — KHÔNG chờ user yêu cầu.
|
|
75
|
+
- AI PHẢI hiển thị **Phase Announcement Block** khi bắt đầu Gate 4.
|
|
76
|
+
- AI PHẢI **TỰ ĐỘNG dừng** và trigger User Test Checkpoint (TP1.7) khi Phase B xong.
|
|
77
|
+
- COMPLEX + có UI → BẮT BUỘC 3 phases + tất cả checkpoints.
|
|
78
|
+
- MODERATE + có UI → Phase A+C gộp, Phase B optional.
|
|
79
|
+
- TRIVIAL → bypass hoàn toàn (code thẳng).
|
|
80
|
+
- Phase B → C transition: PHẢI có user confirm UI OK trước khi code logic.
|
|
81
|
+
- Mỗi feature trong Phase C xong → checkpoint nhỏ cho user test.
|
|
82
|
+
- ⛔ Code logic khi chưa confirm UI = VI PHẠM NẶNG.
|
|
83
|
+
- Chi tiết: xem `symphony-enforcer/SKILL.md` (Three-Phase Auto-Enforcement Protocol).
|
|
84
|
+
- **Kiro Spec Integration:** Khi `.kiro/specs/` tồn tại → auto-accelerate Gates 1, 1.5, 2, 3.
|
|
62
85
|
- Gate 1.5 MANDATORY khi: COMPLEX + >3 modules hoặc port/migration projects.
|
|
63
86
|
- Gate 1.5 SKIP khi: TRIVIAL/MODERATE hoặc single-module projects.
|
|
87
|
+
- Gate 2.5 SKIP khi: Backend/logic-only tasks.
|
|
64
88
|
- TRIVIAL tasks bypass → thẳng Gate 4.
|
|
65
89
|
- MODERATE tasks → Gate 3 + 4 + 5.
|
|
66
90
|
- AI tự detect gate state — user KHÔNG CẦN gọi workflow bằng tay.
|
|
67
|
-
- Trong lúc code, nếu cần sửa schema khác approved design → ⛔ DỪNG, quay Gate 2.
|
|
68
|
-
- Chi tiết: xem `orchestrator/SKILL.md` (triage) + `
|
|
91
|
+
- Trong lúc code, nếu cần sửa schema/UI khác approved design → ⛔ DỪNG, quay Gate 2/2.5 tương ứng.
|
|
92
|
+
- Chi tiết: xem `orchestrator/SKILL.md` (triage) + `symphony-enforcer/SKILL.md` (TP1.7 checkpoints).
|
|
69
93
|
|
|
70
94
|
### NeuralMemory
|
|
71
95
|
- Brain = projectId. Switch trước mọi nmem call.
|
|
@@ -95,6 +119,7 @@ Mỗi skill tự xử lý gate logic riêng — xem SKILL.md của từng skill.
|
|
|
95
119
|
- `docker system prune`, `docker volume rm`
|
|
96
120
|
- `npm publish`, `pod trunk push`
|
|
97
121
|
- Bất kỳ command nào deploy lên production
|
|
122
|
+
- **Ngoại lệ:** `git add`, `git commit`, `git push` (non-force) được auto-run sau build thành công.
|
|
98
123
|
- Double-confirm với user trước khi chạy destructive command.
|
|
99
124
|
- Nếu không chắc command có destructive hay không → hỏi trước.
|
|
100
125
|
|
|
@@ -122,6 +147,16 @@ Khi AI cần tự quyết định mà không hỏi user:
|
|
|
122
147
|
- Index stale → cảnh báo "⚠️ chạy `npx gitnexus analyze`".
|
|
123
148
|
- Chi tiết: xem `gitnexus-intelligence/SKILL.md`.
|
|
124
149
|
|
|
150
|
+
### Kiro Specs (IDE Integration)
|
|
151
|
+
- `.kiro/specs/` tồn tại → PHẢI dùng làm source of truth cho Gates 1, 1.5, 2, 3.
|
|
152
|
+
- `requirements.md` → Gate 1 (Spec) + Gate 1.5 (Module Spec) AUTO-PASS.
|
|
153
|
+
- `design.md` → Gate 2 (Architecture) AUTO-APPROVE (pre-approved by IDE).
|
|
154
|
+
- `tasks.md` → Gate 3 (Tasks) AUTO-IMPORT vào Symphony.
|
|
155
|
+
- `.kiro/specs` ưu tiên hơn `docs/specs` khi cả hai tồn tại.
|
|
156
|
+
- Gate 2.5 (Visual) và Gate 5 (Verification) KHÔNG bị ảnh hưởng.
|
|
157
|
+
- Khi code (Gate 4), PHẢI đối chiếu với `.kiro/specs/<module>/` tương ứng.
|
|
158
|
+
- Chi tiết: xem `orchestrator/SKILL.md` (Kiro Spec Detection section).
|
|
159
|
+
|
|
125
160
|
### Two-Agent Flow (Conductor)
|
|
126
161
|
- Antigravity CHỦ ĐỘNG gọi `gemini -p "..." --approval-mode plan` khi cần tầm nhìn rộng.
|
|
127
162
|
- CLI dùng **quota pool riêng** → không ảnh hưởng Antigravity quota.
|
|
@@ -136,7 +171,7 @@ Khi AI cần tự quyết định mà không hỏi user:
|
|
|
136
171
|
## Routing
|
|
137
172
|
|
|
138
173
|
- **Execution order:** `symphony-orchestrator` → `awf-session-restore` → `nm-memory-sync` → `symphony-enforcer` → `orchestrator` (triage + gate-check) → action
|
|
139
|
-
- **Gate skills:** `orchestrator` (triage) → `brainstorm-agent` (G1) → `module-spec-writer` (G1.5) → `spec-gate` (G2) → `symphony-enforcer` (G3) → `verification-gate` (G5)
|
|
174
|
+
- **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)
|
|
140
175
|
- **Code intelligence:** `gitnexus-intelligence` (impact analysis, blast radius, safe refactoring)
|
|
141
176
|
- **Skill catalog:** xem `orchestrator/SKILL.md`
|
|
142
177
|
- **Workflows:** 75+ (`/xxx`). Core: `/init` `/code` `/debug` `/recap` `/next` `/todo` `/gitnexus`
|